@atlasauth/vue 0.1.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/LICENSE +21 -0
- package/README.md +162 -0
- package/dist/appearance.d.ts +85 -0
- package/dist/appearance.js +98 -0
- package/dist/appearance.js.map +1 -0
- package/dist/components.d.ts +114 -0
- package/dist/components.js +327 -0
- package/dist/components.js.map +1 -0
- package/dist/composables.d.ts +49 -0
- package/dist/composables.js +65 -0
- package/dist/composables.js.map +1 -0
- package/dist/context.d.ts +20 -0
- package/dist/context.js +30 -0
- package/dist/context.js.map +1 -0
- package/dist/fapi.d.ts +11 -0
- package/dist/fapi.js +24 -0
- package/dist/fapi.js.map +1 -0
- package/dist/flow.d.ts +22 -0
- package/dist/flow.js +79 -0
- package/dist/flow.js.map +1 -0
- package/dist/i18n.d.ts +23 -0
- package/dist/i18n.js +83 -0
- package/dist/i18n.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/dist/plugin.d.ts +72 -0
- package/dist/plugin.js +251 -0
- package/dist/plugin.js.map +1 -0
- package/dist/protect.d.ts +18 -0
- package/dist/protect.js +24 -0
- package/dist/protect.js.map +1 -0
- package/dist/types.d.ts +42 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/package.json +32 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Atlas
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# @atlas/vue
|
|
2
|
+
|
|
3
|
+
The official Atlas SDK for Vue 3 — the framework peer of
|
|
4
|
+
[`@atlas/react`](../react). It reuses the framework-agnostic
|
|
5
|
+
[`@atlas/js`](../js) client for every API call and the shared
|
|
6
|
+
[`@atlas/authz`](../authz) primitive for permission checks, and mirrors the web
|
|
7
|
+
surface as idiomatic Vue Composition API: a plugin, `Ref`/`computed`-based
|
|
8
|
+
composables, and components that render in your host DOM (no iframe, so
|
|
9
|
+
Tailwind/CSS just works).
|
|
10
|
+
|
|
11
|
+
Like `@atlas/js`'s web binding, the session lives in an **HttpOnly cookie** the
|
|
12
|
+
browser sends automatically; the short-lived JWT is held only in memory for the
|
|
13
|
+
life of the tab. Nothing is written to `localStorage`.
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
npm install @atlas/vue
|
|
19
|
+
# peer you already have in a Vue 3 app:
|
|
20
|
+
# vue >= 3.3
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Plugin
|
|
24
|
+
|
|
25
|
+
Install the plugin once, at app creation. It boots the session, completes any
|
|
26
|
+
OAuth/hosted-page redirect, schedules proactive token refresh, and paints your
|
|
27
|
+
appearance tokens onto the document root as CSS variables.
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import { createApp } from 'vue';
|
|
31
|
+
import { createAtlas } from '@atlas/vue';
|
|
32
|
+
import App from './App.vue';
|
|
33
|
+
|
|
34
|
+
createApp(App)
|
|
35
|
+
.use(
|
|
36
|
+
createAtlas({
|
|
37
|
+
publishableKey: 'pk_live_…',
|
|
38
|
+
// frontendApi: 'https://your-instance.atlas.dev', // optional FAPI origin
|
|
39
|
+
// appearance: { baseTheme: 'dark', elements: { formButtonPrimary: 'rounded-xl' } },
|
|
40
|
+
// localization: myCatalog,
|
|
41
|
+
}),
|
|
42
|
+
)
|
|
43
|
+
.mount('#app');
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Composables
|
|
47
|
+
|
|
48
|
+
Every composable returns `isLoaded` alongside its data so you can tell "still
|
|
49
|
+
booting" from "signed out" and avoid a flash of the sign-in form. Returned
|
|
50
|
+
state is reactive (`Ref` / `computed`).
|
|
51
|
+
|
|
52
|
+
```vue
|
|
53
|
+
<script setup lang="ts">
|
|
54
|
+
import { useUser, useAuth, useSession, useOrganization } from '@atlas/vue';
|
|
55
|
+
|
|
56
|
+
const { isLoaded, isSignedIn, user } = useUser();
|
|
57
|
+
const { userId, orgRole, getToken, signOut, has } = useAuth();
|
|
58
|
+
const { session } = useSession();
|
|
59
|
+
const { organization, memberships, setActive } = useOrganization();
|
|
60
|
+
|
|
61
|
+
async function callApi() {
|
|
62
|
+
const token = await getToken(); // always fresh; refreshes if near expiry
|
|
63
|
+
// fetch('/api', { headers: { Authorization: `Bearer ${token}` } })
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// A live token at a connected social provider (Google, GitHub, …):
|
|
67
|
+
const { getProviderToken } = useUser();
|
|
68
|
+
async function callGoogle() {
|
|
69
|
+
const token = await getProviderToken('google'); // null if no linked account
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// `has()` mirrors <Protect>, for logic that is not a render decision:
|
|
73
|
+
const canManage = has({ permission: 'org:billing:manage' });
|
|
74
|
+
</script>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
| Composable | React peer |
|
|
78
|
+
| ------------------- | ----------------- |
|
|
79
|
+
| `useAtlas()` | `useAtlas()` |
|
|
80
|
+
| `useUser()` | `useUser()` |
|
|
81
|
+
| `useSession()` | `useSession()` |
|
|
82
|
+
| `useAuth()` | `useAuth()` |
|
|
83
|
+
| `useOrganization()` | `useOrganization()` |
|
|
84
|
+
| `useSignIn()` | internal `useFlow` |
|
|
85
|
+
| `useSignUp()` | internal `useFlow` |
|
|
86
|
+
|
|
87
|
+
## Components
|
|
88
|
+
|
|
89
|
+
Drop-in components for the common flows. `<SignIn>` and `<SignUp>` are full
|
|
90
|
+
multi-step flows driven entirely by the server-side attempt status — the client
|
|
91
|
+
never decides what step comes next.
|
|
92
|
+
|
|
93
|
+
```vue
|
|
94
|
+
<script setup lang="ts">
|
|
95
|
+
import {
|
|
96
|
+
SignedIn,
|
|
97
|
+
SignedOut,
|
|
98
|
+
Protect,
|
|
99
|
+
SignIn,
|
|
100
|
+
UserButton,
|
|
101
|
+
} from '@atlas/vue';
|
|
102
|
+
</script>
|
|
103
|
+
|
|
104
|
+
<template>
|
|
105
|
+
<SignedOut>
|
|
106
|
+
<SignIn />
|
|
107
|
+
</SignedOut>
|
|
108
|
+
|
|
109
|
+
<SignedIn>
|
|
110
|
+
<UserButton />
|
|
111
|
+
<Protect permission="org:billing:manage">
|
|
112
|
+
<button>Manage billing</button>
|
|
113
|
+
<template #fallback>
|
|
114
|
+
<p>You don't have access.</p>
|
|
115
|
+
</template>
|
|
116
|
+
</Protect>
|
|
117
|
+
</SignedIn>
|
|
118
|
+
</template>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
| Component | React peer |
|
|
122
|
+
| ----------------------- | ----------------------- |
|
|
123
|
+
| `<SignedIn>` | `<SignedIn>` |
|
|
124
|
+
| `<SignedOut>` | `<SignedOut>` |
|
|
125
|
+
| `<AtlasLoading>` | `<AtlasLoading>` |
|
|
126
|
+
| `<AtlasLoaded>` | `<AtlasLoaded>` |
|
|
127
|
+
| `<Protect>` | `<Protect>` |
|
|
128
|
+
| `<SignIn>` | `<SignIn>` |
|
|
129
|
+
| `<SignUp>` | `<SignUp>` |
|
|
130
|
+
| `<UserButton>` | `<UserButton>` |
|
|
131
|
+
| `<UserProfile>` | `<UserProfile>` |
|
|
132
|
+
| `<OrganizationSwitcher>`| `<OrganizationSwitcher>`|
|
|
133
|
+
| `<OrganizationProfile>` | `<OrganizationProfile>` |
|
|
134
|
+
|
|
135
|
+
`<Protect>` is a **rendering** helper, never an authorization boundary. It
|
|
136
|
+
decides what a user *sees*; the server checking the same permission on the
|
|
137
|
+
request is what actually stops them acting.
|
|
138
|
+
|
|
139
|
+
## Theming
|
|
140
|
+
|
|
141
|
+
The `appearance` option mirrors `@atlas/react`: design tokens (`variables`),
|
|
142
|
+
per-element class overrides (`elements`), and prebuilt `baseTheme`s (`default`,
|
|
143
|
+
`dark`, `neobrutalist`). Overrides are **appended** to our base classes, so a
|
|
144
|
+
Tailwind class you add makes a rounder button — not an unstyled one.
|
|
145
|
+
|
|
146
|
+
## Localization
|
|
147
|
+
|
|
148
|
+
Every string passes through an i18n catalog. `en-US` ships; pass a partial
|
|
149
|
+
`localization` catalog and it merges over `en-US`, so an untranslated key still
|
|
150
|
+
renders.
|
|
151
|
+
|
|
152
|
+
## Testing
|
|
153
|
+
|
|
154
|
+
```sh
|
|
155
|
+
pnpm --filter @atlas/vue test # vitest + @vue/test-utils (happy-dom)
|
|
156
|
+
pnpm --filter @atlas/vue typecheck # tsc --noEmit
|
|
157
|
+
pnpm --filter @atlas/vue build # tsc -> dist
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## License
|
|
161
|
+
|
|
162
|
+
MIT — see [LICENSE](./LICENSE).
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* §10.3 theming.
|
|
3
|
+
*
|
|
4
|
+
* "appearance prop: design tokens (colors, radius, font, spacing) + per-element
|
|
5
|
+
* class overrides (elements: { formButtonPrimary: "…" }). No iframe — components
|
|
6
|
+
* render in the host DOM so Tailwind/CSS just works."
|
|
7
|
+
*
|
|
8
|
+
* Rendering in the host DOM is the decision everything else follows from. An
|
|
9
|
+
* iframe would isolate styles perfectly and be unusable: it cannot be sized to
|
|
10
|
+
* its content reliably, it breaks password managers, it breaks autofill, and a
|
|
11
|
+
* Tailwind class the customer writes has no effect inside it. Sharing the DOM
|
|
12
|
+
* means the customer's CSS reaches our markup, which is exactly what they want
|
|
13
|
+
* and what makes an override system necessary rather than decorative.
|
|
14
|
+
*
|
|
15
|
+
* Element classes are APPENDED to ours, never replacing them. A customer adding
|
|
16
|
+
* `className="rounded-xl"` wants a rounder button, not an unstyled one — and
|
|
17
|
+
* replacement is a support burden where every override starts by rebuilding the
|
|
18
|
+
* component's base styles from scratch.
|
|
19
|
+
*/
|
|
20
|
+
export interface DesignTokens {
|
|
21
|
+
colorPrimary?: string;
|
|
22
|
+
colorText?: string;
|
|
23
|
+
colorBackground?: string;
|
|
24
|
+
colorDanger?: string;
|
|
25
|
+
colorBorder?: string;
|
|
26
|
+
borderRadius?: string;
|
|
27
|
+
fontFamily?: string;
|
|
28
|
+
spacingUnit?: string;
|
|
29
|
+
}
|
|
30
|
+
/** Every element a customer may target. Named for what it IS, not where it sits. */
|
|
31
|
+
export type ElementKey = 'root' | 'card' | 'headerTitle' | 'headerSubtitle' | 'formField' | 'formFieldLabel' | 'formFieldInput' | 'formFieldError' | 'formButtonPrimary' | 'formButtonSecondary' | 'socialButton' | 'dividerText' | 'footerAction' | 'avatar' | 'menu' | 'menuItem' | 'badge';
|
|
32
|
+
export interface Appearance {
|
|
33
|
+
/** A prebuilt theme to start from. */
|
|
34
|
+
baseTheme?: keyof typeof THEMES;
|
|
35
|
+
variables?: DesignTokens;
|
|
36
|
+
elements?: Partial<Record<ElementKey, string>>;
|
|
37
|
+
}
|
|
38
|
+
export declare const DEFAULT_TOKENS: Required<DesignTokens>;
|
|
39
|
+
/**
|
|
40
|
+
* §10.3: "prebuilt themes shipped (default, dark, neobrutalist as a demo of the
|
|
41
|
+
* override system)". Neobrutalist exists to prove the token set is expressive
|
|
42
|
+
* enough for a theme that looks nothing like the default — a theming system
|
|
43
|
+
* that only produces tasteful variations of itself is not a theming system.
|
|
44
|
+
*/
|
|
45
|
+
export declare const THEMES: {
|
|
46
|
+
readonly default: Required<DesignTokens>;
|
|
47
|
+
readonly dark: {
|
|
48
|
+
readonly colorText: "#e6e9ef";
|
|
49
|
+
readonly colorBackground: "#14171c";
|
|
50
|
+
readonly colorBorder: "#242932";
|
|
51
|
+
readonly colorPrimary: "#6ea8fe";
|
|
52
|
+
readonly colorDanger: string;
|
|
53
|
+
readonly borderRadius: string;
|
|
54
|
+
readonly fontFamily: string;
|
|
55
|
+
readonly spacingUnit: string;
|
|
56
|
+
};
|
|
57
|
+
readonly neobrutalist: {
|
|
58
|
+
readonly colorPrimary: "#ffe600";
|
|
59
|
+
readonly colorText: "#000000";
|
|
60
|
+
readonly colorBackground: "#ffffff";
|
|
61
|
+
readonly colorBorder: "#000000";
|
|
62
|
+
readonly borderRadius: "0px";
|
|
63
|
+
readonly fontFamily: "\"Courier New\", ui-monospace, monospace";
|
|
64
|
+
readonly colorDanger: string;
|
|
65
|
+
readonly spacingUnit: string;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Resolve tokens: defaults, then the base theme, then explicit variables.
|
|
70
|
+
*
|
|
71
|
+
* Later wins, and `undefined` never overwrites. A customer setting one variable
|
|
72
|
+
* on the dark theme expects the other eleven to stay dark, not silently revert
|
|
73
|
+
* to the light defaults.
|
|
74
|
+
*/
|
|
75
|
+
export declare function resolveTokens(appearance?: Appearance): Required<DesignTokens>;
|
|
76
|
+
/** Tokens as CSS custom properties, for the host DOM to inherit. */
|
|
77
|
+
export declare function cssVariables(tokens: Required<DesignTokens>): Record<string, string>;
|
|
78
|
+
/**
|
|
79
|
+
* Combine our base class with the customer's override.
|
|
80
|
+
*
|
|
81
|
+
* Appended, never replaced — a customer adding `rounded-xl` wants a rounder
|
|
82
|
+
* button, not an unstyled one. Theirs comes last so it wins on equal
|
|
83
|
+
* specificity, which is the behaviour anyone writing Tailwind expects.
|
|
84
|
+
*/
|
|
85
|
+
export declare function classFor(element: ElementKey, appearance: Appearance | undefined, base: string): string;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* §10.3 theming.
|
|
4
|
+
*
|
|
5
|
+
* "appearance prop: design tokens (colors, radius, font, spacing) + per-element
|
|
6
|
+
* class overrides (elements: { formButtonPrimary: "…" }). No iframe — components
|
|
7
|
+
* render in the host DOM so Tailwind/CSS just works."
|
|
8
|
+
*
|
|
9
|
+
* Rendering in the host DOM is the decision everything else follows from. An
|
|
10
|
+
* iframe would isolate styles perfectly and be unusable: it cannot be sized to
|
|
11
|
+
* its content reliably, it breaks password managers, it breaks autofill, and a
|
|
12
|
+
* Tailwind class the customer writes has no effect inside it. Sharing the DOM
|
|
13
|
+
* means the customer's CSS reaches our markup, which is exactly what they want
|
|
14
|
+
* and what makes an override system necessary rather than decorative.
|
|
15
|
+
*
|
|
16
|
+
* Element classes are APPENDED to ours, never replacing them. A customer adding
|
|
17
|
+
* `className="rounded-xl"` wants a rounder button, not an unstyled one — and
|
|
18
|
+
* replacement is a support burden where every override starts by rebuilding the
|
|
19
|
+
* component's base styles from scratch.
|
|
20
|
+
*/
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.THEMES = exports.DEFAULT_TOKENS = void 0;
|
|
23
|
+
exports.resolveTokens = resolveTokens;
|
|
24
|
+
exports.cssVariables = cssVariables;
|
|
25
|
+
exports.classFor = classFor;
|
|
26
|
+
exports.DEFAULT_TOKENS = {
|
|
27
|
+
colorPrimary: '#5b5bd6',
|
|
28
|
+
colorText: '#1c1c1f',
|
|
29
|
+
colorBackground: '#ffffff',
|
|
30
|
+
colorDanger: '#d64545',
|
|
31
|
+
colorBorder: '#e4e4e9',
|
|
32
|
+
borderRadius: '8px',
|
|
33
|
+
fontFamily: 'ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif',
|
|
34
|
+
spacingUnit: '4px',
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* §10.3: "prebuilt themes shipped (default, dark, neobrutalist as a demo of the
|
|
38
|
+
* override system)". Neobrutalist exists to prove the token set is expressive
|
|
39
|
+
* enough for a theme that looks nothing like the default — a theming system
|
|
40
|
+
* that only produces tasteful variations of itself is not a theming system.
|
|
41
|
+
*/
|
|
42
|
+
exports.THEMES = {
|
|
43
|
+
default: exports.DEFAULT_TOKENS,
|
|
44
|
+
dark: {
|
|
45
|
+
...exports.DEFAULT_TOKENS,
|
|
46
|
+
colorText: '#e6e9ef',
|
|
47
|
+
colorBackground: '#14171c',
|
|
48
|
+
colorBorder: '#242932',
|
|
49
|
+
colorPrimary: '#6ea8fe',
|
|
50
|
+
},
|
|
51
|
+
neobrutalist: {
|
|
52
|
+
...exports.DEFAULT_TOKENS,
|
|
53
|
+
colorPrimary: '#ffe600',
|
|
54
|
+
colorText: '#000000',
|
|
55
|
+
colorBackground: '#ffffff',
|
|
56
|
+
colorBorder: '#000000',
|
|
57
|
+
borderRadius: '0px',
|
|
58
|
+
fontFamily: '"Courier New", ui-monospace, monospace',
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Resolve tokens: defaults, then the base theme, then explicit variables.
|
|
63
|
+
*
|
|
64
|
+
* Later wins, and `undefined` never overwrites. A customer setting one variable
|
|
65
|
+
* on the dark theme expects the other eleven to stay dark, not silently revert
|
|
66
|
+
* to the light defaults.
|
|
67
|
+
*/
|
|
68
|
+
function resolveTokens(appearance) {
|
|
69
|
+
const base = appearance?.baseTheme ? exports.THEMES[appearance.baseTheme] : exports.DEFAULT_TOKENS;
|
|
70
|
+
const overrides = appearance?.variables ?? {};
|
|
71
|
+
const resolved = { ...exports.DEFAULT_TOKENS, ...base };
|
|
72
|
+
for (const [key, value] of Object.entries(overrides)) {
|
|
73
|
+
if (value !== undefined)
|
|
74
|
+
resolved[key] = value;
|
|
75
|
+
}
|
|
76
|
+
return resolved;
|
|
77
|
+
}
|
|
78
|
+
/** Tokens as CSS custom properties, for the host DOM to inherit. */
|
|
79
|
+
function cssVariables(tokens) {
|
|
80
|
+
const vars = {};
|
|
81
|
+
for (const [key, value] of Object.entries(tokens)) {
|
|
82
|
+
// camelCase → --atlas-kebab-case, which is what a customer writes in CSS.
|
|
83
|
+
vars[`--atlas-${key.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`)}`] = value;
|
|
84
|
+
}
|
|
85
|
+
return vars;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Combine our base class with the customer's override.
|
|
89
|
+
*
|
|
90
|
+
* Appended, never replaced — a customer adding `rounded-xl` wants a rounder
|
|
91
|
+
* button, not an unstyled one. Theirs comes last so it wins on equal
|
|
92
|
+
* specificity, which is the behaviour anyone writing Tailwind expects.
|
|
93
|
+
*/
|
|
94
|
+
function classFor(element, appearance, base) {
|
|
95
|
+
const override = appearance?.elements?.[element];
|
|
96
|
+
return override ? `${base} ${override}` : base;
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=appearance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appearance.js","sourceRoot":"","sources":["../src/appearance.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;;;AAoFH,sCASC;AAGD,oCAOC;AASD,4BAOC;AA/EY,QAAA,cAAc,GAA2B;IACpD,YAAY,EAAE,SAAS;IACvB,SAAS,EAAE,SAAS;IACpB,eAAe,EAAE,SAAS;IAC1B,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,SAAS;IACtB,YAAY,EAAE,KAAK;IACnB,UAAU,EAAE,iEAAiE;IAC7E,WAAW,EAAE,KAAK;CACnB,CAAC;AAEF;;;;;GAKG;AACU,QAAA,MAAM,GAAG;IACpB,OAAO,EAAE,sBAAc;IACvB,IAAI,EAAE;QACJ,GAAG,sBAAc;QACjB,SAAS,EAAE,SAAS;QACpB,eAAe,EAAE,SAAS;QAC1B,WAAW,EAAE,SAAS;QACtB,YAAY,EAAE,SAAS;KACxB;IACD,YAAY,EAAE;QACZ,GAAG,sBAAc;QACjB,YAAY,EAAE,SAAS;QACvB,SAAS,EAAE,SAAS;QACpB,eAAe,EAAE,SAAS;QAC1B,WAAW,EAAE,SAAS;QACtB,YAAY,EAAE,KAAK;QACnB,UAAU,EAAE,wCAAwC;KACrD;CACwD,CAAC;AAE5D;;;;;;GAMG;AACH,SAAgB,aAAa,CAAC,UAAuB;IACnD,MAAM,IAAI,GAAG,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC,cAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,sBAAc,CAAC;IACnF,MAAM,SAAS,GAAG,UAAU,EAAE,SAAS,IAAI,EAAE,CAAC;IAE9C,MAAM,QAAQ,GAAG,EAAE,GAAG,sBAAc,EAAE,GAAG,IAAI,EAAE,CAAC;IAChD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;QACrD,IAAI,KAAK,KAAK,SAAS;YAAE,QAAQ,CAAC,GAAyB,CAAC,GAAG,KAAK,CAAC;IACvE,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,oEAAoE;AACpE,SAAgB,YAAY,CAAC,MAA8B;IACzD,MAAM,IAAI,GAA2B,EAAE,CAAC;IACxC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAClD,0EAA0E;QAC1E,IAAI,CAAC,WAAW,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC;IACjF,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,QAAQ,CACtB,OAAmB,EACnB,UAAkC,EAClC,IAAY;IAEZ,MAAM,QAAQ,GAAG,UAAU,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC;IACjD,OAAO,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { type PropType, type VNode } from 'vue';
|
|
2
|
+
export declare const SignedIn: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}>[] | null | undefined, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
5
|
+
export declare const SignedOut: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}>[] | null | undefined, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
/** §10.2: render children only while the SDK is still loading. */
|
|
9
|
+
export declare const AtlasLoading: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}>[] | null | undefined, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
12
|
+
/**
|
|
13
|
+
* §10.2: render children only once the SDK has finished loading — the symmetric
|
|
14
|
+
* partner of {@link AtlasLoading}, so a consumer can show a spinner and its
|
|
15
|
+
* resolved content without hand-rolling the inverse condition.
|
|
16
|
+
*/
|
|
17
|
+
export declare const AtlasLoaded: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}>[] | null | undefined, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
20
|
+
/**
|
|
21
|
+
* §10.2 `<Protect permission="…">`.
|
|
22
|
+
*
|
|
23
|
+
* A rendering helper, never an authorization boundary — anyone can flip the
|
|
24
|
+
* condition in devtools. The server checking the same permission is what
|
|
25
|
+
* actually stops them, and this component's job is only to avoid showing a
|
|
26
|
+
* button that would fail. Renders the `#fallback` slot when the condition is not
|
|
27
|
+
* met, mirroring React's `fallback` prop.
|
|
28
|
+
*/
|
|
29
|
+
export declare const Protect: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
30
|
+
permission: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
default: undefined;
|
|
33
|
+
};
|
|
34
|
+
role: {
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
default: undefined;
|
|
37
|
+
};
|
|
38
|
+
anyPermission: {
|
|
39
|
+
type: PropType<readonly string[]>;
|
|
40
|
+
default: undefined;
|
|
41
|
+
};
|
|
42
|
+
allPermissions: {
|
|
43
|
+
type: PropType<readonly string[]>;
|
|
44
|
+
default: undefined;
|
|
45
|
+
};
|
|
46
|
+
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
47
|
+
[key: string]: any;
|
|
48
|
+
}>[] | null | undefined, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
49
|
+
permission: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
default: undefined;
|
|
52
|
+
};
|
|
53
|
+
role: {
|
|
54
|
+
type: StringConstructor;
|
|
55
|
+
default: undefined;
|
|
56
|
+
};
|
|
57
|
+
anyPermission: {
|
|
58
|
+
type: PropType<readonly string[]>;
|
|
59
|
+
default: undefined;
|
|
60
|
+
};
|
|
61
|
+
allPermissions: {
|
|
62
|
+
type: PropType<readonly string[]>;
|
|
63
|
+
default: undefined;
|
|
64
|
+
};
|
|
65
|
+
}>> & Readonly<{}>, {
|
|
66
|
+
permission: string;
|
|
67
|
+
role: string;
|
|
68
|
+
anyPermission: readonly string[];
|
|
69
|
+
allPermissions: readonly string[];
|
|
70
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
71
|
+
export declare const SignIn: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
72
|
+
/** Where to send the user once the flow completes. */
|
|
73
|
+
afterUrl: {
|
|
74
|
+
type: StringConstructor;
|
|
75
|
+
default: undefined;
|
|
76
|
+
};
|
|
77
|
+
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
78
|
+
[key: string]: any;
|
|
79
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
80
|
+
/** Where to send the user once the flow completes. */
|
|
81
|
+
afterUrl: {
|
|
82
|
+
type: StringConstructor;
|
|
83
|
+
default: undefined;
|
|
84
|
+
};
|
|
85
|
+
}>> & Readonly<{}>, {
|
|
86
|
+
afterUrl: string;
|
|
87
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
88
|
+
export declare const SignUp: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
89
|
+
afterUrl: {
|
|
90
|
+
type: StringConstructor;
|
|
91
|
+
default: undefined;
|
|
92
|
+
};
|
|
93
|
+
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
94
|
+
[key: string]: any;
|
|
95
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
96
|
+
afterUrl: {
|
|
97
|
+
type: StringConstructor;
|
|
98
|
+
default: undefined;
|
|
99
|
+
};
|
|
100
|
+
}>> & Readonly<{}>, {
|
|
101
|
+
afterUrl: string;
|
|
102
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
103
|
+
export declare const UserButton: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
104
|
+
[key: string]: any;
|
|
105
|
+
}> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
106
|
+
export declare const OrganizationSwitcher: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
107
|
+
[key: string]: any;
|
|
108
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
109
|
+
export declare const UserProfile: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
110
|
+
[key: string]: any;
|
|
111
|
+
}> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
112
|
+
export declare const OrganizationProfile: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
113
|
+
[key: string]: any;
|
|
114
|
+
}> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|