@drawnagency/primitives 0.1.4 → 0.1.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drawnagency/primitives",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./package.json": "./package.json",
@@ -26,11 +26,10 @@
26
26
  }
27
27
  },
28
28
  "types": "./dist/index.d.ts",
29
- "files": ["dist", "src"],
30
- "scripts": {
31
- "build": "tsup && rm -f tsconfig.tsbuildinfo && tsc --emitDeclarationOnly",
32
- "dev": "tsup --watch"
33
- },
29
+ "files": [
30
+ "dist",
31
+ "src"
32
+ ],
34
33
  "peerDependencies": {
35
34
  "react": "^19.0.0",
36
35
  "react-dom": "^19.0.0"
@@ -51,5 +50,9 @@
51
50
  "@tiptap/starter-kit": "^3.20.4",
52
51
  "@atlaskit/pragmatic-drag-and-drop": "^1.7.10",
53
52
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0"
53
+ },
54
+ "scripts": {
55
+ "build": "tsup && rm -f tsconfig.tsbuildinfo && tsc --emitDeclarationOnly",
56
+ "dev": "tsup --watch"
54
57
  }
55
- }
58
+ }
@@ -12,12 +12,13 @@ interface Props {
12
12
  };
13
13
  oauthProviders?: ("google" | "github")[];
14
14
  next?: string | null;
15
+ serverError?: string | null;
15
16
  }
16
17
 
17
- export function EditorLoginForm({ capabilities, oauthProviders = [], next }: Props) {
18
+ export function EditorLoginForm({ capabilities, oauthProviders = [], next, serverError }: Props) {
18
19
  const [email, setEmail] = useState("");
19
20
  const [password, setPassword] = useState("");
20
- const [error, setError] = useState<string | null>(null);
21
+ const [error, setError] = useState<string | null>(serverError ?? null);
21
22
  const [loading, setLoading] = useState(false);
22
23
 
23
24
  async function handlePasswordSubmit(e: FormEvent) {
@@ -52,10 +53,8 @@ export function EditorLoginForm({ capabilities, oauthProviders = [], next }: Pro
52
53
  }
53
54
  }
54
55
 
55
- async function handleOAuth(provider: "google" | "github") {
56
- // OAuth is handled client-side via Supabase SDK
57
- // Implementation depends on Supabase adapter (Task 11)
58
- // For now, this is a placeholder that will be wired up later
56
+ function handleOAuth(provider: "google" | "github") {
57
+ window.location.href = `/api/auth/oauth?provider=${provider}`;
59
58
  }
60
59
 
61
60
  return (