@sparkvault/sdk 1.21.10 → 1.23.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/identity/container.d.ts +7 -0
- package/dist/identity/index.d.ts +4 -2
- package/dist/identity/inline-container.d.ts +5 -0
- package/dist/identity/modal.d.ts +8 -0
- package/dist/identity/renderer.d.ts +12 -0
- package/dist/identity/types.d.ts +4 -0
- package/dist/identity/views/app-not-activated.d.ts +21 -0
- package/dist/identity/views/index.d.ts +2 -0
- package/dist/identity/views/service-unavailable.d.ts +21 -0
- package/dist/index.d.ts +5 -7
- package/dist/sparkvault.cjs.js +626 -19
- package/dist/sparkvault.cjs.js.map +1 -1
- package/dist/sparkvault.esm.js +626 -19
- package/dist/sparkvault.esm.js.map +1 -1
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/dist/vaults/index.d.ts +1 -1
- package/dist/vaults/upload/index.d.ts +3 -7
- package/dist/vaults/upload/types.d.ts +0 -4
- package/package.json +1 -1
|
@@ -34,6 +34,13 @@ export interface Container {
|
|
|
34
34
|
* Update backdrop blur setting (may be no-op for inline container).
|
|
35
35
|
*/
|
|
36
36
|
updateBackdropBlur(enabled: boolean): void;
|
|
37
|
+
/**
|
|
38
|
+
* Switch to minimal chrome mode for full-bleed views (e.g. terminal error
|
|
39
|
+
* screens). Hides the header (so customer branding doesn't appear on
|
|
40
|
+
* SparkVault-owned messaging) and exposes a floating close affordance.
|
|
41
|
+
* No-op for containers that don't have chrome to hide.
|
|
42
|
+
*/
|
|
43
|
+
setMinimalChrome(enabled: boolean): void;
|
|
37
44
|
/**
|
|
38
45
|
* Get the body element where views are rendered.
|
|
39
46
|
*/
|
package/dist/identity/index.d.ts
CHANGED
|
@@ -72,11 +72,13 @@ export declare class IdentityModule {
|
|
|
72
72
|
*/
|
|
73
73
|
private createInlineContainer;
|
|
74
74
|
/**
|
|
75
|
-
*
|
|
75
|
+
* Open the identity verification modal as a popup. Equivalent to
|
|
76
|
+
* `verify(options)`.
|
|
76
77
|
*/
|
|
77
78
|
pop(options?: VerifyOptions): Promise<VerifyResult>;
|
|
78
79
|
/**
|
|
79
|
-
*
|
|
80
|
+
* Render the identity verification UI inline into a target element.
|
|
81
|
+
* Equivalent to `verify({ ...options, target })`.
|
|
80
82
|
*/
|
|
81
83
|
render(options: VerifyOptions & {
|
|
82
84
|
target: HTMLElement;
|
|
@@ -43,6 +43,11 @@ export declare class InlineContainer implements Container {
|
|
|
43
43
|
* Update backdrop blur setting (no-op for inline container).
|
|
44
44
|
*/
|
|
45
45
|
updateBackdropBlur(_enabled: boolean): void;
|
|
46
|
+
/**
|
|
47
|
+
* Minimal-chrome toggle (no-op for inline container).
|
|
48
|
+
* Inline containers don't own page-level chrome to hide.
|
|
49
|
+
*/
|
|
50
|
+
setMinimalChrome(_enabled: boolean): void;
|
|
46
51
|
/**
|
|
47
52
|
* Get the body element for content rendering.
|
|
48
53
|
*/
|
package/dist/identity/modal.d.ts
CHANGED
|
@@ -29,6 +29,8 @@ export declare class ModalContainer implements Container {
|
|
|
29
29
|
private backdropBlur;
|
|
30
30
|
private effectiveTheme;
|
|
31
31
|
private headerElement;
|
|
32
|
+
private floatingCloseBtn;
|
|
33
|
+
private floatingCloseHandler;
|
|
32
34
|
/**
|
|
33
35
|
* Create and show the modal immediately with loading state.
|
|
34
36
|
* Uses default branding until real config is loaded.
|
|
@@ -42,6 +44,12 @@ export declare class ModalContainer implements Container {
|
|
|
42
44
|
* Called after SDK config loads.
|
|
43
45
|
*/
|
|
44
46
|
updateBranding(branding: SdkConfigBranding): void;
|
|
47
|
+
/**
|
|
48
|
+
* Toggle minimal-chrome mode. In minimal mode the header (logo + close)
|
|
49
|
+
* is hidden and a floating close button is positioned over the modal so
|
|
50
|
+
* the body view can render edge-to-edge as its own full-dialog design.
|
|
51
|
+
*/
|
|
52
|
+
setMinimalChrome(enabled: boolean): void;
|
|
45
53
|
/**
|
|
46
54
|
* Update the backdrop blur setting.
|
|
47
55
|
* Called after SDK config loads with resolved value (client override > server config > default).
|
|
@@ -34,12 +34,24 @@ export declare class IdentityRenderer {
|
|
|
34
34
|
* Otherwise shows loading state while fetching config.
|
|
35
35
|
*/
|
|
36
36
|
start(): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* Map a config-fetch error to the appropriate terminal view.
|
|
39
|
+
* `app_not_installed` is a misconfiguration (account hasn't installed the
|
|
40
|
+
* Identity app) — show a developer-targeted "Not Activated" screen with a
|
|
41
|
+
* link to SparkVault.com instead of the generic service-unavailable view.
|
|
42
|
+
*/
|
|
43
|
+
private viewStateForConfigError;
|
|
37
44
|
/**
|
|
38
45
|
* Fetch config with a single retry on network errors.
|
|
39
46
|
* Handles transient failures common during subdomain switches
|
|
40
47
|
* (DNS resolution, connection setup, Safari ITP).
|
|
41
48
|
*/
|
|
42
49
|
private fetchConfigWithRetry;
|
|
50
|
+
/**
|
|
51
|
+
* Retry loading config after a service-unavailable error.
|
|
52
|
+
* Shows loading state, re-fetches config, then proceeds normally.
|
|
53
|
+
*/
|
|
54
|
+
private retryConfigLoad;
|
|
43
55
|
/**
|
|
44
56
|
* Close the modal and clean up.
|
|
45
57
|
* Cancels all pending API requests to prevent orphaned operations.
|
package/dist/identity/types.d.ts
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* App Not Activated View
|
|
3
|
+
*
|
|
4
|
+
* Full-dialog terminal screen shown when the SparkVault Identity app has not
|
|
5
|
+
* been activated for the account that the JS SDK is configured against. The
|
|
6
|
+
* audience is the website owner / developer — this is a misconfiguration
|
|
7
|
+
* surface, not an end-user error — so the dialog drops customer branding and
|
|
8
|
+
* presents itself as an unmistakable SparkVault notice.
|
|
9
|
+
*/
|
|
10
|
+
import type { View } from './base';
|
|
11
|
+
export interface AppNotActivatedViewProps {
|
|
12
|
+
onClose: () => void;
|
|
13
|
+
}
|
|
14
|
+
export declare class AppNotActivatedView implements View {
|
|
15
|
+
private readonly props;
|
|
16
|
+
private dismissButton;
|
|
17
|
+
private readonly boundHandleClose;
|
|
18
|
+
constructor(props: AppNotActivatedViewProps);
|
|
19
|
+
render(): HTMLElement;
|
|
20
|
+
destroy(): void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Service Unavailable View
|
|
3
|
+
*
|
|
4
|
+
* Shown when the identity config endpoint is unreachable.
|
|
5
|
+
* Clean, professional, branded — no error codes or technical jargon.
|
|
6
|
+
*/
|
|
7
|
+
import type { View } from './base';
|
|
8
|
+
export interface ServiceUnavailableViewProps {
|
|
9
|
+
onRetry: () => void;
|
|
10
|
+
onClose: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare class ServiceUnavailableView implements View {
|
|
13
|
+
private readonly props;
|
|
14
|
+
private retryButton;
|
|
15
|
+
private closeButton;
|
|
16
|
+
private readonly boundHandleRetry;
|
|
17
|
+
private readonly boundHandleClose;
|
|
18
|
+
constructor(props: ServiceUnavailableViewProps);
|
|
19
|
+
render(): HTMLElement;
|
|
20
|
+
destroy(): void;
|
|
21
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -188,11 +188,13 @@ declare class IdentityModule {
|
|
|
188
188
|
*/
|
|
189
189
|
private createInlineContainer;
|
|
190
190
|
/**
|
|
191
|
-
*
|
|
191
|
+
* Open the identity verification modal as a popup. Equivalent to
|
|
192
|
+
* `verify(options)`.
|
|
192
193
|
*/
|
|
193
194
|
pop(options?: VerifyOptions): Promise<VerifyResult>;
|
|
194
195
|
/**
|
|
195
|
-
*
|
|
196
|
+
* Render the identity verification UI inline into a target element.
|
|
197
|
+
* Equivalent to `verify({ ...options, target })`.
|
|
196
198
|
*/
|
|
197
199
|
render(options: VerifyOptions & {
|
|
198
200
|
target: HTMLElement;
|
|
@@ -422,10 +424,6 @@ interface UploadAttachOptions {
|
|
|
422
424
|
/** Callback for upload progress */
|
|
423
425
|
onProgress?: (progress: UploadProgress) => void;
|
|
424
426
|
}
|
|
425
|
-
/** @deprecated Use UploadOptions instead */
|
|
426
|
-
type UploadPopOptions = UploadOptions;
|
|
427
|
-
/** @deprecated Use UploadOptions instead */
|
|
428
|
-
type UploadRenderOptions = UploadOptions;
|
|
429
427
|
/**
|
|
430
428
|
* Upload progress information.
|
|
431
429
|
*/
|
|
@@ -692,4 +690,4 @@ declare global {
|
|
|
692
690
|
}
|
|
693
691
|
|
|
694
692
|
export { AuthenticationError, AuthorizationError, NetworkError, PopupBlockedError, SparkVault, SparkVaultError, TimeoutError, UserCancelledError, ValidationError, SparkVault as default, logger, setDebugMode };
|
|
695
|
-
export type { AuthMethod, CreateVaultOptions, AttachOptions as IdentityAttachOptions, Ingot, SparkVaultConfig, Theme, TokenClaims, UnsealedVault, UploadAttachOptions, UploadBranding, UploadIngotOptions, UploadOptions,
|
|
693
|
+
export type { AuthMethod, CreateVaultOptions, AttachOptions as IdentityAttachOptions, Ingot, SparkVaultConfig, Theme, TokenClaims, UnsealedVault, UploadAttachOptions, UploadBranding, UploadIngotOptions, UploadOptions, UploadProgress, UploadResult, Vault, VaultSummary, VaultUploadConfig, VerifyOptions, VerifyResult };
|