@atlasauth/svelte 0.8.0 → 0.10.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/CHANGELOG.md +22 -0
- package/dist/accessors.d.ts +66 -1
- package/dist/accessors.js +110 -3
- package/dist/appearance.d.ts +1 -1
- package/dist/components/AttemptFlow.svelte +188 -4
- package/dist/components/AttemptFlow.svelte.d.ts +28 -1
- package/dist/components/ImpersonationBanner.svelte +38 -0
- package/dist/components/ImpersonationBanner.svelte.d.ts +19 -0
- package/dist/components/OrganizationAuditLog.svelte +45 -0
- package/dist/components/OrganizationAuditLog.svelte.d.ts +31 -0
- package/dist/components/OrganizationProfile.svelte +308 -12
- package/dist/components/OrganizationProfile.svelte.d.ts +2 -0
- package/dist/components/PasskeySignUpStep.svelte +23 -0
- package/dist/components/PasskeySignUpStep.svelte.d.ts +24 -0
- package/dist/components/PolicyAcceptStep.svelte +52 -0
- package/dist/components/PolicyAcceptStep.svelte.d.ts +30 -0
- package/dist/components/PolicyClickwrap.svelte +23 -0
- package/dist/components/PolicyClickwrap.svelte.d.ts +19 -0
- package/dist/components/PolicyConsent.svelte +23 -0
- package/dist/components/PolicyConsent.svelte.d.ts +24 -0
- package/dist/components/PolicyGate.svelte +83 -0
- package/dist/components/PolicyGate.svelte.d.ts +24 -0
- package/dist/components/RecoveryCodes.svelte +55 -0
- package/dist/components/RecoveryCodes.svelte.d.ts +25 -0
- package/dist/components/SignIn.svelte +21 -1
- package/dist/components/SignUp.svelte +22 -3
- package/dist/components/SignUpForm.svelte +84 -19
- package/dist/components/SignUpForm.svelte.d.ts +6 -1
- package/dist/context.d.ts +9 -1
- package/dist/context.js +18 -1
- package/dist/i18n.js +58 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +8 -1
- package/dist/policies.d.ts +6 -0
- package/dist/policies.js +17 -0
- package/dist/types.d.ts +6 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ export * from './fapi';
|
|
|
19
19
|
// The client, context install, and the base accessor.
|
|
20
20
|
export { ATLAS_KEY, initAtlas, createAtlasClient, useAtlas, } from './context';
|
|
21
21
|
// Store accessors (peers of the React hooks) and action helpers.
|
|
22
|
-
export { getUser, getSession, getAuth, getOrganization, getToken, signIn, signUp, signOut, } from './accessors';
|
|
22
|
+
export { getUser, getSession, getAuth, getOrganization, getOrganizationAuditLog, getToken, signIn, signUp, signOut, } from './accessors';
|
|
23
23
|
// Components.
|
|
24
24
|
export { default as AtlasProvider } from './components/AtlasProvider.svelte';
|
|
25
25
|
export { default as SignedIn } from './components/SignedIn.svelte';
|
|
@@ -33,6 +33,13 @@ export { default as UserButton } from './components/UserButton.svelte';
|
|
|
33
33
|
export { default as UserProfile } from './components/UserProfile.svelte';
|
|
34
34
|
export { default as OrganizationSwitcher } from './components/OrganizationSwitcher.svelte';
|
|
35
35
|
export { default as OrganizationProfile } from './components/OrganizationProfile.svelte';
|
|
36
|
+
export { default as OrganizationAuditLog } from './components/OrganizationAuditLog.svelte';
|
|
37
|
+
export { default as ImpersonationBanner } from './components/ImpersonationBanner.svelte';
|
|
38
|
+
// Policy acceptance (terms, privacy, any policy): the consent block, clickwrap line, sign-in step and in-app gate.
|
|
39
|
+
export { default as PolicyConsent } from './components/PolicyConsent.svelte';
|
|
40
|
+
export { default as PolicyClickwrap } from './components/PolicyClickwrap.svelte';
|
|
41
|
+
export { default as PolicyAcceptStep } from './components/PolicyAcceptStep.svelte';
|
|
42
|
+
export { default as PolicyGate } from './components/PolicyGate.svelte';
|
|
36
43
|
// What `signOut()` resolves with, and what it rejects with under `{ strict: true }`.
|
|
37
44
|
export { SignOutError } from '@atlasauth/js';
|
|
38
45
|
// `onSignOut({ reason })` event types + the `atlas:signout` window event; this SDK's version.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type PolicyClasses, type PolicyT } from '@atlasauth/js';
|
|
2
|
+
/** The policy UI's translator (catalog, else the English policy strings) and class hooks, for the current Atlas context. */
|
|
3
|
+
export declare function usePolicyUi(): {
|
|
4
|
+
t: PolicyT;
|
|
5
|
+
classes: PolicyClasses;
|
|
6
|
+
};
|
package/dist/policies.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { policyTranslator } from '@atlasauth/js';
|
|
2
|
+
import { useAtlas } from './context';
|
|
3
|
+
import { classFor } from './appearance';
|
|
4
|
+
import { translate } from './i18n';
|
|
5
|
+
/** The policy UI's translator (catalog, else the English policy strings) and class hooks, for the current Atlas context. */
|
|
6
|
+
export function usePolicyUi() {
|
|
7
|
+
const atlas = useAtlas();
|
|
8
|
+
return {
|
|
9
|
+
t: policyTranslator((key, vars) => translate(atlas.catalog, key, vars)),
|
|
10
|
+
classes: {
|
|
11
|
+
link: classFor('link', atlas.appearance, 'atlas-link'),
|
|
12
|
+
text: classFor('text', atlas.appearance, 'atlas-text'),
|
|
13
|
+
primaryButton: classFor('formButtonPrimary', atlas.appearance, 'atlas-button'),
|
|
14
|
+
error: classFor('formFieldError', atlas.appearance, 'atlas-error'),
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
}
|
package/dist/types.d.ts
CHANGED
|
@@ -39,4 +39,10 @@ export interface AtlasSession {
|
|
|
39
39
|
id: string;
|
|
40
40
|
status: string;
|
|
41
41
|
last_active_organization_id: string | null;
|
|
42
|
+
/** On an impersonation session: who is acting (the token's `act` claim). */
|
|
43
|
+
actor?: {
|
|
44
|
+
sub: string;
|
|
45
|
+
} | null;
|
|
46
|
+
/** On an impersonation session: the impersonator's own session that "return to admin" resumes, or null. */
|
|
47
|
+
actor_session_id?: string | null;
|
|
42
48
|
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { AtlasSdkInfo } from '@atlasauth/js';
|
|
2
2
|
/** This package's version, sent as `X-Atlas-SDK` (kept in step with package.json by a test). */
|
|
3
|
-
export declare const ATLAS_SVELTE_VERSION = "0.
|
|
3
|
+
export declare const ATLAS_SVELTE_VERSION = "0.9.0";
|
|
4
4
|
export declare const ATLAS_SVELTE_SDK: AtlasSdkInfo;
|
package/dist/version.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** This package's version, sent as `X-Atlas-SDK` (kept in step with package.json by a test). */
|
|
2
|
-
export const ATLAS_SVELTE_VERSION = '0.
|
|
2
|
+
export const ATLAS_SVELTE_VERSION = '0.9.0';
|
|
3
3
|
export const ATLAS_SVELTE_SDK = { name: '@atlasauth/svelte', version: ATLAS_SVELTE_VERSION };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlasauth/svelte",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"svelte": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@atlasauth/design": "0.2.0",
|
|
26
|
-
"@atlasauth/
|
|
27
|
-
"@atlasauth/authz": "0.
|
|
28
|
-
"@atlasauth/
|
|
26
|
+
"@atlasauth/js": "0.19.0",
|
|
27
|
+
"@atlasauth/authz": "0.2.0",
|
|
28
|
+
"@atlasauth/backend": "0.18.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"svelte": ">=4",
|