@drawnagency/primitives 0.1.5 → 0.1.7

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.
@@ -1,2 +1,2 @@
1
- export {};
1
+ export declare const schemaCount: number;
2
2
  //# sourceMappingURL=register-schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"register-schemas.d.ts","sourceRoot":"","sources":["../../../src/components/sections/register-schemas.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"register-schemas.d.ts","sourceRoot":"","sources":["../../../src/components/sections/register-schemas.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,WAAW,QAAiB,CAAC"}
@@ -1,2 +1,2 @@
1
- export {};
1
+ export declare const sectionCount: number;
2
2
  //# sourceMappingURL=register.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/components/sections/register.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/components/sections/register.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,YAAY,QAAiB,CAAC"}
@@ -7,7 +7,8 @@ interface Props {
7
7
  };
8
8
  oauthProviders?: ("google" | "github")[];
9
9
  next?: string | null;
10
+ serverError?: string | null;
10
11
  }
11
- export declare function EditorLoginForm({ capabilities, oauthProviders, next }: Props): import("react/jsx-runtime").JSX.Element;
12
+ export declare function EditorLoginForm({ capabilities, oauthProviders, next, serverError }: Props): import("react/jsx-runtime").JSX.Element;
12
13
  export {};
13
14
  //# sourceMappingURL=EditorLoginForm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EditorLoginForm.d.ts","sourceRoot":"","sources":["../../../src/components/shell/EditorLoginForm.tsx"],"names":[],"mappings":"AAKA,UAAU,KAAK;IACb,YAAY,EAAE;QACZ,KAAK,EAAE,OAAO,CAAC;QACf,aAAa,EAAE,OAAO,CAAC;QACvB,YAAY,EAAE,OAAO,CAAC;QACtB,cAAc,EAAE,OAAO,CAAC;KACzB,CAAC;IACF,cAAc,CAAC,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAC;IACzC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,wBAAgB,eAAe,CAAC,EAAE,YAAY,EAAE,cAAmB,EAAE,IAAI,EAAE,EAAE,KAAK,2CAiHjF"}
1
+ {"version":3,"file":"EditorLoginForm.d.ts","sourceRoot":"","sources":["../../../src/components/shell/EditorLoginForm.tsx"],"names":[],"mappings":"AAKA,UAAU,KAAK;IACb,YAAY,EAAE;QACZ,KAAK,EAAE,OAAO,CAAC;QACf,aAAa,EAAE,OAAO,CAAC;QACvB,YAAY,EAAE,OAAO,CAAC;QACtB,cAAc,EAAE,OAAO,CAAC;KACzB,CAAC;IACF,cAAc,CAAC,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAC;IACzC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,wBAAgB,eAAe,CAAC,EAAE,YAAY,EAAE,cAAmB,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,KAAK,2CA+G9F"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drawnagency/primitives",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./package.json": "./package.json",
@@ -11,6 +11,9 @@ import doDontList from "./DoDontList";
11
11
  import doDontImageGrid from "./DoDontMediaGrid";
12
12
  import iconList from "./IconList";
13
13
 
14
- [linkHeading, subHeading, subSubHeading, prose, mediaGrid,
14
+ const allDefs = [linkHeading, subHeading, subSubHeading, prose, mediaGrid,
15
15
  splitContent, button, colors, doDontList, doDontImageGrid, iconList,
16
- ].forEach((def) => registerSchema(def.type, def.schema));
16
+ ];
17
+ allDefs.forEach((def) => registerSchema(def.type, def.schema));
18
+
19
+ export const schemaCount = allDefs.length;
@@ -11,6 +11,9 @@ import doDontList from "./DoDontList";
11
11
  import doDontImageGrid from "./DoDontMediaGrid";
12
12
  import iconList from "./IconList";
13
13
 
14
- [linkHeading, subHeading, subSubHeading, prose, mediaGrid,
14
+ const allDefs = [linkHeading, subHeading, subSubHeading, prose, mediaGrid,
15
15
  splitContent, button, colors, doDontList, doDontImageGrid, iconList,
16
- ].forEach(registerSection);
16
+ ];
17
+ allDefs.forEach(registerSection);
18
+
19
+ export const sectionCount = allDefs.length;
@@ -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 (