@boostyourleads/antigravity-sdk 1.0.9 → 1.1.0
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.
|
@@ -113,7 +113,7 @@ const AttributionDashboard = ({ apiKey: initialApiKey, onConnect, onDisconnect,
|
|
|
113
113
|
}
|
|
114
114
|
return null;
|
|
115
115
|
};
|
|
116
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, cn_1.cn)("w-full min-h-screen bg-[#030303] text-zinc-100 p-4 lg:p-8 flex flex-col items-center justify-start relative overflow-hidden font-sans", className), children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute top-0 left-1/4 w-[500px] h-[500px] bg-indigo-500/5 blur-[120px] rounded-full pointer-events-none" }), (0, jsx_runtime_1.jsx)("div", { className: "absolute bottom-0 right-1/4 w-[500px] h-[500px] bg-purple-500/5 blur-[120px] rounded-full pointer-events-none" }), (0, jsx_runtime_1.jsxs)("div", { className: "w-full max-w-6xl space-y-8 relative z-10", children: [(0, jsx_runtime_1.jsxs)("header", { className: "flex flex-col md:flex-row md:items-center justify-between gap-4 pb-6 border-b border-white/5", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-12 h-12 rounded-xl bg-black border border-white/10 flex items-center justify-center shadow-lg", children: (0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 512 512", className: "w-full h-full p-2.5 select-none", children: (0, jsx_runtime_1.jsx)("text", { x: "256", y: "280", fill: "#ffffff", fontSize: "195", fontFamily: "-apple-system, BlinkMacSystemFont, sans-serif", fontWeight: "900", textAnchor: "middle", dominantBaseline: "middle", letterSpacing: "-10", children: "BYL." }) }) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("h1", { className: "text-lg font-black tracking-tight text-white uppercase flex items-center gap-2", children: ["Marketing Intelligence", (0, jsx_runtime_1.jsxs)("span", { className: "text-[9px] bg-emerald-500/10 border border-emerald-500/20 px-2 py-0.5 rounded-full font-bold text-emerald-400 uppercase tracking-wider flex items-center gap-1.5", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse" }), "Agent SDK Integrated"] })] }), (0, jsx_runtime_1.jsx)("p", { className: "text-[10px] font-bold text-zinc-500 uppercase tracking-widest mt-0.5", children: "Real-Time Performance Attribution" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-xs bg-white/5 border border-white/10 px-3.5 py-2 rounded-xl text-zinc-400 font-bold uppercase tracking-wider", children: "Full Year 2026" }), (0, jsx_runtime_1.jsx)("span", { className: "text-xs bg-white/5 border border-white/10 px-3.5 py-2 rounded-xl text-zinc-400 font-bold uppercase tracking-wider", children: "All Channels" }), isSaved && ((0, jsx_runtime_1.jsx)("button", { onClick: () => loadLiveMetrics(apiKey), disabled: loading, className: "p-2.5 bg-white/5 hover:bg-white/10 border border-white/5 rounded-xl transition-all disabled:opacity-50", children: (0, jsx_runtime_1.jsx)(lucide_react_1.RefreshCw, { className: (0, cn_1.cn)("w-4 h-4 text-zinc-400", loading && "animate-spin") }) }))] })] }), !data ? ((0, jsx_runtime_1.jsx)("section", { className: "max-w-md mx-auto space-y-6 pt-12", children: (0, jsx_runtime_1.jsxs)(GlassmorphicCard_1.GlassmorphicCard, { glowColor: "neutral", className: "p-8 text-center space-y-6", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Shield, { className: "w-12 h-12 text-zinc-600 mx-auto animate-pulse" }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-2", children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-base font-black uppercase tracking-wider text-white", children: "SDK Authentication Required" }), (0, jsx_runtime_1.jsx)("p", { className: "text-xs text-zinc-500 leading-relaxed", children: "Provide your API key below to query live multi-channel analytics and authorize automated budget optimization actions." })] }), error && ((0, jsx_runtime_1.jsx)("div", { className: "p-3.5 bg-rose-500/10 border border-rose-500/20 rounded-xl text-xs text-rose-400 font-bold", children: error })), (0, jsx_runtime_1.jsxs)("form", { onSubmit: handleConnect, className: "space-y-3", children: [(0, jsx_runtime_1.jsx)("input", { type: "password", placeholder: "Enter your BYL API key...", value: apiKey, onChange: (e) => setApiKey(e.target.value), required: true, className: "w-full px-4 py-3 bg-[#0c0c0e] border border-white/15 rounded-xl text-xs text-white placeholder-zinc-600 focus:outline-none focus:border-white/30 font-mono" }), (0, jsx_runtime_1.jsx)("button", { type: "submit", disabled: loading, className: "w-full py-3.5 bg-white hover:bg-zinc-200 text-black text-xs font-black uppercase tracking-widest rounded-xl transition-all flex items-center justify-center gap-2", children: loading ? "Authenticating..." : "Connect SDK" })] }), (0, jsx_runtime_1.jsx)("div", { className: "border-t border-white/5 pt-4", children: (0, jsx_runtime_1.jsxs)("a", { href: "https://agents
|
|
116
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, cn_1.cn)("w-full min-h-screen bg-[#030303] text-zinc-100 p-4 lg:p-8 flex flex-col items-center justify-start relative overflow-hidden font-sans", className), children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute top-0 left-1/4 w-[500px] h-[500px] bg-indigo-500/5 blur-[120px] rounded-full pointer-events-none" }), (0, jsx_runtime_1.jsx)("div", { className: "absolute bottom-0 right-1/4 w-[500px] h-[500px] bg-purple-500/5 blur-[120px] rounded-full pointer-events-none" }), (0, jsx_runtime_1.jsxs)("div", { className: "w-full max-w-6xl space-y-8 relative z-10", children: [(0, jsx_runtime_1.jsxs)("header", { className: "flex flex-col md:flex-row md:items-center justify-between gap-4 pb-6 border-b border-white/5", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-12 h-12 rounded-xl bg-black border border-white/10 flex items-center justify-center shadow-lg", children: (0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 512 512", className: "w-full h-full p-2.5 select-none", children: (0, jsx_runtime_1.jsx)("text", { x: "256", y: "280", fill: "#ffffff", fontSize: "195", fontFamily: "-apple-system, BlinkMacSystemFont, sans-serif", fontWeight: "900", textAnchor: "middle", dominantBaseline: "middle", letterSpacing: "-10", children: "BYL." }) }) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("h1", { className: "text-lg font-black tracking-tight text-white uppercase flex items-center gap-2", children: ["Marketing Intelligence", (0, jsx_runtime_1.jsxs)("span", { className: "text-[9px] bg-emerald-500/10 border border-emerald-500/20 px-2 py-0.5 rounded-full font-bold text-emerald-400 uppercase tracking-wider flex items-center gap-1.5", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse" }), "Agent SDK Integrated"] })] }), (0, jsx_runtime_1.jsx)("p", { className: "text-[10px] font-bold text-zinc-500 uppercase tracking-widest mt-0.5", children: "Real-Time Performance Attribution" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-xs bg-white/5 border border-white/10 px-3.5 py-2 rounded-xl text-zinc-400 font-bold uppercase tracking-wider", children: "Full Year 2026" }), (0, jsx_runtime_1.jsx)("span", { className: "text-xs bg-white/5 border border-white/10 px-3.5 py-2 rounded-xl text-zinc-400 font-bold uppercase tracking-wider", children: "All Channels" }), isSaved && ((0, jsx_runtime_1.jsx)("button", { onClick: () => loadLiveMetrics(apiKey), disabled: loading, className: "p-2.5 bg-white/5 hover:bg-white/10 border border-white/5 rounded-xl transition-all disabled:opacity-50", children: (0, jsx_runtime_1.jsx)(lucide_react_1.RefreshCw, { className: (0, cn_1.cn)("w-4 h-4 text-zinc-400", loading && "animate-spin") }) }))] })] }), !data ? ((0, jsx_runtime_1.jsx)("section", { className: "max-w-md mx-auto space-y-6 pt-12", children: (0, jsx_runtime_1.jsxs)(GlassmorphicCard_1.GlassmorphicCard, { glowColor: "neutral", className: "p-8 text-center space-y-6", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Shield, { className: "w-12 h-12 text-zinc-600 mx-auto animate-pulse" }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-2", children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-base font-black uppercase tracking-wider text-white", children: "SDK Authentication Required" }), (0, jsx_runtime_1.jsx)("p", { className: "text-xs text-zinc-500 leading-relaxed", children: "Provide your API key below to query live multi-channel analytics and authorize automated budget optimization actions." })] }), error && ((0, jsx_runtime_1.jsx)("div", { className: "p-3.5 bg-rose-500/10 border border-rose-500/20 rounded-xl text-xs text-rose-400 font-bold", children: error })), (0, jsx_runtime_1.jsxs)("form", { onSubmit: handleConnect, className: "space-y-3", children: [(0, jsx_runtime_1.jsx)("input", { type: "password", placeholder: "Enter your BYL API key...", value: apiKey, onChange: (e) => setApiKey(e.target.value), required: true, className: "w-full px-4 py-3 bg-[#0c0c0e] border border-white/15 rounded-xl text-xs text-white placeholder-zinc-600 focus:outline-none focus:border-white/30 font-mono" }), (0, jsx_runtime_1.jsx)("button", { type: "submit", disabled: loading, className: "w-full py-3.5 bg-white hover:bg-zinc-200 text-black text-xs font-black uppercase tracking-widest rounded-xl transition-all flex items-center justify-center gap-2", children: loading ? "Authenticating..." : "Connect SDK" })] }), (0, jsx_runtime_1.jsx)("div", { className: "border-t border-white/5 pt-4", children: (0, jsx_runtime_1.jsxs)("a", { href: "https://agents.boostyourleads.ca", target: "_blank", rel: "noopener noreferrer", className: "text-[10px] font-black uppercase tracking-wider text-zinc-500 hover:text-white transition-all flex items-center justify-center gap-1.5", children: ["Go to console to connect channels ", (0, jsx_runtime_1.jsx)(lucide_react_1.ExternalLink, { className: "w-3.5 h-3.5" })] }) })] }) })) : (
|
|
117
117
|
/* Live Dashboard View */
|
|
118
118
|
(0, jsx_runtime_1.jsxs)("main", { className: "space-y-6", children: [(0, jsx_runtime_1.jsxs)("section", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6", children: [(0, jsx_runtime_1.jsx)(PremiumMetricCard_1.PremiumMetricCard, { title: "Total Spend", value: `$${data.spend.toLocaleString()}`, change: 12.4, trend: "up", glowColor: "indigo", subtitle: "Google & Meta Ads" }), (0, jsx_runtime_1.jsx)(PremiumMetricCard_1.PremiumMetricCard, { title: "Avg Cost Per Lead (CPL)", value: `$${data.cpl.toFixed(2)}`, change: -4.8, trend: "down", glowColor: "rose", subtitle: "Optimized CPA" }), (0, jsx_runtime_1.jsx)(PremiumMetricCard_1.PremiumMetricCard, { title: "Total Clicks", value: `${(data.clicks / 1000).toFixed(1)}K`, change: 8.2, trend: "up", glowColor: "emerald", subtitle: "Attributed Traffic" }), (0, jsx_runtime_1.jsx)(PremiumMetricCard_1.PremiumMetricCard, { title: "Impressions", value: "10.99M", change: 15.1, trend: "up", glowColor: "amber", subtitle: "Overall Brand Reach" })] }), (0, jsx_runtime_1.jsxs)("section", { className: "grid grid-cols-1 lg:grid-cols-3 gap-6", children: [(0, jsx_runtime_1.jsx)("div", { className: "lg:col-span-2", children: (0, jsx_runtime_1.jsx)(PremiumChart_1.PremiumChart, { data: data.chartData, title: "Performance Attribution Trends", subtitle: "Spend vs CPL across active timeline (2026)", glowColor: "indigo", className: "h-full", children: (0, jsx_runtime_1.jsxs)(recharts_1.AreaChart, { margin: { top: 20, right: 10, left: -20, bottom: 0 }, children: [(0, jsx_runtime_1.jsxs)("defs", { children: [(0, jsx_runtime_1.jsxs)("linearGradient", { id: "gradientSpend", x1: "0", y1: "0", x2: "0", y2: "1", children: [(0, jsx_runtime_1.jsx)("stop", { offset: "5%", stopColor: "#818cf8", stopOpacity: 0.25 }), (0, jsx_runtime_1.jsx)("stop", { offset: "95%", stopColor: "#818cf8", stopOpacity: 0.0 })] }), (0, jsx_runtime_1.jsxs)("linearGradient", { id: "gradientCpl", x1: "0", y1: "0", x2: "0", y2: "1", children: [(0, jsx_runtime_1.jsx)("stop", { offset: "5%", stopColor: "#fb7185", stopOpacity: 0.15 }), (0, jsx_runtime_1.jsx)("stop", { offset: "95%", stopColor: "#fb7185", stopOpacity: 0.0 })] })] }), (0, jsx_runtime_1.jsx)(recharts_1.CartesianGrid, { strokeDasharray: "3 3", stroke: "rgba(255, 255, 255, 0.03)", vertical: false }), (0, jsx_runtime_1.jsx)(recharts_1.XAxis, { dataKey: "date", stroke: "#52525b", fontSize: 9, tickLine: false, axisLine: false }), (0, jsx_runtime_1.jsx)(recharts_1.YAxis, { yAxisId: "left", stroke: "#52525b", fontSize: 9, tickLine: false, axisLine: false }), (0, jsx_runtime_1.jsx)(recharts_1.YAxis, { yAxisId: "right", orientation: "right", stroke: "#52525b", fontSize: 9, tickLine: false, axisLine: false }), (0, jsx_runtime_1.jsx)(recharts_1.Tooltip, { content: (0, jsx_runtime_1.jsx)(CustomChartTooltip, {}) }), (0, jsx_runtime_1.jsx)(recharts_1.Area, { yAxisId: "left", type: "monotone", dataKey: "Spend", name: "Spend ($)", stroke: "#818cf8", strokeWidth: 2.5, fillOpacity: 1, fill: "url(#gradientSpend)" }), (0, jsx_runtime_1.jsx)(recharts_1.Area, { yAxisId: "right", type: "monotone", dataKey: "CPL", name: "Average CPL ($)", stroke: "#fb7185", strokeWidth: 2, strokeDasharray: "4 4", fillOpacity: 1, fill: "url(#gradientCpl)" })] }) }) }), (0, jsx_runtime_1.jsx)(GlassmorphicCard_1.GlassmorphicCard, { glowColor: "purple", className: "p-6 flex flex-col justify-between", children: (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("h3", { className: "text-sm font-black text-white uppercase tracking-tight mb-1 flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Activity, { className: "w-4 h-4 text-purple-400" }), "Channel Performance"] }), (0, jsx_runtime_1.jsx)("p", { className: "text-[10px] font-bold text-zinc-500 uppercase tracking-widest mb-6", children: "Attributed Channel Breakdown" }), (0, jsx_runtime_1.jsx)("div", { className: "space-y-4.5", children: [
|
|
119
119
|
{ name: "Google Ads", spend: "$57,200", clicks: "102,400", cpl: "$13.19", color: "text-indigo-400" },
|