📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
Display nice vendor icons
Blue Mouse7d3ce8dba02a
diff --git a/docs/components/provider-icons.tsx b/docs/components/provider-icons.tsxindex e98395eec..374f6a3a6 100644--- a/docs/components/provider-icons.tsx+++ b/docs/components/provider-icons.tsx@@ -1,5 +1,5 @@import { useId } from "react";-import { CodeIcon } from "@phosphor-icons/react/dist/ssr";+import { ArrowsLeftRightIcon, CodeIcon } from "@phosphor-icons/react/dist/ssr";const REVENUE_ICON_DEFAULT_CLASSNAME = "inline-block size-4 align-[-0.125em] shrink-0";@@ -52,6 +52,90 @@ export const RevenueApiIcon = ({ className }: { className?: string }) => (<CodeIcon className={className ?? REVENUE_ICON_DEFAULT_CLASSNAME} weight="duotone" aria-hidden />);+export const HttpRequestIcon = ({ className }: { className?: string }) => (+ <ArrowsLeftRightIcon+ className={className ?? REVENUE_ICON_DEFAULT_CLASSNAME}+ weight="duotone"+ aria-hidden+ />+);++export const NodeIcon = ({ className }: { className?: string }) => {+ const id = useId();+ const clipId = `${id}-node-hex`;+ const mainGradientId = `${id}-node-main`;+ const rightGradientId = `${id}-node-r1`;+ const leftGradientId = `${id}-node-r2`;++ return (+ <svg+ className={className ?? REVENUE_ICON_DEFAULT_CLASSNAME}+ viewBox="0 0 44 50"+ xmlns="http://www.w3.org/2000/svg"+ aria-hidden+ >+ <defs>+ <clipPath id={clipId}>+ <path d="M22.8725 0.4166C22.136 0 21.2616 0 20.5253 0.4166L1.1505 11.6694C0.4142 12.0862 0 12.8733 0 13.707V36.2584C0 37.0921 0.4602 37.8791 1.1505 38.296L20.5253 49.5487C21.2616 49.9653 22.136 49.9653 22.8725 49.5487L42.2471 38.296C42.9836 37.8791 43.3976 37.0921 43.3976 36.2584V13.707C43.3976 12.8733 42.9375 12.0862 42.2471 11.6694L22.8725 0.4166Z" />+ </clipPath>+ <linearGradient+ id={mainGradientId}+ x1="30.33"+ y1="8.56"+ x2="14.9"+ y2="44.7"+ gradientUnits="userSpaceOnUse"+ >+ <stop stopColor="#3F8B3D" />+ <stop offset="0.64" stopColor="#3F873F" />+ <stop offset="0.93" stopColor="#3DA92E" />+ <stop offset="1" stopColor="#3DAE2B" />+ </linearGradient>+ <linearGradient+ id={rightGradientId}+ x1="18.8"+ y1="26.8"+ x2="68"+ y2="0.4"+ gradientUnits="userSpaceOnUse"+ >+ <stop offset="0.14" stopColor="#3F873F" />+ <stop offset="0.4" stopColor="#52A044" />+ <stop offset="0.71" stopColor="#64B749" />+ <stop offset="0.91" stopColor="#6ABF4B" />+ </linearGradient>+ <linearGradient+ id={leftGradientId}+ x1="0.25"+ y1="24.5"+ x2="44"+ y2="24.5"+ gradientUnits="userSpaceOnUse"+ >+ <stop offset="0.09" stopColor="#6ABF4B" />+ <stop offset="0.29" stopColor="#64B749" />+ <stop offset="0.6" stopColor="#52A044" />+ <stop offset="0.86" stopColor="#3F873F" />+ </linearGradient>+ </defs>+ <path+ fill={`url(#${mainGradientId})`}+ d="M22.8725 0.4166C22.136 0 21.2616 0 20.5253 0.4166L1.1505 11.6694C0.4142 12.0862 0 12.8733 0 13.707V36.2584C0 37.0921 0.4602 37.8791 1.1505 38.296L20.5253 49.5487C21.2616 49.9653 22.136 49.9653 22.8725 49.5487L42.2471 38.296C42.9836 37.8791 43.3976 37.0921 43.3976 36.2584V13.707C43.3976 12.8733 42.9375 12.0862 42.2471 11.6694L22.8725 0.4166Z"+ />+ <polygon+ fill={`url(#${rightGradientId})`}+ clipPath={`url(#${clipId})`}+ points="21.698901,-1.046618 43.20532,11.948247 21.698901,51.072715 0.152778,38.055107"+ />+ <polygon+ fill={`url(#${leftGradientId})`}+ clipPath={`url(#${clipId})`}+ points="21.698901,-1.046618 0.152778,11.948247 21.698901,51.072715 43.20532,38.055107"+ />+ </svg>+ );+};+export const GoogleAnalyticsIcon = ({ className }: { className?: string }) => (<svg className={className} viewBox="0 0 192 192" width="16" height="16"><g>diff --git a/docs/content/docs/captcha/client-side-usage.mdx b/docs/content/docs/captcha/client-side-usage.mdxindex 8f5183386..80bbff908 100644--- a/docs/content/docs/captcha/client-side-usage.mdx+++ b/docs/content/docs/captcha/client-side-usage.mdx@@ -9,8 +9,12 @@ You can use the CAPTCHA widget on any page of your website by using our CAPTCHA## Installation-<Tabs items={["CDN", "npm"]}>-<Tab value="CDN">+<Tabs defaultValue="html">+<TabsList>+ <TabsTrigger value="html"><CodeIcon /> HTML script tag</TabsTrigger>+ <TabsTrigger value="npm"><NpmIcon /> npm package</TabsTrigger>+</TabsList>+<TabsContent value="html">The easiest way to add the CAPTCHA script to your website is to edit the HTML code of your website. To do this, paste the following code snippet into the header section (`<head>` tag) of your website:@@ -18,8 +22,8 @@ The easiest way to add the CAPTCHA script to your website is to edit the HTML co<script src="https://cdn.swetrixcaptcha.com/captcha-loader.js" defer></script>```-</Tab>-<Tab value="npm">+</TabsContent>+<TabsContent value="npm">Install the package with your package manager:@@ -45,7 +49,7 @@ loadCaptcha();forceLoadCaptcha();```-</Tab>+</TabsContent></Tabs>## Usagediff --git a/docs/content/docs/captcha/server-side-validation.mdx b/docs/content/docs/captcha/server-side-validation.mdxindex 28d51577b..c9e93830d 100644--- a/docs/content/docs/captcha/server-side-validation.mdx+++ b/docs/content/docs/captcha/server-side-validation.mdx@@ -14,8 +14,12 @@ Token validation can only be performed once, if you try to validate the same tok</Callout>-<Tabs items={["HTTP request", "Node.js library"]}>-<Tab value="HTTP request">+<Tabs defaultValue="http">+<TabsList>+ <TabsTrigger value="http"><HttpRequestIcon /> HTTP request</TabsTrigger>+ <TabsTrigger value="node"><NodeIcon /> Node.js library</TabsTrigger>+</TabsList>+<TabsContent value="http">To validate the token, you have to send a POST request to the `https://api.swetrix.com/v1/captcha/validate` URL, with the following parameters:@@ -62,8 +66,8 @@ curl -X POST\https://api.swetrix.com/v1/captcha/validate```-</Tab>-<Tab value="Node.js library">+</TabsContent>+<TabsContent value="node">You can use the [@swetrix/captcha-validator](https://www.npmjs.com/package/@swetrix/captcha-validator) package to validate the token in your Node.js project.@@ -92,5 +96,5 @@ validateToken("CAPTCHA_TOKEN", "YOUR_SECRET_KEY").then((result) => {});```-</Tab>+</TabsContent></Tabs>diff --git a/docs/mdx-components.tsx b/docs/mdx-components.tsxindex 5ea220f1b..4235ffcc4 100644--- a/docs/mdx-components.tsx+++ b/docs/mdx-components.tsx@@ -12,6 +12,8 @@ import {StripeIcon,PaddleIcon,RevenueApiIcon,+ HttpRequestIcon,+ NodeIcon,} from "@/components/provider-icons";import {EmailChannelIcon,@@ -46,6 +48,8 @@ export function getMDXComponents(components?: MDXComponents): MDXComponents {StripeIcon,PaddleIcon,RevenueApiIcon,+ HttpRequestIcon,+ NodeIcon,EmailChannelIcon,TelegramChannelIcon,DiscordChannelIcon,