@powerhousedao/reactor-browser 6.2.3-dev.9 → 6.2.3-staging.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/dist/{attachment-service-D3EhiAJ7.d.ts → attachment-service-But1Xljo.d.ts} +169 -59
  2. package/dist/attachment-service-But1Xljo.d.ts.map +1 -0
  3. package/dist/{client-DjK30EQ-.js → client-BiJAJ9dW.js} +1 -1
  4. package/dist/{client-DjK30EQ-.js.map → client-BiJAJ9dW.js.map} +1 -1
  5. package/dist/{client-BIHN_UyR.d.ts → client-CngU4mtn.d.ts} +3 -3
  6. package/dist/client-CngU4mtn.d.ts.map +1 -0
  7. package/dist/{client-D66jVnot.js → client-VV9M73s_.js} +126 -18
  8. package/dist/client-VV9M73s_.js.map +1 -0
  9. package/dist/{document-by-id-B4FIzG1w.js → dispatch-qRXS70fh.js} +389 -54
  10. package/dist/dispatch-qRXS70fh.js.map +1 -0
  11. package/dist/document-by-id-B_8DA4yZ.js +16 -0
  12. package/dist/document-by-id-B_8DA4yZ.js.map +1 -0
  13. package/dist/{document-model-modules-bTP87nyr.js → document-model-modules-D6I-UUXq.js} +32 -65
  14. package/dist/document-model-modules-D6I-UUXq.js.map +1 -0
  15. package/dist/{document-operations-WeE6wIDt.js → document-operations-Bt-1-ThH.js} +147 -120
  16. package/dist/document-operations-Bt-1-ThH.js.map +1 -0
  17. package/dist/{global-OuINvEGT.d.ts → global-fql2bmb0.d.ts} +50 -13
  18. package/dist/global-fql2bmb0.d.ts.map +1 -0
  19. package/dist/{index-B33TKEqp.d.ts → index-BABMK8cO.d.ts} +19 -98
  20. package/dist/index-BABMK8cO.d.ts.map +1 -0
  21. package/dist/{index-BIVDXw3K.d.ts → index-rtDmzViP.d.ts} +3 -3
  22. package/dist/index-rtDmzViP.d.ts.map +1 -0
  23. package/dist/index.d.ts +379 -364
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +111 -39
  26. package/dist/index.js.map +1 -1
  27. package/dist/{inspector-proxy-6h5VKAwt.d.ts → inspector-proxy-DCowaeeH.d.ts} +11 -4
  28. package/dist/inspector-proxy-DCowaeeH.d.ts.map +1 -0
  29. package/dist/{make-ph-event-functions-DBq3iWYn.js → make-ph-event-functions-FzpvQtj6.js} +1 -1
  30. package/dist/{make-ph-event-functions-DBq3iWYn.js.map → make-ph-event-functions-FzpvQtj6.js.map} +1 -1
  31. package/dist/{pglite-CntadC_p-9NDG14dS.d.ts → pglite-CntadC_p-DTkdF8sr.d.ts} +11 -33
  32. package/dist/pglite-CntadC_p-DTkdF8sr.d.ts.map +1 -0
  33. package/dist/{relational-D1RB45sA.js → relational-ChC_AWAK.js} +3 -2
  34. package/dist/{relational-D1RB45sA.js.map → relational-ChC_AWAK.js.map} +1 -1
  35. package/dist/{renown-rqK8sokh.js → renown-C9pYZRqf.js} +7 -8
  36. package/dist/{renown-rqK8sokh.js.map → renown-C9pYZRqf.js.map} +1 -1
  37. package/dist/{renown-BHxwP7xU.js → renown-Def5iO8k.js} +2 -2
  38. package/dist/{renown-BHxwP7xU.js.map → renown-Def5iO8k.js.map} +1 -1
  39. package/dist/src/ai/index.d.ts +51 -62
  40. package/dist/src/ai/index.d.ts.map +1 -1
  41. package/dist/src/ai/index.js +5 -8
  42. package/dist/src/ai/index.js.map +1 -1
  43. package/dist/src/analytics/index.d.ts +36 -44
  44. package/dist/src/analytics/index.d.ts.map +1 -1
  45. package/dist/src/analytics/index.js +2 -2
  46. package/dist/src/analytics/index.js.map +1 -1
  47. package/dist/src/document-model.d.ts +3 -4
  48. package/dist/src/document-model.d.ts.map +1 -1
  49. package/dist/src/document-model.js.map +1 -1
  50. package/dist/src/graphql/client.d.ts +4 -3
  51. package/dist/src/graphql/client.js +1 -1
  52. package/dist/src/graphql-client/entry.d.ts +5 -4
  53. package/dist/src/graphql-client/entry.js +4 -4
  54. package/dist/src/relational/index.d.ts +8 -9
  55. package/dist/src/relational/index.d.ts.map +1 -1
  56. package/dist/src/relational/index.js +1 -1
  57. package/dist/src/renown/index.d.ts +3 -2
  58. package/dist/src/renown/index.js +2 -2
  59. package/dist/src/rpc/index.d.ts +52 -32
  60. package/dist/src/rpc/index.d.ts.map +1 -1
  61. package/dist/src/rpc/index.js +58 -9
  62. package/dist/src/rpc/index.js.map +1 -1
  63. package/dist/{store-BJYcr_FL.js → store-DInXcjal.js} +1 -1
  64. package/dist/{store-BJYcr_FL.js.map → store-DInXcjal.js.map} +1 -1
  65. package/dist/{switchboard-CaXQ4-5Q.js → switchboard-CFyD_5_e.js} +58 -6
  66. package/dist/switchboard-CFyD_5_e.js.map +1 -0
  67. package/dist/{types-6vDzbRRS.d.ts → types-520nWrB3.d.ts} +2 -2
  68. package/dist/types-520nWrB3.d.ts.map +1 -0
  69. package/dist/{types-Dcv1ZLoW.d.ts → types-B7-_l_wE.d.ts} +86 -16
  70. package/dist/types-B7-_l_wE.d.ts.map +1 -0
  71. package/package.json +15 -16
  72. package/dist/attachment-service-D3EhiAJ7.d.ts.map +0 -1
  73. package/dist/client-BIHN_UyR.d.ts.map +0 -1
  74. package/dist/client-D66jVnot.js.map +0 -1
  75. package/dist/document-by-id-B4FIzG1w.js.map +0 -1
  76. package/dist/document-model-modules-bTP87nyr.js.map +0 -1
  77. package/dist/document-operations-WeE6wIDt.js.map +0 -1
  78. package/dist/global-OuINvEGT.d.ts.map +0 -1
  79. package/dist/index-B33TKEqp.d.ts.map +0 -1
  80. package/dist/index-BIVDXw3K.d.ts.map +0 -1
  81. package/dist/inspector-proxy-6h5VKAwt.d.ts.map +0 -1
  82. package/dist/pglite-CntadC_p-9NDG14dS.d.ts.map +0 -1
  83. package/dist/switchboard-CaXQ4-5Q.js.map +0 -1
  84. package/dist/types-6vDzbRRS.d.ts.map +0 -1
  85. package/dist/types-Dcv1ZLoW.d.ts.map +0 -1
