@hanzo/ui 8.32.4 → 8.33.1

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.
@@ -9,37 +9,8 @@ const react_3 = require("@hanzo/iam/react");
9
9
  const react_simple_icons_1 = require("@icons-pack/react-simple-icons");
10
10
  const layout_1 = require("../backends/gui/layout.cjs");
11
11
  const handoff_1 = require("./handoff.cjs");
12
+ const look_1 = require("./look.cjs");
12
13
  const NAME = { google: 'Google', github: 'GitHub' };
13
- /** hanzo.app's front-page sign-in rules (steps.tsx `HERO_STYLE`), scoped to this panel. */
14
- const AT = '[data-slot="signin-panel"]';
15
- const FILL = 'var(--popover,var(--panel))';
16
- const EDGE = 'var(--border,var(--edge))';
17
- const STRONG = 'var(--border-strong,var(--bound))';
18
- const INK = 'var(--foreground,var(--ink))';
19
- const MUTE = 'var(--muted-foreground,var(--quiet))';
20
- const STYLE = `${AT} [data-signin-body]{container-type:inline-size;display:flex;flex-direction:column;gap:10px;width:100%}` +
21
- `${AT} [data-signin-pair]{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%}` +
22
- `@container (max-width:379.98px){${AT} [data-signin-pair]{grid-template-columns:1fr}}` +
23
- `${AT} [data-signin-btn]{box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:9px;width:100%;height:46px;margin:0;padding:0 14px;border-radius:14px;border:1px solid ${EDGE};background:${FILL};color:${INK};font-family:var(--font-sans,Zen,system-ui,sans-serif);font-size:14px;font-weight:500;line-height:1;white-space:nowrap;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.04);transition:transform .2s cubic-bezier(.16,1,.3,1),border-color .2s,background-color .2s,opacity .2s}` +
24
- `${AT} [data-signin-btn]:hover:not(:disabled){border-color:${STRONG};transform:translateY(-2px)}` +
25
- `${AT} [data-signin-btn]:active:not(:disabled){transform:scale(.98)}` +
26
- `${AT} [data-signin-btn]:disabled{opacity:.55;cursor:not-allowed}` +
27
- `${AT} [data-signin-btn][data-solid]{background:${INK};color:var(--background);border-color:${INK}}` +
28
- `${AT} [data-signin-btn][data-solid]:hover:not(:disabled){opacity:.92;transform:none}` +
29
- `${AT} [data-signin-btn] svg{flex-shrink:0}` +
30
- `${AT} [data-signin-or]{display:flex;align-items:center;gap:12px;font-size:12.5px;color:${MUTE}}` +
31
- `${AT} [data-signin-or]::before,${AT} [data-signin-or]::after{content:'';flex:1;height:1px;background:${EDGE}}` +
32
- `${AT} [data-signin-form]{display:flex;flex-direction:column;gap:10px;margin:0}` +
33
- `${AT} [data-signin-field]{box-sizing:border-box;width:100%;height:46px;margin:0;padding:0 16px;border-radius:14px;border:1px solid ${EDGE};background-color:${FILL};color:${INK};font-family:var(--font-sans,Zen,system-ui,sans-serif);font-size:14px;outline:none}` +
34
- `${AT} [data-signin-field]::placeholder{color:${MUTE}}` +
35
- `${AT} [data-signin-field]:focus-visible{border-color:${STRONG};box-shadow:0 0 0 2px var(--ring,${STRONG})}` +
36
- `${AT} [data-signin-wrong]{margin:0;font-size:13px;color:var(--destructive,#e5484d)}` +
37
- `${AT} [data-signin-quiet]{margin:0;font-size:13px;color:${MUTE}}` +
38
- `${AT} [data-signin-quiet] button{padding:0;border:0;background:none;color:${INK};font:inherit;cursor:pointer}` +
39
- `${AT} [data-signin-quiet] button:hover:not(:disabled){text-decoration:underline}` +
40
- `${AT} [data-signin-terms]{margin:0;max-width:400px;text-align:center;font-size:12px;line-height:18px;color:${MUTE}}` +
41
- `${AT} [data-signin-terms] a{color:${INK};text-decoration:none}` +
42
- `${AT} [data-signin-terms] a:hover{text-decoration:underline;text-underline-offset:2px}`;
43
14
  function SignInPanel(props) {
44
15
  return props.request ? (0, jsx_runtime_1.jsx)(Panel, { ...props, mint: props.request }) : (0, jsx_runtime_1.jsx)(UnderProvider, { ...props });
45
16
  }
@@ -77,9 +48,8 @@ function Panel({ title, line, providers = ['google', 'github'], signin = handoff
77
48
  }
78
49
  void leave('email', { kind: 'email', email: typed }, typed);
79
50
  }
80
- const card = bare ? {} : { bg: background, borderWidth: 1, borderColor, rounded: '$6', p: '$6' };
81
51
  const emailLabel = t(busy === 'email' ? 'One moment…' : 'Continue with email');
