@hanzo/app 0.3.94 → 0.3.96
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/Account.d.ts +9 -3
- package/dist/Account.js +142 -141
- package/dist/App.js +71 -37
- package/dist/Bar.js +1 -1
- package/dist/Betas.d.ts +1 -1
- package/dist/Betas.js +16 -22
- package/dist/Board.js +114 -48
- package/dist/CalScheduler.d.ts +1 -0
- package/dist/CalScheduler.js +223 -57
- package/dist/Chat.js +432 -153
- package/dist/Contacts.js +35 -31
- package/dist/ContextMenu.js +126 -42
- package/dist/Directory.js +1 -1
- package/dist/Drawer.js +1 -1
- package/dist/Drive.js +351 -119
- package/dist/Gate.js +156 -13
- package/dist/Home.js +31 -53
- package/dist/Inbox.js +29 -15
- package/dist/InlineRename.d.ts +6 -0
- package/dist/InlineRename.js +41 -0
- package/dist/Learning.js +132 -13
- package/dist/Market.js +13 -9
- package/dist/Meet.d.ts +5 -0
- package/dist/Meet.js +75 -51
- package/dist/MoreMenu.d.ts +19 -0
- package/dist/MoreMenu.js +33 -0
- package/dist/NeedMoreUsage.js +2 -2
- package/dist/OrgSwitcher.js +6 -2
- package/dist/PreferencesDialog.js +5 -2
- package/dist/Rail.d.ts +73 -7
- package/dist/Rail.js +372 -111
- package/dist/Recents.js +77 -24
- package/dist/RightPane.js +2 -2
- package/dist/Search.d.ts +13 -1
- package/dist/Search.js +366 -50
- package/dist/Setup.js +34 -5
- package/dist/Shared.js +12 -12
- package/dist/Shell.d.ts +10 -0
- package/dist/Shell.js +258 -158
- package/dist/Sidebar.d.ts +14 -3
- package/dist/Sidebar.js +411 -129
- package/dist/SkipLink.d.ts +8 -0
- package/dist/SkipLink.js +11 -0
- package/dist/Start.js +51 -52
- package/dist/Terminals.js +159 -11
- package/dist/ToBottom.js +1 -1
- package/dist/Upgrade.d.ts +8 -3
- package/dist/Upgrade.js +194 -103
- package/dist/Usage.d.ts +1 -1
- package/dist/Usage.js +186 -82
- package/dist/WalletPill.js +8 -2
- package/dist/Work.js +162 -53
- package/dist/archive.d.ts +8 -0
- package/dist/archive.js +16 -0
- package/dist/bots/Bots.js +16 -1
- package/dist/bots/ComputerDialog.js +53 -26
- package/dist/bots/ConnectorsDialog.js +34 -15
- package/dist/bots/Make.js +5 -1
- package/dist/bots/Panel.js +37 -31
- package/dist/bots/Roster.d.ts +4 -1
- package/dist/bots/Roster.js +71 -25
- package/dist/bots/Thread.js +54 -27
- package/dist/bots/face.js +9 -3
- package/dist/bots/grid.d.ts +36 -0
- package/dist/bots/grid.js +91 -0
- package/dist/bots/ink.d.ts +1 -1
- package/dist/bots/ink.js +1 -1
- package/dist/bots/kit.d.ts +9 -4
- package/dist/bots/kit.js +3 -2
- package/dist/chord.d.ts +13 -0
- package/dist/chord.js +30 -1
- package/dist/crew.js +47 -4
- package/dist/ground.d.ts +2 -2
- package/dist/ground.js +3 -3
- package/dist/help.d.ts +7 -3
- package/dist/help.js +19 -14
- package/dist/keys.d.ts +28 -0
- package/dist/keys.js +58 -0
- package/dist/lib/arrival.d.ts +5 -0
- package/dist/lib/arrival.js +10 -0
- package/dist/lib/betas.d.ts +2 -0
- package/dist/lib/betas.js +10 -0
- package/dist/lib/branch.d.ts +11 -0
- package/dist/lib/branch.js +11 -0
- package/dist/lib/chatPreferences.d.ts +1 -1
- package/dist/lib/chatPreferences.js +1 -1
- package/dist/lib/dev-mode.d.ts +18 -0
- package/dist/lib/dev-mode.js +102 -0
- package/dist/lib/durable.d.ts +1 -1
- package/dist/lib/durable.js +1 -1
- package/dist/lib/info-hint.d.ts +7 -0
- package/dist/lib/info-hint.js +8 -0
- package/dist/lib/model-picker.d.ts +2 -0
- package/dist/lib/model-picker.js +12 -0
- package/dist/lib/owners.d.ts +5 -0
- package/dist/lib/owners.js +15 -0
- package/dist/lib/pay.d.ts +2 -0
- package/dist/lib/pay.js +4 -0
- package/dist/lib/todo.d.ts +7 -1
- package/dist/lib/todo.js +41 -29
- package/dist/look.js +39 -8
- package/dist/rail-open.d.ts +9 -0
- package/dist/rail-open.js +34 -0
- package/dist/renaming.d.ts +10 -0
- package/dist/renaming.js +25 -0
- package/dist/seek.d.ts +6 -1
- package/dist/seek.js +13 -0
- package/dist/thread.d.ts +2 -1
- package/dist/thread.js +85 -44
- package/package.json +11 -11
package/dist/Setup.js
CHANGED
|
@@ -31,7 +31,7 @@ import { scope } from './lib/session.js';
|
|
|
31
31
|
import { enter } from './lib/destination.js';
|
|
32
32
|
import { brand, site } from './where.js';
|
|
33
33
|
import { GOOGLE_ACCOUNTS_KEY, GOOGLE_KEY, accounts, connect, drop, keep } from './lib/gmail.js';
|
|
34
|
-
import { GOOD } from './lib/mix.js';
|
|
34
|
+
import { BAD, GOOD } from './lib/mix.js';
|
|
35
35
|
import { RETURN, awaitAnswer } from './lib/oauth.js';
|
|
36
36
|
export const LATER_KEY = 'hanzo.onboarding.later';
|
|
37
37
|
export const GITHUB_KEY = 'hanzo.onboarding.github';
|
|
@@ -40,6 +40,7 @@ export const STEP_KEY = 'hanzo.onboarding.step';
|
|
|
40
40
|
export const PLUGIN_KEY = 'hanzo.onboarding.plugin';
|
|
41
41
|
/** Where plugins and connectors live: Dev's Customize. */
|
|
42
42
|
const PLUGINS = '-/customize/plugins';
|
|
43
|
+
const FOCUS_RING = { outlineWidth: 2, outlineStyle: 'solid', outlineColor: 'var(--ring)' };
|
|
43
44
|
/** Null when neither answered. /v1/connection lists `connections`; nothing else is read from it. */
|
|
44
45
|
export function linked(providersData, connectionsData) {
|
|
45
46
|
const providers = providersData?.providers;
|
|
@@ -308,10 +309,36 @@ export function Setup({ go } = {}) {
|
|
|
308
309
|
setBusy(null);
|
|
309
310
|
}
|
|
310
311
|
};
|
|
312
|
+
const notifyConnected = (provider) => {
|
|
313
|
+
void import('@hanzo/ui').then((mod) => {
|
|
314
|
+
if ('toast' in mod && typeof mod.toast?.success === 'function') {
|
|
315
|
+
mod.toast.success(t('{provider} connected', { provider }));
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
};
|
|
319
|
+
const dismissSetup = () => {
|
|
320
|
+
setModalOpen(false);
|
|
321
|
+
setLater(true);
|
|
322
|
+
void import('@hanzo/ui').then((mod) => {
|
|
323
|
+
if ('toast' in mod && typeof mod.toast === 'function') {
|
|
324
|
+
mod.toast(t('Quick setup hidden'), {
|
|
325
|
+
id: 'hanzo:setup-dismissed',
|
|
326
|
+
duration: 5000,
|
|
327
|
+
action: {
|
|
328
|
+
label: t('Undo'),
|
|
329
|
+
onClick: () => {
|
|
330
|
+
setLater(false);
|
|
331
|
+
},
|
|
332
|
+
},
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
};
|
|
311
337
|
// 1. Connect GitHub
|
|
312
338
|
const handleConnectGithub = () => connectOAuthProvider('github', 'GitHub', () => {
|
|
313
339
|
setGithubDone(true);
|
|
314
340
|
setStep(slackDone ? 3 : 2);
|
|
341
|
+
notifyConnected('GitHub');
|
|
315
342
|
});
|
|
316
343
|
// Let go of GitHub, so another account can be connected, as Projects does: the
|
|
317
344
|
// reader's own link first, else the org's GitHub accounts. For those the platform
|
|
@@ -353,20 +380,22 @@ export function Setup({ go } = {}) {
|
|
|
353
380
|
const handleConnectSlack = () => connectOAuthProvider('slack', 'Slack', () => {
|
|
354
381
|
setSlackDone(true);
|
|
355
382
|
setStep(3);
|
|
383
|
+
notifyConnected('Slack');
|
|
356
384
|
});
|
|
357
385
|
// Google Workspace, the private beta (Drive, Docs, Sheets, Gmail & Calendar; one or many accounts)
|
|
358
386
|
const handleConnectGoogle = () => connectOAuthProvider('google', 'Google', () => {
|
|
359
387
|
setGoogleDone(true);
|
|
388
|
+
notifyConnected('Google Workspace');
|
|
360
389
|
});
|
|
361
|
-
return (_jsxs(_Fragment, { children: [_jsxs(YStack, { "data-slot": "setup", role: "region", "aria-label": t('Onboarding (1-2-3)'), gap: "$2.5", p: "$3", rounded: "$4", borderWidth: 1, borderColor: "$borderColor", bg: "$raised", width: "100%", maxW: "100%", minW: 0, overflow: "hidden", children: [_jsxs(XStack, { items: "center", justify: "space-between", gap: "$1.5", minW: 0, children: [_jsxs(XStack, { items: "center", gap: "$1.5", minW: 0, flex: 1, children: [_jsx(Sparkles, { size: 15, color: "var(--primary)", "aria-hidden": true }), _jsx(SizableText, { size: "$2", fontWeight: "600", color: "$ink", numberOfLines: 1, children: allDone ? t('Onboarding complete') : t('Quick setup ({n}/3)', { n: totalDone }) })] }), _jsxs(XStack, { items: "center", gap: "$1", shrink: 0, children: [_jsx(Box, { render: "button", "aria-label": t('Expand onboarding popup'), onClick: () => setModalOpen(true), p: "$1", rounded: 999, hoverStyle: { bg: '$hover' }, cursor: "pointer", children: _jsx(Maximize2, { size: 13, "aria-hidden": true, color: "$soft" }) }), _jsx(Box, { render: "button", "aria-label": t('Dismiss'), onClick: () => setLater(true), p: "$1", rounded: 999, hoverStyle: { bg: '$hover' }, cursor: "pointer", children: _jsx(X, { size: 13, "aria-hidden": true, color: "$soft" }) })] })] }), _jsxs(XStack, { gap: "$1", width: "100%", children: [_jsx(Box, { render: "button", "aria-label": t('Step 1: Connect GitHub'), onClick: () => setStep(1), flex: 1, height: 6, rounded: 3, bg: githubDone ? GOOD : activeStep === 1 ? '$ink' : '$edge', cursor: "pointer" }), _jsx(Box, { render: "button", "aria-label": t('Step 2: Connect Slack'), onClick: () => setStep(2), flex: 1, height: 6, rounded: 3, bg: slackDone ? GOOD : activeStep === 2 ? '$ink' : '$edge', cursor: "pointer" }), _jsx(Box, { render: "button", "aria-label": t('Step 3: Connect a plugin'), onClick: () => setStep(3), flex: 1, height: 6, rounded: 3, bg: pluginDone ? GOOD : activeStep === 3 ? '$ink' : '$edge', cursor: "pointer" })] }), allDone ? (_jsxs(YStack, { gap: "$2", pt: "$1", children: [_jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(Check, { size: 16, color: GOOD, "aria-hidden": true }), _jsx(Text, { fontSize: "$2", color: "$ink", fontWeight: "500", children: t('GitHub, Slack & a plugin connected') })] }), workspace && accountList.length > 0 ? (_jsx(XStack, { gap: "$1", flexWrap: "wrap", children: accountList.map((acct) => (_jsxs(XStack, { items: "center", gap: "$1", px: "$2", py: "$0.5", rounded: "$2", bg: "$edge", children: [_jsx(Text, { fontSize: "$1", color: "$ink", numberOfLines: 1, children: acct }), _jsx(Box, { render: "button", "aria-label": t('Remove {account}', { account: acct }), onClick: () => removeGoogleAccount(acct), cursor: "pointer", children: _jsx(X, { size: 11, color: "$soft", "aria-hidden": true }) })] }, acct))) })) : null, _jsxs(XStack, { gap: "$1.5", items: "center", flexWrap: "wrap", children: [workspace ? (_jsx(Box, { render: "button", onClick: handleConnectGoogle, px: "$2.5", py: "$1", rounded: "$3", bg: "$edge", hoverStyle: { bg: '$hover' }, cursor: "pointer", children: _jsxs(XStack, { items: "center", gap: "$1", children: [_jsx(Plus, { size: 12, color: "$ink", "aria-hidden": true }), _jsx(Text, { fontSize: "$1", fontWeight: "500", color: "$ink", children: t('Add Google account') })] }) })) : null, _jsx(Box, { render: "button", onClick: () => setLater(true), px: "$2.5", py: "$1", rounded: "$3", bg: "$edge", hoverStyle: { bg: '$hover' }, items: "center", justify: "center", cursor: "pointer", children: _jsx(Text, { fontSize: "$2", fontWeight: "500", children: t('Done') }) })] })] })) : activeStep === 1 ? (_jsxs(YStack, { gap: "$2", minW: 0, children: [_jsxs(XStack, { items: "center", justify: "space-between", gap: "$1.5", flexWrap: "wrap", minW: 0, children: [_jsxs(XStack, { items: "center", gap: "$2", minW: 0, flex: 1, children: [_jsx(ProviderMark, { org: "github", size: 18 }), _jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", numberOfLines: 1, children: t('1. Connect GitHub') })] }), githubDone ? (_jsxs(XStack, { items: "center", gap: "$1", shrink: 0, children: [_jsx(Check, { size: 12, color: GOOD, "aria-hidden": true }), _jsx(Text, { fontSize: "$1", color: GOOD, fontWeight: "600", children: t('Connected') })] })) : null] }), _jsx(Text, { fontSize: "$1", color: "$soft", children: t('Sync repositories, PRs, and team repository context.') }), _jsxs(XStack, { gap: "$1.5", items: "center", pt: "$1", flexWrap: "wrap", children: [_jsx(Box, { render: "button", onClick: handleConnectGithub, "aria-disabled": busy === 'github', px: "$2.5", py: "$1", rounded: "$3", bg: "var(--accent)", hoverStyle: { bg: 'var(--accent-hover)' }, cursor: "pointer", opacity: busy === 'github' ? 0.6 : 1, children: _jsx(Text, { fontSize: "$1", fontWeight: "600", color: "var(--accent-foreground)", children: busy === 'github' ? t('Connecting…') : githubDone ? t('Reconnect') : t('Connect GitHub') }) }), githubDone ? (_jsx(Box, { render: "button", onClick: () => void handleDisconnectGithub(), "aria-disabled": busy === 'github', px: "$2", py: "$1", rounded: "$3", bg: "transparent", hoverStyle: { bg: '$hover' }, cursor: "pointer", children: _jsx(Text, { fontSize: "$1", color: dropping ? '$ink' : '$soft', children: dropping ? t('Confirm disconnect') : t('Disconnect') }) })) : null, _jsx(Box, { render: "button", onClick: () => setStep(2), px: "$2", py: "$1", rounded: "$3", bg: "transparent", hoverStyle: { bg: '$hover' }, cursor: "pointer", children: _jsx(Text, { fontSize: "$1", color: "$soft", children: t('Skip') }) })] })] })) : activeStep === 2 ? (_jsxs(YStack, { gap: "$2", minW: 0, children: [_jsxs(XStack, { items: "center", justify: "space-between", gap: "$1.5", flexWrap: "wrap", minW: 0, children: [_jsxs(XStack, { items: "center", gap: "$2", minW: 0, flex: 1, children: [_jsx(SlackMark, { size: 18 }), _jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", numberOfLines: 1, children: t('2. Connect Slack') })] }), slackDone ? (_jsxs(XStack, { items: "center", gap: "$1", shrink: 0, children: [_jsx(Check, { size: 12, color: GOOD, "aria-hidden": true }), _jsx(Text, { fontSize: "$1", color: GOOD, fontWeight: "600", children: t('Connected') })] })) : null] }), _jsx(Text, { fontSize: "$1", color: "$soft", children: t('Route agent notifications and chat in team channels.') }), _jsxs(XStack, { gap: "$1.5", items: "center", pt: "$1", flexWrap: "wrap", children: [_jsx(Box, { render: "button", onClick: handleConnectSlack, "aria-disabled": busy === 'slack', px: "$2.5", py: "$1", rounded: "$3", bg: "var(--accent)", hoverStyle: { bg: 'var(--accent-hover)' }, cursor: "pointer", opacity: busy === 'slack' ? 0.6 : 1, children: _jsx(Text, { fontSize: "$1", fontWeight: "600", color: "var(--accent-foreground)", children: busy === 'slack' ? t('Connecting…') : slackDone ? t('Reconnect') : t('Connect Slack') }) }), _jsx(Box, { render: "button", onClick: () => setStep(3), px: "$2", py: "$1", rounded: "$3", bg: "transparent", hoverStyle: { bg: '$hover' }, cursor: "pointer", children: _jsx(Text, { fontSize: "$1", color: "$soft", children: t('Skip') }) })] })] })) : (_jsxs(YStack, { gap: "$2", minW: 0, children: [_jsxs(XStack, { items: "center", justify: "space-between", gap: "$1.5", flexWrap: "wrap", minW: 0, children: [_jsxs(XStack, { items: "center", gap: "$2", minW: 0, flex: 1, children: [_jsx(Plug, { size: 18, color: "var(--foreground)", "aria-hidden": true }), _jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", numberOfLines: 1, children: t('3. Connect a plugin') })] }), pluginDone ? (_jsxs(XStack, { items: "center", gap: "$1", shrink: 0, children: [_jsx(Check, { size: 12, color: GOOD, "aria-hidden": true }), _jsx(Text, { fontSize: "$1", color: GOOD, fontWeight: "600", children: t('Connected') })] })) : null] }), _jsx(Text, { fontSize: "$1", color: "$soft", children: t('Give your agents tools: build a plugin or add an MCP server in Customize.') }), _jsxs(XStack, { gap: "$1.5", items: "center", pt: "$1", flexWrap: "wrap", children: [_jsx(Box, { render: "button", onClick: openPlugins, px: "$2.5", py: "$1", rounded: "$3", bg: "var(--accent)", hoverStyle: { bg: 'var(--accent-hover)' }, cursor: "pointer", children: _jsx(Text, { fontSize: "$1", fontWeight: "600", color: "var(--accent-foreground)", children: pluginDone ? t('Open plugins') : t('Connect a plugin') }) }), _jsx(Box, { render: "button", onClick: () => setLater(true), px: "$2", py: "$1", rounded: "$3", bg: "transparent", hoverStyle: { bg: '$hover' }, cursor: "pointer", children: _jsx(Text, { fontSize: "$1", color: "$soft", children: pluginDone ? t('Done') : t('Skip') }) })] }), workspace ? (_jsxs(YStack, { gap: "$2", minW: 0, pt: "$2", borderTopWidth: 1, borderColor: "$borderColor", "data-slot": "setup-workspace", children: [_jsxs(XStack, { items: "center", justify: "space-between", gap: "$1.5", flexWrap: "wrap", minW: 0, children: [_jsxs(XStack, { items: "center", gap: "$2", minW: 0, flex: 1, children: [_jsx(ProviderMark, { org: "google", size: 18 }), _jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", numberOfLines: 1, children: t('Google Workspace') })] }), hasGoogle ? (_jsxs(XStack, { items: "center", gap: "$1", shrink: 0, children: [_jsx(Check, { size: 12, color: GOOD, "aria-hidden": true }), _jsx(Text, { fontSize: "$1", color: GOOD, fontWeight: "600", children: accountList.length > 1
|
|
390
|
+
return (_jsxs(_Fragment, { children: [_jsxs(YStack, { "data-slot": "setup", role: "region", "aria-label": t('Onboarding (1-2-3)'), gap: "$2.5", p: "$3", rounded: "$4", borderWidth: 1, borderColor: "$borderColor", bg: "$raised", width: "100%", maxW: "100%", minW: 0, overflow: "hidden", children: [_jsxs(XStack, { items: "center", justify: "space-between", gap: "$1.5", minW: 0, children: [_jsxs(XStack, { items: "center", gap: "$1.5", minW: 0, flex: 1, children: [_jsx(Sparkles, { size: 15, color: "var(--primary)", "aria-hidden": true }), _jsx(SizableText, { size: "$2", fontWeight: "600", color: "$ink", numberOfLines: 1, children: allDone ? t('Onboarding complete') : t('Quick setup ({n}/3)', { n: totalDone }) })] }), _jsxs(XStack, { items: "center", gap: "$1", shrink: 0, children: [_jsx(Box, { render: _jsx("button", { type: "button", title: t('Expand onboarding popup') }), "aria-label": t('Expand onboarding popup'), onClick: () => setModalOpen(true), width: 26, height: 26, "$max-sm": { width: 44, height: 44 }, rounded: 999, display: "flex", items: "center", justify: "center", bg: "transparent", borderWidth: 0, hoverStyle: { bg: '$hover' }, focusVisibleStyle: FOCUS_RING, cursor: "pointer", children: _jsx(Maximize2, { size: 13, "aria-hidden": true, color: "var(--muted-foreground)" }) }), _jsx(Box, { render: _jsx("button", { type: "button", title: t('Dismiss quick setup') }), "data-slot": "setup-dismiss", "aria-label": t('Dismiss quick setup'), onClick: dismissSetup, width: 26, height: 26, "$max-sm": { width: 44, height: 44 }, rounded: 999, display: "flex", items: "center", justify: "center", bg: "transparent", borderWidth: 0, hoverStyle: { bg: '$hover' }, focusVisibleStyle: FOCUS_RING, cursor: "pointer", children: _jsx(X, { size: 14, "aria-hidden": true, color: "var(--muted-foreground)" }) })] })] }), _jsxs(XStack, { gap: "$1", width: "100%", children: [_jsx(Box, { render: "button", "aria-label": t('Step 1: Connect GitHub'), "aria-current": activeStep === 1 ? 'step' : undefined, onClick: () => setStep(1), flex: 1, height: 6, rounded: 3, borderWidth: 0, bg: githubDone ? GOOD : activeStep === 1 ? '$ink' : '$edge', hoverStyle: { opacity: 0.85 }, focusVisibleStyle: FOCUS_RING, cursor: "pointer" }), _jsx(Box, { render: "button", "aria-label": t('Step 2: Connect Slack'), "aria-current": activeStep === 2 ? 'step' : undefined, onClick: () => setStep(2), flex: 1, height: 6, rounded: 3, borderWidth: 0, bg: slackDone ? GOOD : activeStep === 2 ? '$ink' : '$edge', hoverStyle: { opacity: 0.85 }, focusVisibleStyle: FOCUS_RING, cursor: "pointer" }), _jsx(Box, { render: "button", "aria-label": t('Step 3: Connect a plugin'), "aria-current": activeStep === 3 ? 'step' : undefined, onClick: () => setStep(3), flex: 1, height: 6, rounded: 3, borderWidth: 0, bg: pluginDone ? GOOD : activeStep === 3 ? '$ink' : '$edge', hoverStyle: { opacity: 0.85 }, focusVisibleStyle: FOCUS_RING, cursor: "pointer" })] }), allDone ? (_jsxs(YStack, { gap: "$2", pt: "$1", children: [_jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(Check, { size: 16, color: GOOD, "aria-hidden": true }), _jsx(Text, { fontSize: "$2", color: "$ink", fontWeight: "500", children: t('GitHub, Slack & a plugin connected') })] }), workspace && accountList.length > 0 ? (_jsx(XStack, { gap: "$1", flexWrap: "wrap", children: accountList.map((acct) => (_jsxs(XStack, { items: "center", gap: "$1", px: "$2", py: "$0.5", rounded: "$2", bg: "$edge", children: [_jsx(Text, { fontSize: "$1", color: "$ink", numberOfLines: 1, children: acct }), _jsx(Box, { render: "button", "aria-label": t('Remove {account}', { account: acct }), onClick: () => removeGoogleAccount(acct), rounded: "$1", focusVisibleStyle: FOCUS_RING, cursor: "pointer", children: _jsx(X, { size: 11, color: "$soft", "aria-hidden": true }) })] }, acct))) })) : null, _jsxs(XStack, { gap: "$1.5", items: "center", flexWrap: "wrap", children: [workspace ? (_jsx(Box, { render: "button", onClick: handleConnectGoogle, px: "$2.5", py: "$1", "$max-sm": { minH: 44 }, rounded: "$3", bg: "$edge", hoverStyle: { bg: '$hover' }, focusVisibleStyle: FOCUS_RING, cursor: "pointer", children: _jsxs(XStack, { items: "center", gap: "$1", children: [_jsx(Plus, { size: 12, color: "$ink", "aria-hidden": true }), _jsx(Text, { fontSize: "$1", fontWeight: "500", color: "$ink", children: t('Add Google account') })] }) })) : null, _jsx(Box, { render: "button", onClick: dismissSetup, px: "$2.5", py: "$1", "$max-sm": { minH: 44 }, rounded: "$3", bg: "$edge", hoverStyle: { bg: '$hover' }, focusVisibleStyle: FOCUS_RING, items: "center", justify: "center", cursor: "pointer", children: _jsx(Text, { fontSize: "$2", fontWeight: "500", children: t('Done') }) })] })] })) : activeStep === 1 ? (_jsxs(YStack, { gap: "$2", minW: 0, children: [_jsxs(XStack, { items: "center", justify: "space-between", gap: "$1.5", flexWrap: "wrap", minW: 0, children: [_jsxs(XStack, { items: "center", gap: "$2", minW: 0, flex: 1, children: [_jsx(ProviderMark, { org: "github", size: 18 }), _jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", numberOfLines: 1, children: t('1. Connect GitHub') })] }), githubDone ? (_jsxs(XStack, { items: "center", gap: "$1", shrink: 0, children: [_jsx(Check, { size: 12, color: GOOD, "aria-hidden": true }), _jsx(Text, { fontSize: "$1", color: GOOD, fontWeight: "600", children: t('Connected') })] })) : null] }), _jsx(Text, { fontSize: "$1", color: "$soft", children: t('Sync repositories, PRs, and team repository context.') }), _jsxs(XStack, { gap: "$1.5", items: "center", pt: "$1", flexWrap: "wrap", children: [_jsx(Box, { render: "button", onClick: handleConnectGithub, "aria-disabled": busy === 'github', px: "$2.5", py: "$1", "$max-sm": { minH: 44 }, rounded: "$3", bg: "var(--accent)", borderWidth: 1, borderColor: "var(--border-strong)", hoverStyle: { bg: 'var(--accent-hover)' }, focusVisibleStyle: FOCUS_RING, cursor: "pointer", opacity: busy === 'github' ? 0.6 : 1, children: _jsx(Text, { fontSize: "$1", fontWeight: "600", color: "var(--accent-foreground)", children: busy === 'github' ? t('Connecting…') : githubDone ? t('Reconnect') : t('Connect GitHub') }) }), githubDone ? (_jsx(Box, { render: "button", onClick: () => void handleDisconnectGithub(), "aria-disabled": busy === 'github', px: "$2", py: "$1", "$max-sm": { minH: 44 }, rounded: "$3", bg: "transparent", hoverStyle: { bg: '$hover' }, focusVisibleStyle: FOCUS_RING, cursor: "pointer", children: _jsx(Text, { fontSize: "$1", color: dropping ? '$ink' : '$soft', children: dropping ? t('Confirm disconnect') : t('Disconnect') }) })) : null, _jsx(Box, { render: "button", onClick: () => setStep(2), px: "$2", py: "$1", "$max-sm": { minH: 44 }, rounded: "$3", bg: "transparent", hoverStyle: { bg: '$hover' }, focusVisibleStyle: FOCUS_RING, cursor: "pointer", children: _jsx(Text, { fontSize: "$1", color: "$soft", children: t('Skip') }) })] })] })) : activeStep === 2 ? (_jsxs(YStack, { gap: "$2", minW: 0, children: [_jsxs(XStack, { items: "center", justify: "space-between", gap: "$1.5", flexWrap: "wrap", minW: 0, children: [_jsxs(XStack, { items: "center", gap: "$2", minW: 0, flex: 1, children: [_jsx(SlackMark, { size: 18 }), _jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", numberOfLines: 1, children: t('2. Connect Slack') })] }), slackDone ? (_jsxs(XStack, { items: "center", gap: "$1", shrink: 0, children: [_jsx(Check, { size: 12, color: GOOD, "aria-hidden": true }), _jsx(Text, { fontSize: "$1", color: GOOD, fontWeight: "600", children: t('Connected') })] })) : null] }), _jsx(Text, { fontSize: "$1", color: "$soft", children: t('Route agent notifications and chat in team channels.') }), _jsxs(XStack, { gap: "$1.5", items: "center", pt: "$1", flexWrap: "wrap", children: [_jsx(Box, { render: "button", onClick: handleConnectSlack, "aria-disabled": busy === 'slack', px: "$2.5", py: "$1", "$max-sm": { minH: 44 }, rounded: "$3", bg: "var(--accent)", borderWidth: 1, borderColor: "var(--border-strong)", hoverStyle: { bg: 'var(--accent-hover)' }, focusVisibleStyle: FOCUS_RING, cursor: "pointer", opacity: busy === 'slack' ? 0.6 : 1, children: _jsx(Text, { fontSize: "$1", fontWeight: "600", color: "var(--accent-foreground)", children: busy === 'slack' ? t('Connecting…') : slackDone ? t('Reconnect') : t('Connect Slack') }) }), _jsx(Box, { render: "button", onClick: () => setStep(3), px: "$2", py: "$1", "$max-sm": { minH: 44 }, rounded: "$3", bg: "transparent", hoverStyle: { bg: '$hover' }, focusVisibleStyle: FOCUS_RING, cursor: "pointer", children: _jsx(Text, { fontSize: "$1", color: "$soft", children: t('Skip') }) })] })] })) : (_jsxs(YStack, { gap: "$2", minW: 0, children: [_jsxs(XStack, { items: "center", justify: "space-between", gap: "$1.5", flexWrap: "wrap", minW: 0, children: [_jsxs(XStack, { items: "center", gap: "$2", minW: 0, flex: 1, children: [_jsx(Plug, { size: 18, color: "var(--foreground)", "aria-hidden": true }), _jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", numberOfLines: 1, children: t('3. Connect a plugin') })] }), pluginDone ? (_jsxs(XStack, { items: "center", gap: "$1", shrink: 0, children: [_jsx(Check, { size: 12, color: GOOD, "aria-hidden": true }), _jsx(Text, { fontSize: "$1", color: GOOD, fontWeight: "600", children: t('Connected') })] })) : null] }), _jsx(Text, { fontSize: "$1", color: "$soft", children: t('Give your agents tools: build a plugin or add an MCP server in Customize.') }), _jsxs(XStack, { gap: "$1.5", items: "center", pt: "$1", flexWrap: "wrap", children: [_jsx(Box, { render: "button", onClick: openPlugins, px: "$2.5", py: "$1", "$max-sm": { minH: 44 }, rounded: "$3", bg: "var(--accent)", borderWidth: 1, borderColor: "var(--border-strong)", hoverStyle: { bg: 'var(--accent-hover)' }, focusVisibleStyle: FOCUS_RING, cursor: "pointer", children: _jsx(Text, { fontSize: "$1", fontWeight: "600", color: "var(--accent-foreground)", children: pluginDone ? t('Open plugins') : t('Connect a plugin') }) }), _jsx(Box, { render: "button", onClick: dismissSetup, px: "$2", py: "$1", "$max-sm": { minH: 44 }, rounded: "$3", bg: "transparent", hoverStyle: { bg: '$hover' }, focusVisibleStyle: FOCUS_RING, cursor: "pointer", children: _jsx(Text, { fontSize: "$1", color: "$soft", children: pluginDone ? t('Done') : t('Skip') }) })] }), workspace ? (_jsxs(YStack, { gap: "$2", minW: 0, pt: "$2", borderTopWidth: 1, borderColor: "$borderColor", "data-slot": "setup-workspace", children: [_jsxs(XStack, { items: "center", justify: "space-between", gap: "$1.5", flexWrap: "wrap", minW: 0, children: [_jsxs(XStack, { items: "center", gap: "$2", minW: 0, flex: 1, children: [_jsx(ProviderMark, { org: "google", size: 18 }), _jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", numberOfLines: 1, children: t('Google Workspace') })] }), hasGoogle ? (_jsxs(XStack, { items: "center", gap: "$1", shrink: 0, children: [_jsx(Check, { size: 12, color: GOOD, "aria-hidden": true }), _jsx(Text, { fontSize: "$1", color: GOOD, fontWeight: "600", children: accountList.length > 1
|
|
362
391
|
? t('{n} connected', { n: accountList.length })
|
|
363
|
-
: t('Connected') })] })) : null] }), _jsx(Text, { fontSize: "$1", color: "$soft", children: t('Grant Drive, Docs, Sheets, Gmail & Calendar permissions. Add personal, work, or multiple org accounts.') }), accountList.length > 0 ? (_jsx(XStack, { gap: "$1", flexWrap: "wrap", children: accountList.map((acct) => (_jsxs(XStack, { items: "center", gap: "$1", px: "$2", py: "$0.5", rounded: "$2", bg: "$edge", children: [_jsx(Text, { fontSize: "$1", color: "$ink", numberOfLines: 1, children: acct }), _jsx(Box, { render: "button", "aria-label": t('Remove {account}', { account: acct }), onClick: () => removeGoogleAccount(acct), cursor: "pointer", children: _jsx(X, { size: 11, color: "
|
|
392
|
+
: t('Connected') })] })) : null] }), _jsx(Text, { fontSize: "$1", color: "$soft", children: t('Grant Drive, Docs, Sheets, Gmail & Calendar permissions. Add personal, work, or multiple org accounts.') }), accountList.length > 0 ? (_jsx(XStack, { gap: "$1", flexWrap: "wrap", children: accountList.map((acct) => (_jsxs(XStack, { items: "center", gap: "$1", px: "$2", py: "$0.5", rounded: "$2", bg: "$edge", children: [_jsx(Text, { fontSize: "$1", color: "$ink", numberOfLines: 1, children: acct }), _jsx(Box, { render: "button", "aria-label": t('Remove {account}', { account: acct }), onClick: () => removeGoogleAccount(acct), rounded: "$1", focusVisibleStyle: FOCUS_RING, cursor: "pointer", children: _jsx(X, { size: 11, color: "var(--muted-foreground)", "aria-hidden": true }) })] }, acct))) })) : null, _jsx(XStack, { gap: "$1.5", items: "center", pt: "$1", flexWrap: "wrap", children: _jsx(Box, { render: "button", onClick: handleConnectGoogle, "aria-disabled": busy === 'google', px: "$2.5", py: "$1", "$max-sm": { minH: 44 }, rounded: "$3", bg: "var(--accent)", borderWidth: 1, borderColor: "var(--border-strong)", hoverStyle: { bg: 'var(--accent-hover)' }, focusVisibleStyle: FOCUS_RING, cursor: "pointer", opacity: busy === 'google' ? 0.6 : 1, children: _jsx(Text, { fontSize: "$1", fontWeight: "600", color: "var(--accent-foreground)", children: busy === 'google'
|
|
364
393
|
? t('Connecting…')
|
|
365
394
|
: hasGoogle
|
|
366
395
|
? t('+ Add Google account')
|
|
367
|
-
: t('Connect Google') }) }) })] })) : null] })), errorMsg ? (_jsx(Text, { fontSize: "$1", color:
|
|
396
|
+
: t('Connect Google') }) }) })] })) : null] })), errorMsg ? (_jsx(Text, { fontSize: "$1", color: BAD, children: errorMsg })) : null] }), _jsx(Dialog, { open: modalOpen, onOpenChange: setModalOpen, children: _jsxs(DialogContent, { maxW: 520, rounded: "$6", gap: "$4", p: "$5", children: [_jsx(DialogTitle, { children: _jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(Sparkles, { size: 20, color: "var(--primary)", "aria-hidden": true }), _jsx(Text, { fontSize: "$5", fontWeight: "600", color: "$ink", children: t('Set up {brand} in 3 steps', { brand: brand() }) })] }) }), _jsx(Text, { fontSize: "$2", color: "$soft", children: t('Connect your code, your team chat, and the tools your agents use.', { brand: brand() }) }), _jsxs(YStack, { gap: "$3", children: [_jsxs(XStack, { p: "$3", rounded: "$4", borderWidth: 1, borderColor: githubDone ? GOOD : '$borderColor', bg: "$raised", items: "center", justify: "space-between", gap: "$3", children: [_jsxs(XStack, { items: "center", gap: "$3", flex: 1, children: [_jsx(ProviderMark, { org: "github", size: 24 }), _jsxs(YStack, { flex: 1, minW: 0, children: [_jsx(Text, { fontSize: "$3", fontWeight: "600", color: "$ink", children: t('1. GitHub') }), _jsx(Text, { fontSize: "$1", color: "$soft", children: t('Sync repositories, PRs, and code context') })] })] }), githubDone ? (_jsxs(XStack, { items: "center", gap: "$2", children: [_jsxs(XStack, { items: "center", gap: "$1", px: "$2", py: "$1", rounded: "$2", bg: "$hover", children: [_jsx(Check, { size: 14, color: GOOD }), _jsx(Text, { fontSize: "$1", color: GOOD, fontWeight: "600", children: t('Connected') })] }), _jsx(Box, { render: "button", onClick: () => void handleDisconnectGithub(), "aria-disabled": busy === 'github', px: "$2", py: "$1", "$max-sm": { minH: 44 }, rounded: "$3", bg: "transparent", hoverStyle: { bg: '$hover' }, focusVisibleStyle: FOCUS_RING, cursor: "pointer", children: _jsx(Text, { fontSize: "$1", color: dropping ? '$ink' : '$soft', children: dropping ? t('Confirm disconnect') : t('Disconnect') }) })] })) : (_jsx(Box, { render: "button", onClick: handleConnectGithub, px: "$3", py: "$1.5", "$max-sm": { minH: 44 }, rounded: "$3", bg: "var(--accent)", borderWidth: 1, borderColor: "var(--border-strong)", hoverStyle: { bg: 'var(--accent-hover)' }, focusVisibleStyle: FOCUS_RING, cursor: "pointer", children: _jsx(Text, { fontSize: "$2", fontWeight: "600", color: "var(--accent-foreground)", children: busy === 'github' ? t('Connecting…') : t('Connect') }) }))] }), _jsxs(XStack, { p: "$3", rounded: "$4", borderWidth: 1, borderColor: slackDone ? GOOD : '$borderColor', bg: "$raised", items: "center", justify: "space-between", gap: "$3", children: [_jsxs(XStack, { items: "center", gap: "$3", flex: 1, children: [_jsx(SlackMark, { size: 24 }), _jsxs(YStack, { flex: 1, minW: 0, children: [_jsx(Text, { fontSize: "$3", fontWeight: "600", color: "$ink", children: t('2. Slack') }), _jsx(Text, { fontSize: "$1", color: "$soft", children: t('Notifications and agent bot chat in channels') })] })] }), slackDone ? (_jsxs(XStack, { items: "center", gap: "$1", px: "$2", py: "$1", rounded: "$2", bg: "$hover", children: [_jsx(Check, { size: 14, color: GOOD }), _jsx(Text, { fontSize: "$1", color: GOOD, fontWeight: "600", children: t('Connected') })] })) : (_jsx(Box, { render: "button", onClick: handleConnectSlack, px: "$3", py: "$1.5", "$max-sm": { minH: 44 }, rounded: "$3", bg: "var(--accent)", borderWidth: 1, borderColor: "var(--border-strong)", hoverStyle: { bg: 'var(--accent-hover)' }, focusVisibleStyle: FOCUS_RING, cursor: "pointer", children: _jsx(Text, { fontSize: "$2", fontWeight: "600", color: "var(--accent-foreground)", children: busy === 'slack' ? t('Connecting…') : t('Connect') }) }))] }), _jsxs(XStack, { p: "$3", rounded: "$4", borderWidth: 1, borderColor: pluginDone ? GOOD : '$borderColor', bg: "$raised", items: "center", justify: "space-between", gap: "$3", children: [_jsxs(XStack, { items: "center", gap: "$3", flex: 1, children: [_jsx(Plug, { size: 24, color: "var(--foreground)", "aria-hidden": true }), _jsxs(YStack, { flex: 1, minW: 0, children: [_jsx(Text, { fontSize: "$3", fontWeight: "600", color: "$ink", children: t('3. Plugins') }), _jsx(Text, { fontSize: "$1", color: "$soft", children: t('Plugins and MCP servers your agents can call') })] })] }), pluginDone ? (_jsxs(XStack, { items: "center", gap: "$1", px: "$2", py: "$1", rounded: "$2", bg: "$hover", children: [_jsx(Check, { size: 14, color: GOOD }), _jsx(Text, { fontSize: "$1", color: GOOD, fontWeight: "600", children: t('Connected') })] })) : (_jsx(Box, { render: "button", onClick: openPlugins, px: "$3", py: "$1.5", "$max-sm": { minH: 44 }, rounded: "$3", bg: "var(--accent)", borderWidth: 1, borderColor: "var(--border-strong)", hoverStyle: { bg: 'var(--accent-hover)' }, focusVisibleStyle: FOCUS_RING, cursor: "pointer", children: _jsx(Text, { fontSize: "$2", fontWeight: "600", color: "var(--accent-foreground)", children: t('Open') }) }))] }), workspace ? (_jsxs(YStack, { p: "$3", rounded: "$4", borderWidth: 1, borderColor: hasGoogle ? GOOD : '$borderColor', bg: "$raised", gap: "$2.5", children: [_jsxs(XStack, { items: "center", justify: "space-between", gap: "$3", children: [_jsxs(XStack, { items: "center", gap: "$3", flex: 1, children: [_jsx(ProviderMark, { org: "google", size: 24 }), _jsxs(YStack, { flex: 1, minW: 0, children: [_jsx(Text, { fontSize: "$3", fontWeight: "600", color: "$ink", children: t('Google Workspace · private beta') }), _jsx(Text, { fontSize: "$1", color: "$soft", children: t('Edit Drive files, Docs, Sheets, Gmail & Calendar across personal and business accounts') })] })] }), _jsx(Box, { render: "button", onClick: handleConnectGoogle, px: "$3", py: "$1.5", "$max-sm": { minH: 44 }, rounded: "$3", bg: "var(--accent)", borderWidth: 1, borderColor: "var(--border-strong)", hoverStyle: { bg: 'var(--accent-hover)' }, focusVisibleStyle: FOCUS_RING, cursor: "pointer", children: _jsx(Text, { fontSize: "$2", fontWeight: "600", color: "var(--accent-foreground)", children: busy === 'google'
|
|
368
397
|
? t('Connecting…')
|
|
369
398
|
: hasGoogle
|
|
370
399
|
? t('+ Add account')
|
|
371
|
-
: t('Connect') }) })] }), accountList.length > 0 ? (_jsx(XStack, { gap: "$1.5", flexWrap: "wrap", children: accountList.map((acct) => (_jsxs(XStack, { items: "center", gap: "$1.5", px: "$2.5", py: "$1", rounded: "$2", bg: "$hover", children: [_jsx(Check, { size: 12, color: GOOD, "aria-hidden": true }), _jsx(Text, { fontSize: "$1", color: "$ink", fontWeight: "500", children: acct }), _jsx(Box, { render: "button", "aria-label": t('Remove {account}', { account: acct }), onClick: () => removeGoogleAccount(acct), cursor: "pointer", children: _jsx(X, { size: 12, color: "
|
|
400
|
+
: t('Connect') }) })] }), accountList.length > 0 ? (_jsx(XStack, { gap: "$1.5", flexWrap: "wrap", children: accountList.map((acct) => (_jsxs(XStack, { items: "center", gap: "$1.5", px: "$2.5", py: "$1", rounded: "$2", bg: "$hover", children: [_jsx(Check, { size: 12, color: GOOD, "aria-hidden": true }), _jsx(Text, { fontSize: "$1", color: "$ink", fontWeight: "500", children: acct }), _jsx(Box, { render: "button", "aria-label": t('Remove {account}', { account: acct }), onClick: () => removeGoogleAccount(acct), rounded: "$1", focusVisibleStyle: FOCUS_RING, cursor: "pointer", children: _jsx(X, { size: 12, color: "var(--muted-foreground)", "aria-hidden": true }) })] }, acct))) })) : null] })) : null] }), _jsxs(XStack, { justify: "space-between", items: "center", gap: "$2", pt: "$2", flexWrap: "wrap", children: [_jsx(Box, { render: _jsx("button", { type: "button" }), "data-slot": "setup-modal-dismiss", onClick: dismissSetup, px: "$3", py: "$2", "$max-sm": { minH: 44 }, rounded: "$3", bg: "transparent", borderWidth: 0, hoverStyle: { bg: '$hover' }, focusVisibleStyle: FOCUS_RING, cursor: "pointer", children: _jsx(Text, { fontSize: "$2", color: "$soft", children: t('Don’t show again') }) }), _jsx(Box, { render: _jsx("button", { type: "button" }), onClick: () => setModalOpen(false), px: "$4", py: "$2", "$max-sm": { minH: 44 }, rounded: "$3", bg: "transparent", borderWidth: 1, borderColor: "var(--border-strong)", hoverStyle: { bg: '$hover' }, focusVisibleStyle: FOCUS_RING, cursor: "pointer", children: _jsx(Text, { fontSize: "$2", fontWeight: "500", color: "$ink", children: t('Close') }) })] })] }) })] }));
|
|
372
401
|
}
|
package/dist/Shared.js
CHANGED
|
@@ -29,7 +29,7 @@ function target() {
|
|
|
29
29
|
const share = new URLSearchParams(window.location.search).get('s')?.trim();
|
|
30
30
|
return share ? { share } : null;
|
|
31
31
|
}
|
|
32
|
-
const MEASURE =
|
|
32
|
+
const MEASURE = 680;
|
|
33
33
|
export function Shared() {
|
|
34
34
|
const { t } = useI18n();
|
|
35
35
|
const hydrated = useHydrated();
|
|
@@ -79,30 +79,30 @@ export function Shared() {
|
|
|
79
79
|
: hydrated && !isLoading && aim && !('token' in aim) && !isAuthenticated
|
|
80
80
|
? { kind: 'ask' }
|
|
81
81
|
: state;
|
|
82
|
-
return (_jsxs(YStack, { role: "main", height: "100dvh", overflowY: "auto", bg: "$background", children: [_jsxs(XStack, {
|
|
82
|
+
return (_jsxs(YStack, { role: "main", height: "100dvh", overflowY: "auto", bg: "$background", children: [_jsx(YStack, { borderBottomWidth: 1, borderColor: "$borderColor", shrink: 0, children: _jsxs(XStack, { width: "100%", maxW: MEASURE, mx: "auto", minH: 52, px: "$4", "$max-sm": { px: '$3' }, items: "center", justify: "space-between", gap: "$3", children: [_jsx(Anchor, { href: "/", "aria-label": brand(), children: _jsx(Text, { fontSize: "$4", fontWeight: "600", color: "$ink", children: brand() }) }), shown.kind === 'read' && shown.shared.full ? (_jsx(Text, { fontSize: "$1", color: "$soft", children: t('Shared with you · Read only') })) : null] }) }), _jsx(YStack, { flex: 1, width: "100%", maxW: MEASURE, mx: "auto", self: "center", px: "$4", "$max-sm": { px: '$3', py: '$5' }, py: "$7", gap: "$6", children: _jsx(Body, { state: shown, signedIn: Boolean(isAuthenticated), onOpen: () => setAgreed(true) }) })] }));
|
|
83
83
|
}
|
|
84
84
|
function Body({ state, signedIn, onOpen }) {
|
|
85
85
|
const { t } = useI18n();
|
|
86
86
|
if (state.kind === 'reading') {
|
|
87
|
-
return (_jsx(Text, { fontSize: "$3", color: "$soft", "aria-live": "polite", children: t('Opening the chat.') }));
|
|
87
|
+
return (_jsx(YStack, { flex: 1, width: "100%", maxW: 460, mx: "auto", self: "center", items: "center", justify: "center", pt: "$6", pb: "$16", "$max-sm": { pb: '$12' }, children: _jsx(Text, { fontSize: "$3", color: "$soft", text: "center", "aria-live": "polite", children: t('Opening the chat.') }) }));
|
|
88
88
|
}
|
|
89
89
|
if (state.kind === 'missing' || state.kind === 'gone') {
|
|
90
|
-
return (_jsxs(YStack, { gap: "$
|
|
90
|
+
return (_jsxs(YStack, { flex: 1, width: "100%", maxW: 480, mx: "auto", self: "center", items: "center", justify: "center", pt: "$6", pb: "$16", "$max-sm": { pb: '$12' }, gap: "$5", children: [_jsxs(YStack, { items: "center", gap: "$1.5", children: [_jsx(Text, { render: "h1", m: 0, fontSize: "$7", lineHeight: "$8", fontWeight: "600", letterSpacing: -0.42, color: "$ink", text: "center", children: t('This chat is no longer shared.') }), _jsx(Text, { fontSize: "$3", color: "$soft", lineHeight: "$4", text: "center", children: state.kind === 'missing' ? t('The link is incomplete. Ask for it again.') : t('The link was turned off, or it was never a link to a chat.') })] }), _jsx(Anchor, { href: "/", children: _jsx(Button, { size: "sm", variant: "outline", minH: 36, "$max-sm": { minH: 44 }, borderColor: "var(--border-strong)", children: t('Go to {brand}', { brand: brand() }) }) })] }));
|
|
91
91
|
}
|
|
92
92
|
if (state.kind === 'ask') {
|
|
93
|
-
return _jsx(Ask, { signedIn: signedIn });
|
|
93
|
+
return (_jsx(YStack, { flex: 1, width: "100%", maxW: 480, mx: "auto", self: "center", justify: "center", pt: "$6", pb: "$16", "$max-sm": { pb: '$12' }, children: _jsx(Ask, { signedIn: signedIn }) }));
|
|
94
94
|
}
|
|
95
95
|
if (state.kind === 'wrong') {
|
|
96
|
-
return (_jsxs(YStack, { gap: "$
|
|
96
|
+
return (_jsxs(YStack, { flex: 1, width: "100%", maxW: 480, mx: "auto", self: "center", items: "center", justify: "center", pt: "$6", pb: "$16", "$max-sm": { pb: '$12' }, gap: "$5", children: [_jsxs(YStack, { items: "center", gap: "$1.5", children: [_jsx(Text, { render: "h1", m: 0, fontSize: "$7", lineHeight: "$8", fontWeight: "600", letterSpacing: -0.42, color: "$ink", text: "center", children: t('This chat could not be opened.') }), _jsx(Text, { role: "alert", fontSize: "$3", color: "$soft", lineHeight: "$4", text: "center", children: state.said })] }), _jsx(Button, { size: "sm", variant: "primary", minH: 36, "$max-sm": { minH: 44 }, onClick: () => window.location.reload(), children: t('Try again') })] }));
|
|
97
97
|
}
|
|
98
98
|
const { shared } = state;
|
|
99
99
|
const by = shared.by || t('The person who shared it');
|
|
100
100
|
if (!shared.full) {
|
|
101
|
-
return (_jsxs(
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
return (_jsxs(YStack, { gap: "$5", children: [_jsx(Text, { render: "h1", m: 0, fontSize: "$7", lineHeight: "$8", fontWeight: "600", letterSpacing: -0.42, color: "$ink", children: shared.title }), shared.confirm ? (_jsxs(YStack, { gap: "$4", p: "$5", "$max-sm": { p: '$4' }, rounded: "$5", borderWidth: 1, borderColor: "$edge", bg: "$panel", role: "region", "aria-label": t('Open the chat'), children: [_jsxs(YStack, { gap: "$1.5", children: [_jsx(Text, { fontSize: "$4", fontWeight: "600", color: "$ink", children: shared.by ? t('{name} shared this chat with you', { name: shared.by }) : t('This chat was shared with you') }), _jsx(Text, { fontSize: "$2", color: "$soft", lineHeight: "$3", children: shared.by
|
|
102
|
+
? t('Opening it shows {name} the name you signed in with, and keeps it under Shared with you.', { name: shared.by })
|
|
103
|
+
: t('Opening it shows them the name you signed in with, and keeps it under Shared with you.') })] }), _jsx(XStack, { children: _jsx(Button, { size: "sm", variant: "primary", minH: 36, "$max-sm": { minH: 44 }, onClick: onOpen, children: t('Open — {name} will see your name', { name: by }) }) })] })) : (_jsx(Ask, { signedIn: signedIn }))] }));
|
|
104
104
|
}
|
|
105
|
-
return (_jsxs(_Fragment, { children: [_jsx(Text, { render: "h1", fontSize: "$7", lineHeight: "$
|
|
105
|
+
return (_jsxs(_Fragment, { children: [_jsxs(YStack, { gap: "$1.5", children: [_jsx(Text, { render: "h1", m: 0, fontSize: "$7", lineHeight: "$8", fontWeight: "600", letterSpacing: -0.42, color: "$ink", children: shared.title }), shared.by ? (_jsx(Text, { fontSize: "$2", color: "$soft", children: t('Shared by {name}', { name: shared.by }) })) : null] }), _jsx(YStack, { gap: "$5", render: "ol", m: 0, p: 0, "aria-label": t('Messages'), children: shared.messages.map((turn, i) => (_jsxs(YStack, { render: "li", gap: "$1.5", children: [_jsx(Text, { fontSize: "$1", fontWeight: "500", color: "$soft", children: turn.role === 'user' ? t('Asked') : turn.model ? t('Answered · {model}', { model: turn.model }) : t('Recorded by the person who shared this') }), turn.role === 'assistant' && turn.model ? (_jsx(Prose, { text: turn.content })) : (_jsx(Text, { fontSize: "$3", lineHeight: "$4", color: "$ink", whiteSpace: "pre-wrap", children: turn.content }))] }, i))) })] }));
|
|
106
106
|
}
|
|
107
107
|
/**
|
|
108
108
|
* What a reader who is not signed in is shown under the title: sign up or sign
|
|
@@ -113,7 +113,7 @@ function Body({ state, signedIn, onOpen }) {
|
|
|
113
113
|
function Ask({ signedIn }) {
|
|
114
114
|
const { t } = useI18n();
|
|
115
115
|
if (signedIn) {
|
|
116
|
-
return (_jsxs(YStack, { gap: "$
|
|
116
|
+
return (_jsxs(YStack, { gap: "$4", p: "$5", "$max-sm": { p: '$4' }, rounded: "$5", borderWidth: 1, borderColor: "$edge", bg: "$panel", role: "region", "aria-label": t('Sign in to read the chat'), children: [_jsxs(YStack, { gap: "$1.5", children: [_jsx(Text, { fontSize: "$4", fontWeight: "600", color: "$ink", children: t('Sign in again to read this chat') }), _jsx(Text, { fontSize: "$2", color: "$soft", lineHeight: "$3", children: t('Your session has ended; signing in brings you straight back here. The person who shared it will see that you opened it.') })] }), _jsx(XStack, { gap: "$2", children: _jsx(Button, { size: "sm", variant: "primary", minH: 36, "$max-sm": { minH: 44 }, onClick: () => enter(LOGIN), children: t('Sign in') }) })] }));
|
|
117
117
|
}
|
|
118
|
-
return (_jsxs(YStack, { gap: "$
|
|
118
|
+
return (_jsxs(YStack, { gap: "$4", p: "$5", "$max-sm": { p: '$4' }, rounded: "$5", borderWidth: 1, borderColor: "$edge", bg: "$panel", role: "region", "aria-label": t('Sign in to read the chat'), children: [_jsxs(YStack, { gap: "$1.5", children: [_jsx(Text, { fontSize: "$4", fontWeight: "600", color: "$ink", children: t('Sign in to read this chat') }), _jsx(Text, { fontSize: "$2", color: "$soft", lineHeight: "$3", children: t('A free Hanzo account opens it, and you come straight back here. The person who shared it will see that you opened it.') })] }), _jsxs(XStack, { gap: "$2", flexWrap: "wrap", children: [_jsx(Button, { size: "sm", variant: "primary", minH: 36, "$max-sm": { minH: 44 }, onClick: () => enter(signUp()), children: t('Sign up to view') }), _jsx(Button, { size: "sm", variant: "outline", minH: 36, "$max-sm": { minH: 44 }, borderColor: "var(--border-strong)", onClick: () => enter(LOGIN), children: t('Sign in') })] })] }));
|
|
119
119
|
}
|
package/dist/Shell.d.ts
CHANGED
|
@@ -26,6 +26,8 @@ export declare function Shell({ mode, front, children, }: {
|
|
|
26
26
|
front?: boolean;
|
|
27
27
|
children: ReactNode;
|
|
28
28
|
}): import("react").JSX.Element;
|
|
29
|
+
/** The shell's sidebar: its default width, px (unified with ground.ts SIDE). */
|
|
30
|
+
export declare const SIDEBAR_WIDTH = 256;
|
|
29
31
|
/** Whether the pane is drawn in the app's frame (`Split framed`), where what
|
|
30
32
|
* floats on the frame's ground is cut as a pane. */
|
|
31
33
|
export declare const Framed: import("react").Context<boolean>;
|
|
@@ -60,3 +62,11 @@ export declare function Split({ children, swap, framed, bare, }: {
|
|
|
60
62
|
framed?: boolean;
|
|
61
63
|
bare?: boolean;
|
|
62
64
|
}): import("react").JSX.Element;
|
|
65
|
+
/** What a place holds, for the list column. */
|
|
66
|
+
export declare function ShellIndex({ mode, owner, filter, onPick, navigate, }: {
|
|
67
|
+
mode: Mode;
|
|
68
|
+
owner: string;
|
|
69
|
+
filter: string;
|
|
70
|
+
onPick?: () => void;
|
|
71
|
+
navigate?: (route: string) => void;
|
|
72
|
+
}): import("react").JSX.Element;
|