@robosystems/core 0.21.2 → 0.21.4
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.
|
@@ -167,7 +167,7 @@ export function BrowseRepositories({ onSubscribed, onViewSubscriptions, showHead
|
|
|
167
167
|
}
|
|
168
168
|
// Check if user has any active subscriptions
|
|
169
169
|
const hasActiveSubscriptions = userSubscriptions.some((sub) => sub.status === 'active');
|
|
170
|
-
return (_jsxs("div", { className: "space-y-6", children: [_jsx(ToastContainer, {}), showHeader && (_jsxs("div", { className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-3 sm:gap-4", children: [_jsx("div", { className: "from-primary-500 to-secondary-600 shrink-0 rounded-lg bg-gradient-to-br p-2.5 sm:p-3", children: _jsx(HiGlobeAlt, { className: "h-6 w-6 text-white sm:h-8 sm:w-8" }) }), _jsxs("div", { className: "min-w-0", children: [_jsx("h1", { className: "font-heading text-2xl font-bold break-words text-zinc-900 sm:text-3xl dark:text-zinc-100", children: "Browse Repositories" }), _jsx("p", { className: "mt-1 text-sm text-zinc-500 dark:text-zinc-400", children: "Subscribe to read-only graph databases containing curated data" })] })] }), hasActiveSubscriptions && onViewSubscriptions && (_jsx(Button, { onClick: onViewSubscriptions, color: "gray", children: "View My Subscriptions" }))] })), showInfoCard && (_jsx(Card, { children: _jsxs("div", { className: "flex items-start gap-4", children: [_jsx("div", { className: "bg-primary-100 dark:bg-primary-900/30 rounded-lg p-3", children: _jsx(HiInformationCircle, { className: "text-primary-600 dark:text-primary-400 h-6 w-6" }) }), _jsxs("div", { className: "flex-1", children: [_jsx("h3", { className: "font-heading mb-3 text-lg font-semibold text-zinc-900 dark:text-white", children: "How Shared Repositories Work" }), _jsxs("div", { className: "grid gap-3 sm:grid-cols-2 lg:grid-cols-4", children: [_jsxs("div", { className: "flex items-start gap-2", children: [_jsx("div", { className: "bg-primary-500 mt-1 h-2 w-2 rounded-full" }), _jsx("span", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "Subscribe to gain read-only access to curated graph databases" })] }), _jsxs("div", { className: "flex items-start gap-2", children: [_jsx("div", { className: "bg-primary-500 mt-1 h-2 w-2 rounded-full" }), _jsx("span", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "
|
|
170
|
+
return (_jsxs("div", { className: "space-y-6", children: [_jsx(ToastContainer, {}), showHeader && (_jsxs("div", { className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-3 sm:gap-4", children: [_jsx("div", { className: "from-primary-500 to-secondary-600 shrink-0 rounded-lg bg-gradient-to-br p-2.5 sm:p-3", children: _jsx(HiGlobeAlt, { className: "h-6 w-6 text-white sm:h-8 sm:w-8" }) }), _jsxs("div", { className: "min-w-0", children: [_jsx("h1", { className: "font-heading text-2xl font-bold break-words text-zinc-900 sm:text-3xl dark:text-zinc-100", children: "Browse Repositories" }), _jsx("p", { className: "mt-1 text-sm text-zinc-500 dark:text-zinc-400", children: "Subscribe to read-only graph databases containing curated data" })] })] }), hasActiveSubscriptions && onViewSubscriptions && (_jsx(Button, { onClick: onViewSubscriptions, color: "gray", children: "View My Subscriptions" }))] })), showInfoCard && (_jsx(Card, { children: _jsxs("div", { className: "flex items-start gap-4", children: [_jsx("div", { className: "bg-primary-100 dark:bg-primary-900/30 rounded-lg p-3", children: _jsx(HiInformationCircle, { className: "text-primary-600 dark:text-primary-400 h-6 w-6" }) }), _jsxs("div", { className: "flex-1", children: [_jsx("h3", { className: "font-heading mb-3 text-lg font-semibold text-zinc-900 dark:text-white", children: "How Shared Repositories Work" }), _jsxs("div", { className: "grid gap-3 sm:grid-cols-2 lg:grid-cols-4", children: [_jsxs("div", { className: "flex items-start gap-2", children: [_jsx("div", { className: "bg-primary-500 mt-1 h-2 w-2 rounded-full" }), _jsx("span", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "Subscribe to gain read-only access to curated graph databases" })] }), _jsxs("div", { className: "flex items-start gap-2", children: [_jsx("div", { className: "bg-primary-500 mt-1 h-2 w-2 rounded-full" }), _jsx("span", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "Queries and MCP tools are included. Credits are for AI only." })] }), _jsxs("div", { className: "flex items-start gap-2", children: [_jsx("div", { className: "bg-primary-500 mt-1 h-2 w-2 rounded-full" }), _jsx("span", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "Generate API keys to access repositories via MCP tools in AI apps" })] }), _jsxs("div", { className: "flex items-start gap-2", children: [_jsx("div", { className: "bg-primary-500 mt-1 h-2 w-2 rounded-full" }), _jsx("span", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: "Different tiers offer varying credit limits and features" })] })] })] })] }) })), (offerings === null || offerings === void 0 ? void 0 : offerings.repositoryPlans) &&
|
|
171
171
|
Object.entries(offerings.repositoryPlans)
|
|
172
172
|
.filter(([_, repo]) => {
|
|
173
173
|
const repoData = repo;
|
|
@@ -183,7 +183,7 @@ export function BrowseRepositories({ onSubscribed, onViewSubscriptions, showHead
|
|
|
183
183
|
const trialEndsAt = userSub === null || userSub === void 0 ? void 0 : userSub.trial_ends_at;
|
|
184
184
|
const onTrial = !!trialEndsAt && utcDate(trialEndsAt) > new Date();
|
|
185
185
|
return (_jsx(Card, { className: "overflow-hidden", children: _jsxs("div", { className: "space-y-6", children: [_jsxs("div", { className: "flex items-start justify-between", children: [_jsxs("div", { className: "flex items-start gap-4", children: [_jsx("div", { className: "from-primary-500 to-secondary-600 rounded-lg bg-gradient-to-br p-3", children: _jsx(GoRepo, { className: "h-8 w-8 text-white" }) }), _jsxs("div", { children: [_jsx("h2", { className: "font-heading text-2xl font-bold text-zinc-900 dark:text-zinc-100", children: repoData.name }), _jsx("p", { className: "mt-1 text-zinc-600 dark:text-zinc-400", children: repoData.description })] })] }), userSub && (_jsxs(Badge, { color: onTrial ? 'info' : 'success', icon: HiCheckCircle, size: "lg", children: [onTrial ? 'Free trial' : 'Active', " -", ' ', userSub.plan_name.charAt(0).toUpperCase() +
|
|
186
|
-
userSub.plan_name.slice(1)] }))] }), trialDays > 0 && (_jsx(Alert, { color: "info", icon: HiInformationCircle, children: _jsxs("p", { className: "text-sm", children: [_jsxs("span", { className: "font-semibold", children: ["Start with a ", trialDays, "-day free trial on either plan."] }), ' ', "The trial opens the analysis tools over MCP and the API, at lower rate limits than the plan. Raw Cypher queries, the AI analyst and your monthly credits open with the first payment.
|
|
186
|
+
userSub.plan_name.slice(1)] }))] }), trialDays > 0 && (_jsx(Alert, { color: "info", icon: HiInformationCircle, children: _jsxs("p", { className: "text-sm", children: [_jsxs("span", { className: "font-semibold", children: ["Start with a ", trialDays, "-day free trial on either plan."] }), ' ', "The trial opens the analysis tools over MCP and the API, at lower rate limits than the plan. Raw Cypher queries, the AI analyst and your monthly credits open with the first payment. No card is needed to start: add one before the trial ends and your plan starts when it does, or start it sooner from your organization's Subscriptions tab. Without a card the trial ends and nothing is charged."] }) })), _jsx("div", { className: `grid gap-6 ${repoData.plans.length === 2
|
|
187
187
|
? 'mx-auto max-w-3xl lg:grid-cols-2'
|
|
188
188
|
: 'lg:grid-cols-3'}`, children: repoData.plans.map((plan, index) => {
|
|
189
189
|
var _a, _b;
|
|
@@ -205,7 +205,7 @@ export function BrowseRepositories({ onSubscribed, onViewSubscriptions, showHead
|
|
|
205
205
|
? 'border-primary-500 bg-primary-50 dark:bg-primary-900/20 shadow-lg'
|
|
206
206
|
: isPopular
|
|
207
207
|
? 'border-secondary-500 from-secondary-50 dark:from-secondary-900/20 bg-gradient-to-b to-white shadow-md dark:to-zinc-800'
|
|
208
|
-
: 'border-zinc-200 bg-white hover:border-zinc-300 dark:border-zinc-700 dark:bg-zinc-800'}`, children: [
|
|
208
|
+
: 'border-zinc-200 bg-white hover:border-zinc-300 dark:border-zinc-700 dark:bg-zinc-800'}`, children: [_jsxs("div", { className: "flex-1", children: [_jsxs("div", { className: "text-center", children: [_jsx("h3", { className: "font-heading mb-2 text-xl font-bold text-zinc-900 dark:text-zinc-100", children: plan.name }), _jsxs("div", { className: "mb-1", children: [_jsxs("span", { className: "text-3xl font-bold text-zinc-900 dark:text-zinc-100", children: ["$", plan.monthlyPrice] }), _jsx("span", { className: "text-zinc-500 dark:text-zinc-400", children: "/month" })] }), trialDays > 0 && (_jsxs("p", { className: "text-primary-600 dark:text-primary-400 mb-1 text-sm font-medium", children: ["after a ", trialDays, "-day free trial"] })), _jsxs("p", { className: "mb-6 text-sm font-medium text-zinc-600 dark:text-zinc-400", children: [plan.monthlyCredits.toLocaleString(), ' ', "credits/month"] })] }), plan.features && (_jsx("ul", { className: "mb-6 space-y-2 text-sm", children: plan.features.map((feature, idx) => (_jsxs("li", { className: "flex items-start gap-2", children: [_jsx(HiCheckCircle, { className: "mt-0.5 h-4 w-4 shrink-0 text-green-500" }), _jsx("span", { className: "text-zinc-600 dark:text-zinc-400", children: feature })] }, idx))) }))] }), _jsx("div", { className: "mt-6", children: isCurrentPlan ? (_jsxs(Button, { color: "gray", disabled: true, className: "w-full", size: "lg", children: [_jsx(HiCheckCircle, { className: "mr-2 h-4 w-4" }), "Current Plan"] })) : userSub ? (_jsx(Button, { onClick: () => {
|
|
209
209
|
var _a;
|
|
210
210
|
return handleChangePlan(repoType, repoData.name, userSub.plan_name, userSub.plan_display_name, (_a = currentPlanData === null || currentPlanData === void 0 ? void 0 : currentPlanData.monthlyPrice) !== null && _a !== void 0 ? _a : 0, plan.plan, plan.name, plan.monthlyPrice, onTrial
|
|
211
211
|
? (trialEndsAt !== null && trialEndsAt !== void 0 ? trialEndsAt : undefined)
|