@hanzo/app 0.3.57 → 0.3.58

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/Chat.js CHANGED
@@ -49,7 +49,7 @@ import { bearer, hasSession, named, org } from "./lib/session.js";
49
49
  import { api } from "./lib/api.js";
50
50
  import { app, dev, follow, go } from "./lib/host.js";
51
51
  import { useHost } from "./host.js";
52
- import { chats, house, paidPlan, paused, setCreditsAfterAllowance, spends, ultra, useLimits } from "./lib/limits.js";
52
+ import { chats, house, paidPlan, paused, setCreditsAfterAllowance, spends, uncapped, useLimits } from "./lib/limits.js";
53
53
  import { LimitedBanner } from "@hanzo/ui/product/LimitedBanner";
54
54
  import { NeedMoreUsageBanner, NeedMoreUsageModal } from "./NeedMoreUsage.js";
55
55
  import { WEB } from "./lib/web.js";
@@ -823,7 +823,7 @@ function Thread({ placeholder = message(), initial, anonymous = false, settled =
823
823
  const [shut, setShut] = useState(null);
824
824
  const which = pause ? `${kept ?? open ?? ""}:${chat.messages[chat.messages.length - 1]?.id ?? ""}` : null;
825
825
  const banner = which !== shut ? spent : null;
826
- const isUsageLimitReached = Boolean(pause && (spends(pause.reason) || !pause.reason) && !ultra(limits));
826
+ const isUsageLimitReached = Boolean(pause && (spends(pause.reason) || !pause.reason) && !uncapped(limits));
827
827
  const [needMoreUsageOpen, setNeedMoreUsageOpen] = useState(false);
828
828
  const [simulatedResetAt, setSimulatedResetAt] = useState(null);
829
829
  const seenUsageLimit = useRef(null);
@@ -1722,7 +1722,7 @@ function Thread({ placeholder = message(), initial, anonymous = false, settled =
1722
1722
  : failed.empty
1723
1723
  ? t("{model} answered with nothing.", { model: nameOf(model, listed) })
1724
1724
  : bill
1725
- ? spent?.message ?? (spends(bill.code) ? (ultra(limits) ? t("Your balance is empty.") : t("Usage reached.")) : bill.message || plainly(wrong, t("this conversation"), t))
1725
+ ? spent?.message ?? (spends(bill.code) ? (uncapped(limits) ? t("Your balance is empty.") : t("Usage reached.")) : bill.message || plainly(wrong, t("this conversation"), t))
1726
1726
  : resign
1727
1727
  ? t(anonymous
1728
1728
  ? "Sign in to ask this."
@@ -1820,7 +1820,7 @@ function Thread({ placeholder = message(), initial, anonymous = false, settled =
1820
1820
  },
1821
1821
  // WHAT GOES WITH THE MESSAGE, above the frame and at its width: the
1822
1822
  // pause and its ways past, one chip a file, and talk mode's words.
1823
- head: files.length || turnedAway || prepWrong || preparing || talk.open || talk.refusal || pause || simulatedResetAt ? (_jsxs(_Fragment, { children: [(banner && isUsageLimitReached) || simulatedResetAt ? (_jsx(NeedMoreUsageBanner, { resetsAt: pause?.resets_at ?? simulatedResetAt, fallbackModel: pause?.fallback ? nameOf(pause.fallback, listed) : null, isUltra: ultra(limits), customMessage: banner?.message ?? null, onGetMoreUsage: () => setNeedMoreUsageOpen(true), onSeeUsage: () => showSettings("usage") })) : banner ? (_jsx(LimitedBanner, { message: banner.message, actions: banner.actions, onAction: act, onUsage: () => showSettings("usage"), labels: { usage: t("See usage"), dismiss: t("Dismiss") } })) : null, actWrong ? (_jsx(Text, { role: "alert", "data-slot": "limited-banner-wrong", fontSize: "$2", color: BAD, children: actWrong })) : null, files.length ? (_jsx(XStack, { gap: "$1.5", flexWrap: "wrap", role: "list", "aria-label": t("Attached files"), "data-slot": "composer-attached", children: files.map((one) => (_jsx(HeldChip, { one: one, onOpen: openFile, onRemove: () => drop(at, one.id), onSave: anonymous ? undefined : (url, id) => keepOne(url, id, one.name, one.type) }, one.id))) })) : null, preparing ? (_jsxs(Text, { role: "status", "aria-live": "polite", "data-slot": "composer-preparing", fontSize: "$2", color: "$soft", children: [preparing, "\u2026"] })) : null, turnedAway || prepWrong ? (_jsx(Text, { role: "alert", fontSize: "$2", color: BAD, children: turnedAway || prepWrong })) : null, talk.open || talk.refusal ? (_jsx(Text, { role: "status", "aria-live": "polite", "data-slot": "composer-talk-reply", fontSize: "$2", color: talk.refusal ? BAD : "$soft", children: talk.refusal
1823
+ head: files.length || turnedAway || prepWrong || preparing || talk.open || talk.refusal || pause || simulatedResetAt ? (_jsxs(_Fragment, { children: [(banner && isUsageLimitReached) || simulatedResetAt ? (_jsx(NeedMoreUsageBanner, { resetsAt: pause?.resets_at ?? simulatedResetAt, fallbackModel: pause?.fallback ? nameOf(pause.fallback, listed) : null, isUncapped: uncapped(limits), customMessage: banner?.message ?? null, onGetMoreUsage: () => setNeedMoreUsageOpen(true), onSeeUsage: () => showSettings("usage") })) : banner ? (_jsx(LimitedBanner, { message: banner.message, actions: banner.actions, onAction: act, onUsage: () => showSettings("usage"), labels: { usage: t("See usage"), dismiss: t("Dismiss") } })) : null, actWrong ? (_jsx(Text, { role: "alert", "data-slot": "limited-banner-wrong", fontSize: "$2", color: BAD, children: actWrong })) : null, files.length ? (_jsx(XStack, { gap: "$1.5", flexWrap: "wrap", role: "list", "aria-label": t("Attached files"), "data-slot": "composer-attached", children: files.map((one) => (_jsx(HeldChip, { one: one, onOpen: openFile, onRemove: () => drop(at, one.id), onSave: anonymous ? undefined : (url, id) => keepOne(url, id, one.name, one.type) }, one.id))) })) : null, preparing ? (_jsxs(Text, { role: "status", "aria-live": "polite", "data-slot": "composer-preparing", fontSize: "$2", color: "$soft", children: [preparing, "\u2026"] })) : null, turnedAway || prepWrong ? (_jsx(Text, { role: "alert", fontSize: "$2", color: BAD, children: turnedAway || prepWrong })) : null, talk.open || talk.refusal ? (_jsx(Text, { role: "status", "aria-live": "polite", "data-slot": "composer-talk-reply", fontSize: "$2", color: talk.refusal ? BAD : "$soft", children: talk.refusal
1824
1824
  ? worded(talk.refusal)
1825
1825
  : talk.reply
1826
1826
  ? `Hanzo: ${talk.reply}`
@@ -7,12 +7,12 @@ export declare function formatResetParts(iso: string | null | undefined, now?: n
7
7
  export interface NeedMoreUsageBannerProps {
8
8
  resetsAt?: string | null;
9
9
  fallbackModel?: string | null;
10
- isUltra?: boolean;
10
+ isUncapped?: boolean;
11
11
  customMessage?: string | null;
12
12
  onGetMoreUsage: () => void;
13
13
  onSeeUsage: () => void;
14
14
  }
15
- export declare function NeedMoreUsageBanner({ resetsAt, fallbackModel, isUltra, customMessage, onGetMoreUsage, onSeeUsage, }: NeedMoreUsageBannerProps): import("react").JSX.Element;
15
+ export declare function NeedMoreUsageBanner({ resetsAt, fallbackModel, isUncapped, customMessage, onGetMoreUsage, onSeeUsage, }: NeedMoreUsageBannerProps): import("react").JSX.Element;
16
16
  export interface NeedMoreUsageModalProps {
17
17
  open: boolean;
18
18
  onClose: () => void;
@@ -38,10 +38,10 @@ function HandCoinMeterIcon() {
38
38
  function TeamTrendIcon() {
39
39
  return (_jsxs("svg", { width: "44", height: "40", viewBox: "0 0 44 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [_jsx("line", { x1: "8.2", y1: "30.2", x2: "15.3", y2: "19.8", stroke: "var(--foreground)", strokeWidth: "1.5", strokeLinecap: "round" }), _jsx("line", { x1: "19.2", y1: "18.8", x2: "25.8", y2: "22.2", stroke: "var(--foreground)", strokeWidth: "1.5", strokeLinecap: "round" }), _jsx("line", { x1: "29.3", y1: "21.0", x2: "36.5", y2: "10.5", stroke: "var(--foreground)", strokeWidth: "1.5", strokeLinecap: "round" }), _jsx("path", { d: "M31.5 10H37V15.5", stroke: "var(--foreground)", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("circle", { cx: "6.5", cy: "32.5", r: "2.5", stroke: "var(--foreground)", strokeWidth: "1.5", fill: "var(--card)" }), _jsx("circle", { cx: "17", cy: "17.5", r: "2.5", stroke: "var(--foreground)", strokeWidth: "1.5", fill: "var(--card)" }), _jsx("circle", { cx: "28", cy: "23.5", r: "2.5", stroke: "var(--foreground)", strokeWidth: "1.5", fill: "var(--card)" })] }));
40
40
  }
41
- export function NeedMoreUsageBanner({ resetsAt, fallbackModel, isUltra, customMessage, onGetMoreUsage, onSeeUsage, }) {
41
+ export function NeedMoreUsageBanner({ resetsAt, fallbackModel, isUncapped, customMessage, onGetMoreUsage, onSeeUsage, }) {
42
42
  const { t } = useI18n();
43
43
  const reset = formatResetParts(resetsAt);
44
- const headlinePrefix = isUltra
44
+ const headlinePrefix = isUncapped
45
45
  ? t("Your balance is empty")
46
46
  : customMessage && !resetsAt
47
47
  ? customMessage.replace(/\.$/, "")
package/dist/Upgrade.js CHANGED
@@ -11,7 +11,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  // in-card seat types (Standard & Premium), and enterprise notice at the bottom.
12
12
  import { useEffect, useState } from 'react';
13
13
  import { useI18n } from '@hanzo/i18n/react';
14
- import { BarChart2, Check, Cpu, Crown, Infinity, Layers, Link2, Lock, Rocket, ShieldCheck, Sliders, Sparkles, Sprout, Users, Workflow, X, Zap, } from 'lucide-react';
14
+ import { BarChart2, Check, Cpu, Crown, Gem, Layers, Link2, Lock, Rocket, ShieldCheck, Sliders, Sparkles, Sprout, Users, Workflow, X, Zap, } from 'lucide-react';
15
15
  import { Anchor, Box, Button, Dialog, DialogContent, DialogTitle, Text, View, XStack, YStack } from '@hanzo/ui';
16
16
  import { track } from './lib/tags.js';
17
17
  import { org } from './lib/session.js';
@@ -43,7 +43,7 @@ function here() {
43
43
  }
44
44
  const MULTIPLIERS = {
45
45
  '3x': {
46
- id: 'pro-2x',
46
+ id: 'pro-3x',
47
47
  name: 'Pro',
48
48
  multiple: '3×',
49
49
  price: 15,
@@ -58,16 +58,16 @@ const MULTIPLIERS = {
58
58
  price: 45,
59
59
  icon: Cpu,
60
60
  subtitle: '5× higher limits for autonomous coding agents.',
61
- bots: 1,
61
+ bots: 2,
62
62
  },
63
63
  '15x': {
64
- id: 'max-10x',
64
+ id: 'max-15x',
65
65
  name: 'Max',
66
66
  multiple: '15×',
67
67
  price: 95,
68
68
  icon: Crown,
69
69
  subtitle: '15× limits for heavy continuous coding sessions.',
70
- bots: 3,
70
+ bots: 5,
71
71
  },
72
72
  };
73
73
  export function Upgrade({ ask, onClose }) {
@@ -108,9 +108,9 @@ export function Upgrade({ ask, onClose }) {
108
108
  };
109
109
  const activeMultiplier = MULTIPLIERS[multiplier];
110
110
  const goHref = term(payUrl('/cart', { plan: 'go', org: org(), returnUrl: here() }), 'month');
111
- const proHref = term(payUrl('/cart', { plan: 'pro-2x', org: org(), returnUrl: here() }), 'month');
111
+ const proHref = term(payUrl('/cart', { plan: 'pro-3x', org: org(), returnUrl: here() }), 'month');
112
112
  const devHref = term(payUrl('/cart', { plan: 'dev-5x', org: org(), returnUrl: here() }), 'month');
113
- const maxHref = term(payUrl('/cart', { plan: 'max-10x', org: org(), returnUrl: here() }), 'month');
113
+ const maxHref = term(payUrl('/cart', { plan: 'max-15x', org: org(), returnUrl: here() }), 'month');
114
114
  const multiplierHref = term(payUrl('/cart', { plan: activeMultiplier.id, org: org(), returnUrl: here() }), 'month');
115
115
  const ultraHref = term(payUrl('/cart', { plan: 'ultra', org: org(), returnUrl: here() }), 'month');
116
116
  const businessHref = term(payUrl('/cart', { plan: 'team', quantity: '5', org: org(), returnUrl: here() }), businessCycle);
@@ -127,14 +127,14 @@ export function Upgrade({ ask, onClose }) {
127
127
  t('Community support'),
128
128
  ].map((feat) => (_jsxs(XStack, { items: "center", gap: "$2.5", children: [_jsx(Check, { size: 16, color: SOFT, "aria-hidden": true }), _jsx(Text, { fontSize: 13, color: "$ink", children: feat })] }, feat))) })] }) }), _jsx(YStack, { bg: "var(--surface-card-emphasis)", borderWidth: 1.5, borderColor: "var(--border-selected)", rounded: "$6", p: "$6", gap: "$4", justify: "space-between", boxShadow: "var(--shadow-lg)", children: _jsxs(YStack, { gap: "$3", children: [_jsxs(XStack, { items: "center", justify: "space-between", children: [_jsxs(XStack, { items: "center", gap: "$1.5", children: [_jsx(activeMultiplier.icon, { size: 16, color: INK, "aria-hidden": true }), _jsx(Text, { fontSize: 16, fontWeight: "700", color: "$ink", children: activeMultiplier.name })] }), _jsx(XStack, { items: "center", bg: "var(--secondary)", p: 2, rounded: "$10", gap: 1, borderWidth: 1, borderColor: "var(--border)", children: ['3x', '5x', '15x'].map((m) => (_jsx(Box, { render: "button", onClick: () => setMultiplier(m), bg: multiplier === m ? 'var(--card)' : 'transparent', px: "$2", py: "$0.5", rounded: "$10", borderWidth: 0, cursor: "pointer", children: _jsx(Text, { fontSize: 11, fontWeight: multiplier === m ? '700' : '500', color: multiplier === m ? '$ink' : '$soft', children: m }) }, m))) })] }), _jsxs(YStack, { gap: "$1", children: [_jsx(Text, { fontSize: 24, fontWeight: "700", color: "$ink", children: t('{name} {tier}', { name: activeMultiplier.name, tier: activeMultiplier.multiple }) }), _jsx(Text, { fontSize: 14, color: "$soft", children: t(activeMultiplier.subtitle) })] }), _jsxs(Anchor, { href: multiplierHref, onPress: () => handleBuy(activeMultiplier.id, activeMultiplier.name, activeMultiplier.price), bg: "var(--primary)", hoverStyle: { bg: 'var(--primary-hover)' }, rounded: "$10", width: "100%", py: "$3", my: "$1", color: "var(--primary-foreground)", fontWeight: "600", fontSize: 14, text: "center", textDecorationLine: "none", items: "center", justify: "center", gap: "$2", children: [_jsx(Sparkles, { size: 16, color: "var(--primary-foreground)", "aria-hidden": true }), t('Get {name}', { name: activeMultiplier.name })] }), _jsxs(XStack, { items: "baseline", gap: "$1", pt: "$1", children: [_jsxs(Text, { fontSize: 28, fontWeight: "700", color: "$ink", children: ["$", activeMultiplier.price] }), _jsx(Text, { fontSize: 14, color: "$soft", children: t('/ month') })] }), _jsx(YStack, { gap: "$2.5", pt: "$1", children: [
129
129
  t('Everything in Free, plus:'),
130
- t('{multiple} more usage than Free', { multiple: activeMultiplier.multiple }),
130
+ t('{multiple} more usage than Go', { multiple: activeMultiplier.multiple }),
131
131
  t('Access to Enso Ultra, Kai, and frontier models'),
132
132
  t('Build apps with Hanzo Dev & CLI'),
133
133
  t('Connect any MCP server'),
134
134
  t('Background agents & automations'),
135
135
  t('Hanzo Bot: {bots} custom {bots, plural, one {bot} other {bots}}', { bots: activeMultiplier.bots }),
136
136
  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-2x', '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('1 custom Hanzo Bot'), 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-10x', '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('3 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(Infinity, { size: 15, color: INK, "aria-hidden": true }), _jsx(Text, { fontSize: 12, fontWeight: "700", color: "$ink", children: t('Ultra') })] }), _jsx(Text, { fontSize: 18, fontWeight: "700", color: "$ink", children: t('Frontier Scale') }), _jsx(Text, { fontSize: 12, color: "$soft", minH: 32, children: t('Unlimited intelligence.') }), _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('Unlimited model usage'), t('No hourly rate limits'), t('5 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: [
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
138
  t('Unlimited everyday text chats'),
139
139
  t('Limited access to image creation'),
140
140
  t('Limited memory and storage'),
@@ -21,8 +21,12 @@ export declare const useLimits: (enabled?: boolean, org?: string | null, name?:
21
21
  */
22
22
  export declare const spendShown: ({ limits, answered }: Pick<UseLimits, 'limits' | 'answered'>) => boolean;
23
23
  export { paidPlan };
24
- /** Whether the plan is Ultra: its id, compared as `paidPlan` compares it. */
25
- export declare const ultra: (l: Pick<Limits, 'plan'> | null | undefined) => boolean;
24
+ /**
25
+ * Whether the plan has no caps: Unlimited, with no windows and no included-usage
26
+ * limit. Its id, compared as `paidPlan` compares it. Ultra has Go's windows x25,
27
+ * so it is capped like any paid plan.
28
+ */
29
+ export declare const uncapped: (l: Pick<Limits, 'plan'> | null | undefined) => boolean;
26
30
  /**
27
31
  * When a spent allowance comes back, on the reader's own clock, or null when the
28
32
  * server names no instant still ahead (none, one not RFC 3339, or one passed).
@@ -48,8 +52,8 @@ export declare const spends: (code: string) => boolean;
48
52
  * pay's amount step to add some), both for this browser's organization and
49
53
  * coming back here, and Try again later, which the host takes as putting the
50
54
  * banner away. Until the plan is read (`limits` null) there is no upgrade: the
51
- * plan could be Ultra. Ultra has no allowance to spend, so what turns it away is
52
- * an empty balance, said as that, and its one way on is credits. Any other
55
+ * plan could be Unlimited. Unlimited has no allowance to spend, so what turns it
56
+ * away is an empty balance, said as that, and its one way on is credits. Any other
53
57
  * refusal is the server's own words and ways (@hanzo/build `ways`). Everything
54
58
  * said goes through `t`, and the time through `f`.
55
59
  */
@@ -50,8 +50,12 @@ export const useLimits = (enabled = true, org = null, name) => useHeld(enabled ?
50
50
  */
51
51
  export const spendShown = ({ limits, answered }) => answered && !paidPlan(limits);
52
52
  export { paidPlan };
53
- /** Whether the plan is Ultra: its id, compared as `paidPlan` compares it. */
54
- export const ultra = (l) => l?.plan === 'ultra';
53
+ /**
54
+ * Whether the plan has no caps: Unlimited, with no windows and no included-usage
55
+ * limit. Its id, compared as `paidPlan` compares it. Ultra has Go's windows x25,
56
+ * so it is capped like any paid plan.
57
+ */
58
+ export const uncapped = (l) => l?.plan === 'unlimited';
55
59
  /** An instant as the server writes one: RFC 3339, with its offset. Anything else names no instant. */
56
60
  const INSTANT = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2})$/i;
57
61
  /**
@@ -102,8 +106,8 @@ export const spends = (code) => SPENT.has(code);
102
106
  * pay's amount step to add some), both for this browser's organization and
103
107
  * coming back here, and Try again later, which the host takes as putting the
104
108
  * banner away. Until the plan is read (`limits` null) there is no upgrade: the
105
- * plan could be Ultra. Ultra has no allowance to spend, so what turns it away is
106
- * an empty balance, said as that, and its one way on is credits. Any other
109
+ * plan could be Unlimited. Unlimited has no allowance to spend, so what turns it
110
+ * away is an empty balance, said as that, and its one way on is credits. Any other
107
111
  * refusal is the server's own words and ways (@hanzo/build `ways`). Everything
108
112
  * said goes through `t`, and the time through `f`.
109
113
  */
@@ -113,7 +117,7 @@ export function paused(n, limits, name = (id) => id, now = Date.now(), t = engli
113
117
  return { message: n.message, actions: ways(n.actions, t) };
114
118
  const here = typeof window === 'undefined' ? undefined : window.location.href;
115
119
  const topup = { kind: 'topup', label: t('Add credits'), url: payUrl('/amount/card', { org: org(), returnUrl: here }) };
116
- if (ultra(limits))
120
+ if (uncapped(limits))
117
121
  return { message: t('Your balance is empty.') + on, actions: [topup] };
118
122
  const credits = n.actions.find((a) => a.kind === 'credits');
119
123
  const way = credits ? { ...credits, label: t('Continue with credits') } : topup;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/app",
3
- "version": "0.3.57",
3
+ "version": "0.3.58",
4
4
  "description": "Hanzo's app: the shell and its apps (Home, Chat, Inbox, Contacts, Meet, Calendar, Drive, Board, Work, Bots), once, for every Hanzo surface.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",