@mp-lb/mobile-clerk 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/README.md ADDED
@@ -0,0 +1,17 @@
1
+ # @mp-lb/mobile-clerk
2
+
3
+ Clerk starter screens and diagnostics for MAP Lab Expo apps.
4
+
5
+ This package keeps Clerk-specific code out of `@mp-lb/mobile-kit`. It wraps
6
+ Clerk's native Expo components where possible and exposes small starter
7
+ components that apps can replace later.
8
+
9
+ ## Install
10
+
11
+ ```sh
12
+ npx expo install @clerk/expo expo-secure-store
13
+ npm install @mp-lb/mobile-clerk @mp-lb/mobile-kit
14
+ ```
15
+
16
+ Add the Clerk Expo config plugin in the app's Expo config. Clerk native
17
+ components require a development/native build, not Expo Go.
@@ -0,0 +1,4 @@
1
+ export declare const ClerkAccountScreen: ({ debugHref, }: {
2
+ debugHref?: string;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ //# sourceMappingURL=ClerkAccountScreen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClerkAccountScreen.d.ts","sourceRoot":"","sources":["../../src/account/ClerkAccountScreen.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,kBAAkB,GAAI,gBAEhC;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,4CA8EA,CAAC"}
@@ -0,0 +1,71 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useClerk, useUser } from "@clerk/expo";
3
+ import { StarterButton, useCheckForUpdates } from "@mp-lb/mobile-kit";
4
+ import { useRouter } from "expo-router";
5
+ import { Alert, StyleSheet, Text, View } from "react-native";
6
+ import { ClerkUserButton } from "./ClerkUserButton";
7
+ export const ClerkAccountScreen = ({ debugHref = "/debug", }) => {
8
+ const router = useRouter();
9
+ const { signOut } = useClerk();
10
+ const { user } = useUser();
11
+ const { checkForUpdates, isChecking } = useCheckForUpdates();
12
+ const confirmSignOut = () => {
13
+ Alert.alert("Sign out", "Are you sure you want to sign out?", [
14
+ { text: "Cancel", style: "cancel" },
15
+ { text: "Sign out", style: "destructive", onPress: () => void signOut() },
16
+ ]);
17
+ };
18
+ const checkNow = async () => {
19
+ const result = await checkForUpdates();
20
+ if (result.status === "disabled") {
21
+ Alert.alert("Updates unavailable", "OTA updates are disabled in this build.");
22
+ return;
23
+ }
24
+ if (result.status === "current") {
25
+ Alert.alert("Up to date", "You're running the latest version.");
26
+ return;
27
+ }
28
+ if (result.status === "error") {
29
+ Alert.alert("Update check failed", result.error.message);
30
+ return;
31
+ }
32
+ Alert.alert("Update downloaded", "Restart now to apply it?", [
33
+ { text: "Later", style: "cancel" },
34
+ { text: "Restart", onPress: () => void result.reload() },
35
+ ]);
36
+ };
37
+ return (_jsxs(View, { style: styles.container, children: [_jsxs(View, { style: styles.profile, children: [_jsx(View, { style: styles.userButton, children: _jsx(ClerkUserButton, {}) }), _jsx(Text, { numberOfLines: 1, style: styles.name, children: user?.username ||
38
+ user?.primaryEmailAddress?.emailAddress ||
39
+ "Account" }), user?.username && user.primaryEmailAddress ? (_jsx(Text, { numberOfLines: 1, style: styles.email, children: user.primaryEmailAddress.emailAddress })) : null] }), _jsxs(View, { style: styles.actions, children: [_jsx(StarterButton, { loading: isChecking, onPress: () => void checkNow(), title: "Check for updates", variant: "secondary" }), _jsx(StarterButton, { onPress: () => router.push(debugHref), title: "Debug", variant: "secondary" }), _jsx(StarterButton, { onPress: confirmSignOut, title: "Sign out", variant: "destructive" })] })] }));
40
+ };
41
+ const styles = StyleSheet.create({
42
+ container: {
43
+ backgroundColor: "#ffffff",
44
+ flex: 1,
45
+ padding: 24,
46
+ },
47
+ profile: {
48
+ alignItems: "center",
49
+ gap: 10,
50
+ paddingVertical: 32,
51
+ },
52
+ userButton: {
53
+ borderRadius: 36,
54
+ height: 72,
55
+ overflow: "hidden",
56
+ width: 72,
57
+ },
58
+ name: {
59
+ color: "#111827",
60
+ fontSize: 20,
61
+ fontWeight: "600",
62
+ },
63
+ email: {
64
+ color: "#6b7280",
65
+ fontSize: 14,
66
+ },
67
+ actions: {
68
+ gap: 12,
69
+ },
70
+ });
71
+ //# sourceMappingURL=ClerkAccountScreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClerkAccountScreen.js","sourceRoot":"","sources":["../../src/account/ClerkAccountScreen.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EACjC,SAAS,GAAG,QAAQ,GAGrB,EAAE,EAAE;IACH,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,EAAE,OAAO,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC/B,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC;IAC3B,MAAM,EAAE,eAAe,EAAE,UAAU,EAAE,GAAG,kBAAkB,EAAE,CAAC;IAE7D,MAAM,cAAc,GAAG,GAAG,EAAE;QAC1B,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE,oCAAoC,EAAE;YAC5D,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;YACnC,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,OAAO,EAAE,EAAE;SAC1E,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,MAAM,QAAQ,GAAG,KAAK,IAAI,EAAE;QAC1B,MAAM,MAAM,GA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ourceMappingURL=ClerkUserButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClerkUserButton.d.ts","sourceRoot":"","sources":["../../src/account/ClerkUserButton.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,+CAAuB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { UserButton } from "@clerk/expo/native";
3
+ export const ClerkUserButton = () => _jsx(UserButton, {});
4
+ //# sourceMappingURL=ClerkUserButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClerkUserButton.js","sourceRoot":"","sources":["../../src/account/ClerkUserButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,KAAC,UAAU,KAAG,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const ClerkAuthScreen: ({ appName }: {
2
+ appName?: string;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ //# sourceMappingURL=ClerkAuthScreen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClerkAuthScreen.d.ts","sourceRoot":"","sources":["../../src/auth/ClerkAuthScreen.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe,GAAI,aAAa;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,4CAOhE,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { AuthView } from "@clerk/expo/native";
3
+ import { StyleSheet, Text, View } from "react-native";
4
+ export const ClerkAuthScreen = ({ appName }) => (_jsxs(View, { style: styles.container, children: [appName ? _jsx(Text, { style: styles.title, children: appName }) : null, _jsx(View, { style: styles.authView, children: _jsx(AuthView, {}) })] }));
5
+ const styles = StyleSheet.create({
6
+ container: {
7
+ flex: 1,
8
+ paddingHorizontal: 20,
9
+ paddingTop: 40,
10
+ },
11
+ title: {
12
+ color: "#111827",
13
+ fontSize: 32,
14
+ fontWeight: "700",
15
+ marginBottom: 18,
16
+ },
17
+ authView: {
18
+ flex: 1,
19
+ },
20
+ });
21
+ //# sourceMappingURL=ClerkAuthScreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClerkAuthScreen.js","sourceRoot":"","sources":["../../src/auth/ClerkAuthScreen.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEtD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAE,OAAO,EAAwB,EAAE,EAAE,CAAC,CACpE,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,aAC1B,OAAO,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK,YAAG,OAAO,GAAQ,CAAC,CAAC,CAAC,IAAI,EAC7D,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,QAAQ,YAC1B,KAAC,QAAQ,KAAG,GACP,IACF,CACR,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;QACP,iBAAiB,EAAE,EAAE;QACrB,UAAU,EAAE,EAAE;KACf;IACD,KAAK,EAAE;QACL,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,YAAY,EAAE,EAAE;KACjB;IACD,QAAQ,EAAE;QACR,IAAI,EAAE,CAAC;KACR;CACF,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type ClerkDebugSectionTokenClaims = Record<string, unknown> | null;
2
+ export declare const ClerkDebugSection: () => import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=ClerkDebugSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClerkDebugSection.d.ts","sourceRoot":"","sources":["../../src/debug/ClerkDebugSection.tsx"],"names":[],"mappings":"AAaA,MAAM,MAAM,4BAA4B,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;AAE1E,eAAO,MAAM,iBAAiB,+CAyF7B,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useAuth, useOrganization, useOrganizationList, useUser, } from "@clerk/expo";
3
+ import { decodeJwtPayload, StarterDebugRow, StarterDebugSection, } from "@mp-lb/mobile-kit";
4
+ import { useEffect, useState } from "react";
5
+ export const ClerkDebugSection = () => {
6
+ const { getToken, orgId, orgRole, orgSlug } = useAuth();
7
+ const { organization } = useOrganization();
8
+ const { userMemberships } = useOrganizationList({
9
+ userMemberships: { infinite: true, pageSize: 50 },
10
+ });
11
+ const { user } = useUser();
12
+ const [tokenClaims, setTokenClaims] = useState(null);
13
+ useEffect(() => {
14
+ let isActive = true;
15
+ void getToken({ skipCache: true })
16
+ .then((token) => {
17
+ if (isActive)
18
+ setTokenClaims(decodeJwtPayload(token));
19
+ })
20
+ .catch(() => {
21
+ if (isActive)
22
+ setTokenClaims(null);
23
+ });
24
+ return () => {
25
+ isActive = false;
26
+ };
27
+ }, [getToken, orgId]);
28
+ const orgClaim = tokenClaims?.o;
29
+ const tokenOrgId = orgClaim?.id ?? tokenClaims?.org_id;
30
+ const tokenOrgRole = orgClaim?.rol ?? tokenClaims?.org_role;
31
+ const tokenOrgSlug = orgClaim?.slg ?? tokenClaims?.org_slug;
32
+ return (_jsxs(_Fragment, { children: [_jsxs(StarterDebugSection, { title: "Active organization", children: [_jsx(StarterDebugRow, { label: "orgId", value: orgId ?? null }), _jsx(StarterDebugRow, { label: "orgRole", value: orgRole ?? null }), _jsx(StarterDebugRow, { label: "orgSlug", value: orgSlug ?? null }), _jsx(StarterDebugRow, { label: "organization.name", value: organization?.name }), _jsx(StarterDebugRow, { label: "members", value: organization?.membersCount })] }), _jsxs(StarterDebugSection, { title: "Session token", children: [_jsx(StarterDebugRow, { label: "token org id", value: tokenOrgId ?? null }), _jsx(StarterDebugRow, { label: "token org role", value: tokenOrgRole ?? null }), _jsx(StarterDebugRow, { label: "token org slug", value: tokenOrgSlug ?? null }), _jsx(StarterDebugRow, { label: "role matches Clerk?", value: tokenOrgRole && orgRole
33
+ ? tokenOrgRole === orgRole
34
+ ? "yes"
35
+ : "NO - mismatch"
36
+ : "-" }), _jsx(StarterDebugRow, { label: "raw payload", value: tokenClaims ?? "(decode failed)" })] }), _jsx(StarterDebugSection, { title: "Memberships", children: (userMemberships.data ?? []).map((membership) => (_jsx(StarterDebugRow, { label: membership.organization.slug ?? membership.organization.id, value: membership.organization.id }, membership.id))) }), _jsxs(StarterDebugSection, { title: "User", children: [_jsx(StarterDebugRow, { label: "id", value: user?.id }), _jsx(StarterDebugRow, { label: "username", value: user?.username ?? null }), _jsx(StarterDebugRow, { label: "email", value: user?.primaryEmailAddress?.emailAddress ?? null })] })] }));
37
+ };
38
+ //# sourceMappingURL=ClerkDebugSection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClerkDebugSection.js","sourceRoot":"","sources":["../../src/debug/ClerkDebugSection.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,OAAO,EACP,eAAe,EACf,mBAAmB,EACnB,OAAO,GACR,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAI5C,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACpC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CAAC;IACxD,MAAM,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AAC,YAAY,CAAC,EAAE,IAF5B,UAAU,CAAC,EAAE,CAGlB,CACH,CAAC,GACkB,EACtB,MAAC,mBAAmB,IAAC,KAAK,EAAC,MAAM,aAC/B,KAAC,eAAe,IAAC,KAAK,EAAC,IAAI,EAAC,KAAK,EAAE,IAAI,EAAE,EAAE,GAAI,EAC/C,KAAC,eAAe,IAAC,KAAK,EAAC,UAAU,EAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,IAAI,IAAI,GAAI,EACnE,KAAC,eAAe,IACd,KAAK,EAAC,OAAO,EACb,KAAK,EAAE,IAAI,EAAE,mBAAmB,EAAE,YAAY,IAAI,IAAI,GACtD,IACkB,IACrB,CACJ,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { ClerkAccountScreen } from "./account/ClerkAccountScreen";
2
+ export { ClerkAuthScreen } from "./auth/ClerkAuthScreen";
3
+ export { ClerkDebugSection, type ClerkDebugSectionTokenClaims, } from "./debug/ClerkDebugSection";
4
+ export { ClerkMobileProvider } from "./provider/ClerkMobileProvider";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EACL,iBAAiB,EACjB,KAAK,4BAA4B,GAClC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ export { ClerkAccountScreen } from "./account/ClerkAccountScreen";
2
+ export { ClerkAuthScreen } from "./auth/ClerkAuthScreen";
3
+ export { ClerkDebugSection, } from "./debug/ClerkDebugSection";
4
+ export { ClerkMobileProvider } from "./provider/ClerkMobileProvider";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EACL,iBAAiB,GAElB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { ReactNode } from "react";
2
+ export declare const ClerkMobileProvider: ({ children, publishableKey, }: {
3
+ children: ReactNode;
4
+ publishableKey: string;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ //# sourceMappingURL=ClerkMobileProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClerkMobileProvider.d.ts","sourceRoot":"","sources":["../../src/provider/ClerkMobileProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,eAAO,MAAM,mBAAmB,GAAI,+BAGjC;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;CACxB,4CAIA,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ClerkProvider } from "@clerk/expo";
3
+ import { tokenCache } from "@clerk/expo/token-cache";
4
+ export const ClerkMobileProvider = ({ children, publishableKey, }) => (_jsx(ClerkProvider, { publishableKey: publishableKey, tokenCache: tokenCache, children: children }));
5
+ //# sourceMappingURL=ClerkMobileProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClerkMobileProvider.js","sourceRoot":"","sources":["../../src/provider/ClerkMobileProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAGrD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAClC,QAAQ,EACR,cAAc,GAIf,EAAE,EAAE,CAAC,CACJ,KAAC,aAAa,IAAC,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,YAClE,QAAQ,GACK,CACjB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@mp-lb/mobile-clerk",
3
+ "version": "0.1.0",
4
+ "description": "Clerk starter screens and diagnostics for MAP Lab Expo apps.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/index.js",
12
+ "types": "./dist/index.d.ts"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "package.json",
18
+ "README.md"
19
+ ],
20
+ "keywords": [
21
+ "clerk",
22
+ "expo",
23
+ "react-native",
24
+ "mobile"
25
+ ],
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
29
+ "dependencies": {
30
+ "@mp-lb/mobile-kit": "0.1.0"
31
+ },
32
+ "peerDependencies": {
33
+ "@clerk/expo": ">=3.1",
34
+ "expo-router": ">=5",
35
+ "react": ">=19",
36
+ "react-native": ">=0.73"
37
+ },
38
+ "devDependencies": {
39
+ "@clerk/expo": "^3.3.1",
40
+ "@types/react": "^19.2.14",
41
+ "expo-router": "~56.2.9",
42
+ "react": "^19.2.6",
43
+ "react-native": "0.85.3",
44
+ "typescript": "^6.0.3"
45
+ },
46
+ "scripts": {
47
+ "build": "pnpm --filter @mp-lb/mobile-kit build && tsc --project tsconfig.json",
48
+ "dev": "tsc --project tsconfig.json --watch --preserveWatchOutput",
49
+ "typecheck": "pnpm --filter @mp-lb/mobile-kit build && tsc --project tsconfig.json --noEmit"
50
+ }
51
+ }