@powerhousedao/reactor-browser 6.0.0-dev.83 → 6.0.0-dev.88
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 +29 -5
- package/dist/src/connect.js +65 -22
- package/dist/src/hooks/index.d.ts +5 -2
- package/dist/src/hooks/index.d.ts.map +1 -1
- package/dist/src/hooks/loading.d.ts +2 -0
- package/dist/src/hooks/loading.d.ts.map +1 -1
- package/dist/src/hooks/make-ph-event-functions.d.ts +1 -1
- package/dist/src/hooks/make-ph-event-functions.d.ts.map +1 -1
- package/dist/src/hooks/renown.d.ts +7 -9
- package/dist/src/hooks/renown.d.ts.map +1 -1
- package/dist/src/hooks/vetra-packages.d.ts +3 -0
- package/dist/src/hooks/vetra-packages.d.ts.map +1 -1
- package/dist/src/index.js +951 -661
- package/dist/src/package-manager.d.ts +21 -2
- package/dist/src/package-manager.d.ts.map +1 -1
- package/dist/src/re-exports.d.ts +1 -1
- package/dist/src/re-exports.d.ts.map +1 -1
- package/dist/src/registry/client.d.ts +1 -0
- package/dist/src/registry/client.d.ts.map +1 -1
- package/dist/src/remote-controller/types.d.ts +2 -2
- package/dist/src/remote-controller/types.d.ts.map +1 -1
- package/dist/src/renown/components/RenownAuthButton.d.ts +8 -14
- package/dist/src/renown/components/RenownAuthButton.d.ts.map +1 -1
- package/dist/src/renown/components/RenownLoginButton.d.ts +3 -7
- package/dist/src/renown/components/RenownLoginButton.d.ts.map +1 -1
- package/dist/src/renown/components/RenownUserButton.d.ts +10 -8
- package/dist/src/renown/components/RenownUserButton.d.ts.map +1 -1
- package/dist/src/renown/components/icons.d.ts +1 -1
- package/dist/src/renown/components/icons.d.ts.map +1 -1
- package/dist/src/renown/components/index.d.ts +3 -3
- package/dist/src/renown/components/index.d.ts.map +1 -1
- package/dist/src/renown/components/slot.d.ts +8 -0
- package/dist/src/renown/components/slot.d.ts.map +1 -0
- package/dist/src/renown/index.d.ts +3 -1
- package/dist/src/renown/index.d.ts.map +1 -1
- package/dist/src/renown/renown-init.d.ts +22 -0
- package/dist/src/renown/renown-init.d.ts.map +1 -0
- package/dist/src/renown/use-renown-auth.d.ts +17 -0
- package/dist/src/renown/use-renown-auth.d.ts.map +1 -0
- package/dist/src/renown/use-renown-init.d.ts +25 -0
- package/dist/src/renown/use-renown-init.d.ts.map +1 -0
- package/dist/src/renown/utils.d.ts.map +1 -1
- package/dist/src/types/global.d.ts +2 -1
- package/dist/src/types/global.d.ts.map +1 -1
- package/dist/src/types/vetra.d.ts +1 -1
- package/dist/src/types/vetra.d.ts.map +1 -1
- package/dist/test/renown/script.node.test.d.ts +2 -0
- package/dist/test/renown/script.node.test.d.ts.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/vitest.config.d.ts.map +1 -1
- package/package.json +7 -7
- package/dist/src/renown/components/image-data.d.ts +0 -3
- package/dist/src/renown/components/image-data.d.ts.map +0 -1
- package/dist/src/renown/provider.d.ts +0 -9
- package/dist/src/renown/provider.d.ts.map +0 -1
- package/dist/test/renown/script.test.d.ts +0 -2
- package/dist/test/renown/script.test.d.ts.map +0 -1
package/dist/src/analytics.js
CHANGED
|
@@ -62913,42 +62913,66 @@ function splitPrefixSuffix(input, options = {}) {
|
|
|
62913
62913
|
|
|
62914
62914
|
// src/hooks/make-ph-event-functions.ts
|
|
62915
62915
|
import { useSyncExternalStore as useSyncExternalStore3 } from "react";
|
|
62916
|
+
var isServer2 = typeof window === "undefined";
|
|
62916
62917
|
function makePHEventFunctions(key) {
|
|
62917
62918
|
const setEventName = `ph:set${capitalCase(key)}`;
|
|
62918
62919
|
const updateEventName = `ph:${key}Updated`;
|
|
62919
62920
|
function setValue(value) {
|
|
62921
|
+
if (isServer2) {
|
|
62922
|
+
return;
|
|
62923
|
+
}
|
|
62920
62924
|
const event = new CustomEvent(setEventName, {
|
|
62921
62925
|
detail: { [key]: value }
|
|
62922
62926
|
});
|
|
62923
62927
|
window.dispatchEvent(event);
|
|
62924
62928
|
}
|
|
62925
62929
|
function dispatchUpdatedEvent() {
|
|
62930
|
+
if (isServer2) {
|
|
62931
|
+
return;
|
|
62932
|
+
}
|
|
62926
62933
|
const event = new CustomEvent(updateEventName);
|
|
62927
62934
|
window.dispatchEvent(event);
|
|
62928
62935
|
}
|
|
62929
62936
|
function handleSetValueEvent(event) {
|
|
62937
|
+
if (isServer2) {
|
|
62938
|
+
return;
|
|
62939
|
+
}
|
|
62930
62940
|
const value = event.detail[key];
|
|
62931
|
-
if (!window.ph)
|
|
62932
|
-
|
|
62941
|
+
if (!window.ph) {
|
|
62942
|
+
window.ph = {};
|
|
62943
|
+
}
|
|
62933
62944
|
window.ph[key] = value;
|
|
62934
62945
|
dispatchUpdatedEvent();
|
|
62935
62946
|
}
|
|
62936
62947
|
function addEventHandler() {
|
|
62948
|
+
if (isServer2) {
|
|
62949
|
+
return;
|
|
62950
|
+
}
|
|
62937
62951
|
window.addEventListener(setEventName, handleSetValueEvent);
|
|
62938
62952
|
}
|
|
62939
62953
|
function subscribeToValue(onStoreChange) {
|
|
62954
|
+
if (isServer2)
|
|
62955
|
+
return () => {};
|
|
62940
62956
|
window.addEventListener(updateEventName, onStoreChange);
|
|
62941
62957
|
return () => {
|
|
62942
62958
|
window.removeEventListener(updateEventName, onStoreChange);
|
|
62943
62959
|
};
|
|
62944
62960
|
}
|
|
62945
62961
|
function getSnapshot() {
|
|
62946
|
-
if (
|
|
62947
|
-
|
|
62962
|
+
if (isServer2) {
|
|
62963
|
+
return;
|
|
62964
|
+
}
|
|
62965
|
+
if (!window.ph) {
|
|
62966
|
+
console.warn(`ph global store is not initialized. Did you call set${capitalCase(key)}?`);
|
|
62967
|
+
return;
|
|
62968
|
+
}
|
|
62948
62969
|
return window.ph[key];
|
|
62949
62970
|
}
|
|
62971
|
+
function getServerSnapshot() {
|
|
62972
|
+
return;
|
|
62973
|
+
}
|
|
62950
62974
|
function useValue() {
|
|
62951
|
-
return useSyncExternalStore3(subscribeToValue, getSnapshot);
|
|
62975
|
+
return useSyncExternalStore3(subscribeToValue, getSnapshot, getServerSnapshot);
|
|
62952
62976
|
}
|
|
62953
62977
|
return {
|
|
62954
62978
|
useValue,
|
package/dist/src/connect.js
CHANGED
|
@@ -87,12 +87,19 @@ var CREDENTIAL_TYPES = {
|
|
|
87
87
|
|
|
88
88
|
// src/renown/utils.ts
|
|
89
89
|
function openRenown(documentId) {
|
|
90
|
+
const renown = window.ph?.renown;
|
|
91
|
+
let renownUrl = renown?.baseUrl;
|
|
92
|
+
if (!renownUrl) {
|
|
93
|
+
logger.warn("Renown instance not found, falling back to: ", RENOWN_URL);
|
|
94
|
+
renownUrl = RENOWN_URL;
|
|
95
|
+
}
|
|
90
96
|
if (documentId) {
|
|
91
|
-
window.open(`${
|
|
97
|
+
window.open(`${renownUrl}/profile/${documentId}`, "_blank")?.focus();
|
|
92
98
|
return;
|
|
93
99
|
}
|
|
94
|
-
const url = new URL(
|
|
95
|
-
url.searchParams.set("
|
|
100
|
+
const url = new URL(renownUrl);
|
|
101
|
+
url.searchParams.set("app", renown?.did ?? "");
|
|
102
|
+
url.searchParams.set("connect", renown?.did ?? "");
|
|
96
103
|
url.searchParams.set("network", RENOWN_NETWORK_ID);
|
|
97
104
|
url.searchParams.set("chain", RENOWN_CHAIN_ID);
|
|
98
105
|
const returnUrl = new URL(window.location.pathname, window.location.origin);
|
|
@@ -127,7 +134,7 @@ async function login(userDid, renown) {
|
|
|
127
134
|
}
|
|
128
135
|
return await renown.login(did);
|
|
129
136
|
} catch (error) {
|
|
130
|
-
logger.error(
|
|
137
|
+
logger.error(error instanceof Error ? error.message : JSON.stringify(error));
|
|
131
138
|
}
|
|
132
139
|
}
|
|
133
140
|
async function logout() {
|
|
@@ -215,42 +222,66 @@ function splitPrefixSuffix(input, options = {}) {
|
|
|
215
222
|
|
|
216
223
|
// src/hooks/make-ph-event-functions.ts
|
|
217
224
|
import { useSyncExternalStore } from "react";
|
|
225
|
+
var isServer = typeof window === "undefined";
|
|
218
226
|
function makePHEventFunctions(key) {
|
|
219
227
|
const setEventName = `ph:set${capitalCase(key)}`;
|
|
220
228
|
const updateEventName = `ph:${key}Updated`;
|
|
221
229
|
function setValue(value) {
|
|
230
|
+
if (isServer) {
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
222
233
|
const event = new CustomEvent(setEventName, {
|
|
223
234
|
detail: { [key]: value }
|
|
224
235
|
});
|
|
225
236
|
window.dispatchEvent(event);
|
|
226
237
|
}
|
|
227
238
|
function dispatchUpdatedEvent() {
|
|
239
|
+
if (isServer) {
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
228
242
|
const event = new CustomEvent(updateEventName);
|
|
229
243
|
window.dispatchEvent(event);
|
|
230
244
|
}
|
|
231
245
|
function handleSetValueEvent(event) {
|
|
246
|
+
if (isServer) {
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
232
249
|
const value = event.detail[key];
|
|
233
|
-
if (!window.ph)
|
|
234
|
-
|
|
250
|
+
if (!window.ph) {
|
|
251
|
+
window.ph = {};
|
|
252
|
+
}
|
|
235
253
|
window.ph[key] = value;
|
|
236
254
|
dispatchUpdatedEvent();
|
|
237
255
|
}
|
|
238
256
|
function addEventHandler() {
|
|
257
|
+
if (isServer) {
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
239
260
|
window.addEventListener(setEventName, handleSetValueEvent);
|
|
240
261
|
}
|
|
241
262
|
function subscribeToValue(onStoreChange) {
|
|
263
|
+
if (isServer)
|
|
264
|
+
return () => {};
|
|
242
265
|
window.addEventListener(updateEventName, onStoreChange);
|
|
243
266
|
return () => {
|
|
244
267
|
window.removeEventListener(updateEventName, onStoreChange);
|
|
245
268
|
};
|
|
246
269
|
}
|
|
247
270
|
function getSnapshot() {
|
|
248
|
-
if (
|
|
249
|
-
|
|
271
|
+
if (isServer) {
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
if (!window.ph) {
|
|
275
|
+
console.warn(`ph global store is not initialized. Did you call set${capitalCase(key)}?`);
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
250
278
|
return window.ph[key];
|
|
251
279
|
}
|
|
280
|
+
function getServerSnapshot() {
|
|
281
|
+
return;
|
|
282
|
+
}
|
|
252
283
|
function useValue() {
|
|
253
|
-
return useSyncExternalStore(subscribeToValue, getSnapshot);
|
|
284
|
+
return useSyncExternalStore(subscribeToValue, getSnapshot, getServerSnapshot);
|
|
254
285
|
}
|
|
255
286
|
return {
|
|
256
287
|
useValue,
|
|
@@ -849,6 +880,7 @@ var {
|
|
|
849
880
|
setValue: setLoading,
|
|
850
881
|
addEventHandler: addLoadingEventHandler
|
|
851
882
|
} = makePHEventFunctions("loading");
|
|
883
|
+
var loading = null;
|
|
852
884
|
|
|
853
885
|
// src/hooks/modals.ts
|
|
854
886
|
var modalEventFunctions = makePHEventFunctions("modal");
|
|
@@ -888,8 +920,9 @@ var useDatabase = () => useReactorClientModule()?.reactorModule?.database;
|
|
|
888
920
|
var usePGlite = () => useReactorClientModule()?.pg;
|
|
889
921
|
|
|
890
922
|
// src/hooks/renown.ts
|
|
891
|
-
import { useEffect, useState } from "react";
|
|
923
|
+
import { useEffect, useState, useSyncExternalStore as useSyncExternalStore3 } from "react";
|
|
892
924
|
var renownEventFunctions = makePHEventFunctions("renown");
|
|
925
|
+
var addRenownEventHandler = renownEventFunctions.addEventHandler;
|
|
893
926
|
var useRenown = renownEventFunctions.useValue;
|
|
894
927
|
var setRenown = renownEventFunctions.setValue;
|
|
895
928
|
function useDid() {
|
|
@@ -898,7 +931,7 @@ function useDid() {
|
|
|
898
931
|
}
|
|
899
932
|
function useUser() {
|
|
900
933
|
const renown = useRenown();
|
|
901
|
-
const [user, setUser] = useState(
|
|
934
|
+
const [user, setUser] = useState(renown?.user);
|
|
902
935
|
useEffect(() => {
|
|
903
936
|
setUser(renown?.user);
|
|
904
937
|
if (!renown)
|
|
@@ -909,16 +942,15 @@ function useUser() {
|
|
|
909
942
|
}
|
|
910
943
|
function useLoginStatus() {
|
|
911
944
|
const renown = useRenown();
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
945
|
+
return useSyncExternalStore3((cb) => {
|
|
946
|
+
if (!renown) {
|
|
947
|
+
return () => {};
|
|
948
|
+
}
|
|
949
|
+
return renown.on("status", cb);
|
|
950
|
+
}, () => renown === loading ? "loading" : renown?.status, () => {
|
|
951
|
+
return;
|
|
952
|
+
});
|
|
920
953
|
}
|
|
921
|
-
var addRenownEventHandler = renownEventFunctions.addEventHandler;
|
|
922
954
|
|
|
923
955
|
// src/hooks/revision-history.ts
|
|
924
956
|
var revisionHistoryEventFunctions = makePHEventFunctions("revisionHistoryVisible");
|
|
@@ -2140,12 +2172,12 @@ var addToastEventHandler = toastEventFunctions.addEventHandler;
|
|
|
2140
2172
|
|
|
2141
2173
|
// src/hooks/vetra-packages.ts
|
|
2142
2174
|
import { DuplicateModuleError } from "@powerhousedao/reactor";
|
|
2143
|
-
import { useSyncExternalStore as
|
|
2175
|
+
import { useSyncExternalStore as useSyncExternalStore4 } from "react";
|
|
2144
2176
|
var vetraPackageManagerFunctions = makePHEventFunctions("vetraPackageManager");
|
|
2145
2177
|
var useVetraPackageManager = vetraPackageManagerFunctions.useValue;
|
|
2146
2178
|
var useVetraPackages = () => {
|
|
2147
2179
|
const packageManager = useVetraPackageManager();
|
|
2148
|
-
return
|
|
2180
|
+
return useSyncExternalStore4((cb) => packageManager ? packageManager.subscribe(cb) : () => {}, () => packageManager?.packages ?? []);
|
|
2149
2181
|
};
|
|
2150
2182
|
var addVetraPackageManagerEventHandler = vetraPackageManagerFunctions.addEventHandler;
|
|
2151
2183
|
function setVetraPackageManager(packageManager) {
|
|
@@ -2155,6 +2187,17 @@ function setVetraPackageManager(packageManager) {
|
|
|
2155
2187
|
updateReactorClientDocumentModels(packages);
|
|
2156
2188
|
});
|
|
2157
2189
|
}
|
|
2190
|
+
var EMPTY_PENDING = [];
|
|
2191
|
+
var EMPTY_DISMISSED = [];
|
|
2192
|
+
var NOOP_UNSUBSCRIBE = () => {};
|
|
2193
|
+
function usePendingInstallations() {
|
|
2194
|
+
const pm = useVetraPackageManager();
|
|
2195
|
+
return useSyncExternalStore4((cb) => pm ? pm.subscribePendingChanges(cb) : NOOP_UNSUBSCRIBE, () => pm?.getPendingInstallations() ?? EMPTY_PENDING);
|
|
2196
|
+
}
|
|
2197
|
+
function useDismissedPackages() {
|
|
2198
|
+
const pm = useVetraPackageManager();
|
|
2199
|
+
return useSyncExternalStore4((cb) => pm ? pm.subscribePendingChanges(cb) : NOOP_UNSUBSCRIBE, () => pm?.getDismissedPackages() ?? EMPTY_DISMISSED);
|
|
2200
|
+
}
|
|
2158
2201
|
function updateReactorClientDocumentModels(packages) {
|
|
2159
2202
|
const documentModelModules = packages.flatMap((pkg) => pkg.modules.documentModelModules).filter((module) => module !== undefined);
|
|
2160
2203
|
const registry = window.ph?.reactorClientModule?.reactorModule?.documentModelRegistry;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
export { useRenownAuth, type RenownAuth, type RenownAuthStatus, } from "../renown/use-renown-auth.js";
|
|
1
2
|
export { useAllowedDocumentModelModules } from "./allowed-document-model-modules.js";
|
|
2
|
-
export { useConnectionState, useConnectionStates } from "./connection-state.js";
|
|
3
3
|
export { useNodesInSelectedDriveOrFolder } from "./child-nodes.js";
|
|
4
4
|
export { useAllowedDocumentTypes, useIsDragAndDropEnabled, useIsExternalControlsEnabled, } from "./config/editor.js";
|
|
5
5
|
export { setPHDocumentEditorConfigByKey, setPHDriveEditorConfigByKey, } from "./config/set-config-by-key.js";
|
|
6
6
|
export { setPHDocumentEditorConfig, setPHDriveEditorConfig, setPHGlobalConfig, useSetPHDocumentEditorConfig, useSetPHDriveEditorConfig, } from "./config/set-config-by-object.js";
|
|
7
7
|
export { usePHDocumentEditorConfigByKey, usePHDriveEditorConfigByKey, } from "./config/use-value-by-key.js";
|
|
8
|
+
export { useConnectionState, useConnectionStates } from "./connection-state.js";
|
|
8
9
|
export { useDocumentById, useDocumentsByIds } from "./document-by-id.js";
|
|
9
10
|
export { useDocument, useDocumentCache, useDocuments, useGetDocument, useGetDocumentAsync, useGetDocuments, } from "./document-cache.js";
|
|
10
11
|
export { useDocumentModelModuleById, useDocumentModelModules, } from "./document-model-modules.js";
|
|
@@ -19,11 +20,13 @@ export { useFolderById } from "./folder-by-id.js";
|
|
|
19
20
|
export { useImportScriptModules } from "./import-script-modules.js";
|
|
20
21
|
export { useDocumentsInSelectedDrive, useDocumentTypesInSelectedDrive, useFileNodesInSelectedDrive, useFolderNodesInSelectedDrive, useNodesInSelectedDrive, } from "./items-in-selected-drive.js";
|
|
21
22
|
export { useDocumentsInSelectedFolder, useFileNodesInSelectedFolder, useFolderNodesInSelectedFolder, useNodesInSelectedFolder, } from "./items-in-selected-folder.js";
|
|
23
|
+
export { loading, setLoading, useLoading } from "./loading.js";
|
|
22
24
|
export { closePHModal, setPHModal, showCreateDocumentModal, showDeleteNodeModal, showPHModal, usePHModal, } from "./modals.js";
|
|
23
25
|
export { useNodeActions } from "./node-actions.js";
|
|
24
26
|
export { useNodeById } from "./node-by-id.js";
|
|
25
27
|
export { useNodePathById, useSelectedNodePath } from "./node-path.js";
|
|
26
28
|
export { useNodeParentFolderById, useParentFolderForSelectedNode, } from "./parent-folder.js";
|
|
29
|
+
export { addRenownEventHandler, useDid, useLoginStatus, useRenown, useUser, } from "./renown.js";
|
|
27
30
|
export { hideRevisionHistory, setRevisionHistoryVisible, showRevisionHistory, useRevisionHistoryVisible, } from "./revision-history.js";
|
|
28
31
|
export { useSelectedDocument, useSelectedDocumentId, useSelectedDocumentOfType, useSelectedDocumentSafe, } from "./selected-document.js";
|
|
29
32
|
export { setSelectedDrive, useSelectedDrive, useSelectedDriveId, useSelectedDriveSafe, } from "./selected-drive.js";
|
|
@@ -38,5 +41,5 @@ export { isInspectorEnabledSync, useInspectorEnabled, } from "./use-feature-flag
|
|
|
38
41
|
export { useGetSwitchboardLink } from "./use-get-switchboard-link.js";
|
|
39
42
|
export { useOnDropFile } from "./use-on-drop-file.js";
|
|
40
43
|
export { useUserPermissions } from "./user-permissions.js";
|
|
41
|
-
export { setVetraPackageManager, useVetraPackageManager, useVetraPackages, } from "./vetra-packages.js";
|
|
44
|
+
export { setVetraPackageManager, useDismissedPackages, usePendingInstallations, useVetraPackageManager, useVetraPackages, } from "./vetra-packages.js";
|
|
42
45
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,KAAK,UAAU,EACf,KAAK,gBAAgB,GACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AACrF,OAAO,EAAE,+BAA+B,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,4BAA4B,GAC7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,8BAA8B,EAC9B,2BAA2B,GAC5B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,yBAAyB,EACzB,sBAAsB,EACtB,iBAAiB,EACjB,4BAA4B,EAC5B,yBAAyB,GAC1B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,8BAA8B,EAC9B,2BAA2B,GAC5B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,mBAAmB,E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,4 @@
|
|
|
1
|
+
import type { LOADING } from "../types/global.js";
|
|
1
2
|
export declare const useLoading: () => boolean | undefined, setLoading: (value: boolean | undefined) => void, addLoadingEventHandler: () => void;
|
|
3
|
+
export declare const loading: LOADING;
|
|
2
4
|
//# sourceMappingURL=loading.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loading.d.ts","sourceRoot":"","sources":["../../../src/hooks/loading.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"loading.d.ts","sourceRoot":"","sources":["../../../src/hooks/loading.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAGlD,eAAO,MACK,UAAU,6BACV,UAAU,wCACH,sBAAsB,YACN,CAAC;AAEpC,eAAO,MAAM,OAAO,EAAE,OAAc,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PHGlobal, PHGlobalKey } from "@powerhousedao/reactor-browser";
|
|
2
2
|
export declare function makePHEventFunctions<TKey extends PHGlobalKey>(key: TKey): {
|
|
3
|
-
useValue: () => PHGlobal[TKey];
|
|
3
|
+
useValue: () => PHGlobal[TKey] | undefined;
|
|
4
4
|
setValue: (value: PHGlobal[TKey] | undefined) => void;
|
|
5
5
|
addEventHandler: () => void;
|
|
6
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"make-ph-event-functions.d.ts","sourceRoot":"","sources":["../../../src/hooks/make-ph-event-functions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,WAAW,EAEZ,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"make-ph-event-functions.d.ts","sourceRoot":"","sources":["../../../src/hooks/make-ph-event-functions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,WAAW,EAEZ,MAAM,gCAAgC,CAAC;AAOxC,wBAAgB,oBAAoB,CAAC,IAAI,SAAS,WAAW,EAAE,GAAG,EAAE,IAAI;;sBAI7C,QAAQ,CAAC,IAAI,CAAC,GAAG,SAAS;;EA2EpD"}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import type { IRenown, LoginStatus, User } from "@renown/sdk";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import type { LOADING } from "../types/global.js";
|
|
3
|
+
/** Adds an event handler for the renown instance */
|
|
4
|
+
export declare const addRenownEventHandler: () => void;
|
|
4
5
|
/** Returns the renown instance */
|
|
5
|
-
export declare const useRenown: () => IRenown | undefined;
|
|
6
|
+
export declare const useRenown: () => IRenown | LOADING | undefined;
|
|
6
7
|
/** Sets the renown instance */
|
|
7
|
-
export declare const setRenown: (value: IRenown | undefined) => void;
|
|
8
|
+
export declare const setRenown: (value: IRenown | LOADING | undefined) => void;
|
|
8
9
|
/** Returns the DID from the renown instance */
|
|
9
10
|
export declare function useDid(): string | undefined;
|
|
10
11
|
/** Returns the current user from the renown instance, subscribing to user events */
|
|
11
12
|
export declare function useUser(): User | undefined;
|
|
12
|
-
/** Returns the login status, subscribing to renown status events
|
|
13
|
-
|
|
14
|
-
export declare function useLoginStatus(): RenownLoginStatus;
|
|
15
|
-
/** Adds an event handler for the renown instance */
|
|
16
|
-
export declare const addRenownEventHandler: () => void;
|
|
13
|
+
/** Returns the login status, subscribing to renown status events */
|
|
14
|
+
export declare function useLoginStatus(): LoginStatus | "loading" | undefined;
|
|
17
15
|
//# sourceMappingURL=renown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renown.d.ts","sourceRoot":"","sources":["../../../src/hooks/renown.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"renown.d.ts","sourceRoot":"","sources":["../../../src/hooks/renown.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAE9D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAMlD,oDAAoD;AACpD,eAAO,MAAM,qBAAqB,EAAE,MAAM,IACJ,CAAC;AAEvC,kCAAkC;AAClC,eAAO,MAAM,SAAS,EAAE,MAAM,OAAO,GAAG,OAAO,GAAG,SACnB,CAAC;AAEhC,+BAA+B;AAC/B,eAAO,MAAM,SAAS,EAAE,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,KAAK,IACnC,CAAC;AAEhC,+CAA+C;AAC/C,wBAAgB,MAAM,uBAGrB;AAED,oFAAoF;AACpF,wBAAgB,OAAO,IAAI,IAAI,GAAG,SAAS,CAW1C;AAED,oEAAoE;AACpE,wBAAgB,cAAc,IAAI,WAAW,GAAG,SAAS,GAAG,SAAS,CAYpE"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DismissedPackage, PendingInstallation } from "../package-manager.js";
|
|
1
2
|
import type { IPackageManager, VetraPackage } from "../types/vetra.js";
|
|
2
3
|
export declare const useVetraPackageManager: () => IPackageManager | undefined;
|
|
3
4
|
/** Returns all of the Vetra packages loaded by the Connect instance */
|
|
@@ -6,4 +7,6 @@ export declare const useVetraPackages: () => VetraPackage[];
|
|
|
6
7
|
export declare const addVetraPackageManagerEventHandler: () => void;
|
|
7
8
|
/** Sets the Vetra package manager and registers its packages */
|
|
8
9
|
export declare function setVetraPackageManager(packageManager: IPackageManager): void;
|
|
10
|
+
export declare function usePendingInstallations(): PendingInstallation[];
|
|
11
|
+
export declare function useDismissedPackages(): DismissedPackage[];
|
|
9
12
|
//# sourceMappingURL=vetra-packages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vetra-packages.d.ts","sourceRoot":"","sources":["../../../src/hooks/vetra-packages.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAOvE,eAAO,MAAM,sBAAsB,mCAAwC,CAAC;AAE5E,uEAAuE;AACvE,eAAO,MAAM,gBAAgB,sBAO5B,CAAC;AAEF,mDAAmD;AACnD,eAAO,MAAM,kCAAkC,YACD,CAAC;AAE/C,gEAAgE;AAChE,wBAAgB,sBAAsB,CAAC,cAAc,EAAE,eAAe,QAMrE"}
|
|
1
|
+
{"version":3,"file":"vetra-packages.d.ts","sourceRoot":"","sources":["../../../src/hooks/vetra-packages.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAOvE,eAAO,MAAM,sBAAsB,mCAAwC,CAAC;AAE5E,uEAAuE;AACvE,eAAO,MAAM,gBAAgB,sBAO5B,CAAC;AAEF,mDAAmD;AACnD,eAAO,MAAM,kCAAkC,YACD,CAAC;AAE/C,gEAAgE;AAChE,wBAAgB,sBAAsB,CAAC,cAAc,EAAE,eAAe,QAMrE;AAMD,wBAAgB,uBAAuB,IAAI,mBAAmB,EAAE,CAO/D;AAED,wBAAgB,oBAAoB,IAAI,gBAAgB,EAAE,CAOzD"}
|