@@ -1,15 +1,14 @@
1
- import { t as PGlite } from "./pglite-CntadC_p-9NDG14dS.js";
2
- import { c as ReactorGraphQLClient, r as GraphQLClientWindowEvents } from "./types-Dcv1ZLoW.js";
3
- import { r as IWorkerAdminClient, t as IInspectorProxy } from "./inspector-proxy-6h5VKAwt.js";
4
- import { Action, DocumentAction, DocumentModelModule, PHDocument } from "@powerhousedao/shared/document-model";
1
+ import { t as PGlite } from "./pglite-CntadC_p-DTkdF8sr.js";
2
+ import { c as ReactorGraphQLClient, r as GraphQLClientWindowEvents } from "./types-B7-_l_wE.js";
3
+ import { r as IWorkerAdminClient, t as IInspectorProxy } from "./inspector-proxy-DCowaeeH.js";
5
4
  import { IDocumentModelLoader, IReactorClient, InProcessReactorClientModule, InProcessReactorModule, ReactorClientModule, ReactorModule } from "@powerhousedao/reactor";
6
5
  import { DocumentDriveDocument } from "@powerhousedao/shared/document-drive";
6
+ import { Action, DocumentAction, DocumentModelModule, Operation, PHDocument } from "@powerhousedao/shared/document-model";
7
7
  import { DragEventHandler, ReactNode } from "react";
8
8
  import { IRenown } from "@renown/sdk";
9
9
  import { IAttachmentService } from "@powerhousedao/reactor-attachments/client";
10
10
  import { PHConnectRenownAdapters } from "@powerhousedao/shared/clis";
11
11
  import { DocumentModelLib, RegistryPackageSource } from "@powerhousedao/shared";
12
-
13
12
  //#region src/types/documents.d.ts
14
13
  type DocumentDispatch<TAction extends Action> = (actionOrActions: TAction | TAction[] | DocumentAction | DocumentAction[] | undefined, onErrors?: (errors: Error[]) => void, onSuccess?: (result: PHDocument) => void) => void;
15
14
  type PromiseWithState<T> = Promise<T> & PromiseState<T>;
@@ -30,10 +29,45 @@ type PromiseState<T> = {
30
29
  status: "rejected";
31
30
  reason: unknown;
32
31
  };
