@getauthui/core 0.1.3 → 0.1.4

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/README.md CHANGED
@@ -6,11 +6,20 @@
6
6
  **Drop-in authentication for Appwrite. One script tag, every sign-in method, MFA, sessions and account management, running on your own domain.**
7
7
 
8
8
  ```html
9
- <script type="module" src="https://unpkg.com/@getauthui/core"></script>
9
+ <style>
10
+ authui-show:not([ready]) {
11
+ display: none;
12
+ }
13
+ authui-button:not(:defined),
14
+ authui-user-button:not(:defined) {
15
+ visibility: hidden;
16
+ }
17
+ </style>
18
+ <script type="module" src="https://unpkg.com/@getauthui/core@0.1.4"></script>
10
19
 
11
20
  <authui-config
12
21
  endpoint="https://cloud.appwrite.io/v1"
13
- project="my-project"
22
+ project="YOUR_PROJECT_ID"
14
23
  methods="email-password magic-url oauth:google oauth:github"
15
24
  ></authui-config>
16
25
 
@@ -40,16 +49,27 @@ v2 runs inside your page. Its requests to Appwrite are indistinguishable from yo
40
49
  - **Account management**: profile, email and phone verification, password change, active sessions, connected identities, security log, account deletion
41
50
  - **Modal, inline or headless** usage, `<authui-show when="signed-in">` conditionals, React wrappers
42
51
  - **Themeable**: Appwrite Console design system, dark mode that follows your page, CSS custom properties for everything, string overrides
43
- - **Framework agnostic**: standard web components built with Lit, ~75 KB gzipped on the CDN including Lit and the full Appwrite SDK
52
+ - **Framework agnostic**: standard web components built with Lit, ~90 KB gzipped ESM on the CDN (~78 KB IIFE), including Lit and the full Appwrite SDK
44
53
 
45
54
  ## Install
46
55
 
47
56
  CDN:
48
57
 
49
58
  ```html
50
- <script type="module" src="https://unpkg.com/@getauthui/core"></script>
59
+ <style>
60
+ authui-show:not([ready]) {
61
+ display: none;
62
+ }
63
+ authui-button:not(:defined),
64
+ authui-user-button:not(:defined) {
65
+ visibility: hidden;
66
+ }
67
+ </style>
68
+ <script type="module" src="https://unpkg.com/@getauthui/core@0.1.4"></script>
51
69
  ```
52
70
 
71
+ The `<style>` keeps `<authui-show>` and the buttons hidden until the module defines them. See [`<authui-show>`](https://getauthui.appwrite.network/docs/components/show).
72
+
53
73
  npm:
54
74
 
55
75
  ```bash
@@ -61,7 +81,7 @@ import { AuthUI } from "@getauthui/core";
61
81
 
62
82
  AuthUI.init({
63
83
  endpoint: "https://cloud.appwrite.io/v1",
64
- project: "my-project",
84
+ project: "YOUR_PROJECT_ID",
65
85
  methods: { emailPassword: true, magicUrl: true, anonymous: true, oauth: ["google", "github"] },
66
86
  branding: { name: "Acme", theme: "auto" },
67
87
  });
@@ -0,0 +1,4 @@
1
+ /** Persist the active Appwrite team id per project (client-only). */
2
+ export declare function getStoredActiveTeamId(project: string): string | null;
3
+ export declare function setStoredActiveTeamId(project: string, teamId: string | null): void;
4
+ //# sourceMappingURL=active-team.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"active-team.d.ts","sourceRoot":"","sources":["../src/active-team.ts"],"names":[],"mappings":"AAAA,qEAAqE;AAIrE,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOpE;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAQlF"}