@hanzo/app 0.3.94 → 0.3.95
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 +113 -47
- 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/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.js +210 -151
- 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 +1 -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.js +18 -13
- package/dist/bots/Thread.js +54 -27
- package/dist/bots/face.js +6 -2
- package/dist/bots/kit.d.ts +1 -0
- package/dist/bots/kit.js +1 -1
- package/dist/chord.d.ts +13 -0
- package/dist/chord.js +30 -1
- package/dist/crew.js +47 -4
- package/dist/ground.d.ts +1 -1
- package/dist/ground.js +1 -1
- 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/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 +6 -0
- package/dist/lib/todo.js +37 -25
- 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/thread.d.ts +2 -1
- package/dist/thread.js +85 -44
- package/package.json +11 -11
package/dist/Upgrade.js
CHANGED
|
@@ -1,32 +1,29 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
|
|
6
|
-
// - Centered "Upgrade your plan" title with top-right close button.
|
|
7
|
-
// - Audience switcher: [ Personal | Business ].
|
|
8
|
-
// - Personal view: defaults to 2 plans (Free + Pro) with "Show all plans" expandable
|
|
9
|
-
// to full options (Free, Go, Pro, Dev, Max, Ultra).
|
|
10
|
-
// - Business view: Free + Highlighted Business card with Annual/Monthly switch,
|
|
11
|
-
// in-card seat types (Standard & Premium), and enterprise notice at the bottom.
|
|
12
|
-
import { useEffect, useState } from 'react';
|
|
3
|
+
// Global 1-click upgrade modal for Hanzo Personal (Free, Pro, Max + optional Go/Dev/Ultra)
|
|
4
|
+
// and Business workspaces. Preserves current org() and returnUrl across every route.
|
|
5
|
+
import { useEffect, useId, useState } from 'react';
|
|
13
6
|
import { useI18n } from '@hanzo/i18n/react';
|
|
14
|
-
import { BarChart2, Check, Cpu, Crown, Gem, Layers, Link2, Lock, Rocket, ShieldCheck, Sliders, Sparkles, Sprout, Users, Workflow, X, Zap, } from 'lucide-react';
|
|
7
|
+
import { BarChart2, Check, ChevronDown, ChevronUp, Cpu, Crown, Gem, Layers, Link2, Lock, Rocket, ShieldCheck, Sliders, Sparkles, Sprout, Users, Workflow, X, Zap, } from 'lucide-react';
|
|
15
8
|
import { Anchor, Box, Button, Dialog, DialogContent, DialogTitle, Text, View, XStack, YStack } from '@hanzo/ui';
|
|
16
9
|
import { track } from './lib/tags.js';
|
|
17
10
|
import { org } from './lib/session.js';
|
|
18
11
|
import { useTier } from './lib/tier.js';
|
|
19
12
|
import { term } from './lib/plans.js';
|
|
20
|
-
import {
|
|
13
|
+
import { owners } from './lib/owners.js';
|
|
14
|
+
import { payUrl, topUpAmountUrl } from './lib/pay.js';
|
|
21
15
|
import { site } from './where.js';
|
|
22
|
-
/**
|
|
23
|
-
* The dialog is chrome, so it draws on design's monochrome ladder in both
|
|
24
|
-
* themes: a hue is for artwork, and the plan on offer is told by its fill and
|
|
25
|
-
* its edge. Lucide's `color` is an SVG attribute gui never reads, so an icon
|
|
26
|
-
* takes the CSS value of the rung its label is on.
|
|
27
|
-
*/
|
|
28
16
|
const INK = 'var(--foreground)';
|
|
29
|
-
const SOFT = 'var(--
|
|
17
|
+
const SOFT = 'var(--text-secondary, var(--muted-foreground))';
|
|
18
|
+
const STRONG = 'var(--border-strong)';
|
|
19
|
+
const FOCUS_RING = { outlineWidth: 2, outlineStyle: 'solid', outlineColor: '$outlineColor' };
|
|
20
|
+
const UPGRADE_EVENT = 'hanzo:upgrade';
|
|
21
|
+
/** Opens the global in-app Upgrade modal from anywhere in the signed-in shell. */
|
|
22
|
+
export function requestUpgrade(detail) {
|
|
23
|
+
if (typeof window === 'undefined')
|
|
24
|
+
return;
|
|
25
|
+
window.dispatchEvent(new CustomEvent(UPGRADE_EVENT, { detail }));
|
|
26
|
+
}
|
|
30
27
|
/** The free rung's name in the billing catalog. */
|
|
31
28
|
const FREE = 'free';
|
|
32
29
|
/** Whether a signed-in reader's organization is on the Free plan. A tier not yet read, or refused, is not Free. */
|
|
@@ -38,116 +35,210 @@ export function useFree(signedIn) {
|
|
|
38
35
|
function here() {
|
|
39
36
|
if (typeof window === 'undefined')
|
|
40
37
|
return undefined;
|
|
41
|
-
|
|
42
|
-
return `${origin}${pathname}${search}`;
|
|
38
|
+
return window.location.href;
|
|
43
39
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
icon: Rocket,
|
|
51
|
-
subtitle: '3× more usage and higher limits for everyday builders.',
|
|
52
|
-
bots: 1,
|
|
53
|
-
},
|
|
54
|
-
'5x': {
|
|
55
|
-
id: 'dev-5x',
|
|
56
|
-
name: 'Dev',
|
|
57
|
-
multiple: '5×',
|
|
58
|
-
price: 45,
|
|
59
|
-
icon: Cpu,
|
|
60
|
-
subtitle: '5× higher limits for autonomous coding agents.',
|
|
61
|
-
bots: 2,
|
|
62
|
-
},
|
|
63
|
-
'15x': {
|
|
64
|
-
id: 'max-15x',
|
|
65
|
-
name: 'Max',
|
|
66
|
-
multiple: '15×',
|
|
67
|
-
price: 95,
|
|
68
|
-
icon: Crown,
|
|
69
|
-
subtitle: '15× limits for heavy continuous coding sessions.',
|
|
70
|
-
bots: 5,
|
|
71
|
-
},
|
|
72
|
-
};
|
|
73
|
-
export function Upgrade({ ask, onClose }) {
|
|
40
|
+
/**
|
|
41
|
+
* Deduplicate window-level `hanzo:upgrade` and `#pricing` triggers when both the
|
|
42
|
+
* global shell (`App.tsx` / `Shell.tsx`) and a child pane (`Chat.tsx`) mount `<Upgrade />`.
|
|
43
|
+
*/
|
|
44
|
+
const upgradeOwners = owners();
|
|
45
|
+
export function Upgrade({ ask = null, onClose } = {}) {
|
|
74
46
|
const { t } = useI18n();
|
|
47
|
+
const instanceId = useId();
|
|
75
48
|
const [audience, setAudience] = useState('personal');
|
|
76
|
-
const [
|
|
77
|
-
const [
|
|
49
|
+
const [intent, setIntent] = useState('chat');
|
|
50
|
+
const [showMorePlans, setShowMorePlans] = useState(false);
|
|
78
51
|
const [businessCycle, setBusinessCycle] = useState('year');
|
|
79
|
-
const [
|
|
80
|
-
|
|
52
|
+
const [eventOpen, setEventOpen] = useState(false);
|
|
53
|
+
useEffect(() => upgradeOwners.claim(instanceId), [instanceId]);
|
|
81
54
|
useEffect(() => {
|
|
55
|
+
const isPrimaryOwner = () => upgradeOwners.owns(instanceId);
|
|
82
56
|
const handleHash = () => {
|
|
83
|
-
if (typeof window !== 'undefined' && window.location.hash === '#pricing') {
|
|
84
|
-
|
|
57
|
+
if (typeof window !== 'undefined' && window.location.hash === '#pricing' && isPrimaryOwner()) {
|
|
58
|
+
setEventOpen(true);
|
|
85
59
|
}
|
|
86
60
|
};
|
|
87
|
-
const handleUpgradeEvent = () =>
|
|
61
|
+
const handleUpgradeEvent = (ev) => {
|
|
62
|
+
if (!isPrimaryOwner())
|
|
63
|
+
return;
|
|
64
|
+
const tier = ev.detail?.tier?.toLowerCase();
|
|
65
|
+
if (tier === 'business' || tier === 'team') {
|
|
66
|
+
setAudience('business');
|
|
67
|
+
setIntent('team');
|
|
68
|
+
}
|
|
69
|
+
else if (tier === 'dev' || tier === 'dev-5x') {
|
|
70
|
+
setAudience('personal');
|
|
71
|
+
setIntent('build');
|
|
72
|
+
setShowMorePlans(true);
|
|
73
|
+
}
|
|
74
|
+
else if (tier === 'go' || tier === 'ultra') {
|
|
75
|
+
setAudience('personal');
|
|
76
|
+
setIntent('chat');
|
|
77
|
+
setShowMorePlans(true);
|
|
78
|
+
}
|
|
79
|
+
else if (tier) {
|
|
80
|
+
setAudience('personal');
|
|
81
|
+
setIntent('chat');
|
|
82
|
+
}
|
|
83
|
+
setEventOpen(true);
|
|
84
|
+
};
|
|
88
85
|
handleHash();
|
|
89
86
|
window.addEventListener('hashchange', handleHash);
|
|
90
|
-
window.addEventListener(
|
|
87
|
+
window.addEventListener(UPGRADE_EVENT, handleUpgradeEvent);
|
|
91
88
|
return () => {
|
|
92
89
|
window.removeEventListener('hashchange', handleHash);
|
|
93
|
-
window.removeEventListener(
|
|
90
|
+
window.removeEventListener(UPGRADE_EVENT, handleUpgradeEvent);
|
|
94
91
|
};
|
|
95
|
-
}, []);
|
|
96
|
-
const open = ask !== null ||
|
|
92
|
+
}, [instanceId]);
|
|
93
|
+
const open = ask !== null || eventOpen;
|
|
94
|
+
const activeOrg = org();
|
|
95
|
+
const { tier } = useTier(open, activeOrg);
|
|
97
96
|
useEffect(() => {
|
|
98
97
|
if (open) {
|
|
99
98
|
track('upgrade_dialog_opened', { audience });
|
|
100
99
|
}
|
|
101
100
|
}, [open, audience]);
|
|
101
|
+
if (!open)
|
|
102
|
+
return null;
|
|
103
|
+
const rawPlan = (tier?.tier?.name || '').toLowerCase();
|
|
104
|
+
const currentPlanId = rawPlan.includes('ultra')
|
|
105
|
+
? 'ultra'
|
|
106
|
+
: rawPlan.includes('max')
|
|
107
|
+
? 'max-15x'
|
|
108
|
+
: rawPlan.includes('dev')
|
|
109
|
+
? 'dev-5x'
|
|
110
|
+
: rawPlan.includes('pro')
|
|
111
|
+
? 'pro-3x'
|
|
112
|
+
: rawPlan.includes('go')
|
|
113
|
+
? 'go'
|
|
114
|
+
: rawPlan.includes('team') || rawPlan.includes('business')
|
|
115
|
+
? 'team'
|
|
116
|
+
: 'free';
|
|
102
117
|
const close = () => {
|
|
103
118
|
if (typeof window !== 'undefined' && window.location.hash === '#pricing') {
|
|
104
|
-
history.replaceState(null, '', window.location.pathname + window.location.search);
|
|
119
|
+
window.history.replaceState(null, '', window.location.pathname + window.location.search);
|
|
120
|
+
}
|
|
121
|
+
setEventOpen(false);
|
|
122
|
+
onClose?.();
|
|
123
|
+
};
|
|
124
|
+
const selectIntent = (next) => {
|
|
125
|
+
setIntent(next);
|
|
126
|
+
if (next === 'team') {
|
|
127
|
+
setAudience('business');
|
|
128
|
+
return;
|
|
105
129
|
}
|
|
106
|
-
|
|
107
|
-
|
|
130
|
+
setAudience('personal');
|
|
131
|
+
setShowMorePlans(next === 'build');
|
|
108
132
|
};
|
|
109
|
-
const
|
|
110
|
-
const
|
|
111
|
-
const
|
|
112
|
-
const
|
|
113
|
-
const
|
|
114
|
-
const
|
|
115
|
-
const
|
|
116
|
-
const
|
|
133
|
+
const returnUrl = here();
|
|
134
|
+
const proHref = ask?.href || term(payUrl('/cart', { plan: 'pro-3x', org: activeOrg, returnUrl }), 'month');
|
|
135
|
+
const maxHref = term(payUrl('/cart', { plan: 'max-15x', org: activeOrg, returnUrl }), 'month');
|
|
136
|
+
const goHref = term(payUrl('/cart', { plan: 'go', org: activeOrg, returnUrl }), 'month');
|
|
137
|
+
const devHref = term(payUrl('/cart', { plan: 'dev-5x', org: activeOrg, returnUrl }), 'month');
|
|
138
|
+
const ultraHref = term(payUrl('/cart', { plan: 'ultra', org: activeOrg, returnUrl }), 'month');
|
|
139
|
+
const businessHref = term(payUrl('/cart', { plan: 'team', quantity: '5', org: activeOrg, returnUrl }), businessCycle);
|
|
140
|
+
const topUpHref = payUrl('/amount/card', { org: activeOrg, returnUrl });
|
|
141
|
+
const topUpChips = ['10', '25', '50'];
|
|
117
142
|
const handleBuy = (planId, planName, price, interval = 'month') => {
|
|
118
143
|
const items = [{ item_id: planId, item_name: planName }];
|
|
119
144
|
track('plan_clicked', { plan: planId, interval, cta: `Upgrade to ${planName}`, items });
|
|
120
145
|
track('checkout_started', { currency: 'USD', value: price, items, interval });
|
|
121
146
|
};
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
147
|
+
// Strictly one white primary CTA per visible plan group — promote Max if the user is already on Pro.
|
|
148
|
+
const devPrimary = audience === 'personal' && intent === 'build' && showMorePlans && currentPlanId !== 'dev-5x';
|
|
149
|
+
const proPrimary = !devPrimary && currentPlanId !== 'pro-3x' && currentPlanId !== 'max-15x' && currentPlanId !== 'ultra';
|
|
150
|
+
const maxPrimary = !devPrimary && !proPrimary && currentPlanId !== 'max-15x' && currentPlanId !== 'ultra';
|
|
151
|
+
const intentHint = intent === 'build'
|
|
152
|
+
? t('Dev — 5x coding & agent runs · 2 custom Bots')
|
|
153
|
+
: intent === 'team'
|
|
154
|
+
? t('Business — Shared team billing, roles & seats')
|
|
155
|
+
: t('Pro — ~300 frontier chats/day · best everyday choice');
|
|
156
|
+
const extraPlans = [
|
|
157
|
+
{
|
|
158
|
+
id: 'go',
|
|
159
|
+
name: t('Go'),
|
|
160
|
+
badge: '1x',
|
|
161
|
+
capacity: t('~100 frontier chats/day'),
|
|
162
|
+
price: 8,
|
|
163
|
+
icon: Zap,
|
|
164
|
+
subtitle: t('Frontier models and builder access on a light monthly budget.'),
|
|
165
|
+
features: [t('All frontier models'), t('Build apps and sites'), t('Scheduled automations')],
|
|
166
|
+
href: goHref,
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
id: 'dev-5x',
|
|
170
|
+
name: t('Dev'),
|
|
171
|
+
badge: '5x',
|
|
172
|
+
capacity: t('5x coding & agent runs · 2 custom Bots'),
|
|
173
|
+
price: 45,
|
|
174
|
+
icon: Cpu,
|
|
175
|
+
subtitle: t('Sustained coding, repositories, and multi-step agent runs.'),
|
|
176
|
+
features: [t('5x session and weekly limits'), t('2 custom Hanzo Bots'), t('Custom tools and extensions')],
|
|
177
|
+
href: devHref,
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
id: 'ultra',
|
|
181
|
+
name: t('Ultra'),
|
|
182
|
+
badge: '25x',
|
|
183
|
+
capacity: t('~2,500+ runs/day for continuous work'),
|
|
184
|
+
price: 195,
|
|
185
|
+
icon: Gem,
|
|
186
|
+
subtitle: t('25x capacity for continuous production workloads.'),
|
|
187
|
+
features: [t('25x session and weekly limits'), t('10 custom Hanzo Bots'), t('Direct engineering support')],
|
|
188
|
+
href: ultraHref,
|
|
189
|
+
},
|
|
190
|
+
];
|
|
191
|
+
return (_jsx(Dialog, { open: open, onOpenChange: (v) => (v ? undefined : close()), children: _jsxs(DialogContent, { "data-slot": "upgrade-modal", showCloseButton: false, width: audience === 'business' ? 860 : 980, maxW: "calc(100vw - 24px)", maxH: "90dvh", overflowY: "auto", bg: "$background", rounded: "$6", p: "$4", gap: "$4", borderWidth: 1, borderColor: STRONG, boxShadow: "var(--shadow-floating)", $sm: { p: '$6', gap: '$5' }, "$max-sm": { rounded: '$5' }, children: [_jsx(Box, { render: _jsx("button", { type: "button" }), "aria-label": t('Close'), onClick: close, display: "flex", position: "absolute", t: "$3.5", insetInlineEnd: "$3.5", width: 36, height: 36, $touchable: { width: 44, height: 44 }, "$max-sm": { width: 44, height: 44, t: '$2.5', insetInlineEnd: '$2.5' }, rounded: "$10", bg: "transparent", borderWidth: 1, borderColor: "transparent", cursor: "pointer", items: "center", justify: "center", hoverStyle: { bg: '$hover', borderColor: STRONG }, focusVisibleStyle: FOCUS_RING, z: "var(--z-raised)", children: _jsx(X, { size: 18, "aria-hidden": true, color: SOFT }) }), _jsxs(YStack, { items: "center", gap: "$1.5", pt: "$1", px: "$6", "$max-sm": { px: '$2', pt: '$4' }, children: [_jsx(DialogTitle, { fontFamily: "$heading", fontSize: "$7", fontWeight: "600", letterSpacing: '-0.025em', color: "$ink", text: "center", children: t('Choose your plan') }), _jsx(Text, { fontFamily: "$body", fontSize: "$2", color: "$soft", text: "center", children: ask?.model
|
|
192
|
+
? t('Unlock {model} and higher usage limits.', { model: ask.model })
|
|
193
|
+
: t('Monthly plans with clear usage limits. Cancel or switch anytime.') }), _jsxs(XStack, { items: "center", bg: "$panel", p: "$1", rounded: "$10", gap: "$1", mt: "$2", borderWidth: 1, borderColor: STRONG, children: [_jsx(Box, { render: _jsx("button", { type: "button" }), onClick: () => {
|
|
194
|
+
setAudience('personal');
|
|
195
|
+
if (intent === 'team')
|
|
196
|
+
setIntent('chat');
|
|
197
|
+
}, display: "flex", bg: audience === 'personal' ? '$raised' : 'transparent', borderWidth: 1, borderColor: audience === 'personal' ? STRONG : 'transparent', minH: 34, $touchable: { minH: 44 }, "$max-sm": { minH: 44 }, px: "$3.5", py: "$1.5", rounded: "$10", cursor: "pointer", items: "center", justify: "center", hoverStyle: audience === 'personal' ? {} : { bg: '$hover' }, focusVisibleStyle: FOCUS_RING, children: _jsx(Text, { fontFamily: "$body", fontSize: "$2", fontWeight: audience === 'personal' ? '600' : '400', color: audience === 'personal' ? '$ink' : '$soft', children: t('Personal') }) }), _jsx(Box, { render: _jsx("button", { type: "button" }), onClick: () => {
|
|
198
|
+
setAudience('business');
|
|
199
|
+
setIntent('team');
|
|
200
|
+
}, display: "flex", bg: audience === 'business' ? '$raised' : 'transparent', borderWidth: 1, borderColor: audience === 'business' ? STRONG : 'transparent', minH: 34, $touchable: { minH: 44 }, "$max-sm": { minH: 44 }, px: "$3.5", py: "$1.5", rounded: "$10", cursor: "pointer", items: "center", justify: "center", hoverStyle: audience === 'business' ? {} : { bg: '$hover' }, focusVisibleStyle: FOCUS_RING, children: _jsx(Text, { fontFamily: "$body", fontSize: "$2", fontWeight: audience === 'business' ? '600' : '400', color: audience === 'business' ? '$ink' : '$soft', children: t('Business') }) })] }), _jsxs(YStack, { items: "center", gap: "$1.5", pt: "$1.5", width: "100%", children: [_jsx(XStack, { "data-slot": "upgrade-intent-picker", role: "radiogroup", "aria-label": t('Help me pick a plan'), items: "center", justify: "center", gap: "$1.5", flexWrap: "wrap", children: [
|
|
201
|
+
{ id: 'chat', label: t('Chatting') },
|
|
202
|
+
{ id: 'build', label: t('Building') },
|
|
203
|
+
{ id: 'team', label: t('Team') },
|
|
204
|
+
].map((opt) => {
|
|
205
|
+
const active = intent === opt.id;
|
|
206
|
+
return (_jsx(Box, { render: _jsx("button", { type: "button" }), "data-slot": `upgrade-intent-${opt.id}`, role: "radio", "aria-checked": active, onClick: () => selectIntent(opt.id), display: "inline-flex", items: "center", justify: "center", minH: 32, $touchable: { minH: 44 }, "$max-sm": { minH: 44 }, px: "$3", py: "$1", rounded: "$10", bg: active ? '$raised' : 'transparent', borderWidth: 1, borderColor: active ? STRONG : '$edge', cursor: "pointer", hoverStyle: { bg: '$hover', borderColor: STRONG }, focusVisibleStyle: FOCUS_RING, children: _jsx(Text, { fontFamily: "$body", fontSize: "$1", fontWeight: active ? '600' : '500', color: active ? '$ink' : '$soft', children: opt.label }) }, opt.id));
|
|
207
|
+
}) }), _jsx(Text, { "data-slot": "upgrade-intent-hint", fontFamily: "$body", fontSize: "$1", color: "$soft", text: "center", children: intentHint })] })] }), audience === 'personal' ? (_jsxs(YStack, { gap: "$4", width: "100%", children: [_jsxs(View, { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(min(100%, 260px), 1fr))", gap: 16, width: "100%", items: "stretch", children: [_jsx(YStack, { "data-slot": "plan-free", bg: "var(--surface-card)", borderWidth: 1, borderColor: "$edge", rounded: "$5", p: "$5", gap: "$4", justify: "space-between", children: _jsxs(YStack, { gap: "$3.5", children: [_jsx(XStack, { items: "center", justify: "space-between", gap: "$2", children: _jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(Sprout, { size: 16, color: SOFT, "aria-hidden": true }), _jsx(Text, { fontFamily: "$heading", fontSize: "$5", fontWeight: "600", color: "$ink", children: t('Free') })] }) }), _jsxs(XStack, { items: "baseline", gap: "$1.5", children: [_jsx(Text, { fontFamily: "$heading", fontSize: "$8", fontWeight: "700", letterSpacing: '-0.025em', color: "$ink", fontVariant: ['tabular-nums'], children: "$0" }), _jsx(Text, { fontFamily: "$body", fontSize: "$2", color: "$soft", children: t('/ month') })] }), _jsx(Text, { fontFamily: "$body", fontSize: "$2", fontWeight: "500", color: "$ink", children: t('Explore chat, design, and build for everyday tasks.') }), _jsx(Button, { disabled: true, variant: "outline", rounded: "$10", width: "100%", minH: 40, $touchable: { minH: 44 }, "$max-sm": { minH: 44 }, py: "$2", borderColor: "$edge", bg: "transparent", cursor: "default", children: _jsx(Text, { fontFamily: "$body", fontSize: "$2", fontWeight: "500", color: "$soft", children: currentPlanId === 'free' ? t('Current plan') : t('Included') }) }), _jsx(YStack, { gap: "$2.5", pt: "$1", children: [
|
|
208
|
+
t('Everyday chats and writing'),
|
|
209
|
+
t('Standard AI models'),
|
|
210
|
+
t('Saved chat history and memory'),
|
|
211
|
+
t('Starter design and build sessions'),
|
|
212
|
+
].map((feat) => (_jsxs(XStack, { items: "flex-start", gap: "$2", children: [_jsx(XStack, { pt: 2, shrink: 0, children: _jsx(Check, { size: 14, color: SOFT, "aria-hidden": true }) }), _jsx(Text, { fontFamily: "$body", fontSize: "$2", color: "$soft", flex: 1, minW: 0, children: feat })] }, feat))) })] }) }), _jsx(YStack, { "data-slot": "plan-pro", bg: proPrimary ? 'var(--surface-card-emphasis)' : 'var(--surface-card)', borderWidth: proPrimary ? 2 : 1, borderColor: proPrimary ? '$ink' : '$edge', rounded: "$5", p: "$5", gap: "$4", justify: "space-between", boxShadow: proPrimary ? 'var(--shadow-lg)' : 'var(--shadow-none)', children: _jsxs(YStack, { gap: "$3.5", children: [_jsxs(XStack, { items: "center", justify: "space-between", gap: "$2", flexWrap: "wrap", children: [_jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(Rocket, { size: 16, color: INK, "aria-hidden": true }), _jsx(Text, { fontFamily: "$heading", fontSize: "$5", fontWeight: "600", color: "$ink", children: t('Pro') })] }), _jsxs(XStack, { items: "center", gap: "$1.5", children: [_jsx(XStack, { px: "$2", py: "$0.5", rounded: "$10", bg: "$panel", borderWidth: 1, borderColor: "$edge", children: _jsx(Text, { fontFamily: "$body", fontSize: "$1", fontWeight: "600", color: "$soft", children: "3x" }) }), currentPlanId === 'pro-3x' ? (_jsx(XStack, { px: "$2.5", py: "$0.5", rounded: "$10", bg: "$panel", borderWidth: 1, borderColor: "$edge", children: _jsx(Text, { fontFamily: "$body", fontSize: "$1", fontWeight: "600", color: "$ink", children: t('Current') }) })) : proPrimary ? (_jsx(XStack, { px: "$2.5", py: "$0.5", rounded: "$10", bg: "$ink", children: _jsx(Text, { fontFamily: "$body", fontSize: "$1", fontWeight: "600", color: "$background", children: t('Recommended') }) })) : null] })] }), _jsxs(XStack, { items: "baseline", gap: "$1.5", children: [_jsx(Text, { fontFamily: "$heading", fontSize: "$8", fontWeight: "700", letterSpacing: '-0.025em', color: "$ink", fontVariant: ['tabular-nums'], children: "$15" }), _jsx(Text, { fontFamily: "$body", fontSize: "$2", color: "$soft", children: t('/ month') })] }), _jsx(Text, { fontFamily: "$body", fontSize: "$2", fontWeight: "500", color: "$ink", children: t('~300 frontier chats/day · best everyday choice.') }), currentPlanId === 'pro-3x' ? (_jsx(Button, { disabled: true, variant: "outline", rounded: "$10", width: "100%", minH: 40, $touchable: { minH: 44 }, "$max-sm": { minH: 44 }, py: "$2", borderColor: "$edge", bg: "transparent", cursor: "default", children: _jsx(Text, { fontFamily: "$body", fontSize: "$2", fontWeight: "500", color: "$soft", children: t('Current plan') }) })) : (_jsxs(Anchor, { "data-slot": "upgrade-pro-cta", href: proHref, onPress: () => handleBuy('pro-3x', 'Pro', 15), display: "flex", bg: proPrimary ? 'var(--primary)' : '$panel', hoverStyle: { bg: proPrimary ? 'var(--primary-hover)' : '$hover' }, focusVisibleStyle: FOCUS_RING, borderWidth: proPrimary ? 0 : 1, borderColor: proPrimary ? 'transparent' : STRONG, rounded: "$10", width: "100%", minH: 40, $touchable: { minH: 44 }, "$max-sm": { minH: 44 }, py: "$2", px: "$4", color: proPrimary ? 'var(--primary-foreground)' : '$ink', fontFamily: "$body", fontWeight: "600", fontSize: "$2", text: "center", textDecorationLine: "none", items: "center", justify: "center", gap: "$1.5", children: [proPrimary ? _jsx(Sparkles, { size: 15, color: "var(--primary-foreground)", "aria-hidden": true }) : null, t('Upgrade to Pro')] })), _jsx(YStack, { gap: "$2.5", pt: "$1", children: [
|
|
213
|
+
t('Everything in Free'),
|
|
214
|
+
t('3x session and weekly limits (~300 chats/day)'),
|
|
215
|
+
t('Enso Ultra and frontier reasoning models'),
|
|
216
|
+
t('Build apps, sites, and automations'),
|
|
217
|
+
t('1 custom Hanzo Bot and priority support'),
|
|
218
|
+
].map((feat, idx) => (_jsxs(XStack, { items: "flex-start", gap: "$2", children: [_jsx(XStack, { pt: 2, shrink: 0, children: _jsx(Check, { size: 14, color: idx === 0 ? INK : SOFT, "aria-hidden": true }) }), _jsx(Text, { fontFamily: "$body", fontSize: "$2", color: idx === 0 ? '$ink' : '$soft', fontWeight: idx === 0 ? '500' : '400', flex: 1, minW: 0, children: feat })] }, feat))) })] }) }), _jsx(YStack, { "data-slot": "plan-max", bg: maxPrimary ? 'var(--surface-card-emphasis)' : 'var(--surface-card)', borderWidth: maxPrimary ? 2 : 1, borderColor: maxPrimary ? '$ink' : '$edge', rounded: "$5", p: "$5", gap: "$4", justify: "space-between", boxShadow: maxPrimary ? 'var(--shadow-lg)' : 'var(--shadow-none)', children: _jsxs(YStack, { gap: "$3.5", children: [_jsxs(XStack, { items: "center", justify: "space-between", gap: "$2", children: [_jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(Crown, { size: 16, color: maxPrimary ? INK : SOFT, "aria-hidden": true }), _jsx(Text, { fontFamily: "$heading", fontSize: "$5", fontWeight: "600", color: "$ink", children: t('Max') })] }), _jsxs(XStack, { items: "center", gap: "$1.5", children: [_jsx(XStack, { px: "$2", py: "$0.5", rounded: "$10", bg: "$panel", borderWidth: 1, borderColor: "$edge", children: _jsx(Text, { fontFamily: "$body", fontSize: "$1", fontWeight: "600", color: "$soft", children: "15x" }) }), maxPrimary ? (_jsx(XStack, { px: "$2.5", py: "$0.5", rounded: "$10", bg: "$ink", children: _jsx(Text, { fontFamily: "$body", fontSize: "$1", fontWeight: "600", color: "$background", children: t('Recommended') }) })) : null] })] }), _jsxs(XStack, { items: "baseline", gap: "$1.5", children: [_jsx(Text, { fontFamily: "$heading", fontSize: "$8", fontWeight: "700", letterSpacing: '-0.025em', color: "$ink", fontVariant: ['tabular-nums'], children: "$95" }), _jsx(Text, { fontFamily: "$body", fontSize: "$2", color: "$soft", children: t('/ month') })] }), _jsx(Text, { fontFamily: "$body", fontSize: "$2", fontWeight: "500", color: "$ink", children: t('~1,500 chats/day for sustained building and parallel agents.') }), currentPlanId === 'max-15x' ? (_jsx(Button, { disabled: true, variant: "outline", rounded: "$10", width: "100%", minH: 40, $touchable: { minH: 44 }, "$max-sm": { minH: 44 }, py: "$2", borderColor: "$edge", bg: "transparent", cursor: "default", children: _jsx(Text, { fontFamily: "$body", fontSize: "$2", fontWeight: "500", color: "$soft", children: t('Current plan') }) })) : (_jsxs(Anchor, { "data-slot": "upgrade-max-cta", href: maxHref, onPress: () => handleBuy('max-15x', 'Max', 95), display: "flex", bg: maxPrimary ? 'var(--primary)' : '$panel', hoverStyle: { bg: maxPrimary ? 'var(--primary-hover)' : '$hover' }, focusVisibleStyle: FOCUS_RING, borderWidth: maxPrimary ? 0 : 1, borderColor: maxPrimary ? 'transparent' : STRONG, rounded: "$10", width: "100%", minH: 40, $touchable: { minH: 44 }, "$max-sm": { minH: 44 }, py: "$2", px: "$4", color: maxPrimary ? 'var(--primary-foreground)' : '$ink', fontFamily: "$body", fontWeight: "600", fontSize: "$2", text: "center", textDecorationLine: "none", items: "center", justify: "center", gap: "$1.5", children: [maxPrimary ? _jsx(Sparkles, { size: 15, color: "var(--primary-foreground)", "aria-hidden": true }) : null, t('Upgrade to Max')] })), _jsx(YStack, { gap: "$2.5", pt: "$1", children: [
|
|
219
|
+
t('Everything in Pro'),
|
|
220
|
+
t('15x usage limits (~1,500 chats/day)'),
|
|
221
|
+
t('Parallel cloud workspaces and runs'),
|
|
222
|
+
t('5 custom Hanzo Bots'),
|
|
136
223
|
t('Dedicated priority support'),
|
|
137
|
-
].map((feat, idx) => (_jsxs(XStack, { items: "center", gap: "$2.5", children: [_jsx(Check, { size: 16, color: INK, "aria-hidden": true }), _jsx(Text, { fontSize: 13, color: "$ink", fontWeight: idx === 0 ? '600' : '400', children: feat })] }, feat))) })] }) })] }), _jsx(XStack, { justify: "center", pt: "$1", children: _jsx(Box, { render: "button", onClick: () => setShowAllPersonal(true), bg: "var(--glass)", hoverStyle: { bg: 'var(--glass-strong)' }, px: "$4", py: "$2", rounded: "$10", borderWidth: 1, borderColor: "var(--border)", cursor: "pointer", children: _jsx(Text, { fontSize: 13, fontWeight: "500", color: "$ink", children: t('Show all plans (Free, Go, Pro, Dev, Max, Ultra) ↓') }) }) })] })) : (_jsxs(YStack, { gap: "$4", width: "100%", children: [_jsxs(View, { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(220px, 1fr))", gap: 14, width: "100%", items: "stretch", children: [_jsx(YStack, { bg: "var(--surface-card-quiet)", borderWidth: 1, borderColor: "var(--border)", rounded: "$6", p: "$4", justify: "space-between", gap: "$3", children: _jsxs(YStack, { gap: "$2", children: [_jsxs(XStack, { items: "center", gap: "$1.5", children: [_jsx(Sprout, { size: 15, color: SOFT, "aria-hidden": true }), _jsx(Text, { fontSize: 12, fontWeight: "600", color: "$soft", children: t('Free') })] }), _jsx(Text, { fontSize: 18, fontWeight: "700", color: "$ink", children: t('Try Hanzo') }), _jsx(Text, { fontSize: 12, color: "$soft", minH: 32, children: t('See what AI can do.') }), _jsx(Button, { disabled: true, variant: "outline", rounded: "$10", py: "$1.5", borderColor: "var(--border-control)", bg: "transparent", cursor: "default", children: _jsx(Text, { fontSize: 12, fontWeight: "500", color: "$soft", children: t('Current plan') }) }), _jsxs(XStack, { items: "baseline", gap: "$1", children: [_jsx(Text, { fontSize: 22, fontWeight: "700", color: "$ink", children: "$0" }), _jsx(Text, { fontSize: 12, color: "$soft", children: t('/ mo') })] }), _jsx(YStack, { gap: "$1.5", pt: "$1", children: [t('Everyday chats'), t('Foundation models'), t('Standard speed'), t('Community support')].map((f) => (_jsxs(XStack, { items: "center", gap: "$1.5", children: [_jsx(Check, { size: 13, color: SOFT, "aria-hidden": true }), _jsx(Text, { fontSize: 11, color: "$ink", children: f })] }, f))) })] }) }), _jsx(YStack, { bg: "var(--surface-card-quiet)", borderWidth: 1, borderColor: "var(--border)", rounded: "$6", p: "$4", justify: "space-between", gap: "$3", children: _jsxs(YStack, { gap: "$2", children: [_jsxs(XStack, { items: "center", gap: "$1.5", children: [_jsx(Zap, { size: 15, color: INK, "aria-hidden": true }), _jsx(Text, { fontSize: 12, fontWeight: "600", color: "$soft", children: t('Go') })] }), _jsx(Text, { fontSize: 18, fontWeight: "700", color: "$ink", children: t('Everyday AI') }), _jsx(Text, { fontSize: 12, color: "$soft", minH: 32, children: t('More models & agents.') }), _jsx(Anchor, { href: goHref, onPress: () => handleBuy('go', 'Go', 8), bg: "var(--primary)", rounded: "$10", py: "$1.5", px: "$3", color: "var(--primary-foreground)", fontWeight: "600", fontSize: 12, text: "center", textDecorationLine: "none", children: t('Get Go') }), _jsxs(XStack, { items: "baseline", gap: "$1", children: [_jsx(Text, { fontSize: 22, fontWeight: "700", color: "$ink", children: "$8" }), _jsx(Text, { fontSize: 12, color: "$soft", children: t('/ mo') })] }), _jsx(YStack, { gap: "$1.5", pt: "$1", children: [t('All frontier models'), t('Hanzo Dev & CLI'), t('Connect MCP servers'), t('Background agents')].map((f) => (_jsxs(XStack, { items: "center", gap: "$1.5", children: [_jsx(Check, { size: 13, color: INK, "aria-hidden": true }), _jsx(Text, { fontSize: 11, color: "$ink", children: f })] }, f))) })] }) }), _jsx(YStack, { bg: "var(--surface-card)", borderWidth: 1.5, borderColor: "var(--border-selected)", rounded: "$6", p: "$4", justify: "space-between", gap: "$3", children: _jsxs(YStack, { gap: "$2", children: [_jsxs(XStack, { items: "center", gap: "$1.5", children: [_jsx(Rocket, { size: 15, color: INK, "aria-hidden": true }), _jsx(Text, { fontSize: 12, fontWeight: "700", color: "$ink", children: t('Pro 3×') })] }), _jsx(Text, { fontSize: 18, fontWeight: "700", color: "$ink", children: t('Pro') }), _jsx(Text, { fontSize: 12, color: "$soft", minH: 32, children: t('3× limits for builders.') }), _jsx(Anchor, { href: proHref, onPress: () => handleBuy('pro-3x', 'Pro', 15), bg: "var(--primary)", rounded: "$10", py: "$1.5", px: "$3", color: "var(--primary-foreground)", fontWeight: "600", fontSize: 12, text: "center", textDecorationLine: "none", children: t('Get Pro') }), _jsxs(XStack, { items: "baseline", gap: "$1", children: [_jsx(Text, { fontSize: 22, fontWeight: "700", color: "$ink", children: "$15" }), _jsx(Text, { fontSize: 12, color: "$soft", children: t('/ mo') })] }), _jsx(YStack, { gap: "$1.5", pt: "$1", children: [t('3× more usage than Go'), t('3× higher 5h limits'), t('1 custom Hanzo Bot'), t('Priority support')].map((f) => (_jsxs(XStack, { items: "center", gap: "$1.5", children: [_jsx(Check, { size: 13, color: INK, "aria-hidden": true }), _jsx(Text, { fontSize: 11, color: "$ink", children: f })] }, f))) })] }) }), _jsx(YStack, { bg: "var(--surface-card-quiet)", borderWidth: 1, borderColor: "var(--border)", rounded: "$6", p: "$4", justify: "space-between", gap: "$3", children: _jsxs(YStack, { gap: "$2", children: [_jsxs(XStack, { items: "center", gap: "$1.5", children: [_jsx(Cpu, { size: 15, color: INK, "aria-hidden": true }), _jsx(Text, { fontSize: 12, fontWeight: "700", color: "$ink", children: t('Dev 5×') })] }), _jsx(Text, { fontSize: 18, fontWeight: "700", color: "$ink", children: t('Dev') }), _jsx(Text, { fontSize: 12, color: "$soft", minH: 32, children: t('5× limits for agents.') }), _jsx(Anchor, { href: devHref, onPress: () => handleBuy('dev-5x', 'Dev', 45), bg: "var(--primary)", rounded: "$10", py: "$1.5", px: "$3", color: "var(--primary-foreground)", fontWeight: "600", fontSize: 12, text: "center", textDecorationLine: "none", children: t('Get Dev') }), _jsxs(XStack, { items: "baseline", gap: "$1", children: [_jsx(Text, { fontSize: 22, fontWeight: "700", color: "$ink", children: "$45" }), _jsx(Text, { fontSize: 12, color: "$soft", children: t('/ mo') })] }), _jsx(YStack, { gap: "$1.5", pt: "$1", children: [t('5× more usage than Go'), t('5× higher 5h limits'), t('2 custom Hanzo Bots'), t('Train custom models')].map((f) => (_jsxs(XStack, { items: "center", gap: "$1.5", children: [_jsx(Check, { size: 13, color: INK, "aria-hidden": true }), _jsx(Text, { fontSize: 11, color: "$ink", children: f })] }, f))) })] }) }), _jsx(YStack, { bg: "var(--surface-card-quiet)", borderWidth: 1, borderColor: "var(--border)", rounded: "$6", p: "$4", justify: "space-between", gap: "$3", children: _jsxs(YStack, { gap: "$2", children: [_jsxs(XStack, { items: "center", gap: "$1.5", children: [_jsx(Crown, { size: 15, color: INK, "aria-hidden": true }), _jsx(Text, { fontSize: 12, fontWeight: "700", color: "$ink", children: t('Max 15×') })] }), _jsx(Text, { fontSize: 18, fontWeight: "700", color: "$ink", children: t('Max') }), _jsx(Text, { fontSize: 12, color: "$soft", minH: 32, children: t('15× continuous limits.') }), _jsx(Anchor, { href: maxHref, onPress: () => handleBuy('max-15x', 'Max', 95), bg: "var(--primary)", rounded: "$10", py: "$1.5", px: "$3", color: "var(--primary-foreground)", fontWeight: "600", fontSize: 12, text: "center", textDecorationLine: "none", children: t('Get Max') }), _jsxs(XStack, { items: "baseline", gap: "$1", children: [_jsx(Text, { fontSize: 22, fontWeight: "700", color: "$ink", children: "$95" }), _jsx(Text, { fontSize: 12, color: "$soft", children: t('/ mo') })] }), _jsx(YStack, { gap: "$1.5", pt: "$1", children: [t('15× more usage than Go'), t('15× higher 5h limits'), t('5 custom Hanzo Bots'), t('Dedicated support')].map((f) => (_jsxs(XStack, { items: "center", gap: "$1.5", children: [_jsx(Check, { size: 13, color: INK, "aria-hidden": true }), _jsx(Text, { fontSize: 11, color: "$ink", children: f })] }, f))) })] }) }), _jsx(YStack, { bg: "var(--surface-card-quiet)", borderWidth: 1, borderColor: "var(--border)", rounded: "$6", p: "$4", justify: "space-between", gap: "$3", children: _jsxs(YStack, { gap: "$2", children: [_jsxs(XStack, { items: "center", gap: "$1.5", children: [_jsx(Gem, { size: 15, color: INK, "aria-hidden": true }), _jsx(Text, { fontSize: 12, fontWeight: "700", color: "$ink", children: t('Ultra 25×') })] }), _jsx(Text, { fontSize: 18, fontWeight: "700", color: "$ink", children: t('Frontier Scale') }), _jsx(Text, { fontSize: 12, color: "$soft", minH: 32, children: t('25× limits for the biggest workloads.') }), _jsx(Anchor, { href: ultraHref, onPress: () => handleBuy('ultra', 'Ultra', 195), bg: "var(--secondary)", rounded: "$10", py: "$1.5", px: "$3", color: "$ink", fontWeight: "600", fontSize: 12, text: "center", textDecorationLine: "none", children: t('Get Ultra') }), _jsxs(XStack, { items: "baseline", gap: "$1", children: [_jsx(Text, { fontSize: 22, fontWeight: "700", color: "$ink", children: "$195" }), _jsx(Text, { fontSize: 12, color: "$soft", children: t('/ mo') })] }), _jsx(YStack, { gap: "$1.5", pt: "$1", children: [t('25× more usage than Go'), t('25× higher 5h limits'), t('10 custom Hanzo Bots'), t('Engineering Slack')].map((f) => (_jsxs(XStack, { items: "center", gap: "$1.5", children: [_jsx(Check, { size: 13, color: INK, "aria-hidden": true }), _jsx(Text, { fontSize: 11, color: "$ink", children: f })] }, f))) })] }) })] }), _jsx(XStack, { justify: "center", pt: "$1", children: _jsx(Box, { render: "button", onClick: () => setShowAllPersonal(false), bg: "transparent", hoverStyle: { bg: '$hover' }, px: "$4", py: "$2", rounded: "$10", borderWidth: 1, borderColor: "var(--border)", cursor: "pointer", children: _jsx(Text, { fontSize: 13, fontWeight: "500", color: "$soft", children: t('Show fewer plans ↑') }) }) })] }))) : (_jsxs(YStack, { gap: "$4", width: "100%", children: [_jsxs(View, { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(320px, 1fr))", gap: 24, width: "100%", items: "stretch", children: [_jsx(YStack, { bg: "var(--surface-card-quiet)", borderWidth: 1, borderColor: "var(--border)", rounded: "$6", p: "$6", gap: "$5", justify: "space-between", children: _jsxs(YStack, { gap: "$3.5", children: [_jsx(Text, { fontSize: 14, fontWeight: "500", color: "$soft", children: t('Free') }), _jsxs(YStack, { gap: "$1", children: [_jsx(Text, { fontSize: 24, fontWeight: "700", color: "$ink", children: t('Try Hanzo') }), _jsx(Text, { fontSize: 14, color: "$soft", children: t('See what AI can do.') })] }), _jsx(Button, { disabled: true, variant: "outline", rounded: "$10", width: "100%", py: "$2.5", my: "$2", borderColor: "var(--border-control)", bg: "transparent", cursor: "default", children: _jsx(Text, { fontSize: 14, fontWeight: "500", color: "$soft", children: t('Your current plan') }) }), _jsxs(XStack, { items: "baseline", gap: "$1", children: [_jsx(Text, { fontSize: 28, fontWeight: "700", color: "$ink", children: "$0" }), _jsx(Text, { fontSize: 14, color: "$soft", children: t('/ month') })] }), _jsx(YStack, { gap: "$3", pt: "$3", children: [
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
t('
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
[
|
|
149
|
-
[
|
|
150
|
-
[
|
|
151
|
-
[
|
|
152
|
-
|
|
224
|
+
].map((feat, idx) => (_jsxs(XStack, { items: "flex-start", gap: "$2", children: [_jsx(XStack, { pt: 2, shrink: 0, children: _jsx(Check, { size: 14, color: idx === 0 ? INK : SOFT, "aria-hidden": true }) }), _jsx(Text, { fontFamily: "$body", fontSize: "$2", color: idx === 0 ? '$ink' : '$soft', fontWeight: idx === 0 ? '500' : '400', flex: 1, minW: 0, children: feat })] }, feat))) })] }) })] }), _jsxs(YStack, { gap: "$3", items: "center", children: [_jsx(Box, { render: _jsx("button", { type: "button" }), "data-slot": "upgrade-more-plans", onClick: () => setShowMorePlans((v) => !v), display: "flex", bg: "transparent", hoverStyle: { bg: '$hover' }, focusVisibleStyle: FOCUS_RING, minH: 36, $touchable: { minH: 44 }, "$max-sm": { minH: 44 }, px: "$3.5", py: "$1.5", rounded: "$10", borderWidth: 1, borderColor: STRONG, cursor: "pointer", items: "center", justify: "center", children: _jsxs(XStack, { items: "center", gap: "$1.5", children: [_jsx(Text, { fontFamily: "$body", fontSize: "$1", fontWeight: "500", color: "$soft", children: showMorePlans ? t('Hide extra plans') : t('See more plans (Go $8, Dev $45, Ultra $195)') }), showMorePlans ? (_jsx(ChevronUp, { size: 13, color: SOFT, "aria-hidden": true })) : (_jsx(ChevronDown, { size: 13, color: SOFT, "aria-hidden": true }))] }) }), showMorePlans ? (_jsx(View, { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(min(100%, 240px), 1fr))", gap: 16, width: "100%", items: "stretch", children: extraPlans.map((p) => {
|
|
225
|
+
const Icon = p.icon;
|
|
226
|
+
const highlighted = devPrimary && p.id === 'dev-5x';
|
|
227
|
+
return (_jsxs(YStack, { "data-slot": `plan-${p.id}`, bg: highlighted ? 'var(--surface-card-emphasis)' : 'var(--surface-card)', borderWidth: highlighted ? 2 : 1, borderColor: highlighted ? '$ink' : '$edge', rounded: "$5", p: "$5", gap: "$3.5", justify: "space-between", boxShadow: highlighted ? 'var(--shadow-lg)' : 'var(--shadow-none)', children: [_jsxs(YStack, { gap: "$2.5", children: [_jsxs(XStack, { items: "center", justify: "space-between", gap: "$1.5", flexWrap: "wrap", children: [_jsxs(XStack, { items: "center", gap: "$1.5", children: [_jsx(Icon, { size: 15, color: highlighted ? INK : SOFT, "aria-hidden": true }), _jsx(Text, { fontFamily: "$heading", fontSize: "$5", fontWeight: "600", color: "$ink", children: p.name })] }), _jsxs(XStack, { items: "center", gap: "$1", children: [_jsx(XStack, { px: "$2", py: "$0.5", rounded: "$10", bg: "$panel", borderWidth: 1, borderColor: "$edge", children: _jsx(Text, { fontFamily: "$body", fontSize: "$1", fontWeight: "600", color: "$soft", children: p.badge }) }), highlighted ? (_jsx(XStack, { px: "$2.5", py: "$0.5", rounded: "$10", bg: "$ink", children: _jsx(Text, { fontFamily: "$body", fontSize: "$1", fontWeight: "600", color: "$background", children: t('Best fit') }) })) : null] })] }), _jsxs(XStack, { items: "baseline", gap: "$1.5", children: [_jsxs(Text, { fontFamily: "$heading", fontSize: "$8", fontWeight: "700", letterSpacing: '-0.025em', color: "$ink", fontVariant: ['tabular-nums'], children: ["$", p.price] }), _jsx(Text, { fontFamily: "$body", fontSize: "$2", color: "$soft", children: t('/ month') })] }), _jsx(Text, { fontFamily: "$body", fontSize: "$2", fontWeight: "500", color: "$ink", children: p.capacity }), _jsx(Text, { fontFamily: "$body", fontSize: "$2", color: "$soft", children: p.subtitle }), _jsx(YStack, { gap: "$2", pt: "$1", children: p.features.map((f) => (_jsxs(XStack, { items: "flex-start", gap: "$2", children: [_jsx(XStack, { pt: 2, shrink: 0, children: _jsx(Check, { size: 14, color: SOFT, "aria-hidden": true }) }), _jsx(Text, { fontFamily: "$body", fontSize: "$2", color: "$soft", flex: 1, minW: 0, children: f })] }, f))) })] }), currentPlanId === p.id ? (_jsx(Button, { disabled: true, variant: "outline", rounded: "$10", width: "100%", minH: 40, $touchable: { minH: 44 }, "$max-sm": { minH: 44 }, py: "$2", borderColor: "$edge", bg: "transparent", cursor: "default", children: _jsx(Text, { fontFamily: "$body", fontSize: "$2", fontWeight: "500", color: "$soft", children: t('Current plan') }) })) : (_jsxs(Anchor, { "data-slot": `upgrade-${p.id}-cta`, href: p.href, onPress: () => handleBuy(p.id, p.name, p.price), display: "flex", items: "center", justify: "center", gap: "$1.5", bg: highlighted ? 'var(--primary)' : '$panel', hoverStyle: { bg: highlighted ? 'var(--primary-hover)' : '$hover' }, focusVisibleStyle: FOCUS_RING, borderWidth: highlighted ? 0 : 1, borderColor: highlighted ? 'transparent' : STRONG, rounded: "$10", minH: 40, $touchable: { minH: 44 }, "$max-sm": { minH: 44 }, py: "$2", px: "$3", color: highlighted ? 'var(--primary-foreground)' : '$ink', fontFamily: "$body", fontWeight: "600", fontSize: "$2", text: "center", textDecorationLine: "none", children: [highlighted ? _jsx(Sparkles, { size: 13, color: "var(--primary-foreground)", "aria-hidden": true }) : null, t('Upgrade to {name}', { name: p.name })] }))] }, p.id));
|
|
228
|
+
}) })) : null] })] })) : (_jsxs(YStack, { gap: "$4", width: "100%", children: [_jsxs(View, { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(min(100%, 280px), 1fr))", gap: 20, width: "100%", items: "stretch", children: [_jsx(YStack, { bg: "var(--surface-card)", borderWidth: 1, borderColor: "$edge", rounded: "$5", p: "$5", gap: "$4", justify: "space-between", children: _jsxs(YStack, { gap: "$3.5", children: [_jsx(Text, { fontFamily: "$heading", fontSize: "$5", fontWeight: "600", color: "$ink", children: t('Free') }), _jsxs(XStack, { items: "baseline", gap: "$1.5", children: [_jsx(Text, { fontFamily: "$heading", fontSize: "$8", fontWeight: "700", letterSpacing: '-0.025em', color: "$ink", fontVariant: ['tabular-nums'], children: "$0" }), _jsx(Text, { fontFamily: "$body", fontSize: "$2", color: "$soft", children: t('/ month') })] }), _jsx(Text, { fontFamily: "$body", fontSize: "$2", fontWeight: "500", color: "$ink", children: t('Personal workspace for trying Hanzo.') }), _jsx(Button, { disabled: true, variant: "outline", rounded: "$10", width: "100%", minH: 40, $touchable: { minH: 44 }, "$max-sm": { minH: 44 }, py: "$2", borderColor: "$edge", bg: "transparent", cursor: "default", children: _jsx(Text, { fontFamily: "$body", fontSize: "$2", fontWeight: "500", color: "$soft", children: currentPlanId === 'free' ? t('Current plan') : t('Included') }) }), _jsx(YStack, { gap: "$2.5", pt: "$1", children: [
|
|
229
|
+
t('Everyday chats and writing'),
|
|
230
|
+
t('Standard AI models'),
|
|
231
|
+
t('Single personal workspace'),
|
|
232
|
+
].map((feat) => (_jsxs(XStack, { items: "flex-start", gap: "$2", children: [_jsx(XStack, { pt: 2, shrink: 0, children: _jsx(Check, { size: 14, color: SOFT, "aria-hidden": true }) }), _jsx(Text, { fontFamily: "$body", fontSize: "$2", color: "$soft", flex: 1, minW: 0, children: feat })] }, feat))) })] }) }), _jsx(YStack, { bg: "var(--surface-card-emphasis)", borderWidth: 2, borderColor: "$ink", rounded: "$5", p: "$5", gap: "$4", justify: "space-between", boxShadow: "var(--shadow-lg)", children: _jsxs(YStack, { gap: "$3.5", children: [_jsxs(XStack, { items: "center", justify: "space-between", gap: "$2", flexWrap: "wrap", children: [_jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(Text, { fontFamily: "$heading", fontSize: "$5", fontWeight: "600", color: "$ink", children: t('Business') }), _jsx(XStack, { px: "$2.5", py: "$0.5", rounded: "$10", bg: "$ink", children: _jsx(Text, { fontFamily: "$body", fontSize: "$1", fontWeight: "600", color: "$background", children: t('Recommended') }) })] }), _jsxs(XStack, { items: "center", bg: "$panel", p: "$0.5", rounded: "$10", gap: "$0.5", borderWidth: 1, borderColor: STRONG, children: [_jsx(Box, { render: _jsx("button", { type: "button" }), "aria-pressed": businessCycle === 'year', onClick: () => setBusinessCycle('year'), display: "flex", bg: businessCycle === 'year' ? '$raised' : 'transparent', borderWidth: 1, borderColor: businessCycle === 'year' ? STRONG : 'transparent', minH: 30, $touchable: { minH: 44 }, "$max-sm": { minH: 44 }, px: "$2.5", py: "$1", rounded: "$10", cursor: "pointer", items: "center", justify: "center", focusVisibleStyle: FOCUS_RING, children: _jsx(Text, { fontFamily: "$body", fontSize: "$1", fontWeight: businessCycle === 'year' ? '600' : '400', color: businessCycle === 'year' ? '$ink' : '$soft', children: t('Annual') }) }), _jsx(Box, { render: _jsx("button", { type: "button" }), "aria-pressed": businessCycle === 'month', onClick: () => setBusinessCycle('month'), display: "flex", bg: businessCycle === 'month' ? '$raised' : 'transparent', borderWidth: 1, borderColor: businessCycle === 'month' ? STRONG : 'transparent', minH: 30, $touchable: { minH: 44 }, "$max-sm": { minH: 44 }, px: "$2.5", py: "$1", rounded: "$10", cursor: "pointer", items: "center", justify: "center", focusVisibleStyle: FOCUS_RING, children: _jsx(Text, { fontFamily: "$body", fontSize: "$1", fontWeight: businessCycle === 'month' ? '600' : '400', color: businessCycle === 'month' ? '$ink' : '$soft', children: t('Monthly') }) })] })] }), _jsxs(YStack, { gap: "$1", children: [_jsxs(XStack, { items: "baseline", gap: "$1.5", children: [_jsx(Text, { fontFamily: "$heading", fontSize: "$8", fontWeight: "700", letterSpacing: '-0.025em', color: "$ink", fontVariant: ['tabular-nums'], children: businessCycle === 'year' ? '$16.67' : '$20' }), _jsx(Text, { fontFamily: "$body", fontSize: "$2", color: "$soft", children: t('/ seat / month') })] }), _jsx(Text, { fontFamily: "$body", fontSize: "$1", color: "$hint", children: businessCycle === 'year'
|
|
233
|
+
? t('Billed annually, 5 seats minimum.')
|
|
234
|
+
: t('Billed monthly, 5 seats minimum.') })] }), _jsx(Text, { fontFamily: "$body", fontSize: "$2", fontWeight: "500", color: "$ink", children: t('Shared workspace, centralized billing, and private company data.') }), currentPlanId === 'team' ? (_jsx(Button, { disabled: true, variant: "outline", rounded: "$10", width: "100%", minH: 40, $touchable: { minH: 44 }, "$max-sm": { minH: 44 }, py: "$2", borderColor: "$edge", bg: "transparent", cursor: "default", children: _jsx(Text, { fontFamily: "$body", fontSize: "$2", fontWeight: "500", color: "$soft", children: t('Current plan') }) })) : (_jsxs(Anchor, { "data-slot": "upgrade-business-cta", href: businessHref, onPress: () => handleBuy('team', 'Business', businessCycle === 'year' ? 200 : 20, businessCycle), display: "flex", bg: "var(--primary)", hoverStyle: { bg: 'var(--primary-hover)' }, focusVisibleStyle: FOCUS_RING, rounded: "$10", width: "100%", minH: 40, $touchable: { minH: 44 }, "$max-sm": { minH: 44 }, py: "$2", px: "$4", color: "var(--primary-foreground)", fontFamily: "$body", fontWeight: "600", fontSize: "$2", text: "center", textDecorationLine: "none", items: "center", justify: "center", gap: "$1.5", children: [_jsx(Sparkles, { size: 15, color: "var(--primary-foreground)", "aria-hidden": true }), t('Upgrade to Business')] })), _jsx(YStack, { gap: "$2.5", pt: "$1", children: [
|
|
235
|
+
[Users, t('Shared workspace for your team and AI')],
|
|
236
|
+
[Lock, t('Zero model training on your company data')],
|
|
237
|
+
[Link2, t('Google Workspace, Slack, and GitHub connections')],
|
|
238
|
+
[BarChart2, t('Team usage analytics and spend limits')],
|
|
239
|
+
[Layers, t('Centralized billing and member roles')],
|
|
240
|
+
[ShieldCheck, t('SSO and multi-factor security')],
|
|
241
|
+
[Workflow, t('Shared automations and background tasks')],
|
|
242
|
+
[Sliders, t('Mix standard ($20) and power ($100) seats')],
|
|
243
|
+
].map(([Icon, label], idx) => (_jsxs(XStack, { items: "flex-start", gap: "$2", children: [_jsx(XStack, { pt: 2, shrink: 0, children: _jsx(Icon, { size: 14, color: SOFT, "aria-hidden": true }) }), _jsx(Text, { fontFamily: "$body", fontSize: "$2", color: "$soft", flex: 1, minW: 0, children: label })] }, idx))) })] }) })] }), _jsxs(XStack, { justify: "center", items: "center", gap: "$1.5", pt: "$1", flexWrap: "wrap", children: [_jsx(Text, { fontFamily: "$body", fontSize: "$2", color: "$aside", children: t('Need custom security or dedicated infrastructure?') }), _jsx(Anchor, { href: site('/contact-sales'), display: "inline-flex", items: "center", minH: 32, "$max-sm": { minH: 44 }, px: "$1.5", rounded: "$2", fontFamily: "$body", fontSize: "$2", fontWeight: "600", color: "$ink", hoverStyle: { textDecorationLine: 'none' }, focusVisibleStyle: FOCUS_RING, children: t('Contact sales') })] })] })), _jsxs(XStack, { "data-slot": "upgrade-reassurance", items: "center", justify: "space-between", gap: "$3", rowGap: "$2.5", flexWrap: "wrap", px: "$4", py: "$3", rounded: "$4", bg: "var(--surface-card)", borderWidth: 1, borderColor: "$edge", children: [_jsxs(XStack, { items: "center", gap: "$2", shrink: 1, minW: 0, children: [_jsx(ShieldCheck, { size: 14, color: SOFT, "aria-hidden": true }), _jsx(Text, { fontFamily: "$body", fontSize: "$1", color: "$soft", children: t('Cancel anytime in 2 clicks · Unused credits never expire') })] }), _jsxs(XStack, { items: "center", gap: "$1.5", flexWrap: "wrap", shrink: 0, children: [_jsx(Text, { fontFamily: "$body", fontSize: "$1", color: "$hint", children: t('Quick top-up:') }), topUpChips.map((amount) => (_jsxs(Anchor, { "data-slot": `upgrade-topup-${amount}`, href: topUpAmountUrl(Number(amount), returnUrl), onPress: () => track('topup_chip_clicked', { amount: Number(amount) }), display: "inline-flex", items: "center", justify: "center", minH: 30, $touchable: { minH: 44 }, "$max-sm": { minH: 44 }, px: "$2.5", py: "$1", rounded: "$10", bg: "$panel", borderWidth: 1, borderColor: STRONG, fontFamily: "$body", fontSize: "$1", fontWeight: "600", color: "$ink", fontVariant: ['tabular-nums'], textDecorationLine: "none", hoverStyle: { bg: '$hover', textDecorationLine: 'none' }, focusVisibleStyle: FOCUS_RING, children: ["+$", amount] }, amount)))] })] }), _jsxs(XStack, { justify: "center", items: "center", gap: "$4", rowGap: "$1.5", pt: "$0.5", flexWrap: "wrap", children: [_jsx(Anchor, { "data-slot": "upgrade-add-credits", href: topUpHref, display: "inline-flex", items: "center", minH: 32, $touchable: { minH: 44 }, "$max-sm": { minH: 44 }, px: "$2", rounded: "$2", fontFamily: "$body", fontSize: "$2", fontWeight: "500", color: "$ink", hoverStyle: { bg: '$hover', textDecorationLine: 'none' }, focusVisibleStyle: FOCUS_RING, children: t('Add prepaid credits') }), _jsx(Anchor, { href: site('/pricing'), display: "inline-flex", items: "center", minH: 32, $touchable: { minH: 44 }, "$max-sm": { minH: 44 }, px: "$2", rounded: "$2", fontFamily: "$body", fontSize: "$2", color: "$soft", hoverStyle: { color: '$ink' }, focusVisibleStyle: FOCUS_RING, children: t('Compare full plan details') }), _jsx(Box, { render: _jsx("button", { type: "button" }), onClick: close, display: "inline-flex", bg: "transparent", borderWidth: 0, minH: 32, $touchable: { minH: 44 }, "$max-sm": { minH: 44 }, px: "$2", rounded: "$2", cursor: "pointer", items: "center", justify: "center", hoverStyle: { bg: '$hover' }, focusVisibleStyle: FOCUS_RING, children: _jsx(Text, { fontFamily: "$body", fontSize: "$2", color: "$soft", hoverStyle: { color: '$ink' }, children: t('Not now') }) })] })] }) }));
|
|
153
244
|
}
|
package/dist/Usage.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export interface ContextUsage {
|
|
|
7
7
|
draft?: string;
|
|
8
8
|
tools?: unknown;
|
|
9
9
|
}
|
|
10
|
-
/**
|
|
10
|
+
/** Compact live usage symbol + hover breakdown shared by Chat, Dev, and Studio. */
|
|
11
11
|
export declare function UsageControl({ context, read }: {
|
|
12
12
|
context?: ContextUsage;
|
|
13
13
|
read?: UseLimits;
|