32
+ /** A refetch of an already-loaded document. `error` is the last failure that kept the loaded document. */
33
+ type DocumentRefetchState = {
34
+ isRefetching: boolean;
35
+ error: unknown;
36
+ };
33
37
  interface IDocumentCache {
34
38
  get(id: string, refetch?: boolean): Promise<PHDocument>;
35
39
  getBatch(ids: string[], refetch?: boolean): Promise<PHDocument[]>;
36
40
  subscribe(id: string | string[], callback: () => void): () => void;
41
+ /** Stable snapshot of the refetch of `id`. Optional: not every cache refetches in the background. */
42
+ getRefetchState?(id: string): DocumentRefetchState;
43
+ }
44
+ /** Snapshot of one document scope's operations as the cache knows them. */
45
+ type OperationsCacheEntry = {
46
+ /** `idle` means nothing has been requested since the last invalidation. */
47
+ status: "idle" | "pending" | "success" | "error";
48
+ /** Every operation loaded so far, oldest first, across all loaded pages. */
49
+ operations: readonly Operation[];
50
+ /** The rejection reason of the last failed page; `undefined` otherwise. */
51
+ error: unknown;
52
+ /** Whether the last loaded page reported a further page. */
53
+ hasNextPage: boolean;
54
+ };
55
+ /**
56
+ * Operation history keyed by document id and scope. Pages are fetched
57
+ * oldest first and appended. A document change event drops every scope of
58
+ * that document so the next read starts from the first page again.
59
+ */
60
+ interface IOperationCache {
61
+ /** Current snapshot; a shared idle entry when nothing is cached. */
62
+ getOperationsState(documentId: string, scope: string): OperationsCacheEntry;
63
+ /** Loads the first page. No-op unless the entry is idle. */
64
+ loadOperations(documentId: string, scope: string, limit: number): void;
65
+ /** Loads the page after the last one and appends it. No-op unless the entry is loaded and has a next page. */
66
+ loadMoreOperations(documentId: string, scope: string): void;
67
+ /** Drops every cached scope of the document, aborts in-flight requests, notifies listeners. */
68
+ invalidateOperations(documentId: string): void;
69
+ /** Subscribes to changes of any scope of the document. Returns the unsubscribe function. */
70
+ subscribeOperations(documentId: string, callback: () => void): () => void;
37
71
  }
38
72
  //#endregion
39
73
  //#region src/types/reactor-browser-client.d.ts
@@ -66,14 +100,16 @@ type PHAppConfig = {
66
100
  /** Allows you to specify the document types that are allowed to be added to the drive.
67
101
  * An empty array means that any document type is allowed.
68
102
  */
69
- allowedDocumentTypes?: string[]; /** Whether drag and drop is enabled for the app. */
103
+ allowedDocumentTypes?: string[];
104
+ /** Whether drag and drop is enabled for the app. */
70
105
  isDragAndDropEnabled?: boolean;
71
106
  };
72
107
  type PHAppConfigKey = keyof PHAppConfig;
73
108
  type PHAppConfigSetters = PHGlobalConfigSettersForKey<PHAppConfigKey>;
74
109
  type PHAppConfigHooks = PHGlobalConfigHooksForKey<PHAppConfigKey>;
75
110
  type PHDocumentEditorConfig = {
76
- /** Whether external controls are enabled for the document editor. */isExternalControlsEnabled?: boolean;
111
+ /** Whether external controls are enabled for the document editor. */
112
+ isExternalControlsEnabled?: boolean;
77
113
  };
78
114
  type PHDocumentEditorConfigKey = keyof PHDocumentEditorConfig;
79
115
  type PHDocumentEditorConfigSetters = PHGlobalConfigSettersForKey<PHDocumentEditorConfigKey>;
@@ -140,8 +176,8 @@ type PHSentryGlobalConfig = {
140
176
  sentryEnv?: string;
141
177
  isSentryTracingEnabled?: boolean;
142
178
  };
143
- type PHGlobalConfigSettersForKey<T extends PHGlobalConfigKey> = { [K in T]: (value: PHGlobalConfig[K]) => void };
144
- type PHGlobalConfigHooksForKey<TKey extends PHGlobalConfigKey> = { [K in TKey]: () => PHGlobalConfig[K] };
179
+ type PHGlobalConfigSettersForKey<T extends PHGlobalConfigKey> = { [K in T]: (value: PHGlobalConfig[K]) => void; };
180
+ type PHGlobalConfigHooksForKey<TKey extends PHGlobalConfigKey> = { [K in TKey]: () => PHGlobalConfig[K]; };
145
181
  /** Helper type for ensuring keys are all present while still allowing them to be set */
146
182
  type FullPHGlobalConfig = Record<PHGlobalConfigKey, PHGlobalConfig[PHGlobalConfigKey]>;
147
183
  //#endregion
@@ -389,13 +425,14 @@ type UsePHGlobalValue<TValue extends PHGlobalValue> = () => TValue | undefined;
389
425
  type SetPHGlobalValue<TValue extends PHGlobalValue> = (value: TValue | undefined) => void;
390
426
  type AddPHGlobalEventHandler = () => void;
391
427
  type PHGlobalEventHandlerAdders = Record<PHGlobalKey, AddPHGlobalEventHandler>;
392
- type SetEvent<TKey extends PHGlobalKey> = CustomEvent<{ [key in TKey]: PHGlobal[TKey] | undefined }>;
428
+ type SetEvent<TKey extends PHGlobalKey> = CustomEvent<{ [key in TKey]: PHGlobal[TKey] | undefined; }>;
393
429
  declare global {
394
430
  interface Window {
395
431
  ph?: PHGlobal;
396
432
  }
397
433
  interface WindowEventMap extends GraphQLClientWindowEvents {}
398
- } //# sourceMappingURL=global.d.ts.map
434
+ }
399
435
  //#endregion
