@powerhousedao/reactor-browser 6.0.0-dev.90 → 6.0.0-dev.92
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/src/analytics.js +80 -38
- package/dist/src/connect.js +30 -9
- package/dist/src/index.js +323 -305
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
package/dist/src/analytics.js
CHANGED
|
@@ -4,39 +4,60 @@ var __defProp = Object.defineProperty;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
function __accessProp(key) {
|
|
8
|
+
return this[key];
|
|
9
|
+
}
|
|
10
|
+
var __toESMCache_node;
|
|
11
|
+
var __toESMCache_esm;
|
|
7
12
|
var __toESM = (mod, isNodeMode, target) => {
|
|
13
|
+
var canCache = mod != null && typeof mod === "object";
|
|
14
|
+
if (canCache) {
|
|
15
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
16
|
+
var cached = cache.get(mod);
|
|
17
|
+
if (cached)
|
|
18
|
+
return cached;
|
|
19
|
+
}
|
|
8
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
9
21
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
22
|
for (let key of __getOwnPropNames(mod))
|
|
11
23
|
if (!__hasOwnProp.call(to, key))
|
|
12
24
|
__defProp(to, key, {
|
|
13
|
-
get: (
|
|
25
|
+
get: __accessProp.bind(mod, key),
|
|
14
26
|
enumerable: true
|
|
15
27
|
});
|
|
28
|
+
if (canCache)
|
|
29
|
+
cache.set(mod, to);
|
|
16
30
|
return to;
|
|
17
31
|
};
|
|
18
|
-
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
19
32
|
var __toCommonJS = (from) => {
|
|
20
|
-
var entry = __moduleCache.get(from), desc;
|
|
33
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
21
34
|
if (entry)
|
|
22
35
|
return entry;
|
|
23
36
|
entry = __defProp({}, "__esModule", { value: true });
|
|
24
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
37
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
38
|
+
for (var key of __getOwnPropNames(from))
|
|
39
|
+
if (!__hasOwnProp.call(entry, key))
|
|
40
|
+
__defProp(entry, key, {
|
|
41
|
+
get: __accessProp.bind(from, key),
|
|
42
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
43
|
+
});
|
|
44
|
+
}
|
|
29
45
|
__moduleCache.set(from, entry);
|
|
30
46
|
return entry;
|
|
31
47
|
};
|
|
48
|
+
var __moduleCache;
|
|
32
49
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
50
|
+
var __returnValue = (v) => v;
|
|
51
|
+
function __exportSetter(name, newValue) {
|
|
52
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
53
|
+
}
|
|
33
54
|
var __export = (target, all) => {
|
|
34
55
|
for (var name in all)
|
|
35
56
|
__defProp(target, name, {
|
|
36
57
|
get: all[name],
|
|
37
58
|
enumerable: true,
|
|
38
59
|
configurable: true,
|
|
39
|
-
set: (
|
|
60
|
+
set: __exportSetter.bind(all, name)
|
|
40
61
|
});
|
|
41
62
|
};
|
|
42
63
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
@@ -5571,39 +5592,60 @@ var __defProp2 = Object.defineProperty;
|
|
|
5571
5592
|
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
5572
5593
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
5573
5594
|
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
5595
|
+
function __accessProp2(key) {
|
|
5596
|
+
return this[key];
|
|
5597
|
+
}
|
|
5598
|
+
var __toESMCache_node2;
|
|
5599
|
+
var __toESMCache_esm2;
|
|
5574
5600
|
var __toESM2 = (mod, isNodeMode, target) => {
|
|
5601
|
+
var canCache = mod != null && typeof mod === "object";
|
|
5602
|
+
if (canCache) {
|
|
5603
|
+
var cache = isNodeMode ? __toESMCache_node2 ??= new WeakMap : __toESMCache_esm2 ??= new WeakMap;
|
|
5604
|
+
var cached = cache.get(mod);
|
|
5605
|
+
if (cached)
|
|
5606
|
+
return cached;
|
|
5607
|
+
}
|
|
5575
5608
|
target = mod != null ? __create2(__getProtoOf2(mod)) : {};
|
|
5576
5609
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target;
|
|
5577
5610
|
for (let key of __getOwnPropNames2(mod))
|
|
5578
5611
|
if (!__hasOwnProp2.call(to, key))
|
|
5579
5612
|
__defProp2(to, key, {
|
|
5580
|
-
get: (
|
|
5613
|
+
get: __accessProp2.bind(mod, key),
|
|
5581
5614
|
enumerable: true
|
|
5582
5615
|
});
|
|
5616
|
+
if (canCache)
|
|
5617
|
+
cache.set(mod, to);
|
|
5583
5618
|
return to;
|
|
5584
5619
|
};
|
|
5585
|
-
var __moduleCache2 = /* @__PURE__ */ new WeakMap;
|
|
5586
5620
|
var __toCommonJS2 = (from) => {
|
|
5587
|
-
var entry = __moduleCache2.get(from), desc;
|
|
5621
|
+
var entry = (__moduleCache2 ??= new WeakMap).get(from), desc;
|
|
5588
5622
|
if (entry)
|
|
5589
5623
|
return entry;
|
|
5590
5624
|
entry = __defProp2({}, "__esModule", { value: true });
|
|
5591
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
5625
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
5626
|
+
for (var key of __getOwnPropNames2(from))
|
|
5627
|
+
if (!__hasOwnProp2.call(entry, key))
|
|
5628
|
+
__defProp2(entry, key, {
|
|
5629
|
+
get: __accessProp2.bind(from, key),
|
|
5630
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
5631
|
+
});
|
|
5632
|
+
}
|
|
5596
5633
|
__moduleCache2.set(from, entry);
|
|
5597
5634
|
return entry;
|
|
5598
5635
|
};
|
|
5636
|
+
var __moduleCache2;
|
|
5599
5637
|
var __commonJS2 = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
5638
|
+
var __returnValue2 = (v) => v;
|
|
5639
|
+
function __exportSetter2(name, newValue) {
|
|
5640
|
+
this[name] = __returnValue2.bind(null, newValue);
|
|
5641
|
+
}
|
|
5600
5642
|
var __export2 = (target, all) => {
|
|
5601
5643
|
for (var name in all)
|
|
5602
5644
|
__defProp2(target, name, {
|
|
5603
5645
|
get: all[name],
|
|
5604
5646
|
enumerable: true,
|
|
5605
5647
|
configurable: true,
|
|
5606
|
-
set: (
|
|
5648
|
+
set: __exportSetter2.bind(all, name)
|
|
5607
5649
|
});
|
|
5608
5650
|
};
|
|
5609
5651
|
var __esm2 = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
@@ -61986,6 +62028,9 @@ var QueryClient = class {
|
|
|
61986
62028
|
this.#mutationCache.clear();
|
|
61987
62029
|
}
|
|
61988
62030
|
};
|
|
62031
|
+
// ../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
|
|
62032
|
+
import * as React5 from "react";
|
|
62033
|
+
|
|
61989
62034
|
// ../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
|
|
61990
62035
|
import * as React from "react";
|
|
61991
62036
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -62014,15 +62059,8 @@ var QueryClientProvider = ({
|
|
|
62014
62059
|
return /* @__PURE__ */ jsx(QueryClientContext.Provider, { value: client, children });
|
|
62015
62060
|
};
|
|
62016
62061
|
|
|
62017
|
-
// ../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js
|
|
62018
|
-
import * as React2 from "react";
|
|
62019
|
-
"use client";
|
|
62020
|
-
var IsRestoringContext = React2.createContext(false);
|
|
62021
|
-
var useIsRestoring = () => React2.useContext(IsRestoringContext);
|
|
62022
|
-
var IsRestoringProvider = IsRestoringContext.Provider;
|
|
62023
|
-
|
|
62024
62062
|
// ../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
|
|
62025
|
-
import * as
|
|
62063
|
+
import * as React2 from "react";
|
|
62026
62064
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
62027
62065
|
"use client";
|
|
62028
62066
|
function createValue() {
|
|
@@ -62039,11 +62077,11 @@ function createValue() {
|
|
|
62039
62077
|
}
|
|
62040
62078
|
};
|
|
62041
62079
|
}
|
|
62042
|
-
var QueryErrorResetBoundaryContext =
|
|
62043
|
-
var useQueryErrorResetBoundary = () =>
|
|
62080
|
+
var QueryErrorResetBoundaryContext = React2.createContext(createValue());
|
|
62081
|
+
var useQueryErrorResetBoundary = () => React2.useContext(QueryErrorResetBoundaryContext);
|
|
62044
62082
|
|
|
62045
62083
|
// ../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js
|
|
62046
|
-
import * as
|
|
62084
|
+
import * as React3 from "react";
|
|
62047
62085
|
"use client";
|
|
62048
62086
|
var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary, query) => {
|
|
62049
62087
|
const throwOnError = query?.state.error && typeof options.throwOnError === "function" ? shouldThrowError(options.throwOnError, [query.state.error, query]) : options.throwOnError;
|
|
@@ -62054,7 +62092,7 @@ var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary, query) => {
|
|
|
62054
62092
|
}
|
|
62055
62093
|
};
|
|
62056
62094
|
var useClearResetErrorBoundary = (errorResetBoundary) => {
|
|
62057
|
-
|
|
62095
|
+
React3.useEffect(() => {
|
|
62058
62096
|
errorResetBoundary.clearReset();
|
|
62059
62097
|
}, [errorResetBoundary]);
|
|
62060
62098
|
};
|
|
@@ -62068,6 +62106,13 @@ var getHasError = ({
|
|
|
62068
62106
|
return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === undefined || shouldThrowError(throwOnError, [result.error, query]));
|
|
62069
62107
|
};
|
|
62070
62108
|
|
|
62109
|
+
// ../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js
|
|
62110
|
+
import * as React4 from "react";
|
|
62111
|
+
"use client";
|
|
62112
|
+
var IsRestoringContext = React4.createContext(false);
|
|
62113
|
+
var useIsRestoring = () => React4.useContext(IsRestoringContext);
|
|
62114
|
+
var IsRestoringProvider = IsRestoringContext.Provider;
|
|
62115
|
+
|
|
62071
62116
|
// ../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/suspense.js
|
|
62072
62117
|
var defaultThrowOnError = (_error, query) => query.state.data === undefined;
|
|
62073
62118
|
var ensureSuspenseTimers = (defaultedOptions) => {
|
|
@@ -62088,7 +62133,6 @@ var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observ
|
|
|
62088
62133
|
});
|
|
62089
62134
|
|
|
62090
62135
|
// ../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
|
|
62091
|
-
import * as React5 from "react";
|
|
62092
62136
|
"use client";
|
|
62093
62137
|
function useBaseQuery(options, Observer, queryClient) {
|
|
62094
62138
|
if (true) {
|
|
@@ -62167,7 +62211,6 @@ function useSuspenseQuery(options, queryClient) {
|
|
|
62167
62211
|
placeholderData: undefined
|
|
62168
62212
|
}, QueryObserver, queryClient);
|
|
62169
62213
|
}
|
|
62170
|
-
|
|
62171
62214
|
// ../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/useMutation.js
|
|
62172
62215
|
import * as React6 from "react";
|
|
62173
62216
|
"use client";
|
|
@@ -62186,7 +62229,6 @@ function useMutation(options, queryClient) {
|
|
|
62186
62229
|
}
|
|
62187
62230
|
return { ...result, mutate, mutateAsync: result.mutate };
|
|
62188
62231
|
}
|
|
62189
|
-
|
|
62190
62232
|
// src/analytics/context.tsx
|
|
62191
62233
|
import { childLogger } from "document-drive";
|
|
62192
62234
|
import { useEffect as useEffect5, useMemo } from "react";
|
|
@@ -62366,12 +62408,12 @@ function useAnalyticsEngineAsync() {
|
|
|
62366
62408
|
init_src();
|
|
62367
62409
|
import { useEffect as useEffect6 } from "react";
|
|
62368
62410
|
function useAnalyticsQueryWrapper(options) {
|
|
62369
|
-
const { queryFn, ...
|
|
62411
|
+
const { queryFn, ...queryOptions2 } = options;
|
|
62370
62412
|
const { data: store } = useAnalyticsStoreAsync();
|
|
62371
62413
|
const { data: engine } = useAnalyticsEngineAsync();
|
|
62372
|
-
const enabled = "enabled" in
|
|
62414
|
+
const enabled = "enabled" in queryOptions2 ? queryOptions2.enabled : !!store && !!engine;
|
|
62373
62415
|
return useQuery({
|
|
62374
|
-
...
|
|
62416
|
+
...queryOptions2,
|
|
62375
62417
|
enabled,
|
|
62376
62418
|
queryFn: async () => {
|
|
62377
62419
|
if (!store || !engine) {
|
|
@@ -62382,10 +62424,10 @@ function useAnalyticsQueryWrapper(options) {
|
|
|
62382
62424
|
});
|
|
62383
62425
|
}
|
|
62384
62426
|
function useAnalyticsMutationWrapper(options) {
|
|
62385
|
-
const { mutationFn, ...
|
|
62427
|
+
const { mutationFn, ...mutationOptions2 } = options;
|
|
62386
62428
|
const storeOptions = useAnalyticsStoreOptions();
|
|
62387
62429
|
return useMutation({
|
|
62388
|
-
...
|
|
62430
|
+
...mutationOptions2,
|
|
62389
62431
|
mutationFn: async (value) => {
|
|
62390
62432
|
let store = null;
|
|
62391
62433
|
try {
|
package/dist/src/connect.js
CHANGED
|
@@ -4,39 +4,60 @@ var __defProp = Object.defineProperty;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
function __accessProp(key) {
|
|
8
|
+
return this[key];
|
|
9
|
+
}
|
|
10
|
+
var __toESMCache_node;
|
|
11
|
+
var __toESMCache_esm;
|
|
7
12
|
var __toESM = (mod, isNodeMode, target) => {
|
|
13
|
+
var canCache = mod != null && typeof mod === "object";
|
|
14
|
+
if (canCache) {
|
|
15
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
16
|
+
var cached = cache.get(mod);
|
|
17
|
+
if (cached)
|
|
18
|
+
return cached;
|
|
19
|
+
}
|
|
8
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
9
21
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
22
|
for (let key of __getOwnPropNames(mod))
|
|
11
23
|
if (!__hasOwnProp.call(to, key))
|
|
12
24
|
__defProp(to, key, {
|
|
13
|
-
get: (
|
|
25
|
+
get: __accessProp.bind(mod, key),
|
|
14
26
|
enumerable: true
|
|
15
27
|
});
|
|
28
|
+
if (canCache)
|
|
29
|
+
cache.set(mod, to);
|
|
16
30
|
return to;
|
|
17
31
|
};
|
|
18
|
-
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
19
32
|
var __toCommonJS = (from) => {
|
|
20
|
-
var entry = __moduleCache.get(from), desc;
|
|
33
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
21
34
|
if (entry)
|
|
22
35
|
return entry;
|
|
23
36
|
entry = __defProp({}, "__esModule", { value: true });
|
|
24
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
37
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
38
|
+
for (var key of __getOwnPropNames(from))
|
|
39
|
+
if (!__hasOwnProp.call(entry, key))
|
|
40
|
+
__defProp(entry, key, {
|
|
41
|
+
get: __accessProp.bind(from, key),
|
|
42
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
43
|
+
});
|
|
44
|
+
}
|
|
29
45
|
__moduleCache.set(from, entry);
|
|
30
46
|
return entry;
|
|
31
47
|
};
|
|
48
|
+
var __moduleCache;
|
|
32
49
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
50
|
+
var __returnValue = (v) => v;
|
|
51
|
+
function __exportSetter(name, newValue) {
|
|
52
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
53
|
+
}
|
|
33
54
|
var __export = (target, all) => {
|
|
34
55
|
for (var name in all)
|
|
35
56
|
__defProp(target, name, {
|
|
36
57
|
get: all[name],
|
|
37
58
|
enumerable: true,
|
|
38
59
|
configurable: true,
|
|
39
|
-
set: (
|
|
60
|
+
set: __exportSetter.bind(all, name)
|
|
40
61
|
});
|
|
41
62
|
};
|
|
42
63
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|