@pollinations/ui 0.1.0-alpha.19 → 0.1.0-alpha.21
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/dist/app-user-menu/sdk.d.ts +15 -1
- package/dist/app-user-menu/sdk.js +48 -6
- package/dist/app-user-menu/sdk.js.map +1 -1
- package/dist/auth/index.d.ts +6 -1
- package/dist/auth/index.js +31 -4
- package/dist/auth/index.js.map +1 -1
- package/dist/{chunk-7WXDUAJU.js → chunk-5SPNBGNW.js} +2 -2
- package/dist/{chunk-K2H3JFQK.js → chunk-6JHDHH4B.js} +16 -1
- package/dist/chunk-6JHDHH4B.js.map +1 -0
- package/dist/{chunk-IX6BJNHM.js → chunk-COG4IB62.js} +2 -2
- package/dist/{chunk-QFR7XRUE.js → chunk-DVEIMCTS.js} +2 -2
- package/dist/{chunk-IS4CNKV3.js → chunk-E4CIH2Z7.js} +3 -3
- package/dist/{chunk-5HIGPQ4J.js → chunk-SJK5B7LK.js} +2 -2
- package/dist/connect.js +15 -15
- package/dist/connect.js.map +1 -1
- package/dist/gen/index.js +1 -1
- package/dist/index-cN1wvU_m.d.ts +85 -0
- package/dist/index.browser.min.js +1 -1
- package/dist/index.browser.min.js.map +1 -1
- package/dist/index.d.ts +4 -81
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/markdown.js +3 -3
- package/dist/styles.css +1 -1
- package/dist/wallet/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-K2H3JFQK.js.map +0 -1
- /package/dist/{chunk-7WXDUAJU.js.map → chunk-5SPNBGNW.js.map} +0 -0
- /package/dist/{chunk-IX6BJNHM.js.map → chunk-COG4IB62.js.map} +0 -0
- /package/dist/{chunk-QFR7XRUE.js.map → chunk-DVEIMCTS.js.map} +0 -0
- /package/dist/{chunk-IS4CNKV3.js.map → chunk-E4CIH2Z7.js.map} +0 -0
- /package/dist/{chunk-5HIGPQ4J.js.map → chunk-SJK5B7LK.js.map} +0 -0
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { a as AppIcon, D as DiscordIcon, g as BugIcon } from '../index-cN1wvU_m.js';
|
|
3
|
+
import '../types-CCy9JNu9.js';
|
|
4
|
+
import 'react';
|
|
2
5
|
|
|
3
6
|
type AppUserMenuLabels = {
|
|
4
7
|
authorize: string;
|
|
@@ -7,6 +10,11 @@ type AppUserMenuLabels = {
|
|
|
7
10
|
buyPollen: string;
|
|
8
11
|
logout: string;
|
|
9
12
|
};
|
|
13
|
+
declare const MENU_LINK_ICONS: {
|
|
14
|
+
app: typeof AppIcon;
|
|
15
|
+
discord: typeof DiscordIcon;
|
|
16
|
+
bug: typeof BugIcon;
|
|
17
|
+
};
|
|
10
18
|
type AppUserMenuProps = {
|
|
11
19
|
/** Optional caller-owned dashboard destination for the linked avatar. */
|
|
12
20
|
dashboardHref?: string;
|
|
@@ -15,6 +23,12 @@ type AppUserMenuProps = {
|
|
|
15
23
|
labels?: Partial<AppUserMenuLabels>;
|
|
16
24
|
/** Class for the dropdown panel, which renders in a portal outside the menu. */
|
|
17
25
|
menuClassName?: string;
|
|
26
|
+
menuLinks?: {
|
|
27
|
+
label: string;
|
|
28
|
+
href: string;
|
|
29
|
+
icon?: keyof typeof MENU_LINK_ICONS;
|
|
30
|
+
}[];
|
|
31
|
+
showBuyPollen?: boolean;
|
|
18
32
|
};
|
|
19
33
|
declare const CONNECT_SIZES: {
|
|
20
34
|
md: {
|
|
@@ -26,6 +40,6 @@ declare const CONNECT_SIZES: {
|
|
|
26
40
|
mark: string;
|
|
27
41
|
};
|
|
28
42
|
};
|
|
29
|
-
declare function AppUserMenu({ dashboardHref, connectSize, labels: labelOverrides, menuClassName, }: AppUserMenuProps): react_jsx_runtime.JSX.Element;
|
|
43
|
+
declare function AppUserMenu({ dashboardHref, connectSize, labels: labelOverrides, menuClassName, menuLinks, showBuyPollen, }: AppUserMenuProps): react_jsx_runtime.JSX.Element;
|
|
30
44
|
|
|
31
45
|
export { AppUserMenu, type AppUserMenuLabels, type AppUserMenuProps };
|
|
@@ -2,23 +2,26 @@ import {
|
|
|
2
2
|
AccountMenu,
|
|
3
3
|
BrandMark,
|
|
4
4
|
DropdownItem
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-5SPNBGNW.js";
|
|
6
6
|
import {
|
|
7
7
|
LoginButton
|
|
8
8
|
} from "../chunk-FLQFOTMR.js";
|
|
9
9
|
import "../chunk-DD7MHUFD.js";
|
|
10
10
|
import {
|
|
11
11
|
AccountPollen
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-E4CIH2Z7.js";
|
|
13
13
|
import "../chunk-3VM5R3OI.js";
|
|
14
14
|
import "../chunk-7GDUPN6U.js";
|
|
15
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-COG4IB62.js";
|
|
16
16
|
import {
|
|
17
|
+
AppIcon,
|
|
18
|
+
BugIcon,
|
|
19
|
+
DiscordIcon,
|
|
17
20
|
ExternalLinkIcon,
|
|
18
21
|
KeyIcon,
|
|
19
22
|
PowerIcon,
|
|
20
23
|
WalletIcon
|
|
21
|
-
} from "../chunk-
|
|
24
|
+
} from "../chunk-6JHDHH4B.js";
|
|
22
25
|
import {
|
|
23
26
|
cn
|
|
24
27
|
} from "../chunk-LKUZU37X.js";
|
|
@@ -33,6 +36,11 @@ import {
|
|
|
33
36
|
} from "@pollinations/sdk/react";
|
|
34
37
|
import { useEffect } from "react";
|
|
35
38
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
39
|
+
var MENU_LINK_ICONS = {
|
|
40
|
+
app: AppIcon,
|
|
41
|
+
discord: DiscordIcon,
|
|
42
|
+
bug: BugIcon
|
|
43
|
+
};
|
|
36
44
|
var defaultLabels = {
|
|
37
45
|
authorize: "Pollinations Connect",
|
|
38
46
|
appUserMenu: "App user menu",
|
|
@@ -54,7 +62,9 @@ function AppUserMenu({
|
|
|
54
62
|
dashboardHref,
|
|
55
63
|
connectSize = "md",
|
|
56
64
|
labels: labelOverrides,
|
|
57
|
-
menuClassName
|
|
65
|
+
menuClassName,
|
|
66
|
+
menuLinks = [],
|
|
67
|
+
showBuyPollen = true
|
|
58
68
|
}) {
|
|
59
69
|
const labels = { ...defaultLabels, ...labelOverrides };
|
|
60
70
|
const size = CONNECT_SIZES[connectSize];
|
|
@@ -131,6 +141,38 @@ function AppUserMenu({
|
|
|
131
141
|
menuClassName,
|
|
132
142
|
secondaryContent: pollenSource ? /* @__PURE__ */ jsx(AccountPollen, { source: pollenSource }) : void 0,
|
|
133
143
|
children: (close) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
144
|
+
menuLinks.map(({ label, href, icon }) => {
|
|
145
|
+
const Icon = icon ? MENU_LINK_ICONS[icon] : ExternalLinkIcon;
|
|
146
|
+
return /* @__PURE__ */ jsxs(
|
|
147
|
+
DropdownItem,
|
|
148
|
+
{
|
|
149
|
+
as: "a",
|
|
150
|
+
href,
|
|
151
|
+
target: "_blank",
|
|
152
|
+
rel: "noopener noreferrer",
|
|
153
|
+
onClick: close,
|
|
154
|
+
children: [
|
|
155
|
+
/* @__PURE__ */ jsx(
|
|
156
|
+
Icon,
|
|
157
|
+
{
|
|
158
|
+
className: "polli:h-4 polli:w-4 polli:shrink-0",
|
|
159
|
+
"aria-hidden": "true"
|
|
160
|
+
}
|
|
161
|
+
),
|
|
162
|
+
label,
|
|
163
|
+
/* @__PURE__ */ jsx(
|
|
164
|
+
ExternalLinkIcon,
|
|
165
|
+
{
|
|
166
|
+
className: "polli:ml-auto polli:h-3.5 polli:w-3.5 polli:shrink-0",
|
|
167
|
+
"aria-hidden": "true"
|
|
168
|
+
}
|
|
169
|
+
)
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
href
|
|
173
|
+
);
|
|
174
|
+
}),
|
|
175
|
+
menuLinks.length > 0 && /* @__PURE__ */ jsx("hr", { className: "polli:my-1 polli:border-t polli:border-theme-text-strong/15" }),
|
|
134
176
|
editKeyUrl && /* @__PURE__ */ jsxs(
|
|
135
177
|
DropdownItem,
|
|
136
178
|
{
|
|
@@ -158,7 +200,7 @@ function AppUserMenu({
|
|
|
158
200
|
]
|
|
159
201
|
}
|
|
160
202
|
),
|
|
161
|
-
/* @__PURE__ */ jsxs(
|
|
203
|
+
showBuyPollen && /* @__PURE__ */ jsxs(
|
|
162
204
|
DropdownItem,
|
|
163
205
|
{
|
|
164
206
|
as: "a",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/modules/app-user-menu/AppUserMenu.tsx"],"sourcesContent":["import {\n useAccountBalance,\n useAccountKey,\n useAccountProfile,\n useAuthActions,\n useAuthState,\n} from \"@pollinations/sdk/react\";\nimport { useEffect } from \"react\";\nimport { AccountMenu } from \"../../compositions/AccountMenu.tsx\";\nimport { cn } from \"../../lib/cn.ts\";\nimport { BrandMark } from \"../../primitives/BrandMark.tsx\";\nimport { DropdownItem } from \"../../primitives/DropdownItem.tsx\";\nimport {\n ExternalLinkIcon,\n KeyIcon,\n PowerIcon,\n WalletIcon,\n} from \"../../primitives/icons/index.tsx\";\nimport { LoginButton } from \"../auth/sdk.ts\";\nimport {\n AccountPollen,\n type AccountPollenSource,\n} from \"../wallet/AccountPollen.tsx\";\n\nexport type AppUserMenuLabels = {\n authorize: string;\n appUserMenu: string;\n permissions: string;\n buyPollen: string;\n logout: string;\n};\n\nexport type AppUserMenuProps = {\n /** Optional caller-owned dashboard destination for the linked avatar. */\n dashboardHref?: string;\n /** Larger logged-out action for prominent placements such as a page hero. */\n connectSize?: keyof typeof CONNECT_SIZES;\n labels?: Partial<AppUserMenuLabels>;\n /** Class for the dropdown panel, which renders in a portal outside the menu. */\n menuClassName?: string;\n};\n\nconst defaultLabels: AppUserMenuLabels = {\n authorize: \"Pollinations Connect\",\n appUserMenu: \"App user menu\",\n permissions: \"Permissions\",\n buyPollen: \"Buy Pollen\",\n logout: \"Disconnect\",\n};\n\nconst CONNECT_SIZES = {\n md: {\n button: \"polli:h-10 polli:px-4\",\n mark: \"polli:h-5 polli:w-5\",\n },\n lg: {\n button: \"polli:h-12 polli:px-5 polli:text-base\",\n mark: \"polli:h-6 polli:w-6\",\n },\n};\n\nexport function AppUserMenu({\n dashboardHref,\n connectSize = \"md\",\n labels: labelOverrides,\n menuClassName,\n}: AppUserMenuProps) {\n const labels = { ...defaultLabels, ...labelOverrides };\n const size = CONNECT_SIZES[connectSize];\n const { logout, enterUrl } = useAuthActions();\n const { isLoggedIn } = useAuthState();\n const profile = useAccountProfile({ enabled: isLoggedIn });\n const key = useAccountKey({ enabled: isLoggedIn });\n // The wallet is shown only for an unlimited key that may read it; ask only then.\n const canReadWallet =\n key.data?.pollenBudget === null &&\n (key.data.permissions?.account?.includes(\"usage\") ?? false);\n const balance = useAccountBalance({\n enabled: isLoggedIn && canReadWallet,\n });\n const wallet = balance.data?.accountBalance;\n useEffect(() => {\n if (!isLoggedIn) return;\n const onVisible = () => {\n if (document.visibilityState !== \"visible\") return;\n void key.refresh();\n void balance.refresh();\n };\n document.addEventListener(\"visibilitychange\", onVisible);\n return () =>\n document.removeEventListener(\"visibilitychange\", onVisible);\n }, [isLoggedIn, key.refresh, balance.refresh]);\n const returnUrl =\n typeof window === \"undefined\" ? undefined : window.location.href;\n const topUpUrl = new URL(\"/top-up\", enterUrl);\n if (returnUrl) topUpUrl.searchParams.set(\"redirect\", returnUrl);\n const keyId = key.data?.id;\n let editKeyUrl: URL | undefined;\n if (keyId) {\n editKeyUrl = new URL(\"/edit-key\", enterUrl);\n editKeyUrl.searchParams.set(\"id\", keyId);\n if (returnUrl) editKeyUrl.searchParams.set(\"redirect\", returnUrl);\n }\n let pollenSource: AccountPollenSource | undefined;\n if (key.data && key.data.pollenBudget !== null) {\n pollenSource = {\n type: \"budget\",\n remaining: key.data.pollenBudget,\n generationEnabled: key.data.permissions?.models?.length !== 0,\n };\n } else if (wallet) {\n pollenSource = {\n type: \"wallet\",\n balances: { paid: wallet.paid, quest: wallet.tier },\n };\n } else if (key.data && !canReadWallet) {\n pollenSource = { type: \"budget\", remaining: null };\n }\n\n return (\n <div\n data-theme=\"accent\"\n className=\"polli:flex polli:shrink-0 polli:justify-end\"\n >\n {!isLoggedIn ? (\n <LoginButton\n intent=\"brand\"\n className={cn(\n \"polli:gap-2 polli:py-0 polli:whitespace-nowrap\",\n size.button,\n )}\n >\n <BrandMark className={size.mark} />\n {labels.authorize}\n </LoginButton>\n ) : (\n <AccountMenu\n name={\n profile.data?.name ||\n profile.data?.githubUsername ||\n \"Connected user\"\n }\n avatarUrl={profile.data?.image}\n dashboardHref={\n dashboardHref ?? new URL(\"/pollen\", enterUrl).href\n }\n menuLabel={labels.appUserMenu}\n className=\"polli:max-w-80\"\n menuClassName={menuClassName}\n secondaryContent={\n pollenSource ? (\n <AccountPollen source={pollenSource} />\n ) : undefined\n }\n >\n {(close) => (\n <>\n {editKeyUrl && (\n <DropdownItem\n as=\"a\"\n href={editKeyUrl.href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n onClick={close}\n >\n <KeyIcon\n className=\"polli:h-4 polli:w-4 polli:shrink-0\"\n aria-hidden=\"true\"\n />\n {labels.permissions}\n <ExternalLinkIcon\n className=\"polli:ml-auto polli:h-3.5 polli:w-3.5 polli:shrink-0\"\n aria-hidden=\"true\"\n />\n </DropdownItem>\n )}\n <DropdownItem\n as=\"a\"\n href={topUpUrl.href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n onClick={close}\n >\n <WalletIcon\n className=\"polli:h-4 polli:w-4 polli:shrink-0\"\n aria-hidden=\"true\"\n />\n {labels.buyPollen}\n <ExternalLinkIcon\n className=\"polli:ml-auto polli:h-3.5 polli:w-3.5 polli:shrink-0\"\n aria-hidden=\"true\"\n />\n </DropdownItem>\n <DropdownItem\n type=\"button\"\n className=\"polli:justify-start polli:text-left\"\n onClick={() => {\n close();\n logout();\n }}\n >\n <PowerIcon\n className=\"polli:h-4 polli:w-4 polli:shrink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;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/modules/app-user-menu/AppUserMenu.tsx"],"sourcesContent":["import {\n useAccountBalance,\n useAccountKey,\n useAccountProfile,\n useAuthActions,\n useAuthState,\n} from \"@pollinations/sdk/react\";\nimport { useEffect } from \"react\";\nimport { AccountMenu } from \"../../compositions/AccountMenu.tsx\";\nimport { cn } from \"../../lib/cn.ts\";\nimport { BrandMark } from \"../../primitives/BrandMark.tsx\";\nimport { DropdownItem } from \"../../primitives/DropdownItem.tsx\";\nimport {\n AppIcon,\n BugIcon,\n DiscordIcon,\n ExternalLinkIcon,\n KeyIcon,\n PowerIcon,\n WalletIcon,\n} from \"../../primitives/icons/index.tsx\";\nimport { LoginButton } from \"../auth/sdk.ts\";\nimport {\n AccountPollen,\n type AccountPollenSource,\n} from \"../wallet/AccountPollen.tsx\";\n\nexport type AppUserMenuLabels = {\n authorize: string;\n appUserMenu: string;\n permissions: string;\n buyPollen: string;\n logout: string;\n};\n\nexport const MENU_LINK_ICONS = {\n app: AppIcon,\n discord: DiscordIcon,\n bug: BugIcon,\n};\n\nexport type AppUserMenuProps = {\n /** Optional caller-owned dashboard destination for the linked avatar. */\n dashboardHref?: string;\n /** Larger logged-out action for prominent placements such as a page hero. */\n connectSize?: keyof typeof CONNECT_SIZES;\n labels?: Partial<AppUserMenuLabels>;\n /** Class for the dropdown panel, which renders in a portal outside the menu. */\n menuClassName?: string;\n menuLinks?: {\n label: string;\n href: string;\n icon?: keyof typeof MENU_LINK_ICONS;\n }[];\n showBuyPollen?: boolean;\n};\n\nconst defaultLabels: AppUserMenuLabels = {\n authorize: \"Pollinations Connect\",\n appUserMenu: \"App user menu\",\n permissions: \"Permissions\",\n buyPollen: \"Buy Pollen\",\n logout: \"Disconnect\",\n};\n\nconst CONNECT_SIZES = {\n md: {\n button: \"polli:h-10 polli:px-4\",\n mark: \"polli:h-5 polli:w-5\",\n },\n lg: {\n button: \"polli:h-12 polli:px-5 polli:text-base\",\n mark: \"polli:h-6 polli:w-6\",\n },\n};\n\nexport function AppUserMenu({\n dashboardHref,\n connectSize = \"md\",\n labels: labelOverrides,\n menuClassName,\n menuLinks = [],\n showBuyPollen = true,\n}: AppUserMenuProps) {\n const labels = { ...defaultLabels, ...labelOverrides };\n const size = CONNECT_SIZES[connectSize];\n const { logout, enterUrl } = useAuthActions();\n const { isLoggedIn } = useAuthState();\n const profile = useAccountProfile({ enabled: isLoggedIn });\n const key = useAccountKey({ enabled: isLoggedIn });\n // The wallet is shown only for an unlimited key that may read it; ask only then.\n const canReadWallet =\n key.data?.pollenBudget === null &&\n (key.data.permissions?.account?.includes(\"usage\") ?? false);\n const balance = useAccountBalance({\n enabled: isLoggedIn && canReadWallet,\n });\n const wallet = balance.data?.accountBalance;\n useEffect(() => {\n if (!isLoggedIn) return;\n const onVisible = () => {\n if (document.visibilityState !== \"visible\") return;\n void key.refresh();\n void balance.refresh();\n };\n document.addEventListener(\"visibilitychange\", onVisible);\n return () =>\n document.removeEventListener(\"visibilitychange\", onVisible);\n }, [isLoggedIn, key.refresh, balance.refresh]);\n const returnUrl =\n typeof window === \"undefined\" ? undefined : window.location.href;\n const topUpUrl = new URL(\"/top-up\", enterUrl);\n if (returnUrl) topUpUrl.searchParams.set(\"redirect\", returnUrl);\n const keyId = key.data?.id;\n let editKeyUrl: URL | undefined;\n if (keyId) {\n editKeyUrl = new URL(\"/edit-key\", enterUrl);\n editKeyUrl.searchParams.set(\"id\", keyId);\n if (returnUrl) editKeyUrl.searchParams.set(\"redirect\", returnUrl);\n }\n let pollenSource: AccountPollenSource | undefined;\n if (key.data && key.data.pollenBudget !== null) {\n pollenSource = {\n type: \"budget\",\n remaining: key.data.pollenBudget,\n generationEnabled: key.data.permissions?.models?.length !== 0,\n };\n } else if (wallet) {\n pollenSource = {\n type: \"wallet\",\n balances: { paid: wallet.paid, quest: wallet.tier },\n };\n } else if (key.data && !canReadWallet) {\n pollenSource = { type: \"budget\", remaining: null };\n }\n\n return (\n <div\n data-theme=\"accent\"\n className=\"polli:flex polli:shrink-0 polli:justify-end\"\n >\n {!isLoggedIn ? (\n <LoginButton\n intent=\"brand\"\n className={cn(\n \"polli:gap-2 polli:py-0 polli:whitespace-nowrap\",\n size.button,\n )}\n >\n <BrandMark className={size.mark} />\n {labels.authorize}\n </LoginButton>\n ) : (\n <AccountMenu\n name={\n profile.data?.name ||\n profile.data?.githubUsername ||\n \"Connected user\"\n }\n avatarUrl={profile.data?.image}\n dashboardHref={\n dashboardHref ?? new URL(\"/pollen\", enterUrl).href\n }\n menuLabel={labels.appUserMenu}\n className=\"polli:max-w-80\"\n menuClassName={menuClassName}\n secondaryContent={\n pollenSource ? (\n <AccountPollen source={pollenSource} />\n ) : undefined\n }\n >\n {(close) => (\n <>\n {menuLinks.map(({ label, href, icon }) => {\n const Icon = icon\n ? MENU_LINK_ICONS[icon]\n : ExternalLinkIcon;\n return (\n <DropdownItem\n key={href}\n as=\"a\"\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n onClick={close}\n >\n <Icon\n className=\"polli:h-4 polli:w-4 polli:shrink-0\"\n aria-hidden=\"true\"\n />\n {label}\n <ExternalLinkIcon\n className=\"polli:ml-auto polli:h-3.5 polli:w-3.5 polli:shrink-0\"\n aria-hidden=\"true\"\n />\n </DropdownItem>\n );\n })}\n {menuLinks.length > 0 && (\n <hr className=\"polli:my-1 polli:border-t polli:border-theme-text-strong/15\" />\n )}\n {editKeyUrl && (\n <DropdownItem\n as=\"a\"\n href={editKeyUrl.href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n onClick={close}\n >\n <KeyIcon\n className=\"polli:h-4 polli:w-4 polli:shrink-0\"\n aria-hidden=\"true\"\n />\n {labels.permissions}\n <ExternalLinkIcon\n className=\"polli:ml-auto polli:h-3.5 polli:w-3.5 polli:shrink-0\"\n aria-hidden=\"true\"\n />\n </DropdownItem>\n )}\n {showBuyPollen && (\n <DropdownItem\n as=\"a\"\n href={topUpUrl.href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n onClick={close}\n >\n <WalletIcon\n className=\"polli:h-4 polli:w-4 polli:shrink-0\"\n aria-hidden=\"true\"\n />\n {labels.buyPollen}\n <ExternalLinkIcon\n className=\"polli:ml-auto polli:h-3.5 polli:w-3.5 polli:shrink-0\"\n aria-hidden=\"true\"\n />\n </DropdownItem>\n )}\n <DropdownItem\n type=\"button\"\n className=\"polli:justify-start polli:text-left\"\n onClick={() => {\n close();\n logout();\n }}\n >\n <PowerIcon\n className=\"polli:h-4 polli:w-4 polli:shrink-0\"\n aria-hidden=\"true\"\n />\n {labels.logout}\n </DropdownItem>\n </>\n )}\n </AccountMenu>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,EACI;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACG;AACP,SAAS,iBAAiB;AAuIV,SA+BQ,UAxBJ,KAPJ;AA3GT,IAAM,kBAAkB;AAAA,EAC3B,KAAK;AAAA,EACL,SAAS;AAAA,EACT,KAAK;AACT;AAkBA,IAAM,gBAAmC;AAAA,EACrC,WAAW;AAAA,EACX,aAAa;AAAA,EACb,aAAa;AAAA,EACb,WAAW;AAAA,EACX,QAAQ;AACZ;AAEA,IAAM,gBAAgB;AAAA,EAClB,IAAI;AAAA,IACA,QAAQ;AAAA,IACR,MAAM;AAAA,EACV;AAAA,EACA,IAAI;AAAA,IACA,QAAQ;AAAA,IACR,MAAM;AAAA,EACV;AACJ;AAEO,SAAS,YAAY;AAAA,EACxB;AAAA,EACA,cAAc;AAAA,EACd,QAAQ;AAAA,EACR;AAAA,EACA,YAAY,CAAC;AAAA,EACb,gBAAgB;AACpB,GAAqB;AACjB,QAAM,SAAS,EAAE,GAAG,eAAe,GAAG,eAAe;AACrD,QAAM,OAAO,cAAc,WAAW;AACtC,QAAM,EAAE,QAAQ,SAAS,IAAI,eAAe;AAC5C,QAAM,EAAE,WAAW,IAAI,aAAa;AACpC,QA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;AAAA,gBACG,IAAG;AAAA,gBACH,MAAM,WAAW;AAAA,gBACjB,QAAO;AAAA,gBACP,KAAI;AAAA,gBACJ,SAAS;AAAA,gBAET;AAAA;AAAA,oBAAC;AAAA;AAAA,sBACG,WAAU;AAAA,sBACV,eAAY;AAAA;AAAA,kBAChB;AAAA,kBACC,OAAO;AAAA,kBACR;AAAA,oBAAC;AAAA;AAAA,sBACG,WAAU;AAAA,sBACV,eAAY;AAAA;AAAA,kBAChB;AAAA;AAAA;AAAA,YACJ;AAAA,YAEH,iBACG;AAAA,cAAC;AAAA;AAAA,gBACG,IAAG;AAAA,gBACH,MAAM,SAAS;AAAA,gBACf,QAAO;AAAA,gBACP,KAAI;AAAA,gBACJ,SAAS;AAAA,gBAET;AAAA;AAAA,oBAAC;AAAA;AAAA,sBACG,WAAU;AAAA,sBACV,eAAY;AAAA;AAAA,kBAChB;AAAA,kBACC,OAAO;AAAA,kBACR;AAAA,oBAAC;AAAA;AAAA,sBACG,WAAU;AAAA,sBACV,eAAY;AAAA;AAAA,kBAChB;AAAA;AAAA;AAAA,YACJ;AAAA,YAEJ;AAAA,cAAC;AAAA;AAAA,gBACG,MAAK;AAAA,gBACL,WAAU;AAAA,gBACV,SAAS,MAAM;AACX,wBAAM;AACN,yBAAO;AAAA,gBACX;AAAA,gBAEA;AAAA;AAAA,oBAAC;AAAA;AAAA,sBACG,WAAU;AAAA,sBACV,eAAY;AAAA;AAAA,kBAChB;AAAA,kBACC,OAAO;AAAA;AAAA;AAAA,YACZ;AAAA,aACJ;AAAA;AAAA,MAER;AAAA;AAAA,EAER;AAER;","names":[]}
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -105,10 +105,15 @@ declare function GitHubSignInButton({ isSigningIn, disabled, ...props }: Omit<Bu
|
|
|
105
105
|
isSigningIn?: boolean;
|
|
106
106
|
}): react_jsx_runtime.JSX.Element;
|
|
107
107
|
|
|
108
|
+
/** The Google action uses the same layout as GitHub sign-in. */
|
|
109
|
+
declare function GoogleSignInButton({ isSigningIn, disabled, ...props }: Omit<ButtonProps<"button">, "as" | "children"> & {
|
|
110
|
+
isSigningIn?: boolean;
|
|
111
|
+
}): react_jsx_runtime.JSX.Element;
|
|
112
|
+
|
|
108
113
|
type PollinationsSignInButtonProps = Omit<ButtonProps<"button">, "as"> & {
|
|
109
114
|
isPending?: boolean;
|
|
110
115
|
};
|
|
111
116
|
/** Provider identity button; the app supplies its own sign-in action. */
|
|
112
117
|
declare function PollinationsSignInButton({ className, children, type, isPending, disabled, ...props }: PollinationsSignInButtonProps): react_jsx_runtime.JSX.Element;
|
|
113
118
|
|
|
114
|
-
export { AuthAccessItem, AuthFlowLayout, AuthInfoCard, type AuthInfoCardProps, AuthModal, AuthModalFootnote, AuthModalHeader, type AuthModalHeaderProps, AuthModalLoading, type AuthModalProps, DashboardAccountMenu, DashboardSignIn, ErrorBanner, GitHubSignInButton, PollinationsSignInButton, type PollinationsSignInButtonProps };
|
|
119
|
+
export { AuthAccessItem, AuthFlowLayout, AuthInfoCard, type AuthInfoCardProps, AuthModal, AuthModalFootnote, AuthModalHeader, type AuthModalHeaderProps, AuthModalLoading, type AuthModalProps, DashboardAccountMenu, DashboardSignIn, ErrorBanner, GitHubSignInButton, GoogleSignInButton, PollinationsSignInButton, type PollinationsSignInButtonProps };
|
package/dist/auth/index.js
CHANGED
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
LoadingStatus,
|
|
6
6
|
Surface,
|
|
7
7
|
useColorMode
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-DVEIMCTS.js";
|
|
9
9
|
import {
|
|
10
10
|
AccountMenu,
|
|
11
11
|
BrandMark,
|
|
12
12
|
DropdownItem
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-5SPNBGNW.js";
|
|
14
14
|
import "../chunk-7XDOOFTL.js";
|
|
15
15
|
import "../chunk-DD7MHUFD.js";
|
|
16
16
|
import {
|
|
@@ -22,13 +22,14 @@ import {
|
|
|
22
22
|
} from "../chunk-7GDUPN6U.js";
|
|
23
23
|
import {
|
|
24
24
|
InlineLink
|
|
25
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-COG4IB62.js";
|
|
26
26
|
import {
|
|
27
27
|
CheckIcon,
|
|
28
28
|
GitHubIcon,
|
|
29
|
+
GoogleIcon,
|
|
29
30
|
RefreshIcon,
|
|
30
31
|
SignOutIcon
|
|
31
|
-
} from "../chunk-
|
|
32
|
+
} from "../chunk-6JHDHH4B.js";
|
|
32
33
|
import {
|
|
33
34
|
cn
|
|
34
35
|
} from "../chunk-LKUZU37X.js";
|
|
@@ -447,6 +448,31 @@ function GitHubSignInButton({
|
|
|
447
448
|
}
|
|
448
449
|
);
|
|
449
450
|
}
|
|
451
|
+
|
|
452
|
+
// src/modules/auth/GoogleSignInButton.tsx
|
|
453
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
454
|
+
function GoogleSignInButton({
|
|
455
|
+
isSigningIn = false,
|
|
456
|
+
disabled,
|
|
457
|
+
...props
|
|
458
|
+
}) {
|
|
459
|
+
return /* @__PURE__ */ jsx7(
|
|
460
|
+
ProviderSignInButton,
|
|
461
|
+
{
|
|
462
|
+
...props,
|
|
463
|
+
disabled: disabled || isSigningIn,
|
|
464
|
+
"aria-busy": isSigningIn,
|
|
465
|
+
icon: /* @__PURE__ */ jsx7(
|
|
466
|
+
GoogleIcon,
|
|
467
|
+
{
|
|
468
|
+
"aria-hidden": "true",
|
|
469
|
+
className: "polli:h-5 polli:w-5 polli:shrink-0"
|
|
470
|
+
}
|
|
471
|
+
),
|
|
472
|
+
children: isSigningIn ? "Signing in\u2026" : "Sign in with Google"
|
|
473
|
+
}
|
|
474
|
+
);
|
|
475
|
+
}
|
|
450
476
|
export {
|
|
451
477
|
AuthAccessItem,
|
|
452
478
|
AuthFlowLayout,
|
|
@@ -459,6 +485,7 @@ export {
|
|
|
459
485
|
DashboardSignIn,
|
|
460
486
|
ErrorBanner,
|
|
461
487
|
GitHubSignInButton,
|
|
488
|
+
GoogleSignInButton,
|
|
462
489
|
PollinationsSignInButton
|
|
463
490
|
};
|
|
464
491
|
//# sourceMappingURL=index.js.map
|
package/dist/auth/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/modules/auth/AuthModal.tsx","../../src/modules/auth/DashboardAccountMenu.tsx","../../src/modules/auth/ProviderSignInButton.tsx","../../src/modules/auth/PollinationsSignInButton.tsx","../../src/modules/auth/DashboardSignIn.tsx","../../src/modules/auth/GitHubSignInButton.tsx"],"sourcesContent":["import type { ReactNode, Ref } from \"react\";\nimport { useId } from \"react\";\nimport { Alert } from \"../../compositions/Alert.tsx\";\nimport { cn } from \"../../lib/cn.ts\";\nimport { BrandMark } from \"../../primitives/BrandMark.tsx\";\nimport {\n Dialog,\n DialogBody,\n type DialogProps,\n} from \"../../primitives/Dialog.tsx\";\nimport { InlineLink } from \"../../primitives/InlineLink.tsx\";\nimport { CheckIcon } from \"../../primitives/icons/index.tsx\";\nimport { LoadingStatus } from \"../../primitives/LoadingStatus.tsx\";\nimport { Surface } from \"../../primitives/Surface.tsx\";\nimport { Heading, Text } from \"../../primitives/Typography.tsx\";\n\nexport type AuthModalProps = {\n children: ReactNode;\n size?: DialogProps[\"size\"];\n onClose?: () => void;\n dialog?: {\n label?: string;\n labelledBy?: string;\n };\n};\n\nexport function AuthModal({ children, size, dialog, onClose }: AuthModalProps) {\n return (\n <Dialog\n open\n onOpenChange={(open) => !open && onClose?.()}\n showBackdrop={false}\n ariaLabel={dialog?.label}\n labelledBy={dialog?.labelledBy}\n positionerClassName=\"polli:bg-app-bg\"\n contentClassName=\"polli:overflow-hidden\"\n size={size}\n >\n {children}\n </Dialog>\n );\n}\n\nexport type AuthModalHeaderProps = {\n children?: ReactNode;\n};\n\nexport type AuthFlowLayoutProps = {\n children?: ReactNode;\n /** Screen title; rendered once with the shared recipe and labels the dialog. */\n title?: ReactNode;\n /** The subject of the sentence: the app, the device, the key. Sits between title and description. */\n subject?: ReactNode;\n /** One sentence under the title. */\n description?: ReactNode;\n /** What failed; rendered as the error line under the description. */\n error?: ReactNode;\n titleId?: string;\n headerAction?: ReactNode;\n actions?: ReactNode;\n /** One sentence under the actions; defaults to the legal notice. */\n footnote?: ReactNode;\n dialog?: AuthModalProps[\"dialog\"];\n size?: DialogProps[\"size\"];\n onClose?: () => void;\n};\n\nconst legalFootnote = (\n <>\n By continuing, you agree to the{\" \"}\n <InlineLink\n href=\"https://pollinations.ai/terms\"\n tone=\"quiet\"\n showIcon={false}\n >\n Terms\n </InlineLink>{\" \"}\n and acknowledge the{\" \"}\n <InlineLink\n href=\"https://pollinations.ai/privacy\"\n tone=\"quiet\"\n showIcon={false}\n >\n Privacy Policy\n </InlineLink>\n .\n </>\n);\n\n/** Shared sign-in chrome with stable scrolling content and actions. */\nexport function AuthFlowLayout({\n children,\n title,\n subject,\n description,\n error,\n titleId,\n headerAction,\n actions,\n footnote = legalFootnote,\n dialog,\n // Most auth steps are a title, a line and one action; busy steps opt into more width.\n size = \"sm\",\n onClose,\n}: AuthFlowLayoutProps) {\n const generatedId = useId();\n const headingId = titleId ?? generatedId;\n return (\n <AuthModal\n dialog={dialog ?? (title ? { labelledBy: headingId } : undefined)}\n size={size}\n onClose={onClose}\n >\n <DialogBody\n actions={actions}\n footnote={<AuthModalFootnote>{footnote}</AuthModalFootnote>}\n bodyClassName=\"polli:space-y-0 polli:p-0\"\n >\n <AuthModalHeader>{headerAction}</AuthModalHeader>\n <div className=\"polli:space-y-3 polli:px-(--polli-dialog-gutter) polli:py-4\">\n {title && (\n <div className=\"polli:space-y-3\">\n <Heading as=\"h1\" size=\"section\" id={headingId}>\n {title}\n </Heading>\n {subject}\n {description && (\n // The step instruction: body tone, so it reads as\n // the sentence's second half rather than a caption.\n <Text\n size=\"body\"\n tone=\"base\"\n className=\"polli:text-pretty\"\n >\n {description}\n </Text>\n )}\n {error && <ErrorBanner>{error}</ErrorBanner>}\n </div>\n )}\n {children}\n </div>\n </DialogBody>\n </AuthModal>\n );\n}\n\n/**\n * The quiet line under the actions: legal, dashboard, back or help. Its links\n * use the quiet tone without arrows, and wrapped text splits into even lines.\n */\nexport function AuthModalFootnote({ children }: { children: ReactNode }) {\n return (\n <Text\n size=\"xs\"\n tone=\"muted\"\n className=\"polli:shrink-0 polli:px-(--polli-dialog-gutter) polli:pb-5 polli:text-center polli:text-[13px] polli:text-balance\"\n >\n {children}\n </Text>\n );\n}\n\nexport function AuthModalHeader({ children }: AuthModalHeaderProps) {\n const logo = (\n <a\n href=\"https://pollinations.ai\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"polli:block polli:shrink-0 polli:text-theme-text-muted polli:transition-colors polli:hover:text-theme-text-strong polli:focus-visible:outline-2 polli:focus-visible:outline-offset-4\"\n aria-label=\"pollinations.ai\"\n >\n <span className=\"polli:sr-only\">pollinations.ai</span>\n <BrandMark className=\"polli:h-8 polli:w-8\" />\n </a>\n );\n return (\n <div className=\"polli:shrink-0 polli:px-(--polli-dialog-gutter) polli:pt-4 polli:pb-4 polli:sm:pt-6\">\n <div className=\"polli:flex polli:min-h-10 polli:items-start polli:justify-between polli:gap-3\">\n {logo}\n {children}\n </div>\n </div>\n );\n}\n\n/** Titled loading screen so the frame never shows an empty body. */\nexport function AuthModalLoading({\n title,\n subject,\n message = \"Loading…\",\n}: {\n title: string;\n subject?: ReactNode;\n message?: string;\n}) {\n return (\n <AuthFlowLayout title={title} subject={subject}>\n {/* Centred with room around it, so a short wait reads as one. */}\n <div className=\"polli:flex polli:justify-center polli:py-10\">\n <LoadingStatus>{message}</LoadingStatus>\n </div>\n </AuthFlowLayout>\n );\n}\n\nexport function ErrorBanner({ children }: { children: ReactNode }) {\n return <Alert intent=\"danger\">{children}</Alert>;\n}\n\nexport type AuthInfoCardProps = {\n title?: ReactNode;\n children: ReactNode;\n};\n\nexport function AuthInfoCard({ title, children }: AuthInfoCardProps) {\n return (\n <Surface className=\"polli:space-y-3 polli:font-body\">\n {title != null && (\n <p className=\"polli:flex polli:items-center polli:font-body polli:text-xs polli:font-medium polli:leading-5 polli:text-theme-text-muted\">\n {title}\n </p>\n )}\n {children}\n </Surface>\n );\n}\n\n/**\n * A consent row with expandable details. With `onChange` it carries a\n * checkbox; a required row passes an `icon` instead, which takes the\n * checkbox slot so the rows line up.\n */\nexport function AuthAccessItem({\n children,\n control,\n details,\n info,\n icon,\n checked = false,\n onChange,\n ariaLabel,\n disabled = false,\n inputRef,\n rowClassName,\n}: {\n children: ReactNode;\n control?: ReactNode;\n details?: ReactNode;\n /** Help beside the row, outside its checkbox label. */\n info?: ReactNode;\n /** Rendered instead of the checkbox; the row is then always granted. */\n icon?: ReactNode;\n checked?: boolean;\n onChange?: (checked: boolean) => void;\n ariaLabel?: string;\n disabled?: boolean;\n inputRef?: Ref<HTMLInputElement>;\n rowClassName?: string;\n}) {\n const inputId = useId();\n // A required row has no input to label.\n const Row = icon != null || info != null ? \"div\" : \"label\";\n const CheckboxLabel = info != null ? \"label\" : \"span\";\n const Label = icon == null && info != null ? \"label\" : \"span\";\n return (\n <li>\n <Row\n className={cn(\n \"polli:flex polli:min-h-8 polli:items-center polli:font-body polli:text-sm polli:font-semibold polli:leading-5\",\n info != null && icon == null\n ? \"polli:gap-0\"\n : \"polli:gap-3\",\n info != null && \"polli:min-w-0\",\n onChange &&\n Row === \"label\" &&\n (disabled\n ? \"polli:cursor-not-allowed\"\n : \"polli:cursor-pointer\"),\n rowClassName,\n )}\n >\n {icon != null ? (\n <span\n aria-hidden=\"true\"\n className=\"polli:flex polli:h-5 polli:w-5 polli:shrink-0 polli:items-center polli:justify-center polli:text-theme-text-strong polli:[&>svg]:h-4 polli:[&>svg]:w-4\"\n >\n {icon}\n </span>\n ) : (\n <CheckboxLabel\n className={cn(\n \"polli:relative polli:flex polli:h-5 polli:shrink-0\",\n info != null ? \"polli:w-8 polli:pr-3\" : \"polli:w-5\",\n onChange &&\n (disabled\n ? \"polli:cursor-not-allowed\"\n : \"polli:cursor-pointer\"),\n )}\n >\n <input\n ref={inputRef}\n id={inputId}\n type=\"checkbox\"\n aria-label={ariaLabel}\n checked={checked}\n disabled={disabled || !onChange}\n onChange={(event) =>\n onChange?.(event.target.checked)\n }\n className=\"polli:peer polli:sr-only\"\n />\n <span\n aria-hidden=\"true\"\n className=\"polli:flex polli:h-5 polli:w-5 polli:items-center polli:justify-center polli:rounded polli:border polli:border-theme-text-muted/50 polli:bg-transparent polli:transition-colors polli:peer-checked:border-theme-bg-active polli:peer-checked:bg-theme-bg-active polli:peer-checked:text-theme-text-strong polli:peer-focus-visible:outline-2 polli:peer-focus-visible:outline-offset-2 polli:peer-focus-visible:outline-theme-text-soft polli:peer-disabled:opacity-50\"\n >\n {checked && (\n <CheckIcon className=\"polli:h-3.5 polli:w-3.5\" />\n )}\n </span>\n </CheckboxLabel>\n )}\n <span className=\"polli:min-w-0 polli:flex-1\">\n <Label\n htmlFor={Label === \"label\" ? inputId : undefined}\n className={cn(\n \"polli:transition-opacity\",\n !!onChange && !checked && \"polli:opacity-60\",\n onChange &&\n (disabled\n ? \"polli:cursor-not-allowed\"\n : \"polli:cursor-pointer\"),\n )}\n >\n {children}\n </Label>\n {info}\n </span>\n {control != null && (\n <span className=\"polli:shrink-0\">{control}</span>\n )}\n </Row>\n {details && (\n <div className=\"polli:pl-8 polli:font-body polli:text-xs polli:font-normal polli:leading-normal polli:text-theme-text-muted\">\n {details}\n </div>\n )}\n </li>\n );\n}\n","import { useState } from \"react\";\nimport { AccountMenu } from \"../../compositions/AccountMenu.tsx\";\nimport { Alert } from \"../../compositions/Alert.tsx\";\nimport { DropdownItem } from \"../../primitives/DropdownItem.tsx\";\nimport { SignOutIcon } from \"../../primitives/icons/index.tsx\";\n\nexport function DashboardAccountMenu({\n user,\n onSignOut,\n className,\n side,\n}: {\n user: {\n email: string;\n name?: string;\n preferred_username?: string;\n picture?: string | null;\n };\n onSignOut: () => void | Promise<void>;\n className?: string;\n side?: \"top\" | \"bottom\";\n}) {\n const [error, setError] = useState<string | null>(null);\n return (\n <>\n {error && <Alert>{error}</Alert>}\n <AccountMenu\n name={user.name || user.preferred_username || user.email}\n avatarUrl={user.picture}\n className={className}\n side={side}\n >\n <DropdownItem\n onClick={() => {\n setError(null);\n Promise.resolve()\n .then(onSignOut)\n .catch(() =>\n setError(\n \"Could not sign out. Please try again.\",\n ),\n );\n }}\n >\n <SignOutIcon\n aria-hidden=\"true\"\n className=\"polli:h-4 polli:w-4 polli:shrink-0\"\n />\n Sign out\n </DropdownItem>\n </AccountMenu>\n </>\n );\n}\n","import type { ReactNode } from \"react\";\nimport { cn } from \"../../lib/cn.ts\";\nimport { Button, type ButtonProps } from \"../../primitives/Button.tsx\";\n\n/** Shared geometry for provider sign-in controls; busy shows a spinner. */\nexport function ProviderSignInButton({\n icon,\n className,\n children,\n type = \"button\",\n ...props\n}: Omit<ButtonProps<\"button\">, \"as\"> & { icon: ReactNode }) {\n return (\n <Button\n {...props}\n type={type}\n intent=\"brand\"\n data-theme=\"accent\"\n className={cn(\"polli:gap-2 polli:whitespace-nowrap\", className)}\n >\n {props[\"aria-busy\"] === true ? (\n <span\n aria-hidden=\"true\"\n className=\"polli:h-5 polli:w-5 polli:shrink-0 polli:animate-spin polli:rounded-full polli:border-2 polli:border-current polli:border-r-transparent polli:motion-reduce:animate-none\"\n />\n ) : (\n icon\n )}\n <span>{children}</span>\n </Button>\n );\n}\n","import { BrandMark } from \"../../primitives/BrandMark.tsx\";\nimport type { ButtonProps } from \"../../primitives/Button.tsx\";\nimport { ProviderSignInButton } from \"./ProviderSignInButton.tsx\";\n\nexport type PollinationsSignInButtonProps = Omit<\n ButtonProps<\"button\">,\n \"as\"\n> & {\n isPending?: boolean;\n};\n\n/** Provider identity button; the app supplies its own sign-in action. */\nexport function PollinationsSignInButton({\n className,\n children,\n type = \"button\",\n isPending = false,\n disabled,\n ...props\n}: PollinationsSignInButtonProps) {\n return (\n <ProviderSignInButton\n type={type}\n {...props}\n disabled={disabled || isPending}\n aria-busy={isPending}\n className={className}\n icon={<BrandMark className=\"polli:h-5 polli:w-5\" />}\n >\n {children ?? \"Connect with Pollinations\"}\n </ProviderSignInButton>\n );\n}\n","import { Button } from \"../../primitives/Button.tsx\";\nimport { useColorMode } from \"../../primitives/ColorModeToggle.tsx\";\nimport { RefreshIcon } from \"../../primitives/icons/index.tsx\";\nimport { AuthFlowLayout } from \"./AuthModal.tsx\";\nimport { PollinationsSignInButton } from \"./PollinationsSignInButton.tsx\";\n\nconst signInErrors = {\n admin_required: {\n title: \"Admin access required\",\n message:\n \"Your Pollinations account does not have admin access. Switch accounts on Pollinations, then try again.\",\n },\n cancelled: {\n title: \"Sign-in cancelled\",\n message: \"Sign-in was cancelled. You can try again.\",\n },\n invalid_state: {\n title: \"Sign-in link expired\",\n message: \"Your Pollinations sign-in link expired. Please try again.\",\n },\n unavailable: {\n title: \"Couldn’t sign in\",\n message:\n \"Couldn’t complete your Pollinations sign-in. Please try again.\",\n },\n} as const;\n\nexport function DashboardSignIn({\n appName,\n onSignIn,\n isPending = false,\n sessionError,\n}: {\n appName: string;\n onSignIn: () => void;\n isPending?: boolean;\n sessionError?: string | null;\n}) {\n // Auth modals carry no theme switch; they follow the saved or system mode.\n useColorMode();\n const code =\n typeof window === \"undefined\"\n ? null\n : new URLSearchParams(window.location.search).get(\"auth_error\");\n const error = sessionError\n ? { title: \"Couldn’t check your session\", message: sessionError }\n : code && Object.hasOwn(signInErrors, code)\n ? signInErrors[code as keyof typeof signInErrors]\n : null;\n const shownError = isPending ? null : error;\n return (\n <AuthFlowLayout\n title={shownError ? shownError.title : `Sign in to ${appName}`}\n description={\n shownError ? undefined : \"Use your Pollinations admin account.\"\n }\n error={shownError?.message}\n actions={\n isPending ? (\n <PollinationsSignInButton isPending>\n Checking sign-in…\n </PollinationsSignInButton>\n ) : sessionError ? (\n <Button\n icon={<RefreshIcon />}\n onClick={() => window.location.reload()}\n >\n Reload\n </Button>\n ) : (\n <PollinationsSignInButton onClick={onSignIn}>\n {error ? \"Try again\" : \"Sign in with Pollinations\"}\n </PollinationsSignInButton>\n )\n }\n />\n );\n}\n","import type { ButtonProps } from \"../../primitives/Button.tsx\";\nimport { GitHubIcon } from \"../../primitives/icons/index.tsx\";\nimport { ProviderSignInButton } from \"./ProviderSignInButton.tsx\";\n\n/** The GitHub action uses the same layout as Pollinations sign-in. */\nexport function GitHubSignInButton({\n isSigningIn = false,\n disabled,\n ...props\n}: Omit<ButtonProps<\"button\">, \"as\" | \"children\"> & {\n isSigningIn?: boolean;\n}) {\n return (\n <ProviderSignInButton\n {...props}\n disabled={disabled || isSigningIn}\n aria-busy={isSigningIn}\n icon={\n <GitHubIcon\n aria-hidden=\"true\"\n className=\"polli:h-5 polli:w-5 polli:shrink-0\"\n />\n }\n >\n {isSigningIn ? \"Signing in…\" : \"Sign in with GitHub\"}\n </ProviderSignInButton>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,aAAa;AA2Bd,SAwCJ,UAxCI,KAwCJ,YAxCI;AAFD,SAAS,UAAU,EAAE,UAAU,MAAM,QAAQ,QAAQ,GAAmB;AAC3E,SACI;AAAA,IAAC;AAAA;AAAA,MACG,MAAI;AAAA,MACJ,cAAc,CAAC,SAAS,CAAC,QAAQ,UAAU;AAAA,MAC3C,cAAc;AAAA,MACd,WAAW,QAAQ;AAAA,MACnB,YAAY,QAAQ;AAAA,MACpB,qBAAoB;AAAA,MACpB,kBAAiB;AAAA,MACjB;AAAA,MAEC;AAAA;AAAA,EACL;AAER;AA0BA,IAAM,gBACF,iCAAE;AAAA;AAAA,EACkC;AAAA,EAChC;AAAA,IAAC;AAAA;AAAA,MACG,MAAK;AAAA,MACL,MAAK;AAAA,MACL,UAAU;AAAA,MACb;AAAA;AAAA,EAED;AAAA,EAAc;AAAA,EAAI;AAAA,EACE;AAAA,EACpB;AAAA,IAAC;AAAA;AAAA,MACG,MAAK;AAAA,MACL,MAAK;AAAA,MACL,UAA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Z;AAER;;;AC3DgB,gBAAAC,YAAA;AAbT,SAAS,mBAAmB;AAAA,EAC/B,cAAc;AAAA,EACd;AAAA,EACA,GAAG;AACP,GAEG;AACC,SACI,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACI,GAAG;AAAA,MACJ,UAAU,YAAY;AAAA,MACtB,aAAW;AAAA,MACX,MACI,gBAAAA;AAAA,QAAC;AAAA;AAAA,UACG,eAAY;AAAA,UACZ,WAAU;AAAA;AAAA,MACd;AAAA,MAGH,wBAAc,qBAAgB;AAAA;AAAA,EACnC;AAER;","names":["Fragment","jsx","jsxs","jsx","jsxs","jsx","jsx","jsx"]}
|
|
1
|
+
{"version":3,"sources":["../../src/modules/auth/AuthModal.tsx","../../src/modules/auth/DashboardAccountMenu.tsx","../../src/modules/auth/ProviderSignInButton.tsx","../../src/modules/auth/PollinationsSignInButton.tsx","../../src/modules/auth/DashboardSignIn.tsx","../../src/modules/auth/GitHubSignInButton.tsx","../../src/modules/auth/GoogleSignInButton.tsx"],"sourcesContent":["import type { ReactNode, Ref } from \"react\";\nimport { useId } from \"react\";\nimport { Alert } from \"../../compositions/Alert.tsx\";\nimport { cn } from \"../../lib/cn.ts\";\nimport { BrandMark } from \"../../primitives/BrandMark.tsx\";\nimport {\n Dialog,\n DialogBody,\n type DialogProps,\n} from \"../../primitives/Dialog.tsx\";\nimport { InlineLink } from \"../../primitives/InlineLink.tsx\";\nimport { CheckIcon } from \"../../primitives/icons/index.tsx\";\nimport { LoadingStatus } from \"../../primitives/LoadingStatus.tsx\";\nimport { Surface } from \"../../primitives/Surface.tsx\";\nimport { Heading, Text } from \"../../primitives/Typography.tsx\";\n\nexport type AuthModalProps = {\n children: ReactNode;\n size?: DialogProps[\"size\"];\n onClose?: () => void;\n dialog?: {\n label?: string;\n labelledBy?: string;\n };\n};\n\nexport function AuthModal({ children, size, dialog, onClose }: AuthModalProps) {\n return (\n <Dialog\n open\n onOpenChange={(open) => !open && onClose?.()}\n showBackdrop={false}\n ariaLabel={dialog?.label}\n labelledBy={dialog?.labelledBy}\n positionerClassName=\"polli:bg-app-bg\"\n contentClassName=\"polli:overflow-hidden\"\n size={size}\n >\n {children}\n </Dialog>\n );\n}\n\nexport type AuthModalHeaderProps = {\n children?: ReactNode;\n};\n\nexport type AuthFlowLayoutProps = {\n children?: ReactNode;\n /** Screen title; rendered once with the shared recipe and labels the dialog. */\n title?: ReactNode;\n /** The subject of the sentence: the app, the device, the key. Sits between title and description. */\n subject?: ReactNode;\n /** One sentence under the title. */\n description?: ReactNode;\n /** What failed; rendered as the error line under the description. */\n error?: ReactNode;\n titleId?: string;\n headerAction?: ReactNode;\n actions?: ReactNode;\n /** One sentence under the actions; defaults to the legal notice. */\n footnote?: ReactNode;\n dialog?: AuthModalProps[\"dialog\"];\n size?: DialogProps[\"size\"];\n onClose?: () => void;\n};\n\nconst legalFootnote = (\n <>\n By continuing, you agree to the{\" \"}\n <InlineLink\n href=\"https://pollinations.ai/terms\"\n tone=\"quiet\"\n showIcon={false}\n >\n Terms\n </InlineLink>{\" \"}\n and acknowledge the{\" \"}\n <InlineLink\n href=\"https://pollinations.ai/privacy\"\n tone=\"quiet\"\n showIcon={false}\n >\n Privacy Policy\n </InlineLink>\n .\n </>\n);\n\n/** Shared sign-in chrome with stable scrolling content and actions. */\nexport function AuthFlowLayout({\n children,\n title,\n subject,\n description,\n error,\n titleId,\n headerAction,\n actions,\n footnote = legalFootnote,\n dialog,\n // Most auth steps are a title, a line and one action; busy steps opt into more width.\n size = \"sm\",\n onClose,\n}: AuthFlowLayoutProps) {\n const generatedId = useId();\n const headingId = titleId ?? generatedId;\n return (\n <AuthModal\n dialog={dialog ?? (title ? { labelledBy: headingId } : undefined)}\n size={size}\n onClose={onClose}\n >\n <DialogBody\n actions={actions}\n footnote={<AuthModalFootnote>{footnote}</AuthModalFootnote>}\n bodyClassName=\"polli:space-y-0 polli:p-0\"\n >\n <AuthModalHeader>{headerAction}</AuthModalHeader>\n <div className=\"polli:space-y-3 polli:px-(--polli-dialog-gutter) polli:py-4\">\n {title && (\n <div className=\"polli:space-y-3\">\n <Heading as=\"h1\" size=\"section\" id={headingId}>\n {title}\n </Heading>\n {subject}\n {description && (\n // The step instruction: body tone, so it reads as\n // the sentence's second half rather than a caption.\n <Text\n size=\"body\"\n tone=\"base\"\n className=\"polli:text-pretty\"\n >\n {description}\n </Text>\n )}\n {error && <ErrorBanner>{error}</ErrorBanner>}\n </div>\n )}\n {children}\n </div>\n </DialogBody>\n </AuthModal>\n );\n}\n\n/**\n * The quiet line under the actions: legal, dashboard, back or help. Its links\n * use the quiet tone without arrows, and wrapped text splits into even lines.\n */\nexport function AuthModalFootnote({ children }: { children: ReactNode }) {\n return (\n <Text\n size=\"xs\"\n tone=\"muted\"\n className=\"polli:shrink-0 polli:px-(--polli-dialog-gutter) polli:pb-5 polli:text-center polli:text-[13px] polli:text-balance\"\n >\n {children}\n </Text>\n );\n}\n\nexport function AuthModalHeader({ children }: AuthModalHeaderProps) {\n const logo = (\n <a\n href=\"https://pollinations.ai\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"polli:block polli:shrink-0 polli:text-theme-text-muted polli:transition-colors polli:hover:text-theme-text-strong polli:focus-visible:outline-2 polli:focus-visible:outline-offset-4\"\n aria-label=\"pollinations.ai\"\n >\n <span className=\"polli:sr-only\">pollinations.ai</span>\n <BrandMark className=\"polli:h-8 polli:w-8\" />\n </a>\n );\n return (\n <div className=\"polli:shrink-0 polli:px-(--polli-dialog-gutter) polli:pt-4 polli:pb-4 polli:sm:pt-6\">\n <div className=\"polli:flex polli:min-h-10 polli:items-start polli:justify-between polli:gap-3\">\n {logo}\n {children}\n </div>\n </div>\n );\n}\n\n/** Titled loading screen so the frame never shows an empty body. */\nexport function AuthModalLoading({\n title,\n subject,\n message = \"Loading…\",\n}: {\n title: string;\n subject?: ReactNode;\n message?: string;\n}) {\n return (\n <AuthFlowLayout title={title} subject={subject}>\n {/* Centred with room around it, so a short wait reads as one. */}\n <div className=\"polli:flex polli:justify-center polli:py-10\">\n <LoadingStatus>{message}</LoadingStatus>\n </div>\n </AuthFlowLayout>\n );\n}\n\nexport function ErrorBanner({ children }: { children: ReactNode }) {\n return <Alert intent=\"danger\">{children}</Alert>;\n}\n\nexport type AuthInfoCardProps = {\n title?: ReactNode;\n children: ReactNode;\n};\n\nexport function AuthInfoCard({ title, children }: AuthInfoCardProps) {\n return (\n <Surface className=\"polli:space-y-3 polli:font-body\">\n {title != null && (\n <p className=\"polli:flex polli:items-center polli:font-body polli:text-xs polli:font-medium polli:leading-5 polli:text-theme-text-muted\">\n {title}\n </p>\n )}\n {children}\n </Surface>\n );\n}\n\n/**\n * A consent row with expandable details. With `onChange` it carries a\n * checkbox; a required row passes an `icon` instead, which takes the\n * checkbox slot so the rows line up.\n */\nexport function AuthAccessItem({\n children,\n control,\n details,\n info,\n icon,\n checked = false,\n onChange,\n ariaLabel,\n disabled = false,\n inputRef,\n rowClassName,\n}: {\n children: ReactNode;\n control?: ReactNode;\n details?: ReactNode;\n /** Help beside the row, outside its checkbox label. */\n info?: ReactNode;\n /** Rendered instead of the checkbox; the row is then always granted. */\n icon?: ReactNode;\n checked?: boolean;\n onChange?: (checked: boolean) => void;\n ariaLabel?: string;\n disabled?: boolean;\n inputRef?: Ref<HTMLInputElement>;\n rowClassName?: string;\n}) {\n const inputId = useId();\n // A required row has no input to label.\n const Row = icon != null || info != null ? \"div\" : \"label\";\n const CheckboxLabel = info != null ? \"label\" : \"span\";\n const Label = icon == null && info != null ? \"label\" : \"span\";\n return (\n <li>\n <Row\n className={cn(\n \"polli:flex polli:min-h-8 polli:items-center polli:font-body polli:text-sm polli:font-semibold polli:leading-5\",\n info != null && icon == null\n ? \"polli:gap-0\"\n : \"polli:gap-3\",\n info != null && \"polli:min-w-0\",\n onChange &&\n Row === \"label\" &&\n (disabled\n ? \"polli:cursor-not-allowed\"\n : \"polli:cursor-pointer\"),\n rowClassName,\n )}\n >\n {icon != null ? (\n <span\n aria-hidden=\"true\"\n className=\"polli:flex polli:h-5 polli:w-5 polli:shrink-0 polli:items-center polli:justify-center polli:text-theme-text-strong polli:[&>svg]:h-4 polli:[&>svg]:w-4\"\n >\n {icon}\n </span>\n ) : (\n <CheckboxLabel\n className={cn(\n \"polli:relative polli:flex polli:h-5 polli:shrink-0\",\n info != null ? \"polli:w-8 polli:pr-3\" : \"polli:w-5\",\n onChange &&\n (disabled\n ? \"polli:cursor-not-allowed\"\n : \"polli:cursor-pointer\"),\n )}\n >\n <input\n ref={inputRef}\n id={inputId}\n type=\"checkbox\"\n aria-label={ariaLabel}\n checked={checked}\n disabled={disabled || !onChange}\n onChange={(event) =>\n onChange?.(event.target.checked)\n }\n className=\"polli:peer polli:sr-only\"\n />\n <span\n aria-hidden=\"true\"\n className=\"polli:flex polli:h-5 polli:w-5 polli:items-center polli:justify-center polli:rounded polli:border polli:border-theme-text-muted/50 polli:bg-transparent polli:transition-colors polli:peer-checked:border-theme-bg-active polli:peer-checked:bg-theme-bg-active polli:peer-checked:text-theme-text-strong polli:peer-focus-visible:outline-2 polli:peer-focus-visible:outline-offset-2 polli:peer-focus-visible:outline-theme-text-soft polli:peer-disabled:opacity-50\"\n >\n {checked && (\n <CheckIcon className=\"polli:h-3.5 polli:w-3.5\" />\n )}\n </span>\n </CheckboxLabel>\n )}\n <span className=\"polli:min-w-0 polli:flex-1\">\n <Label\n htmlFor={Label === \"label\" ? inputId : undefined}\n className={cn(\n \"polli:transition-opacity\",\n !!onChange && !checked && \"polli:opacity-60\",\n onChange &&\n (disabled\n ? \"polli:cursor-not-allowed\"\n : \"polli:cursor-pointer\"),\n )}\n >\n {children}\n </Label>\n {info}\n </span>\n {control != null && (\n <span className=\"polli:shrink-0\">{control}</span>\n )}\n </Row>\n {details && (\n <div className=\"polli:pl-8 polli:font-body polli:text-xs polli:font-normal polli:leading-normal polli:text-theme-text-muted\">\n {details}\n </div>\n )}\n </li>\n );\n}\n","import { useState } from \"react\";\nimport { AccountMenu } from \"../../compositions/AccountMenu.tsx\";\nimport { Alert } from \"../../compositions/Alert.tsx\";\nimport { DropdownItem } from \"../../primitives/DropdownItem.tsx\";\nimport { SignOutIcon } from \"../../primitives/icons/index.tsx\";\n\nexport function DashboardAccountMenu({\n user,\n onSignOut,\n className,\n side,\n}: {\n user: {\n email: string;\n name?: string;\n preferred_username?: string;\n picture?: string | null;\n };\n onSignOut: () => void | Promise<void>;\n className?: string;\n side?: \"top\" | \"bottom\";\n}) {\n const [error, setError] = useState<string | null>(null);\n return (\n <>\n {error && <Alert>{error}</Alert>}\n <AccountMenu\n name={user.name || user.preferred_username || user.email}\n avatarUrl={user.picture}\n className={className}\n side={side}\n >\n <DropdownItem\n onClick={() => {\n setError(null);\n Promise.resolve()\n .then(onSignOut)\n .catch(() =>\n setError(\n \"Could not sign out. Please try again.\",\n ),\n );\n }}\n >\n <SignOutIcon\n aria-hidden=\"true\"\n className=\"polli:h-4 polli:w-4 polli:shrink-0\"\n />\n Sign out\n </DropdownItem>\n </AccountMenu>\n </>\n );\n}\n","import type { ReactNode } from \"react\";\nimport { cn } from \"../../lib/cn.ts\";\nimport { Button, type ButtonProps } from \"../../primitives/Button.tsx\";\n\n/** Shared geometry for provider sign-in controls; busy shows a spinner. */\nexport function ProviderSignInButton({\n icon,\n className,\n children,\n type = \"button\",\n ...props\n}: Omit<ButtonProps<\"button\">, \"as\"> & { icon: ReactNode }) {\n return (\n <Button\n {...props}\n type={type}\n intent=\"brand\"\n data-theme=\"accent\"\n className={cn(\"polli:gap-2 polli:whitespace-nowrap\", className)}\n >\n {props[\"aria-busy\"] === true ? (\n <span\n aria-hidden=\"true\"\n className=\"polli:h-5 polli:w-5 polli:shrink-0 polli:animate-spin polli:rounded-full polli:border-2 polli:border-current polli:border-r-transparent polli:motion-reduce:animate-none\"\n />\n ) : (\n icon\n )}\n <span>{children}</span>\n </Button>\n );\n}\n","import { BrandMark } from \"../../primitives/BrandMark.tsx\";\nimport type { ButtonProps } from \"../../primitives/Button.tsx\";\nimport { ProviderSignInButton } from \"./ProviderSignInButton.tsx\";\n\nexport type PollinationsSignInButtonProps = Omit<\n ButtonProps<\"button\">,\n \"as\"\n> & {\n isPending?: boolean;\n};\n\n/** Provider identity button; the app supplies its own sign-in action. */\nexport function PollinationsSignInButton({\n className,\n children,\n type = \"button\",\n isPending = false,\n disabled,\n ...props\n}: PollinationsSignInButtonProps) {\n return (\n <ProviderSignInButton\n type={type}\n {...props}\n disabled={disabled || isPending}\n aria-busy={isPending}\n className={className}\n icon={<BrandMark className=\"polli:h-5 polli:w-5\" />}\n >\n {children ?? \"Connect with Pollinations\"}\n </ProviderSignInButton>\n );\n}\n","import { Button } from \"../../primitives/Button.tsx\";\nimport { useColorMode } from \"../../primitives/ColorModeToggle.tsx\";\nimport { RefreshIcon } from \"../../primitives/icons/index.tsx\";\nimport { AuthFlowLayout } from \"./AuthModal.tsx\";\nimport { PollinationsSignInButton } from \"./PollinationsSignInButton.tsx\";\n\nconst signInErrors = {\n admin_required: {\n title: \"Admin access required\",\n message:\n \"Your Pollinations account does not have admin access. Switch accounts on Pollinations, then try again.\",\n },\n cancelled: {\n title: \"Sign-in cancelled\",\n message: \"Sign-in was cancelled. You can try again.\",\n },\n invalid_state: {\n title: \"Sign-in link expired\",\n message: \"Your Pollinations sign-in link expired. Please try again.\",\n },\n unavailable: {\n title: \"Couldn’t sign in\",\n message:\n \"Couldn’t complete your Pollinations sign-in. Please try again.\",\n },\n} as const;\n\nexport function DashboardSignIn({\n appName,\n onSignIn,\n isPending = false,\n sessionError,\n}: {\n appName: string;\n onSignIn: () => void;\n isPending?: boolean;\n sessionError?: string | null;\n}) {\n // Auth modals carry no theme switch; they follow the saved or system mode.\n useColorMode();\n const code =\n typeof window === \"undefined\"\n ? null\n : new URLSearchParams(window.location.search).get(\"auth_error\");\n const error = sessionError\n ? { title: \"Couldn’t check your session\", message: sessionError }\n : code && Object.hasOwn(signInErrors, code)\n ? signInErrors[code as keyof typeof signInErrors]\n : null;\n const shownError = isPending ? null : error;\n return (\n <AuthFlowLayout\n title={shownError ? shownError.title : `Sign in to ${appName}`}\n description={\n shownError ? undefined : \"Use your Pollinations admin account.\"\n }\n error={shownError?.message}\n actions={\n isPending ? (\n <PollinationsSignInButton isPending>\n Checking sign-in…\n </PollinationsSignInButton>\n ) : sessionError ? (\n <Button\n icon={<RefreshIcon />}\n onClick={() => window.location.reload()}\n >\n Reload\n </Button>\n ) : (\n <PollinationsSignInButton onClick={onSignIn}>\n {error ? \"Try again\" : \"Sign in with Pollinations\"}\n </PollinationsSignInButton>\n )\n }\n />\n );\n}\n","import type { ButtonProps } from \"../../primitives/Button.tsx\";\nimport { GitHubIcon } from \"../../primitives/icons/index.tsx\";\nimport { ProviderSignInButton } from \"./ProviderSignInButton.tsx\";\n\n/** The GitHub action uses the same layout as Pollinations sign-in. */\nexport function GitHubSignInButton({\n isSigningIn = false,\n disabled,\n ...props\n}: Omit<ButtonProps<\"button\">, \"as\" | \"children\"> & {\n isSigningIn?: boolean;\n}) {\n return (\n <ProviderSignInButton\n {...props}\n disabled={disabled || isSigningIn}\n aria-busy={isSigningIn}\n icon={\n <GitHubIcon\n aria-hidden=\"true\"\n className=\"polli:h-5 polli:w-5 polli:shrink-0\"\n />\n }\n >\n {isSigningIn ? \"Signing in…\" : \"Sign in with GitHub\"}\n </ProviderSignInButton>\n );\n}\n","import type { ButtonProps } from \"../../primitives/Button.tsx\";\nimport { GoogleIcon } from \"../../primitives/icons/index.tsx\";\nimport { ProviderSignInButton } from \"./ProviderSignInButton.tsx\";\n\n/** The Google action uses the same layout as GitHub sign-in. */\nexport function GoogleSignInButton({\n isSigningIn = false,\n disabled,\n ...props\n}: Omit<ButtonProps<\"button\">, \"as\" | \"children\"> & {\n isSigningIn?: boolean;\n}) {\n return (\n <ProviderSignInButton\n {...props}\n disabled={disabled || isSigningIn}\n aria-busy={isSigningIn}\n icon={\n <GoogleIcon\n aria-hidden=\"true\"\n className=\"polli:h-5 polli:w-5 polli:shrink-0\"\n />\n }\n >\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AAAA;AAAA,MACI,GAAG;AAAA,MACJ,UAAU,YAAY;AAAA,MACtB,aAAW;AAAA,MACX,MACI,gBAAAA;AAAA,QAAC;AAAA;AAAA,UACG,eAAY;AAAA,UACZ,WAAU;AAAA;AAAA,MACd;AAAA,MAGH,wBAAc,qBAAgB;AAAA;AAAA,EACnC;AAER;","names":["Fragment","jsx","jsxs","jsx","jsxs","jsx","jsx","jsx","jsx"]}
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-DD7MHUFD.js";
|
|
5
5
|
import {
|
|
6
6
|
ExternalLinkIcon
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6JHDHH4B.js";
|
|
8
8
|
import {
|
|
9
9
|
cn
|
|
10
10
|
} from "./chunk-LKUZU37X.js";
|
|
@@ -281,4 +281,4 @@ export {
|
|
|
281
281
|
BrandMark,
|
|
282
282
|
DropdownItem
|
|
283
283
|
};
|
|
284
|
-
//# sourceMappingURL=chunk-
|
|
284
|
+
//# sourceMappingURL=chunk-5SPNBGNW.js.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// src/assets/google.svg
|
|
2
|
+
var google_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24" fill="currentColor"><g transform="translate(2.2103 2) scale(0.073)"><defs><linearGradient id="a"><stop offset="0" stop-color="%230fbc5c"/><stop offset="1" stop-color="%230cba65"/></linearGradient><linearGradient id="g"><stop offset=".231" stop-color="%230fbc5f"/><stop offset=".312" stop-color="%230fbc5f"/><stop offset=".366" stop-color="%230fbc5e"/><stop offset=".458" stop-color="%230fbc5d"/><stop offset=".54" stop-color="%2312bc58"/><stop offset=".699" stop-color="%2328bf3c"/><stop offset=".771" stop-color="%2338c02b"/><stop offset=".861" stop-color="%2352c218"/><stop offset=".915" stop-color="%2367c30f"/><stop offset="1" stop-color="%2386c504"/></linearGradient><linearGradient id="h"><stop offset=".142" stop-color="%231abd4d"/><stop offset=".248" stop-color="%236ec30d"/><stop offset=".312" stop-color="%238ac502"/><stop offset=".366" stop-color="%23a2c600"/><stop offset=".446" stop-color="%23c8c903"/><stop offset=".54" stop-color="%23ebcb03"/><stop offset=".616" stop-color="%23f7cd07"/><stop offset=".699" stop-color="%23fdcd04"/><stop offset=".771" stop-color="%23fdce05"/><stop offset=".861" stop-color="%23ffce0a"/></linearGradient><linearGradient id="f"><stop offset=".316" stop-color="%23ff4c3c"/><stop offset=".604" stop-color="%23ff692c"/><stop offset=".727" stop-color="%23ff7825"/><stop offset=".885" stop-color="%23ff8d1b"/><stop offset="1" stop-color="%23ff9f13"/></linearGradient><linearGradient id="b"><stop offset=".231" stop-color="%23ff4541"/><stop offset=".312" stop-color="%23ff4540"/><stop offset=".458" stop-color="%23ff4640"/><stop offset=".54" stop-color="%23ff473f"/><stop offset=".699" stop-color="%23ff5138"/><stop offset=".771" stop-color="%23ff5b33"/><stop offset=".861" stop-color="%23ff6c29"/><stop offset="1" stop-color="%23ff8c18"/></linearGradient><linearGradient id="d"><stop offset=".408" stop-color="%23fb4e5a"/><stop offset="1" stop-color="%23ff4540"/></linearGradient><linearGradient id="c"><stop offset=".132" stop-color="%230cba65"/><stop offset=".21" stop-color="%230bb86d"/><stop offset=".297" stop-color="%2309b479"/><stop offset=".396" stop-color="%2308ad93"/><stop offset=".477" stop-color="%230aa6a9"/><stop offset=".568" stop-color="%230d9cc6"/><stop offset=".667" stop-color="%231893dd"/><stop offset=".769" stop-color="%23258bf1"/><stop offset=".859" stop-color="%233086ff"/></linearGradient><linearGradient id="e"><stop offset=".366" stop-color="%23ff4e3a"/><stop offset=".458" stop-color="%23ff8a1b"/><stop offset=".54" stop-color="%23ffa312"/><stop offset=".616" stop-color="%23ffb60c"/><stop offset=".771" stop-color="%23ffcd0a"/><stop offset=".861" stop-color="%23fecf0a"/><stop offset=".915" stop-color="%23fecf08"/><stop offset="1" stop-color="%23fdcd01"/></linearGradient><linearGradient xlink:href="%23a" id="s" x1="219.7" x2="254.467" y1="329.535" y2="329.535" gradientUnits="userSpaceOnUse"/><radialGradient xlink:href="%23b" id="m" cx="109.627" cy="135.862" r="71.46" fx="109.627" fy="135.862" gradientTransform="matrix(-1.93688 1.043 1.45573 2.55542 290.525 -400.634)" gradientUnits="userSpaceOnUse"/><radialGradient xlink:href="%23c" id="n" cx="45.259" cy="279.274" r="71.46" fx="45.259" fy="279.274" gradientTransform="matrix(-3.5126 -4.45809 -1.69255 1.26062 870.8 191.554)" gradientUnits="userSpaceOnUse"/><radialGradient xlink:href="%23d" id="l" cx="304.017" cy="118.009" r="47.854" fx="304.017" fy="118.009" gradientTransform="matrix(2.06435 0 0 2.59204 -297.679 -151.747)" gradientUnits="userSpaceOnUse"/><radialGradient xlink:href="%23e" id="o" cx="181.001" cy="177.201" r="71.46" fx="181.001" fy="177.201" gradientTransform="matrix(-.24858 2.08314 2.96249 .33417 -255.146 -331.164)" gradientUnits="userSpaceOnUse"/><radialGradient xlink:href="%23f" id="p" cx="207.673" cy="108.097" r="41.102" fx="207.673" fy="108.097" gradientTransform="matrix(-1.2492 1.34326 -3.89684 -3.4257 880.501 194.905)" gradientUnits="userSpaceOnUse"/><radialGradient xlink:href="%23g" id="r" cx="109.627" cy="135.862" r="71.46" fx="109.627" fy="135.862" gradientTransform="matrix(-1.93688 -1.043 1.45573 -2.55542 290.525 838.683)" gradientUnits="userSpaceOnUse"/><radialGradient xlink:href="%23h" id="j" cx="154.87" cy="145.969" r="71.46" fx="154.87" fy="145.969" gradientTransform="matrix(-.0814 -1.93722 2.92674 -.11625 -215.135 632.86)" gradientUnits="userSpaceOnUse"/><filter id="q" width="1.097" height="1.116" x="-.048" y="-.058" color-interpolation-filters="sRGB"><feGaussianBlur stdDeviation="1.701"/></filter><filter id="k" width="1.033" height="1.02" x="-.017" y="-.01" color-interpolation-filters="sRGB"><feGaussianBlur stdDeviation=".242"/></filter><clipPath id="i" clipPathUnits="userSpaceOnUse"><path d="M371.378 193.24H237.083v53.438h77.167c-1.241 7.563-4.026 15.003-8.105 21.786-4.674 7.773-10.451 13.69-16.373 18.196-17.74 13.498-38.42 16.258-52.783 16.258-36.283 0-67.283-23.286-79.285-54.928-.484-1.149-.805-2.335-1.197-3.507a81.115 81.115 0 0 1-4.101-25.448c0-9.226 1.569-18.057 4.43-26.398 11.285-32.897 42.985-57.467 80.179-57.467 7.481 0 14.685.884 21.517 2.648a77.668 77.668 0 0 1 33.425 18.25l40.834-39.712c-24.839-22.616-57.219-36.32-95.844-36.32-30.878 0-59.386 9.553-82.748 25.7-18.945 13.093-34.483 30.625-44.97 50.985-9.753 18.879-15.094 39.8-15.094 62.294 0 22.495 5.35 43.633 15.103 62.337v.126c10.302 19.857 25.368 36.954 43.678 49.988 15.997 11.386 44.68 26.551 84.031 26.551 22.63 0 42.687-4.051 60.375-11.644 12.76-5.478 24.065-12.622 34.301-21.804 13.525-12.132 24.117-27.139 31.347-44.404 7.23-17.265 11.097-36.79 11.097-57.957 0-9.858-.998-19.87-2.689-28.968Z"/></clipPath></defs><g clip-path="url(%23i)" transform="matrix(.95792 0 0 .98525 -90.174 -78.856)"><path fill="url(%23j)" d="M92.076 219.958c.148 22.14 6.501 44.983 16.117 63.424v.127c6.949 13.392 16.445 23.97 27.26 34.452l65.327-23.67c-12.36-6.235-14.246-10.055-23.105-17.026-9.054-9.066-15.802-19.473-20.004-31.677h-.17l.17-.127c-2.765-8.058-3.037-16.613-3.14-25.503Z" filter="url(%23k)"/><path fill="url(%23l)" d="M237.083 79.025c-6.456 22.526-3.988 44.421 0 57.161 7.457.006 14.64.888 21.45 2.647a77.662 77.662 0 0 1 33.424 18.25l41.88-40.726c-24.81-22.59-54.667-37.297-96.754-37.332Z" filter="url(%23k)"/><path fill="url(%23m)" d="M236.943 78.847c-31.67 0-60.91 9.798-84.871 26.359a145.533 145.533 0 0 0-24.332 21.15c-1.904 17.744 14.257 39.551 46.262 39.37 15.528-17.936 38.495-29.542 64.056-29.542l.07.002-1.044-57.335c-.048 0-.093-.004-.14-.004Z" filter="url(%23k)"/><path fill="url(%23n)" d="m341.475 226.379-28.268 19.285c-1.24 7.562-4.028 15.002-8.107 21.786-4.674 7.772-10.45 13.69-16.373 18.196-17.702 13.47-38.328 16.244-52.687 16.255-14.842 25.102-17.444 37.675 1.043 57.934 22.877-.016 43.157-4.117 61.046-11.796 12.931-5.551 24.388-12.792 34.761-22.097 13.706-12.295 24.442-27.503 31.769-45 7.327-17.497 11.245-37.282 11.245-58.734Z" filter="url(%23k)"/><path fill="%233086ff" d="M234.996 191.21v57.498h136.006c1.196-7.874 5.152-18.064 5.152-26.5 0-9.858-.996-21.899-2.687-30.998Z" filter="url(%23k)"/><path fill="url(%23o)" d="M128.39 124.327c-8.394 9.119-15.564 19.326-21.249 30.364-9.753 18.879-15.094 41.83-15.094 64.324 0 .317.026.627.029.944 4.32 8.224 59.666 6.649 62.456 0-.004-.31-.039-.613-.039-.924 0-9.226 1.57-16.026 4.43-24.367 3.53-10.289 9.056-19.763 16.123-27.926 1.602-2.031 5.875-6.397 7.121-9.016.475-.997-.862-1.557-.937-1.908-.083-.393-1.876-.077-2.277-.37-1.275-.929-3.8-1.414-5.334-1.845-3.277-.921-8.708-2.953-11.725-5.06-9.536-6.658-24.417-14.612-33.505-24.216Z" filter="url(%23k)"/><path fill="url(%23p)" d="M162.099 155.857c22.112 13.301 28.471-6.714 43.173-12.977l-25.574-52.664a144.74 144.74 0 0 0-26.543 14.504c-12.316 8.512-23.192 18.9-32.176 30.72Z" filter="url(%23q)"/><path fill="url(%23r)" d="M171.099 290.222c-29.683 10.641-34.33 11.023-37.062 29.29a144.806 144.806 0 0 0 16.792 13.984c15.996 11.386 46.766 26.551 86.118 26.551.046 0 .09-.004.137-.004v-59.157l-.094.002c-14.736 0-26.512-3.843-38.585-10.527-2.977-1.648-8.378 2.777-11.123.799-3.786-2.729-12.9 2.35-16.183-.938Z" filter="url(%23k)"/><path fill="url(%23s)" d="M219.7 299.023v59.996c5.506.64 11.236 1.028 17.247 1.028 6.026 0 11.855-.307 17.52-.872v-59.748a105.119 105.119 0 0 1-17.477 1.461c-5.932 0-11.7-.686-17.29-1.865Z" filter="url(%23k)" opacity=".5"/></g></g></svg>%0A';
|
|
3
|
+
|
|
1
4
|
// src/primitives/icons/index.tsx
|
|
2
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
6
|
var strokeProps = {
|
|
@@ -184,6 +187,17 @@ function GitHubIcon(props) {
|
|
|
184
187
|
}
|
|
185
188
|
) });
|
|
186
189
|
}
|
|
190
|
+
function GoogleIcon({ className }) {
|
|
191
|
+
return /* @__PURE__ */ jsx(
|
|
192
|
+
"img",
|
|
193
|
+
{
|
|
194
|
+
src: google_default,
|
|
195
|
+
alt: "",
|
|
196
|
+
"aria-hidden": "true",
|
|
197
|
+
className
|
|
198
|
+
}
|
|
199
|
+
);
|
|
200
|
+
}
|
|
187
201
|
function ImageIcon(props) {
|
|
188
202
|
return /* @__PURE__ */ jsxs("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
189
203
|
/* @__PURE__ */ jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
@@ -523,6 +537,7 @@ export {
|
|
|
523
537
|
GraduationCapIcon,
|
|
524
538
|
SparklesIcon,
|
|
525
539
|
GitHubIcon,
|
|
540
|
+
GoogleIcon,
|
|
526
541
|
ImageIcon,
|
|
527
542
|
CubeIcon,
|
|
528
543
|
AudioIcon,
|
|
@@ -573,4 +588,4 @@ export {
|
|
|
573
588
|
ArrowLeftIcon,
|
|
574
589
|
RefreshIcon
|
|
575
590
|
};
|
|
576
|
-
//# sourceMappingURL=chunk-
|
|
591
|
+
//# sourceMappingURL=chunk-6JHDHH4B.js.map
|