400
- export { PHProcessorsGlobalConfig as $, FailedInstallation as A, PHAppConfigSetters as B, PHToastOptions as C, TimelineItem as D, TimelineDividerItem as E, FullPHGlobalConfig as F, PHDocumentEditorConfigSetters as G, PHDocumentEditorConfig as H, PHAnalyticsGlobalConfig as I, PHGlobalConfigHooks as J, PHDrivesGlobalConfig as K, PHAppConfig as L, IPackageDiscoveryService as M, PendingInstallation as N, DiscoveryEvent as O, PHModal as P, PHGlobalConfigSettersForKey as Q, PHAppConfigHooks as R, PHToastFn as S, TimelineBarItem as T, PHDocumentEditorConfigHooks as U, PHCommonGlobalConfig as V, PHDocumentEditorConfigKey as W, PHGlobalConfigKey as X, PHGlobalConfigHooksForKey as Y, PHGlobalConfigSetters as Z, useDropNode as _, PHGlobal as a, FulfilledPromise as at, IPackagesListener as b, PHGlobalValue as c, PromiseWithState as ct, UsePHGlobalValue as d, PHRelationalProcessorsGlobalConfig as et, WorkerReactorClientModule as f, useDragNode as g, addDraggingNodeEventHandler as h, LOADING as i, DocumentDispatch as it, FailedInstallationReason as j, DiscoveryEventListener as k, SetEvent as l, RejectedPromise as lt, DraggingNode as m, BrowserReactorClientModule as n, PHSentryGlobalConfig as nt, PHGlobalEventHandlerAdders as o, IDocumentCache as ot, WorkerReactorModule as p, PHGlobalConfig as q, BrowserReactorModule as r, IReactorBrowserClient as rt, PHGlobalKey as s, PromiseState as st, AddPHGlobalEventHandler as t, PHRenownGlobalConfig as tt, SetPHGlobalValue as u, IPackageListerUnsubscribe as v, PHToastType as w, PackageManagerInstallResult as x, IPackageManager as y, PHAppConfigKey as z };
401
- //# sourceMappingURL=global-OuINvEGT.d.ts.map
436
+ export { PHProcessorsGlobalConfig as $, FailedInstallation as A, PHAppConfigSetters as B, PHToastOptions as C, TimelineItem as D, TimelineDividerItem as E, FullPHGlobalConfig as F, PHDocumentEditorConfigSetters as G, PHDocumentEditorConfig as H, PHAnalyticsGlobalConfig as I, PHGlobalConfigHooks as J, PHDrivesGlobalConfig as K, PHAppConfig as L, IPackageDiscoveryService as M, PendingInstallation as N, DiscoveryEvent as O, PHModal as P, PHGlobalConfigSettersForKey as Q, PHAppConfigHooks as R, PHToastFn as S, TimelineBarItem as T, PHDocumentEditorConfigHooks as U, PHCommonGlobalConfig as V, PHDocumentEditorConfigKey as W, PHGlobalConfigKey as X, PHGlobalConfigHooksForKey as Y, PHGlobalConfigSetters as Z, useDropNode as _, PHGlobal as a, DocumentRefetchState as at, IPackagesListener as b, PHGlobalValue as c, IOperationCache as ct, UsePHGlobalValue as d, PromiseWithState as dt, PHRelationalProcessorsGlobalConfig as et, WorkerReactorClientModule as f, RejectedPromise as ft, useDragNode as g, addDraggingNodeEventHandler as h, LOADING as i, DocumentDispatch as it, FailedInstallationReason as j, DiscoveryEventListener as k, SetEvent as l, OperationsCacheEntry as lt, DraggingNode as m, BrowserReactorClientModule as n, PHSentryGlobalConfig as nt, PHGlobalEventHandlerAdders as o, FulfilledPromise as ot, WorkerReactorModule as p, PHGlobalConfig as q, BrowserReactorModule as r, IReactorBrowserClient as rt, PHGlobalKey as s, IDocumentCache as st, AddPHGlobalEventHandler as t, PHRenownGlobalConfig as tt, SetPHGlobalValue as u, PromiseState as ut, IPackageListerUnsubscribe as v, PHToastType as w, PackageManagerInstallResult as x, IPackageManager as y, PHAppConfigKey as z };
437
+ export {};
438
+ //# sourceMappingURL=global-fql2bmb0.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"global-fql2bmb0.d.ts","names":[],"sources":["../src/types/documents.ts","../src/types/reactor-browser-client.ts","../src/types/config.ts","../src/types/modals.ts","../src/types/package-discovery.ts","../src/types/timeline.ts","../src/types/toast.ts","../src/types/vetra.ts","../src/hooks/node-drag-and-drop.ts","../src/types/global.ts"],"mappings":";;;;;;;;;;;;KAOY,iBAAiB,gB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wB;EAC3C,oBAAoB;EACpB,iBAAiB;;;;;;;EAOjB;IAA6B;IAAc;;EAC3C,kBACE,cACA,eAAe,kBACf;;;;KCzBQ;EACV;EACA;;cAMW;iBAiDG,YAAY;EAC1B;EACA;;;;eAFc;aAAA;;iBA6EA,YAAY;;;;;;;;;UC5HX,6BAA6B;EAC5C,IAAI;;UAEW,mCAAmC;EAClD;EACA,eAAe;;KAKL,sBAAsB;UACjB,kCAAkC;EACjD;EACA,eAAe;EACf,aAAa;EACb,WAAW;;KAGD;KAEA,WAAW;EACrB;EACA,sBAAsB,6BAA6B;EACnD,gBAAgB;EAChB,oBAAoB;EACpB,uBAAuB;EACvB,SAAS,UAAU;EACnB,sBAAsB;EACtB,SAAS;EACT,gBAAgB;EAChB;EACA;EACA,eAAe;EACf,QAAQ;EACR;EACA;EACA,uBAAuB;EACvB,0BAA0B;EAC1B,WAAW;EACX,QAAQ;;KAGE,oBAAoB;KACpB,gBAAgB,SAAS;KAEzB,iBAAiB,eAAe,uBACxC;KAGQ,iBAAiB,eAAe,kBAC1C,OAAO;KAGG;KAEA,6BAA6B,OACvC,aACA;KAGU,SAAS,aAAa,eAAe,eAC9C,OAAO,OAAO,SAAS;QAGlB;YACI;IACR,KAAK;;YAEG,uBAAuB"}
@@ -1,10 +1,7 @@
1
- import { i as LOADING } from "./global-OuINvEGT.js";
1
+ import { i as LOADING } from "./global-fql2bmb0.js";
2
2
  import { CSSProperties, ReactNode } from "react";
