@calimero-network/mero-react 11.7.0 → 11.8.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.
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -5
- package/dist/index.d.ts +8 -5
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1257,6 +1257,11 @@ declare function ConsentPopupReturn({ children }: {
|
|
|
1257
1257
|
declare function clusterName(nodeUrl: string): string;
|
|
1258
1258
|
|
|
1259
1259
|
type InviteRole = Exclude<OrgRole, 'owner'>;
|
|
1260
|
+
/** What `onJoined` gets: the org, and whether the account was already in it (nothing was redeemed). */
|
|
1261
|
+
interface JoinedInvite {
|
|
1262
|
+
org: string;
|
|
1263
|
+
alreadyMember: boolean;
|
|
1264
|
+
}
|
|
1260
1265
|
/** An invite just created. */
|
|
1261
1266
|
interface CreatedInvite {
|
|
1262
1267
|
token: string;
|
|
@@ -1343,10 +1348,8 @@ interface AcceptInviteDialogProps {
|
|
|
1343
1348
|
labels?: AcceptInviteLabels;
|
|
1344
1349
|
/** Called when the node refuses the join or the request, with the error itself (to clear a spent stored token, say). A declined approval is not an error. */
|
|
1345
1350
|
onError?: (error: unknown) => void;
|
|
1346
|
-
/** Called once the person has joined (or, with `org`, chose to continue as a member), from the dialog or from a full-page approval. */
|
|
1347
|
-
onJoined: (joined:
|
|
1348
|
-
org: string;
|
|
1349
|
-
}) => void;
|
|
1351
|
+
/** Called once the person has joined (`alreadyMember: false`), or, with `org`, chose to continue as a member (`alreadyMember: true`; nothing was redeemed), from the dialog or from a full-page approval. */
|
|
1352
|
+
onJoined: (joined: JoinedInvite) => void;
|
|
1350
1353
|
/** Where the node's consent page sends the person back. Default: this origin's root, where the app mounts `ConsentPopupReturn`. */
|
|
1351
1354
|
returnTo?: string;
|
|
1352
1355
|
client?: CalimeroClient;
|
|
@@ -1362,4 +1365,4 @@ declare function AcceptInviteDialog({ client, passkey, ...props }: AcceptInviteD
|
|
|
1362
1365
|
/** The labels of the bits set in `mask`, in display order. */
|
|
1363
1366
|
declare function describeCapabilities(mask: number): string[];
|
|
1364
1367
|
|
|
1365
|
-
export { AcceptInviteDialog, type AcceptInviteDialogProps, type AcceptInviteLabels, type AppEvent, type AsyncState, type BlobHookOptions, CONSENT_RETURN_MESSAGE, CalimeroLogo, type CalimeroLogoProps, type CallOptions, type Codec, ConnectButton, type ConnectButtonProps, ConsentPopupReturn, type CreateApiKeyInput, type CreateAppInput, type CreateInviteInput, type CreatePhase, type CreateTeamInput, CreateWorkspaceDialog, type CreateWorkspaceDialogProps, type CreateWorkspaceLabels, type CreatedInvite, type CreatedWorkspace, type EphemeralEntry, type Failure, type FailureKind, InviteDialog, type InviteDialogProps, type InviteLabels, type InviteRedemption, type InviteRedemptionStatus, type InviteRole, LoginModal, type LoginModalProps, type LoginModalTab, MERO_CSS_VARS, MeroContext, type MeroContextValue, MeroProvider, type MeroProviderConfig, type MeroProviderProps, type MeroTheme, type MutationOptions, NoAppError, NotConnectedError, type PolicyOptions, type ResolvedMeroTheme, type ResourceState, ReviewRelease, SessionReportingClient, type SessionStore, type SubscriptionEventData, type SubscriptionOptions, type TeamJoin, type TeamUpdate, UnreleasedApp, type UpgradeTarget, type UseBlobUrlOptions, type UseCreateWorkspaceOptions, type UseEphemeralOptions, type UseEphemeralResult, type UseViewOptions, type UseViewResult, type ViewOptions, type WaitOptions, WorkspaceReview, type WorkspaceReviewProps, clearAllStorage, clearAppId, clearCluster, clearNodeUrl, clusterName, cssVar, defaultMeroTheme, describeCapabilities, describeError, followEvents, getAppId, getCluster, getNodeUrl, inviteLink, isLoginRequired, jsonCodec, localStorageSessionStore, memorySessionStore, readInviteToken, reportSessions, resolveMeroTheme, resolvePolicy, setAppId, setCluster, setNodeUrl, shortAccount, themeToCssVars, useAccount, useApiKeys, useApp, useAppAbi, useApps, useBlobInfo, useBlobUrl, useBlobs, useConsent, useCreateApp, useCreateInvite, useCreateOrg, useCreateTeam, useCreateWorkspace, useCreateWorkspaceResume, useDeleteApp, useDeleteBlob, useDeleteOrg, useDeleteTeam, useEphemeral, useExecute, useInviteRedemption, useMero, useOrg, usePackages, usePasskeys, useRedeemInvite, useRemoveMember, useRemoveTeamMember, useSetAppMetadata, useSetCapabilities, useSetMember, useSetMemberMetadata, useSetOrgMetadata, useSetTeamMember, useSubscription, useTeam, useUpdateTeam, useUpgradeApp, useUploadBlob, useView };
|
|
1368
|
+
export { AcceptInviteDialog, type AcceptInviteDialogProps, type AcceptInviteLabels, type AppEvent, type AsyncState, type BlobHookOptions, CONSENT_RETURN_MESSAGE, CalimeroLogo, type CalimeroLogoProps, type CallOptions, type Codec, ConnectButton, type ConnectButtonProps, ConsentPopupReturn, type CreateApiKeyInput, type CreateAppInput, type CreateInviteInput, type CreatePhase, type CreateTeamInput, CreateWorkspaceDialog, type CreateWorkspaceDialogProps, type CreateWorkspaceLabels, type CreatedInvite, type CreatedWorkspace, type EphemeralEntry, type Failure, type FailureKind, InviteDialog, type InviteDialogProps, type InviteLabels, type InviteRedemption, type InviteRedemptionStatus, type InviteRole, type JoinedInvite, LoginModal, type LoginModalProps, type LoginModalTab, MERO_CSS_VARS, MeroContext, type MeroContextValue, MeroProvider, type MeroProviderConfig, type MeroProviderProps, type MeroTheme, type MutationOptions, NoAppError, NotConnectedError, type PolicyOptions, type ResolvedMeroTheme, type ResourceState, ReviewRelease, SessionReportingClient, type SessionStore, type SubscriptionEventData, type SubscriptionOptions, type TeamJoin, type TeamUpdate, UnreleasedApp, type UpgradeTarget, type UseBlobUrlOptions, type UseCreateWorkspaceOptions, type UseEphemeralOptions, type UseEphemeralResult, type UseViewOptions, type UseViewResult, type ViewOptions, type WaitOptions, WorkspaceReview, type WorkspaceReviewProps, clearAllStorage, clearAppId, clearCluster, clearNodeUrl, clusterName, cssVar, defaultMeroTheme, describeCapabilities, describeError, followEvents, getAppId, getCluster, getNodeUrl, inviteLink, isLoginRequired, jsonCodec, localStorageSessionStore, memorySessionStore, readInviteToken, reportSessions, resolveMeroTheme, resolvePolicy, setAppId, setCluster, setNodeUrl, shortAccount, themeToCssVars, useAccount, useApiKeys, useApp, useAppAbi, useApps, useBlobInfo, useBlobUrl, useBlobs, useConsent, useCreateApp, useCreateInvite, useCreateOrg, useCreateTeam, useCreateWorkspace, useCreateWorkspaceResume, useDeleteApp, useDeleteBlob, useDeleteOrg, useDeleteTeam, useEphemeral, useExecute, useInviteRedemption, useMero, useOrg, usePackages, usePasskeys, useRedeemInvite, useRemoveMember, useRemoveTeamMember, useSetAppMetadata, useSetCapabilities, useSetMember, useSetMemberMetadata, useSetOrgMetadata, useSetTeamMember, useSubscription, useTeam, useUpdateTeam, useUpgradeApp, useUploadBlob, useView };
|
package/dist/index.d.ts
CHANGED
|
@@ -1257,6 +1257,11 @@ declare function ConsentPopupReturn({ children }: {
|
|
|
1257
1257
|
declare function clusterName(nodeUrl: string): string;
|
|
1258
1258
|
|
|
1259
1259
|
type InviteRole = Exclude<OrgRole, 'owner'>;
|
|
1260
|
+
/** What `onJoined` gets: the org, and whether the account was already in it (nothing was redeemed). */
|
|
1261
|
+
interface JoinedInvite {
|
|
1262
|
+
org: string;
|
|
1263
|
+
alreadyMember: boolean;
|
|
1264
|
+
}
|
|
1260
1265
|
/** An invite just created. */
|
|
1261
1266
|
interface CreatedInvite {
|
|
1262
1267
|
token: string;
|
|
@@ -1343,10 +1348,8 @@ interface AcceptInviteDialogProps {
|
|
|
1343
1348
|
labels?: AcceptInviteLabels;
|
|
1344
1349
|
/** Called when the node refuses the join or the request, with the error itself (to clear a spent stored token, say). A declined approval is not an error. */
|
|
1345
1350
|
onError?: (error: unknown) => void;
|
|
1346
|
-
/** Called once the person has joined (or, with `org`, chose to continue as a member), from the dialog or from a full-page approval. */
|
|
1347
|
-
onJoined: (joined:
|
|
1348
|
-
org: string;
|
|
1349
|
-
}) => void;
|
|
1351
|
+
/** Called once the person has joined (`alreadyMember: false`), or, with `org`, chose to continue as a member (`alreadyMember: true`; nothing was redeemed), from the dialog or from a full-page approval. */
|
|
1352
|
+
onJoined: (joined: JoinedInvite) => void;
|
|
1350
1353
|
/** Where the node's consent page sends the person back. Default: this origin's root, where the app mounts `ConsentPopupReturn`. */
|
|
1351
1354
|
returnTo?: string;
|
|
1352
1355
|
client?: CalimeroClient;
|
|
@@ -1362,4 +1365,4 @@ declare function AcceptInviteDialog({ client, passkey, ...props }: AcceptInviteD
|
|
|
1362
1365
|
/** The labels of the bits set in `mask`, in display order. */
|
|
1363
1366
|
declare function describeCapabilities(mask: number): string[];
|
|
1364
1367
|
|
|
1365
|
-
export { AcceptInviteDialog, type AcceptInviteDialogProps, type AcceptInviteLabels, type AppEvent, type AsyncState, type BlobHookOptions, CONSENT_RETURN_MESSAGE, CalimeroLogo, type CalimeroLogoProps, type CallOptions, type Codec, ConnectButton, type ConnectButtonProps, ConsentPopupReturn, type CreateApiKeyInput, type CreateAppInput, type CreateInviteInput, type CreatePhase, type CreateTeamInput, CreateWorkspaceDialog, type CreateWorkspaceDialogProps, type CreateWorkspaceLabels, type CreatedInvite, type CreatedWorkspace, type EphemeralEntry, type Failure, type FailureKind, InviteDialog, type InviteDialogProps, type InviteLabels, type InviteRedemption, type InviteRedemptionStatus, type InviteRole, LoginModal, type LoginModalProps, type LoginModalTab, MERO_CSS_VARS, MeroContext, type MeroContextValue, MeroProvider, type MeroProviderConfig, type MeroProviderProps, type MeroTheme, type MutationOptions, NoAppError, NotConnectedError, type PolicyOptions, type ResolvedMeroTheme, type ResourceState, ReviewRelease, SessionReportingClient, type SessionStore, type SubscriptionEventData, type SubscriptionOptions, type TeamJoin, type TeamUpdate, UnreleasedApp, type UpgradeTarget, type UseBlobUrlOptions, type UseCreateWorkspaceOptions, type UseEphemeralOptions, type UseEphemeralResult, type UseViewOptions, type UseViewResult, type ViewOptions, type WaitOptions, WorkspaceReview, type WorkspaceReviewProps, clearAllStorage, clearAppId, clearCluster, clearNodeUrl, clusterName, cssVar, defaultMeroTheme, describeCapabilities, describeError, followEvents, getAppId, getCluster, getNodeUrl, inviteLink, isLoginRequired, jsonCodec, localStorageSessionStore, memorySessionStore, readInviteToken, reportSessions, resolveMeroTheme, resolvePolicy, setAppId, setCluster, setNodeUrl, shortAccount, themeToCssVars, useAccount, useApiKeys, useApp, useAppAbi, useApps, useBlobInfo, useBlobUrl, useBlobs, useConsent, useCreateApp, useCreateInvite, useCreateOrg, useCreateTeam, useCreateWorkspace, useCreateWorkspaceResume, useDeleteApp, useDeleteBlob, useDeleteOrg, useDeleteTeam, useEphemeral, useExecute, useInviteRedemption, useMero, useOrg, usePackages, usePasskeys, useRedeemInvite, useRemoveMember, useRemoveTeamMember, useSetAppMetadata, useSetCapabilities, useSetMember, useSetMemberMetadata, useSetOrgMetadata, useSetTeamMember, useSubscription, useTeam, useUpdateTeam, useUpgradeApp, useUploadBlob, useView };
|
|
1368
|
+
export { AcceptInviteDialog, type AcceptInviteDialogProps, type AcceptInviteLabels, type AppEvent, type AsyncState, type BlobHookOptions, CONSENT_RETURN_MESSAGE, CalimeroLogo, type CalimeroLogoProps, type CallOptions, type Codec, ConnectButton, type ConnectButtonProps, ConsentPopupReturn, type CreateApiKeyInput, type CreateAppInput, type CreateInviteInput, type CreatePhase, type CreateTeamInput, CreateWorkspaceDialog, type CreateWorkspaceDialogProps, type CreateWorkspaceLabels, type CreatedInvite, type CreatedWorkspace, type EphemeralEntry, type Failure, type FailureKind, InviteDialog, type InviteDialogProps, type InviteLabels, type InviteRedemption, type InviteRedemptionStatus, type InviteRole, type JoinedInvite, LoginModal, type LoginModalProps, type LoginModalTab, MERO_CSS_VARS, MeroContext, type MeroContextValue, MeroProvider, type MeroProviderConfig, type MeroProviderProps, type MeroTheme, type MutationOptions, NoAppError, NotConnectedError, type PolicyOptions, type ResolvedMeroTheme, type ResourceState, ReviewRelease, SessionReportingClient, type SessionStore, type SubscriptionEventData, type SubscriptionOptions, type TeamJoin, type TeamUpdate, UnreleasedApp, type UpgradeTarget, type UseBlobUrlOptions, type UseCreateWorkspaceOptions, type UseEphemeralOptions, type UseEphemeralResult, type UseViewOptions, type UseViewResult, type ViewOptions, type WaitOptions, WorkspaceReview, type WorkspaceReviewProps, clearAllStorage, clearAppId, clearCluster, clearNodeUrl, clusterName, cssVar, defaultMeroTheme, describeCapabilities, describeError, followEvents, getAppId, getCluster, getNodeUrl, inviteLink, isLoginRequired, jsonCodec, localStorageSessionStore, memorySessionStore, readInviteToken, reportSessions, resolveMeroTheme, resolvePolicy, setAppId, setCluster, setNodeUrl, shortAccount, themeToCssVars, useAccount, useApiKeys, useApp, useAppAbi, useApps, useBlobInfo, useBlobUrl, useBlobs, useConsent, useCreateApp, useCreateInvite, useCreateOrg, useCreateTeam, useCreateWorkspace, useCreateWorkspaceResume, useDeleteApp, useDeleteBlob, useDeleteOrg, useDeleteTeam, useEphemeral, useExecute, useInviteRedemption, useMero, useOrg, usePackages, usePasskeys, useRedeemInvite, useRemoveMember, useRemoveTeamMember, useSetAppMetadata, useSetCapabilities, useSetMember, useSetMemberMetadata, useSetOrgMetadata, useSetTeamMember, useSubscription, useTeam, useUpdateTeam, useUpgradeApp, useUploadBlob, useView };
|
package/dist/index.js
CHANGED
|
@@ -2885,7 +2885,7 @@ function useInviteAccept({ returnTo, noun, onJoined, onError }) {
|
|
|
2885
2885
|
done: (outcome) => {
|
|
2886
2886
|
const org = "direct" in outcome ? outcome.direct : orgOf(outcome.consent);
|
|
2887
2887
|
if (!org) return noOrg(noun);
|
|
2888
|
-
onJoined({ org });
|
|
2888
|
+
onJoined({ org, alreadyMember: false });
|
|
2889
2889
|
return void 0;
|
|
2890
2890
|
}
|
|
2891
2891
|
});
|
|
@@ -2898,7 +2898,7 @@ function useAcceptResume({ noun, onJoined }) {
|
|
|
2898
2898
|
onApproved: (_intent, result) => {
|
|
2899
2899
|
const org = orgOf(result);
|
|
2900
2900
|
if (!org) return noOrg(noun);
|
|
2901
|
-
onJoined({ org });
|
|
2901
|
+
onJoined({ org, alreadyMember: false });
|
|
2902
2902
|
return void 0;
|
|
2903
2903
|
}
|
|
2904
2904
|
});
|
|
@@ -3125,7 +3125,7 @@ function Dialog3({ open, onClose, token, org, appName, labels, onJoined, onError
|
|
|
3125
3125
|
body = /* @__PURE__ */ jsxs("div", { children: [
|
|
3126
3126
|
/* @__PURE__ */ jsx("h2", { className: "mero-cw-title", children: `You're already in ${name}` }),
|
|
3127
3127
|
/* @__PURE__ */ jsx("p", { className: "mero-cw-sub", children: `The invitation was for ${name}, and you are already a member, so there is nothing to accept. It is still unused for the person it was meant for.` }),
|
|
3128
|
-
/* @__PURE__ */ jsx("button", { type: "button", className: "mero-cw-btn mero-cw-btn--primary mero-cw-btn--full", onClick: () => onJoined({ org }), children: "Continue" })
|
|
3128
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "mero-cw-btn mero-cw-btn--primary mero-cw-btn--full", onClick: () => onJoined({ org, alreadyMember: true }), children: "Continue" })
|
|
3129
3129
|
] });
|
|
3130
3130
|
} else {
|
|
3131
3131
|
body = /* @__PURE__ */ jsxs("div", { children: [
|