82
- return ((0, jsx_runtime_1.jsxs)(layout_1.YStack, { "data-slot": "signin-panel", "data-surface": bare ? 'bare' : 'card', width: "100%", maxW: bare ? 400 : 464, items: "center", gap: "$3", ...card, children: [(0, jsx_runtime_1.jsx)("style", { dangerouslySetInnerHTML: { __html: STYLE } }), title ? ((0, jsx_runtime_1.jsx)(layout_1.Heading, { render: "h1", size: "$8", fontWeight: "500", color: "$ink", m: 0, text: "center", children: title })) : null, line ? ((0, jsx_runtime_1.jsx)(layout_1.Paragraph, { size: "$3", color: "$quiet", m: 0, text: "center", maxW: 360, children: line })) : null, (0, jsx_runtime_1.jsxs)("div", { "data-signin-body": "", style: title || line ? { marginTop: 12 } : undefined, children: [providers.length ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { "data-signin-pair": "", children: providers.map((p) => ((0, jsx_runtime_1.jsxs)("button", { "data-signin-btn": "", type: "button", disabled: busy !== null, onClick: () => void leave(p, { kind: 'provider', provider: p }), children: [p === 'google' ? (0, jsx_runtime_1.jsx)(react_simple_icons_1.SiGoogle, { size: 17, "aria-hidden": true }) : (0, jsx_runtime_1.jsx)(react_simple_icons_1.SiGithub, { size: 17, "aria-hidden": true }), t('Continue with {provider}', { provider: NAME[p] })] }, p))) }), (0, jsx_runtime_1.jsx)("div", { "data-signin-or": "", children: t('or') })] })) : null, emailOpen ? ((0, jsx_runtime_1.jsxs)("form", { "data-signin-form": "", onSubmit: withEmail, noValidate: true, children: [(0, jsx_runtime_1.jsx)("input", { id: "hanzo-signin-email", "data-signin-field": "", type: "email", name: "email", autoComplete: "username", "aria-label": t('Email'), "aria-invalid": wrong ? true : undefined, value: email, onChange: (e) => setEmail(e.target.value), placeholder: "you@company.com", autoFocus: true }), wrong ? ((0, jsx_runtime_1.jsx)("p", { "data-signin-wrong": "", role: "alert", children: t(wrong) })) : null, (0, jsx_runtime_1.jsx)("button", { "data-signin-btn": "", "data-solid": "", type: "submit", disabled: busy !== null, children: emailLabel })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [wrong ? ((0, jsx_runtime_1.jsx)("p", { "data-signin-wrong": "", role: "alert", children: t(wrong) })) : null, (0, jsx_runtime_1.jsx)("button", { "data-signin-btn": "", "data-solid": "", type: "button", disabled: busy !== null, onClick: () => {
52
+ return ((0, jsx_runtime_1.jsxs)(look_1.SignInCard, { background: background, borderColor: borderColor, bare: bare, children: [title ? ((0, jsx_runtime_1.jsx)(layout_1.Heading, { render: "h1", size: "$8", fontWeight: "500", color: "$ink", m: 0, text: "center", children: title })) : null, line ? ((0, jsx_runtime_1.jsx)(layout_1.Paragraph, { size: "$3", color: "$quiet", m: 0, text: "center", maxW: 360, children: line })) : null, (0, jsx_runtime_1.jsxs)("div", { "data-signin-body": "", style: title || line ? { marginTop: 12 } : undefined, children: [providers.length ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { "data-signin-pair": "", children: providers.map((p) => ((0, jsx_runtime_1.jsxs)("button", { "data-signin-btn": "", type: "button", disabled: busy !== null, onClick: () => void leave(p, { kind: 'provider', provider: p }), children: [p === 'google' ? (0, jsx_runtime_1.jsx)(react_simple_icons_1.SiGoogle, { size: 17, "aria-hidden": true }) : (0, jsx_runtime_1.jsx)(react_simple_icons_1.SiGithub, { size: 17, "aria-hidden": true }), t('Continue with {provider}', { provider: NAME[p] })] }, p))) }), (0, jsx_runtime_1.jsx)("div", { "data-signin-or": "", children: t('or') })] })) : null, emailOpen ? ((0, jsx_runtime_1.jsxs)("form", { "data-signin-form": "", onSubmit: withEmail, noValidate: true, children: [(0, jsx_runtime_1.jsx)("input", { id: "hanzo-signin-email", "data-signin-field": "", type: "email", name: "email", autoComplete: "username", "aria-label": t('Email'), "aria-invalid": wrong ? true : undefined, value: email, onChange: (e) => setEmail(e.target.value), placeholder: "you@company.com", autoFocus: true }), wrong ? ((0, jsx_runtime_1.jsx)("p", { "data-signin-wrong": "", role: "alert", children: t(wrong) })) : null, (0, jsx_runtime_1.jsx)("button", { "data-signin-btn": "", "data-solid": "", type: "submit", disabled: busy !== null, children: emailLabel })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [wrong ? ((0, jsx_runtime_1.jsx)("p", { "data-signin-wrong": "", role: "alert", children: t(wrong) })) : null, (0, jsx_runtime_1.jsx)("button", { "data-signin-btn": "", "data-solid": "", type: "button", disabled: busy !== null, onClick: () => {
83
53
  setWrong(null);
84
54
  setEmailOpen(true);
85
55
  }, children: emailLabel })] }))] }), signup ? ((0, jsx_runtime_1.jsxs)("p", { "data-signin-quiet": "", children: [`${t('New to Hanzo?')} `, (0, jsx_runtime_1.jsx)("button", { type: "button", disabled: busy !== null, onClick: () => void leave('signup', { kind: 'signup' }), children: t('Create account') })] })) : null, (0, jsx_runtime_1.jsx)("p", { "data-signin-terms": "", children: t("By continuing, you agree to Hanzo's {terms} and {privacy}.", {
@@ -1,6 +1,6 @@
1
- import { type ComponentProps, type ReactNode } from 'react';
2
- import { YStack } from '../backends/gui/layout.js';
1
+ import { type ReactNode } from 'react';
3
2
  import { type ProviderKind } from './handoff.js';
3
+ import { type SignInCardProps } from './look.js';
4
4
  /**
5
5
  * The sign-in a Hanzo site draws on its own front page (hanzo.app, hanzo.bot,
6
6
  * hanzo.team), shared so every site asks the same way and leaves the same way.
@@ -17,10 +17,9 @@ import { type ProviderKind } from './handoff.js';
17
17
  * components/auth/steps.tsx `HERO_STYLE`), rule for rule, so the sites read as one
18
18
  * product's: the providers side by side, then one solid Continue with email that
19
19
  * opens the address field when pressed, and no sign-up line (hanzo.ai/login offers
20
- * one). The rules are carried here as one scoped stylesheet: the host mounts its
21
- * GuiProvider and imports none. They read design's custom properties (`--popover`,
22
- * `--border`, `--border-strong`, `--foreground`, `--muted-foreground`) with gui's
23
- * theme keys behind them, so a host without design's sheet still draws it.
20
+ * one). The card and its rules are ./look.tsx's `SignInCard`, which hanzo.ai's
21
+ * own sign-in (/login, /signup) is drawn on too, so the door and the page it
22
+ * opens onto read alike: the host mounts its GuiProvider and imports no sheet.
24
23
  * Framework-free: a Next export and a Vite app draw it alike.
25
24
  *
26
25
  * It stands on its own card, a solid ground inside a hairline, since a front page
@@ -66,7 +65,7 @@ type Mint = (params?: {
66
65
  additionalParams?: Record<string, string>;
67
66
  }) => Promise<string>;
68
67
  /** A colour the card takes, as the stack it is drawn on takes one. */
69
- type Paint = ComponentProps<typeof YStack>['bg'];
68
+ type Paint = SignInCardProps['background'];
70
69
  export declare function SignInPanel(props: SignInPanelProps): import("react").JSX.Element;
71
70
  export {};
72
71
  //# sourceMappingURL=SignInPanel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SignInPanel.d.ts","sourceRoot":"","sources":["../../src/auth/SignInPanel.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,cAAc,EAAkB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAIrF,OAAO,EAAsB,MAAM,EAAE,MAAM,wBAAwB,CAAA;AACnE,OAAO,EAA4B,KAAK,YAAY,EAAY,MAAM,WAAW,CAAA;AAEjF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,WAAW,gBAAgB;IAC/B,gGAAgG;IAChG,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,mCAAmC;IACnC,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,oEAAoE;IACpE,SAAS,CAAC,EAAE,YAAY,EAAE,CAAA;IAC1B,8DAA8D;IAC9D,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,wHAAwH;IACxH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,wFAAwF;IAC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,CAAC,EAAE,MAAM,CAAA;IACf,wHAAwH;IACxH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,wFAAwF;IACxF,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAA;IACnC,gEAAgE;IAChE,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAA;IAC/D;;;;;OAKG;IACH,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,mGAAmG;IACnG,UAAU,CAAC,EAAE,KAAK,CAAA;IAClB,oFAAoF;IACpF,WAAW,CAAC,EAAE,KAAK,CAAA;IACnB,8EAA8E;IAC9E,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAED,KAAK,IAAI,GAAG,CAAC,MAAM,CAAC,EAAE;IAAE,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;AAEvF,sEAAsE;AACtE,KAAK,KAAK,GAAG,eAAe,CAAC,YAAY,CAAC,CAAA;AAI1C,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,+BAElD"}
@@ -4,39 +4,10 @@ import { useState } from 'react';
4
4
  import { useI18n } from '@hanzo/i18n/react';
5
5
  import { useIam } from '@hanzo/iam/react';
6
6
  import { SiGithub, SiGoogle } from '@icons-pack/react-simple-icons';
7
- import { Heading, Paragraph, YStack } from '../backends/gui/layout.js';
7
+ import { Heading, Paragraph } from '../backends/gui/layout.js';
8
8
  import { address, handoff, SIGNIN } from './handoff.js';
9
+ import { SignInCard } from './look.js';
9
10
  const NAME = { google: 'Google', github: 'GitHub' };
10
- /** hanzo.app's front-page sign-in rules (steps.tsx `HERO_STYLE`), scoped to this panel. */
11
- const AT = '[data-slot="signin-panel"]';
12
- const FILL = 'var(--popover,var(--panel))';
13
- const EDGE = 'var(--border,var(--edge))';
14
- const STRONG = 'var(--border-strong,var(--bound))';
15
- const INK = 'var(--foreground,var(--ink))';
16
- const MUTE = 'var(--muted-foreground,var(--quiet))';
17
- const STYLE = `${AT} [data-signin-body]{container-type:inline-size;display:flex;flex-direction:column;gap:10px;width:100%}` +
18
- `${AT} [data-signin-pair]{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%}` +
19
- `@container (max-width:379.98px){${AT} [data-signin-pair]{grid-template-columns:1fr}}` +
20
- `${AT} [data-signin-btn]{box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:9px;width:100%;height:46px;margin:0;padding:0 14px;border-radius:14px;border:1px solid ${EDGE};background:${FILL};color:${INK};font-family:var(--font-sans,Zen,system-ui,sans-serif);font-size:14px;font-weight:500;line-height:1;white-space:nowrap;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.04);transition:transform .2s cubic-bezier(.16,1,.3,1),border-color .2s,background-color .2s,opacity .2s}` +
21
- `${AT} [data-signin-btn]:hover:not(:disabled){border-color:${STRONG};transform:translateY(-2px)}` +
22
- `${AT} [data-signin-btn]:active:not(:disabled){transform:scale(.98)}` +
23
- `${AT} [data-signin-btn]:disabled{opacity:.55;cursor:not-allowed}` +
24
- `${AT} [data-signin-btn][data-solid]{background:${INK};color:var(--background);border-color:${INK}}` +
25
- `${AT} [data-signin-btn][data-solid]:hover:not(:disabled){opacity:.92;transform:none}` +
26
- `${AT} [data-signin-btn] svg{flex-shrink:0}` +
27
- `${AT} [data-signin-or]{display:flex;align-items:center;gap:12px;font-size:12.5px;color:${MUTE}}` +
28
- `${AT} [data-signin-or]::before,${AT} [data-signin-or]::after{content:'';flex:1;height:1px;background:${EDGE}}` +
29
- `${AT} [data-signin-form]{display:flex;flex-direction:column;gap:10px;margin:0}` +
30
- `${AT} [data-signin-field]{box-sizing:border-box;width:100%;height:46px;margin:0;padding:0 16px;border-radius:14px;border:1px solid ${EDGE};background-color:${FILL};color:${INK};font-family:var(--font-sans,Zen,system-ui,sans-serif);font-size:14px;outline:none}` +
31
- `${AT} [data-signin-field]::placeholder{color:${MUTE}}` +
32
- `${AT} [data-signin-field]:focus-visible{border-color:${STRONG};box-shadow:0 0 0 2px var(--ring,${STRONG})}` +
33
- `${AT} [data-signin-wrong]{margin:0;font-size:13px;color:var(--destructive,#e5484d)}` +
34
- `${AT} [data-signin-quiet]{margin:0;font-size:13px;color:${MUTE}}` +
35
- `${AT} [data-signin-quiet] button{padding:0;border:0;background:none;color:${INK};font:inherit;cursor:pointer}` +
36
- `${AT} [data-signin-quiet] button:hover:not(:disabled){text-decoration:underline}` +
37
- `${AT} [data-signin-terms]{margin:0;max-width:400px;text-align:center;font-size:12px;line-height:18px;color:${MUTE}}` +
38
- `${AT} [data-signin-terms] a{color:${INK};text-decoration:none}` +
39
- `${AT} [data-signin-terms] a:hover{text-decoration:underline;text-underline-offset:2px}`;
40
11
  export function SignInPanel(props) {
41
12
  return props.request ? _jsx(Panel, { ...props, mint: props.request }) : _jsx(UnderProvider, { ...props });
42
13
  }
@@ -74,9 +45,8 @@ function Panel({ title, line, providers = ['google', 'github'], signin = SIGNIN,
74
45
  }
75
46
  void leave('email', { kind: 'email', email: typed }, typed);
76
47
  }
77
- const card = bare ? {} : { bg: background, borderWidth: 1, borderColor, rounded: '$6', p: '$6' };
78
48
  const emailLabel = t(busy === 'email' ? 'One moment…' : 'Continue with email');
79
- return (_jsxs(YStack, { "data-slot": "signin-panel", "data-surface": bare ? 'bare' : 'card', width: "100%", maxW: bare ? 400 : 464, items: "center", gap: "$3", ...card, children: [_jsx("style", { dangerouslySetInnerHTML: { __html: STYLE } }), title ? (_jsx(Heading, { render: "h1", size: "$8", fontWeight: "500", color: "$ink", m: 0, text: "center", children: title })) : null, line ? (_jsx(Paragraph, { size: "$3", color: "$quiet", m: 0, text: "center", maxW: 360, children: line })) : null, _jsxs("div", { "data-signin-body": "", style: title || line ? { marginTop: 12 } : undefined, children: [providers.length ? (_jsxs(_Fragment, { children: [_jsx("div", { "data-signin-pair": "", children: providers.map((p) => (_jsxs("button", { "data-signin-btn": "", type: "button", disabled: busy !== null, onClick: () => void leave(p, { kind: 'provider', provider: p }), children: [p === 'google' ? _jsx(SiGoogle, { size: 17, "aria-hidden": true }) : _jsx(SiGithub, { size: 17, "aria-hidden": true }), t('Continue with {provider}', { provider: NAME[p] })] }, p))) }), _jsx("div", { "data-signin-or": "", children: t('or') })] })) : null, emailOpen ? (_jsxs("form", { "data-signin-form": "", onSubmit: withEmail, noValidate: true, children: [_jsx("input", { id: "hanzo-signin-email", "data-signin-field": "", type: "email", name: "email", autoComplete: "username", "aria-label": t('Email'), "aria-invalid": wrong ? true : undefined, value: email, onChange: (e) => setEmail(e.target.value), placeholder: "you@company.com", autoFocus: true }), wrong ? (_jsx("p", { "data-signin-wrong": "", role: "alert", children: t(wrong) })) : null, _jsx("button", { "data-signin-btn": "", "data-solid": "", type: "submit", disabled: busy !== null, children: emailLabel })] })) : (_jsxs(_Fragment, { children: [wrong ? (_jsx("p", { "data-signin-wrong": "", role: "alert", children: t(wrong) })) : null, _jsx("button", { "data-signin-btn": "", "data-solid": "", type: "button", disabled: busy !== null, onClick: () => {
49
+ return (_jsxs(SignInCard, { background: background, borderColor: borderColor, bare: bare, children: [title ? (_jsx(Heading, { render: "h1", size: "$8", fontWeight: "500", color: "$ink", m: 0, text: "center", children: title })) : null, line ? (_jsx(Paragraph, { size: "$3", color: "$quiet", m: 0, text: "center", maxW: 360, children: line })) : null, _jsxs("div", { "data-signin-body": "", style: title || line ? { marginTop: 12 } : undefined, children: [providers.length ? (_jsxs(_Fragment, { children: [_jsx("div", { "data-signin-pair": "", children: providers.map((p) => (_jsxs("button", { "data-signin-btn": "", type: "button", disabled: busy !== null, onClick: () => void leave(p, { kind: 'provider', provider: p }), children: [p === 'google' ? _jsx(SiGoogle, { size: 17, "aria-hidden": true }) : _jsx(SiGithub, { size: 17, "aria-hidden": true }), t('Continue with {provider}', { provider: NAME[p] })] }, p))) }), _jsx("div", { "data-signin-or": "", children: t('or') })] })) : null, emailOpen ? (_jsxs("form", { "data-signin-form": "", onSubmit: withEmail, noValidate: true, children: [_jsx("input", { id: "hanzo-signin-email", "data-signin-field": "", type: "email", name: "email", autoComplete: "username", "aria-label": t('Email'), "aria-invalid": wrong ? true : undefined, value: email, onChange: (e) => setEmail(e.target.value), placeholder: "you@company.com", autoFocus: true }), wrong ? (_jsx("p", { "data-signin-wrong": "", role: "alert", children: t(wrong) })) : null, _jsx("button", { "data-signin-btn": "", "data-solid": "", type: "submit", disabled: busy !== null, children: emailLabel })] })) : (_jsxs(_Fragment, { children: [wrong ? (_jsx("p", { "data-signin-wrong": "", role: "alert", children: t(wrong) })) : null, _jsx("button", { "data-signin-btn": "", "data-solid": "", type: "button", disabled: busy !== null, onClick: () => {
80
50
  setWrong(null);
81
51
  setEmailOpen(true);
82
52
  }, children: emailLabel })] }))] }), signup ? (_jsxs("p", { "data-signin-quiet": "", children: [`${t('New to Hanzo?')} `, _jsx("button", { type: "button", disabled: busy !== null, onClick: () => void leave('signup', { kind: 'signup' }), children: t('Create account') })] })) : null, _jsx("p", { "data-signin-terms": "", children: t("By continuing, you agree to Hanzo's {terms} and {privacy}.", {
@@ -1 +1 @@
1
- {"version":3,"file":"SignInPanel.js","sourceRoot":"","sources":["../../src/auth/SignInPanel.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,QAAQ,EAAuD,MAAM,OAAO,CAAA;AACrF,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAA;AACnE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AACnE,OAAO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AAU,GACJ,IACJ,CACR,CAAC,CAAC,CAAC,CACF,8BACG,KAAK,CAAC,CAAC,CAAC,CACP,iCAAqB,EAAE,EAAC,IAAI,EAAC,OAAO,YACjC,CAAC,CAAC,KAAK,CAAC,GACP,CACL,CAAC,CAAC,CAAC,IAAI,EACR,oCACkB,EAAE,gBACP,EAAE,EACb,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,IAAI,KAAK,IAAI,EACvB,OAAO,EAAE,GAAG,EAAE;oCACZ,QAAQ,CAAC,IAAI,CAAC,CAAA;oCACd,YAAY,CAAC,IAAI,CAAC,CAAA;gCACpB,CAAC,YAEA,UAAU,GACJ,IACR,CACJ,IACG,EACL,MAAM,CAAC,CAAC,CAAC,CACR,kCAAqB,EAAE,aACpB,GAAG,CAAC,CAAC,eAAe,CAAC,GAAG,EACzB,iBAAQ,IAAI,EAAC,QAAQ,EAAC,QAAQ,EAAE,IAAI,KAAK,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,KAAK,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,YACnG,CAAC,CAAC,gBAAgB,CAAC,GACb,IACP,CACL,CAAC,CAAC,CAAC,IAAI,EACR,iCAAqB,EAAE,YACpB,CAAC,CAAC,4DAA4D,EAAE;oBAC/D,KAAK,EAAE,YAAG,IAAI,EAAE,SAAS,YAAG,CAAC,CAAC,OAAO,CAAC,GAAK;oBAC3C,OAAO,EAAE,YAAG,IAAI,EAAE,WAAW,YAAG,CAAC,CAAC,gBAAgB,CAAC,GAAK;iBACzD,CAAC,GACA,IACO,CACd,CAAA;AACH,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.refresher = exports.live = exports.bearer = exports.useSignOut = exports.signOut = exports.SIGNIN = exports.handoff = exports.address = exports.SignInPanel = exports.SignIn = void 0;
3
+ exports.refresher = exports.live = exports.bearer = exports.useSignOut = exports.signOut = exports.SignInCard = exports.SIGNIN_STYLE = exports.SIGNIN = exports.handoff = exports.address = exports.SignInPanel = exports.SignIn = void 0;
4
4
  /**
5
5
  * Signing in, signing out, and the session, for every Hanzo site: IAM answers
6
6
  * (/v1/iam), the site draws.
@@ -13,6 +13,9 @@ var handoff_1 = require("./handoff.cjs");
13
13
  Object.defineProperty(exports, "address", { enumerable: true, get: function () { return handoff_1.address; } });
14
14
  Object.defineProperty(exports, "handoff", { enumerable: true, get: function () { return handoff_1.handoff; } });
15
15
  Object.defineProperty(exports, "SIGNIN", { enumerable: true, get: function () { return handoff_1.SIGNIN; } });
16
+ var look_1 = require("./look.cjs");
17
+ Object.defineProperty(exports, "SIGNIN_STYLE", { enumerable: true, get: function () { return look_1.SIGNIN_STYLE; } });
18
+ Object.defineProperty(exports, "SignInCard", { enumerable: true, get: function () { return look_1.SignInCard; } });
16
19
  var signout_1 = require("./signout.cjs");
17
20
  Object.defineProperty(exports, "signOut", { enumerable: true, get: function () { return signout_1.signOut; } });
18
21
  Object.defineProperty(exports, "useSignOut", { enumerable: true, get: function () { return signout_1.useSignOut; } });
@@ -5,6 +5,7 @@
5
5
  export { SignIn, type Mode, type Provider, type SignInProps } from './SignIn.js';
6
6
  export { SignInPanel, type SignInPanelProps } from './SignInPanel.js';
7
7
  export { address, handoff, SIGNIN, type ProviderKind, type Way } from './handoff.js';
8
+ export { SIGNIN_STYLE, SignInCard, type SignInCardProps } from './look.js';
8
9
  export { signOut, useSignOut, type SignOutOptions } from './signout.js';
9
10
  export { bearer, live, refresher } from './session.js';
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA;AAC7E,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,KAAK,GAAG,EAAE,MAAM,WAAW,CAAA;AACjF,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAA;AACpE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA;AAC7E,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,KAAK,GAAG,EAAE,MAAM,WAAW,CAAA;AACjF,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,QAAQ,CAAA;AACvE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAA;AACpE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA"}
@@ -5,6 +5,7 @@
5
5
  export { SignIn } from './SignIn.js';
6
6
  export { SignInPanel } from './SignInPanel.js';
7
7
  export { address, handoff, SIGNIN } from './handoff.js';
8
+ export { SIGNIN_STYLE, SignInCard } from './look.js';
8
9
  export { signOut, useSignOut } from './signout.js';
9
10
  export { bearer, live, refresher } from './session.js';
10
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,EAA8C,MAAM,UAAU,CAAA;AAC7E,OAAO,EAAE,WAAW,EAAyB,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAA+B,MAAM,WAAW,CAAA;AACjF,OAAO,EAAE,OAAO,EAAE,UAAU,EAAuB,MAAM,WAAW,CAAA;AACpE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,EAA8C,MAAM,UAAU,CAAA;AAC7E,OAAO,EAAE,WAAW,EAAyB,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAA+B,MAAM,WAAW,CAAA;AACjF,OAAO,EAAE,YAAY,EAAE,UAAU,EAAwB,MAAM,QAAQ,CAAA;AACvE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAuB,MAAM,WAAW,CAAA;AACpE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA"}
@@ -0,0 +1,69 @@
1
+ 'use client';"use strict";
2
+ 'use client';
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.SIGNIN_STYLE = void 0;
5
+ exports.SignInCard = SignInCard;
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const layout_1 = require("../backends/gui/layout.cjs");
8
+ const AT = '[data-signin]';
9
+ const FILL = 'var(--popover,var(--panel))';
10
+ const EDGE = 'var(--border,var(--edge))';
11
+ const STRONG = 'var(--border-strong,var(--bound))';
12
+ const INK = 'var(--foreground,var(--ink))';
13
+ const MUTE = 'var(--muted-foreground,var(--quiet))';
14
+ const FONT = 'var(--font-sans,Zen,system-ui,sans-serif)';
15
+ const LIFT = 'transform .2s cubic-bezier(.16,1,.3,1),border-color .2s,background-color .2s,opacity .2s';
16
+ /**
17
+ * Weight enough to outrank gui's atomic classes on this library's own controls,
18
+ * its per-theme ones included (`:root:root.t_light ._bxsh-…`, a filled Action's
19
+ * light shadow): an id's weight, matching every element (none is `#_`).
20
+ */
21
+ const OVER = ':not(#_)';
22
+ /**
23
+ * This library's Action, wherever it is set in the card. Its corners are stated
24
+ * `!important` too: a host may hold every Action round with an `!important` rule
25
+ * of its own (hanzo-inc/app app/layout.tsx `[data-slot="action"]`), and inside
26
+ * the card this scoped, weightier rule is the one that stands.
27
+ */
28
+ const ACTION = `:is(button,a)[data-slot="action"]${OVER}`;
29
+ /** This library's Input, alone; inside an InputGroup the group is the box. */
30
+ const INPUT = `input[data-slot="input"]:not([data-slot="input-group"] *)${OVER}`;
31
+ const GROUP = `[data-slot="input-group"]${OVER}`;
32
+ /** Every rule the sign-in's controls are drawn by, scoped to the card. */
33
+ exports.SIGNIN_STYLE = `${AT} [data-signin-body]{container-type:inline-size;display:flex;flex-direction:column;gap:10px;width:100%}` +
34
+ // Equal halves no label can widen: a bare `1fr` keeps its label's width as
35
+ // its floor, and "Continue with Google" would push the pair past the field.
36
+ `${AT} [data-signin-pair]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%}` +
37
+ `${AT} [data-signin-pair]>:last-child:nth-child(odd){grid-column:1/-1}` +
38
+ `@container (max-width:379.98px){${AT} [data-signin-pair]{grid-template-columns:minmax(0,1fr)}}` +
39
+ `${AT} [data-signin-btn]{box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:9px;width:100%;height:46px;margin:0;padding:0 14px;border-radius:14px;border:1px solid ${EDGE};background:${FILL};color:${INK};font-family:${FONT};font-size:14px;font-weight:500;line-height:1;white-space:nowrap;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.04);transition:${LIFT}}` +
40
+ `${AT} ${ACTION}{box-sizing:border-box;height:46px;min-height:46px;padding:0 14px;gap:9px;border-radius:14px!important;border:1px solid ${EDGE};background:${FILL};color:${INK};font-family:${FONT};font-size:14px;font-weight:500;line-height:1;box-shadow:0 1px 2px rgba(0,0,0,.04);backdrop-filter:none;-webkit-backdrop-filter:none;transition:${LIFT}}` +
41
+ `${AT} [data-signin-btn]:hover:not(:disabled),${AT} ${ACTION}:hover:not(:disabled){border-color:${STRONG};transform:translateY(-2px)}` +
42
+ `${AT} [data-signin-btn]:active:not(:disabled),${AT} ${ACTION}:active:not(:disabled){transform:scale(.98)}` +
43
+ `${AT} [data-signin-btn]:disabled,${AT} ${ACTION}:disabled{opacity:.55;cursor:not-allowed}` +
44
+ `${AT} [data-signin-btn][data-solid],${AT} ${ACTION}[data-fill]{background:${INK};color:var(--background);border-color:${INK}}` +
45
+ `${AT} [data-signin-btn][data-solid]:hover:not(:disabled),${AT} ${ACTION}[data-fill]:hover:not(:disabled){background:${INK};color:var(--background);border-color:${INK};opacity:.92;transform:none}` +
46
+ `${AT} [data-signin-btn] svg{flex-shrink:0}` +
47
+ `${AT} [data-signin-or]{display:flex;align-items:center;gap:12px;font-size:12.5px;color:${MUTE}}` +
48
+ `${AT} [data-signin-or]::before,${AT} [data-signin-or]::after{content:'';flex:1;height:1px;background:${EDGE}}` +
49
+ `${AT} [data-signin-form]{display:flex;flex-direction:column;gap:10px;margin:0}` +
50
+ `${AT} [data-signin-field]{box-sizing:border-box;width:100%;height:46px;margin:0;padding:0 16px;border-radius:14px;border:1px solid ${EDGE};background-color:${FILL};color:${INK};font-family:${FONT};font-size:14px;outline:none}` +
51
+ `${AT} ${INPUT}{height:46px;border-radius:14px;font-size:14px;background-color:${FILL}}` +
52
+ `${AT} ${INPUT}:not([aria-invalid="true"]){border-color:${EDGE}}` +
53
+ `${AT} ${GROUP}{border-radius:14px;background-color:${FILL}}` +
54
+ `${AT} ${GROUP}:not([data-focused]):not([data-invalid]){border-color:${EDGE}}` +
55
+ `${AT} [data-signin-field]::placeholder{color:${MUTE}}` +
56
+ `${AT} [data-signin-field]:focus-visible,${AT} ${INPUT}:not([aria-invalid="true"]):focus-visible{border-color:${STRONG};box-shadow:0 0 0 2px var(--ring,${STRONG})}` +
57
+ `${AT} ${GROUP}[data-focused]:not([data-invalid]){border-color:${STRONG}}` +
58
+ `${AT} [data-signin-wrong]{margin:0;font-size:13px;color:var(--destructive,#e5484d)}` +
59
+ `${AT} [data-signin-quiet]{margin:0;font-size:13px;color:${MUTE}}` +
60
+ `${AT} [data-signin-quiet] button{padding:0;border:0;background:none;color:${INK};font:inherit;cursor:pointer}` +
61
+ `${AT} [data-signin-quiet] button:hover:not(:disabled){text-decoration:underline}` +
62
+ `${AT} [data-signin-terms]{margin:0;max-width:400px;text-align:center;font-size:12px;line-height:18px;color:${MUTE}}` +
63
+ `${AT} [data-signin-terms] a{color:${INK};text-decoration:none}` +
64
+ `${AT} [data-signin-terms] a:hover{text-decoration:underline;text-underline-offset:2px}`;
65
+ /** The card a sign-in is drawn in, carrying the rules its controls are drawn by. */
66
+ function SignInCard({ background = '$background', borderColor = '$borderColor', bare = false, slot = 'signin-panel', children, ...rest }) {
67
+ const card = bare ? {} : { bg: background, borderWidth: 1, borderColor, rounded: '$6', p: '$6' };
68
+ return ((0, jsx_runtime_1.jsxs)(layout_1.YStack, { "data-signin": "", "data-slot": slot, "data-surface": bare ? 'bare' : 'card', width: "100%", maxW: bare ? 400 : 464, items: "center", gap: "$3", ...card, ...rest, children: [(0, jsx_runtime_1.jsx)("style", { dangerouslySetInnerHTML: { __html: exports.SIGNIN_STYLE } }), children] }));
69
+ }
@@ -0,0 +1,59 @@
1
+ import type { ComponentProps, ReactNode } from 'react';
2
+ import { YStack } from '../backends/gui/layout.js';
3
+ /**
4
+ * The look every Hanzo sign-in shares: the card and the rules its controls are
5
+ * drawn by. The shared panel (./SignInPanel.tsx) is drawn on it, and so is
6
+ * hanzo.ai's own sign-in (hanzo-inc/app components/auth/steps.tsx `Sheet`, which
7
+ * keeps its own steps: the code, the password, the phone, the second factor).
8
+ * Both read these rules, so a front page and the page it hands off to cannot
9
+ * drift apart.
10
+ *
11
+ * The rules are hanzo.app's front-page sign-in (hanzo-inc/app steps.tsx
12
+ * `HERO_STYLE`): 46px controls with 14px corners, the providers side by side,
13
+ * one solid control. They are carried as one stylesheet scoped to the card
14
+ * (`data-signin`), set raw, so the host imports none. They read design's custom
15
+ * properties (`--popover`, `--border`, `--border-strong`, `--foreground`,
16
+ * `--muted-foreground`) with gui's theme keys behind them, so a host without
17
+ * design's sheet still draws it.
18
+ *
19
+ * What a host draws inside reads them by attribute:
20
+ *
21
+ * [data-signin-body] the column the controls stand in
22
+ * [data-signin-pair] the providers, side by side (stacked under 380px of room)
23
+ * [data-signin-btn] a control; with [data-solid], the one solid control
24
+ * [data-signin-or] the word between the providers and the address
25
+ * [data-signin-form] a form in the column
26
+ * [data-signin-field] a plain address field
27
+ * [data-signin-wrong] what went wrong; [data-signin-quiet] a quiet line
28
+ * [data-signin-terms] the terms line
29
+ *
30
+ * and this library's own controls set in the card take the same box without
31
+ * being marked: an Input or an InputGroup is the field (its padding stays its
32
+ * own, so a password's eye keeps its well), and an Action is the control, the
33
+ * filled one the solid control.
34
+ *
35
+ * The card is a solid ground inside a hairline, since a front page draws it over
36
+ * a busy backdrop. It is the site's to colour (`background`, `borderColor`: a
37
+ * theme token or any CSS colour), and `bare` drops it for a host that sets the
38
+ * sign-in in a card of its own, or on a quiet page. Inside the card the controls
39
+ * keep a 400px measure, so the card is 464px wide.
40
+ */
41
+ export interface SignInCardProps extends Omit<ComponentProps<typeof YStack>, 'bg' | 'background' | 'borderColor'> {
42
+ /** The card's ground: a theme token (`$panel`) or any CSS colour. Default `$background`, solid. */
43
+ background?: Paint;
44
+ /** The card's hairline: a theme token or any CSS colour. Default `$borderColor`. */
45
+ borderColor?: Paint;
46
+ /** No card: the controls alone, 400px wide at most. */
47
+ bare?: boolean;
48
+ /** The `data-slot` a host finds the card by. Default `signin-panel`. */
49
+ slot?: string;
50
+ children?: ReactNode;
51
+ }
52
+ /** A colour the card takes, as the stack it is drawn on takes one. */
53
+ type Paint = ComponentProps<typeof YStack>['bg'];
54
+ /** Every rule the sign-in's controls are drawn by, scoped to the card. */
55
+ export declare const SIGNIN_STYLE: string;
56
+ /** The card a sign-in is drawn in, carrying the rules its controls are drawn by. */
57
+ export declare function SignInCard({ background, borderColor, bare, slot, children, ...rest }: SignInCardProps): import("react").JSX.Element;
58
+ export {};
59
+ //# sourceMappingURL=look.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"look.d.ts","sourceRoot":"","sources":["../../src/auth/look.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,IAAI,GAAG,YAAY,GAAG,aAAa,CAAC;IAC/G,mGAAmG;IACnG,UAAU,CAAC,EAAE,KAAK,CAAA;IAClB,oFAAoF;IACpF,WAAW,CAAC,EAAE,KAAK,CAAA;IACnB,uDAAuD;IACvD,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,wEAAwE;IACxE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED,sEAAsE;AACtE,KAAK,KAAK,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,IAAI,CAAC,CAAA;AA4BhD,0EAA0E;AAC1E,eAAO,MAAM,YAAY,QAgCiE,CAAA;AAE1F,oFAAoF;AACpF,wBAAgB,UAAU,CAAC,EAAE,UAA0B,EAAE,WAA4B,EAAE,IAAY,EAAE,IAAqB,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,eAAe,+BAS/J"}
@@ -0,0 +1,66 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { YStack } from '../backends/gui/layout.js';
4
+ const AT = '[data-signin]';
5
+ const FILL = 'var(--popover,var(--panel))';
6
+ const EDGE = 'var(--border,var(--edge))';
7
+ const STRONG = 'var(--border-strong,var(--bound))';
8
+ const INK = 'var(--foreground,var(--ink))';
9
+ const MUTE = 'var(--muted-foreground,var(--quiet))';
10
+ const FONT = 'var(--font-sans,Zen,system-ui,sans-serif)';
11
+ const LIFT = 'transform .2s cubic-bezier(.16,1,.3,1),border-color .2s,background-color .2s,opacity .2s';
12
+ /**
13
+ * Weight enough to outrank gui's atomic classes on this library's own controls,
14
+ * its per-theme ones included (`:root:root.t_light ._bxsh-…`, a filled Action's
15
+ * light shadow): an id's weight, matching every element (none is `#_`).
16
+ */
17
+ const OVER = ':not(#_)';
18
+ /**
19
+ * This library's Action, wherever it is set in the card. Its corners are stated
20
+ * `!important` too: a host may hold every Action round with an `!important` rule
21
+ * of its own (hanzo-inc/app app/layout.tsx `[data-slot="action"]`), and inside
22
+ * the card this scoped, weightier rule is the one that stands.
23
+ */
24
+ const ACTION = `:is(button,a)[data-slot="action"]${OVER}`;
25
+ /** This library's Input, alone; inside an InputGroup the group is the box. */
26
+ const INPUT = `input[data-slot="input"]:not([data-slot="input-group"] *)${OVER}`;
27
+ const GROUP = `[data-slot="input-group"]${OVER}`;
28
+ /** Every rule the sign-in's controls are drawn by, scoped to the card. */
29
+ export const SIGNIN_STYLE = `${AT} [data-signin-body]{container-type:inline-size;display:flex;flex-direction:column;gap:10px;width:100%}` +
30
+ // Equal halves no label can widen: a bare `1fr` keeps its label's width as
31
+ // its floor, and "Continue with Google" would push the pair past the field.
32
+ `${AT} [data-signin-pair]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%}` +
33
+ `${AT} [data-signin-pair]>:last-child:nth-child(odd){grid-column:1/-1}` +
34
+ `@container (max-width:379.98px){${AT} [data-signin-pair]{grid-template-columns:minmax(0,1fr)}}` +
35
+ `${AT} [data-signin-btn]{box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:9px;width:100%;height:46px;margin:0;padding:0 14px;border-radius:14px;border:1px solid ${EDGE};background:${FILL};color:${INK};font-family:${FONT};font-size:14px;font-weight:500;line-height:1;white-space:nowrap;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.04);transition:${LIFT}}` +
36
+ `${AT} ${ACTION}{box-sizing:border-box;height:46px;min-height:46px;padding:0 14px;gap:9px;border-radius:14px!important;border:1px solid ${EDGE};background:${FILL};color:${INK};font-family:${FONT};font-size:14px;font-weight:500;line-height:1;box-shadow:0 1px 2px rgba(0,0,0,.04);backdrop-filter:none;-webkit-backdrop-filter:none;transition:${LIFT}}` +
37
+ `${AT} [data-signin-btn]:hover:not(:disabled),${AT} ${ACTION}:hover:not(:disabled){border-color:${STRONG};transform:translateY(-2px)}` +
38
+ `${AT} [data-signin-btn]:active:not(:disabled),${AT} ${ACTION}:active:not(:disabled){transform:scale(.98)}` +
39
+ `${AT} [data-signin-btn]:disabled,${AT} ${ACTION}:disabled{opacity:.55;cursor:not-allowed}` +
40
+ `${AT} [data-signin-btn][data-solid],${AT} ${ACTION}[data-fill]{background:${INK};color:var(--background);border-color:${INK}}` +
41
+ `${AT} [data-signin-btn][data-solid]:hover:not(:disabled),${AT} ${ACTION}[data-fill]:hover:not(:disabled){background:${INK};color:var(--background);border-color:${INK};opacity:.92;transform:none}` +
42
+ `${AT} [data-signin-btn] svg{flex-shrink:0}` +
43
+ `${AT} [data-signin-or]{display:flex;align-items:center;gap:12px;font-size:12.5px;color:${MUTE}}` +
44
+ `${AT} [data-signin-or]::before,${AT} [data-signin-or]::after{content:'';flex:1;height:1px;background:${EDGE}}` +
45
+ `${AT} [data-signin-form]{display:flex;flex-direction:column;gap:10px;margin:0}` +
46
+ `${AT} [data-signin-field]{box-sizing:border-box;width:100%;height:46px;margin:0;padding:0 16px;border-radius:14px;border:1px solid ${EDGE};background-color:${FILL};color:${INK};font-family:${FONT};font-size:14px;outline:none}` +
47
+ `${AT} ${INPUT}{height:46px;border-radius:14px;font-size:14px;background-color:${FILL}}` +
48
+ `${AT} ${INPUT}:not([aria-invalid="true"]){border-color:${EDGE}}` +
49
+ `${AT} ${GROUP}{border-radius:14px;background-color:${FILL}}` +
50
+ `${AT} ${GROUP}:not([data-focused]):not([data-invalid]){border-color:${EDGE}}` +
51
+ `${AT} [data-signin-field]::placeholder{color:${MUTE}}` +
52
+ `${AT} [data-signin-field]:focus-visible,${AT} ${INPUT}:not([aria-invalid="true"]):focus-visible{border-color:${STRONG};box-shadow:0 0 0 2px var(--ring,${STRONG})}` +
53
+ `${AT} ${GROUP}[data-focused]:not([data-invalid]){border-color:${STRONG}}` +
54
+ `${AT} [data-signin-wrong]{margin:0;font-size:13px;color:var(--destructive,#e5484d)}` +
55
+ `${AT} [data-signin-quiet]{margin:0;font-size:13px;color:${MUTE}}` +
56
+ `${AT} [data-signin-quiet] button{padding:0;border:0;background:none;color:${INK};font:inherit;cursor:pointer}` +
57
+ `${AT} [data-signin-quiet] button:hover:not(:disabled){text-decoration:underline}` +
58
+ `${AT} [data-signin-terms]{margin:0;max-width:400px;text-align:center;font-size:12px;line-height:18px;color:${MUTE}}` +
59
+ `${AT} [data-signin-terms] a{color:${INK};text-decoration:none}` +
60
+ `${AT} [data-signin-terms] a:hover{text-decoration:underline;text-underline-offset:2px}`;
61
+ /** The card a sign-in is drawn in, carrying the rules its controls are drawn by. */
62
+ export function SignInCard({ background = '$background', borderColor = '$borderColor', bare = false, slot = 'signin-panel', children, ...rest }) {
63
+ const card = bare ? {} : { bg: background, borderWidth: 1, borderColor, rounded: '$6', p: '$6' };
64
+ return (_jsxs(YStack, { "data-signin": "", "data-slot": slot, "data-surface": bare ? 'bare' : 'card', width: "100%", maxW: bare ? 400 : 464, items: "center", gap: "$3", ...card, ...rest, children: [_jsx("style", { dangerouslySetInnerHTML: { __html: SIGNIN_STYLE } }), children] }));
65
+ }
66
+ //# sourceMappingURL=look.js.map
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AM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAE,EAAE,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAY,CAAA;IAC3G,OAAO,CACL,MAAC,MAAM,mBAAa,EAAE,eAAY,IAAI,kBAAgB,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,EAAC,QAAQ,EAAC,GAAG,EAAC,IAAI,KAAK,IAAI,KAAM,IAAI,aAE3J,gBAAO,uBAAuB,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,GAAI,EAC3D,QAAQ,IACF,CACV,CAAA;AACH,CAAC"}
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SIGNIN = exports.handoff = exports.address = exports.SignInPanel = void 0;
3
+ exports.SignInCard = exports.SIGNIN_STYLE = exports.SIGNIN = exports.handoff = exports.address = exports.SignInPanel = void 0;
4
4
  /**
5
5
  * The shared sign-in panel and its hand-off, alone: what a Hanzo site draws on
6
- * its front page (./SignInPanel.tsx) and where each press goes (./handoff.ts).
6
+ * its front page (./SignInPanel.tsx), where each press goes (./handoff.ts), and
7
+ * the card and rules both it and hanzo.ai's own sign-in are drawn by (./look.tsx).
7
8
  *
8
9
  * Its own entry so importing the panel does not load the in-place sign-in form
9
10
  * (./SignIn.tsx), which needs a newer @hanzo/iam (`SecondFactor`) and
@@ -17,3 +18,6 @@ var handoff_1 = require("./handoff.cjs");
17
18
  Object.defineProperty(exports, "address", { enumerable: true, get: function () { return handoff_1.address; } });
18
19
  Object.defineProperty(exports, "handoff", { enumerable: true, get: function () { return handoff_1.handoff; } });
19
20
  Object.defineProperty(exports, "SIGNIN", { enumerable: true, get: function () { return handoff_1.SIGNIN; } });
21
+ var look_1 = require("./look.cjs");
22
+ Object.defineProperty(exports, "SIGNIN_STYLE", { enumerable: true, get: function () { return look_1.SIGNIN_STYLE; } });
23
+ Object.defineProperty(exports, "SignInCard", { enumerable: true, get: function () { return look_1.SignInCard; } });
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * The shared sign-in panel and its hand-off, alone: what a Hanzo site draws on
3
- * its front page (./SignInPanel.tsx) and where each press goes (./handoff.ts).
3
+ * its front page (./SignInPanel.tsx), where each press goes (./handoff.ts), and
4
+ * the card and rules both it and hanzo.ai's own sign-in are drawn by (./look.tsx).
4
5
  *
5
6
  * Its own entry so importing the panel does not load the in-place sign-in form
6
7
  * (./SignIn.tsx), which needs a newer @hanzo/iam (`SecondFactor`) and
@@ -10,4 +11,5 @@
10
11
  */
11
12
  export { SignInPanel, type SignInPanelProps } from './SignInPanel.js';
12
13
  export { address, handoff, SIGNIN, type ProviderKind, type Way } from './handoff.js';
14
+ export { SIGNIN_STYLE, SignInCard, type SignInCardProps } from './look.js';
13
15
  //# sourceMappingURL=panel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../src/auth/panel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,KAAK,GAAG,EAAE,MAAM,WAAW,CAAA"}
1
+ {"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../src/auth/panel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,KAAK,GAAG,EAAE,MAAM,WAAW,CAAA;AACjF,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,QAAQ,CAAA"}
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * The shared sign-in panel and its hand-off, alone: what a Hanzo site draws on
3
- * its front page (./SignInPanel.tsx) and where each press goes (./handoff.ts).
3
+ * its front page (./SignInPanel.tsx), where each press goes (./handoff.ts), and
4
+ * the card and rules both it and hanzo.ai's own sign-in are drawn by (./look.tsx).
4
5
  *
5
6
  * Its own entry so importing the panel does not load the in-place sign-in form
6
7
  * (./SignIn.tsx), which needs a newer @hanzo/iam (`SecondFactor`) and
@@ -10,4 +11,5 @@
10
11
  */
11
12
  export { SignInPanel } from './SignInPanel.js';
12
13
  export { address, handoff, SIGNIN } from './handoff.js';
14
+ export { SIGNIN_STYLE, SignInCard } from './look.js';
13
15
  //# sourceMappingURL=panel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"panel.js","sourceRoot":"","sources":["../../src/auth/panel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,WAAW,EAAyB,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAA+B,MAAM,WAAW,CAAA"}
1
+ {"version":3,"file":"panel.js","sourceRoot":"","sources":["../../src/auth/panel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,WAAW,EAAyB,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAA+B,MAAM,WAAW,CAAA;AACjF,OAAO,EAAE,YAAY,EAAE,UAAU,EAAwB,MAAM,QAAQ,CAAA"}
package/dist/gallery.html CHANGED
@@ -1,4 +1,4 @@
1
- <!doctype html><html lang="en" class="t_dark"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>@hanzo/ui 8.32.4</title><style>/* @hanzo/ui — generated by scripts/gen-css.mjs. Do not edit. */
1
+ <!doctype html><html lang="en" class="t_dark"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>@hanzo/ui 8.33.1</title><style>/* @hanzo/ui — generated by scripts/gen-css.mjs. Do not edit. */
2
2
  :root { --hanzo-ui-styles: 1; }
3
3
  /* Hanzo Design System — the entry point. Import THIS one file.
4
4
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/ui",
3
- "version": "8.32.4",
3
+ "version": "8.33.1",
4
4
  "type": "module",
5
5
  "description": "Hanzo UI — the one canonical Hanzo component library, on @hanzo/gui + @hanzo/design. ONE substrate: every component renders through @hanzo/gui primitives, so the same import works on web, native (expo) and desktop (Tauri). Self-contained (theme.css), presentational, host-agnostic, clean-room.",
6
6
  "exports": {