3
- import * as react_jsx_runtime0 from "react/jsx-runtime";
4
- import * as _renown_sdk0 from "@renown/sdk";
5
3
  import { CREDENTIAL_SCHEMA_EIP712_TYPE, CREDENTIAL_SUBJECT_TYPE, CREDENTIAL_TYPES, DOMAIN_TYPE, IRenown, ISSUER_TYPE, LoginStatus, User, VERIFIABLE_CREDENTIAL_EIP712_TYPE } from "@renown/sdk";
6
4
  import { LoginMethod, WalletAdapterDescriptor, WalletController, WalletSession, WalletTheme } from "@renown/sdk/wallet";
7
-
8
5
  //#region src/renown/use-renown-auth.d.ts
9
6
  type RenownAuthStatus = LoginStatus | "loading";
10
7
  interface RenownAuth {
@@ -59,14 +56,7 @@ interface RenownAuthButtonProps {
59
56
  loadingContent?: ReactNode;
60
57
  children?: (auth: RenownAuth) => ReactNode;
61
58
  }
62
- declare function RenownAuthButton({
63
- className,
64
- darkMode,
65
- loginContent,
66
- userContent,
67
- loadingContent,
68
- children
69
- }: RenownAuthButtonProps): react_jsx_runtime0.JSX.Element;
59
+ declare function RenownAuthButton({ className, darkMode, loginContent, userContent, loadingContent, children }: RenownAuthButtonProps): import("react/jsx-runtime").JSX.Element;
70
60
  //#endregion
71
61
  //#region src/renown/components/RenownLoginButton.d.ts
72
62
  interface RenownLoginButtonProps {
@@ -77,13 +67,7 @@ interface RenownLoginButtonProps {
77
67
  asChild?: boolean;
78
68
  children?: ReactNode;
79
69
  }
80
- declare function RenownLoginButton({
81
- onLogin: onLoginProp,
82
- style,
83
- className,
84
- asChild,
85
- children
86
- }: RenownLoginButtonProps): react_jsx_runtime0.JSX.Element;
70
+ declare function RenownLoginButton({ onLogin: onLoginProp, style, className, asChild, children }: RenownLoginButtonProps): import("react/jsx-runtime").JSX.Element;
87
71
  //#endregion
88
72
  //#region src/renown/components/RenownUserButton.d.ts
89
73
  interface RenownUserButtonMenuItem {
@@ -104,18 +88,7 @@ interface RenownUserButtonProps {
104
88
  children?: ReactNode;
105
89
  menuItems?: RenownUserButtonMenuItem[];
106
90
  }
107
- declare function RenownUserButton({
108
- address: addressProp,
109
- username: usernameProp,
110
- avatarUrl: avatarUrlProp,
111
- userId: userIdProp,
112
- onDisconnect: onDisconnectProp,
113
- style,
114
- className,
115
- asChild,
116
- children,
117
- menuItems
118
- }: RenownUserButtonProps): react_jsx_runtime0.JSX.Element;
91
+ declare function RenownUserButton({ address: addressProp, username: usernameProp, avatarUrl: avatarUrlProp, userId: userIdProp, onDisconnect: onDisconnectProp, style, className, asChild, children, menuItems }: RenownUserButtonProps): import("react/jsx-runtime").JSX.Element;
119
92
  //#endregion
120
93
  //#region src/renown/components/icons.d.ts
121
94
  interface IconProps {
@@ -129,34 +102,12 @@ interface IconProps {
129
102
  interface RenownLogoProps extends IconProps {
130
103
  hovered?: boolean;
131
104
  }
132
- declare function RenownLogo({
133
- width,
134
- height,
135
- hovered,
136
- color,
137
- className
138
- }: RenownLogoProps): react_jsx_runtime0.JSX.Element;
139
- declare function CopyIcon({
140
- size,
141
- color
142
- }: IconProps): react_jsx_runtime0.JSX.Element;
143
- declare function DisconnectIcon({
144
- size,
145
- color
146
- }: IconProps): react_jsx_runtime0.JSX.Element;
147
- declare function SpinnerIcon({
148
- size,
149
- color
150
- }: IconProps): react_jsx_runtime0.JSX.Element;
151
- declare function ChevronDownIcon({
152
- size,
153
- color,
154
- style
155
- }: IconProps): react_jsx_runtime0.JSX.Element;
156
- declare function UserIcon({
157
- size,
158
- color
159
- }: IconProps): react_jsx_runtime0.JSX.Element;
105
+ declare function RenownLogo({ width, height, hovered, color, className }: RenownLogoProps): import("react/jsx-runtime").JSX.Element;
106
+ declare function CopyIcon({ size, color }: IconProps): import("react/jsx-runtime").JSX.Element;
107
+ declare function DisconnectIcon({ size, color }: IconProps): import("react/jsx-runtime").JSX.Element;
108
+ declare function SpinnerIcon({ size, color }: IconProps): import("react/jsx-runtime").JSX.Element;
109
+ declare function ChevronDownIcon({ size, color, style }: IconProps): import("react/jsx-runtime").JSX.Element;
110
+ declare function UserIcon({ size, color }: IconProps): import("react/jsx-runtime").JSX.Element;
160
111
  //#endregion
161
112
  //#region src/renown/crypto.d.ts
162
113
  /**
@@ -165,12 +116,12 @@ declare function UserIcon({
165
116
  * Initialize ConnectCrypto
166
117
  * @returns ConnectCrypto instance
167
118
  */
168
- declare function initConnectCrypto(): Promise<_renown_sdk0.RenownCrypto>;
119
+ declare function initConnectCrypto(): Promise<import("@renown/sdk").RenownCrypto>;
169
120
  /**
170
121
  * Initialize RenownCrypto
171
122
  * @returns RenownCrypto instance
172
123
  */
173
- declare function initRenownCrypto(): Promise<_renown_sdk0.RenownCrypto>;
124
+ declare function initRenownCrypto(): Promise<import("@renown/sdk").RenownCrypto>;
174
125
  //#endregion
175
126
  //#region src/renown/constants.d.ts
176
127
  declare const RENOWN_URL = "https://www.renown.id";
@@ -197,11 +148,7 @@ interface RenownInitialUserProviderProps {
197
148
  initialUser?: User;
198
149
  children: ReactNode;
199
150
  }
200
- declare function RenownInitialUserProvider({
201
- initialAuth,
202
- initialUser,
203
- children
204
- }: RenownInitialUserProviderProps): react_jsx_runtime0.JSX.Element;
151
+ declare function RenownInitialUserProvider({ initialAuth, initialUser, children }: RenownInitialUserProviderProps): import("react/jsx-runtime").JSX.Element;
205
152
  /** First-render auth as a three-state value; use this to skip a spinner when anonymous. */
206
153
  declare function useRenownInitialAuth(): RenownInitialAuth;
207
154
  declare function useRenownInitialUser(): User | undefined;
@@ -247,14 +194,7 @@ interface RenownInitOptions {
247
194
  * }
248
195
  * ```
249
196
  */
250
- declare function useRenownInit({
251
- appName,
252
- namespace,
253
- url,
254
- switchboardUrl,
255
- revalidate,
256
- chainId
257
- }: RenownInitOptions): Promise<IRenown>;
197
+ declare function useRenownInit({ appName, namespace, url, switchboardUrl, revalidate, chainId }: RenownInitOptions): Promise<IRenown>;
258
198
  //#endregion
259
199
  //#region src/renown/renown-init.d.ts
260
200
  interface RenownProps extends RenownInitOptions {
@@ -276,10 +216,7 @@ interface RenownProps extends RenownInitOptions {
276
216
  * }
277
217
  * ```
278
218
  */
279
- declare function Renown({
280
- onError,
281
- ...initOptions
282
- }: RenownProps): null;
219
+ declare function Renown({ onError, ...initOptions }: RenownProps): null;
283
220
  //#endregion
284
221
  //#region src/renown/provider.d.ts
285
222
  interface RenownProviderProps {
@@ -304,20 +241,7 @@ interface RenownProviderProps {
304
241
  onError?: (error: unknown) => void;
305
242
  children: ReactNode;
306
243
  }
307
- declare function RenownProvider({
308
- appName,
309
- namespace,
310
- url,
311
- switchboardUrl,
312
- adapters,
313
- theme,
314
- revalidate,
315
- chainId,
316
- session,
317
- sessionEndpoint,
318
- onError,
319
- children
320
- }: RenownProviderProps): react_jsx_runtime0.JSX.Element;
244
+ declare function RenownProvider({ appName, namespace, url, switchboardUrl, adapters, theme, revalidate, chainId, session, sessionEndpoint, onError, children }: RenownProviderProps): import("react/jsx-runtime").JSX.Element;
321
245
  //#endregion
322
246
  //#region src/renown/wallet-provider.d.ts
323
247
  interface RenownWalletProviderProps {
@@ -328,11 +252,7 @@ interface RenownWalletProviderProps {
328
252
  children: ReactNode;
329
253
  }
330
254
  /** Drop-in provider for Renown in-page wallet sign-in: registers the login activator, lazy-mounts the configured adapters on first demand (login, logout, {@link useRenownWalletAdapter}, or an OAuth redirect return — not on a restored session), and merges their controllers for {@link useRenownAuth}. Full walkthrough + examples: the `@powerhousedao/reactor-browser` README ("Renown in-page sign-in") and the Academy Renown authentication guide. Pair with {@link useRenownLoginMethods} to build the login UI. */
331
- declare function RenownWalletProvider({
332
- adapters: adaptersConfig,
333
- theme,
334
- children
335
- }: RenownWalletProviderProps): react_jsx_runtime0.JSX.Element;
255
+ declare function RenownWalletProvider({ adapters: adaptersConfig, theme, children }: RenownWalletProviderProps): import("react/jsx-runtime").JSX.Element;
336
256
  //#endregion
337
257
  //#region src/renown/login-methods.d.ts
338
258
  interface RenownLoginMethod {
@@ -347,4 +267,5 @@ declare function useRenownLoginMethods(labels?: Partial<Record<LoginMethod, stri
347
267
  declare function useRenownWalletAdapter<T extends WalletController = WalletController>(id: string): T | undefined;
348
268
  //#endregion
349
269
  export { useUser as $, RENOWN_RETURN_URL_STRIPPED_PARAMS as A, UserIcon as B, CREDENTIAL_SCHEMA_EIP712_TYPE as C, ISSUER_TYPE as D, DOMAIN_TYPE as E, ChevronDownIcon as F, RenownLoginButtonProps as G, RenownUserButtonMenuItem as H, CopyIcon as I, addRenownEventHandler as J, RenownAuthButton as K, DisconnectIcon as L, VERIFIABLE_CREDENTIAL_EIP712_TYPE as M, initConnectCrypto as N, RENOWN_CHAIN_ID as O, initRenownCrypto as P, useRenown as Q, RenownLogo as R, useRenownInitialUser as S, CREDENTIAL_TYPES as T, RenownUserButtonProps as U, RenownUserButton as V, RenownLoginButton as W, useDid as X, setRenown as Y, useLoginStatus as Z, RENOWN_INITIAL_UNKNOWN as _, RenownWalletProviderProps as a, RenownAuthResolution as at, RenownInitialUserProviderProps as b, Renown as c, useRenownAuthAsync as ct, useRenownInit as d, login as et, RenownSessionCookieOptions as f, RENOWN_INITIAL_ANONYMOUS as g, useRenownSessionSynced as h, RenownWalletProvider as i, RenownAuthAsync as it, RENOWN_URL as j, RENOWN_NETWORK_ID as k, RenownProps as l, useRenownSessionCookie as m, RenownLoginMethod as n, openRenown as nt, RenownProvider as o, RenownAuthStatus as ot, RenownSessionCookieState as p, RenownAuthButtonProps as q, useRenownLoginMethods as r, RenownAuth as rt, RenownProviderProps as s, useRenownAuth as st, useRenownWalletAdapter as t, logout as tt, RenownInitOptions as u, RenownInitialAuth as v, CREDENTIAL_SUBJECT_TYPE as w, useRenownInitialAuth as x, RenownInitialUserProvider as y, SpinnerIcon as z };
350
- //# sourceMappingURL=index-B33TKEqp.d.ts.map
270
+ export {};
271
+ //# sourceMappingURL=index-BABMK8cO.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-BABMK8cO.d.ts","names":[],"sources":["../src/renown/use-renown-auth.ts","../src/renown/session.ts","../src/hooks/renown.ts","../src/renown/components/RenownAuthButton.tsx","../src/renown/components/RenownLoginButton.tsx","../src/renown/components/RenownUserButton.tsx","../src/renown/components/icons.tsx","../src/renown/crypto.ts","../src/renown/constants.ts","../src/renown/initial-user.tsx","../src/renown/use-renown-session.ts","../src/renown/use-renown-init.ts","../src/renown/renown-init.tsx","../src/renown/provider.tsx","../src/renown/wallet-provider.tsx","../src/renown/login-methods.ts","../src/renown/use-renown-wallet-adapter.ts"],"mappings":";;;;;KAoBY,mBAAmB;UAEd;EACf,QAAQ;EACR,MAAM;EACN;EACA;EACA;EACA;EACA;EACA;EAC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9B;;EACA;;cAEO,wBAAwB;cACxB,0BAA0B;UAUtB;;EAEf,cAAc;;EAEd,cAAc;EACd,UAAU;;iBAGI,4BACd,aACA,aACA,YACC,6DAA8B,IAAA;;iBAejB,wBAAwB;iBAIxB,wBAAwB;;;UC7CvB;;EAEf;;EAEA;;EAEA;;UAGe;;EAEf;;iBAKc,uBACd,UAAS,6BACR;iBA4Ea;;;UCjGC;EACf;;EAEA;EACA;EACA;;EAEA;;EAEA;;;;;;;;;;;;;;;iBA4Cc,gBACd,SACA,WACA,KACA,gBACA,YACA,WACC,oBAAoB,QAAQ;;;UCjEd,oBAAoB;EACnC,WAAW;;;;;;;;;;;;;;;;;;iBAmBG,SAAS,YAAY,eAAe;;;UCJnC;EACf;;EAEA;EACA;EACA;;EAEA,WAAW;EACX,QAAQ;;EAER;;EAEA;;EAEA;IAAY,OAAO;;;EAEnB;EACA,WAAW;EACX,UAAU;;iBA0BI,iBACd,SACA,WACA,KACA,gBACA,UACA,OACA,YACA,SACA,SACA,iBACA,SACA,YACC,kDAAmB,IAAA;;;UCsBL;;EAEf,UAAU;;EAEV,QAAQ;EACR,UAAU;;;iBAII,uBACd,UAAU,gBACV,OACA,YACC,wDAAyB,IAAA;;;UCtGX;EACf,IAAI;EACJ;;;iBAWc,sBACd,SAAS,QAAQ,OAAO,wBACvB;;;;iBCXa,uBACd,UAAU,mBAAmB,kBAC7B,aAAa"}
@@ -1,5 +1,4 @@
1
- import { n as PGliteInterface, r as Results } from "./pglite-CntadC_p-9NDG14dS.js";
2
-
1
+ import { n as PGliteInterface, r as Results } from "./pglite-CntadC_p-DTkdF8sr.js";
3
2
  //#region ../../node_modules/.pnpm/@electric-sql+pglite@0.3.15/node_modules/@electric-sql/pglite/dist/live/index.d.ts
4
3
  interface LiveQueryOptions<T = {
5
4
  [key: string]: any;
@@ -141,4 +140,5 @@ type PGliteWithLive = PGliteInterface & {
141
140
  };
142
141
  //#endregion
143
142
  export { LiveQueryResults as n, PGliteWithLive as r, LiveNamespace as t };
144
- //# sourceMappingURL=index-BIVDXw3K.d.ts.map
143
+ export {};
144
+ //# sourceMappingURL=index-rtDmzViP.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-rtDmzViP.d.ts","names":[],"sources":["../../../node_modules/.pnpm/@electric-sql+pglite@0.3.15/node_modules/@electric-sql/pglite/dist/live/index.d.ts"],"x_google_ignoreList":[0],"mappings":";;UAEU,iBAAiB;GACtB;;EAED;EACA;EACA;EACA;EACA,YAAY,SAAS,QAAQ;EAC7B,SAAS;;UAEH,mBAAmB;GACxB;;EAED;EACA;EACA;EACA,YAAY,SAAS,MAAM,OAAO;EAClC,SAAS;;UAEH,4BAA4B;GACjC;;EAED;EACA;EACA;EACA,YAAY,SAAS,QAAQ;EAC7B,SAAS;;UAEH;;;;;;;;;EASN,MAAM;KACD;KACF,eAAe,uBAAuB,YAAY,SAAS,QAAQ,cAAc,QAAQ,UAAU;;;;;;;EAOtG,MAAM;KACD;KACF,SAAS,iBAAiB,KAAK,QAAQ,UAAU;;;;;;;;;EASpD,QAAQ;KACH;KACF,eAAe,kCAAkC,aAAa,YAAY,SAAS,MAAM,OAAO,eAAe,QAAQ,YAAY;;;;;;;EAOtI,QAAQ;KACH;KACF,SAAS,mBAAmB,KAAK,QAAQ,YAAY;;;;;;;;;EASxD,iBAAiB;KACZ;KACF,eAAe,kCAAkC,aAAa,YAAY,SAAS,QAAQ,cAAc,QAAQ,UAAU;;;;;;;EAO9H,iBAAiB;KACZ;KACF,SAAS,4BAA4B,KAAK,QAAQ,UAAU;;UAEzD,iBAAiB,WAAW,QAAQ;EAC1C;EACA;EACA;;UAEM,UAAU;EAChB,gBAAgB,iBAAiB;EACjC,YAAY,WAAW,SAAS,iBAAiB;EACjD,cAAc,YAAY,SAAS,iBAAiB,gBAAgB;EACpE,UAAU;IACN;IACA;QACE;;UAEA,YAAY;GACjB;;EAED;IACI;IACA;;EAEJ,gBAAgB,MAAM,OAAO;EAC7B,YAAY,WAAW,SA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