Skip to content

OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.

style: format the whole repo with biome 2

Carl-Gerhard Lindesvärd23fe6c1b2d8d
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 4e9e13dd0..95b7c494e 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -21,14 +21,8 @@
},
"editor.formatOnSave": true,
"tailwindCSS.experimental.classRegex": [
- [
- "cva\\(([^)]*)\\)",
- "[\"'`]([^\"'`]*).*?[\"'`]"
- ],
- [
- "cx\\(([^)]*)\\)",
- "(?:'|\"|`)([^']*)(?:'|\"|`)"
- ],
+ ["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
+ ["cx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"],
[
"\\b\\w+ClassName\\s*=\\s*[\"'`]([^\"'`]*)[\"'`]",
"[\"'`]([^\"'`]*)[\"'`]"
@@ -40,4 +34,4 @@
"next/router.d.ts",
"next/dist/client/router.d.ts"
]
-}
\ No newline at end of file
+}
diff --git a/.zed/settings.json b/.zed/settings.json
index 2226f4fbd..b669e38c8 100644
--- a/.zed/settings.json
+++ b/.zed/settings.json
@@ -47,4 +47,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/apps/api/e2e/session-e2e.ts b/apps/api/e2e/session-e2e.ts
index 204d8a40a..9782f3b2b 100644
--- a/apps/api/e2e/session-e2e.ts
+++ b/apps/api/e2e/session-e2e.ts
@@ -117,7 +117,9 @@ async function scenarioBoundary() {
const ip = `10.${(runId >> 16) & 255}.2.${runId & 255 || 1}`;
const a = await screenView(ip, '/x');
- console.log(` …waiting ${IDLE_WAIT_MS}ms so the next event crosses the boundary`);
+ console.log(
+ ` …waiting ${IDLE_WAIT_MS}ms so the next event crosses the boundary`
+ );
await sleep(IDLE_WAIT_MS);
const b = await screenView(ip, '/y');
@@ -150,12 +152,18 @@ async function scenarioNonScreenViewFirst() {
{ type: 'track', payload: { name: 'purchase', properties: { __ip: ip } } },
ip
);
- check('track returned a sessionId for a non-screen_view first event', !!sessionId);
+ check(
+ 'track returned a sessionId for a non-screen_view first event',
+ !!sessionId
+ );
const starts = await pollUntil(async () =>
(await countByName([sessionId], 'session_start')) > 0 ? true : null
);
- check('clickhouse: session_start emitted for a custom-event session', !!starts);
+ check(
+ 'clickhouse: session_start emitted for a custom-event session',
+ !!starts
+ );
console.log(` …waiting ${IDLE_WAIT_MS}ms for idle window, then reaping`);
await sleep(IDLE_WAIT_MS);
@@ -176,8 +184,16 @@ async function scenarioNonScreenViewFirst() {
);
return rows[0] ?? null;
});
- check('clickhouse: screen_view_count is 0', Number(row?.screen_view_count) === 0, `${row?.screen_view_count}`);
- check('clickhouse: event_count is 1', Number(row?.event_count) === 1, `${row?.event_count}`);
+ check(
+ 'clickhouse: screen_view_count is 0',
+ Number(row?.screen_view_count) === 0,
+ `${row?.screen_view_count}`
+ );
+ check(
+ 'clickhouse: event_count is 1',
+ Number(row?.event_count) === 1,
+ `${row?.event_count}`
+ );
check(
'clickhouse: is_bounce is true (no pageviews)',
row?.is_bounce === true || Number(row?.is_bounce) === 1,
diff --git a/apps/api/scripts/test-manage-api.ts b/apps/api/scripts/test-manage-api.ts
index 77b6a8f8e..9e3b6c2b0 100644
--- a/apps/api/scripts/test-manage-api.ts
+++ b/apps/api/scripts/test-manage-api.ts
@@ -34,7 +34,7 @@ const results: TestResult[] = [];
async function makeRequest(
method: string,
path: string,
- body?: any,
+ body?: any
): Promise<TestResult> {
const url = `${API_BASE_URL}${path}`;
const headers: Record<string, string> = {
@@ -90,7 +90,7 @@ async function testProjects() {
});
results.push(createResult);
console.log(
- `✓ POST /manage/projects: ${createResult.success ? '✅' : '❌'} ${createResult.status}`,
+ `✓ POST /manage/projects: ${createResult.success ? '✅' : '❌'} ${createResult.status}`
);
if (createResult.error) console.log(` Error: ${createResult.error}`);
@@ -108,7 +108,7 @@ async function testProjects() {
const listResult = await makeRequest('GET', '/manage/projects');
results.push(listResult);
console.log(
- `✓ GET /manage/projects: ${listResult.success ? '✅' : '❌'} ${listResult.status}`,
+ `✓ GET /manage/projects: ${listResult.success ? '✅' : '❌'} ${listResult.status}`
);
if (listResult.data?.data?.length) {
console.log(` Found ${listResult.data.data.length} projects`);
@@ -119,7 +119,7 @@ async function testProjects() {
const getResult = await makeRequest('GET', `/manage/projects/${projectId}`);
results.push(getResult);
console.log(
- `✓ GET /manage/projects/:id: ${getResult.success ? '✅' : '❌'} ${getResult.status}`,
+ `✓ GET /manage/projects/:id: ${getResult.success ? '✅' : '❌'} ${getResult.status}`
);
// Update project
@@ -129,21 +129,21 @@ async function testProjects() {
{
name: 'Updated Test Project',
crossDomain: true,
- },
+ }
);
results.push(updateResult);
console.log(
- `✓ PATCH /manage/projects/:id: ${updateResult.success ? '✅' : '❌'} ${updateResult.status}`,
+ `✓ PATCH /manage/projects/:id: ${updateResult.success ? '✅' : '❌'} ${updateResult.status}`
);
// Delete project (soft delete)
const deleteResult = await makeRequest(
'DELETE',
- `/manage/projects/${projectId}`,
+ `/manage/projects/${projectId}`
);
results.push(deleteResult);
console.log(
- `✓ DELETE /manage/projects/:id: ${deleteResult.success ? '✅' : '❌'} ${deleteResult.status}`,
+ `✓ DELETE /manage/projects/:id: ${deleteResult.success ? '✅' : '❌'} ${deleteResult.status}`
);
}
@@ -161,7 +161,7 @@ async function testClients(projectId?: string) {
});
results.push(createResult);
console.log(
- `✓ POST /manage/clients: ${createResult.success ? '✅' : '❌'} ${createResult.status}`,
+ `✓ POST /manage/clients: ${createResult.success ? '✅' : '❌'} ${createResult.status}`
);
if (createResult.error) console.log(` Error: ${createResult.error}`);
@@ -176,11 +176,11 @@ async function testClients(projectId?: string) {
// List clients
const listResult = await makeRequest(
'GET',
- projectId ? `/manage/clients?projectId=${projectId}` : '/manage/clients',
+ projectId ? `/manage/clients?projectId=${projectId}` : '/manage/clients'
);
results.push(listResult);
console.log(
- `✓ GET /manage/clients: ${listResult.success ? '✅' : '❌'} ${listResult.status}`,
+ `✓ GET /manage/clients: ${listResult.success ? '✅' : '❌'} ${listResult.status}`
);
if (listResult.data?.data?.length) {
console.log(` Found ${listResult.data.data.length} clients`);
@@ -191,7 +191,7 @@ async function testClients(projectId?: string) {
const getResult = await makeRequest('GET', `/manage/clients/${clientId}`);
results.push(getResult);
console.log(
- `✓ GET /manage/clients/:id: ${getResult.success ? '✅' : '❌'} ${getResult.status}`,
+ `✓ GET /manage/clients/:id: ${getResult.success ? '✅' : '❌'} ${getResult.status}`
);
// Update client
@@ -200,21 +200,21 @@ async function testClients(projectId?: string) {
`/manage/clients/${clientId}`,
{
name: 'Updated Test Client',
- },
+ }
);
results.push(updateResult);
console.log(
- `✓ PATCH /manage/clients/:id: ${updateResult.success ? '✅' : '❌'} ${updateResult.status}`,
+ `✓ PATCH /manage/clients/:id: ${updateResult.success ? '✅' : '❌'} ${updateResult.status}`
);
// Delete client
const deleteResult = await makeRequest(
'DELETE',
- `/manage/clients/${clientId}`,
+ `/manage/clients/${clientId}`
);
results.push(deleteResult);
console.log(
- `✓ DELETE /manage/clients/:id: ${deleteResult.success ? '✅' : '❌'} ${deleteResult.status}`,
+ `✓ DELETE /manage/clients/:id: ${deleteResult.success ? '✅' : '❌'} ${deleteResult.status}`
);
}
}
@@ -236,7 +236,7 @@ async function testReferences(projectId?: string) {
});
results.push(createResult);
console.log(
- `✓ POST /manage/references: ${createResult.success ? '✅' : '❌'} ${createResult.status}`,
+ `✓ POST /manage/references: ${createResult.success ? '✅' : '❌'} ${createResult.status}`
);
if (createResult.error) console.log(` Error: ${createResult.error}`);
@@ -249,11 +249,11 @@ async function testReferences(projectId?: string) {
// List references
const listResult = await makeRequest(
'GET',
- `/manage/references?projectId=${projectId}`,
+ `/manage/references?projectId=${projectId}`
);
results.push(listResult);
console.log(
- `✓ GET /manage/references: ${listResult.success ? '✅' : '❌'} ${listResult.status}`,
+ `✓ GET /manage/references: ${listResult.success ? '✅' : '❌'} ${listResult.status}`
);
if (listResult.data?.data?.length) {
console.log(` Found ${listResult.data.data.length} references`);
@@ -263,11 +263,11 @@ async function testReferences(projectId?: string) {
// Get reference
const getResult = await makeRequest(
'GET',
- `/manage/references/${referenceId}`,
+ `/manage/references/${referenceId}`
);
results.push(getResult);
console.log(
- `✓ GET /manage/references/:id: ${getResult.success ? '✅' : '❌'} ${getResult.status}`,
+ `✓ GET /manage/references/:id: ${getResult.success ? '✅' : '❌'} ${getResult.status}`
);
// Update reference
@@ -278,21 +278,21 @@ async function testReferences(projectId?: string) {
title: 'Updated Test Reference',
description: 'Updated description',
datetime: new Date().toISOString(),
- },
+ }
);
results.push(updateResult);
console.log(
- `✓ PATCH /manage/references/:id: ${updateResult.success ? '✅' : '❌'} ${updateResult.status}`,
+ `✓ PATCH /manage/references/:id: ${updateResult.success ? '✅' : '❌'} ${updateResult.status}`
);
// Delete reference
const deleteResult = await makeRequest(
'DELETE',
- `/manage/references/${referenceId}`,
+ `/manage/references/${referenceId}`
);
results.push(deleteResult);
console.log(
- `✓ DELETE /manage/references/:id: ${deleteResult.success ? '✅' : '❌'} ${deleteResult.status}`,
+ `✓ DELETE /manage/references/:id: ${deleteResult.success ? '✅' : '❌'} ${deleteResult.status}`
);
}
}
diff --git a/apps/api/src/config/bun-version.test.ts b/apps/api/src/config/bun-version.test.ts
index fd72d6b32..bc903e529 100644
--- a/apps/api/src/config/bun-version.test.ts
+++ b/apps/api/src/config/bun-version.test.ts
@@ -31,7 +31,10 @@ describe('the Bun pin (ADR-016 rule 5)', () => {
it('scripts/doctor.sh passes and reports the pinned version', () => {
// Runs the real script rather than grepping its source — the behaviour
// is what has to agree, not the implementation.
- const result = Bun.spawnSync(['bash', join(REPO_ROOT, 'scripts/doctor.sh')]);
+ const result = Bun.spawnSync([
+ 'bash',
+ join(REPO_ROOT, 'scripts/doctor.sh'),
+ ]);
const pinned = readBunVersionFile().trim();
expect(result.exitCode).toBe(0);
expect(result.stdout.toString()).toContain(pinned);
diff --git a/apps/justfuckinguseopenpanel/index.html b/apps/justfuckinguseopenpanel/index.html
index 7c880bafa..839063db9 100644
--- a/apps/justfuckinguseopenpanel/index.html
+++ b/apps/justfuckinguseopenpanel/index.html
@@ -1,40 +1,61 @@
<!DOCTYPE html>
<html lang="en">
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <!-- Primary Meta Tags -->
- <title>Just Fucking Use OpenPanel - Stop Overpaying for Analytics</title>
- <meta name="title" content="Just Fucking Use OpenPanel - Stop Overpaying for Analytics">
- <meta name="description" content="Mixpanel costs $2,300/month at scale. PostHog costs $1,982/month. Web-only tools tell you nothing about user behavior. OpenPanel gives you full product analytics for a fraction of the cost, or FREE self-hosted.">
- <meta name="keywords" content="openpanel, analytics, mixpanel alternative, posthog alternative, product analytics, web analytics, open source analytics, self-hosted analytics">
- <meta name="author" content="OpenPanel">
- <meta name="robots" content="index, follow">
- <link rel="canonical" href="https://justfuckinguseopenpanel.dev/">
- <link rel="icon" type="image/x-icon" href="/favicon.ico">
-
- <!-- Open Graph / Facebook -->
- <meta property="og:type" content="website">
- <meta property="og:url" content="https://justfuckinguseopenpanel.dev/">
- <meta property="og:title" content="Just Fucking Use OpenPanel - Stop Overpaying for Analytics">
- <meta property="og:description" content="Mixpanel costs $2,300/month at scale. PostHog costs $1,982/month. Web-only tools tell you nothing about user behavior. OpenPanel gives you full product analytics for a fraction of the cost, or FREE self-hosted.">
- <meta property="og:image" content="/ogimage.png">
- <meta property="og:image:width" content="1200">
- <meta property="og:image:height" content="630">
- <meta property="og:site_name" content="Just Fucking Use OpenPanel">
-
- <!-- Twitter -->
- <meta name="twitter:card" content="summary_large_image">
- <meta name="twitter:url" content="https://justfuckinguseopenpanel.dev/">
- <meta name="twitter:title" content="Just Fucking Use OpenPanel - Stop Overpaying for Analytics">
- <meta name="twitter:description" content="Mixpanel costs $2,300/month at scale. PostHog costs $1,982/month. Web-only tools tell you nothing about user behavior. OpenPanel gives you full product analytics for a fraction of the cost, or FREE self-hosted.">
- <meta name="twitter:image" content="/ogimage.png">
-
- <!-- Additional Meta Tags -->
- <meta name="theme-color" content="#0a0a0a">
- <meta name="color-scheme" content="dark">
- <style>
+ <head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+ <!-- Primary Meta Tags -->
+ <title>Just Fucking Use OpenPanel - Stop Overpaying for Analytics</title>
+ <meta
+ name="title"
+ content="Just Fucking Use OpenPanel - Stop Overpaying for Analytics"
+ >
+ <meta
+ name="description"
+ content="Mixpanel costs $2,300/month at scale. PostHog costs $1,982/month. Web-only tools tell you nothing about user behavior. OpenPanel gives you full product analytics for a fraction of the cost, or FREE self-hosted."
+ >
+ <meta
+ name="keywords"
+ content="openpanel, analytics, mixpanel alternative, posthog alternative, product analytics, web analytics, open source analytics, self-hosted analytics"
+ >
+ <meta name="author" content="OpenPanel">
+ <meta name="robots" content="index, follow">
+ <link rel="canonical" href="https://justfuckinguseopenpanel.dev/">
+ <link rel="icon" type="image/x-icon" href="/favicon.ico">
+
+ <!-- Open Graph / Facebook -->
+ <meta property="og:type" content="website">
+ <meta property="og:url" content="https://justfuckinguseopenpanel.dev/">
+ <meta
+ property="og:title"
+ content="Just Fucking Use OpenPanel - Stop Overpaying for Analytics"
+ >
+ <meta
+ property="og:description"
+ content="Mixpanel costs $2,300/month at scale. PostHog costs $1,982/month. Web-only tools tell you nothing about user behavior. OpenPanel gives you full product analytics for a fraction of the cost, or FREE self-hosted."
+ >
+ <meta property="og:image" content="/ogimage.png">
+ <meta property="og:image:width" content="1200">
+ <meta property="og:image:height" content="630">
+ <meta property="og:site_name" content="Just Fucking Use OpenPanel">
+
+ <!-- Twitter -->
+ <meta name="twitter:card" content="summary_large_image">
+ <meta name="twitter:url" content="https://justfuckinguseopenpanel.dev/">
+ <meta
+ name="twitter:title"
+ content="Just Fucking Use OpenPanel - Stop Overpaying for Analytics"
+ >
+ <meta
+ name="twitter:description"
+ content="Mixpanel costs $2,300/month at scale. PostHog costs $1,982/month. Web-only tools tell you nothing about user behavior. OpenPanel gives you full product analytics for a fraction of the cost, or FREE self-hosted."
+ >
+ <meta name="twitter:image" content="/ogimage.png">
+
+ <!-- Additional Meta Tags -->
+ <meta name="theme-color" content="#0a0a0a">
+ <meta name="color-scheme" content="dark">
+ <style>
* {
margin: 0;
padding: 0;
@@ -44,7 +65,9 @@
body {
background: #0a0a0a;
color: #e5e5e5;
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
+ font-family:
+ -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
+ Arial, sans-serif;
font-size: 18px;
line-height: 1.75;
padding: 2rem 1.5rem;
@@ -100,7 +123,8 @@
color: #60a5fa;
}
- ul, ol {
+ ul,
+ ol {
margin-left: 1.5rem;
margin-bottom: 1.25em;
}
@@ -123,7 +147,8 @@
margin: 2rem 0;
}
- th, td {
+ th,
+ td {
padding: 0.75rem;
text-align: left;
border-bottom: 1px solid #374151;
@@ -264,242 +289,478 @@
color: #9ca3af;
max-width: 100%;
}
- </style>
-</head>
-<body>
- <div class="container">
- <div class="hero">
- <h1>Just Fucking Use OpenPanel</h1>
- <p>Stop settling for basic metrics. Get real insights that actually help you build a better product.</p>
- </div>
-
- <figure class="screenshot">
- <div class="screenshot-inner">
- <div class="window-controls">
- <div class="window-dot red"></div>
- <div class="window-dot yellow"></div>
- <div class="window-dot green"></div>
- </div>
- <div class="screenshot-image-wrapper">
- <img src="screenshots/realtime-dark.webp" alt="OpenPanel Real-time Analytics" width="1400" height="800">
- </div>
+ </style>
+ </head>
+ <body>
+ <div class="container">
+ <div class="hero">
+ <h1>Just Fucking Use OpenPanel</h1>
+ <p>
+ Stop settling for basic metrics. Get real insights that actually help
+ you build a better product.
+ </p>
</div>
- <figcaption>Real-time analytics - see events as they happen. No waiting, no delays.</figcaption>
- </figure>
-
- <h2>The PostHog/Mixpanel Problem (Volume Pricing Hell)</h2>
-
- <p>Let's talk about what happens when you have a <strong>real product</strong> with <strong>real users</strong>.</p>
-
- <p><strong>Real pricing at scale (20M+ events/month):</strong></p>
- <ul>
- <li><strong>Mixpanel</strong>: $2,300/month (and more with add-ons)</li>
- <li><strong>PostHog</strong>: $1,982/month (and more with add-ons)</li>
- </ul>
-
- <p>"1 million free events!" they scream. Cute. Until you have an actual product with actual users doing actual things. Then suddenly you need to "talk to sales" and your wallet starts bleeding.</p>
-
- <p>Add-ons, add-ons everywhere. Session replay? +$X. Feature flags? +$X. HIPAA compliance? +$250/month. A/B testing? That'll be extra. You're hemorrhaging money just to understand what your users are doing, you magnificent fool.</p>
-
- <h2>The Web-Only Analytics Trap</h2>
-
- <p>You built a great fucking product. You have real traffic. Thousands, tens of thousands of visitors. But you're flying blind.</p>
-
- <blockquote>
- "Congrats, 50,000 visitors from France this month. Why didn't a single one buy your baguette?"
- </blockquote>
-
- <p>You see the traffic. You see the bounce rate. You see the referrers. You see where they're from. You have <strong>NO FUCKING IDEA</strong> what users actually do.</p>
-
- <p>Where do they drop off? Do they come back? What features do they use? Why didn't they convert? Who the fuck knows! You're using a glorified hit counter with a pretty dashboard that tells you everything about geography and nothing about behavior.</p>
-
- <p>Plausible. Umami. Fathom. Simple Analytics. GoatCounter. Cabin. Pirsch. They're all the same story: simple analytics with some goals you can define. Page views, visitors, countries, basic funnels. That's it. No retention analysis. No user profiles. No event tracking. No cohorts. No revenue tracking. Just... basic web analytics.</p>
-
- <p>And when you finally need to understand your users—when you need to see where they drop off in your signup flow, or which features drive retention, or why your conversion rate is shit—you end up paying for a <strong>SECOND tool</strong> on top. Now you're paying for two subscriptions, managing two dashboards, and your users' data is split across two platforms like a bad divorce.</p>
-
- <h2>Counter One Dollar Stats</h2>
-
- <p>"$1/month for page views. Adorable."</p>
-
- <p>Look, I get it. A dollar is cheap. But you're getting exactly what you pay for: page views. That's it. No funnels. No retention. No user profiles. No event tracking. Just... page views.</p>
-
- <p>Here's the thing: if you want to make <strong>good decisions</strong> about your product, you need to understand <strong>what your users are actually doing</strong>, not just where the fuck they're from.</p>
-
- <p>OpenPanel gives you the full product analytics suite. Or self-host for <strong>FREE</strong> with <strong>UNLIMITED events</strong>.</p>
- <p>You get:</p>
- <ul>
- <li>Funnels to see where users drop off</li>
- <li>Retention analysis to see who comes back</li>
- <li>Cohorts to segment your users</li>
- <li>User profiles to understand individual behavior</li>
- <li>Custom dashboards to see what matters to YOU</li>
- <li>Revenue tracking to see what actually makes money</li>
- <li>All the web analytics (page views, visitors, referrers) that the other tools give you</li>
- </ul>
-
- <p>One Dollar Stats tells you 50,000 people visited from France. OpenPanel tells you why they didn't buy your baguette. That's the difference between vanity metrics and actual insights.</p>
-
- <h2>Why OpenPanel is the Answer</h2>
-
- <p>You want analytics that actually help you build a better product. Not vanity metrics. Not enterprise pricing. Not two separate tools.</p>
-
- <p>To make good decisions, you need to understand <strong>what your users are doing</strong>, not just where they're from. You need to see where they drop off. You need to know which features they use. You need to understand why they convert or why they don't.</p>
-
- <ul>
- <li><strong>Open Source & Self-Hostable</strong>: AGPL-3.0 - fork it, audit it, own it. Self-host for FREE with unlimited events, or use our cloud</li>
- <li><strong>Price</strong>: Affordable pricing that scales, or FREE self-hosted (unlimited events, forever)</li>
- <li><strong>SDK Size</strong>: 2.3KB (PostHog is 52KB+ - that's 22x bigger, you performance-obsessed maniac)</li>
- <li><strong>Privacy</strong>: Cookie-free by default, EU-only hosting (or your own servers if you self-host)</li>
- <li><strong>Full Suite</strong>: Web analytics + product analytics in one tool. No need for two subscriptions.</li>
- </ul>
-
- <figure class="screenshot">
- <div class="screenshot-inner">
- <div class="window-controls">
- <div class="window-dot red"></div>
- <div class="window-dot yellow"></div>
- <div class="window-dot green"></div>
- </div>
- <div class="screenshot-image-wrapper">
- <img src="screenshots/overview-dark.webp" alt="OpenPanel Overview Dashboard" width="1400" height="800">
+ <figure class="screenshot">
+ <div class="screenshot-inner">
+ <div class="window-controls">
+ <div class="window-dot red"></div>
+ <div class="window-dot yellow"></div>
+ <div class="window-dot green"></div>
+ </div>
+ <div class="screenshot-image-wrapper">
+ <img
+ src="screenshots/realtime-dark.webp"
+ alt="OpenPanel Real-time Analytics"
+ width="1400"
+ height="800"
+ >
+ </div>
</div>
- </div>
- <figcaption>OpenPanel overview showing web analytics and product analytics in one clean interface</figcaption>
- </figure>
-
- <h2>Open Source & Self-Hosting: The Ultimate Fuck You to Pricing Hell</h2>
-
- <p>Tired of watching your analytics bill grow every month? Tired of "talk to sales" when you hit their arbitrary limits? Tired of paying $2,000+/month just to understand your users?</p>
-
- <p><strong>OpenPanel is open source.</strong> AGPL-3.0 licensed. You can fork it. You can audit it. You can own it. And you can <strong>self-host it for FREE with UNLIMITED events</strong>.</p>
-
- <p>That's right. Zero dollars. Unlimited events. All the features. Your data on your servers. No vendor lock-in. No surprise bills. No "enterprise sales" calls.</p>
-
- <p>Mixpanel at 20M events? $2,300/month. PostHog? $1,982/month. OpenPanel self-hosted? <strong>$0/month</strong>. Forever.</p>
-
- <p>Don't want to manage infrastructure? That's fine. Use our cloud. But if you want to escape the pricing hell entirely, self-hosting is a Docker command away. Your data, your rules, your wallet.</p>
-
- <h2>The Comparison Table (The Brutal Truth)</h2>
-
- <table>
- <thead>
- <tr>
- <th>Tool</th>
- <th>Price at 20M events</th>
- <th>What You Get</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><strong>Mixpanel</strong></td>
- <td>$2,300+/month</td>
- <td>Not all feautres... since addons are extra</td>
- </tr>
- <tr>
- <td><strong>PostHog</strong></td>
- <td>$1,982+/month</td>
- <td>Not all feautres... since addons are extra</td>
- </tr>
- <tr>
- <td><strong>Plausible</strong></td>
- <td>Various pricing</td>
- <td>Simple analytics with basic goals. Page views and visitors. That's it.</td>
- </tr>
- <tr>
- <td><strong>One Dollar Stats</strong></td>
- <td>$1/month</td>
- <td>Page views (but cheaper!)</td>
- </tr>
- <tr style="background: #131313; border: 2px solid #3b82f6;">
- <td><strong>OpenPanel</strong></td>
- <td><strong>~$530/mo or FREE (self-hosted)</strong></td>
- <td><strong>Web + Product analytics. The full package. Open source. Your data.</strong></td>
- </tr>
- </tbody>
- </table>
-
- <figure class="screenshot">
- <div class="screenshot-inner">
- <div class="window-controls">
- <div class="window-dot red"></div>
- <div class="window-dot yellow"></div>
- <div class="window-dot green"></div>
+ <figcaption>
+ Real-time analytics - see events as they happen. No waiting, no
+ delays.
+ </figcaption>
+ </figure>
+
+ <h2>The PostHog/Mixpanel Problem (Volume Pricing Hell)</h2>
+
+ <p>
+ Let's talk about what happens when you have a
+ <strong>real product</strong> with <strong>real users</strong>.
+ </p>
+
+ <p><strong>Real pricing at scale (20M+ events/month):</strong></p>
+ <ul>
+ <li><strong>Mixpanel</strong>: $2,300/month (and more with add-ons)</li>
+ <li><strong>PostHog</strong>: $1,982/month (and more with add-ons)</li>
+ </ul>
+
+ <p>
+ "1 million free events!" they scream. Cute. Until you have an actual
+ product with actual users doing actual things. Then suddenly you need to
+ "talk to sales" and your wallet starts bleeding.
+ </p>
+
+ <p>
+ Add-ons, add-ons everywhere. Session replay? +$X. Feature flags? +$X.
+ HIPAA compliance? +$250/month. A/B testing? That'll be extra. You're
+ hemorrhaging money just to understand what your users are doing, you
+ magnificent fool.
+ </p>
+
+ <h2>The Web-Only Analytics Trap</h2>
+
+ <p>
+ You built a great fucking product. You have real traffic. Thousands,
+ tens of thousands of visitors. But you're flying blind.
+ </p>
+
+ <blockquote>
+ "Congrats, 50,000 visitors from France this month. Why didn't a single
+ one buy your baguette?"
+ </blockquote>
+
+ <p>
+ You see the traffic. You see the bounce rate. You see the referrers. You
+ see where they're from. You have <strong>NO FUCKING IDEA</strong> what
+ users actually do.
+ </p>
+
+ <p>
+ Where do they drop off? Do they come back? What features do they use?
+ Why didn't they convert? Who the fuck knows! You're using a glorified
+ hit counter with a pretty dashboard that tells you everything about
+ geography and nothing about behavior.
+ </p>
+
+ <p>
+ Plausible. Umami. Fathom. Simple Analytics. GoatCounter. Cabin. Pirsch.
+ They're all the same story: simple analytics with some goals you can
+ define. Page views, visitors, countries, basic funnels. That's it. No
+ retention analysis. No user profiles. No event tracking. No cohorts. No
+ revenue tracking. Just... basic web analytics.
+ </p>
+
+ <p>
+ And when you finally need to understand your users—when you need to see
+ where they drop off in your signup flow, or which features drive
+ retention, or why your conversion rate is shit—you end up paying for a
+ <strong>SECOND tool</strong> on top. Now you're paying for two
+ subscriptions, managing two dashboards, and your users' data is split
+ across two platforms like a bad divorce.
+ </p>
+
+ <h2>Counter One Dollar Stats</h2>
+
+ <p>"$1/month for page views. Adorable."</p>
+
+ <p>
+ Look, I get it. A dollar is cheap. But you're getting exactly what you
+ pay for: page views. That's it. No funnels. No retention. No user
+ profiles. No event tracking. Just... page views.
+ </p>
+
+ <p>
+ Here's the thing: if you want to make <strong>good decisions</strong>
+ about your product, you need to understand
+ <strong>what your users are actually doing</strong>, not just where the
+ fuck they're from.
+ </p>
+
+ <p>
+ OpenPanel gives you the full product analytics suite. Or self-host for
+ <strong>FREE</strong> with <strong>UNLIMITED events</strong>.
+ </p>
+
+ <p>You get:</p>
+ <ul>
+ <li>Funnels to see where users drop off</li>
+ <li>Retention analysis to see who comes back</li>
+ <li>Cohorts to segment your users</li>
+ <li>User profiles to understand individual behavior</li>
+ <li>Custom dashboards to see what matters to YOU</li>
+ <li>Revenue tracking to see what actually makes money</li>
+ <li>
+ All the web analytics (page views, visitors, referrers) that the other
+ tools give you
+ </li>
+ </ul>
+
+ <p>
+ One Dollar Stats tells you 50,000 people visited from France. OpenPanel
+ tells you why they didn't buy your baguette. That's the difference
+ between vanity metrics and actual insights.
+ </p>
+
+ <h2>Why OpenPanel is the Answer</h2>
+
+ <p>
+ You want analytics that actually help you build a better product. Not
+ vanity metrics. Not enterprise pricing. Not two separate tools.
+ </p>
+
+ <p>
+ To make good decisions, you need to understand
+ <strong>what your users are doing</strong>, not just where they're from.
+ You need to see where they drop off. You need to know which features
+ they use. You need to understand why they convert or why they don't.
+ </p>
+
+ <ul>
+ <li>
+ <strong>Open Source & Self-Hostable</strong>: AGPL-3.0 - fork it,
+ audit it, own it. Self-host for FREE with unlimited events, or use our
+ cloud
+ </li>
+ <li>
+ <strong>Price</strong>: Affordable pricing that scales, or FREE
+ self-hosted (unlimited events, forever)
+ </li>
+ <li>
+ <strong>SDK Size</strong>: 2.3KB (PostHog is 52KB+ - that's 22x
+ bigger, you performance-obsessed maniac)
+ </li>
+ <li>
+ <strong>Privacy</strong>: Cookie-free by default, EU-only hosting (or
+ your own servers if you self-host)
+ </li>
+ <li>
+ <strong>Full Suite</strong>: Web analytics + product analytics in one
+ tool. No need for two subscriptions.
+ </li>
+ </ul>
+
+ <figure class="screenshot">
+ <div class="screenshot-inner">
+ <div class="window-controls">
+ <div class="window-dot red"></div>
+ <div class="window-dot yellow"></div>
+ <div class="window-dot green"></div>
+ </div>
+ <div class="screenshot-image-wrapper">
+ <img
+ src="screenshots/overview-dark.webp"
+ alt="OpenPanel Overview Dashboard"
+ width="1400"
+ height="800"
+ >
+ </div>
</div>
- <div class="screenshot-image-wrapper">
- <img src="screenshots/profile-dark.webp" alt="OpenPanel User Profiles" width="1400" height="800">
- </div>
- </div>
- <figcaption>User profiles - see individual user journeys and behavior. Something web-only tools can't give you.</figcaption>
- </figure>
-
- <figure class="screenshot">
- <div class="screenshot-inner">
- <div class="window-controls">
- <div class="window-dot red"></div>
- <div class="window-dot yellow"></div>
- <div class="window-dot green"></div>
+ <figcaption>
+ OpenPanel overview showing web analytics and product analytics in one
+ clean interface
+ </figcaption>
+ </figure>
+
+ <h2>Open Source & Self-Hosting: The Ultimate Fuck You to Pricing Hell</h2>
+
+ <p>
+ Tired of watching your analytics bill grow every month? Tired of "talk
+ to sales" when you hit their arbitrary limits? Tired of paying
+ $2,000+/month just to understand your users?
+ </p>
+
+ <p>
+ <strong>OpenPanel is open source.</strong> AGPL-3.0 licensed. You can
+ fork it. You can audit it. You can own it. And you can
+ <strong>self-host it for FREE with UNLIMITED events</strong>.
+ </p>
+
+ <p>
+ That's right. Zero dollars. Unlimited events. All the features. Your
+ data on your servers. No vendor lock-in. No surprise bills. No
+ "enterprise sales" calls.
+ </p>
+
+ <p>
+ Mixpanel at 20M events? $2,300/month. PostHog? $1,982/month. OpenPanel
+ self-hosted? <strong>$0/month</strong>. Forever.
+ </p>
+
+ <p>
+ Don't want to manage infrastructure? That's fine. Use our cloud. But if
+ you want to escape the pricing hell entirely, self-hosting is a Docker
+ command away. Your data, your rules, your wallet.
+ </p>
+
+ <h2>The Comparison Table (The Brutal Truth)</h2>
+
+ <table>
+ <thead>
+ <tr>
+ <th>Tool</th>
+ <th>Price at 20M events</th>
+ <th>What You Get</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><strong>Mixpanel</strong></td>
+ <td>$2,300+/month</td>
+ <td>Not all feautres... since addons are extra</td>
+ </tr>
+ <tr>
+ <td><strong>PostHog</strong></td>
+ <td>$1,982+/month</td>
+ <td>Not all feautres... since addons are extra</td>
+ </tr>
+ <tr>
+ <td><strong>Plausible</strong></td>
+ <td>Various pricing</td>
+ <td>
+ Simple analytics with basic goals. Page views and visitors. That's
+ it.
+ </td>
+ </tr>
+ <tr>
+ <td><strong>One Dollar Stats</strong></td>
+ <td>$1/month</td>
+ <td>Page views (but cheaper!)</td>
+ </tr>
+ <tr style="background: #131313; border: 2px solid #3b82f6;">
+ <td><strong>OpenPanel</strong></td>
+ <td><strong>~$530/mo or FREE (self-hosted)</strong></td>
+ <td>
+ <strong
+ >Web + Product analytics. The full package. Open source. Your
+ data.</strong
+ >
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <figure class="screenshot">
+ <div class="screenshot-inner">
+ <div class="window-controls">
+ <div class="window-dot red"></div>
+ <div class="window-dot yellow"></div>
+ <div class="window-dot green"></div>
+ </div>
+ <div class="screenshot-image-wrapper">
+ <img
+ src="screenshots/profile-dark.webp"
+ alt="OpenPanel User Profiles"
+ width="1400"
+ height="800"
+ >
+ </div>
</div>
- <div class="screenshot-image-wrapper">
- <img src="screenshots/report-dark.webp" alt="OpenPanel Reports and Funnels" width="1400" height="800">
+ <figcaption>
+ User profiles - see individual user journeys and behavior. Something
+ web-only tools can't give you.
+ </figcaption>
+ </figure>
+
+ <figure class="screenshot">
+ <div class="screenshot-inner">
+ <div class="window-controls">
+ <div class="window-dot red"></div>
+ <div class="window-dot yellow"></div>
+ <div class="window-dot green"></div>
+ </div>
+ <div class="screenshot-image-wrapper">
+ <img
+ src="screenshots/report-dark.webp"
+ alt="OpenPanel Reports and Funnels"
+ width="1400"
+ height="800"
+ >
+ </div>
</div>
+ <figcaption>
+ Funnels, retention, and custom reports - the features you CAN'T get
+ with web-only tools
+ </figcaption>
+ </figure>
+
+ <h2>The Bottom Fucking Line</h2>
+
+ <p>
+ If you want to make good decisions about your product, you need to
+ understand what your users are actually doing. Not just where they're
+ from. Not just how many page views you got. You need to see the full
+ picture: funnels, retention, user behavior, conversion paths.
+ </p>
+
+ <p>You have three choices:</p>
+
+ <ol>
+ <li>
+ Keep using Google Analytics like a data-harvesting accomplice, adding
+ cookie banners, annoying your users, and contributing to the dystopian
+ surveillance economy
+ </li>
+ <li>
+ Pay $2,000+/month for Mixpanel or PostHog when you scale, or use
+ simple web-only analytics that tell you nothing about user
+ behavior—just where they're from
+ </li>
+ <li>
+ Use OpenPanel (affordable pricing or FREE self-hosted) and get the
+ full analytics suite: web analytics AND product analytics in one tool,
+ so you can actually understand what your users do
+ </li>
+ </ol>
+
+ <p>
+ If you picked option 1 or 2, I can't help you. You're beyond saving. Go
+ enjoy your complicated, privacy-violating, overpriced analytics life
+ where you know everything about where your users are from but nothing
+ about what they actually do.
+ </p>
+
+ <p>
+ But if you have even one functioning brain cell, you'll realize that
+ OpenPanel gives you everything you need—web analytics AND product
+ analytics—for a fraction of what the enterprise tools cost. You'll
+ finally understand what your users are doing, not just where the fuck
+ they're from.
+ </p>
+
+ <div class="cta">
+ <h2>Ready to understand what your users actually do?</h2>
+ <p>
+ Stop settling for vanity metrics. Get the full analytics suite—web
+ analytics AND product analytics—so you can make better decisions. Or
+ self-host for free.
+ </p>
+ <a href="https://openpanel.dev" target="_blank"
+ >Get Started with OpenPanel</a
+ >
+ <a
+ href="https://openpanel.dev/docs/self-hosting/self-hosting"
+ target="_blank"
+ >Self-Host Guide</a
+ >
</div>
- <figcaption>Funnels, retention, and custom reports - the features you CAN'T get with web-only tools</figcaption>
- </figure>
- <h2>The Bottom Fucking Line</h2>
-
- <p>If you want to make good decisions about your product, you need to understand what your users are actually doing. Not just where they're from. Not just how many page views you got. You need to see the full picture: funnels, retention, user behavior, conversion paths.</p>
-
- <p>You have three choices:</p>
-
- <ol>
- <li>Keep using Google Analytics like a data-harvesting accomplice, adding cookie banners, annoying your users, and contributing to the dystopian surveillance economy</li>
- <li>Pay $2,000+/month for Mixpanel or PostHog when you scale, or use simple web-only analytics that tell you nothing about user behavior—just where they're from</li>
- <li>Use OpenPanel (affordable pricing or FREE self-hosted) and get the full analytics suite: web analytics AND product analytics in one tool, so you can actually understand what your users do</li>
- </ol>
-
- <p>If you picked option 1 or 2, I can't help you. You're beyond saving. Go enjoy your complicated, privacy-violating, overpriced analytics life where you know everything about where your users are from but nothing about what they actually do.</p>
-
- <p>But if you have even one functioning brain cell, you'll realize that OpenPanel gives you everything you need—web analytics AND product analytics—for a fraction of what the enterprise tools cost. You'll finally understand what your users are doing, not just where the fuck they're from.</p>
-
- <div class="cta">
- <h2>Ready to understand what your users actually do?</h2>
- <p>Stop settling for vanity metrics. Get the full analytics suite—web analytics AND product analytics—so you can make better decisions. Or self-host for free.</p>
- <a href="https://openpanel.dev" target="_blank">Get Started with OpenPanel</a>
- <a href="https://openpanel.dev/docs/self-hosting/self-hosting" target="_blank">Self-Host Guide</a>
+ <figure class="screenshot">
+ <div class="screenshot-inner">
+ <div class="window-controls">
+ <div class="window-dot red"></div>
+ <div class="window-dot yellow"></div>
+ <div class="window-dot green"></div>
+ </div>
+ <div class="screenshot-image-wrapper">
+ <img
+ src="screenshots/dashboard-dark.webp"
+ alt="OpenPanel Custom Dashboards"
+ width="1400"
+ height="800"
+ >
+ </div>
+ </div>
+ <figcaption>
+ Custom dashboards - build exactly what you need to understand your
+ product
+ </figcaption>
+ </figure>
+
+ <footer>
+ <p><strong>Just Fucking Use OpenPanel</strong></p>
+ <p>
+ Inspired by
+ <a
+ href="https://justfuckingusereact.com"
+ target="_blank"
+ rel="nofollow"
+ >justfuckingusereact.com</a
+ >, <a
+ href="https://justfuckingusehtml.com"
+ target="_blank"
+ rel="nofollow"
+ >justfuckingusehtml.com</a
+ >, and
+ <a
+ href="https://justfuckinguseonedollarstats.com"
+ target="_blank"
+ rel="nofollow"
+ >justfuckinguseonedollarstats.com</a
+ >
+ and all other just fucking use sites.
+ </p>
+ <p style="margin-top: 1rem;">
+ This is affiliated with
+ <a href="https://openpanel.dev" target="_blank" rel="nofollow"
+ >OpenPanel</a
+ >. We still love all products mentioned in this website, and we're
+ grateful for them and what they do 🫶
+ </p>
+ </footer>
</div>
- <figure class="screenshot">
- <div class="screenshot-inner">
- <div class="window-controls">
- <div class="window-dot red"></div>
- <div class="window-dot yellow"></div>
- <div class="window-dot green"></div>
- </div>
- <div class="screenshot-image-wrapper">
- <img src="screenshots/dashboard-dark.webp" alt="OpenPanel Custom Dashboards" width="1400" height="800">
- </div>
- </div>
- <figcaption>Custom dashboards - build exactly what you need to understand your product</figcaption>
- </figure>
-
- <footer>
- <p><strong>Just Fucking Use OpenPanel</strong></p>
- <p>Inspired by <a href="https://justfuckingusereact.com" target="_blank" rel="nofollow">justfuckingusereact.com</a>, <a href="https://justfuckingusehtml.com" target="_blank" rel="nofollow">justfuckingusehtml.com</a>, and <a href="https://justfuckinguseonedollarstats.com" target="_blank" rel="nofollow">justfuckinguseonedollarstats.com</a> and all other just fucking use sites.</p>
- <p style="margin-top: 1rem;">This is affiliated with <a href="https://openpanel.dev" target="_blank" rel="nofollow">OpenPanel</a>. We still love all products mentioned in this website, and we're grateful for them and what they do 🫶</p>
- </footer>
- </div>
-
- <script>
- window.op=window.op||function(){var n=[];return new Proxy(function(){arguments.length&&n.push([].slice.call(arguments))},{get:function(t,r){return"q"===r?n:function(){n.push([r].concat([].slice.call(arguments)))}} ,has:function(t,r){return"q"===r}}) }();
+ <script>
+ window.op =
+ window.op ||
+ (function () {
+ var n = [];
+ return new Proxy(
+ function () {
+ arguments.length && n.push([].slice.call(arguments));
+ },
+ {
+ get: function (t, r) {
+ return 'q' === r
+ ? n
+ : function () {
+ n.push([r].concat([].slice.call(arguments)));
+ };
+ },
+ has: function (t, r) {
+ return 'q' === r;
+ },
+ }
+ );
+ })();
window.op('init', {
clientId: '59d97757-9449-44cf-a8c1-8f213843b4f0',
trackScreenViews: true,
trackOutgoingLinks: true,
trackAttributes: true,
});
- </script>
- <script src="https://openpanel.dev/op1.js" defer async></script>
-</body>
+ </script>
+ <script src="https://openpanel.dev/op1.js" defer async></script>
+ </body>
</html>
diff --git a/apps/justfuckinguseopenpanel/wrangler.jsonc b/apps/justfuckinguseopenpanel/wrangler.jsonc
index 005d95fb1..37a524e56 100644
--- a/apps/justfuckinguseopenpanel/wrangler.jsonc
+++ b/apps/justfuckinguseopenpanel/wrangler.jsonc
@@ -4,4 +4,4 @@
"assets": {
"directory": "."
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/components/sections/supporter-perks.tsx b/apps/public/components/sections/supporter-perks.tsx
index 6cd912374..8fa95be0e 100644
--- a/apps/public/components/sections/supporter-perks.tsx
+++ b/apps/public/components/sections/supporter-perks.tsx
@@ -54,7 +54,7 @@ export function SupporterPerks({ className }: { className?: string }) {
className={cn(
'col gap-4 p-6 rounded-xl border bg-card',
'sticky top-24',
- className,
+ className
)}
>
<div className="col gap-2 mb-2">
@@ -77,14 +77,14 @@ export function SupporterPerks({ className }: { className?: string }) {
'col gap-1.5 p-3 rounded-lg border transition-colors',
perk.highlight
? 'bg-primary/5 border-primary/20'
- : 'bg-background border-border',
+ : 'bg-background border-border'
)}
>
<div className="row gap-2 items-start">
<Icon
className={cn(
'size-4 mt-0.5 shrink-0',
- perk.highlight ? 'text-primary' : 'text-muted-foreground',
+ perk.highlight ? 'text-primary' : 'text-muted-foreground'
)}
/>
<div className="col gap-0.5 flex-1 min-w-0">
@@ -92,7 +92,7 @@ export function SupporterPerks({ className }: { className?: string }) {
<h4
className={cn(
'font-medium text-sm',
- perk.highlight && 'text-primary',
+ perk.highlight && 'text-primary'
)}
>
{perk.title}
@@ -127,4 +127,3 @@ export function SupporterPerks({ className }: { className?: string }) {
</div>
);
}
-
diff --git a/apps/public/content/compare/ackee-alternative.json b/apps/public/content/compare/ackee-alternative.json
index be4923d91..b4c943e7d 100644
--- a/apps/public/content/compare/ackee-alternative.json
+++ b/apps/public/content/compare/ackee-alternative.json
@@ -551,4 +551,4 @@
"href": "https://github.com/Openpanel-dev/openpanel"
}
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/compare/amplitude-alternative.json b/apps/public/content/compare/amplitude-alternative.json
index 8c8fd0e1a..00bd871fd 100644
--- a/apps/public/content/compare/amplitude-alternative.json
+++ b/apps/public/content/compare/amplitude-alternative.json
@@ -9,12 +9,7 @@
"hero": {
"heading": "Best Amplitude Alternatives",
"subheading": "OpenPanel is an open-source, privacy-first alternative to Amplitude. Get powerful product analytics with web analytics built in, cookie-free tracking, and the freedom to self-host or use our cloud.",
- "badges": [
- "Open-source",
- "Cookie-free",
- "EU-only hosting",
- "Self-hostable"
- ]
+ "badges": ["Open-source", "Cookie-free", "EU-only hosting", "Self-hostable"]
},
"competitor": {
"name": "Amplitude",
@@ -572,4 +567,4 @@
"href": "https://github.com/Openpanel-dev/openpanel"
}
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/compare/appsflyer-alternative.json b/apps/public/content/compare/appsflyer-alternative.json
index f91da72c0..f34db8905 100644
--- a/apps/public/content/compare/appsflyer-alternative.json
+++ b/apps/public/content/compare/appsflyer-alternative.json
@@ -470,4 +470,4 @@
"href": "https://github.com/Openpanel-dev/openpanel"
}
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/compare/cabin-analytics-alternative.json b/apps/public/content/compare/cabin-analytics-alternative.json
index 040a000b1..73102498f 100644
--- a/apps/public/content/compare/cabin-analytics-alternative.json
+++ b/apps/public/content/compare/cabin-analytics-alternative.json
@@ -522,4 +522,4 @@
"href": "https://github.com/Openpanel-dev/openpanel"
}
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/compare/countly-alternative.json b/apps/public/content/compare/countly-alternative.json
index 9a3d1bdb1..86c7a2b4d 100644
--- a/apps/public/content/compare/countly-alternative.json
+++ b/apps/public/content/compare/countly-alternative.json
@@ -9,12 +9,7 @@
"hero": {
"heading": "Best Countly Alternative",
"subheading": "Want Countly's product analytics without the complexity? OpenPanel offers a simpler, more affordable approach to user analytics with self-hosting, mobile SDKs, and modern product analytics - all with transparent pricing.",
- "badges": [
- "Open-source",
- "Simple Pricing",
- "Lightweight",
- "AGPL-3.0"
- ]
+ "badges": ["Open-source", "Simple Pricing", "Lightweight", "AGPL-3.0"]
},
"competitor": {
"name": "Countly",
@@ -563,4 +558,4 @@
"href": "https://github.com/Openpanel-dev/openpanel"
}
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/compare/crazy-egg-alternative.json b/apps/public/content/compare/crazy-egg-alternative.json
index 14695832d..de89e8693 100644
--- a/apps/public/content/compare/crazy-egg-alternative.json
+++ b/apps/public/content/compare/crazy-egg-alternative.json
@@ -275,9 +275,7 @@
"Android",
"Node.js"
],
- "competitor": [
- "JavaScript (web only)"
- ],
+ "competitor": ["JavaScript (web only)"],
"notes": null
},
{
@@ -459,4 +457,4 @@
"href": "https://github.com/Openpanel-dev/openpanel"
}
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/compare/ensure.ts b/apps/public/content/compare/ensure.ts
index 495d19535..d0889529b 100644
--- a/apps/public/content/compare/ensure.ts
+++ b/apps/public/content/compare/ensure.ts
@@ -88,7 +88,7 @@ async function analyzeJsonFiles(): Promise<void> {
console.log(separator);
const sortedGroups = Array.from(groups.entries()).sort(
- (a, b) => b[1].length - a[1].length,
+ (a, b) => b[1].length - a[1].length
);
sortedGroups.forEach(([structureKey, files], index) => {
diff --git a/apps/public/content/compare/fathom-alternative.json b/apps/public/content/compare/fathom-alternative.json
index 93309152b..6dbe861a6 100644
--- a/apps/public/content/compare/fathom-alternative.json
+++ b/apps/public/content/compare/fathom-alternative.json
@@ -517,4 +517,4 @@
"href": "https://github.com/Openpanel-dev/openpanel"
}
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/compare/fullstory-alternative.json b/apps/public/content/compare/fullstory-alternative.json
index b63daf664..6573a8542 100644
--- a/apps/public/content/compare/fullstory-alternative.json
+++ b/apps/public/content/compare/fullstory-alternative.json
@@ -470,4 +470,4 @@
"href": "https://github.com/Openpanel-dev/openpanel"
}
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/compare/funnelio-alternative.json b/apps/public/content/compare/funnelio-alternative.json
index 84352540f..f2e7f9453 100644
--- a/apps/public/content/compare/funnelio-alternative.json
+++ b/apps/public/content/compare/funnelio-alternative.json
@@ -514,4 +514,4 @@
"href": "https://github.com/Openpanel-dev/openpanel"
}
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/compare/goatcounter-alternative.json b/apps/public/content/compare/goatcounter-alternative.json
index 5f18bf908..637aea44d 100644
--- a/apps/public/content/compare/goatcounter-alternative.json
+++ b/apps/public/content/compare/goatcounter-alternative.json
@@ -590,4 +590,4 @@
"href": "https://github.com/Openpanel-dev/openpanel"
}
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/compare/google-analytics-alternative.json b/apps/public/content/compare/google-analytics-alternative.json
index d3cc0ff92..def6b2c1d 100644
--- a/apps/public/content/compare/google-analytics-alternative.json
+++ b/apps/public/content/compare/google-analytics-alternative.json
@@ -587,4 +587,4 @@
"href": "https://github.com/Openpanel-dev/openpanel"
}
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/compare/heap-alternative.json b/apps/public/content/compare/heap-alternative.json
index 0e3178026..03fe484d7 100644
--- a/apps/public/content/compare/heap-alternative.json
+++ b/apps/public/content/compare/heap-alternative.json
@@ -480,4 +480,4 @@
"href": "https://github.com/Openpanel-dev/openpanel"
}
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/compare/matomo-alternative.json b/apps/public/content/compare/matomo-alternative.json
index 975429635..ce9b4e190 100644
--- a/apps/public/content/compare/matomo-alternative.json
+++ b/apps/public/content/compare/matomo-alternative.json
@@ -9,12 +9,7 @@
"hero": {
"heading": "Best Matomo Alternative",
"subheading": "OpenPanel is a modern, open-source alternative to Matomo. Get powerful web and product analytics with a cleaner interface, truly cookie-free tracking by default, and no premium plugins required for essential features.",
- "badges": [
- "Open-source",
- "Cookie-free",
- "EU-only hosting",
- "Self-hostable"
- ]
+ "badges": ["Open-source", "Cookie-free", "EU-only hosting", "Self-hostable"]
},
"competitor": {
"name": "Matomo",
@@ -513,4 +508,4 @@
}
]
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/compare/microsoft-clarity-alternative.json b/apps/public/content/compare/microsoft-clarity-alternative.json
index e308f0f72..08bbea8da 100644
--- a/apps/public/content/compare/microsoft-clarity-alternative.json
+++ b/apps/public/content/compare/microsoft-clarity-alternative.json
@@ -552,4 +552,4 @@
"href": "https://github.com/Openpanel-dev/openpanel"
}
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/compare/mixpanel-alternative.json b/apps/public/content/compare/mixpanel-alternative.json
index 4750ab501..dca8f2c0f 100644
--- a/apps/public/content/compare/mixpanel-alternative.json
+++ b/apps/public/content/compare/mixpanel-alternative.json
@@ -527,4 +527,4 @@
"href": "https://github.com/Openpanel-dev/openpanel"
}
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/compare/mouseflow-alternative.json b/apps/public/content/compare/mouseflow-alternative.json
index 31c02d3b2..ad72019ac 100644
--- a/apps/public/content/compare/mouseflow-alternative.json
+++ b/apps/public/content/compare/mouseflow-alternative.json
@@ -281,9 +281,7 @@
"Android",
"Node.js"
],
- "competitor": [
- "JavaScript (web only)"
- ],
+ "competitor": ["JavaScript (web only)"],
"notes": null
},
{
@@ -465,4 +463,4 @@
"href": "https://github.com/Openpanel-dev/openpanel"
}
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/compare/pirsch-analytics-alternative.json b/apps/public/content/compare/pirsch-analytics-alternative.json
index 622370901..14361538a 100644
--- a/apps/public/content/compare/pirsch-analytics-alternative.json
+++ b/apps/public/content/compare/pirsch-analytics-alternative.json
@@ -518,4 +518,4 @@
"href": "https://github.com/Openpanel-dev/openpanel"
}
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/compare/plausible-alternative.json b/apps/public/content/compare/plausible-alternative.json
index 448787ae8..561f5c142 100644
--- a/apps/public/content/compare/plausible-alternative.json
+++ b/apps/public/content/compare/plausible-alternative.json
@@ -523,4 +523,4 @@
"href": "https://github.com/Openpanel-dev/openpanel"
}
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/compare/simple-analytics-alternative.json b/apps/public/content/compare/simple-analytics-alternative.json
index 316cacedf..460630e75 100644
--- a/apps/public/content/compare/simple-analytics-alternative.json
+++ b/apps/public/content/compare/simple-analytics-alternative.json
@@ -522,4 +522,4 @@
"href": "https://github.com/Openpanel-dev/openpanel"
}
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/compare/smartlook-alternative.json b/apps/public/content/compare/smartlook-alternative.json
index 9f2739043..cc029a28f 100644
--- a/apps/public/content/compare/smartlook-alternative.json
+++ b/apps/public/content/compare/smartlook-alternative.json
@@ -447,4 +447,4 @@
"href": "https://github.com/Openpanel-dev/openpanel"
}
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/compare/umami-alternative.json b/apps/public/content/compare/umami-alternative.json
index 7c167d92f..9679d5477 100644
--- a/apps/public/content/compare/umami-alternative.json
+++ b/apps/public/content/compare/umami-alternative.json
@@ -550,4 +550,4 @@
"href": "https://github.com/Openpanel-dev/openpanel"
}
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/docs/(tracking)/meta.json b/apps/public/content/docs/(tracking)/meta.json
index 6b9bbd290..fc35f197c 100644
--- a/apps/public/content/docs/(tracking)/meta.json
+++ b/apps/public/content/docs/(tracking)/meta.json
@@ -1,3 +1,9 @@
{
- "pages": ["sdks", "how-it-works", "session-replay", "consent-management", "..."]
+ "pages": [
+ "sdks",
+ "how-it-works",
+ "session-replay",
+ "consent-management",
+ "..."
+ ]
}
diff --git a/apps/public/content/docs/api/meta.json b/apps/public/content/docs/api/meta.json
index 6683673ec..5da1c3980 100644
--- a/apps/public/content/docs/api/meta.json
+++ b/apps/public/content/docs/api/meta.json
@@ -1,10 +1,4 @@
{
"title": "API",
- "pages": [
- "authentication",
- "track",
- "export",
- "insights",
- "manage"
- ]
-}
\ No newline at end of file
+ "pages": ["authentication", "track", "export", "insights", "manage"]
+}
diff --git a/apps/public/content/docs/dashboard/meta.json b/apps/public/content/docs/dashboard/meta.json
index 2a272033f..d79252eeb 100644
--- a/apps/public/content/docs/dashboard/meta.json
+++ b/apps/public/content/docs/dashboard/meta.json
@@ -1,7 +1,4 @@
{
"title": "Dashboard",
- "pages": [
- "understand-the-overview",
- "..."
- ]
-}
\ No newline at end of file
+ "pages": ["understand-the-overview", "..."]
+}
diff --git a/apps/public/content/docs/meta.json b/apps/public/content/docs/meta.json
index 6302f6b94..a4812a6d4 100644
--- a/apps/public/content/docs/meta.json
+++ b/apps/public/content/docs/meta.json
@@ -17,4 +17,4 @@
"---Migration---",
"...migration"
]
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/docs/self-hosting/meta.json b/apps/public/content/docs/self-hosting/meta.json
index 696158758..8bddb6f03 100644
--- a/apps/public/content/docs/self-hosting/meta.json
+++ b/apps/public/content/docs/self-hosting/meta.json
@@ -15,4 +15,4 @@
"supporter-access-latest-docker-images",
"changelog"
]
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/features/conversion.json b/apps/public/content/features/conversion.json
index dbdb17564..a43f77a7c 100644
--- a/apps/public/content/features/conversion.json
+++ b/apps/public/content/features/conversion.json
@@ -164,4 +164,4 @@
"label": "Track your first conversion",
"href": "https://dashboard.openpanel.dev/onboarding"
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/features/data-visualization.json b/apps/public/content/features/data-visualization.json
index 488862657..386f6d51c 100644
--- a/apps/public/content/features/data-visualization.json
+++ b/apps/public/content/features/data-visualization.json
@@ -172,4 +172,4 @@
"label": "Start visualizing your data",
"href": "https://dashboard.openpanel.dev/onboarding"
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/features/event-tracking.json b/apps/public/content/features/event-tracking.json
index 23a7acba7..d93a23e98 100644
--- a/apps/public/content/features/event-tracking.json
+++ b/apps/public/content/features/event-tracking.json
@@ -136,4 +136,4 @@
"label": "Track events in minutes",
"href": "https://dashboard.openpanel.dev/onboarding"
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/features/funnels.json b/apps/public/content/features/funnels.json
index d425ef8d7..523ae3e31 100644
--- a/apps/public/content/features/funnels.json
+++ b/apps/public/content/features/funnels.json
@@ -136,4 +136,4 @@
"label": "Build your first funnel",
"href": "https://dashboard.openpanel.dev/onboarding"
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/features/identify-users.json b/apps/public/content/features/identify-users.json
index 3c4347525..3a011941a 100644
--- a/apps/public/content/features/identify-users.json
+++ b/apps/public/content/features/identify-users.json
@@ -155,4 +155,4 @@
"label": "Start identifying users today",
"href": "https://dashboard.openpanel.dev/onboarding"
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/features/integrations.json b/apps/public/content/features/integrations.json
index 711a1fa04..0a56338e0 100644
--- a/apps/public/content/features/integrations.json
+++ b/apps/public/content/features/integrations.json
@@ -165,4 +165,4 @@
"label": "Set up your first integration",
"href": "https://dashboard.openpanel.dev/onboarding"
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/features/mcp.json b/apps/public/content/features/mcp.json
index 39b40d756..c7b9b750f 100644
--- a/apps/public/content/features/mcp.json
+++ b/apps/public/content/features/mcp.json
@@ -158,4 +158,4 @@
"label": "Connect your AI to your analytics",
"href": "https://dashboard.openpanel.dev/onboarding"
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/features/notifications.json b/apps/public/content/features/notifications.json
index 17c7ba686..f8ec37459 100644
--- a/apps/public/content/features/notifications.json
+++ b/apps/public/content/features/notifications.json
@@ -164,4 +164,4 @@
"label": "Set up your first notification rule",
"href": "https://dashboard.openpanel.dev/onboarding"
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/features/retention.json b/apps/public/content/features/retention.json
index 282fb6d70..f8fdca47c 100644
--- a/apps/public/content/features/retention.json
+++ b/apps/public/content/features/retention.json
@@ -4,10 +4,7 @@
"seo": {
"title": "Retention & Cohort Analysis",
"description": "User retention analytics and cohort analysis that show who comes back. See product stickiness at a glance-no sampling, no guesswork. Built on your events.",
- "keywords": [
- "user retention analytics",
- "cohort analysis"
- ]
+ "keywords": ["user retention analytics", "cohort analysis"]
},
"hero": {
"heading": "Retention: Who comes back?",
@@ -135,4 +132,4 @@
"label": "See your retention in minutes",
"href": "https://dashboard.openpanel.dev/onboarding"
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/features/revenue-tracking.json b/apps/public/content/features/revenue-tracking.json
index adc8d11bc..1715a32c1 100644
--- a/apps/public/content/features/revenue-tracking.json
+++ b/apps/public/content/features/revenue-tracking.json
@@ -154,4 +154,4 @@
"label": "Start tracking revenue",
"href": "https://dashboard.openpanel.dev/onboarding"
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/features/session-replay.json b/apps/public/content/features/session-replay.json
index b631fd2fd..adac9950e 100644
--- a/apps/public/content/features/session-replay.json
+++ b/apps/public/content/features/session-replay.json
@@ -163,4 +163,4 @@
"label": "Start recording sessions",
"href": "https://dashboard.openpanel.dev/onboarding"
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/features/share-and-collaborate.json b/apps/public/content/features/share-and-collaborate.json
index a78c5f8be..84d8e60d0 100644
--- a/apps/public/content/features/share-and-collaborate.json
+++ b/apps/public/content/features/share-and-collaborate.json
@@ -165,4 +165,4 @@
"label": "Invite your team and share your first dashboard",
"href": "https://dashboard.openpanel.dev/onboarding"
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/features/web-analytics.json b/apps/public/content/features/web-analytics.json
index 29b7d5108..17cabd714 100644
--- a/apps/public/content/features/web-analytics.json
+++ b/apps/public/content/features/web-analytics.json
@@ -178,4 +178,4 @@
"label": "Add analytics in 2 minutes",
"href": "https://dashboard.openpanel.dev/onboarding"
}
-}
\ No newline at end of file
+}
diff --git a/apps/public/content/for/agencies.json b/apps/public/content/for/agencies.json
index 9d666c44f..ef633ff13 100644
--- a/apps/public/content/for/agencies.json
+++ b/apps/public/content/for/agencies.json
@@ -151,16 +151,34 @@
"related_links": {
"guides": [
{ "title": "Script tag SDK setup", "url": "/docs/sdks/script" },
- { "title": "Migrate from Google Analytics", "url": "/guides/migrate-from-google-analytics" }
+ {
+ "title": "Migrate from Google Analytics",
+ "url": "/guides/migrate-from-google-analytics"
+ }
],
"articles": [
- { "title": "Cookieless analytics explained", "url": "/articles/cookieless-analytics" },
- { "title": "How to self-host OpenPanel", "url": "/articles/how-to-self-host-openpanel" },
- { "title": "Best open source analytics tools", "url": "/articles/self-hosted-web-analytics" }
+ {
+ "title": "Cookieless analytics explained",
+ "url": "/articles/cookieless-analytics"
+ },
+ {
+ "title": "How to self-host OpenPanel",
+ "url": "/articles/how-to-self-host-openpanel"
+ },
+ {
+ "title": "Best open source analytics tools",
+ "url": "/articles/self-hosted-web-analytics"
+ }
],
"comparisons": [
- { "title": "OpenPanel vs Google Analytics", "url": "/compare/google-analytics-alternative" },
- { "title": "OpenPanel vs Plausible", "url": "/compare/plausible-alternative" },
+ {
+ "title": "OpenPanel vs Google Analytics",
+ "url": "/compare/google-analytics-alternative"
+ },
+ {
+ "title": "OpenPanel vs Plausible",
+ "url": "/compare/plausible-alternative"
+ },
{ "title": "OpenPanel vs Matomo", "url": "/compare/matomo-alternative" }
]
},
diff --git a/apps/public/content/for/developers.json b/apps/public/content/for/developers.json
index eb39a0a1f..7b0859fff 100644
--- a/apps/public/content/for/developers.json
+++ b/apps/public/content/for/developers.json
@@ -156,13 +156,28 @@
{ "title": "Python analytics setup", "url": "/guides/python-analytics" }
],
"articles": [
- { "title": "How to self-host OpenPanel", "url": "/articles/how-to-self-host-openpanel" },
- { "title": "Best open source analytics tools", "url": "/articles/self-hosted-web-analytics" },
- { "title": "Cookieless analytics explained", "url": "/articles/cookieless-analytics" }
+ {
+ "title": "How to self-host OpenPanel",
+ "url": "/articles/how-to-self-host-openpanel"
+ },
+ {
+ "title": "Best open source analytics tools",
+ "url": "/articles/self-hosted-web-analytics"
+ },
+ {
+ "title": "Cookieless analytics explained",
+ "url": "/articles/cookieless-analytics"
+ }
],
"comparisons": [
- { "title": "OpenPanel vs PostHog", "url": "/compare/posthog-alternative" },
- { "title": "OpenPanel vs Plausible", "url": "/compare/plausible-alternative" },
+ {
+ "title": "OpenPanel vs PostHog",
+ "url": "/compare/posthog-alternative"
+ },
+ {
+ "title": "OpenPanel vs Plausible",
+ "url": "/compare/plausible-alternative"
+ },
{ "title": "OpenPanel vs Umami", "url": "/compare/umami-alternative" }
]
},
diff --git a/apps/public/content/for/ecommerce.json b/apps/public/content/for/ecommerce.json
index e93853487..0176d682c 100644
--- a/apps/public/content/for/ecommerce.json
+++ b/apps/public/content/for/ecommerce.json
@@ -142,17 +142,35 @@
},
"related_links": {
"guides": [
- { "title": "Ecommerce tracking setup", "url": "/guides/ecommerce-tracking" },
+ {
+ "title": "Ecommerce tracking setup",
+ "url": "/guides/ecommerce-tracking"
+ },
{ "title": "Track custom events", "url": "/guides/track-custom-events" }
],
"articles": [
- { "title": "Cookieless analytics explained", "url": "/articles/cookieless-analytics" },
- { "title": "Open source analytics tools survey", "url": "/articles/self-hosted-web-analytics" }
+ {
+ "title": "Cookieless analytics explained",
+ "url": "/articles/cookieless-analytics"
+ },
+ {
+ "title": "Open source analytics tools survey",
+ "url": "/articles/self-hosted-web-analytics"
+ }
],
"comparisons": [
- { "title": "OpenPanel vs Google Analytics", "url": "/compare/google-analytics-alternative" },
- { "title": "OpenPanel vs Mixpanel", "url": "/compare/mixpanel-alternative" },
- { "title": "OpenPanel vs Plausible", "url": "/compare/plausible-alternative" }
+ {
+ "title": "OpenPanel vs Google Analytics",
+ "url": "/compare/google-analytics-alternative"
+ },
+ {
+ "title": "OpenPanel vs Mixpanel",
+ "url": "/compare/mixpanel-alternative"
+ },
+ {
+ "title": "OpenPanel vs Plausible",
+ "url": "/compare/plausible-alternative"
+ }
]
},
"ctas": {
diff --git a/apps/public/content/for/gdpr-compliant.json b/apps/public/content/for/gdpr-compliant.json
index b299c885b..2f2213737 100644
--- a/apps/public/content/for/gdpr-compliant.json
+++ b/apps/public/content/for/gdpr-compliant.json
@@ -138,21 +138,39 @@
},
"related_links": {
"guides": [
- { "title": "Website analytics setup", "url": "/guides/website-analytics-setup" },
+ {
+ "title": "Website analytics setup",
+ "url": "/guides/website-analytics-setup"
+ },
{ "title": "Track custom events", "url": "/guides/track-custom-events" }
],
"articles": [
- { "title": "Self-hosted analytics without DPAs: GDPR, HIPAA, CCPA guide", "url": "/articles/better-compliance-self-hosted-analytics" },
- { "title": "Cookieless analytics", "url": "/articles/cookieless-analytics" },
- { "title": "Self-hosted web analytics: head-to-head buyer's guide", "url": "/articles/self-hosted-web-analytics" }
+ {
+ "title": "Self-hosted analytics without DPAs: GDPR, HIPAA, CCPA guide",
+ "url": "/articles/better-compliance-self-hosted-analytics"
+ },
+ {
+ "title": "Cookieless analytics",
+ "url": "/articles/cookieless-analytics"
+ },
+ {
+ "title": "Self-hosted web analytics: head-to-head buyer's guide",
+ "url": "/articles/self-hosted-web-analytics"
+ }
],
"audiences": [
{ "title": "For SaaS teams", "url": "/for/saas" },
{ "title": "For WordPress", "url": "/for/wordpress" }
],
"comparisons": [
- { "title": "OpenPanel vs Google Analytics", "url": "/compare/google-analytics-alternative" },
- { "title": "OpenPanel vs Plausible", "url": "/compare/plausible-alternative" },
+ {
+ "title": "OpenPanel vs Google Analytics",
+ "url": "/compare/google-analytics-alternative"
+ },
+ {
+ "title": "OpenPanel vs Plausible",
+ "url": "/compare/plausible-alternative"
+ },
{ "title": "OpenPanel vs Matomo", "url": "/compare/matomo-alternative" }
]
},
diff --git a/apps/public/content/for/nextjs.json b/apps/public/content/for/nextjs.json
index b4925fcc2..6fafc1f72 100644
--- a/apps/public/content/for/nextjs.json
+++ b/apps/public/content/for/nextjs.json
@@ -135,10 +135,16 @@
{ "title": "Track custom events", "url": "/guides/track-custom-events" }
],
"articles": [
- { "title": "Self-hosted web analytics", "url": "/articles/self-hosted-web-analytics" }
+ {
+ "title": "Self-hosted web analytics",
+ "url": "/articles/self-hosted-web-analytics"
+ }
],
"comparisons": [
- { "title": "OpenPanel vs Google Analytics", "url": "/compare/google-analytics-alternative" },
+ {
+ "title": "OpenPanel vs Google Analytics",
+ "url": "/compare/google-analytics-alternative"
+ },
{ "title": "OpenPanel vs PostHog", "url": "/compare/posthog-alternative" }
]
},
diff --git a/apps/public/content/for/saas.json b/apps/public/content/for/saas.json
index 4269364d0..f68850529 100644
--- a/apps/public/content/for/saas.json
+++ b/apps/public/content/for/saas.json
@@ -143,13 +143,28 @@
{ "title": "React analytics setup", "url": "/guides/react-analytics" }
],
"articles": [
- { "title": "How to create a funnel", "url": "/articles/how-to-create-a-funnel" },
- { "title": "Self-hosted web analytics", "url": "/articles/self-hosted-web-analytics" }
+ {
+ "title": "How to create a funnel",
+ "url": "/articles/how-to-create-a-funnel"
+ },
+ {
+ "title": "Self-hosted web analytics",
+ "url": "/articles/self-hosted-web-analytics"
+ }
],
"comparisons": [
- { "title": "OpenPanel vs Mixpanel", "url": "/compare/mixpanel-alternative" },
- { "title": "OpenPanel vs PostHog", "url": "/compare/posthog-alternative" },
- { "title": "OpenPanel vs Amplitude", "url": "/compare/amplitude-alternative" }
+ {
+ "title": "OpenPanel vs Mixpanel",
+ "url": "/compare/mixpanel-alternative"
+ },
+ {
+ "title": "OpenPanel vs PostHog",
+ "url": "/compare/posthog-alternative"
+ },
+ {
+ "title": "OpenPanel vs Amplitude",
+ "url": "/compare/amplitude-alternative"
+ }
]
},
"ctas": {
diff --git a/apps/public/content/for/shopify.json b/apps/public/content/for/shopify.json
index 32202b98a..36916a2df 100644
--- a/apps/public/content/for/shopify.json
+++ b/apps/public/content/for/shopify.json
@@ -134,15 +134,30 @@
},
"related_links": {
"guides": [
- { "title": "Ecommerce tracking setup", "url": "/guides/ecommerce-tracking" }
+ {
+ "title": "Ecommerce tracking setup",
+ "url": "/guides/ecommerce-tracking"
+ }
],
"articles": [
- { "title": "Cookieless analytics explained", "url": "/articles/cookieless-analytics" },
- { "title": "Best open source analytics tools", "url": "/articles/self-hosted-web-analytics" }
+ {
+ "title": "Cookieless analytics explained",
+ "url": "/articles/cookieless-analytics"
+ },
+ {
+ "title": "Best open source analytics tools",
+ "url": "/articles/self-hosted-web-analytics"
+ }
],
"comparisons": [
- { "title": "OpenPanel vs Google Analytics", "url": "/compare/google-analytics-alternative" },
- { "title": "OpenPanel vs Plausible", "url": "/compare/plausible-alternative" }
+ {
+ "title": "OpenPanel vs Google Analytics",
+ "url": "/compare/google-analytics-alternative"
+ },
+ {
+ "title": "OpenPanel vs Plausible",
+ "url": "/compare/plausible-alternative"
+ }
]
},
"ctas": {
diff --git a/apps/public/content/for/startups.json b/apps/public/content/for/startups.json
index 76501b5af..ed54c6fd9 100644
--- a/apps/public/content/for/startups.json
+++ b/apps/public/content/for/startups.json
@@ -152,17 +152,38 @@
"guides": [
{ "title": "Next.js analytics setup", "url": "/guides/nextjs-analytics" },
{ "title": "React analytics setup", "url": "/guides/react-analytics" },
- { "title": "Migrate from Google Analytics", "url": "/guides/migrate-from-google-analytics" }
+ {
+ "title": "Migrate from Google Analytics",
+ "url": "/guides/migrate-from-google-analytics"
+ }
],
"articles": [
- { "title": "Best open source analytics tools", "url": "/articles/self-hosted-web-analytics" },
- { "title": "How to create a funnel", "url": "/articles/how-to-create-a-funnel" },
- { "title": "Cookieless analytics guide", "url": "/articles/cookieless-analytics" }
+ {
+ "title": "Best open source analytics tools",
+ "url": "/articles/self-hosted-web-analytics"
+ },
+ {
+ "title": "How to create a funnel",
+ "url": "/articles/how-to-create-a-funnel"
+ },
+ {
+ "title": "Cookieless analytics guide",
+ "url": "/articles/cookieless-analytics"
+ }
],
"comparisons": [
- { "title": "OpenPanel vs Mixpanel", "url": "/compare/mixpanel-alternative" },
- { "title": "OpenPanel vs PostHog", "url": "/compare/posthog-alternative" },
- { "title": "OpenPanel vs Amplitude", "url": "/compare/amplitude-alternative" }
+ {
+ "title": "OpenPanel vs Mixpanel",
+ "url": "/compare/mixpanel-alternative"
+ },
+ {
+ "title": "OpenPanel vs PostHog",
+ "url": "/compare/posthog-alternative"
+ },
+ {
+ "title": "OpenPanel vs Amplitude",
+ "url": "/compare/amplitude-alternative"
+ }
]
},
"ctas": {
diff --git a/apps/public/content/for/wordpress.json b/apps/public/content/for/wordpress.json
index 69ac8563c..ea3c835f3 100644
--- a/apps/public/content/for/wordpress.json
+++ b/apps/public/content/for/wordpress.json
@@ -130,17 +130,38 @@
},
"related_links": {
"guides": [
- { "title": "Ecommerce tracking setup", "url": "/guides/ecommerce-tracking" },
- { "title": "Website analytics setup", "url": "/guides/website-analytics-setup" },
- { "title": "OpenPanel WordPress plugin", "url": "https://sv.wordpress.org/plugins/openpanel/" }
+ {
+ "title": "Ecommerce tracking setup",
+ "url": "/guides/ecommerce-tracking"
+ },
+ {
+ "title": "Website analytics setup",
+ "url": "/guides/website-analytics-setup"
+ },
+ {
+ "title": "OpenPanel WordPress plugin",
+ "url": "https://sv.wordpress.org/plugins/openpanel/"
+ }
],
"articles": [
- { "title": "Cookieless analytics explained", "url": "/articles/cookieless-analytics" },
- { "title": "How to self-host OpenPanel", "url": "/articles/self-hosted-web-analytics" }
+ {
+ "title": "Cookieless analytics explained",
+ "url": "/articles/cookieless-analytics"
+ },
+ {
+ "title": "How to self-host OpenPanel",
+ "url": "/articles/self-hosted-web-analytics"
+ }
],
"comparisons": [
- { "title": "OpenPanel vs Google Analytics", "url": "/compare/google-analytics-alternative" },
- { "title": "OpenPanel vs Plausible", "url": "/compare/plausible-alternative" },
+ {
+ "title": "OpenPanel vs Google Analytics",
+ "url": "/compare/google-analytics-alternative"
+ },
+ {
+ "title": "OpenPanel vs Plausible",
+ "url": "/compare/plausible-alternative"
+ },
{ "title": "OpenPanel vs Matomo", "url": "/compare/matomo-alternative" }
]
},
diff --git a/apps/public/source.config.ts b/apps/public/source.config.ts
index a967cef5a..1e1f3df84 100644
--- a/apps/public/source.config.ts
+++ b/apps/public/source.config.ts
@@ -49,7 +49,7 @@ const zGuide = z.object({
z.object({
name: z.string(),
anchor: z.string(),
- }),
+ })
),
});
diff --git a/apps/public/src/app/(content)/articles/[articleSlug]/page.tsx b/apps/public/src/app/(content)/articles/[articleSlug]/page.tsx
index c689c4208..14eabf814 100644
--- a/apps/public/src/app/(content)/articles/[articleSlug]/page.tsx
+++ b/apps/public/src/app/(content)/articles/[articleSlug]/page.tsx
@@ -63,8 +63,7 @@ export default async function Page({
const relatedArticles = (await articleSource.getPages())
.filter(
- (item) =>
- item.data.tag === article?.data.tag && item.url !== article?.url,
+ (item) => item.data.tag === article?.data.tag && item.url !== article?.url
)
.sort((a, b) => b.data.date.getTime() - a.data.date.getTime());
diff --git a/apps/public/src/app/(content)/articles/page.tsx b/apps/public/src/app/(content)/articles/page.tsx
index 452a935d2..c23c9849c 100644
--- a/apps/public/src/app/(content)/articles/page.tsx
+++ b/apps/public/src/app/(content)/articles/page.tsx
@@ -20,7 +20,7 @@ export const metadata: Metadata = getPageMetadata({
export default async function Page() {
const articles = (await articleSource.getPages()).sort(
- (a, b) => b.data.date.getTime() - a.data.date.getTime(),
+ (a, b) => b.data.date.getTime() - a.data.date.getTime()
);
return (
<div>
diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/compare-overview.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/compare-overview.tsx
index 77f1fe7b2..2a8619560 100644
--- a/apps/public/src/app/(content)/compare/[slug]/_components/compare-overview.tsx
+++ b/apps/public/src/app/(content)/compare/[slug]/_components/compare-overview.tsx
@@ -9,9 +9,7 @@ export function CompareOverview({ overview }: CompareOverviewProps) {
return (
<Section className="container">
<article className="col gap-6 max-w-3xl">
- <h2 className="text-3xl md:text-4xl font-semibold">
- {overview.title}
- </h2>
+ <h2 className="text-3xl md:text-4xl font-semibold">{overview.title}</h2>
<div className="col gap-4">
{overview.paragraphs.map((paragraph) => (
<p
diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/compare-toc.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/compare-toc.tsx
index e5ae542bf..93f7c5ad0 100644
--- a/apps/public/src/app/(content)/compare/[slug]/_components/compare-toc.tsx
+++ b/apps/public/src/app/(content)/compare/[slug]/_components/compare-toc.tsx
@@ -24,7 +24,7 @@ export function CompareToc({ items, className }: CompareTocProps) {
className={cn(
'hidden md:block sticky top-24 h-fit w-64 shrink-0',
'col gap-3 p-4 rounded-xl border bg-background/50 backdrop-blur-sm',
- className,
+ className
)}
>
<nav className="col gap-1">
diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/comparison-table.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/comparison-table.tsx
index 1539f6b61..317395a66 100644
--- a/apps/public/src/app/(content)/compare/[slug]/_components/comparison-table.tsx
+++ b/apps/public/src/app/(content)/compare/[slug]/_components/comparison-table.tsx
@@ -40,7 +40,7 @@ export function ComparisonTable({
openpanel: feature.openpanel,
competitor: feature.competitor,
notes: feature.notes,
- })),
+ }))
);
const allRows = [
@@ -67,7 +67,9 @@ export function ComparisonTable({
<tr className="border-b bg-muted/30">
<th className="text-left p-4 font-semibold">Feature</th>
<th className="text-left p-4 font-semibold">OpenPanel</th>
- <th className="text-left p-4 font-semibold">{competitorName}</th>
+ <th className="text-left p-4 font-semibold">
+ {competitorName}
+ </th>
</tr>
</thead>
<tbody>
@@ -106,4 +108,3 @@ export function ComparisonTable({
</Section>
);
}
-
diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/feature-comparison.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/feature-comparison.tsx
index eb8730cff..e3dc8d125 100644
--- a/apps/public/src/app/(content)/compare/[slug]/_components/feature-comparison.tsx
+++ b/apps/public/src/app/(content)/compare/[slug]/_components/feature-comparison.tsx
@@ -47,7 +47,9 @@ export function FeatureComparison({ featureGroups }: FeatureComparisonProps) {
key={feature.name}
className="grid md:grid-cols-3 gap-4 py-3 border-b last:border-b-0"
>
- <div className="font-medium text-sm">{feature.name}</div>
+ <div className="font-medium text-sm">
+ {feature.name}
+ </div>
<div className="row gap-2 items-center">
{renderFeatureValue(feature.openpanel)}
</div>
@@ -66,4 +68,3 @@ export function FeatureComparison({ featureGroups }: FeatureComparisonProps) {
</Section>
);
}
-
diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/features-showcase.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/features-showcase.tsx
index 0d38623d4..783197264 100644
--- a/apps/public/src/app/(content)/compare/[slug]/_components/features-showcase.tsx
+++ b/apps/public/src/app/(content)/compare/[slug]/_components/features-showcase.tsx
@@ -33,7 +33,7 @@ export function FeaturesShowcase({ featureComparison }: FeaturesShowcaseProps) {
.filter(
(f) =>
f.openpanel === true ||
- (typeof f.openpanel === 'string' && f.openpanel.toLowerCase() !== 'no'),
+ (typeof f.openpanel === 'string' && f.openpanel.toLowerCase() !== 'no')
)
.slice(0, 8);
@@ -60,4 +60,3 @@ export function FeaturesShowcase({ featureComparison }: FeaturesShowcaseProps) {
</Section>
);
}
-
diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/highlights-grid.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/highlights-grid.tsx
index e87be025d..d3b0dcad4 100644
--- a/apps/public/src/app/(content)/compare/[slug]/_components/highlights-grid.tsx
+++ b/apps/public/src/app/(content)/compare/[slug]/_components/highlights-grid.tsx
@@ -54,4 +54,3 @@ export function HighlightsGrid({ highlights }: HighlightsGridProps) {
</Section>
);
}
-
diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/migration-section.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/migration-section.tsx
index d36602abb..a079e12d2 100644
--- a/apps/public/src/app/(content)/compare/[slug]/_components/migration-section.tsx
+++ b/apps/public/src/app/(content)/compare/[slug]/_components/migration-section.tsx
@@ -15,7 +15,7 @@ export function MigrationSection({ migration }: MigrationSectionProps) {
description={migration.intro}
variant="sm"
/>
-
+
{/* Difficulty and time */}
<div className="row gap-6 mt-8">
<div className="col gap-2">
@@ -44,7 +44,9 @@ export function MigrationSection({ migration }: MigrationSectionProps) {
</div>
<div className="col gap-1 flex-1">
<h3 className="font-semibold">{step.title}</h3>
- <p className="text-sm text-muted-foreground">{step.description}</p>
+ <p className="text-sm text-muted-foreground">
+ {step.description}
+ </p>
</div>
</div>
</div>
@@ -58,7 +60,9 @@ export function MigrationSection({ migration }: MigrationSectionProps) {
<CheckIcon className="size-5 text-green-500" />
<h3 className="font-semibold">SDK Compatibility</h3>
</div>
- <p className="text-sm text-muted-foreground">{migration.sdk_compatibility.notes}</p>
+ <p className="text-sm text-muted-foreground">
+ {migration.sdk_compatibility.notes}
+ </p>
</div>
</div>
@@ -73,10 +77,11 @@ export function MigrationSection({ migration }: MigrationSectionProps) {
)}
<h3 className="font-semibold">Historical Data Import</h3>
</div>
- <p className="text-sm text-muted-foreground">{migration.historical_data.notes}</p>
+ <p className="text-sm text-muted-foreground">
+ {migration.historical_data.notes}
+ </p>
</div>
</div>
</Section>
);
}
-
diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/pricing-comparison.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/pricing-comparison.tsx
index dc784ca91..7f4013980 100644
--- a/apps/public/src/app/(content)/compare/[slug]/_components/pricing-comparison.tsx
+++ b/apps/public/src/app/(content)/compare/[slug]/_components/pricing-comparison.tsx
@@ -66,7 +66,7 @@ export function PricingComparison({
key={row.feature}
className={cn(
'grid md:grid-cols-3 gap-4 p-6',
- index % 2 === 0 ? 'bg-muted/30' : 'bg-background',
+ index % 2 === 0 ? 'bg-muted/30' : 'bg-background'
)}
>
<div className="font-semibold text-sm md:text-base">
diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/pricing-section.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/pricing-section.tsx
index 5b25ffded..68d166b52 100644
--- a/apps/public/src/app/(content)/compare/[slug]/_components/pricing-section.tsx
+++ b/apps/public/src/app/(content)/compare/[slug]/_components/pricing-section.tsx
@@ -109,9 +109,7 @@ export function PricingSection({
<span className="text-xs font-medium text-muted-foreground">
Free trial:
</span>
- <span className="text-xs text-muted-foreground">
- 30 days
- </span>
+ <span className="text-xs text-muted-foreground">30 days</span>
</div>
</motion.div>
</div>
@@ -187,4 +185,3 @@ export function PricingSection({
</Section>
);
}
-
diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/problem-section.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/problem-section.tsx
index 280d06f19..a0b46cedd 100644
--- a/apps/public/src/app/(content)/compare/[slug]/_components/problem-section.tsx
+++ b/apps/public/src/app/(content)/compare/[slug]/_components/problem-section.tsx
@@ -1,6 +1,11 @@
import { Section, SectionHeader } from '@/components/section';
import { CompareSummary } from '@/lib/compare';
-import { UsersIcon, TrendingUpIcon, PuzzleIcon, ShieldIcon } from 'lucide-react';
+import {
+ UsersIcon,
+ TrendingUpIcon,
+ PuzzleIcon,
+ ShieldIcon,
+} from 'lucide-react';
interface ProblemSectionProps {
summary: CompareSummary;
@@ -9,7 +14,10 @@ interface ProblemSectionProps {
const problemIcons = [UsersIcon, TrendingUpIcon, PuzzleIcon, ShieldIcon];
-export function ProblemSection({ summary, competitorName }: ProblemSectionProps) {
+export function ProblemSection({
+ summary,
+ competitorName,
+}: ProblemSectionProps) {
const problems = summary.best_for_competitor.slice(0, 4);
return (
@@ -35,4 +43,3 @@ export function ProblemSection({ summary, competitorName }: ProblemSectionProps)
</Section>
);
}
-
diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/related-links.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/related-links.tsx
index 3371f52f7..7e7192181 100644
--- a/apps/public/src/app/(content)/compare/[slug]/_components/related-links.tsx
+++ b/apps/public/src/app/(content)/compare/[slug]/_components/related-links.tsx
@@ -10,7 +10,9 @@ interface RelatedLinksProps {
export function RelatedLinksSection({ relatedLinks }: RelatedLinksProps) {
if (
!relatedLinks ||
- (!relatedLinks.guides?.length && !relatedLinks.articles?.length && !relatedLinks.alternatives?.length)
+ (!relatedLinks.guides?.length &&
+ !relatedLinks.articles?.length &&
+ !relatedLinks.alternatives?.length)
) {
return null;
}
diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/summary-comparison.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/summary-comparison.tsx
index a342f77e5..c24ec4a3f 100644
--- a/apps/public/src/app/(content)/compare/[slug]/_components/summary-comparison.tsx
+++ b/apps/public/src/app/(content)/compare/[slug]/_components/summary-comparison.tsx
@@ -8,7 +8,10 @@ interface SummaryComparisonProps {
competitorName: string;
}
-export function SummaryComparison({ summary, competitorName }: SummaryComparisonProps) {
+export function SummaryComparison({
+ summary,
+ competitorName,
+}: SummaryComparisonProps) {
return (
<Section className="container">
<SectionHeader
@@ -49,4 +52,3 @@ export function SummaryComparison({ summary, competitorName }: SummaryComparison
</Section>
);
}
-
diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/technical-comparison.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/technical-comparison.tsx
index 9affb753c..79f6e3baf 100644
--- a/apps/public/src/app/(content)/compare/[slug]/_components/technical-comparison.tsx
+++ b/apps/public/src/app/(content)/compare/[slug]/_components/technical-comparison.tsx
@@ -41,7 +41,9 @@ export function TechnicalComparison({
<tr className="border-b bg-muted/30">
<th className="text-left p-4 font-semibold">Feature</th>
<th className="text-left p-4 font-semibold">OpenPanel</th>
- <th className="text-left p-4 font-semibold">{competitorName}</th>
+ <th className="text-left p-4 font-semibold">
+ {competitorName}
+ </th>
</tr>
</thead>
<tbody>
@@ -74,4 +76,3 @@ export function TechnicalComparison({
</Section>
);
}
-
diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/trust-compliance.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/trust-compliance.tsx
index 631001f5b..35d0f7d29 100644
--- a/apps/public/src/app/(content)/compare/[slug]/_components/trust-compliance.tsx
+++ b/apps/public/src/app/(content)/compare/[slug]/_components/trust-compliance.tsx
@@ -107,4 +107,3 @@ export function TrustCompliance({ trust }: TrustComplianceProps) {
</Section>
);
}
-
diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/use-cases.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/use-cases.tsx
index edfe1fafa..20b26e85e 100644
--- a/apps/public/src/app/(content)/compare/[slug]/_components/use-cases.tsx
+++ b/apps/public/src/app/(content)/compare/[slug]/_components/use-cases.tsx
@@ -17,7 +17,9 @@ export function UseCases({ useCases }: UseCasesProps) {
{useCases.items.map((useCase) => (
<div key={useCase.title} className="col gap-2 p-6 border rounded-2xl">
<h3 className="font-semibold">{useCase.title}</h3>
- <p className="text-sm text-muted-foreground">{useCase.description}</p>
+ <p className="text-sm text-muted-foreground">
+ {useCase.description}
+ </p>
</div>
))}
</div>
diff --git a/apps/public/src/app/(content)/compare/[slug]/_components/why-switch.tsx b/apps/public/src/app/(content)/compare/[slug]/_components/why-switch.tsx
index fe1d038c2..13ec8ec5d 100644
--- a/apps/public/src/app/(content)/compare/[slug]/_components/why-switch.tsx
+++ b/apps/public/src/app/(content)/compare/[slug]/_components/why-switch.tsx
@@ -52,4 +52,3 @@ export function WhySwitch({ summary }: WhySwitchProps) {
</Section>
);
}
-
diff --git a/apps/public/src/app/(content)/compare/_components/compare-card.tsx b/apps/public/src/app/(content)/compare/_components/compare-card.tsx
index ca28fc586..ada8d095b 100644
--- a/apps/public/src/app/(content)/compare/_components/compare-card.tsx
+++ b/apps/public/src/app/(content)/compare/_components/compare-card.tsx
@@ -46,4 +46,3 @@ export function CompareCard({
</Link>
);
}
-
diff --git a/apps/public/src/app/(content)/compare/page.tsx b/apps/public/src/app/(content)/compare/page.tsx
index 306cefa85..d62c6f693 100644
--- a/apps/public/src/app/(content)/compare/page.tsx
+++ b/apps/public/src/app/(content)/compare/page.tsx
@@ -28,7 +28,7 @@ const heroData = {
export default async function CompareIndexPage() {
const comparisons = compareSource.sort((a, b) =>
- a.competitor.name.localeCompare(b.competitor.name),
+ a.competitor.name.localeCompare(b.competitor.name)
);
return (
diff --git a/apps/public/src/app/(content)/features/[slug]/_components/capabilities.tsx b/apps/public/src/app/(content)/features/[slug]/_components/capabilities.tsx
index fa860be90..ecca97a70 100644
--- a/apps/public/src/app/(content)/features/[slug]/_components/capabilities.tsx
+++ b/apps/public/src/app/(content)/features/[slug]/_components/capabilities.tsx
@@ -9,7 +9,11 @@ interface CapabilitiesProps {
capabilities: FeatureCapability[];
}
-export function Capabilities({ title, intro, capabilities }: CapabilitiesProps) {
+export function Capabilities({
+ title,
+ intro,
+ capabilities,
+}: CapabilitiesProps) {
return (
<Section className="container">
<SectionHeader
diff --git a/apps/public/src/app/(content)/features/[slug]/_components/feature-use-cases.tsx b/apps/public/src/app/(content)/features/[slug]/_components/feature-use-cases.tsx
index c8d1275b0..79189e3cc 100644
--- a/apps/public/src/app/(content)/features/[slug]/_components/feature-use-cases.tsx
+++ b/apps/public/src/app/(content)/features/[slug]/_components/feature-use-cases.tsx
@@ -21,7 +21,9 @@ export function FeatureUseCasesSection({ useCases }: FeatureUseCasesProps) {
className="col gap-2 p-6 border rounded-2xl bg-card/50"
>
<h3 className="font-semibold">{useCase.title}</h3>
- <p className="text-sm text-muted-foreground">{useCase.description}</p>
+ <p className="text-sm text-muted-foreground">
+ {useCase.description}
+ </p>
</div>
))}
</div>
diff --git a/apps/public/src/app/(content)/features/[slug]/_components/how-it-works.tsx b/apps/public/src/app/(content)/features/[slug]/_components/how-it-works.tsx
index a8df4dd29..667060057 100644
--- a/apps/public/src/app/(content)/features/[slug]/_components/how-it-works.tsx
+++ b/apps/public/src/app/(content)/features/[slug]/_components/how-it-works.tsx
@@ -30,7 +30,9 @@ export function HowItWorks({ data }: HowItWorksProps) {
)}
</div>
<div className="flex-1 pt-1 min-w-0 pb-8">
- <h3 className="font-semibold text-foreground mb-1">{step.title}</h3>
+ <h3 className="font-semibold text-foreground mb-1">
+ {step.title}
+ </h3>
<p className={cn('text-muted-foreground text-sm')}>
{step.description}
</p>
diff --git a/apps/public/src/app/(content)/guides/[guideSlug]/page.tsx b/apps/public/src/app/(content)/guides/[guideSlug]/page.tsx
index 7c3eab989..a467fbeb5 100644
--- a/apps/public/src/app/(content)/guides/[guideSlug]/page.tsx
+++ b/apps/public/src/app/(content)/guides/[guideSlug]/page.tsx
@@ -77,7 +77,7 @@ export default async function Page({
.filter(
(item) =>
item.data.difficulty === guide?.data.difficulty &&
- item.url !== guide?.url,
+ item.url !== guide?.url
)
.sort((a, b) => b.data.date.getTime() - a.data.date.getTime())
.slice(0, 3);
diff --git a/apps/public/src/app/(content)/guides/page.tsx b/apps/public/src/app/(content)/guides/page.tsx
index f42e1e6db..175e5ea4e 100644
--- a/apps/public/src/app/(content)/guides/page.tsx
+++ b/apps/public/src/app/(content)/guides/page.tsx
@@ -19,7 +19,7 @@ export const metadata: Metadata = getPageMetadata({
export default async function Page() {
const guides = (await guideSource.getPages()).sort(
- (a, b) => b.data.date.getTime() - a.data.date.getTime(),
+ (a, b) => b.data.date.getTime() - a.data.date.getTime()
);
// Create ItemList schema for SEO
diff --git a/apps/public/src/app/(content)/pricing/page.tsx b/apps/public/src/app/(content)/pricing/page.tsx
index ff66f0f6d..8dc60d4bf 100644
--- a/apps/public/src/app/(content)/pricing/page.tsx
+++ b/apps/public/src/app/(content)/pricing/page.tsx
@@ -117,8 +117,8 @@ function ComparisonSection() {
const comparisons = compareSource
.filter((item) =>
['plausible', 'mixpanel', 'google', 'posthog', 'matomo', 'umami'].some(
- (name) => item.competitor.name.toLowerCase().includes(name),
- ),
+ (name) => item.competitor.name.toLowerCase().includes(name)
+ )
)
.sort((a, b) => a.competitor.name.localeCompare(b.competitor.name));
diff --git a/apps/public/src/app/(home)/_sections/cta-banner.tsx b/apps/public/src/app/(home)/_sections/cta-banner.tsx
index bc1038770..5c2ea0ef4 100644
--- a/apps/public/src/app/(home)/_sections/cta-banner.tsx
+++ b/apps/public/src/app/(home)/_sections/cta-banner.tsx
@@ -57,7 +57,7 @@ export function CtaBanner({
<div className="container">
<section
className={cn(
- 'relative overflow-hidden border rounded-3xl py-16 px-4 md:px-16',
+ 'relative overflow-hidden border rounded-3xl py-16 px-4 md:px-16'
)}
>
<div className="size-px absolute left-12 bottom-12 rounded-full shadow-[0_0_250px_80px_var(--color-foreground)]" />
diff --git a/apps/public/src/app/(home)/_sections/testimonials.tsx b/apps/public/src/app/(home)/_sections/testimonials.tsx
index 32a4bd358..fe266eabc 100644
--- a/apps/public/src/app/(home)/_sections/testimonials.tsx
+++ b/apps/public/src/app/(home)/_sections/testimonials.tsx
@@ -106,7 +106,7 @@ export function Testimonials() {
// Duplicate items to create the illusion of infinite scrolling
const duplicatedTestimonials = useMemo(
() => [...testimonials, ...testimonials],
- [],
+ []
);
useEffect(() => {
diff --git a/apps/public/src/app/api/headers/route.ts b/apps/public/src/app/api/headers/route.ts
index f9440fea0..dd589e993 100644
--- a/apps/public/src/app/api/headers/route.ts
+++ b/apps/public/src/app/api/headers/route.ts
@@ -23,7 +23,7 @@ export const GET = function POST(req: Request) {
}
return acc;
},
- {} as Record<string, string>,
+ {} as Record<string, string>
),
});
};
diff --git a/apps/public/src/app/docs/api-reference/[[...slug]]/page.tsx b/apps/public/src/app/docs/api-reference/[[...slug]]/page.tsx
index 71dac17c1..ca0fdb34e 100644
--- a/apps/public/src/app/docs/api-reference/[[...slug]]/page.tsx
+++ b/apps/public/src/app/docs/api-reference/[[...slug]]/page.tsx
@@ -49,7 +49,9 @@ export default async function Page(props: PageProps) {
}
// OpenAPI generated page
- const { getAPIPageProps } = data as { getAPIPageProps: () => React.ComponentProps<typeof APIPage> };
+ const { getAPIPageProps } = data as {
+ getAPIPageProps: () => React.ComponentProps<typeof APIPage>;
+ };
return (
<DocsPage>
<DocsTitle>{page.data.title}</DocsTitle>
diff --git a/apps/public/src/app/dpa/download/page.tsx b/apps/public/src/app/dpa/download/page.tsx
index 23012f3e7..574cf4df2 100644
--- a/apps/public/src/app/dpa/download/page.tsx
+++ b/apps/public/src/app/dpa/download/page.tsx
@@ -102,11 +102,11 @@ export default function DpaDownloadPage() {
<p className="mb-3 text-gray-700 text-sm">
OpenPanel optionally supports session replay, which must be
explicitly enabled by the Controller. When enabled, session replay
- records DOM snapshots and user interactions (mouse movements, clicks,
- scrolls) using rrweb. All text content and form inputs are masked by
- default. The Controller is responsible for ensuring their use of
- session replay complies with applicable privacy law, including
- providing appropriate notice to end users.
+ records DOM snapshots and user interactions (mouse movements,
+ clicks, scrolls) using rrweb. All text content and form inputs are
+ masked by default. The Controller is responsible for ensuring their
+ use of session replay complies with applicable privacy law,
+ including providing appropriate notice to end users.
</p>
<p className="mb-1 text-gray-700 text-sm font-semibold">
AI features (optional, opt-in)
@@ -415,10 +415,11 @@ export default function DpaDownloadPage() {
permanently deleted.
</li>
<li>
- The Controller can delete individual projects, all associated data,
- or their entire account at any time from within the dashboard. Upon
- account termination, OpenPanel will delete the Controller's data
- within 30 days unless required by law to retain it longer.
+ The Controller can delete individual projects, all associated
+ data, or their entire account at any time from within the
+ dashboard. Upon account termination, OpenPanel will delete the
+ Controller's data within 30 days unless required by law to retain
+ it longer.
</li>
</ul>
</Section>
diff --git a/apps/public/src/app/global.css b/apps/public/src/app/global.css
index 7a6310a29..d7a21e519 100644
--- a/apps/public/src/app/global.css
+++ b/apps/public/src/app/global.css
@@ -1,7 +1,7 @@
-@import 'tailwindcss';
-@import 'fumadocs-ui/css/neutral.css';
-@import 'fumadocs-ui/css/preset.css';
-@import 'fumadocs-openapi/css/preset.css';
+@import "tailwindcss";
+@import "fumadocs-ui/css/neutral.css";
+@import "fumadocs-ui/css/preset.css";
+@import "fumadocs-openapi/css/preset.css";
@custom-variant dark (&:is(.dark *));
@custom-variant light (&:is(.light *));
@@ -15,7 +15,7 @@ body {
code {
font-family:
- source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
+ source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
}
:root {
@@ -58,10 +58,10 @@ code {
@utility container {
@apply mx-auto px-4;
@media (width >= 40rem) {
- @apply max-w-[1000px]
+ @apply max-w-[1000px];
}
}
-
+
.dark {
--background: oklch(0.145 0 0);
--foreground: oklch(0.985 0 0);
@@ -130,13 +130,16 @@ code {
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
--color-sidebar-border: var(--sidebar-border);
--color-sidebar-ring: var(--sidebar-ring);
-
+
/* Fonts */
- --font-family-mono: var(--font-mono), ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
+ --font-family-mono:
+ var(--font-mono), ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco,
+ Consolas, "Liberation Mono", "Courier New", monospace;
/* Scroll animations */
- --animate-scroll: scroll var(--animation-duration, 40s) var(--animation-direction, forwards) linear infinite;
-
+ --animate-scroll: scroll var(--animation-duration, 40s)
+ var(--animation-direction, forwards) linear infinite;
+
@keyframes scroll {
to {
transform: translate(calc(-50% - 0.5rem));
@@ -184,26 +187,26 @@ code {
padding: 16px;
}
.line-before:before {
- content: '';
+ content: "";
display: block;
position: absolute;
- top: calc(4px*-32);
- bottom: calc(4px*-32);
+ top: calc(4px * -32);
+ bottom: calc(4px * -32);
left: 0;
width: 1px;
- background: hsl(var(--foreground)/0.1);
+ background: hsl(var(--foreground) / 0.1);
}
.line-after {
position: relative;
padding: 16px;
}
.line-after:after {
- content: '';
+ content: "";
display: block;
position: absolute;
- top: calc(4px*-32);
- bottom: calc(4px*-32);
+ top: calc(4px * -32);
+ bottom: calc(4px * -32);
right: 0;
width: 1px;
- background: hsl(var(--foreground)/0.1);
+ background: hsl(var(--foreground) / 0.1);
}
diff --git a/apps/public/src/app/llms-full.txt/route.ts b/apps/public/src/app/llms-full.txt/route.ts
index 53ba1216b..27e3a4f43 100644
--- a/apps/public/src/app/llms-full.txt/route.ts
+++ b/apps/public/src/app/llms-full.txt/route.ts
@@ -16,7 +16,10 @@ This file contains the full text of all documentation pages. Each section is sep
`;
export async function GET() {
- const pages = source.getPages().slice().sort((a, b) => a.url.localeCompare(b.url));
+ const pages = source
+ .getPages()
+ .slice()
+ .sort((a, b) => a.url.localeCompare(b.url));
const scanned = await Promise.all(pages.map(getLLMText));
return new Response(header + scanned.join('\n\n'), {
diff --git a/apps/public/src/app/md/route.ts b/apps/public/src/app/md/route.ts
index e65b5b1ae..f9a133d29 100644
--- a/apps/public/src/app/md/route.ts
+++ b/apps/public/src/app/md/route.ts
@@ -133,7 +133,7 @@ export async function GET(request: Request) {
stubMarkdown(`${OPENPANEL_BASE_URL}/${segment}`, path),
{
headers: { 'Content-Type': 'text/markdown; charset=utf-8' },
- },
+ }
);
}
}
@@ -142,7 +142,7 @@ export async function GET(request: Request) {
stubMarkdown(`${OPENPANEL_BASE_URL}/${segment}`, path),
{
headers: { 'Content-Type': 'text/markdown; charset=utf-8' },
- },
+ }
);
}
}
diff --git a/apps/public/src/app/tools/ip-lookup/page.tsx b/apps/public/src/app/tools/ip-lookup/page.tsx
index dd6a665b0..297be402b 100644
--- a/apps/public/src/app/tools/ip-lookup/page.tsx
+++ b/apps/public/src/app/tools/ip-lookup/page.tsx
@@ -56,7 +56,7 @@ export default function IPLookupPage() {
if (response.status === 429) {
setIsRateLimited(true);
throw new Error(
- 'Rate limit exceeded. Please wait a minute before trying again.',
+ 'Rate limit exceeded. Please wait a minute before trying again.'
);
}
setIsRateLimited(false);
@@ -86,7 +86,7 @@ export default function IPLookupPage() {
try {
const response = await fetch(
- `${API_URL}/tools/ip-lookup?ip=${encodeURIComponent(ip.trim())}`,
+ `${API_URL}/tools/ip-lookup?ip=${encodeURIComponent(ip.trim())}`
);
const data = await response.json();
@@ -94,7 +94,7 @@ export default function IPLookupPage() {
if (response.status === 429) {
setIsRateLimited(true);
throw new Error(
- 'Rate limit exceeded. Please wait a minute before trying again.',
+ 'Rate limit exceeded. Please wait a minute before trying again.'
);
}
setIsRateLimited(false);
@@ -188,7 +188,7 @@ export default function IPLookupPage() {
'mt-4 p-4 rounded-lg border',
isRateLimited
? 'bg-amber-500/10 border-amber-500/20 text-amber-600 dark:text-amber-400'
- : 'bg-destructive/10 border-destructive/20 text-destructive',
+ : 'bg-destructive/10 border-destructive/20 text-destructive'
)}
>
<div className="flex items-start gap-2">
diff --git a/apps/public/src/app/tools/tools-sidebar.tsx b/apps/public/src/app/tools/tools-sidebar.tsx
index fea47ea29..dea8196b0 100644
--- a/apps/public/src/app/tools/tools-sidebar.tsx
+++ b/apps/public/src/app/tools/tools-sidebar.tsx
@@ -23,7 +23,7 @@ export default function ToolsSidebar(): React.ReactElement {
'flex items-start gap-3 p-3 rounded-lg transition-colors',
isActive
? 'bg-accent text-accent-foreground'
- : 'hover:bg-accent/50 text-muted-foreground hover:text-foreground',
+ : 'hover:bg-accent/50 text-muted-foreground hover:text-foreground'
)}
>
<Icon className="size-5 shrink-0 mt-0.5" />
diff --git a/apps/public/src/app/tools/url-checker/page.tsx b/apps/public/src/app/tools/url-checker/page.tsx
index 2d26c810f..0bed2acbc 100644
--- a/apps/public/src/app/tools/url-checker/page.tsx
+++ b/apps/public/src/app/tools/url-checker/page.tsx
@@ -114,7 +114,7 @@ export default function SiteCheckerPage() {
try {
const response = await fetch(
- `${API_URL}/tools/site-checker?url=${encodeURIComponent(url)}`,
+ `${API_URL}/tools/site-checker?url=${encodeURIComponent(url)}`
);
const data = await response.json();
@@ -122,7 +122,7 @@ export default function SiteCheckerPage() {
if (response.status === 429) {
setIsRateLimited(true);
throw new Error(
- 'Rate limit exceeded. Please wait a minute before trying again.',
+ 'Rate limit exceeded. Please wait a minute before trying again.'
);
}
setIsRateLimited(false);
@@ -233,7 +233,7 @@ export default function SiteCheckerPage() {
'mt-4 p-4 rounded-lg border',
isRateLimited
? 'bg-amber-500/10 border-amber-500/20 text-amber-600 dark:text-amber-400'
- : 'bg-destructive/10 border-destructive/20 text-destructive',
+ : 'bg-destructive/10 border-destructive/20 text-destructive'
)}
>
<div className="flex items-start gap-2">
@@ -293,7 +293,7 @@ export default function SiteCheckerPage() {
'flex items-center gap-2 px-4 py-2 text-sm font-medium border-b-2 transition-colors',
activeTab === tab.id
? 'border-foreground text-foreground'
- : 'border-transparent text-muted-foreground hover:text-foreground',
+ : 'border-transparent text-muted-foreground hover:text-foreground'
)}
>
{tab.icon}
@@ -543,7 +543,7 @@ export default function SiteCheckerPage() {
: result.technical.statusCode >= 300 &&
result.technical.statusCode < 400
? 'text-amber-600 dark:text-amber-400'
- : 'text-destructive',
+ : 'text-destructive'
)}
>
{result.technical.statusCode}
@@ -589,7 +589,7 @@ export default function SiteCheckerPage() {
? 'text-emerald-600 dark:text-emerald-400'
: result.technical.responseTime.total < 3000
? 'text-amber-600 dark:text-amber-400'
- : 'text-destructive',
+ : 'text-destructive'
)}
>
{result.technical.responseTime.total}ms total
@@ -660,7 +660,7 @@ export default function SiteCheckerPage() {
<div className="text-xs text-muted-foreground mt-1">
Expires:{' '}
{new Date(
- result.technical.ssl.expires,
+ result.technical.ssl.expires
).toLocaleDateString()}
</div>
</div>
@@ -698,11 +698,11 @@ export default function SiteCheckerPage() {
result.hosting.location.longitude && (
<div className="text-xs text-muted-foreground mt-1">
{result.hosting.location.latitude.toFixed(
- 4,
+ 4
)}
,{' '}
{result.hosting.location.longitude.toFixed(
- 4,
+ 4
)}
</div>
)}
@@ -807,7 +807,7 @@ export default function SiteCheckerPage() {
? 'bg-emerald-600 dark:bg-emerald-400'
: result.security.score >= 40
? 'bg-amber-600 dark:bg-amber-400'
- : 'bg-destructive',
+ : 'bg-destructive'
)}
style={{ width: `${result.security.score}%` }}
/>
diff --git a/apps/public/src/components/feature-card.tsx b/apps/public/src/components/feature-card.tsx
index bf5be5fc2..c11f424ab 100644
--- a/apps/public/src/components/feature-card.tsx
+++ b/apps/public/src/components/feature-card.tsx
@@ -1,4 +1,3 @@
-
import type { LucideIcon } from 'lucide-react';
import Link from 'next/link';
import { cn } from '@/lib/utils';
diff --git a/apps/public/src/components/figure.tsx b/apps/public/src/components/figure.tsx
index a720a3ba2..a5e6196f9 100644
--- a/apps/public/src/components/figure.tsx
+++ b/apps/public/src/components/figure.tsx
@@ -6,7 +6,12 @@ export function Figure({
alt,
caption,
className,
-}: { src: string; alt: string; caption: string; className?: string }) {
+}: {
+ src: string;
+ alt: string;
+ caption: string;
+ className?: string;
+}) {
return (
<figure className={cn('-mx-4', className)}>
<Image
diff --git a/apps/public/src/components/illustrations/mcp.tsx b/apps/public/src/components/illustrations/mcp.tsx
index 1d56b4b5b..d870f3a34 100644
--- a/apps/public/src/components/illustrations/mcp.tsx
+++ b/apps/public/src/components/illustrations/mcp.tsx
@@ -24,7 +24,8 @@ const toolCalls = [
];
// Response split into segments so highlights apply as text streams in
-const RESPONSE = 'Last week saw 1,234 new signups — up 23% from the week before. Your signup funnel is converting at 72%, the highest rate in the past month.';
+const RESPONSE =
+ 'Last week saw 1,234 new signups — up 23% from the week before. Your signup funnel is converting at 72%, the highest rate in the past month.';
type Phase = 'user' | 'thinking' | 'tool1' | 'tool2' | 'streaming' | 'done';
@@ -89,7 +90,10 @@ function StreamingText({ text, done }: { text: string; done: boolean }) {
const segments: { content: string; highlight?: 'white' | 'emerald' }[] = [
{ content: 'Last week saw ' },
{ content: '1,234 new signups', highlight: 'white' },
- { content: ' — up 23% from the week before. Your signup funnel is converting at ' },
+ {
+ content:
+ ' — up 23% from the week before. Your signup funnel is converting at ',
+ },
{ content: '72%', highlight: 'emerald' },
{ content: ', the highest rate in the past month.' },
];
@@ -105,15 +109,21 @@ function StreamingText({ text, done }: { text: string; done: boolean }) {
if (seg.highlight === 'white') {
rendered.push(
- <span key={seg.content} className={done ? 'font-semibold text-white/90' : 'text-white/70'}>
+ <span
+ key={seg.content}
+ className={done ? 'font-semibold text-white/90' : 'text-white/70'}
+ >
{visible}
- </span>,
+ </span>
);
} else if (seg.highlight === 'emerald') {
rendered.push(
- <span key={seg.content} className={done ? 'font-semibold text-emerald-400' : 'text-white/70'}>
+ <span
+ key={seg.content}
+ className={done ? 'font-semibold text-emerald-400' : 'text-white/70'}
+ >
{visible}
- </span>,
+ </span>
);
} else {
rendered.push(<span key={seg.content}>{visible}</span>);
@@ -188,9 +198,15 @@ export function McpIllustration() {
};
}, []);
- const showThinking = phase === 'thinking' || phase === 'tool1' || phase === 'tool2';
- const showTool1 = phase === 'tool1' || phase === 'tool2' || phase === 'streaming' || phase === 'done';
- const showTool2 = phase === 'tool2' || phase === 'streaming' || phase === 'done';
+ const showThinking =
+ phase === 'thinking' || phase === 'tool1' || phase === 'tool2';
+ const showTool1 =
+ phase === 'tool1' ||
+ phase === 'tool2' ||
+ phase === 'streaming' ||
+ phase === 'done';
+ const showTool2 =
+ phase === 'tool2' || phase === 'streaming' || phase === 'done';
const showResponse = phase === 'streaming' || phase === 'done';
return (
diff --git a/apps/public/src/components/illustrations/revenue.tsx b/apps/public/src/components/illustrations/revenue.tsx
index a6cc2b49c..8b2d37d73 100644
--- a/apps/public/src/components/illustrations/revenue.tsx
+++ b/apps/public/src/components/illustrations/revenue.tsx
@@ -26,7 +26,9 @@ export function RevenueIllustration() {
<span className="text-[9px] text-emerald-500">↑ 12% this month</span>
</div>
<div className="col flex-1 gap-1 rounded-xl border bg-card px-3 py-2">
- <span className="text-[9px] text-muted-foreground">MRR over time</span>
+ <span className="text-[9px] text-muted-foreground">
+ MRR over time
+ </span>
<SimpleChart
className="mt-1 flex-1"
height={36}
diff --git a/apps/public/src/components/illustrations/session-replay.tsx b/apps/public/src/components/illustrations/session-replay.tsx
index 90445dbcd..1dff9a00f 100644
--- a/apps/public/src/components/illustrations/session-replay.tsx
+++ b/apps/public/src/components/illustrations/session-replay.tsx
@@ -26,16 +26,10 @@ export function SessionReplayIllustration() {
<div className="h-2 w-24 rounded-full bg-muted/20" />
{/* Click heatspot */}
- <div
- className="absolute"
- style={{ left: '62%', top: '48%' }}
- >
+ <div className="absolute" style={{ left: '62%', top: '48%' }}>
<div className="h-4 w-4 animate-pulse rounded-full border-2 border-blue-500/70 bg-blue-500/20" />
</div>
- <div
- className="absolute"
- style={{ left: '25%', top: '32%' }}
- >
+ <div className="absolute" style={{ left: '25%', top: '32%' }}>
<div className="h-2.5 w-2.5 rounded-full border border-blue-500/40 bg-blue-500/25" />
</div>
@@ -59,7 +53,8 @@ export function SessionReplayIllustration() {
style={{
left: 'calc(18% + 8px)',
top: 'calc(22% + 6px)',
- animation: 'cursor-trail 4s cubic-bezier(0.4, 0, 0.2, 1) infinite',
+ animation:
+ 'cursor-trail 4s cubic-bezier(0.4, 0, 0.2, 1) infinite',
}}
>
<svg fill="none" height="12" viewBox="0 0 10 12" width="10">
diff --git a/apps/public/src/components/illustrations/web-analytics.tsx b/apps/public/src/components/illustrations/web-analytics.tsx
index 49651cb97..328881c6d 100644
--- a/apps/public/src/components/illustrations/web-analytics.tsx
+++ b/apps/public/src/components/illustrations/web-analytics.tsx
@@ -9,9 +9,21 @@ const DAYS = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];
const STATS = [
{ label: 'Visitors', value: 4128, formatted: null, change: 12, up: true },
- { label: 'Page views', value: 12438, formatted: '12.4k', change: 8, up: true },
+ {
+ label: 'Page views',
+ value: 12438,
+ formatted: '12.4k',
+ change: 8,
+ up: true,
+ },
{ label: 'Bounce rate', value: null, formatted: '42%', change: 3, up: false },
- { label: 'Avg. session', value: null, formatted: '3m 23s', change: 5, up: true },
+ {
+ label: 'Avg. session',
+ value: null,
+ formatted: '3m 23s',
+ change: 5,
+ up: true,
+ },
];
const SOURCES = [
@@ -38,7 +50,9 @@ function AreaChart({ data }: { data: number[] }) {
const h = 64;
const xStep = w / (data.length - 1);
const pts = data.map((v, i) => ({ x: i * xStep, y: h - (v / max) * h }));
- const line = pts.map((p, i) => `${i === 0 ? 'M' : 'L'} ${p.x},${p.y}`).join(' ');
+ const line = pts
+ .map((p, i) => `${i === 0 ? 'M' : 'L'} ${p.x},${p.y}`)
+ .join(' ');
const area = `${line} L ${w},${h} L 0,${h} Z`;
const last = pts[pts.length - 1];
@@ -111,7 +125,9 @@ export function WebAnalyticsIllustration() {
className="col gap-0.5 rounded-lg border bg-card px-2 py-1.5"
key={stat.label}
>
- <span className="text-[8px] text-muted-foreground">{stat.label}</span>
+ <span className="text-[8px] text-muted-foreground">
+ {stat.label}
+ </span>
<span className="font-mono font-semibold text-xs leading-tight">
{stat.formatted ??
(stat.value !== null ? (
@@ -129,7 +145,9 @@ export function WebAnalyticsIllustration() {
{/* Area chart */}
<div className="flex-1 col gap-1 overflow-hidden rounded-xl border bg-card px-3 pt-2 pb-1">
- <span className="text-[8px] text-muted-foreground">Unique visitors</span>
+ <span className="text-[8px] text-muted-foreground">
+ Unique visitors
+ </span>
<AreaChart data={VISITOR_DATA} />
<div className="row justify-between px-0.5">
{DAYS.map((d) => (
diff --git a/apps/public/src/components/infinite-moving-cards.tsx b/apps/public/src/components/infinite-moving-cards.tsx
index 5015282d6..580c771a6 100644
--- a/apps/public/src/components/infinite-moving-cards.tsx
+++ b/apps/public/src/components/infinite-moving-cards.tsx
@@ -47,12 +47,12 @@ export const InfiniteMovingCards = <T,>({
if (direction === 'left') {
containerRef.current.style.setProperty(
'--animation-direction',
- 'forwards',
+ 'forwards'
);
} else {
containerRef.current.style.setProperty(
'--animation-direction',
- 'reverse',
+ 'reverse'
);
}
}
@@ -74,7 +74,7 @@ export const InfiniteMovingCards = <T,>({
ref={containerRef}
className={cn(
'scroller relative z-20 overflow-hidden -ml-4 md:-ml-[1200px] w-screen md:w-[calc(100vw+1400px)]',
- className,
+ className
)}
>
<ul
@@ -82,7 +82,7 @@ export const InfiniteMovingCards = <T,>({
className={cn(
'flex min-w-full shrink-0 gap-8 py-4 w-max flex-nowrap items-start',
start && 'animate-scroll',
- pauseOnHover && 'hover:[animation-play-state:paused]',
+ pauseOnHover && 'hover:[animation-play-state:paused]'
)}
>
{items.map((item, idx) => (
diff --git a/apps/public/src/components/perks.tsx b/apps/public/src/components/perks.tsx
index 2f3140ffa..87f8140be 100644
--- a/apps/public/src/components/perks.tsx
+++ b/apps/public/src/components/perks.tsx
@@ -7,7 +7,10 @@ type PerkIcon = LucideIcon | React.ComponentType<{ className?: string }>;
export function Perks({
perks,
className,
-}: { perks: { text: string; icon: PerkIcon }[]; className?: string }) {
+}: {
+ perks: { text: string; icon: PerkIcon }[];
+ className?: string;
+}) {
return (
<ul className={cn('grid grid-cols-2 gap-2', className)}>
{perks.map((perk) => (
diff --git a/apps/public/src/components/pricing-slider.tsx b/apps/public/src/components/pricing-slider.tsx
index 31a52c772..1eb3ca6f7 100644
--- a/apps/public/src/components/pricing-slider.tsx
+++ b/apps/public/src/components/pricing-slider.tsx
@@ -44,7 +44,7 @@ export function PricingSlider() {
<span
className={cn(
'text-sm text-muted-foreground italic opacity-100',
- match.price === 0 && 'opacity-0',
+ match.price === 0 && 'opacity-0'
)}
>
+ VAT if applicable
diff --git a/apps/public/src/components/scroll-tracker.tsx b/apps/public/src/components/scroll-tracker.tsx
index 0238b2a2e..20a36f4f8 100644
--- a/apps/public/src/components/scroll-tracker.tsx
+++ b/apps/public/src/components/scroll-tracker.tsx
@@ -20,8 +20,7 @@ export function ScrollTracker() {
const scrollTop = window.scrollY;
const docHeight =
document.documentElement.scrollHeight - window.innerHeight;
- const percent =
- docHeight > 0 ? (scrollTop / docHeight) * 100 : 0;
+ const percent = docHeight > 0 ? (scrollTop / docHeight) * 100 : 0;
if (percent >= 50) {
hasFired.current = true;
diff --git a/apps/public/src/components/section.tsx b/apps/public/src/components/section.tsx
index 4f31a7afb..aaf5d590a 100644
--- a/apps/public/src/components/section.tsx
+++ b/apps/public/src/components/section.tsx
@@ -47,7 +47,7 @@ export function SectionHeader({
align === 'center'
? 'center-center text-center'
: 'items-start text-left',
- className,
+ className
)}
>
{label && <SectionLabel>{label}</SectionLabel>}
@@ -72,7 +72,7 @@ export function SectionLabel({
<span
className={cn(
'text-xs uppercase tracking-wider text-muted-foreground font-medium',
- className,
+ className
)}
>
{children}
diff --git a/apps/public/src/components/tag.tsx b/apps/public/src/components/tag.tsx
index 3508007b2..d812f48da 100644
--- a/apps/public/src/components/tag.tsx
+++ b/apps/public/src/components/tag.tsx
@@ -14,7 +14,7 @@ const tagVariants = cva(
defaultVariants: {
variant: 'light',
},
- },
+ }
);
interface TagProps
diff --git a/apps/public/src/components/ui/accordion.tsx b/apps/public/src/components/ui/accordion.tsx
index 64189bf96..bf8888a32 100644
--- a/apps/public/src/components/ui/accordion.tsx
+++ b/apps/public/src/components/ui/accordion.tsx
@@ -35,7 +35,7 @@ const AccordionTrigger = ({
ref={ref}
className={cn(
'group relative overflow-hidden flex flex-1 items-center justify-between py-4 font-medium transition-all [&[data-state=open]>svg]:rotate-180 cursor-pointer',
- className,
+ className
)}
{...props}
>
@@ -63,7 +63,7 @@ const AccordionContent = ({
<div
className={cn(
'pb-4 pt-0 [&>*:first-child]:mt-0 [&>*:last-child]:mb-0',
- className,
+ className
)}
>
{children}
diff --git a/apps/public/src/components/ui/button.tsx b/apps/public/src/components/ui/button.tsx
index db4a3ae9a..3744dadfd 100644
--- a/apps/public/src/components/ui/button.tsx
+++ b/apps/public/src/components/ui/button.tsx
@@ -32,7 +32,7 @@ const buttonVariants = cva(
variant: 'default',
size: 'default',
},
- },
+ }
);
export interface ButtonProps
diff --git a/apps/public/src/components/ui/input.tsx b/apps/public/src/components/ui/input.tsx
index 4f71b973c..48b54ac97 100644
--- a/apps/public/src/components/ui/input.tsx
+++ b/apps/public/src/components/ui/input.tsx
@@ -16,7 +16,7 @@ const inputVariants = cva(
defaultVariants: {
size: 'default',
},
- },
+ }
);
export interface InputProps
diff --git a/apps/public/src/components/ui/slider.tsx b/apps/public/src/components/ui/slider.tsx
index 9f493c612..cb92589ea 100644
--- a/apps/public/src/components/ui/slider.tsx
+++ b/apps/public/src/components/ui/slider.tsx
@@ -37,7 +37,7 @@ const Slider = ({
ref={ref}
className={cn(
'relative flex w-full touch-none select-none items-center',
- className,
+ className
)}
{...props}
>
diff --git a/apps/public/src/components/ui/tooltip.tsx b/apps/public/src/components/ui/tooltip.tsx
index 1076957dd..88742781f 100644
--- a/apps/public/src/components/ui/tooltip.tsx
+++ b/apps/public/src/components/ui/tooltip.tsx
@@ -24,7 +24,7 @@ const TooltipContent = ({
sideOffset={sideOffset}
className={cn(
'z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
- className,
+ className
)}
{...props}
/>
diff --git a/apps/public/src/components/window-image.tsx b/apps/public/src/components/window-image.tsx
index 08cdb8399..34ef9fa53 100644
--- a/apps/public/src/components/window-image.tsx
+++ b/apps/public/src/components/window-image.tsx
@@ -26,7 +26,7 @@ export function WindowImage({
if (!darkSrc || !lightSrc) {
throw new Error(
- 'WindowImage requires either src or both srcDark and srcLight',
+ 'WindowImage requires either src or both srcDark and srcLight'
);
}
diff --git a/apps/public/src/lib/compare.ts b/apps/public/src/lib/compare.ts
index 2ca4d25fd..8c9f2ede0 100644
--- a/apps/public/src/lib/compare.ts
+++ b/apps/public/src/lib/compare.ts
@@ -203,7 +203,7 @@ export interface CompareData {
const contentDir = join(process.cwd(), 'content', 'compare');
export async function getCompareData(
- slug: string,
+ slug: string
): Promise<CompareData | null> {
try {
const filePath = join(contentDir, `${slug}.json`);
diff --git a/apps/public/src/lib/features.ts b/apps/public/src/lib/features.ts
index 93b7c42e9..f154be6b2 100644
--- a/apps/public/src/lib/features.ts
+++ b/apps/public/src/lib/features.ts
@@ -103,7 +103,7 @@ export interface FeatureData {
const contentDir = join(process.cwd(), 'content', 'features');
export async function getFeatureData(
- slug: string,
+ slug: string
): Promise<FeatureData | null> {
try {
const filePath = join(contentDir, `${slug}.json`);
diff --git a/apps/public/src/lib/github.ts b/apps/public/src/lib/github.ts
index a3fac5679..e8896a704 100644
--- a/apps/public/src/lib/github.ts
+++ b/apps/public/src/lib/github.ts
@@ -1,7 +1,7 @@
export async function getGithubRepoInfo() {
try {
const res = await fetch(
- 'https://api.github.com/repos/Openpanel-dev/openpanel',
+ 'https://api.github.com/repos/Openpanel-dev/openpanel'
);
return res.json();
} catch (e) {
diff --git a/apps/public/src/lib/metadata.ts b/apps/public/src/lib/metadata.ts
index 4723d748b..6330178ef 100644
--- a/apps/public/src/lib/metadata.ts
+++ b/apps/public/src/lib/metadata.ts
@@ -1,8 +1,5 @@
import type { Metadata } from 'next';
-import {
- OPENPANEL_DESCRIPTION,
- OPENPANEL_SITE_NAME,
-} from './openpanel-brand';
+import { OPENPANEL_DESCRIPTION, OPENPANEL_SITE_NAME } from './openpanel-brand';
import { url as baseUrl } from './layout.shared';
const siteName = OPENPANEL_SITE_NAME;
@@ -48,7 +45,7 @@ export function getRawMetadata(
description,
image,
}: { url: string; title: string; description: string; image: string },
- meta: Metadata = {},
+ meta: Metadata = {}
): Metadata {
return {
title,
diff --git a/apps/public/src/lib/openapi.ts b/apps/public/src/lib/openapi.ts
index c789d3879..a9e1b7537 100644
--- a/apps/public/src/lib/openapi.ts
+++ b/apps/public/src/lib/openapi.ts
@@ -37,7 +37,10 @@ export const getApiReferenceSource = cache(async () => {
// Inject static page slugs at the top of the root meta.json that
// openapiSource generates for the tag separator groups.
const patchedOpenapiFiles = openapiFiles.files.map((f) => {
- if (f.type === 'meta' && (f.path === 'meta.json' || f.path === '/meta.json')) {
+ if (
+ f.type === 'meta' &&
+ (f.path === 'meta.json' || f.path === '/meta.json')
+ ) {
const data = f.data as { pages?: string[] };
return {
...f,
diff --git a/apps/public/src/mdx-components.tsx b/apps/public/src/mdx-components.tsx
index 06ff02708..f104e588f 100644
--- a/apps/public/src/mdx-components.tsx
+++ b/apps/public/src/mdx-components.tsx
@@ -24,7 +24,6 @@ export function getMDXComponents(components?: MDXComponents) {
} satisfies MDXComponents;
}
-
declare global {
type MDXProvidedComponents = ReturnType<typeof getMDXComponents>;
}
diff --git a/apps/public/tsconfig.json b/apps/public/tsconfig.json
index 759db9834..29529ab77 100644
--- a/apps/public/tsconfig.json
+++ b/apps/public/tsconfig.json
@@ -2,11 +2,7 @@
"compilerOptions": {
"baseUrl": ".",
"target": "ESNext",
- "lib": [
- "dom",
- "dom.iterable",
- "esnext"
- ],
+ "lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
@@ -20,12 +16,8 @@
"jsx": "react-jsx",
"incremental": true,
"paths": {
- "@/*": [
- "./src/*"
- ],
- "collections/*": [
- ".source/*"
- ]
+ "@/*": ["./src/*"],
+ "collections/*": [".source/*"]
},
"plugins": [
{
@@ -40,7 +32,5 @@
".next/types/**/*.ts",
".next/dev/types/**/*.ts"
],
- "exclude": [
- "node_modules"
- ]
-}
\ No newline at end of file
+ "exclude": ["node_modules"]
+}
diff --git a/apps/public/wrangler.jsonc b/apps/public/wrangler.jsonc
index bf16f1c57..7dd7b9327 100644
--- a/apps/public/wrangler.jsonc
+++ b/apps/public/wrangler.jsonc
@@ -4,9 +4,7 @@
"name": "openpanel-public",
"account_id": "ff15074258b1981316524df0b09047df",
"compatibility_date": "2026-02-16",
- "compatibility_flags": [
- "nodejs_compat"
- ],
+ "compatibility_flags": ["nodejs_compat"],
"keep_names": false,
"assets": {
"directory": ".open-next/assets",
diff --git a/apps/start/src/components/auth/sign-in-github.tsx b/apps/start/src/components/auth/sign-in-github.tsx
index f4e7e99d9..cde08decf 100644
--- a/apps/start/src/components/auth/sign-in-github.tsx
+++ b/apps/start/src/components/auth/sign-in-github.tsx
@@ -6,7 +6,11 @@ export function SignInGithub({
type,
inviteId,
isLastUsed,
-}: { type: 'sign-in' | 'sign-up'; inviteId?: string; isLastUsed?: boolean }) {
+}: {
+ type: 'sign-in' | 'sign-up';
+ inviteId?: string;
+ isLastUsed?: boolean;
+}) {
const trpc = useTRPC();
const mutation = useMutation(
trpc.auth.signInOAuth.mutationOptions({
@@ -15,7 +19,7 @@ export function SignInGithub({
window.location.href = res.url;
}
},
- }),
+ })
);
const title = () => {
if (type === 'sign-in') return 'Sign in with Github';
diff --git a/apps/start/src/components/card.tsx b/apps/start/src/components/card.tsx
index b3099f8c9..a476a7c19 100644
--- a/apps/start/src/components/card.tsx
+++ b/apps/start/src/components/card.tsx
@@ -19,7 +19,7 @@ export function Card({ children, hover, className }: CardProps) {
className={cn(
'card relative',
hover && 'transition-all hover:-translate-y-0.5',
- className,
+ className
)}
>
{children}
diff --git a/apps/start/src/components/charts/animation.ts b/apps/start/src/components/charts/animation.ts
index f33492c19..81e42b8d3 100644
--- a/apps/start/src/components/charts/animation.ts
+++ b/apps/start/src/components/charts/animation.ts
@@ -1,13 +1,13 @@
-import type { Transition } from "motion/react";
+import type { Transition } from 'motion/react';
/** Default clip-reveal easing for cartesian charts. */
-export const DEFAULT_ANIMATION_EASING = "cubic-bezier(0.85, 0, 0.15, 1)";
+export const DEFAULT_ANIMATION_EASING = 'cubic-bezier(0.85, 0, 0.15, 1)';
export const DEFAULT_ANIMATION_DURATION_MS = 1100;
/** Default enter transition — matches the original line chart reveal. */
export const DEFAULT_CHART_ENTER_TRANSITION: Transition = {
- type: "tween",
+ type: 'tween',
duration: DEFAULT_ANIMATION_DURATION_MS / 1000,
ease: [0.85, 0, 0.15, 1],
};
@@ -16,17 +16,17 @@ export const DEFAULT_CHART_ENTER_TRANSITION: Transition = {
* Clip-path width reveal must use tween — spring does not reliably animate SVG width.
*/
export function clipRevealTransition(enterTransition?: Transition): Transition {
- if (enterTransition?.type === "tween") {
+ if (enterTransition?.type === 'tween') {
return enterTransition;
}
const duration =
- typeof enterTransition?.duration === "number"
+ typeof enterTransition?.duration === 'number'
? enterTransition.duration
: DEFAULT_ANIMATION_DURATION_MS / 1000;
return {
- type: "tween",
+ type: 'tween',
duration,
ease: DEFAULT_CHART_ENTER_TRANSITION.ease,
};
diff --git a/apps/start/src/components/charts/area-chart.tsx b/apps/start/src/components/charts/area-chart.tsx
index b919ab430..a25543486 100644
--- a/apps/start/src/components/charts/area-chart.tsx
+++ b/apps/start/src/components/charts/area-chart.tsx
@@ -1,19 +1,19 @@
-"use client";
+'use client';
-import { ParentSize } from "@visx/responsive";
-import type { Transition } from "motion/react";
+import { ParentSize } from '@visx/responsive';
+import type { Transition } from 'motion/react';
import {
Children,
isValidElement,
type ReactNode,
useMemo,
useRef,
-} from "react";
-import { cn } from "@/lib/utils";
-import { Area, type AreaProps } from "./area";
-import type { LineConfig, Margin } from "./chart-context";
-import { PatternArea } from "./pattern-area";
-import { TimeSeriesChartInner } from "./time-series-chart-shell";
+} from 'react';
+import { cn } from '@/lib/utils';
+import { Area, type AreaProps } from './area';
+import type { LineConfig, Margin } from './chart-context';
+import { PatternArea } from './pattern-area';
+import { TimeSeriesChartInner } from './time-series-chart-shell';
export interface AreaChartProps {
/** Data array - each item should have a date field and numeric values */
@@ -53,25 +53,25 @@ function extractAreaConfigs(children: ReactNode): LineConfig[] {
name?: string;
};
const componentName =
- typeof child.type === "function"
- ? childType.displayName || childType.name || ""
- : "";
+ typeof child.type === 'function'
+ ? childType.displayName || childType.name || ''
+ : '';
const props = child.props as AreaProps | undefined;
const isPatternArea =
- componentName === "PatternArea" || child.type === PatternArea;
+ componentName === 'PatternArea' || child.type === PatternArea;
const isAreaComponent =
- componentName === "Area" ||
+ componentName === 'Area' ||
child.type === Area ||
(props &&
- typeof props.dataKey === "string" &&
+ typeof props.dataKey === 'string' &&
props.dataKey.length > 0 &&
!isPatternArea);
if (isAreaComponent && props?.dataKey) {
configs.push({
dataKey: props.dataKey,
- stroke: props.stroke || props.fill || "var(--chart-line-primary)",
+ stroke: props.stroke || props.fill || 'var(--chart-line-primary)',
strokeWidth: props.strokeWidth || 2,
});
}
@@ -131,14 +131,14 @@ function ChartInner({
export function AreaChart({
data,
- xDataKey = "date",
+ xDataKey = 'date',
margin: marginProp,
animationDuration = 1100,
animationEasing,
enterTransition,
revealSignature,
- aspectRatio = "2 / 1",
- className = "",
+ aspectRatio = '2 / 1',
+ className = '',
children,
}: AreaChartProps) {
const containerRef = useRef<HTMLDivElement>(null);
@@ -146,9 +146,9 @@ export function AreaChart({
return (
<div
- className={cn("relative w-full", className)}
+ className={cn('relative w-full', className)}
ref={containerRef}
- style={{ aspectRatio, touchAction: "none" }}
+ style={{ aspectRatio, touchAction: 'none' }}
>
<ParentSize debounceTime={10}>
{({ width, height }) => (
@@ -172,6 +172,6 @@ export function AreaChart({
);
}
-export { Area, type AreaProps } from "./area";
+export { Area, type AreaProps } from './area';
export default AreaChart;
diff --git a/apps/start/src/components/charts/area-gradient-defs.tsx b/apps/start/src/components/charts/area-gradient-defs.tsx
index 8615ff3f3..26f589d22 100644
--- a/apps/start/src/components/charts/area-gradient-defs.tsx
+++ b/apps/start/src/components/charts/area-gradient-defs.tsx
@@ -2,7 +2,7 @@ import {
type FadeEdges,
fadeGradientStops,
resolveFadeSides,
-} from "./fade-edges";
+} from './fade-edges';
interface AreaGradientDefsProps {
gradientId: string;
@@ -75,7 +75,7 @@ export function AreaGradientDefs({
<stop
key={stop.offset}
offset={stop.offset}
- style={{ stopColor: "white", stopOpacity: stop.opacity }}
+ style={{ stopColor: 'white', stopOpacity: stop.opacity }}
/>
))}
</linearGradient>
diff --git a/apps/start/src/components/charts/area.tsx b/apps/start/src/components/charts/area.tsx
index f1f9e77d2..b06c0b8c6 100644
--- a/apps/start/src/components/charts/area.tsx
+++ b/apps/start/src/components/charts/area.tsx
@@ -1,25 +1,25 @@
-"use client";
+'use client';
-import { curveMonotoneX } from "@visx/curve";
-import { AreaClosed, LinePath } from "@visx/shape";
+import { curveMonotoneX } from '@visx/curve';
+import { AreaClosed, LinePath } from '@visx/shape';
// CurveFactory type - simplified version compatible with visx
// biome-ignore lint/suspicious/noExplicitAny: d3 curve factory type
type CurveFactory = any;
-import { useCallback, useId, useRef } from "react";
-import { AreaGradientDefs } from "./area-gradient-defs";
-import { chartCssVars, useChartStable } from "./chart-context";
-import { type FadeEdges, resolveFadeSides } from "./fade-edges";
+import { useCallback, useId, useRef } from 'react';
+import { AreaGradientDefs } from './area-gradient-defs';
+import { chartCssVars, useChartStable } from './chart-context';
+import { type FadeEdges, resolveFadeSides } from './fade-edges';
import {
resolveDashTailBounds,
usePathStrokeMetrics,
-} from "./path-stroke-utils";
-import { SeriesDashTailOverlay } from "./series-dash-tail-overlay";
-import { SeriesHighlightLayer } from "./series-highlight-layer";
-import { SeriesHoverDim } from "./series-hover-dim";
-import { SeriesMarkers } from "./series-markers";
-import type { SeriesPointMarkerStyle } from "./series-point-marker";
+} from './path-stroke-utils';
+import { SeriesDashTailOverlay } from './series-dash-tail-overlay';
+import { SeriesHighlightLayer } from './series-highlight-layer';
+import { SeriesHoverDim } from './series-hover-dim';
+import { SeriesMarkers } from './series-markers';
+import type { SeriesPointMarkerStyle } from './series-point-marker';
export interface AreaProps {
/** Key in data to use for y values */
@@ -78,7 +78,7 @@ export function Area({
showMarkers = false,
markers,
dashFromIndex,
- dashArray = "6,4",
+ dashArray = '6,4',
}: AreaProps) {
// Stable slice only: hover state lives inside `<SeriesHoverDim>` and
// `<SeriesHighlightLayer>` so this component (and its expensive
@@ -107,7 +107,7 @@ export function Area({
const edgeMaskId = `area-edge-mask-${dataKey}-${uniqueId}`;
const edgeGradientId = `${edgeMaskId}-gradient`;
- const isPatternFill = fill.startsWith("url(");
+ const isPatternFill = fill.startsWith('url(');
const showAreaFill = isPatternFill || fillOpacity > 0;
const areaFill = isPatternFill ? fill : `url(#${gradientId})`;
@@ -118,7 +118,7 @@ export function Area({
const getY = useCallback(
(d: Record<string, unknown>) => {
const value = d[dataKey];
- return typeof value === "number" ? (yScale(value) ?? 0) : 0;
+ return typeof value === 'number' ? (yScale(value) ?? 0) : 0;
},
[dataKey, yScale]
);
@@ -177,7 +177,7 @@ export function Area({
curve={curve}
data={renderData}
innerRef={pathRef}
- stroke={hasDashTail ? "transparent" : strokePaint}
+ stroke={hasDashTail ? 'transparent' : strokePaint}
strokeLinecap="round"
strokeWidth={strokeWidth}
x={(d) => xScale(xAccessor(d)) ?? 0}
@@ -222,6 +222,6 @@ export function Area({
);
}
-Area.displayName = "Area";
+Area.displayName = 'Area';
export default Area;
diff --git a/apps/start/src/components/charts/bar-chart.tsx b/apps/start/src/components/charts/bar-chart.tsx
index 3a2ad5164..087fa5e75 100644
--- a/apps/start/src/components/charts/bar-chart.tsx
+++ b/apps/start/src/components/charts/bar-chart.tsx
@@ -1,9 +1,9 @@
-"use client";
+'use client';
-import { localPoint } from "@visx/event";
-import { ParentSize } from "@visx/responsive";
-import { scaleBand, scaleLinear } from "@visx/scale";
-import type { Transition } from "motion/react";
+import { localPoint } from '@visx/event';
+import { ParentSize } from '@visx/responsive';
+import { scaleBand, scaleLinear } from '@visx/scale';
+import type { Transition } from 'motion/react';
import {
Children,
isValidElement,
@@ -15,21 +15,21 @@ import {
useMemo,
useRef,
useState,
-} from "react";
-import { cn } from "@/lib/utils";
-import { DEFAULT_ANIMATION_EASING } from "./animation";
-import type { BarProps } from "./bar";
+} from 'react';
+import { cn } from '@/lib/utils';
+import { DEFAULT_ANIMATION_EASING } from './animation';
+import type { BarProps } from './bar';
import {
ChartProvider,
type LineConfig,
type Margin,
type TooltipData,
-} from "./chart-context";
-import { isGradientDefComponent, isPatternDefComponent } from "./chart-defs";
-import { shortDateFmt } from "./chart-formatters";
-import { useScheduledTooltip } from "./use-scheduled-tooltip";
+} from './chart-context';
+import { isGradientDefComponent, isPatternDefComponent } from './chart-defs';
+import { shortDateFmt } from './chart-formatters';
+import { useScheduledTooltip } from './use-scheduled-tooltip';
-export type BarOrientation = "vertical" | "horizontal";
+export type BarOrientation = 'vertical' | 'horizontal';
export interface BarChartProps {
/** Data array - each item should have an x-axis key and numeric values */
@@ -80,20 +80,20 @@ function extractBarConfigs(children: ReactNode): LineConfig[] {
name?: string;
};
const componentName =
- typeof child.type === "function"
- ? childType.displayName || childType.name || ""
- : "";
+ typeof child.type === 'function'
+ ? childType.displayName || childType.name || ''
+ : '';
const props = child.props as BarProps | undefined;
const isBarComponent =
- componentName === "Bar" ||
- (props && typeof props.dataKey === "string" && props.dataKey.length > 0);
+ componentName === 'Bar' ||
+ (props && typeof props.dataKey === 'string' && props.dataKey.length > 0);
if (isBarComponent && props?.dataKey) {
// Use stroke for tooltip dot color if provided, otherwise fall back to fill
// This allows gradient/pattern fills to have a solid dot color
const dotColor =
- props.stroke || props.fill || "var(--chart-line-primary)";
+ props.stroke || props.fill || 'var(--chart-line-primary)';
configs.push({
dataKey: props.dataKey,
stroke: dotColor,
@@ -118,11 +118,11 @@ function isPostOverlayComponent(child: ReactElement): boolean {
}
const componentName =
- typeof child.type === "function"
- ? childType.displayName || childType.name || ""
- : "";
+ typeof child.type === 'function'
+ ? childType.displayName || childType.name || ''
+ : '';
- return componentName === "ChartMarkers" || componentName === "MarkerGroup";
+ return componentName === 'ChartMarkers' || componentName === 'MarkerGroup';
}
interface ChartInnerProps {
@@ -161,7 +161,7 @@ const ChartCore = memo(function ChartCore({
animationDuration,
animationEasing,
enterTransition,
- revealSignature = "",
+ revealSignature = '',
barGap,
barWidthProp,
orientation,
@@ -176,7 +176,7 @@ const ChartCore = memo(function ChartCore({
const [revealEpoch, setRevealEpoch] = useState(0);
const hoveredBarIndex = tooltipData?.index ?? null;
- const isHorizontal = orientation === "horizontal";
+ const isHorizontal = orientation === 'horizontal';
// Extract bar configs synchronously from children
const lines = useMemo(() => extractBarConfigs(children), [children]);
@@ -191,7 +191,7 @@ const ChartCore = memo(function ChartCore({
if (value instanceof Date) {
return shortDateFmt.format(value);
}
- return String(value ?? "");
+ return String(value ?? '');
},
[xDataKey]
);
@@ -233,7 +233,7 @@ const ChartCore = memo(function ChartCore({
let sum = 0;
for (const line of lines) {
const value = d[line.dataKey];
- if (typeof value === "number") {
+ if (typeof value === 'number') {
sum += value;
}
}
@@ -248,7 +248,7 @@ const ChartCore = memo(function ChartCore({
for (const line of lines) {
for (const d of data) {
const value = d[line.dataKey];
- if (typeof value === "number" && value > max) {
+ if (typeof value === 'number' && value > max) {
max = value;
}
}
@@ -282,7 +282,7 @@ const ChartCore = memo(function ChartCore({
for (const line of lines) {
pointOffsets.set(line.dataKey, cumulative);
const value = d[line.dataKey];
- if (typeof value === "number") {
+ if (typeof value === 'number') {
cumulative += value;
}
}
@@ -368,7 +368,7 @@ const ChartCore = memo(function ChartCore({
let cumulative = 0;
for (const line of lines) {
const value = d[line.dataKey];
- if (typeof value === "number") {
+ if (typeof value === 'number') {
cumulative += value;
xPositions[line.dataKey] = valueScale(cumulative) ?? 0;
yPositions[line.dataKey] = barPos + bandWidth / 2;
@@ -378,7 +378,7 @@ const ChartCore = memo(function ChartCore({
// Grouped horizontal: each bar at its own y position
lines.forEach((line, idx) => {
const value = d[line.dataKey];
- if (typeof value === "number") {
+ if (typeof value === 'number') {
xPositions[line.dataKey] = valueScale(value) ?? 0;
yPositions[line.dataKey] =
barPos +
@@ -393,7 +393,7 @@ const ChartCore = memo(function ChartCore({
let seriesIdx = 0;
for (const line of lines) {
const value = d[line.dataKey];
- if (typeof value === "number") {
+ if (typeof value === 'number') {
cumulative += value;
const gapOffset = seriesIdx * stackGap;
yPositions[line.dataKey] =
@@ -412,7 +412,7 @@ const ChartCore = memo(function ChartCore({
lines.forEach((line, idx) => {
const value = d[line.dataKey];
- if (typeof value === "number") {
+ if (typeof value === 'number') {
yPositions[line.dataKey] = valueScale(value) ?? 0;
xPositions[line.dataKey] =
barPos +
@@ -488,7 +488,7 @@ const ChartCore = memo(function ChartCore({
data,
renderData: data,
xScale: fakeTimeScale as unknown as ReturnType<
- typeof import("@visx/scale").scaleTime<number>
+ typeof import('@visx/scale').scaleTime<number>
>,
yScale: valueScale,
width,
@@ -530,7 +530,7 @@ const ChartCore = memo(function ChartCore({
<g
onMouseLeave={canInteract ? handleMouseLeave : undefined}
onMouseMove={canInteract ? handleMouseMove : undefined}
- style={{ cursor: canInteract ? "crosshair" : "default" }}
+ style={{ cursor: canInteract ? 'crosshair' : 'default' }}
transform={`translate(${margin.left},${margin.top})`}
>
{/* Background rect for mouse event detection */}
@@ -555,17 +555,17 @@ const ChartCore = memo(function ChartCore({
export function BarChart({
data,
- xDataKey = "name",
+ xDataKey = 'name',
margin: marginProp,
animationDuration = 1100,
animationEasing = DEFAULT_ANIMATION_EASING,
enterTransition,
revealSignature,
- aspectRatio = "2 / 1",
- className = "",
+ aspectRatio = '2 / 1',
+ className = '',
barGap = 0.2,
barWidth,
- orientation = "vertical",
+ orientation = 'vertical',
stacked = false,
stackGap = 0,
children,
@@ -575,7 +575,7 @@ export function BarChart({
return (
<div
- className={cn("relative w-full", className)}
+ className={cn('relative w-full', className)}
ref={containerRef}
style={{ aspectRatio }}
>
@@ -606,6 +606,6 @@ export function BarChart({
);
}
-BarChart.displayName = "BarChart";
+BarChart.displayName = 'BarChart';
export default BarChart;
diff --git a/apps/start/src/components/charts/bar-x-axis.tsx b/apps/start/src/components/charts/bar-x-axis.tsx
index 2fbfa5f91..70941bd2a 100644
--- a/apps/start/src/components/charts/bar-x-axis.tsx
+++ b/apps/start/src/components/charts/bar-x-axis.tsx
@@ -1,10 +1,10 @@
-"use client";
+'use client';
-import { motion } from "motion/react";
-import { memo, useEffect, useMemo, useState } from "react";
-import { createPortal } from "react-dom";
-import { cn } from "@/lib/utils";
-import { useChart, useChartStable } from "./chart-context";
+import { motion } from 'motion/react';
+import { memo, useEffect, useMemo, useState } from 'react';
+import { createPortal } from 'react-dom';
+import { cn } from '@/lib/utils';
+import { useChart, useChartStable } from './chart-context';
export interface BarXAxisProps {
/** Width of the date ticker box for fade calculation. Default: 50 */
@@ -51,15 +51,15 @@ function BarXAxisLabel({
left: x,
bottom: 12,
width: 0,
- display: "flex",
- justifyContent: "center",
+ display: 'flex',
+ justifyContent: 'center',
}}
>
<motion.span
animate={{ opacity }}
- className={cn("whitespace-nowrap text-chart-label text-xs")}
+ className={cn('whitespace-nowrap text-chart-label text-xs')}
initial={{ opacity: 1 }}
- transition={{ duration: 0.4, ease: "easeInOut" }}
+ transition={{ duration: 0.4, ease: 'easeInOut' }}
>
{label}
</motion.span>
@@ -148,6 +148,6 @@ const BarXAxisInner = memo(function BarXAxisInner({
);
});
-BarXAxis.displayName = "BarXAxis";
+BarXAxis.displayName = 'BarXAxis';
export default BarXAxis;
diff --git a/apps/start/src/components/charts/bar-y-axis.tsx b/apps/start/src/components/charts/bar-y-axis.tsx
index 95400e5c7..d6bc975ce 100644
--- a/apps/start/src/components/charts/bar-y-axis.tsx
+++ b/apps/start/src/components/charts/bar-y-axis.tsx
@@ -1,10 +1,10 @@
-"use client";
+'use client';
-import { motion } from "motion/react";
-import { memo, useEffect, useMemo, useState } from "react";
-import { createPortal } from "react-dom";
-import { cn } from "@/lib/utils";
-import { useChart, useChartStable } from "./chart-context";
+import { motion } from 'motion/react';
+import { memo, useEffect, useMemo, useState } from 'react';
+import { createPortal } from 'react-dom';
+import { cn } from '@/lib/utils';
+import { useChart, useChartStable } from './chart-context';
export interface BarYAxisProps {
/** Whether to show all labels or skip some for dense data. Default: true */
@@ -38,13 +38,13 @@ function BarYAxisLabel({
animate={{
opacity: isHovered ? 1 : 0.7,
color: isHovered
- ? "var(--foreground)"
- : "var(--chart-label, var(--color-zinc-500))",
+ ? 'var(--foreground)'
+ : 'var(--chart-label, var(--color-zinc-500))',
}}
- className={cn("truncate whitespace-nowrap text-right text-xs")}
+ className={cn('truncate whitespace-nowrap text-right text-xs')}
initial={{
opacity: 0.7,
- color: "var(--chart-label, var(--color-zinc-500))",
+ color: 'var(--chart-label, var(--color-zinc-500))',
}}
style={{ maxWidth: 70 }}
transition={{ duration: 0.15 }}
@@ -137,6 +137,6 @@ const BarYAxisInner = memo(function BarYAxisInner({
);
});
-BarYAxis.displayName = "BarYAxis";
+BarYAxis.displayName = 'BarYAxis';
export default BarYAxis;
diff --git a/apps/start/src/components/charts/bar.tsx b/apps/start/src/components/charts/bar.tsx
index 784f2416f..2cc61ac6c 100644
--- a/apps/start/src/components/charts/bar.tsx
+++ b/apps/start/src/components/charts/bar.tsx
@@ -1,18 +1,18 @@
-"use client";
+'use client';
-import type { scaleBand } from "@visx/scale";
-import type { Transition } from "motion/react";
-import { motion } from "motion/react";
-import { memo, useId, useMemo } from "react";
-import { chartCssVars, useChart, useChartStable } from "./chart-context";
-import { transitionWithDelay } from "./motion-utils";
+import type { scaleBand } from '@visx/scale';
+import type { Transition } from 'motion/react';
+import { motion } from 'motion/react';
+import { memo, useId, useMemo } from 'react';
+import { chartCssVars, useChart, useChartStable } from './chart-context';
+import { transitionWithDelay } from './motion-utils';
type ScaleBand<Domain extends { toString(): string }> = ReturnType<
typeof scaleBand<Domain>
>;
-export type BarLineCap = "round" | "butt" | number;
-export type BarAnimationType = "grow" | "fade";
+export type BarLineCap = 'round' | 'butt' | number;
+export type BarAnimationType = 'grow' | 'fade';
export interface BarProps {
/** Key in data to use for y values */
@@ -82,16 +82,16 @@ function AnimatedBar({
}: AnimatedBarProps) {
const enterAnim = transitionWithDelay(enterTransition, index * staggerDelay);
- if (animationType === "fade") {
+ if (animationType === 'fade') {
return (
<motion.rect
animate={{
opacity: isFaded ? fadedOpacity : 1,
- filter: "blur(0px)",
+ filter: 'blur(0px)',
}}
fill={fill}
height={height}
- initial={{ opacity: 0, filter: "blur(2px)" }}
+ initial={{ opacity: 0, filter: 'blur(2px)' }}
key={`fade-${index}-${revealEpoch}`}
rx={rx}
ry={ry}
@@ -113,7 +113,7 @@ function AnimatedBar({
return (
<g
opacity={isFaded ? fadedOpacity : 1}
- style={{ transition: "opacity 0.15s ease-in-out" }}
+ style={{ transition: 'opacity 0.15s ease-in-out' }}
>
<motion.rect
animate={target}
@@ -131,9 +131,9 @@ function AnimatedBar({
const BarInner = memo(function BarInner({
dataKey,
fill = chartCssVars.linePrimary,
- lineCap = "round",
+ lineCap = 'round',
animate = true,
- animationType = "grow",
+ animationType = 'grow',
fadedOpacity = 0.3,
staggerDelay,
stackGap = 0,
@@ -165,7 +165,7 @@ const BarInner = memo(function BarInner({
staggerDelay ?? (data.length > 1 ? staggerSpread / 1000 / data.length : 0);
const uniqueId = useId();
- const isHorizontal = orientation === "horizontal";
+ const isHorizontal = orientation === 'horizontal';
// Find the index of this bar series among all bar series
const seriesIndex = useMemo(() => {
@@ -192,10 +192,10 @@ const BarInner = memo(function BarInner({
// Calculate corner radius based on lineCap
const cornerRadius = useMemo(() => {
- if (typeof lineCap === "number") {
+ if (typeof lineCap === 'number') {
return lineCap;
}
- if (lineCap === "round" && barWidth) {
+ if (lineCap === 'round' && barWidth) {
return Math.min(barWidth / 2, 8);
}
return 0;
@@ -205,7 +205,7 @@ const BarInner = memo(function BarInner({
<g className={`bar-series-${uniqueId}`}>
{data.map((d, i) => {
const value = d[dataKey];
- if (typeof value !== "number") {
+ if (typeof value !== 'number') {
return null;
}
@@ -318,8 +318,8 @@ const BarInner = memo(function BarInner({
rx={effectiveRx}
ry={effectiveRy}
style={{
- cursor: "default",
- transition: "opacity 0.15s ease-in-out",
+ cursor: 'default',
+ transition: 'opacity 0.15s ease-in-out',
}}
width={barW}
x={x}
@@ -335,7 +335,7 @@ export function Bar(props: BarProps) {
const { barScale, bandWidth, barXAccessor } = useChartStable();
if (!(barScale && bandWidth && barXAccessor)) {
- console.warn("Bar component must be used within a BarChart");
+ console.warn('Bar component must be used within a BarChart');
return null;
}
@@ -349,6 +349,6 @@ export function Bar(props: BarProps) {
);
}
-Bar.displayName = "Bar";
+Bar.displayName = 'Bar';
export default Bar;
diff --git a/apps/start/src/components/charts/chart-config-context.tsx b/apps/start/src/components/charts/chart-config-context.tsx
index 779b1d3c8..41d00c5e1 100644
--- a/apps/start/src/components/charts/chart-config-context.tsx
+++ b/apps/start/src/components/charts/chart-config-context.tsx
@@ -1,6 +1,6 @@
-"use client";
+'use client';
-import { createContext, type ReactNode, useContext, useMemo } from "react";
+import { createContext, type ReactNode, useContext, useMemo } from 'react';
export interface SpringConfig {
stiffness: number;
diff --git a/apps/start/src/components/charts/chart-context.tsx b/apps/start/src/components/charts/chart-context.tsx
index 703c57099..6eb1f8fc9 100644
--- a/apps/start/src/components/charts/chart-context.tsx
+++ b/apps/start/src/components/charts/chart-context.tsx
@@ -1,6 +1,6 @@
-"use client";
+'use client';
-import type { scaleBand, scaleLinear, scaleTime } from "@visx/scale";
+import type { scaleBand, scaleLinear, scaleTime } from '@visx/scale';
type ScaleLinear<Output, _Input = number> = ReturnType<
typeof scaleLinear<Output>
@@ -12,7 +12,7 @@ type ScaleBand<Domain extends { toString(): string }> = ReturnType<
typeof scaleBand<Domain>
>;
-import type { Transition } from "motion/react";
+import type { Transition } from 'motion/react';
import {
createContext,
type Dispatch,
@@ -21,37 +21,37 @@ import {
type SetStateAction,
useContext,
useMemo,
-} from "react";
-import type { ChartSelection } from "./use-chart-interaction";
+} from 'react';
+import type { ChartSelection } from './use-chart-interaction';
// CSS variable references for theming
export const chartCssVars = {
- background: "var(--chart-background)",
- foreground: "var(--chart-foreground)",
- foregroundMuted: "var(--chart-foreground-muted)",
- label: "var(--chart-label)",
- linePrimary: "var(--chart-line-primary)",
- lineSecondary: "var(--chart-line-secondary)",
- crosshair: "var(--chart-crosshair)",
- grid: "var(--chart-grid)",
- indicatorColor: "var(--chart-indicator-color)",
- indicatorSecondaryColor: "var(--chart-indicator-secondary-color)",
- markerBackground: "var(--chart-marker-background)",
- markerBorder: "var(--chart-marker-border)",
- markerForeground: "var(--chart-marker-foreground)",
- badgeBackground: "var(--chart-marker-badge-background)",
- badgeForeground: "var(--chart-marker-badge-foreground)",
- segmentBackground: "var(--chart-segment-background)",
- segmentLine: "var(--chart-segment-line)",
+ background: 'var(--chart-background)',
+ foreground: 'var(--chart-foreground)',
+ foregroundMuted: 'var(--chart-foreground-muted)',
+ label: 'var(--chart-label)',
+ linePrimary: 'var(--chart-line-primary)',
+ lineSecondary: 'var(--chart-line-secondary)',
+ crosshair: 'var(--chart-crosshair)',
+ grid: 'var(--chart-grid)',
+ indicatorColor: 'var(--chart-indicator-color)',
+ indicatorSecondaryColor: 'var(--chart-indicator-secondary-color)',
+ markerBackground: 'var(--chart-marker-background)',
+ markerBorder: 'var(--chart-marker-border)',
+ markerForeground: 'var(--chart-marker-foreground)',
+ badgeBackground: 'var(--chart-marker-badge-background)',
+ badgeForeground: 'var(--chart-marker-badge-foreground)',
+ segmentBackground: 'var(--chart-segment-background)',
+ segmentLine: 'var(--chart-segment-line)',
};
/** Default scatter series colors from the chart palette (`--chart-1` … `--chart-5`). */
export const defaultScatterColors = [
- "var(--chart-1)",
- "var(--chart-2)",
- "var(--chart-3)",
- "var(--chart-4)",
- "var(--chart-5)",
+ 'var(--chart-1)',
+ 'var(--chart-2)',
+ 'var(--chart-3)',
+ 'var(--chart-4)',
+ 'var(--chart-5)',
] as const;
export interface Margin {
@@ -159,7 +159,7 @@ export interface ChartContextValue extends ChartHoverContextValue {
/** X accessor for bar charts (returns string instead of Date) */
barXAccessor?: (d: Record<string, unknown>) => string;
/** Bar chart orientation */
- orientation?: "vertical" | "horizontal";
+ orientation?: 'vertical' | 'horizontal';
/** Whether bars are stacked */
stacked?: boolean;
/** Stack offsets: Map of data index -> Map of dataKey -> cumulative offset */
@@ -320,8 +320,8 @@ export function useChartStable(): ChartStableContextValue {
const context = useContext(ChartStableContext);
if (!context) {
throw new Error(
- "useChartStable must be used within a ChartProvider. " +
- "Make sure your component is wrapped in <LineChart>, <AreaChart>, <BarChart>, or <ComposedChart>."
+ 'useChartStable must be used within a ChartProvider. ' +
+ 'Make sure your component is wrapped in <LineChart>, <AreaChart>, <BarChart>, or <ComposedChart>.'
);
}
return context;
@@ -336,8 +336,8 @@ export function useChartHover(): ChartHoverContextValue {
const context = useContext(ChartHoverContext);
if (!context) {
throw new Error(
- "useChartHover must be used within a ChartProvider. " +
- "Make sure your component is wrapped in <LineChart>, <AreaChart>, <BarChart>, or <ComposedChart>."
+ 'useChartHover must be used within a ChartProvider. ' +
+ 'Make sure your component is wrapped in <LineChart>, <AreaChart>, <BarChart>, or <ComposedChart>.'
);
}
return context;
diff --git a/apps/start/src/components/charts/chart-defs.ts b/apps/start/src/components/charts/chart-defs.ts
index 6dd941a60..727fefc8f 100644
--- a/apps/start/src/components/charts/chart-defs.ts
+++ b/apps/start/src/components/charts/chart-defs.ts
@@ -3,36 +3,36 @@ import {
isValidElement,
type ReactElement,
type ReactNode,
-} from "react";
+} from 'react';
export function getChartChildComponentName(child: ReactElement): string {
const childType = child.type as { displayName?: string; name?: string };
- return typeof child.type === "function"
- ? childType.displayName || childType.name || ""
- : "";
+ return typeof child.type === 'function'
+ ? childType.displayName || childType.name || ''
+ : '';
}
const VISX_PATTERN_COMPONENT_NAMES = new Set([
- "Lines",
- "Circles",
- "Waves",
- "Hexagons",
- "Path",
- "Pattern",
+ 'Lines',
+ 'Circles',
+ 'Waves',
+ 'Hexagons',
+ 'Path',
+ 'Pattern',
]);
/** @visx/pattern default exports use short names (e.g. `Lines`); also match *Pattern* displayNames. */
export function isPatternDefComponent(child: ReactElement): boolean {
const name = getChartChildComponentName(child);
- return name.includes("Pattern") || VISX_PATTERN_COMPONENT_NAMES.has(name);
+ return name.includes('Pattern') || VISX_PATTERN_COMPONENT_NAMES.has(name);
}
export function isGradientDefComponent(child: ReactElement): boolean {
const name = getChartChildComponentName(child);
return (
- name.includes("Gradient") ||
- name === "LinearGradient" ||
- name === "RadialGradient"
+ name.includes('Gradient') ||
+ name === 'LinearGradient' ||
+ name === 'RadialGradient'
);
}
diff --git a/apps/start/src/components/charts/chart-formatters.ts b/apps/start/src/components/charts/chart-formatters.ts
index d8b007047..be7ab2c95 100644
--- a/apps/start/src/components/charts/chart-formatters.ts
+++ b/apps/start/src/components/charts/chart-formatters.ts
@@ -1,20 +1,20 @@
-export const shortDateFmt = new Intl.DateTimeFormat("en-US", {
- month: "short",
- day: "numeric",
+export const shortDateFmt = new Intl.DateTimeFormat('en-US', {
+ month: 'short',
+ day: 'numeric',
});
-export const weekdayDateFmt = new Intl.DateTimeFormat("en-US", {
- weekday: "short",
- month: "short",
- day: "numeric",
+export const weekdayDateFmt = new Intl.DateTimeFormat('en-US', {
+ weekday: 'short',
+ month: 'short',
+ day: 'numeric',
});
-export const hmsTimeFmt = new Intl.DateTimeFormat("en-US", {
- hour: "2-digit",
- minute: "2-digit",
- second: "2-digit",
+export const hmsTimeFmt = new Intl.DateTimeFormat('en-US', {
+ hour: '2-digit',
+ minute: '2-digit',
+ second: '2-digit',
hour12: false,
});
// `Intl.NumberFormat.prototype.format` is a bound getter — safe to extract.
-export const intFmt = new Intl.NumberFormat("en-US").format;
+export const intFmt = new Intl.NumberFormat('en-US').format;
diff --git a/apps/start/src/components/charts/chart-reveal-clip.tsx b/apps/start/src/components/charts/chart-reveal-clip.tsx
index 3a8591a0c..6736aa4b6 100644
--- a/apps/start/src/components/charts/chart-reveal-clip.tsx
+++ b/apps/start/src/components/charts/chart-reveal-clip.tsx
@@ -1,8 +1,8 @@
-"use client";
+'use client';
-import type { Transition } from "motion/react";
-import { motion } from "motion/react";
-import { clipRevealTransition } from "./animation";
+import type { Transition } from 'motion/react';
+import { motion } from 'motion/react';
+import { clipRevealTransition } from './animation';
export interface ChartRevealClipProps {
clipPathId: string;
diff --git a/apps/start/src/components/charts/chart-stat-flow.tsx b/apps/start/src/components/charts/chart-stat-flow.tsx
index 93b5ff9a3..b6e3e3d50 100644
--- a/apps/start/src/components/charts/chart-stat-flow.tsx
+++ b/apps/start/src/components/charts/chart-stat-flow.tsx
@@ -1,27 +1,27 @@
-"use client";
+'use client';
-import NumberFlow from "@number-flow/react";
-import type { ReactNode } from "react";
-import { cn } from "@/lib/utils";
+import NumberFlow from '@number-flow/react';
+import type { ReactNode } from 'react';
+import { cn } from '@/lib/utils';
/** Subset of `Intl.NumberFormatOptions` supported by NumberFlow */
export interface ChartStatFlowFormat {
- notation?: "standard" | "compact";
- compactDisplay?: "short" | "long";
+ notation?: 'standard' | 'compact';
+ compactDisplay?: 'short' | 'long';
minimumFractionDigits?: number;
maximumFractionDigits?: number;
minimumIntegerDigits?: number;
minimumSignificantDigits?: number;
maximumSignificantDigits?: number;
- style?: "decimal" | "percent" | "currency";
+ style?: 'decimal' | 'percent' | 'currency';
currency?: string;
- currencyDisplay?: "symbol" | "narrowSymbol" | "code" | "name";
+ currencyDisplay?: 'symbol' | 'narrowSymbol' | 'code' | 'name';
unit?: string;
- unitDisplay?: "short" | "long" | "narrow";
+ unitDisplay?: 'short' | 'long' | 'narrow';
}
export const defaultChartStatFlowFormat: ChartStatFlowFormat = {
- notation: "standard",
+ notation: 'standard',
maximumFractionDigits: 0,
};
@@ -46,8 +46,8 @@ export function ChartStatFlow({
formatOptions = defaultChartStatFlowFormat,
prefix,
suffix,
- valueClassName = "text-2xl font-bold",
- labelClassName = "text-xs",
+ valueClassName = 'text-2xl font-bold',
+ labelClassName = 'text-xs',
icon,
}: ChartStatFlowProps) {
return (
@@ -57,7 +57,7 @@ export function ChartStatFlow({
{icon}
</div>
) : null}
- <span className={cn("text-foreground tabular-nums", valueClassName)}>
+ <span className={cn('text-foreground tabular-nums', valueClassName)}>
<NumberFlow
format={formatOptions}
prefix={prefix}
@@ -66,11 +66,11 @@ export function ChartStatFlow({
willChange
/>
</span>
- <span className={cn("mt-0.5 text-chart-label", labelClassName)}>
+ <span className={cn('mt-0.5 text-chart-label', labelClassName)}>
{label}
</span>
</>
);
}
-ChartStatFlow.displayName = "ChartStatFlow";
+ChartStatFlow.displayName = 'ChartStatFlow';
diff --git a/apps/start/src/components/charts/chart-tooltip.tsx b/apps/start/src/components/charts/chart-tooltip.tsx
index 7d49980a9..250d1deb7 100644
--- a/apps/start/src/components/charts/chart-tooltip.tsx
+++ b/apps/start/src/components/charts/chart-tooltip.tsx
@@ -6,12 +6,15 @@ import { Tooltip as RechartsTooltip, type TooltipProps } from 'recharts';
export const ChartTooltipContainer = ({
children,
className,
-}: { children: React.ReactNode; className?: string }) => {
+}: {
+ children: React.ReactNode;
+ className?: string;
+}) => {
return (
<div
className={cn(
'min-w-[180px] col gap-2 rounded-xl border bg-background/80 p-3 shadow-xl backdrop-blur-sm',
- className,
+ className
)}
>
{children}
@@ -21,7 +24,9 @@ export const ChartTooltipContainer = ({
export const ChartTooltipHeader = ({
children,
-}: { children: React.ReactNode }) => {
+}: {
+ children: React.ReactNode;
+}) => {
return <div className="flex justify-between gap-8">{children}</div>;
};
@@ -53,7 +58,7 @@ export function createChartTooltip<
context: PropsFromContext;
data: PropsFromTooltip[];
} & TooltipProps<number, string>
- >,
+ >
) {
const context = createContext<PropsFromContext | null>(null);
const useContext = () => {
diff --git a/apps/start/src/components/charts/common-bar.tsx b/apps/start/src/components/charts/common-bar.tsx
index 7d628c658..2a9b64f68 100644
--- a/apps/start/src/components/charts/common-bar.tsx
+++ b/apps/start/src/components/charts/common-bar.tsx
@@ -105,5 +105,5 @@ const BarShapes = [...new Array(13)].map((_, index) =>
border: getChartColor(index),
fill: getChartTranslucentColor(index),
},
- }),
+ })
);
diff --git a/apps/start/src/components/charts/composed-chart.tsx b/apps/start/src/components/charts/composed-chart.tsx
index 77fe6b537..fba314ce1 100644
--- a/apps/start/src/components/charts/composed-chart.tsx
+++ b/apps/start/src/components/charts/composed-chart.tsx
@@ -1,7 +1,7 @@
-"use client";
+'use client';
-import { ParentSize } from "@visx/responsive";
-import type { Transition } from "motion/react";
+import { ParentSize } from '@visx/responsive';
+import type { Transition } from 'motion/react';
import {
Children,
isValidElement,
@@ -9,13 +9,13 @@ import {
type ReactNode,
useMemo,
useRef,
-} from "react";
-import { cn } from "@/lib/utils";
-import { Area, type AreaProps } from "./area";
-import type { LineConfig, Margin } from "./chart-context";
-import { Line, type LineProps } from "./line";
-import { SeriesBar, type SeriesBarProps } from "./series-bar";
-import { TimeSeriesChartInner } from "./time-series-chart-shell";
+} from 'react';
+import { cn } from '@/lib/utils';
+import { Area, type AreaProps } from './area';
+import type { LineConfig, Margin } from './chart-context';
+import { Line, type LineProps } from './line';
+import { SeriesBar, type SeriesBarProps } from './series-bar';
+import { TimeSeriesChartInner } from './time-series-chart-shell';
export interface ComposedChartProps {
/** Data array — each row typically has a date and multiple numeric series */
@@ -47,9 +47,9 @@ const DEFAULT_MARGIN: Margin = { top: 40, right: 40, bottom: 40, left: 40 };
function getChildComponentName(child: ReactElement): string {
const childType = child.type as { displayName?: string; name?: string };
- return typeof child.type === "function"
- ? childType.displayName || childType.name || ""
- : "";
+ return typeof child.type === 'function'
+ ? childType.displayName || childType.name || ''
+ : '';
}
function upsertLineConfig(lines: LineConfig[], config: LineConfig): void {
@@ -68,7 +68,7 @@ function tryAppendSeriesBar(
barDataKeys: string[]
): boolean {
const name = getChildComponentName(child);
- if (!(child.type === SeriesBar || name === "SeriesBar")) {
+ if (!(child.type === SeriesBar || name === 'SeriesBar')) {
return false;
}
const props = child.props as SeriesBarProps;
@@ -78,7 +78,7 @@ function tryAppendSeriesBar(
barDataKeys.push(props.dataKey);
upsertLineConfig(lines, {
dataKey: props.dataKey,
- stroke: props.stroke || props.fill || "var(--chart-line-primary)",
+ stroke: props.stroke || props.fill || 'var(--chart-line-primary)',
strokeWidth: 0,
});
return true;
@@ -86,14 +86,14 @@ function tryAppendSeriesBar(
function tryAppendLine(child: ReactElement, lines: LineConfig[]): boolean {
const name = getChildComponentName(child);
- if (!(child.type === Line || name === "Line")) {
+ if (!(child.type === Line || name === 'Line')) {
return false;
}
const props = child.props as LineProps;
if (props.dataKey) {
upsertLineConfig(lines, {
dataKey: props.dataKey,
- stroke: props.stroke || "var(--chart-line-primary)",
+ stroke: props.stroke || 'var(--chart-line-primary)',
strokeWidth: props.strokeWidth ?? 2.5,
});
}
@@ -102,14 +102,14 @@ function tryAppendLine(child: ReactElement, lines: LineConfig[]): boolean {
function tryAppendArea(child: ReactElement, lines: LineConfig[]): boolean {
const name = getChildComponentName(child);
- if (!(child.type === Area || name === "Area")) {
+ if (!(child.type === Area || name === 'Area')) {
return false;
}
const props = child.props as AreaProps;
if (props.dataKey) {
upsertLineConfig(lines, {
dataKey: props.dataKey,
- stroke: props.stroke || props.fill || "var(--chart-line-primary)",
+ stroke: props.stroke || props.fill || 'var(--chart-line-primary)',
strokeWidth: props.strokeWidth ?? 2,
});
}
@@ -150,7 +150,7 @@ function computeComposedYScaleDomainMax(
let barSum = 0;
for (const k of barDataKeys) {
const v = d[k];
- if (typeof v === "number") {
+ if (typeof v === 'number') {
barSum += v;
}
}
@@ -160,7 +160,7 @@ function computeComposedYScaleDomainMax(
continue;
}
const v = d[line.dataKey];
- if (typeof v === "number") {
+ if (typeof v === 'number') {
rowMaxOther = Math.max(rowMaxOther, v);
}
}
@@ -226,7 +226,7 @@ function ChartInner({
for (const key of barDataKeys) {
pointOffsets.set(key, cumulative);
const v = d[key];
- if (typeof v === "number") {
+ if (typeof v === 'number') {
cumulative += v;
}
}
@@ -273,14 +273,14 @@ function ChartInner({
export function ComposedChart({
data,
- xDataKey = "date",
+ xDataKey = 'date',
margin: marginProp,
animationDuration = 1100,
animationEasing,
enterTransition,
revealSignature,
- aspectRatio = "2 / 1",
- className = "",
+ aspectRatio = '2 / 1',
+ className = '',
children,
barSize,
maxBarSize,
@@ -293,9 +293,9 @@ export function ComposedChart({
return (
<div
- className={cn("relative w-full", className)}
+ className={cn('relative w-full', className)}
ref={containerRef}
- style={{ aspectRatio, touchAction: "none" }}
+ style={{ aspectRatio, touchAction: 'none' }}
>
<ParentSize debounceTime={10}>
{({ width, height }) => (
@@ -324,6 +324,6 @@ export function ComposedChart({
);
}
-ComposedChart.displayName = "ComposedChart";
+ComposedChart.displayName = 'ComposedChart';
export default ComposedChart;
diff --git a/apps/start/src/components/charts/dash-tail-stroke.tsx b/apps/start/src/components/charts/dash-tail-stroke.tsx
index becbca5fa..099407067 100644
--- a/apps/start/src/components/charts/dash-tail-stroke.tsx
+++ b/apps/start/src/components/charts/dash-tail-stroke.tsx
@@ -1,6 +1,6 @@
-"use client";
+'use client';
-import { useId } from "react";
+import { useId } from 'react';
export interface DashTailStrokeProps {
/** SVG path `d` for the full series (single curved path). */
@@ -30,7 +30,7 @@ export function DashTailStroke({
strokeWidth,
dashArray,
}: DashTailStrokeProps) {
- const clipPathId = useId().replace(/:/g, "");
+ const clipPathId = useId().replace(/:/g, '');
if (!pathD || pathLength <= 0 || dashStartLength >= pathLength) {
return null;
diff --git a/apps/start/src/components/charts/decimate-time-series.ts b/apps/start/src/components/charts/decimate-time-series.ts
index 7749a0c2a..c0b298c6c 100644
--- a/apps/start/src/components/charts/decimate-time-series.ts
+++ b/apps/start/src/components/charts/decimate-time-series.ts
@@ -11,7 +11,7 @@ export function decimateTimeSeries<T extends Record<string, unknown>>(
const getY = (point: T, index: number): number => {
if (valueKeys.length === 0) {
for (const val of Object.values(point)) {
- if (typeof val === "number") {
+ if (typeof val === 'number') {
return val;
}
}
@@ -22,7 +22,7 @@ export function decimateTimeSeries<T extends Record<string, unknown>>(
let count = 0;
for (const key of valueKeys) {
const val = point[key];
- if (typeof val === "number") {
+ if (typeof val === 'number') {
sum += val;
count++;
}
@@ -115,10 +115,10 @@ export function decimateOhlcData<T extends Record<string, unknown>>(
for (const row of bucket) {
const rowHigh = row.high;
const rowLow = row.low;
- if (typeof rowHigh === "number" && rowHigh > high) {
+ if (typeof rowHigh === 'number' && rowHigh > high) {
high = rowHigh;
}
- if (typeof rowLow === "number" && rowLow < low) {
+ if (typeof rowLow === 'number' && rowLow < low) {
low = rowLow;
}
}
diff --git a/apps/start/src/components/charts/fade-edges.ts b/apps/start/src/components/charts/fade-edges.ts
index 99cbad07b..8d1c50a68 100644
--- a/apps/start/src/components/charts/fade-edges.ts
+++ b/apps/start/src/components/charts/fade-edges.ts
@@ -1,4 +1,4 @@
-export type FadeEdges = boolean | "left" | "right";
+export type FadeEdges = boolean | 'left' | 'right';
export interface FadeSides {
/** Whether the left edge should fade out. */
@@ -13,10 +13,10 @@ export function resolveFadeSides(fade: FadeEdges): FadeSides {
if (fade === false) {
return { left: false, right: false, any: false };
}
- if (fade === "left") {
+ if (fade === 'left') {
return { left: true, right: false, any: true };
}
- if (fade === "right") {
+ if (fade === 'right') {
return { left: false, right: true, any: true };
}
return { left: true, right: true, any: true };
@@ -33,9 +33,9 @@ export interface FadeGradientStop {
*/
export function fadeGradientStops(sides: FadeSides): FadeGradientStop[] {
return [
- { offset: "0%", opacity: sides.left ? 0 : 1 },
- { offset: "15%", opacity: 1 },
- { offset: "85%", opacity: 1 },
- { offset: "100%", opacity: sides.right ? 0 : 1 },
+ { offset: '0%', opacity: sides.left ? 0 : 1 },
+ { offset: '15%', opacity: 1 },
+ { offset: '85%', opacity: 1 },
+ { offset: '100%', opacity: sides.right ? 0 : 1 },
];
}
diff --git a/apps/start/src/components/charts/grid.tsx b/apps/start/src/components/charts/grid.tsx
index 08bf38377..42e322f47 100644
--- a/apps/start/src/components/charts/grid.tsx
+++ b/apps/start/src/components/charts/grid.tsx
@@ -1,8 +1,8 @@
-"use client";
+'use client';
-import { GridColumns, GridRows } from "@visx/grid";
-import { useId } from "react";
-import { chartCssVars, useChartStable } from "./chart-context";
+import { GridColumns, GridRows } from '@visx/grid';
+import { useId } from 'react';
+import { chartCssVars, useChartStable } from './chart-context';
export interface GridProps {
/** Show horizontal grid lines. Default: true */
@@ -48,12 +48,12 @@ export function Grid({
stroke = chartCssVars.grid,
strokeOpacity = 1,
strokeWidth = 1,
- strokeDasharray = "4,4",
+ strokeDasharray = '4,4',
highlightRowValues,
highlightRowStroke = chartCssVars.foregroundMuted,
highlightRowStrokeOpacity = 1,
highlightRowStrokeWidth = 1,
- highlightRowStrokeDasharray = "0",
+ highlightRowStrokeDasharray = '0',
fadeHorizontal = true,
fadeVertical = false,
}: GridProps) {
@@ -63,7 +63,7 @@ export function Grid({
// For bar charts, determine which scale to use for grid lines
// Horizontal bar charts: vertical grid should use yScale (value scale)
// Vertical bar charts: horizontal grid uses yScale (value scale)
- const isHorizontalBarChart = orientation === "horizontal" && barScale;
+ const isHorizontalBarChart = orientation === 'horizontal' && barScale;
// For vertical grid lines in horizontal bar charts, use yScale (the value scale)
// For time-based charts, use xScale
@@ -84,12 +84,12 @@ export function Grid({
{horizontal && fadeHorizontal && (
<defs>
<linearGradient id={hGradientId} x1="0%" x2="100%" y1="0%" y2="0%">
- <stop offset="0%" style={{ stopColor: "white", stopOpacity: 0 }} />
- <stop offset="10%" style={{ stopColor: "white", stopOpacity: 1 }} />
- <stop offset="90%" style={{ stopColor: "white", stopOpacity: 1 }} />
+ <stop offset="0%" style={{ stopColor: 'white', stopOpacity: 0 }} />
+ <stop offset="10%" style={{ stopColor: 'white', stopOpacity: 1 }} />
+ <stop offset="90%" style={{ stopColor: 'white', stopOpacity: 1 }} />
<stop
offset="100%"
- style={{ stopColor: "white", stopOpacity: 0 }}
+ style={{ stopColor: 'white', stopOpacity: 0 }}
/>
</linearGradient>
<mask id={hMaskId}>
@@ -108,12 +108,12 @@ export function Grid({
{vertical && fadeVertical && (
<defs>
<linearGradient id={vGradientId} x1="0%" x2="0%" y1="0%" y2="100%">
- <stop offset="0%" style={{ stopColor: "white", stopOpacity: 0 }} />
- <stop offset="10%" style={{ stopColor: "white", stopOpacity: 1 }} />
- <stop offset="90%" style={{ stopColor: "white", stopOpacity: 1 }} />
+ <stop offset="0%" style={{ stopColor: 'white', stopOpacity: 0 }} />
+ <stop offset="10%" style={{ stopColor: 'white', stopOpacity: 1 }} />
+ <stop offset="90%" style={{ stopColor: 'white', stopOpacity: 1 }} />
<stop
offset="100%"
- style={{ stopColor: "white", stopOpacity: 0 }}
+ style={{ stopColor: 'white', stopOpacity: 0 }}
/>
</linearGradient>
<mask id={vMaskId}>
@@ -166,7 +166,7 @@ export function Grid({
})}
</g>
) : null}
- {vertical && columnScale && typeof columnScale === "function" && (
+ {vertical && columnScale && typeof columnScale === 'function' && (
<g mask={fadeVertical ? `url(#${vMaskId})` : undefined}>
<GridColumns
height={innerHeight}
@@ -183,6 +183,6 @@ export function Grid({
);
}
-Grid.displayName = "Grid";
+Grid.displayName = 'Grid';
export default Grid;
diff --git a/apps/start/src/components/charts/highlight-segment-bounds.ts b/apps/start/src/components/charts/highlight-segment-bounds.ts
index 19e66a912..4fc0a9136 100644
--- a/apps/start/src/components/charts/highlight-segment-bounds.ts
+++ b/apps/start/src/components/charts/highlight-segment-bounds.ts
@@ -1,5 +1,5 @@
-import type { TooltipData } from "./chart-context";
-import type { ChartSelection } from "./use-chart-interaction";
+import type { TooltipData } from './chart-context';
+import type { ChartSelection } from './use-chart-interaction';
// Pure geometry for the hover-highlight band, split out from the hook so it can
// be unit-tested without React/motion (see __tests__).
@@ -36,9 +36,9 @@ export function computeSegmentBounds(
data: Record<string, unknown>[],
xScale: (value: Date) => number | undefined,
xAccessor: (d: Record<string, unknown>) => Date,
- tooltipData: Pick<TooltipData, "index"> | null | undefined,
+ tooltipData: Pick<TooltipData, 'index'> | null | undefined,
selection:
- | Pick<ChartSelection, "active" | "startX" | "endX">
+ | Pick<ChartSelection, 'active' | 'startX' | 'endX'>
| null
| undefined
): SegmentBounds {
diff --git a/apps/start/src/components/charts/highlight-segment.tsx b/apps/start/src/components/charts/highlight-segment.tsx
index aa6295ab1..a7d41f104 100644
--- a/apps/start/src/components/charts/highlight-segment.tsx
+++ b/apps/start/src/components/charts/highlight-segment.tsx
@@ -1,7 +1,7 @@
-"use client";
+'use client';
-import { type MotionValue, motion } from "motion/react";
-import { type RefObject, useId } from "react";
+import { type MotionValue, motion } from 'motion/react';
+import { type RefObject, useId } from 'react';
// Hover-highlight overlay: re-strokes the base path `d`, clipped to a vertical
// band whose x/width spring to track the hovered point, so only the segment
@@ -47,19 +47,19 @@ export function HighlightSegment({
<motion.path
animate={{ opacity: 1 }}
clipPath={`url(#${clipId})`}
- d={pathRef.current.getAttribute("d") || ""}
+ d={pathRef.current.getAttribute('d') || ''}
exit={{ opacity: 0 }}
fill="none"
initial={{ opacity: 0 }}
stroke={stroke}
strokeLinecap="round"
strokeWidth={strokeWidth}
- transition={{ duration: 0.4, ease: "easeInOut" }}
+ transition={{ duration: 0.4, ease: 'easeInOut' }}
/>
</>
);
}
-HighlightSegment.displayName = "HighlightSegment";
+HighlightSegment.displayName = 'HighlightSegment';
export default HighlightSegment;
diff --git a/apps/start/src/components/charts/line-chart.tsx b/apps/start/src/components/charts/line-chart.tsx
index baea6d28a..f8d6cf238 100644
--- a/apps/start/src/components/charts/line-chart.tsx
+++ b/apps/start/src/components/charts/line-chart.tsx
@@ -1,7 +1,7 @@
-"use client";
+'use client';
-import { ParentSize } from "@visx/responsive";
-import type { Transition } from "motion/react";
+import { ParentSize } from '@visx/responsive';
+import type { Transition } from 'motion/react';
import {
Children,
isValidElement,
@@ -9,11 +9,11 @@ import {
type ReactNode,
useMemo,
useRef,
-} from "react";
-import { cn } from "@/lib/utils";
-import type { LineConfig, Margin } from "./chart-context";
-import { Line, type LineProps } from "./line";
-import { TimeSeriesChartInner } from "./time-series-chart-shell";
+} from 'react';
+import { cn } from '@/lib/utils';
+import type { LineConfig, Margin } from './chart-context';
+import { Line, type LineProps } from './line';
+import { TimeSeriesChartInner } from './time-series-chart-shell';
export interface LineChartProps {
/** Data array - each item should have a date field and numeric values */
@@ -40,20 +40,20 @@ const DEFAULT_MARGIN: Margin = { top: 40, right: 40, bottom: 40, left: 40 };
/** Series renderers that carry a dataKey but must not drive the shared y-domain. */
const LINE_DOMAIN_EXCLUDED_NAMES = new Set([
- "ProfitLossLine",
- "Area",
- "SeriesBar",
- "Scatter",
- "Candlestick",
- "Bar",
- "PatternArea",
+ 'ProfitLossLine',
+ 'Area',
+ 'SeriesBar',
+ 'Scatter',
+ 'Candlestick',
+ 'Bar',
+ 'PatternArea',
]);
function getChildComponentName(child: ReactElement) {
const childType = child.type as { displayName?: string; name?: string };
- return typeof child.type === "function"
- ? childType.displayName || childType.name || ""
- : "";
+ return typeof child.type === 'function'
+ ? childType.displayName || childType.name || ''
+ : '';
}
function registersLineDomain(
@@ -65,14 +65,14 @@ function registersLineDomain(
}
const componentName = getChildComponentName(child);
- if (componentName === "Line" || child.type === Line) {
+ if (componentName === 'Line' || child.type === Line) {
return true;
}
if (LINE_DOMAIN_EXCLUDED_NAMES.has(componentName)) {
return false;
}
// MDX / duplicate bundle instances may not share the same `Line` reference.
- return typeof props.dataKey === "string" && props.dataKey.length > 0;
+ return typeof props.dataKey === 'string' && props.dataKey.length > 0;
}
function extractLineConfigs(children: ReactNode): LineConfig[] {
@@ -89,7 +89,7 @@ function extractLineConfigs(children: ReactNode): LineConfig[] {
if (registersLineDomain(child, props) && props?.dataKey) {
configs.push({
dataKey: props.dataKey,
- stroke: props.stroke || "var(--chart-line-primary)",
+ stroke: props.stroke || 'var(--chart-line-primary)',
strokeWidth: props.strokeWidth || 2.5,
});
return;
@@ -157,14 +157,14 @@ function ChartInner({
export function LineChart({
data,
- xDataKey = "date",
+ xDataKey = 'date',
margin: marginProp,
animationDuration = 1100,
animationEasing,
enterTransition,
revealSignature,
- aspectRatio = "2 / 1",
- className = "",
+ aspectRatio = '2 / 1',
+ className = '',
children,
}: LineChartProps) {
const containerRef = useRef<HTMLDivElement>(null);
@@ -172,9 +172,9 @@ export function LineChart({
return (
<div
- className={cn("relative w-full", className)}
+ className={cn('relative w-full', className)}
ref={containerRef}
- style={{ aspectRatio, touchAction: "none" }}
+ style={{ aspectRatio, touchAction: 'none' }}
>
<ParentSize debounceTime={10}>
{({ width, height }) => (
@@ -198,6 +198,6 @@ export function LineChart({
);
}
-export { Line, type LineProps } from "./line";
+export { Line, type LineProps } from './line';
export default LineChart;
diff --git a/apps/start/src/components/charts/line.tsx b/apps/start/src/components/charts/line.tsx
index 673f84dff..cab61c237 100644
--- a/apps/start/src/components/charts/line.tsx
+++ b/apps/start/src/components/charts/line.tsx
@@ -1,28 +1,28 @@
-"use client";
+'use client';
-import { curveNatural } from "@visx/curve";
-import { LinePath } from "@visx/shape";
+import { curveNatural } from '@visx/curve';
+import { LinePath } from '@visx/shape';
// CurveFactory type - simplified version compatible with visx
// biome-ignore lint/suspicious/noExplicitAny: d3 curve factory type
type CurveFactory = any;
-import { useCallback, useId, useRef } from "react";
-import { chartCssVars, useChartStable } from "./chart-context";
+import { useCallback, useId, useRef } from 'react';
+import { chartCssVars, useChartStable } from './chart-context';
import {
type FadeEdges,
fadeGradientStops,
resolveFadeSides,
-} from "./fade-edges";
+} from './fade-edges';
import {
resolveDashTailBounds,
usePathStrokeMetrics,
-} from "./path-stroke-utils";
-import { SeriesDashTailOverlay } from "./series-dash-tail-overlay";
-import { SeriesHighlightLayer } from "./series-highlight-layer";
-import { SeriesHoverDim } from "./series-hover-dim";
-import { SeriesMarkers } from "./series-markers";
-import type { SeriesPointMarkerStyle } from "./series-point-marker";
+} from './path-stroke-utils';
+import { SeriesDashTailOverlay } from './series-dash-tail-overlay';
+import { SeriesHighlightLayer } from './series-highlight-layer';
+import { SeriesHoverDim } from './series-hover-dim';
+import { SeriesMarkers } from './series-markers';
+import type { SeriesPointMarkerStyle } from './series-point-marker';
export interface LineProps {
/** Key in data to use for y values */
@@ -68,7 +68,7 @@ export function Line({
showMarkers = false,
markers,
dashFromIndex,
- dashArray = "6,4",
+ dashArray = '6,4',
}: LineProps) {
// Stable slice only: hover state lives inside `<SeriesHoverDim>` and
// `<SeriesHighlightLayer>` so this component (and its expensive
@@ -96,7 +96,7 @@ export function Line({
const getY = useCallback(
(d: Record<string, unknown>) => {
const value = d[dataKey];
- return typeof value === "number" ? (yScale(value) ?? 0) : 0;
+ return typeof value === 'number' ? (yScale(value) ?? 0) : 0;
},
[dataKey, yScale]
);
@@ -127,7 +127,7 @@ export function Line({
curve={curve}
data={renderData}
innerRef={pathRef}
- stroke={hasDashTail ? "transparent" : lineStroke}
+ stroke={hasDashTail ? 'transparent' : lineStroke}
strokeLinecap="round"
strokeWidth={strokeWidth}
x={(d) => xScale(xAccessor(d)) ?? 0}
@@ -170,6 +170,6 @@ export function Line({
);
}
-Line.displayName = "Line";
+Line.displayName = 'Line';
export default Line;
diff --git a/apps/start/src/components/charts/markers/chart-markers.tsx b/apps/start/src/components/charts/markers/chart-markers.tsx
index 0c31906ee..c1a155620 100644
--- a/apps/start/src/components/charts/markers/chart-markers.tsx
+++ b/apps/start/src/components/charts/markers/chart-markers.tsx
@@ -1,8 +1,8 @@
-"use client";
+'use client';
-import { useCallback, useMemo } from "react";
-import { chartCssVars, useChart } from "../chart-context";
-import { type ChartMarker, MarkerGroup } from "./marker-group";
+import { useCallback, useMemo } from 'react';
+import { chartCssVars, useChart } from '../chart-context';
+import { type ChartMarker, MarkerGroup } from './marker-group';
export interface ChartMarkersProps {
/** Array of markers to display */
@@ -206,9 +206,9 @@ export function useActiveMarkers(items: ChartMarker[]) {
}, [tooltipData, items]);
}
-ChartMarkers.displayName = "ChartMarkers";
+ChartMarkers.displayName = 'ChartMarkers';
// Marker for SVG component detection (renders after mouse overlay for interaction)
(ChartMarkers as { __isChartMarkers?: boolean }).__isChartMarkers = true;
-MarkerTooltipContent.displayName = "MarkerTooltipContent";
+MarkerTooltipContent.displayName = 'MarkerTooltipContent';
export default ChartMarkers;
diff --git a/apps/start/src/components/charts/markers/index.ts b/apps/start/src/components/charts/markers/index.ts
index 32b9f1f7f..10e801ea8 100644
--- a/apps/start/src/components/charts/markers/index.ts
+++ b/apps/start/src/components/charts/markers/index.ts
@@ -4,9 +4,9 @@ export {
MarkerTooltipContent,
type MarkerTooltipContentProps,
useActiveMarkers,
-} from "./chart-markers";
+} from './chart-markers';
export {
type ChartMarker,
MarkerGroup,
type MarkerGroupProps,
-} from "./marker-group";
+} from './marker-group';
diff --git a/apps/start/src/components/charts/markers/marker-group.tsx b/apps/start/src/components/charts/markers/marker-group.tsx
index 73c6c6138..b6c1977ba 100644
--- a/apps/start/src/components/charts/markers/marker-group.tsx
+++ b/apps/start/src/components/charts/markers/marker-group.tsx
@@ -1,11 +1,11 @@
-"use client";
+'use client';
-import { AnimatePresence, motion } from "motion/react";
-import type * as React from "react";
-import { useState } from "react";
-import { createPortal } from "react-dom";
-import { cn } from "@/lib/utils";
-import { chartCssVars } from "../chart-context";
+import { AnimatePresence, motion } from 'motion/react';
+import type * as React from 'react';
+import { useState } from 'react';
+import { createPortal } from 'react-dom';
+import { cn } from '@/lib/utils';
+import { chartCssVars } from '../chart-context';
// Fan configuration
const FAN_RADIUS = 50;
@@ -29,7 +29,7 @@ export interface ChartMarker {
/** URL to navigate to when clicked */
href?: string;
/** Open href in new tab. Default: false */
- target?: "_blank" | "_self";
+ target?: '_blank' | '_self';
}
export interface MarkerGroupProps {
@@ -108,22 +108,22 @@ const markerEntranceVariants = {
hidden: {
scale: 0.85,
opacity: 0,
- filter: "blur(2px)",
+ filter: 'blur(2px)',
},
visible: {
scale: 1,
opacity: 1,
- filter: "blur(0px)",
+ filter: 'blur(0px)',
},
fanned: {
scale: 0.6,
opacity: 0,
- filter: "blur(2px)",
+ filter: 'blur(2px)',
},
muted: {
scale: 1,
opacity: 0.4,
- filter: "blur(0px)",
+ filter: 'blur(0px)',
},
};
@@ -156,11 +156,7 @@ export function MarkerGroup({
const hasMultiple = markers.length > 1;
const fannedMarkers =
maxFanned !== undefined ? markers.slice(0, maxFanned) : markers;
- const currentVariant = shouldFan
- ? "fanned"
- : isMuted
- ? "muted"
- : "visible";
+ const currentVariant = shouldFan ? 'fanned' : isMuted ? 'muted' : 'visible';
const getCirclePosition = (index: number, total: number) => {
const startAngle = -90 - FAN_ANGLE / 2;
@@ -216,8 +212,8 @@ export function MarkerGroup({
strokeDasharray="4,4"
strokeLinecap="round"
strokeWidth={1}
- style={{ pointerEvents: "none" }}
- transition={{ duration: 0.2, ease: "easeOut" }}
+ style={{ pointerEvents: 'none' }}
+ transition={{ duration: 0.2, ease: 'easeOut' }}
x1={0}
x2={0}
y1={size / 2 + 4}
@@ -231,13 +227,13 @@ export function MarkerGroup({
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}
onMouseMove={handleMouseMove}
- style={{ cursor: "pointer" }}
+ style={{ cursor: 'pointer' }}
>
<motion.g
animate={currentVariant}
- initial={animate ? "hidden" : currentVariant}
+ initial={animate ? 'hidden' : currentVariant}
transition={{
- type: "spring",
+ type: 'spring',
stiffness: 300,
damping: 25,
delay: animationDelay,
@@ -270,7 +266,7 @@ export function MarkerGroup({
animate={{ scale: 1, opacity: 1 }}
exit={{ scale: 0, opacity: 0 }}
initial={{ scale: 0, opacity: 0 }}
- transition={{ type: "spring", stiffness: 400, damping: 20 }}
+ transition={{ type: 'spring', stiffness: 400, damping: 20 }}
>
<circle
cx={size / 2 + badgeOffset}
@@ -314,7 +310,7 @@ export function MarkerGroup({
width: FAN_RADIUS * 2 + size,
height: FAN_RADIUS * 2 + size,
zIndex: 100,
- pointerEvents: shouldFan ? "auto" : "none",
+ pointerEvents: shouldFan ? 'auto' : 'none',
}}
>
{/* Center point offset - all fanned markers are positioned relative to this */}
@@ -351,7 +347,7 @@ export function MarkerGroup({
top: -size / 2,
}}
transition={{
- type: "spring",
+ type: 'spring',
stiffness: 400,
damping: 22,
delay: index * 0.04,
@@ -387,7 +383,7 @@ export function MarkerGroup({
left: -size * 0.25,
top: -size * 0.25,
}}
- transition={{ type: "spring", stiffness: 400, damping: 20 }}
+ transition={{ type: 'spring', stiffness: 400, damping: 20 }}
>
<div
className="h-full w-full rounded-full"
@@ -410,7 +406,7 @@ interface MarkerCircleProps {
color?: string;
onClick?: () => void;
href?: string;
- target?: "_blank" | "_self";
+ target?: '_blank' | '_self';
isClickable?: boolean;
/** Edge-to-edge icon (no 4px inset). */
iconFill?: boolean;
@@ -448,15 +444,15 @@ function MarkerCircle({
>
<div
style={{
- width: "100%",
- height: "100%",
- display: "flex",
- alignItems: "center",
- justifyContent: "center",
+ width: '100%',
+ height: '100%',
+ display: 'flex',
+ alignItems: 'center',
+ justifyContent: 'center',
color: chartCssVars.markerForeground,
fontSize: size * 0.5,
- overflow: "hidden",
- borderRadius: "50%",
+ overflow: 'hidden',
+ borderRadius: '50%',
}}
>
{icon}
@@ -472,7 +468,7 @@ function MarkerCircleHTML({
color,
onClick,
href,
- target = "_self",
+ target = '_self',
isClickable = false,
iconFill = false,
borderColor,
@@ -486,8 +482,8 @@ function MarkerCircleHTML({
if (onClick) {
onClick();
} else if (href) {
- if (target === "_blank") {
- window.open(href, "_blank", "noopener,noreferrer");
+ if (target === '_blank') {
+ window.open(href, '_blank', 'noopener,noreferrer');
} else {
window.location.href = href;
}
@@ -498,8 +494,8 @@ function MarkerCircleHTML({
return (
<motion.div
className={cn(
- "relative flex h-full w-full items-center justify-center rounded-full shadow-lg",
- hasAction && "cursor-pointer"
+ 'relative flex h-full w-full items-center justify-center rounded-full shadow-lg',
+ hasAction && 'cursor-pointer'
)}
onClick={hasAction ? handleClick : undefined}
style={{
@@ -508,12 +504,12 @@ function MarkerCircleHTML({
fontSize: size * 0.5,
color: chartCssVars.markerForeground,
padding: inset,
- overflow: "hidden",
+ overflow: 'hidden',
}}
- transition={{ type: "spring", stiffness: 400, damping: 17 }}
+ transition={{ type: 'spring', stiffness: 400, damping: 17 }}
whileHover={
hasAction
- ? { scale: 1.15, boxShadow: "0 4px 20px rgba(0,0,0,0.25)" }
+ ? { scale: 1.15, boxShadow: '0 4px 20px rgba(0,0,0,0.25)' }
: undefined
}
whileTap={hasAction ? { scale: 0.95 } : undefined}
@@ -523,6 +519,6 @@ function MarkerCircleHTML({
);
}
-MarkerGroup.displayName = "MarkerGroup";
+MarkerGroup.displayName = 'MarkerGroup';
export default MarkerGroup;
diff --git a/apps/start/src/components/charts/motion-utils.ts b/apps/start/src/components/charts/motion-utils.ts
index 77a79fe6c..adf21871f 100644
--- a/apps/start/src/components/charts/motion-utils.ts
+++ b/apps/start/src/components/charts/motion-utils.ts
@@ -1,5 +1,5 @@
-import type { Transition } from "motion/react";
-import { DEFAULT_CHART_ENTER_TRANSITION } from "./animation";
+import type { Transition } from 'motion/react';
+import { DEFAULT_CHART_ENTER_TRANSITION } from './animation';
export function transitionWithDelay(
transition: Transition | undefined,
@@ -23,15 +23,15 @@ export function springOptionsFromTransition(
if (!transition) {
return fallback;
}
- if (transition.type === "spring") {
+ if (transition.type === 'spring') {
const bounce =
- typeof transition.bounce === "number" ? transition.bounce : undefined;
+ typeof transition.bounce === 'number' ? transition.bounce : undefined;
const baseStiffness =
- typeof transition.stiffness === "number"
+ typeof transition.stiffness === 'number'
? transition.stiffness
: fallback.stiffness;
const baseDamping =
- typeof transition.damping === "number"
+ typeof transition.damping === 'number'
? transition.damping
: fallback.damping;
return {
@@ -44,11 +44,11 @@ export function springOptionsFromTransition(
? baseDamping
: Math.max(8, baseDamping * (1 - bounce * 0.25)),
mass:
- typeof transition.mass === "number" ? transition.mass : fallback.mass,
+ typeof transition.mass === 'number' ? transition.mass : fallback.mass,
};
}
const duration =
- "duration" in transition && typeof transition.duration === "number"
+ 'duration' in transition && typeof transition.duration === 'number'
? transition.duration
: 0.8;
return {
diff --git a/apps/start/src/components/charts/op-references.tsx b/apps/start/src/components/charts/op-references.tsx
index 441d008a1..d1579044d 100644
--- a/apps/start/src/components/charts/op-references.tsx
+++ b/apps/start/src/components/charts/op-references.tsx
@@ -20,7 +20,7 @@ export interface OPReferenceItem {
* marker rendering, which goes through OPMarkerLayer).
*/
export function toChartMarkers(
- items: OPReferenceItem[] | null | undefined,
+ items: OPReferenceItem[] | null | undefined
): ChartMarker[] {
if (!items || items.length === 0) return [];
return items.map((item) => ({
@@ -64,5 +64,7 @@ export function OPReferences({
return { anchorDate: date, items: [item] };
});
}, [items]);
- return <OPMarkerLayer clusters={clusters} showLines={showLines} size={size} />;
+ return (
+ <OPMarkerLayer clusters={clusters} showLines={showLines} size={size} />
+ );
}
diff --git a/apps/start/src/components/charts/op-series-dots.tsx b/apps/start/src/components/charts/op-series-dots.tsx
index e7989380d..d13ddfe2f 100644
--- a/apps/start/src/components/charts/op-series-dots.tsx
+++ b/apps/start/src/components/charts/op-series-dots.tsx
@@ -64,7 +64,7 @@ export function OPSeriesDots({ dots }: OPSeriesDotsProps) {
})}
</g>
</svg>,
- containerRef.current,
+ containerRef.current
);
}
diff --git a/apps/start/src/components/charts/path-stroke-utils.ts b/apps/start/src/components/charts/path-stroke-utils.ts
index 90adc88dd..d928ae2b3 100644
--- a/apps/start/src/components/charts/path-stroke-utils.ts
+++ b/apps/start/src/components/charts/path-stroke-utils.ts
@@ -1,4 +1,4 @@
-import { type RefObject, useEffect, useState } from "react";
+import { type RefObject, useEffect, useState } from 'react';
export function findPathLengthAtX(
path: SVGPathElement | null,
@@ -38,7 +38,7 @@ export function usePathStrokeMetrics(
return;
}
const len = path.getTotalLength();
- const d = path.getAttribute("d");
+ const d = path.getAttribute('d');
if (len > 0) {
setPathLength(len);
}
diff --git a/apps/start/src/components/charts/pattern-area.tsx b/apps/start/src/components/charts/pattern-area.tsx
index 99a317c81..e188af089 100644
--- a/apps/start/src/components/charts/pattern-area.tsx
+++ b/apps/start/src/components/charts/pattern-area.tsx
@@ -1,8 +1,8 @@
-"use client";
+'use client';
-import { curveMonotoneX } from "@visx/curve";
-import { AreaClosed } from "@visx/shape";
-import { useChartStable } from "./chart-context";
+import { curveMonotoneX } from '@visx/curve';
+import { AreaClosed } from '@visx/shape';
+import { useChartStable } from './chart-context';
// biome-ignore lint/suspicious/noExplicitAny: d3 curve factory type
type CurveFactory = any;
@@ -37,13 +37,13 @@ export function PatternArea({
x={(d) => xScale(xAccessor(d)) ?? 0}
y={(d) => {
const v = d[dataKey];
- return typeof v === "number" ? (yScale(v) ?? 0) : 0;
+ return typeof v === 'number' ? (yScale(v) ?? 0) : 0;
}}
yScale={yScale}
/>
);
}
-PatternArea.displayName = "PatternArea";
+PatternArea.displayName = 'PatternArea';
export default PatternArea;
diff --git a/apps/start/src/components/charts/series-bar.tsx b/apps/start/src/components/charts/series-bar.tsx
index 1da6b55fa..d9ded91ff 100644
--- a/apps/start/src/components/charts/series-bar.tsx
+++ b/apps/start/src/components/charts/series-bar.tsx
@@ -1,11 +1,11 @@
-"use client";
+'use client';
-import type { Transition } from "motion/react";
-import { motion } from "motion/react";
-import { useMemo } from "react";
-import { chartCssVars, useChart } from "./chart-context";
-import { transitionWithDelay } from "./motion-utils";
-import { computeSeriesBarWidth } from "./series-bar-layout";
+import type { Transition } from 'motion/react';
+import { motion } from 'motion/react';
+import { useMemo } from 'react';
+import { chartCssVars, useChart } from './chart-context';
+import { transitionWithDelay } from './motion-utils';
+import { computeSeriesBarWidth } from './series-bar-layout';
function computeSeriesBarLayout(input: {
stacked: boolean;
@@ -177,7 +177,7 @@ export function SeriesBar({
data.length > 1 ? staggerSpread / 1000 / data.length : 0;
if (barScale) {
console.warn(
- "SeriesBar is for time-based ComposedChart / LineChart context. Use Bar inside BarChart for categorical x."
+ 'SeriesBar is for time-based ComposedChart / LineChart context. Use Bar inside BarChart for categorical x.'
);
return null;
}
@@ -188,7 +188,7 @@ export function SeriesBar({
<g className="series-bar">
{data.map((d, i) => {
const value = d[dataKey];
- if (typeof value !== "number") {
+ if (typeof value !== 'number') {
return null;
}
@@ -256,7 +256,7 @@ export function SeriesBar({
);
}
-SeriesBar.displayName = "SeriesBar";
+SeriesBar.displayName = 'SeriesBar';
interface SeriesBarRectProps {
x: number;
diff --git a/apps/start/src/components/charts/series-dash-tail-overlay.tsx b/apps/start/src/components/charts/series-dash-tail-overlay.tsx
index 514e2d7d5..2580a45bf 100644
--- a/apps/start/src/components/charts/series-dash-tail-overlay.tsx
+++ b/apps/start/src/components/charts/series-dash-tail-overlay.tsx
@@ -1,8 +1,8 @@
-"use client";
+'use client';
-import { memo, useMemo } from "react";
-import { DashTailStroke } from "./dash-tail-stroke";
-import { resolveDashStartX, resolveDashTailBounds } from "./path-stroke-utils";
+import { memo, useMemo } from 'react';
+import { DashTailStroke } from './dash-tail-stroke';
+import { resolveDashStartX, resolveDashTailBounds } from './path-stroke-utils';
interface SeriesDashTailOverlayProps {
dashFromIndex?: number;
diff --git a/apps/start/src/components/charts/series-highlight-layer.tsx b/apps/start/src/components/charts/series-highlight-layer.tsx
index c2dbb3cb3..70cc14fe2 100644
--- a/apps/start/src/components/charts/series-highlight-layer.tsx
+++ b/apps/start/src/components/charts/series-highlight-layer.tsx
@@ -1,9 +1,9 @@
-"use client";
+'use client';
-import type { RefObject } from "react";
-import { useChartStable } from "./chart-context";
-import { HighlightSegment } from "./highlight-segment";
-import { useHighlightSegment } from "./use-highlight-segment";
+import type { RefObject } from 'react';
+import { useChartStable } from './chart-context';
+import { HighlightSegment } from './highlight-segment';
+import { useHighlightSegment } from './use-highlight-segment';
interface SeriesHighlightLayerProps {
/** Caller already gated `showHighlight && showLine`; this just routes through. */
@@ -44,6 +44,6 @@ export function SeriesHighlightLayer({
);
}
-SeriesHighlightLayer.displayName = "SeriesHighlightLayer";
+SeriesHighlightLayer.displayName = 'SeriesHighlightLayer';
export default SeriesHighlightLayer;
diff --git a/apps/start/src/components/charts/series-hover-dim.tsx b/apps/start/src/components/charts/series-hover-dim.tsx
index eb935a3dc..bb3e802e4 100644
--- a/apps/start/src/components/charts/series-hover-dim.tsx
+++ b/apps/start/src/components/charts/series-hover-dim.tsx
@@ -1,8 +1,8 @@
-"use client";
+'use client';
-import { motion } from "motion/react";
-import type { ReactNode } from "react";
-import { useChartHover } from "./chart-context";
+import { motion } from 'motion/react';
+import type { ReactNode } from 'react';
+import { useChartHover } from './chart-context';
interface SeriesHoverDimProps {
/** Skip the dim entirely. */
@@ -38,13 +38,13 @@ export function SeriesHoverDim({
<motion.g
animate={{ opacity }}
initial={{ opacity: 1 }}
- transition={{ duration: durationSec, ease: "easeInOut" }}
+ transition={{ duration: durationSec, ease: 'easeInOut' }}
>
{children}
</motion.g>
);
}
-SeriesHoverDim.displayName = "SeriesHoverDim";
+SeriesHoverDim.displayName = 'SeriesHoverDim';
export default SeriesHoverDim;
diff --git a/apps/start/src/components/charts/series-markers.tsx b/apps/start/src/components/charts/series-markers.tsx
index 7372f5d46..361f5ece6 100644
--- a/apps/start/src/components/charts/series-markers.tsx
+++ b/apps/start/src/components/charts/series-markers.tsx
@@ -1,18 +1,18 @@
-"use client";
+'use client';
-import { type ReactNode, useCallback, useMemo } from "react";
-import { clipRevealTransition } from "./animation";
+import { type ReactNode, useCallback, useMemo } from 'react';
+import { clipRevealTransition } from './animation';
import {
defaultScatterColors,
useChartHover,
useChartStable,
-} from "./chart-context";
+} from './chart-context';
import {
getSeriesMarkerVisualExtent,
SeriesPointMarker,
type SeriesPointMarkerStyle,
StaticSeriesPointMarker,
-} from "./series-point-marker";
+} from './series-point-marker';
export interface SeriesMarkersProps extends SeriesPointMarkerStyle {
dataKey: string;
@@ -104,7 +104,7 @@ export function SeriesMarkers({
const getY = useCallback(
(d: Record<string, unknown>) => {
const value = d[dataKey];
- return typeof value === "number" ? (yScale(value) ?? 0) : null;
+ return typeof value === 'number' ? (yScale(value) ?? 0) : null;
},
[dataKey, yScale]
);
@@ -212,7 +212,7 @@ export function SeriesMarkers({
);
}
-SeriesMarkers.displayName = "SeriesMarkers";
+SeriesMarkers.displayName = 'SeriesMarkers';
interface SeriesMarkersDimWrapperProps {
enabled: boolean;
@@ -238,9 +238,9 @@ function SeriesMarkersDimWrapper({
<g
opacity={dimBase ? inactiveOpacity : 1}
style={{
- transition: "opacity 0.15s ease-in-out, filter 0.15s ease-in-out",
+ transition: 'opacity 0.15s ease-in-out, filter 0.15s ease-in-out',
filter:
- dimBase && inactiveBlur > 0 ? `blur(${inactiveBlur}px)` : "none",
+ dimBase && inactiveBlur > 0 ? `blur(${inactiveBlur}px)` : 'none',
}}
>
{children}
diff --git a/apps/start/src/components/charts/series-point-marker.tsx b/apps/start/src/components/charts/series-point-marker.tsx
index d352bd3db..5547612de 100644
--- a/apps/start/src/components/charts/series-point-marker.tsx
+++ b/apps/start/src/components/charts/series-point-marker.tsx
@@ -1,9 +1,9 @@
-"use client";
+'use client';
-import type { Variants } from "motion/react";
-import { motion } from "motion/react";
-import { memo } from "react";
-import { DEFAULT_CHART_ENTER_TRANSITION } from "./animation";
+import type { Variants } from 'motion/react';
+import { motion } from 'motion/react';
+import { memo } from 'react';
+import { DEFAULT_CHART_ENTER_TRANSITION } from './animation';
export interface SeriesPointMarkerStyle {
/** Fill color for the inner circle */
@@ -54,7 +54,7 @@ function MarkerCircles({
outlineColor,
radius,
}: MarkerCirclesProps) {
- const resolvedStroke = stroke ?? fill ?? "currentColor";
+ const resolvedStroke = stroke ?? fill ?? 'currentColor';
const resolvedOutlineColor = outlineColor ?? resolvedStroke;
const ringOuter = strokeWidth > 0 ? radius + ringGap + strokeWidth : radius;
const outlineRadius = outlineWidth > 0 ? ringOuter + outlineWidth / 2 : 0;
@@ -155,7 +155,7 @@ export function SeriesPointMarker({
},
visible: {
opacity: 1,
- filter: "blur(0px)",
+ filter: 'blur(0px)',
scale: 1,
transition: {
delay: revealDelay,
@@ -190,11 +190,11 @@ export function SeriesPointMarker({
export function getSeriesMarkerVisualExtent(
style: Pick<
SeriesPointMarkerStyle,
- | "radius"
- | "strokeWidth"
- | "ringGap"
- | "outlineWidth"
- | "showActiveHighlight"
+ | 'radius'
+ | 'strokeWidth'
+ | 'ringGap'
+ | 'outlineWidth'
+ | 'showActiveHighlight'
>
): number {
const radius = style.radius ?? 5;
diff --git a/apps/start/src/components/charts/time-series-chart-shell.tsx b/apps/start/src/components/charts/time-series-chart-shell.tsx
index 70ef5702e..8bffe6d6c 100644
--- a/apps/start/src/components/charts/time-series-chart-shell.tsx
+++ b/apps/start/src/components/charts/time-series-chart-shell.tsx
@@ -1,8 +1,8 @@
-"use client";
+'use client';
-import { scaleLinear, scaleTime } from "@visx/scale";
-import { bisector, extent } from "d3-array";
-import type { Transition } from "motion/react";
+import { scaleLinear, scaleTime } from '@visx/scale';
+import { bisector, extent } from 'd3-array';
+import type { Transition } from 'motion/react';
import {
Children,
cloneElement,
@@ -14,21 +14,21 @@ import {
useEffect,
useMemo,
useState,
-} from "react";
-import { DEFAULT_ANIMATION_EASING } from "./animation";
-import { ChartProvider, type LineConfig, type Margin } from "./chart-context";
-import { isGradientDefComponent, isPatternDefComponent } from "./chart-defs";
-import { shortDateFmt } from "./chart-formatters";
-import { ChartRevealClip } from "./chart-reveal-clip";
+} from 'react';
+import { DEFAULT_ANIMATION_EASING } from './animation';
+import { ChartProvider, type LineConfig, type Margin } from './chart-context';
+import { isGradientDefComponent, isPatternDefComponent } from './chart-defs';
+import { shortDateFmt } from './chart-formatters';
+import { ChartRevealClip } from './chart-reveal-clip';
import {
decimateTimeSeries,
maxRenderPointsForWidth,
-} from "./decimate-time-series";
+} from './decimate-time-series';
import {
computeSeriesBarRevealClipPadding,
computeSeriesBarWidth,
-} from "./series-bar-layout";
-import { useChartInteraction } from "./use-chart-interaction";
+} from './series-bar-layout';
+import { useChartInteraction } from './use-chart-interaction';
function collectNumericExtents(
data: Record<string, unknown>[],
@@ -40,7 +40,7 @@ function collectNumericExtents(
for (const d of data) {
for (const key of dataKeys) {
const value = d[key];
- if (typeof value === "number") {
+ if (typeof value === 'number') {
if (value < minValue) {
minValue = value;
}
@@ -91,11 +91,11 @@ export function isPostOverlayComponent(child: ReactElement): boolean {
}
const componentName =
- typeof child.type === "function"
- ? childType.displayName || childType.name || ""
- : "";
+ typeof child.type === 'function'
+ ? childType.displayName || childType.name || ''
+ : '';
- return componentName === "ChartMarkers" || componentName === "MarkerGroup";
+ return componentName === 'ChartMarkers' || componentName === 'MarkerGroup';
}
function ensureChildKey(child: ReactElement, index: number): ReactElement {
@@ -151,7 +151,7 @@ const TimeSeriesChartCore = memo(function TimeSeriesChartCore({
animationDuration,
animationEasing = DEFAULT_ANIMATION_EASING,
enterTransition,
- revealSignature = "",
+ revealSignature = '',
children,
containerRef,
lines,
@@ -360,7 +360,7 @@ const TimeSeriesChartCore = memo(function TimeSeriesChartCore({
// animationDuration so clipRevealTransition picks up the override instead
// of falling back to its 1100ms default.
const effectiveEnterTransition: Transition = enterTransition ?? {
- type: "tween",
+ type: 'tween',
duration: animationDuration / 1000,
};
diff --git a/apps/start/src/components/charts/tooltip/chart-tooltip.tsx b/apps/start/src/components/charts/tooltip/chart-tooltip.tsx
index e9237d255..34752ad16 100644
--- a/apps/start/src/components/charts/tooltip/chart-tooltip.tsx
+++ b/apps/start/src/components/charts/tooltip/chart-tooltip.tsx
@@ -1,21 +1,21 @@
-"use client";
+'use client';
-import { motion, useSpring } from "motion/react";
-import { memo, useEffect, useMemo, useState } from "react";
-import { createPortal } from "react-dom";
-import { type SpringConfig, useChartConfig } from "../chart-config-context";
+import { motion, useSpring } from 'motion/react';
+import { memo, useEffect, useMemo, useState } from 'react';
+import { createPortal } from 'react-dom';
+import { type SpringConfig, useChartConfig } from '../chart-config-context';
import {
chartCssVars,
type LineConfig,
useChart,
useChartStable,
-} from "../chart-context";
-import { weekdayDateFmt } from "../chart-formatters";
-import { DateTicker } from "./date-ticker";
-import { TooltipBox } from "./tooltip-box";
-import { TooltipContent, type TooltipRow } from "./tooltip-content";
-import { TooltipDot } from "./tooltip-dot";
-import { TooltipIndicator } from "./tooltip-indicator";
+} from '../chart-context';
+import { weekdayDateFmt } from '../chart-formatters';
+import { DateTicker } from './date-ticker';
+import { TooltipBox } from './tooltip-box';
+import { TooltipContent, type TooltipRow } from './tooltip-content';
+import { TooltipDot } from './tooltip-dot';
+import { TooltipIndicator } from './tooltip-indicator';
export interface ChartTooltipProps {
/** Whether to show the date pill at bottom. Default: true */
@@ -66,7 +66,7 @@ const ChartTooltipInner = memo(function ChartTooltipInner({
rows: rowsRenderer,
dotColor: dotColorProp,
children,
- className = "",
+ className = '',
container,
springConfig,
boxSpringConfig,
@@ -86,7 +86,7 @@ const ChartTooltipInner = memo(function ChartTooltipInner({
barXAccessor,
} = useChart();
- const isHorizontal = orientation === "horizontal";
+ const isHorizontal = orientation === 'horizontal';
const discreteInteraction = dateLabels.length > 60;
const visible = tooltipData !== null;
@@ -123,10 +123,10 @@ const ChartTooltipInner = memo(function ChartTooltipInner({
return tooltipRows[index].color;
}
if (dotColorProp != null) {
- if (typeof dotColorProp === "function" && tooltipData) {
+ if (typeof dotColorProp === 'function' && tooltipData) {
return dotColorProp(tooltipData.point, line);
}
- if (typeof dotColorProp === "string") {
+ if (typeof dotColorProp === 'string') {
return dotColorProp;
}
}
@@ -139,7 +139,7 @@ const ChartTooltipInner = memo(function ChartTooltipInner({
if (indicatorColorProp == null) {
return chartCssVars.crosshair;
}
- if (typeof indicatorColorProp === "function") {
+ if (typeof indicatorColorProp === 'function') {
return tooltipData
? indicatorColorProp(tooltipData.point)
: chartCssVars.crosshair;
@@ -268,7 +268,7 @@ export function ChartTooltip(props: ChartTooltipProps) {
return <ChartTooltipInner {...props} container={container} />;
}
-ChartTooltip.displayName = "ChartTooltip";
+ChartTooltip.displayName = 'ChartTooltip';
interface DatePillTrackerProps {
enabled: boolean;
@@ -310,7 +310,7 @@ function DatePillTrackerInner({
className="pointer-events-none absolute z-50"
style={{
left: discreteInteraction ? xWithMargin : animatedX,
- transform: "translateX(-50%)",
+ transform: 'translateX(-50%)',
bottom: 4,
}}
>
diff --git a/apps/start/src/components/charts/tooltip/date-ticker.tsx b/apps/start/src/components/charts/tooltip/date-ticker.tsx
index d4a99e061..f0cff737f 100644
--- a/apps/start/src/components/charts/tooltip/date-ticker.tsx
+++ b/apps/start/src/components/charts/tooltip/date-ticker.tsx
@@ -1,7 +1,7 @@
-"use client";
+'use client';
-import { motion, useSpring } from "motion/react";
-import { memo, useMemo, useRef } from "react";
+import { motion, useSpring } from 'motion/react';
+import { memo, useMemo, useRef } from 'react';
const TICKER_ITEM_HEIGHT = 24;
/** Full scroll stacks are skipped above this count — single label + instant updates. */
@@ -16,8 +16,8 @@ export interface DateTickerProps {
const DateTickerCompact = memo(function DateTickerCompact({
currentIndex,
labels,
-}: Omit<DateTickerProps, "visible">) {
- const label = labels[currentIndex] ?? labels[0] ?? "";
+}: Omit<DateTickerProps, 'visible'>) {
+ const label = labels[currentIndex] ?? labels[0] ?? '';
return (
<div className="overflow-hidden rounded-full bg-zinc-900 px-4 py-1 text-white shadow-lg dark:bg-zinc-100 dark:text-zinc-900">
@@ -31,13 +31,13 @@ const DateTickerCompact = memo(function DateTickerCompact({
const DateTickerInner = memo(function DateTickerInner({
currentIndex,
labels,
-}: Omit<DateTickerProps, "visible">) {
+}: Omit<DateTickerProps, 'visible'>) {
// Parse labels into month and day parts
const parsedLabels = useMemo(() => {
return labels.map((label, index) => {
- const parts = label.split(" ");
- const month = parts[0] || "";
- const day = parts[1] || "";
+ const parts = label.split(' ');
+ const month = parts[0] || '';
+ const day = parts[1] || '';
return { month, day, full: label, key: `${label}::${index}` };
});
}, [labels]);
@@ -145,6 +145,6 @@ export function DateTicker({ currentIndex, labels, visible }: DateTickerProps) {
return <DateTickerInner currentIndex={currentIndex} labels={labels} />;
}
-DateTicker.displayName = "DateTicker";
+DateTicker.displayName = 'DateTicker';
export default DateTicker;
diff --git a/apps/start/src/components/charts/tooltip/index.ts b/apps/start/src/components/charts/tooltip/index.ts
index 5b4dafcf0..87b50bc70 100644
--- a/apps/start/src/components/charts/tooltip/index.ts
+++ b/apps/start/src/components/charts/tooltip/index.ts
@@ -1,14 +1,14 @@
-export { ChartTooltip, type ChartTooltipProps } from "./chart-tooltip";
-export { DateTicker, type DateTickerProps } from "./date-ticker";
-export { TooltipBox, type TooltipBoxProps } from "./tooltip-box";
+export { ChartTooltip, type ChartTooltipProps } from './chart-tooltip';
+export { DateTicker, type DateTickerProps } from './date-ticker';
+export { TooltipBox, type TooltipBoxProps } from './tooltip-box';
export {
TooltipContent,
type TooltipContentProps,
type TooltipRow,
-} from "./tooltip-content";
-export { TooltipDot, type TooltipDotProps } from "./tooltip-dot";
+} from './tooltip-content';
+export { TooltipDot, type TooltipDotProps } from './tooltip-dot';
export {
type IndicatorWidth,
TooltipIndicator,
type TooltipIndicatorProps,
-} from "./tooltip-indicator";
+} from './tooltip-indicator';
diff --git a/apps/start/src/components/charts/tooltip/tooltip-box.tsx b/apps/start/src/components/charts/tooltip/tooltip-box.tsx
index af6a04496..0329a3f1c 100644
--- a/apps/start/src/components/charts/tooltip/tooltip-box.tsx
+++ b/apps/start/src/components/charts/tooltip/tooltip-box.tsx
@@ -1,11 +1,11 @@
-"use client";
+'use client';
-import { motion, useSpring } from "motion/react";
-import type { RefObject } from "react";
-import { useEffect, useLayoutEffect, useRef, useState } from "react";
-import { createPortal } from "react-dom";
-import { cn } from "@/lib/utils";
-import { type SpringConfig, useChartConfig } from "../chart-config-context";
+import { motion, useSpring } from 'motion/react';
+import type { RefObject } from 'react';
+import { useEffect, useLayoutEffect, useRef, useState } from 'react';
+import { createPortal } from 'react-dom';
+import { cn } from '@/lib/utils';
+import { type SpringConfig, useChartConfig } from '../chart-config-context';
export interface TooltipBoxProps {
/** X position in pixels (relative to container) */
@@ -61,14 +61,14 @@ function TooltipBoxInner({
containerWidth,
containerHeight,
offset = 16,
- className = "",
+ className = '',
children,
left: leftOverride,
top: topOverride,
flipped: flippedOverride,
springConfig,
container,
-}: Omit<TooltipBoxProps, "visible" | "containerRef"> & {
+}: Omit<TooltipBoxProps, 'visible' | 'containerRef'> & {
container: HTMLElement;
}) {
const { tooltipBoxSpring } = useChartConfig();
@@ -149,12 +149,12 @@ function TooltipBoxInner({
const finalLeft = leftOverride ?? animatedLeft;
const finalTop = topOverride ?? animatedTop;
const isFlipped = flippedOverride ?? shouldFlipX;
- const transformOrigin = isFlipped ? "right top" : "left top";
+ const transformOrigin = isFlipped ? 'right top' : 'left top';
return createPortal(
<motion.div
animate={{ opacity: 1 }}
- className={cn("pointer-events-none absolute z-50", className)}
+ className={cn('pointer-events-none absolute z-50', className)}
exit={{ opacity: 0 }}
initial={{ opacity: 0 }}
ref={tooltipRef}
@@ -167,7 +167,7 @@ function TooltipBoxInner({
initial={{ scale: 0.85, opacity: 0, x: isFlipped ? 20 : -20 }}
key={flipKey}
style={{ transformOrigin }}
- transition={{ type: "spring", stiffness: 300, damping: 25 }}
+ transition={{ type: 'spring', stiffness: 300, damping: 25 }}
>
{children}
</motion.div>
@@ -176,6 +176,6 @@ function TooltipBoxInner({
);
}
-TooltipBox.displayName = "TooltipBox";
+TooltipBox.displayName = 'TooltipBox';
export default TooltipBox;
diff --git a/apps/start/src/components/charts/tooltip/tooltip-content.tsx b/apps/start/src/components/charts/tooltip/tooltip-content.tsx
index 7e071190e..596d4bca5 100644
--- a/apps/start/src/components/charts/tooltip/tooltip-content.tsx
+++ b/apps/start/src/components/charts/tooltip/tooltip-content.tsx
@@ -1,7 +1,7 @@
-"use client";
+'use client';
-import type { ReactNode } from "react";
-import { intFmt } from "../chart-formatters";
+import type { ReactNode } from 'react';
+import { intFmt } from '../chart-formatters';
export interface TooltipRow {
color: string;
@@ -41,7 +41,7 @@ export function TooltipContent({ title, rows, children }: TooltipContentProps) {
</span>
</div>
<span className="font-medium text-chart-tooltip-foreground text-sm tabular-nums">
- {typeof row.value === "number" ? intFmt(row.value) : row.value}
+ {typeof row.value === 'number' ? intFmt(row.value) : row.value}
</span>
</div>
))}
@@ -57,6 +57,6 @@ export function TooltipContent({ title, rows, children }: TooltipContentProps) {
);
}
-TooltipContent.displayName = "TooltipContent";
+TooltipContent.displayName = 'TooltipContent';
export default TooltipContent;
diff --git a/apps/start/src/components/charts/tooltip/tooltip-dot.tsx b/apps/start/src/components/charts/tooltip/tooltip-dot.tsx
index f360a1f60..cb1cb3278 100644
--- a/apps/start/src/components/charts/tooltip/tooltip-dot.tsx
+++ b/apps/start/src/components/charts/tooltip/tooltip-dot.tsx
@@ -1,8 +1,8 @@
-"use client";
+'use client';
-import { motion, useSpring } from "motion/react";
-import { type SpringConfig, useChartConfig } from "../chart-config-context";
-import { chartCssVars } from "../chart-context";
+import { motion, useSpring } from 'motion/react';
+import { type SpringConfig, useChartConfig } from '../chart-config-context';
+import { chartCssVars } from '../chart-context';
export interface TooltipDotProps {
x: number;
@@ -50,6 +50,6 @@ export function TooltipDot({
);
}
-TooltipDot.displayName = "TooltipDot";
+TooltipDot.displayName = 'TooltipDot';
export default TooltipDot;
diff --git a/apps/start/src/components/charts/tooltip/tooltip-indicator.tsx b/apps/start/src/components/charts/tooltip/tooltip-indicator.tsx
index 446c815ab..f6a93cfab 100644
--- a/apps/start/src/components/charts/tooltip/tooltip-indicator.tsx
+++ b/apps/start/src/components/charts/tooltip/tooltip-indicator.tsx
@@ -1,15 +1,15 @@
-"use client";
+'use client';
-import { motion, useSpring } from "motion/react";
-import { type SpringConfig, useChartConfig } from "../chart-config-context";
-import { chartCssVars } from "../chart-context";
+import { motion, useSpring } from 'motion/react';
+import { type SpringConfig, useChartConfig } from '../chart-config-context';
+import { chartCssVars } from '../chart-context';
export type IndicatorWidth =
| number // Pixel width
- | "line" // 1px line (default)
- | "thin" // 2px
- | "medium" // 4px
- | "thick"; // 8px
+ | 'line' // 1px line (default)
+ | 'thin' // 2px
+ | 'medium' // 4px
+ | 'thick'; // 8px
export interface TooltipIndicatorProps {
/** X position in pixels (center of the indicator) */
@@ -45,17 +45,17 @@ export interface TooltipIndicatorProps {
}
function resolveWidth(width: IndicatorWidth): number {
- if (typeof width === "number") {
+ if (typeof width === 'number') {
return width;
}
switch (width) {
- case "line":
+ case 'line':
return 1;
- case "thin":
+ case 'thin':
return 2;
- case "medium":
+ case 'medium':
return 4;
- case "thick":
+ case 'thick':
return 8;
default:
return 1;
@@ -74,16 +74,16 @@ export function TooltipIndicator(props: TooltipIndicatorProps) {
function TooltipIndicatorInner({
x,
height,
- width = "line",
+ width = 'line',
span,
columnWidth,
colorEdge = chartCssVars.crosshair,
colorMid = chartCssVars.crosshair,
fadeEdges = true,
animate = true,
- gradientId = "tooltip-indicator-gradient",
+ gradientId = 'tooltip-indicator-gradient',
springConfig,
-}: Omit<TooltipIndicatorProps, "visible">) {
+}: Omit<TooltipIndicatorProps, 'visible'>) {
const { tooltipSpring } = useChartConfig();
const effectiveSpring = springConfig ?? tooltipSpring;
@@ -139,6 +139,6 @@ function TooltipIndicatorInner({
);
}
-TooltipIndicator.displayName = "TooltipIndicator";
+TooltipIndicator.displayName = 'TooltipIndicator';
export default TooltipIndicator;
diff --git a/apps/start/src/components/charts/use-area-segment-highlight.ts b/apps/start/src/components/charts/use-area-segment-highlight.ts
index 2a4327285..91d2c0480 100644
--- a/apps/start/src/components/charts/use-area-segment-highlight.ts
+++ b/apps/start/src/components/charts/use-area-segment-highlight.ts
@@ -1,8 +1,8 @@
-"use client";
+'use client';
-import { useCallback, useMemo } from "react";
-import type { TooltipData } from "./chart-context";
-import type { ChartSelection } from "./use-chart-interaction";
+import { useCallback, useMemo } from 'react';
+import type { TooltipData } from './chart-context';
+import type { ChartSelection } from './use-chart-interaction';
interface UseAreaSegmentHighlightOptions {
data: Record<string, unknown>[];
@@ -85,7 +85,7 @@ export function useAreaSegmentHighlight({
const getY = useCallback(
(d: Record<string, unknown>) => {
const value = d[dataKey];
- return typeof value === "number" ? (yScale(value) ?? 0) : 0;
+ return typeof value === 'number' ? (yScale(value) ?? 0) : 0;
},
[dataKey, yScale]
);
diff --git a/apps/start/src/components/charts/use-chart-interaction.ts b/apps/start/src/components/charts/use-chart-interaction.ts
index e1b3c0629..d12875b8f 100644
--- a/apps/start/src/components/charts/use-chart-interaction.ts
+++ b/apps/start/src/components/charts/use-chart-interaction.ts
@@ -1,10 +1,10 @@
-"use client";
+'use client';
-import { localPoint } from "@visx/event";
-import type { scaleLinear, scaleTime } from "@visx/scale";
-import { useCallback, useRef, useState } from "react";
-import type { LineConfig, Margin, TooltipData } from "./chart-context";
-import { useScheduledTooltip } from "./use-scheduled-tooltip";
+import { localPoint } from '@visx/event';
+import type { scaleLinear, scaleTime } from '@visx/scale';
+import { useCallback, useRef, useState } from 'react';
+import type { LineConfig, Margin, TooltipData } from './chart-context';
+import { useScheduledTooltip } from './use-scheduled-tooltip';
type ScaleTime = ReturnType<typeof scaleTime<number>>;
type ScaleLinear = ReturnType<typeof scaleLinear<number>>;
@@ -96,7 +96,7 @@ export function useChartInteraction({
const yPositions: Record<string, number> = {};
for (const line of lines) {
const value = d[line.dataKey];
- if (typeof value === "number") {
+ if (typeof value === 'number') {
yPositions[line.dataKey] = yScale(value) ?? 0;
}
}
@@ -139,7 +139,7 @@ export function useChartInteraction({
): number | null => {
let point: { x: number; y: number } | null = null;
- if ("touches" in event) {
+ if ('touches' in event) {
const touch = event.touches[touchIndex];
if (!touch) {
return null;
@@ -315,8 +315,8 @@ export function useChartInteraction({
: {};
const interactionStyle: React.CSSProperties = {
- cursor: canInteract ? "crosshair" : "default",
- touchAction: "none",
+ cursor: canInteract ? 'crosshair' : 'default',
+ touchAction: 'none',
};
return {
diff --git a/apps/start/src/components/charts/use-highlight-segment.ts b/apps/start/src/components/charts/use-highlight-segment.ts
index f5cb8bce0..2e665be03 100644
--- a/apps/start/src/components/charts/use-highlight-segment.ts
+++ b/apps/start/src/components/charts/use-highlight-segment.ts
@@ -1,13 +1,13 @@
-"use client";
+'use client';
-import { useSpring } from "motion/react";
-import { useMemo, useRef } from "react";
-import { useChartConfig } from "./chart-config-context";
-import { useChartHover, useChartStable } from "./chart-context";
+import { useSpring } from 'motion/react';
+import { useMemo, useRef } from 'react';
+import { useChartConfig } from './chart-config-context';
+import { useChartHover, useChartStable } from './chart-context';
import {
computeSegmentBounds,
INACTIVE_SEGMENT,
-} from "./highlight-segment-bounds";
+} from './highlight-segment-bounds';
// Hover-highlight band for `line.tsx` and `area.tsx`. Computes the segment
// bounds and springs its x/width; `<HighlightSegment>` renders the clipped
diff --git a/apps/start/src/components/charts/use-line-segment-highlight.ts b/apps/start/src/components/charts/use-line-segment-highlight.ts
index 5b9740d07..6f169378b 100644
--- a/apps/start/src/components/charts/use-line-segment-highlight.ts
+++ b/apps/start/src/components/charts/use-line-segment-highlight.ts
@@ -1,8 +1,8 @@
-"use client";
+'use client';
-import { useMemo } from "react";
-import type { TooltipData } from "./chart-context";
-import type { ChartSelection } from "./use-chart-interaction";
+import { useMemo } from 'react';
+import type { TooltipData } from './chart-context';
+import type { ChartSelection } from './use-chart-interaction';
interface UseLineSegmentHighlightOptions {
pathLength: number;
@@ -47,7 +47,7 @@ export function useLineSegmentHighlight({
let prevX = xScale(xAccessor(data[0]!)) ?? 0;
const firstValue = data[0]![dataKey];
let prevY =
- typeof firstValue === "number"
+ typeof firstValue === 'number'
? (yScale(firstValue) ?? yScale(0) ?? 0)
: (yScale(0) ?? 0);
@@ -56,7 +56,7 @@ export function useLineSegmentHighlight({
const x = xScale(xAccessor(point)) ?? 0;
const value = point[dataKey];
const y =
- typeof value === "number"
+ typeof value === 'number'
? (yScale(value) ?? yScale(0) ?? 0)
: (yScale(0) ?? 0);
const dx = x - prevX;
diff --git a/apps/start/src/components/charts/use-mount-progress.ts b/apps/start/src/components/charts/use-mount-progress.ts
index cf7bf64c5..2d84f3c79 100644
--- a/apps/start/src/components/charts/use-mount-progress.ts
+++ b/apps/start/src/components/charts/use-mount-progress.ts
@@ -1,8 +1,8 @@
-"use client";
+'use client';
-import { animate, type Transition, useMotionValue } from "motion/react";
-import { useEffect, useRef } from "react";
-import { DEFAULT_CHART_ENTER_TRANSITION } from "./animation";
+import { animate, type Transition, useMotionValue } from 'motion/react';
+import { useEffect, useRef } from 'react';
+import { DEFAULT_CHART_ENTER_TRANSITION } from './animation';
/** Drives 0→1 enter progress using the studio motion transition (spring or tween). */
export function useMountProgress(
diff --git a/apps/start/src/components/charts/use-scheduled-tooltip.ts b/apps/start/src/components/charts/use-scheduled-tooltip.ts
index 6c4175edd..4a4eeccdf 100644
--- a/apps/start/src/components/charts/use-scheduled-tooltip.ts
+++ b/apps/start/src/components/charts/use-scheduled-tooltip.ts
@@ -1,6 +1,6 @@
-"use client";
+'use client';
-import { useCallback, useEffect, useRef, useState } from "react";
+import { useCallback, useEffect, useRef, useState } from 'react';
export interface ScheduledTooltipControls<T> {
tooltipData: T | null;
@@ -12,10 +12,10 @@ export interface ScheduledTooltipControls<T> {
function defaultDedupeKey<T>(tooltip: T): string {
if (
- typeof tooltip === "object" &&
+ typeof tooltip === 'object' &&
tooltip !== null &&
- "index" in tooltip &&
- typeof (tooltip as { index: unknown }).index === "number"
+ 'index' in tooltip &&
+ typeof (tooltip as { index: unknown }).index === 'number'
) {
return String((tooltip as { index: number }).index);
}
diff --git a/apps/start/src/components/charts/x-axis.tsx b/apps/start/src/components/charts/x-axis.tsx
index 1e23ba33f..af8fa2eed 100644
--- a/apps/start/src/components/charts/x-axis.tsx
+++ b/apps/start/src/components/charts/x-axis.tsx
@@ -1,10 +1,10 @@
-"use client";
+'use client';
-import { memo, useEffect, useMemo, useState } from "react";
-import { createPortal } from "react-dom";
-import { cn } from "@/lib/utils";
-import { useChart, useChartStable } from "./chart-context";
-import { shortDateFmt } from "./chart-formatters";
+import { memo, useEffect, useMemo, useState } from 'react';
+import { createPortal } from 'react-dom';
+import { cn } from '@/lib/utils';
+import { useChart, useChartStable } from './chart-context';
+import { shortDateFmt } from './chart-formatters';
export interface XAxisProps {
/** Number of ticks to show (including first and last). Default: 5. Used when `tickMode` is `"domain"`. */
@@ -15,7 +15,7 @@ export interface XAxisProps {
* `"domain"` — evenly spaced ticks across the time domain (default).
* `"data"` — one label per data row at its x value (better with sparse or monthly bars).
*/
- tickMode?: "domain" | "data";
+ tickMode?: 'domain' | 'data';
}
interface XAxisLabelProps {
@@ -56,15 +56,15 @@ function XAxisLabel({
left: x,
bottom: 12,
width: 0,
- display: "flex",
- justifyContent: "center",
+ display: 'flex',
+ justifyContent: 'center',
}}
>
<span
- className={cn("whitespace-nowrap text-chart-label text-xs")}
+ className={cn('whitespace-nowrap text-chart-label text-xs')}
style={{
opacity,
- transition: "opacity 0.4s ease-in-out",
+ transition: 'opacity 0.4s ease-in-out',
}}
>
{label}
@@ -92,7 +92,7 @@ export function XAxis(props: XAxisProps) {
const XAxisInner = memo(function XAxisInner({
numTicks = 5,
tickerHalfWidth = 50,
- tickMode = "domain",
+ tickMode = 'domain',
container,
}: XAxisProps & { container: HTMLDivElement }) {
const { xScale, margin, tooltipData, data, xAccessor, dateLabels } =
@@ -100,7 +100,7 @@ const XAxisInner = memo(function XAxisInner({
// Generate tick labels: evenly spaced along the domain, or one per data row
const labelsToShow = useMemo(() => {
- if (tickMode === "data") {
+ if (tickMode === 'data') {
return data.map((d, i) => ({
date: xAccessor(d),
x: (xScale(xAccessor(d)) ?? 0) + margin.left,
@@ -157,6 +157,6 @@ const XAxisInner = memo(function XAxisInner({
);
});
-XAxis.displayName = "XAxis";
+XAxis.displayName = 'XAxis';
export default XAxis;
diff --git a/apps/start/src/components/charts/y-axis.tsx b/apps/start/src/components/charts/y-axis.tsx
index 691f3c29e..9d355b4ae 100644
--- a/apps/start/src/components/charts/y-axis.tsx
+++ b/apps/start/src/components/charts/y-axis.tsx
@@ -1,8 +1,8 @@
-"use client";
+'use client';
-import { memo, useEffect, useMemo, useState } from "react";
-import { createPortal } from "react-dom";
-import { useChartStable } from "./chart-context";
+import { memo, useEffect, useMemo, useState } from 'react';
+import { createPortal } from 'react-dom';
+import { useChartStable } from './chart-context';
export interface YAxisProps {
/** Number of ticks to show. Default: 5 */
@@ -69,7 +69,7 @@ const YAxisInner = memo(function YAxisInner({
<div
className="absolute right-0 flex items-center justify-end pr-2"
key={tick.value}
- style={{ top: tick.y, transform: "translateY(-50%)" }}
+ style={{ top: tick.y, transform: 'translateY(-50%)' }}
>
<span className="text-chart-label text-xs">{tick.label}</span>
</div>
@@ -79,6 +79,6 @@ const YAxisInner = memo(function YAxisInner({
);
});
-YAxis.displayName = "YAxis";
+YAxis.displayName = 'YAxis';
export default YAxis;
diff --git a/apps/start/src/components/chat/chat-drawer-body.tsx b/apps/start/src/components/chat/chat-drawer-body.tsx
index 103f7614f..84bd57e78 100644
--- a/apps/start/src/components/chat/chat-drawer-body.tsx
+++ b/apps/start/src/components/chat/chat-drawer-body.tsx
@@ -2,10 +2,7 @@ import { Button } from '@/components/ui/button';
import { usePageContextValue } from '@/contexts/page-context';
import { cn } from '@/utils/cn';
import { AlertCircleIcon, ArrowDownIcon } from 'lucide-react';
-import {
- StickToBottom,
- useStickToBottomContext,
-} from 'use-stick-to-bottom';
+import { StickToBottom, useStickToBottomContext } from 'use-stick-to-bottom';
import { ChatContextWidget } from './chat-context-widget';
import { ChatDrawerEmpty } from './chat-drawer-empty';
import { ChatMessage } from './chat-message';
@@ -52,10 +49,7 @@ export function ChatDrawerBody() {
resize="smooth"
>
<StickToBottom.Content
- className={cn(
- 'flex flex-col gap-4 px-3 py-4',
- hasContext && 'pt-24',
- )}
+ className={cn('flex flex-col gap-4 px-3 py-4', hasContext && 'pt-24')}
>
{messages.map((message, idx) => (
<ChatMessage
diff --git a/apps/start/src/components/chat/chat-drawer-empty.tsx b/apps/start/src/components/chat/chat-drawer-empty.tsx
index dd4001a76..f002d0b2e 100644
--- a/apps/start/src/components/chat/chat-drawer-empty.tsx
+++ b/apps/start/src/components/chat/chat-drawer-empty.tsx
@@ -53,8 +53,8 @@ export function ChatDrawerNotConfigured() {
<p className="mt-1.5 text-muted-foreground leading-[1.5]">
Set <code className="font-mono text-sm">OPENAI_API_KEY</code> and/or{' '}
<code className="font-mono text-sm">ANTHROPIC_API_KEY</code> on the
- API service to enable AI chat, then restart it. The model picker
- shows only providers with a configured key.
+ API service to enable AI chat, then restart it. The model picker shows
+ only providers with a configured key.
</p>
</div>
<div className="flex w-full max-w-xs flex-col gap-2">
@@ -81,7 +81,7 @@ type Suggestions = {
};
function getSuggestionsForContext(
- ctx: ReturnType<typeof usePageContextValue>,
+ ctx: ReturnType<typeof usePageContextValue>
): Suggestions {
if (!ctx) {
return {
@@ -230,7 +230,7 @@ function getSuggestionsForContext(
return {
headline: 'Ask about your data',
description:
- 'I can answer questions about the page you\'re viewing, generate reports, and dig into specific users, sessions, or pages.',
+ "I can answer questions about the page you're viewing, generate reports, and dig into specific users, sessions, or pages.",
prompts: [
"What's our visitor count this week?",
'Top traffic sources right now',
diff --git a/apps/start/src/components/chat/chat-drawer-footer.tsx b/apps/start/src/components/chat/chat-drawer-footer.tsx
index 0c59260b4..633e1a31e 100644
--- a/apps/start/src/components/chat/chat-drawer-footer.tsx
+++ b/apps/start/src/components/chat/chat-drawer-footer.tsx
@@ -40,7 +40,7 @@ export function ChatDrawerFooter() {
<div
className={cn(
'rounded-xl border bg-card transition-shadow',
- 'focus-within:ring-1 focus-within:ring-ring focus-within:border-ring',
+ 'focus-within:ring-1 focus-within:ring-ring focus-within:border-ring'
)}
>
{/*
@@ -68,7 +68,7 @@ export function ChatDrawerFooter() {
'placeholder:text-muted-foreground/70',
'resize-none border-0 outline-none ring-0 shadow-none',
'focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0',
- 'min-h-[48px] max-h-[200px] px-3 pt-3 pb-1',
+ 'min-h-[48px] max-h-[200px] px-3 pt-3 pb-1'
)}
onKeyDown={(e) => {
if (e.key === 'Enter' && !e.shiftKey) {
diff --git a/apps/start/src/components/chat/chat-drawer-header.tsx b/apps/start/src/components/chat/chat-drawer-header.tsx
index eb53ea8ea..82dfecd22 100644
--- a/apps/start/src/components/chat/chat-drawer-header.tsx
+++ b/apps/start/src/components/chat/chat-drawer-header.tsx
@@ -31,14 +31,18 @@ export function ChatDrawerHeader({
}) {
const trpc = useTRPC();
const queryClient = useQueryClient();
- const { conversationId, switchConversation, newConversation, streamingTitle } =
- useChatState();
+ const {
+ conversationId,
+ switchConversation,
+ newConversation,
+ streamingTitle,
+ } = useChatState();
const { data: conversations } = useQuery(
trpc.conversation.list.queryOptions({
projectId,
limit: CONVERSATION_LIST_LIMIT_DEFAULT,
- }),
+ })
);
const deleteMutation = useMutation(
@@ -49,7 +53,7 @@ export function ChatDrawerHeader({
newConversation();
}
},
- }),
+ })
);
// Header title priority:
@@ -174,11 +178,7 @@ function InlineDeleteButton({ onConfirm }: { onConfirm: () => void }) {
aria-label={armed ? 'Confirm delete' : 'Delete conversation'}
title={armed ? 'Click again to confirm' : 'Delete'}
>
- {armed ? (
- <Trash2Icon className="size-3" />
- ) : (
- <XIcon className="size-3" />
- )}
+ {armed ? <Trash2Icon className="size-3" /> : <XIcon className="size-3" />}
</button>
);
}
diff --git a/apps/start/src/components/chat/chat-drawer-slot.tsx b/apps/start/src/components/chat/chat-drawer-slot.tsx
index 1050fa6b4..36ef14528 100644
--- a/apps/start/src/components/chat/chat-drawer-slot.tsx
+++ b/apps/start/src/components/chat/chat-drawer-slot.tsx
@@ -20,7 +20,7 @@ import { lazy, Suspense, useEffect, useState } from 'react';
* on the first paint — there's no UX cost to this wrapping.
*/
const ChatDrawer = lazy(() =>
- import('./chat-drawer').then((m) => ({ default: m.ChatDrawer })),
+ import('./chat-drawer').then((m) => ({ default: m.ChatDrawer }))
);
export function ChatDrawerSlot() {
diff --git a/apps/start/src/components/chat/chat-drawer.tsx b/apps/start/src/components/chat/chat-drawer.tsx
index 7c6256539..e1075b4dd 100644
--- a/apps/start/src/components/chat/chat-drawer.tsx
+++ b/apps/start/src/components/chat/chat-drawer.tsx
@@ -71,11 +71,7 @@ export function ChatDrawer() {
Hidden on mobile where the drawer overlays as a modal-style
panel (standard behavior for narrow viewports).
*/}
- <div
- className="hidden lg:block shrink-0"
- style={{ width }}
- aria-hidden
- />
+ <div className="hidden lg:block shrink-0" style={{ width }} aria-hidden />
<aside
className="fixed top-0 right-0 z-40 h-screen flex flex-col bg-background border-l shadow-2xl"
style={{ width }}
diff --git a/apps/start/src/components/chat/chat-markdown.tsx b/apps/start/src/components/chat/chat-markdown.tsx
index ac2fcf690..07ad24254 100644
--- a/apps/start/src/components/chat/chat-markdown.tsx
+++ b/apps/start/src/components/chat/chat-markdown.tsx
@@ -46,7 +46,7 @@ function ChatMarkdownInner({
'[&_th]:text-left [&_th]:font-medium [&_th]:px-2 [&_th]:py-1 [&_th]:border-b',
'[&_td]:px-2 [&_td]:py-1 [&_td]:border-b [&_td]:border-border/40',
'[&_hr]:my-3 [&_hr]:border-border',
- className,
+ className
)}
>
<ReactMarkdown
@@ -58,9 +58,7 @@ function ChatMarkdownInner({
{...rest}
href={href}
target={href?.startsWith('http') ? '_blank' : undefined}
- rel={
- href?.startsWith('http') ? 'noopener noreferrer' : undefined
- }
+ rel={href?.startsWith('http') ? 'noopener noreferrer' : undefined}
>
{children}
</a>
diff --git a/apps/start/src/components/chat/chat-message.tsx b/apps/start/src/components/chat/chat-message.tsx
index 37258be67..2f4334f47 100644
--- a/apps/start/src/components/chat/chat-message.tsx
+++ b/apps/start/src/components/chat/chat-message.tsx
@@ -33,7 +33,10 @@ export function ChatMessage({
const isUser = message.role === 'user';
// Index tool results by callId so we can attach them to their call.
- const resultByCallId = new Map<string, { result?: unknown; status: string }>();
+ const resultByCallId = new Map<
+ string,
+ { result?: unknown; status: string }
+ >();
for (const part of message.parts) {
if (part.type === 'tool-result') {
resultByCallId.set(part.callId, {
@@ -49,7 +52,7 @@ export function ChatMessage({
<div
className={cn(
'flex flex-col gap-2',
- isUser ? 'items-end' : 'items-start',
+ isUser ? 'items-end' : 'items-start'
)}
>
{message.parts.map((part, idx) => {
@@ -92,9 +95,7 @@ export function ChatMessage({
<ReasoningBlock
key={`${message.localId}-reasoning-${idx}`}
text={part.text}
- complete={
- stateComplete || hasFollowingPart || !runStillActive
- }
+ complete={stateComplete || hasFollowingPart || !runStillActive}
/>
);
}
@@ -118,8 +119,9 @@ export function ChatMessage({
);
}
const Renderer =
- chatToolRenderers[`tool-${toolName}` as keyof typeof chatToolRenderers] ??
- DefaultToolResult;
+ chatToolRenderers[
+ `tool-${toolName}` as keyof typeof chatToolRenderers
+ ] ?? DefaultToolResult;
const toolPart: ToolResultPart = {
type: `tool-${toolName}`,
toolCallId: part.callId,
@@ -211,7 +213,7 @@ function ReasoningBlock({
function derivePartState(
callState: string | undefined,
- resultStatus: string | undefined,
+ resultStatus: string | undefined
): string {
if (resultStatus === 'success') return 'output-available';
if (resultStatus === 'error') return 'output-error';
diff --git a/apps/start/src/components/chat/chat-runtime.tsx b/apps/start/src/components/chat/chat-runtime.tsx
index d5a5be897..5afd6ee6f 100644
--- a/apps/start/src/components/chat/chat-runtime.tsx
+++ b/apps/start/src/components/chat/chat-runtime.tsx
@@ -59,7 +59,7 @@ export function ChatRuntimeProvider({ children }: { children: ReactNode }) {
const client = useMemo(() => getChatClient(apiUrl), [apiUrl]);
const renameConversation = useMutation(
- trpc.conversation.rename.mutationOptions(),
+ trpc.conversation.rename.mutationOptions()
);
// Title streams run fire-and-forget. If the user switches or closes
@@ -76,7 +76,7 @@ export function ChatRuntimeProvider({ children }: { children: ReactNode }) {
titleAbortRef.current?.abort();
titleAbortRef.current = null;
},
- [],
+ []
);
const agent = useAgent(client, {
@@ -144,7 +144,7 @@ export function ChatRuntimeProvider({ children }: { children: ReactNode }) {
if (controller.signal.aborted) return;
setStreamingTitle(partial);
},
- controller.signal,
+ controller.signal
);
if (controller.signal.aborted || !finalTitle) return;
try {
@@ -154,7 +154,7 @@ export function ChatRuntimeProvider({ children }: { children: ReactNode }) {
projectId,
});
queryClient.invalidateQueries(
- trpc.conversation.list.pathFilter(),
+ trpc.conversation.list.pathFilter()
);
} catch (err) {
console.error('[chat] conversation rename failed', err);
@@ -172,7 +172,7 @@ export function ChatRuntimeProvider({ children }: { children: ReactNode }) {
pageContext,
renameConversation,
setStreamingTitle,
- ],
+ ]
);
// Drain the pending message left by the sidebar composer.
diff --git a/apps/start/src/components/chat/model-picker.tsx b/apps/start/src/components/chat/model-picker.tsx
index f880ec629..e207f17d0 100644
--- a/apps/start/src/components/chat/model-picker.tsx
+++ b/apps/start/src/components/chat/model-picker.tsx
@@ -19,13 +19,10 @@ import { useChatState } from './chat-context';
export function ModelPicker() {
const { agentName, setAgent, models } = useChatState();
- const grouped = models.reduce<Record<string, ChatModelOption[]>>(
- (acc, m) => {
- (acc[m.group] ??= []).push(m);
- return acc;
- },
- {},
- );
+ const grouped = models.reduce<Record<string, ChatModelOption[]>>((acc, m) => {
+ (acc[m.group] ??= []).push(m);
+ return acc;
+ }, {});
return (
<DropdownMenu>
diff --git a/apps/start/src/components/chat/sidebar-chat-composer.tsx b/apps/start/src/components/chat/sidebar-chat-composer.tsx
index b309cb571..026e3d6f0 100644
--- a/apps/start/src/components/chat/sidebar-chat-composer.tsx
+++ b/apps/start/src/components/chat/sidebar-chat-composer.tsx
@@ -35,7 +35,7 @@ export function SidebarChatComposer() {
onSubmit={submit}
className={cn(
'mb-4 flex items-center gap-2 rounded-md border border-border bg-def-100 pl-3 pr-2',
- 'transition-all focus-within:border-def-400 focus-within:ring-1 focus-within:ring-ring',
+ 'transition-all focus-within:border-def-400 focus-within:ring-1 focus-within:ring-ring'
)}
>
<SparklesIcon className="size-5 shrink-0 text-muted-foreground" />
@@ -48,7 +48,7 @@ export function SidebarChatComposer() {
'min-w-0 flex-1 bg-transparent py-2 text-[13px] font-medium text-foreground',
'placeholder:font-normal placeholder:text-muted-foreground',
'border-0 shadow-none outline-none ring-0',
- 'focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0',
+ 'focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0'
)}
onKeyDown={(e) => {
if (e.key === 'Enter') {
@@ -71,7 +71,7 @@ export function SidebarChatComposer() {
<kbd
className={cn(
'shrink-0 rounded border border-border bg-def-200 px-1.5 py-0.5 font-mono text-[11px]',
- 'text-muted-foreground cursor-pointer',
+ 'text-muted-foreground cursor-pointer'
)}
aria-label="Keyboard shortcut: Cmd+J"
onClick={() => openNewChat()}
diff --git a/apps/start/src/components/chat/title-stream.tsx b/apps/start/src/components/chat/title-stream.tsx
index 55d0dc061..ba5f9d5bc 100644
--- a/apps/start/src/components/chat/title-stream.tsx
+++ b/apps/start/src/components/chat/title-stream.tsx
@@ -19,7 +19,7 @@ export async function streamTitle(
client: AppClient,
firstUserText: string,
onDelta: (text: string) => void,
- signal?: AbortSignal,
+ signal?: AbortSignal
): Promise<string | null> {
const trimmed = firstUserText.trim().slice(0, 400);
if (!trimmed) return null;
@@ -36,7 +36,10 @@ export async function streamTitle(
// Better Agent emits `TEXT_MESSAGE_CONTENT` with a `delta` field
// for each streamed chunk of assistant text.
const maybe = event as { type?: string; delta?: string };
- if (maybe.type === 'TEXT_MESSAGE_CONTENT' && typeof maybe.delta === 'string') {
+ if (
+ maybe.type === 'TEXT_MESSAGE_CONTENT' &&
+ typeof maybe.delta === 'string'
+ ) {
accumulated += maybe.delta;
onDelta(accumulated.trim().slice(0, CONVERSATION_TITLE_MAX_LENGTH));
}
diff --git a/apps/start/src/components/chat/tool-results/chat-metrics-result.tsx b/apps/start/src/components/chat/tool-results/chat-metrics-result.tsx
index cfbd8a3ed..398322b76 100644
--- a/apps/start/src/components/chat/tool-results/chat-metrics-result.tsx
+++ b/apps/start/src/components/chat/tool-results/chat-metrics-result.tsx
@@ -24,7 +24,7 @@ function ChatMetricsInner({ output }: { output: unknown }) {
const entries = Object.entries(output).filter(
(entry): entry is [string, number | string] =>
- typeof entry[1] === 'number' || typeof entry[1] === 'string',
+ typeof entry[1] === 'number' || typeof entry[1] === 'string'
);
if (entries.length === 0) return null;
diff --git a/apps/start/src/components/chat/tool-results/chat-profile-result.tsx b/apps/start/src/components/chat/tool-results/chat-profile-result.tsx
index 9c40be8ac..eec6acaed 100644
--- a/apps/start/src/components/chat/tool-results/chat-profile-result.tsx
+++ b/apps/start/src/components/chat/tool-results/chat-profile-result.tsx
@@ -98,7 +98,9 @@ function SuccessCard({ value }: { value: ProfileFullSuccess }) {
{typeof metrics.revenue === 'number' && metrics.revenue > 0 && (
<ResultRow>
<ResultLabel>Revenue</ResultLabel>
- <ResultValue>{number.currency(metrics.revenue / 100)}</ResultValue>
+ <ResultValue>
+ {number.currency(metrics.revenue / 100)}
+ </ResultValue>
</ResultRow>
)}
</div>
diff --git a/apps/start/src/components/chat/tool-results/output-types.ts b/apps/start/src/components/chat/tool-results/output-types.ts
index a8209dbcc..bce77cf97 100644
--- a/apps/start/src/components/chat/tool-results/output-types.ts
+++ b/apps/start/src/components/chat/tool-results/output-types.ts
@@ -53,7 +53,7 @@ export type ProfileFullError = {
export type ProfileFullOutput = ProfileFullSuccess | ProfileFullError;
export function isProfileFullError(
- value: ProfileFullOutput,
+ value: ProfileFullOutput
): value is ProfileFullError {
return 'error' in value && typeof value.error === 'string';
}
@@ -130,7 +130,7 @@ export function normalizeTableOutput(value: unknown): TableNormalized {
}
if (Array.isArray(o.properties)) {
const rows: TableRow[] = (o.properties as unknown[]).map((p) =>
- typeof p === 'string' ? { property_key: p } : (p as TableRow),
+ typeof p === 'string' ? { property_key: p } : (p as TableRow)
);
return { rows, total, truncated };
}
diff --git a/apps/start/src/components/chat/tool-results/shared.tsx b/apps/start/src/components/chat/tool-results/shared.tsx
index b85c77717..2e3ea09cd 100644
--- a/apps/start/src/components/chat/tool-results/shared.tsx
+++ b/apps/start/src/components/chat/tool-results/shared.tsx
@@ -100,9 +100,20 @@ export function ResultCard({
);
}
-export function ResultRow({ children, className }: { children: ReactNode; className?: string }) {
+export function ResultRow({
+ children,
+ className,
+}: {
+ children: ReactNode;
+ className?: string;
+}) {
return (
- <div className={cn('flex items-center justify-between gap-2 px-3 py-1.5 text-sm', className)}>
+ <div
+ className={cn(
+ 'flex items-center justify-between gap-2 px-3 py-1.5 text-sm',
+ className
+ )}
+ >
{children}
</div>
);
@@ -112,9 +123,19 @@ export function ResultLabel({ children }: { children: ReactNode }) {
return <span className="text-muted-foreground truncate">{children}</span>;
}
-export function ResultValue({ children, mono = true }: { children: ReactNode; mono?: boolean }) {
+export function ResultValue({
+ children,
+ mono = true,
+}: {
+ children: ReactNode;
+ mono?: boolean;
+}) {
return (
- <span className={cn('font-medium tabular-nums shrink-0', mono && 'font-mono')}>{children}</span>
+ <span
+ className={cn('font-medium tabular-nums shrink-0', mono && 'font-mono')}
+ >
+ {children}
+ </span>
);
}
diff --git a/apps/start/src/components/chat/tool-results/tool-labels.ts b/apps/start/src/components/chat/tool-results/tool-labels.ts
index 69ee2789a..ff618cdac 100644
--- a/apps/start/src/components/chat/tool-results/tool-labels.ts
+++ b/apps/start/src/components/chat/tool-results/tool-labels.ts
@@ -27,10 +27,7 @@ const VERB_PREFIXES: Array<[string, string]> = [
['gsc_', 'Loading SEO'],
];
-const PHRASES: Record<
- string,
- { active: string; done: string }
-> = {
+const PHRASES: Record<string, { active: string; done: string }> = {
// Discovery
list_event_names: { active: 'Looking up event names', done: 'Event names' },
list_event_properties: {
@@ -261,7 +258,10 @@ const PHRASES: Record<
export type ToolPhrasePhase = 'active' | 'done';
-export function getToolPhrase(toolName: string, phase: ToolPhrasePhase): string {
+export function getToolPhrase(
+ toolName: string,
+ phase: ToolPhrasePhase
+): string {
const explicit = PHRASES[toolName];
if (explicit) return explicit[phase];
diff --git a/apps/start/src/components/chat/use-chat-open.ts b/apps/start/src/components/chat/use-chat-open.ts
index bf4dade7c..afdaf0cd2 100644
--- a/apps/start/src/components/chat/use-chat-open.ts
+++ b/apps/start/src/components/chat/use-chat-open.ts
@@ -15,10 +15,7 @@ import { parseAsString, useQueryState } from 'nuqs';
* and keeps chat state in the browser history.
*/
export function useChatUrlState() {
- return useQueryState(
- 'chat',
- parseAsString.withOptions({ history: 'push' }),
- );
+ return useQueryState('chat', parseAsString.withOptions({ history: 'push' }));
}
/**
diff --git a/apps/start/src/components/color-square.tsx b/apps/start/src/components/color-square.tsx
index 928dd468d..e4b0e783e 100644
--- a/apps/start/src/components/color-square.tsx
+++ b/apps/start/src/components/color-square.tsx
@@ -8,7 +8,7 @@ export function ColorSquare({ children, className, color }: ColorSquareProps) {
<div
className={cn(
'flex h-5 w-5 flex-shrink-0 items-center justify-center rounded bg-blue-600 text-sm font-medium text-white [.mini_&]:h-4 [.mini_&]:w-4 [.mini_&]:text-[0.6rem] font-mono',
- className,
+ className
)}
style={{ backgroundColor: color }}
>
diff --git a/apps/start/src/components/column-created-at.tsx b/apps/start/src/components/column-created-at.tsx
index 92fd22cb1..2c6f95d8d 100644
--- a/apps/start/src/components/column-created-at.tsx
+++ b/apps/start/src/components/column-created-at.tsx
@@ -5,7 +5,7 @@ export function ColumnCreatedAt({ children }: { children: Date | string }) {
<div className="relative">
<div className="absolute inset-0 opacity-0 group-hover/row:opacity-100 transition-opacity duration-100">
{formatDateTime(
- typeof children === 'string' ? new Date(children) : children,
+ typeof children === 'string' ? new Date(children) : children
)}
</div>
<div className="text-muted-foreground group-hover/row:opacity-0 transition-opacity duration-100">
diff --git a/apps/start/src/components/dashboards/select-dashboard.tsx b/apps/start/src/components/dashboards/select-dashboard.tsx
index 923885aed..862be4874 100644
--- a/apps/start/src/components/dashboards/select-dashboard.tsx
+++ b/apps/start/src/components/dashboards/select-dashboard.tsx
@@ -27,7 +27,7 @@ export function SelectDashboard({
const dashboardQuery = useQuery(
trpc.dashboard.list.queryOptions({
projectId,
- }),
+ })
);
const dashboardMutation = useMutation(
@@ -40,7 +40,7 @@ export function SelectDashboard({
setIsCreatingNew(false);
setNewDashboardName('');
},
- }),
+ })
);
const handleCreateDashboard = () => {
@@ -56,7 +56,7 @@ export function SelectDashboard({
};
const dashboards = (dashboardQuery.data ?? []).filter(
- (dashboard) => dashboard.id !== excludeDashboardId,
+ (dashboard) => dashboard.id !== excludeDashboardId
);
return (
diff --git a/apps/start/src/components/delta-chip.tsx b/apps/start/src/components/delta-chip.tsx
index 0d05b677c..c358faeb4 100644
--- a/apps/start/src/components/delta-chip.tsx
+++ b/apps/start/src/components/delta-chip.tsx
@@ -22,7 +22,7 @@ const deltaChipVariants = cva(
variant: 'default',
size: 'md',
},
- },
+ }
);
type DeltaChipProps = VariantProps<typeof deltaChipVariants> & {
@@ -53,7 +53,7 @@ export function DeltaChip({
return (
<div
className={cn(
- deltaChipVariants({ variant: getVariant(variant, inverted), size }),
+ deltaChipVariants({ variant: getVariant(variant, inverted), size })
)}
>
{variant === 'inc' ? (
diff --git a/apps/start/src/components/dot.tsx b/apps/start/src/components/dot.tsx
index 66ce3452c..6dd67aec2 100644
--- a/apps/start/src/components/dot.tsx
+++ b/apps/start/src/components/dot.tsx
@@ -22,7 +22,7 @@ export function Dot({ className, size = 8, animated }: DotProps) {
<div
className={cn(
'relative',
- filterCn(['bg-', 'animate-', 'group-hover/row'], className),
+ filterCn(['bg-', 'animate-', 'group-hover/row'], className)
)}
style={style}
>
@@ -30,14 +30,14 @@ export function Dot({ className, size = 8, animated }: DotProps) {
className={cn(
'absolute !m-0 rounded-full',
animated !== false && 'animate-ping',
- className,
+ className
)}
style={style}
/>
<div
className={cn(
'absolute !m-0 rounded-full',
- filterCn(['animate-', 'group-hover/row'], className),
+ filterCn(['animate-', 'group-hover/row'], className)
)}
style={style}
/>
diff --git a/apps/start/src/components/events/table/item.tsx b/apps/start/src/components/events/table/item.tsx
index 789bfcbfc..29a8df6e2 100644
--- a/apps/start/src/components/events/table/item.tsx
+++ b/apps/start/src/components/events/table/item.tsx
@@ -61,7 +61,7 @@ export const EventItem = memo<EventItemProps>(
'cursor-pointer',
event.meta?.color
? `hover:bg-${event.meta.color}-50 dark:hover:bg-${event.meta.color}-900`
- : 'hover:bg-def-200',
+ : 'hover:bg-def-200'
)}
>
<div className="min-w-0 flex-1 row items-center gap-2">
@@ -141,7 +141,7 @@ export const EventItem = memo<EventItemProps>(
)}
</div>
);
- },
+ }
);
export const EventItemSkeleton = () => {
@@ -163,13 +163,17 @@ function Pill({
children,
icon,
className,
-}: { children: React.ReactNode; icon?: React.ReactNode; className?: string }) {
+}: {
+ children: React.ReactNode;
+ icon?: React.ReactNode;
+ className?: string;
+}) {
return (
<Tooltiper
content={children}
className={cn(
'shrink-0 whitespace-nowrap inline-flex gap-2 items-center rounded-full @3xl:text-muted-foreground h-6 text-xs font-mono',
- className,
+ className
)}
>
{icon && <div className="size-4 center-center">{icon}</div>}
diff --git a/apps/start/src/components/facehash/avatar-fallback.tsx b/apps/start/src/components/facehash/avatar-fallback.tsx
index 56d93ae46..7a5cc8a6c 100644
--- a/apps/start/src/components/facehash/avatar-fallback.tsx
+++ b/apps/start/src/components/facehash/avatar-fallback.tsx
@@ -81,7 +81,7 @@ export const AvatarFallback = React.forwardRef<
style,
...props
},
- ref,
+ ref
) => {
const { imageLoadingStatus } = useAvatarContext();
const [canRender, setCanRender] = React.useState(delayMs === 0);
@@ -155,7 +155,7 @@ export const AvatarFallback = React.forwardRef<
{initials}
</span>
);
- },
+ }
);
AvatarFallback.displayName = 'AvatarFallback';
diff --git a/apps/start/src/components/facehash/avatar-image.tsx b/apps/start/src/components/facehash/avatar-image.tsx
index c1d6f0a6d..1bda724c6 100644
--- a/apps/start/src/components/facehash/avatar-image.tsx
+++ b/apps/start/src/components/facehash/avatar-image.tsx
@@ -25,7 +25,7 @@ export type AvatarImageProps = Omit<
export const AvatarImage = React.forwardRef<HTMLImageElement, AvatarImageProps>(
(
{ src, alt = '', className, style, onLoadingStatusChange, ...props },
- ref,
+ ref
) => {
const { imageLoadingStatus, onImageLoadingStatusChange } =
useAvatarContext();
@@ -38,7 +38,7 @@ export const AvatarImage = React.forwardRef<HTMLImageElement, AvatarImageProps>(
onImageLoadingStatusChange(status);
onLoadingStatusChange?.(status);
},
- [onImageLoadingStatusChange, onLoadingStatusChange],
+ [onImageLoadingStatusChange, onLoadingStatusChange]
);
React.useLayoutEffect(() => {
@@ -88,7 +88,7 @@ export const AvatarImage = React.forwardRef<HTMLImageElement, AvatarImageProps>(
{...props}
/>
);
- },
+ }
);
AvatarImage.displayName = 'AvatarImage';
diff --git a/apps/start/src/components/facehash/avatar.tsx b/apps/start/src/components/facehash/avatar.tsx
index e381b73ad..0b8d73921 100644
--- a/apps/start/src/components/facehash/avatar.tsx
+++ b/apps/start/src/components/facehash/avatar.tsx
@@ -17,7 +17,7 @@ export const useAvatarContext = () => {
const context = React.useContext(AvatarContext);
if (!context) {
throw new Error(
- 'Avatar compound components must be rendered within an Avatar component',
+ 'Avatar compound components must be rendered within an Avatar component'
);
}
return context;
@@ -44,7 +44,7 @@ export const Avatar = React.forwardRef<HTMLSpanElement, AvatarProps>(
imageLoadingStatus,
onImageLoadingStatusChange: setImageLoadingStatus,
}),
- [imageLoadingStatus],
+ [imageLoadingStatus]
);
const Element = asChild ? React.Fragment : 'span';
@@ -72,7 +72,7 @@ export const Avatar = React.forwardRef<HTMLSpanElement, AvatarProps>(
<Element {...elementProps}>{children}</Element>
</AvatarContext.Provider>
);
- },
+ }
);
Avatar.displayName = 'Avatar';
diff --git a/apps/start/src/components/facehash/facehash.tsx b/apps/start/src/components/facehash/facehash.tsx
index 7d1a47dca..42b1bff58 100644
--- a/apps/start/src/components/facehash/facehash.tsx
+++ b/apps/start/src/components/facehash/facehash.tsx
@@ -188,7 +188,7 @@ function useColorScheme(colorScheme: ColorScheme): 'light' | 'dark' {
return window.matchMedia('(prefers-color-scheme: dark)').matches
? 'dark'
: 'light';
- },
+ }
);
React.useEffect(() => {
@@ -231,7 +231,7 @@ export const Facehash = React.forwardRef<HTMLDivElement, FacehashProps>(
onMouseLeave,
...props
},
- ref,
+ ref
) => {
const [isHovered, setIsHovered] = React.useState(false);
const resolvedScheme = useColorScheme(colorScheme);
@@ -313,7 +313,7 @@ export const Facehash = React.forwardRef<HTMLDivElement, FacehashProps>(
}
onMouseEnter?.(e);
},
- [interactive, usesCssHover, onMouseEnter],
+ [interactive, usesCssHover, onMouseEnter]
);
const handleMouseLeave = React.useCallback(
@@ -323,7 +323,7 @@ export const Facehash = React.forwardRef<HTMLDivElement, FacehashProps>(
}
onMouseLeave?.(e);
},
- [interactive, usesCssHover, onMouseLeave],
+ [interactive, usesCssHover, onMouseLeave]
);
return (
@@ -371,17 +371,19 @@ export const Facehash = React.forwardRef<HTMLDivElement, FacehashProps>(
? 'group-hover:[transform:var(--facehash-hover-transform)]'
: undefined
}
- style={{
- position: 'absolute',
- inset: 0,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
- transform,
- transition: interactive ? 'transform 0.2s ease-out' : undefined,
- transformStyle: 'preserve-3d',
- '--facehash-hover-transform': hoverTransform,
- } as React.CSSProperties}
+ style={
+ {
+ position: 'absolute',
+ inset: 0,
+ display: 'flex',
+ alignItems: 'center',
+ justifyContent: 'center',
+ transform,
+ transition: interactive ? 'transform 0.2s ease-out' : undefined,
+ transformStyle: 'preserve-3d',
+ '--facehash-hover-transform': hoverTransform,
+ } as React.CSSProperties
+ }
>
{/* Face SVG */}
<FaceComponent
@@ -411,7 +413,7 @@ export const Facehash = React.forwardRef<HTMLDivElement, FacehashProps>(
</div>
</div>
);
- },
+ }
);
Facehash.displayName = 'Facehash';
diff --git a/apps/start/src/components/facehash/faces.tsx b/apps/start/src/components/facehash/faces.tsx
index d89d38c27..b0b981d46 100644
--- a/apps/start/src/components/facehash/faces.tsx
+++ b/apps/start/src/components/facehash/faces.tsx
@@ -9,7 +9,12 @@ export type FaceProps = {
* Round eyes face - simple circular eyes
*/
export const RoundFace: React.FC<FaceProps> = ({ className, style }) => (
- <svg viewBox="0 0 100 100" className={className} style={style} aria-hidden="true">
+ <svg
+ viewBox="0 0 100 100"
+ className={className}
+ style={style}
+ aria-hidden="true"
+ >
<title>Round Eyes</title>
<circle cx="35" cy="45" r="8" fill="currentColor" />
<circle cx="65" cy="45" r="8" fill="currentColor" />
@@ -20,10 +25,25 @@ export const RoundFace: React.FC<FaceProps> = ({ className, style }) => (
* Cross eyes face - X-shaped eyes
*/
export const CrossFace: React.FC<FaceProps> = ({ className, style }) => (
- <svg viewBox="0 0 100 100" className={className} style={style} aria-hidden="true">
+ <svg
+ viewBox="0 0 100 100"
+ className={className}
+ style={style}
+ aria-hidden="true"
+ >
<title>Cross Eyes</title>
- <path d="M27 37 L43 53 M43 37 L27 53" stroke="currentColor" strokeWidth="4" strokeLinecap="round" />
- <path d="M57 37 L73 53 M73 37 L57 53" stroke="currentColor" strokeWidth="4" strokeLinecap="round" />
+ <path
+ d="M27 37 L43 53 M43 37 L27 53"
+ stroke="currentColor"
+ strokeWidth="4"
+ strokeLinecap="round"
+ />
+ <path
+ d="M57 37 L73 53 M73 37 L57 53"
+ stroke="currentColor"
+ strokeWidth="4"
+ strokeLinecap="round"
+ />
</svg>
);
@@ -31,10 +51,31 @@ export const CrossFace: React.FC<FaceProps> = ({ className, style }) => (
* Line eyes face - horizontal line eyes
*/
export const LineFace: React.FC<FaceProps> = ({ className, style }) => (
- <svg viewBox="0 0 100 100" className={className} style={style} aria-hidden="true">
+ <svg
+ viewBox="0 0 100 100"
+ className={className}
+ style={style}
+ aria-hidden="true"
+ >
<title>Line Eyes</title>
- <line x1="27" y1="45" x2="43" y2="45" stroke="currentColor" strokeWidth="4" strokeLinecap="round" />
- <line x1="57" y1="45" x2="73" y2="45" stroke="currentColor" strokeWidth="4" strokeLinecap="round" />
+ <line
+ x1="27"
+ y1="45"
+ x2="43"
+ y2="45"
+ stroke="currentColor"
+ strokeWidth="4"
+ strokeLinecap="round"
+ />
+ <line
+ x1="57"
+ y1="45"
+ x2="73"
+ y2="45"
+ stroke="currentColor"
+ strokeWidth="4"
+ strokeLinecap="round"
+ />
</svg>
);
@@ -42,10 +83,27 @@ export const LineFace: React.FC<FaceProps> = ({ className, style }) => (
* Curved eyes face - sleepy/happy curved eyes
*/
export const CurvedFace: React.FC<FaceProps> = ({ className, style }) => (
- <svg viewBox="0 0 100 100" className={className} style={style} aria-hidden="true">
+ <svg
+ viewBox="0 0 100 100"
+ className={className}
+ style={style}
+ aria-hidden="true"
+ >
<title>Curved Eyes</title>
- <path d="M27 50 Q35 38 43 50" stroke="currentColor" strokeWidth="4" strokeLinecap="round" fill="none" />
- <path d="M57 50 Q65 38 73 50" stroke="currentColor" strokeWidth="4" strokeLinecap="round" fill="none" />
+ <path
+ d="M27 50 Q35 38 43 50"
+ stroke="currentColor"
+ strokeWidth="4"
+ strokeLinecap="round"
+ fill="none"
+ />
+ <path
+ d="M57 50 Q65 38 73 50"
+ stroke="currentColor"
+ strokeWidth="4"
+ strokeLinecap="round"
+ fill="none"
+ />
</svg>
);
diff --git a/apps/start/src/components/facehash/index.ts b/apps/start/src/components/facehash/index.ts
index 5e78f80a0..e66cabcaa 100644
--- a/apps/start/src/components/facehash/index.ts
+++ b/apps/start/src/components/facehash/index.ts
@@ -2,7 +2,12 @@
// Primary Export - This is what you want
// ============================================================================
-export type { FacehashProps, Intensity3D, Variant, ColorScheme } from './facehash';
+export type {
+ FacehashProps,
+ Intensity3D,
+ Variant,
+ ColorScheme,
+} from './facehash';
export {
Facehash,
DEFAULT_COLORS,
diff --git a/apps/start/src/components/forms/checkbox-item.tsx b/apps/start/src/components/forms/checkbox-item.tsx
index 7129251dc..54c514aa7 100644
--- a/apps/start/src/components/forms/checkbox-item.tsx
+++ b/apps/start/src/components/forms/checkbox-item.tsx
@@ -17,7 +17,7 @@ type Props = {
export const CheckboxItem = forwardRef<HTMLButtonElement, Props>(
(
{ label, description, Icon, children, onChange, value, disabled, error },
- ref,
+ ref
) => {
const id = slug(label);
return (
@@ -25,7 +25,7 @@ export const CheckboxItem = forwardRef<HTMLButtonElement, Props>(
<label
className={cn(
'flex items-center gap-4 px-4 py-6 transition-colors hover:bg-def-200',
- disabled && 'cursor-not-allowed opacity-50',
+ disabled && 'cursor-not-allowed opacity-50'
)}
htmlFor={id}
>
@@ -48,7 +48,7 @@ export const CheckboxItem = forwardRef<HTMLButtonElement, Props>(
{children}
</div>
);
- },
+ }
);
CheckboxItem.displayName = 'CheckboxItem';
diff --git a/apps/start/src/components/full-page-empty-state.tsx b/apps/start/src/components/full-page-empty-state.tsx
index 846a2fcd3..36299d9d8 100644
--- a/apps/start/src/components/full-page-empty-state.tsx
+++ b/apps/start/src/components/full-page-empty-state.tsx
@@ -22,7 +22,7 @@ export function FullPageEmptyState({
<div
className={cn(
'flex items-center justify-center p-4 text-center',
- className,
+ className
)}
>
<div className="flex w-full max-w-xl flex-col items-center justify-center p-8">
diff --git a/apps/start/src/components/full-page-error-state.tsx b/apps/start/src/components/full-page-error-state.tsx
index c04c8ba55..edba659e2 100644
--- a/apps/start/src/components/full-page-error-state.tsx
+++ b/apps/start/src/components/full-page-error-state.tsx
@@ -6,7 +6,11 @@ export const FullPageErrorState = ({
title = 'Error...',
description = 'Something went wrong...',
children,
-}: { title?: string; description?: string; children?: React.ReactNode }) => {
+}: {
+ title?: string;
+ description?: string;
+ children?: React.ReactNode;
+}) => {
return (
<FullPageEmptyState
className="min-h-[calc(100vh-theme(spacing.16))]"
diff --git a/apps/start/src/components/full-page-loading-state.tsx b/apps/start/src/components/full-page-loading-state.tsx
index aeefc2bf4..359a1e9e2 100644
--- a/apps/start/src/components/full-page-loading-state.tsx
+++ b/apps/start/src/components/full-page-loading-state.tsx
@@ -6,7 +6,10 @@ import { FullPageEmptyState } from './full-page-empty-state';
const FullPageLoadingState = ({
title = 'Fetching...',
description = 'Please wait while we fetch your data...',
-}: { title?: string; description?: string }) => {
+}: {
+ title?: string;
+ description?: string;
+}) => {
return (
<FullPageEmptyState
className="min-h-[calc(100vh-theme(spacing.16))]"
diff --git a/apps/start/src/components/fullscreen-toggle.tsx b/apps/start/src/components/fullscreen-toggle.tsx
index b5674645c..32fbf8fd0 100644
--- a/apps/start/src/components/fullscreen-toggle.tsx
+++ b/apps/start/src/components/fullscreen-toggle.tsx
@@ -18,7 +18,7 @@ export const useFullscreen = () =>
'fullscreen',
parseAsBoolean.withDefault(false).withOptions({
history: 'push',
- }),
+ })
);
export const Fullscreen = (props: Props) => {
@@ -28,7 +28,7 @@ export const Fullscreen = (props: Props) => {
className={cn(
isFullscreen
? 'fixed inset-0 z-50 overflow-auto bg-def-200'
- : 'w-full min-h-full col',
+ : 'w-full min-h-full col'
)}
>
{props.children}
@@ -95,7 +95,7 @@ export const FullscreenClose = () => {
ref={ref}
className={cn(
'flex h-20 w-20 -translate-x-20 items-center justify-center rounded-full bg-foreground transition-transform',
- visible && isFullscreenDebounced && '-translate-x-10',
+ visible && isFullscreenDebounced && '-translate-x-10'
)}
onClick={() => {
setIsFullscreen(false);
diff --git a/apps/start/src/components/grafana-grid.tsx b/apps/start/src/components/grafana-grid.tsx
index b5dc0951e..b18c39be5 100644
--- a/apps/start/src/components/grafana-grid.tsx
+++ b/apps/start/src/components/grafana-grid.tsx
@@ -7,7 +7,7 @@ const ResponsiveGridLayout = WidthProvider(Responsive);
export type Layout = ReactGridLayout.Layout;
export const useReportLayouts = (
- reports: NonNullable<IServiceReport>[],
+ reports: NonNullable<IServiceReport>[]
): ReactGridLayout.Layouts => {
return useMemo(() => {
const baseLayout = reports.map((report, index) => ({
diff --git a/apps/start/src/components/grid-table.tsx b/apps/start/src/components/grid-table.tsx
index 23b86c2a9..79a35847e 100644
--- a/apps/start/src/components/grid-table.tsx
+++ b/apps/start/src/components/grid-table.tsx
@@ -62,7 +62,7 @@ export const GridCell: React.FC<
'flex min-h-12 items-center whitespace-nowrap px-4 align-middle shadow-[0_0_0_0.5px] shadow-border',
isHeader && 'h-10 bg-def-100 font-semibold text-muted-foreground',
colSpan && `col-span-${colSpan}`,
- className,
+ className
)}
{...props}
>
@@ -78,7 +78,7 @@ export const GridRow: React.FC<React.HTMLAttributes<HTMLDivElement>> = ({
<div
className={cn(
'contents transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted',
- className,
+ className
)}
{...props}
>
diff --git a/apps/start/src/components/groups/group-member-growth.tsx b/apps/start/src/components/groups/group-member-growth.tsx
index abd567129..1aab0f229 100644
--- a/apps/start/src/components/groups/group-member-growth.tsx
+++ b/apps/start/src/components/groups/group-member-growth.tsx
@@ -81,7 +81,9 @@ export function GroupMemberGrowth({ data }: Props) {
return (
<Widget className="w-full">
<WidgetHead>
- <WidgetTitle icon={TrendingUpIcon}>New members last 30 days</WidgetTitle>
+ <WidgetTitle icon={TrendingUpIcon}>
+ New members last 30 days
+ </WidgetTitle>
</WidgetHead>
<WidgetBody>
{data.length === 0 ? (
diff --git a/apps/start/src/components/groups/table/columns.tsx b/apps/start/src/components/groups/table/columns.tsx
index 97acbdc5b..2ce7808b6 100644
--- a/apps/start/src/components/groups/table/columns.tsx
+++ b/apps/start/src/components/groups/table/columns.tsx
@@ -42,9 +42,7 @@ export function useGroupColumns(): ColumnDef<IServiceGroupWithStats>[] {
{
accessorKey: 'type',
header: 'Type',
- cell: ({ row }) => (
- <Badge variant="outline">{row.original.type}</Badge>
- ),
+ cell: ({ row }) => <Badge variant="outline">{row.original.type}</Badge>,
},
{
accessorKey: 'memberCount',
diff --git a/apps/start/src/components/groups/table/index.tsx b/apps/start/src/components/groups/table/index.tsx
index c6fd36c60..0db80c731 100644
--- a/apps/start/src/components/groups/table/index.tsx
+++ b/apps/start/src/components/groups/table/index.tsx
@@ -26,7 +26,17 @@ interface Props {
toolbarLeft?: React.ReactNode;
}
-const LOADING_DATA = [{}, {}, {}, {}, {}, {}, {}, {}, {}] as IServiceGroupWithStats[];
+const LOADING_DATA = [
+ {},
+ {},
+ {},
+ {},
+ {},
+ {},
+ {},
+ {},
+ {},
+] as IServiceGroupWithStats[];
export const GroupsTable = memo(
({ query, pageSize = PAGE_SIZE, toolbarLeft }: Props) => {
diff --git a/apps/start/src/components/integrations/active-integrations.tsx b/apps/start/src/components/integrations/active-integrations.tsx
index e1858f6dc..7d9631b6f 100644
--- a/apps/start/src/components/integrations/active-integrations.tsx
+++ b/apps/start/src/components/integrations/active-integrations.tsx
@@ -22,7 +22,7 @@ export function ActiveIntegrations() {
const query = useQuery(
trpc.integration.list.queryOptions({
projectId: projectId!,
- }),
+ })
);
const client = useQueryClient();
const deletion = useMutation(
@@ -31,17 +31,17 @@ export function ActiveIntegrations() {
client.refetchQueries(
trpc.integration.list.queryFilter({
projectId,
- }),
+ })
);
},
- }),
+ })
);
const data = useMemo(() => {
return (query.data || [])
.map((item) => {
const integration = INTEGRATIONS.find(
- (integration) => integration.type === item.config.type,
+ (integration) => integration.type === item.config.type
)!;
return {
...item,
diff --git a/apps/start/src/components/integrations/integration-card.tsx b/apps/start/src/components/integrations/integration-card.tsx
index c0a35edde..53b731da4 100644
--- a/apps/start/src/components/integrations/integration-card.tsx
+++ b/apps/start/src/components/integrations/integration-card.tsx
@@ -39,7 +39,7 @@ export function IntegrationCardHeaderButtons({
<div
className={cn(
'absolute right-4 top-0 bottom-0 row items-center gap-2',
- className,
+ className
)}
>
{children}
@@ -79,7 +79,7 @@ export function IntegrationCardLogo({
<div
className={cn(
'size-14 rounded overflow-hidden shrink-0 center-center',
- className,
+ className
)}
{...props}
>
diff --git a/apps/start/src/components/json-editor.tsx b/apps/start/src/components/json-editor.tsx
index 7cb711db4..7831d9511 100644
--- a/apps/start/src/components/json-editor.tsx
+++ b/apps/start/src/components/json-editor.tsx
@@ -4,11 +4,7 @@ import { basicSetup } from 'codemirror';
import { javascript } from '@codemirror/lang-javascript';
import { json } from '@codemirror/lang-json';
import { oneDark } from '@codemirror/theme-one-dark';
-import {
- Compartment,
- EditorState,
- type Extension,
-} from '@codemirror/state';
+import { Compartment, EditorState, type Extension } from '@codemirror/state';
import { EditorView, keymap } from '@codemirror/view';
import { useEffect, useRef, useState } from 'react';
import { useTheme } from './theme-provider';
@@ -57,8 +53,7 @@ export function JsonEditor({
onValidate?.(true);
} catch (e) {
setIsValid(false);
- const errorMsg =
- e instanceof Error ? e.message : 'Invalid JSON syntax';
+ const errorMsg = e instanceof Error ? e.message : 'Invalid JSON syntax';
setError(errorMsg);
onValidate?.(false, errorMsg);
}
@@ -82,7 +77,9 @@ export function JsonEditor({
const extensions: Extension[] = [
basicSetup,
- languageCompartment.of(language === 'javascript' ? [javascript()] : [json()]),
+ languageCompartment.of(
+ language === 'javascript' ? [javascript()] : [json()]
+ ),
EditorState.tabSize.of(2),
EditorView.updateListener.of((update) => {
if (update.docChanged) {
@@ -166,7 +163,7 @@ export function JsonEditor({
viewRef.current.dispatch({
effects: themeCompartmentRef.current.reconfigure(
- appTheme === 'dark' ? [oneDark] : [],
+ appTheme === 'dark' ? [oneDark] : []
),
});
}, [appTheme]);
@@ -177,7 +174,7 @@ export function JsonEditor({
viewRef.current.dispatch({
effects: languageCompartmentRef.current.reconfigure(
- language === 'javascript' ? [javascript()] : [json()],
+ language === 'javascript' ? [javascript()] : [json()]
),
});
validateContent(value);
@@ -210,7 +207,8 @@ export function JsonEditor({
/>
{!isValid && (
<p className="mt-1 text-sm text-destructive">
- {error || `Invalid ${language === 'javascript' ? 'JavaScript' : 'JSON'}. Please check your syntax.`}
+ {error ||
+ `Invalid ${language === 'javascript' ? 'JavaScript' : 'JSON'}. Please check your syntax.`}
</p>
)}
</div>
diff --git a/apps/start/src/components/lazy-component.tsx b/apps/start/src/components/lazy-component.tsx
index a10501282..3b479250a 100644
--- a/apps/start/src/components/lazy-component.tsx
+++ b/apps/start/src/components/lazy-component.tsx
@@ -60,7 +60,7 @@ export const LazyComponent = ({
viewportOptions,
{
disconnectOnLeave,
- },
+ }
);
useEffect(() => {
diff --git a/apps/start/src/components/markdown.tsx b/apps/start/src/components/markdown.tsx
index 9b69dd966..084aea7a3 100644
--- a/apps/start/src/components/markdown.tsx
+++ b/apps/start/src/components/markdown.tsx
@@ -20,7 +20,7 @@ export const Markdown = memo<Options>(
prevProps.children === nextProps.children &&
'className' in prevProps &&
'className' in nextProps &&
- prevProps.className === nextProps.className,
+ prevProps.className === nextProps.className
);
Markdown.displayName = 'Markdown';
diff --git a/apps/start/src/components/notifications/notification-provider.tsx b/apps/start/src/components/notifications/notification-provider.tsx
index 879d8b6d6..93c4debc7 100644
--- a/apps/start/src/components/notifications/notification-provider.tsx
+++ b/apps/start/src/components/notifications/notification-provider.tsx
@@ -14,7 +14,9 @@ export function NotificationProvider() {
export function InnerNotificationProvider({
projectId,
-}: { projectId: string }) {
+}: {
+ projectId: string;
+}) {
useWS<Notification>(`/live/notifications/${projectId}`, (notification) => {
toast(notification.title, {
description: notification.message,
diff --git a/apps/start/src/components/notifications/notification-rules.tsx b/apps/start/src/components/notifications/notification-rules.tsx
index d8802d21c..ca83f0e73 100644
--- a/apps/start/src/components/notifications/notification-rules.tsx
+++ b/apps/start/src/components/notifications/notification-rules.tsx
@@ -16,7 +16,7 @@ export function NotificationRules() {
const query = useQuery(
trpc.notification.rules.queryOptions({
projectId,
- }),
+ })
);
const data = useMemo(() => {
return query.data || [];
diff --git a/apps/start/src/components/notifications/notifications.tsx b/apps/start/src/components/notifications/notifications.tsx
index 177cadf87..413f43455 100644
--- a/apps/start/src/components/notifications/notifications.tsx
+++ b/apps/start/src/components/notifications/notifications.tsx
@@ -9,7 +9,7 @@ export function Notifications() {
const query = useQuery(
trpc.notification.list.queryOptions({
projectId,
- }),
+ })
);
return <NotificationsTable query={query} />;
diff --git a/apps/start/src/components/notifications/rule-card.tsx b/apps/start/src/components/notifications/rule-card.tsx
index 9c3da3c51..ffda25d70 100644
--- a/apps/start/src/components/notifications/rule-card.tsx
+++ b/apps/start/src/components/notifications/rule-card.tsx
@@ -18,7 +18,9 @@ import { Tooltiper } from '../ui/tooltip';
function EventBadge({
event,
-}: { event: NotificationRule['config']['events'][number] }) {
+}: {
+ event: NotificationRule['config']['events'][number];
+}) {
return (
<Tooltiper
disabled={!event.filters.length}
@@ -44,7 +46,9 @@ function EventBadge({
export function RuleCard({
rule,
-}: { rule: RouterOutputs['notification']['rules'][number] }) {
+}: {
+ rule: RouterOutputs['notification']['rules'][number];
+}) {
const trpc = useTRPC();
const client = useQueryClient();
const deletion = useMutation(
@@ -54,10 +58,10 @@ export function RuleCard({
client.refetchQueries(
trpc.notification.rules.queryOptions({
projectId: rule.projectId,
- }),
+ })
);
},
- }),
+ })
);
const renderConfig = () => {
switch (rule.config.type) {
diff --git a/apps/start/src/components/onboarding/skip-onboarding.tsx b/apps/start/src/components/onboarding/skip-onboarding.tsx
index 8166518b5..5fc506cd1 100644
--- a/apps/start/src/components/onboarding/skip-onboarding.tsx
+++ b/apps/start/src/components/onboarding/skip-onboarding.tsx
@@ -16,12 +16,12 @@ export const SkipOnboarding = () => {
const pathname = location.pathname;
const segments = location.pathname.split('/').filter(Boolean);
const isPublic = PUBLIC_SEGMENTS.some((segment) =>
- segments.every((s, index) => s === segment[index]),
+ segments.every((s, index) => s === segment[index])
);
const res = useQuery(
trpc.onboarding.skipOnboardingCheck.queryOptions(undefined, {
enabled: !isPublic,
- }),
+ })
);
const logout = useLogout();
diff --git a/apps/start/src/components/onboarding/steps.tsx b/apps/start/src/components/onboarding/steps.tsx
index a8089aa84..8066c241b 100644
--- a/apps/start/src/components/onboarding/steps.tsx
+++ b/apps/start/src/components/onboarding/steps.tsx
@@ -38,7 +38,7 @@ function useSteps(path: string) {
// @ts-ignore
const matchIndex = steps.findLastIndex((step) =>
- path.match(new RegExp(step.match)),
+ path.match(new RegExp(step.match))
);
return steps.map((step, index) => {
@@ -69,7 +69,7 @@ export const OnboardingSteps = ({ className }: Props) => {
<div
className={cn(
'relative flex gap-4 overflow-hidden md:-ml-3 md:flex-col md:gap-8',
- className,
+ className
)}
>
{steps.map((step, index) => (
@@ -80,19 +80,19 @@ export const OnboardingSteps = ({ className }: Props) => {
'rounded-xl border border-border bg-card',
step.status === 'completed' &&
index !== currentIndex - 1 &&
- 'max-md:hidden',
+ 'max-md:hidden'
)}
key={step.name}
>
<div
className={cn(
- 'relative flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-white',
+ 'relative flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-white'
)}
>
<div
className={cn(
'absolute inset-0 z-0 rounded-full bg-highlight',
- step.status === 'pending' && 'bg-def-400',
+ step.status === 'pending' && 'bg-def-400'
)}
/>
{step.status === 'current' && (
diff --git a/apps/start/src/components/overview/filters/origin-filter.tsx b/apps/start/src/components/overview/filters/origin-filter.tsx
index 248250cf1..3b551bfe9 100644
--- a/apps/start/src/components/overview/filters/origin-filter.tsx
+++ b/apps/start/src/components/overview/filters/origin-filter.tsx
@@ -11,10 +11,7 @@ export function OriginFilter() {
const trpc = useTRPC();
const { data } = useQuery(
- trpc.event.origin.queryOptions(
- { projectId },
- { staleTime: 1000 * 60 * 60 },
- ),
+ trpc.event.origin.queryOptions({ projectId }, { staleTime: 1000 * 60 * 60 })
);
if (!data || data.length === 0) {
@@ -34,7 +31,7 @@ export function OriginFilter() {
'rounded-md border px-2.5 py-1 text-sm transition-colors cursor-pointer truncate max-w-56',
active
? 'bg-foreground text-background border-foreground font-medium'
- : 'text-muted-foreground hover:text-foreground hover:border-foreground/30',
+ : 'text-muted-foreground hover:text-foreground hover:border-foreground/30'
)}
>
{item.origin}
diff --git a/apps/start/src/components/overview/overview-insights.tsx b/apps/start/src/components/overview/overview-insights.tsx
index 995bf3f7d..fd779dc4d 100644
--- a/apps/start/src/components/overview/overview-insights.tsx
+++ b/apps/start/src/components/overview/overview-insights.tsx
@@ -22,7 +22,7 @@ export default function OverviewInsights({ projectId }: OverviewInsightsProps) {
trpc.insight.list.queryOptions({
projectId,
limit: 20,
- }),
+ })
);
if (isLoading) {
diff --git a/apps/start/src/components/overview/overview-list-modal.tsx b/apps/start/src/components/overview/overview-list-modal.tsx
index aa710bb4a..56011c147 100644
--- a/apps/start/src/components/overview/overview-list-modal.tsx
+++ b/apps/start/src/components/overview/overview-list-modal.tsx
@@ -108,11 +108,11 @@ export function OverviewListModal<T extends OverviewListItem>({
const { maxSessions, totalRevenue, hasRevenue, hasPageviews } =
useMemo(() => {
const maxSessions = Math.max(
- ...filteredData.map((item) => item.sessions),
+ ...filteredData.map((item) => item.sessions)
);
const totalRevenue = filteredData.reduce(
(sum, item) => sum + (item.revenue ?? 0),
- 0,
+ 0
);
const hasRevenue = filteredData.some((item) => (item.revenue ?? 0) > 0);
const hasPageviews =
diff --git a/apps/start/src/components/overview/overview-live-histogram.tsx b/apps/start/src/components/overview/overview-live-histogram.tsx
index 9632b4a75..80874be9a 100644
--- a/apps/start/src/components/overview/overview-live-histogram.tsx
+++ b/apps/start/src/components/overview/overview-live-histogram.tsx
@@ -36,7 +36,7 @@ export function OverviewLiveHistogram({
const number = useNumber();
const { data: liveData, isLoading } = useQuery(
- trpc.overview.liveData.queryOptions({ projectId, shareId }),
+ trpc.overview.liveData.queryOptions({ projectId, shareId })
);
const [hover, setHover] = useState<OPStatHoverState<MinutePoint>>({
@@ -83,13 +83,15 @@ export function OverviewLiveHistogram({
<span
className={cn(
'absolute inline-flex h-full w-full rounded-full opacity-75',
- totalSessions > 0 ? 'bg-emerald-500 animate-ping' : 'bg-destructive',
+ totalSessions > 0
+ ? 'bg-emerald-500 animate-ping'
+ : 'bg-destructive'
)}
/>
<span
className={cn(
'relative inline-flex h-2 w-2 rounded-full',
- totalSessions > 0 ? 'bg-emerald-500' : 'bg-destructive',
+ totalSessions > 0 ? 'bg-emerald-500' : 'bg-destructive'
)}
/>
</span>
diff --git a/apps/start/src/components/overview/overview-map.tsx b/apps/start/src/components/overview/overview-map.tsx
index 7a0b4b0d6..6cf94dbef 100644
--- a/apps/start/src/components/overview/overview-map.tsx
+++ b/apps/start/src/components/overview/overview-map.tsx
@@ -24,7 +24,7 @@ export function OverviewMap({ projectId, shareId }: OverviewMapProps) {
filters,
startDate,
endDate,
- }),
+ })
);
const mapData = useMemo(() => {
diff --git a/apps/start/src/components/overview/overview-share.tsx b/apps/start/src/components/overview/overview-share.tsx
index a48e0bd44..58bc838da 100644
--- a/apps/start/src/components/overview/overview-share.tsx
+++ b/apps/start/src/components/overview/overview-share.tsx
@@ -27,8 +27,8 @@ export function OverviewShare({ projectId }: OverviewShareProps) {
},
{
retry: 0,
- },
- ),
+ }
+ )
);
const data = query.data;
const mutation = useMutation(
@@ -36,7 +36,7 @@ export function OverviewShare({ projectId }: OverviewShareProps) {
onSuccess() {
query.refetch();
},
- }),
+ })
);
return (
diff --git a/apps/start/src/components/overview/overview-top-events.tsx b/apps/start/src/components/overview/overview-top-events.tsx
index e511e4c3b..2b7e50660 100644
--- a/apps/start/src/components/overview/overview-top-events.tsx
+++ b/apps/start/src/components/overview/overview-top-events.tsx
@@ -31,7 +31,7 @@ export default function OverviewTopEvents({
const navigate = useNavigate();
const trpc = useTRPC();
const { data: conversions } = useQuery(
- trpc.overview.topConversions.queryOptions({ projectId, shareId }),
+ trpc.overview.topConversions.queryOptions({ projectId, shareId })
);
const [searchQuery, setSearchQuery] = useState('');
@@ -73,7 +73,7 @@ export default function OverviewTopEvents({
widget.meta?.type === 'events'
? ['session_start', 'session_end', 'screen_view']
: undefined,
- }),
+ })
);
const linkOutQuery = useQuery(
@@ -84,7 +84,7 @@ export default function OverviewTopEvents({
startDate,
endDate,
filters,
- }),
+ })
);
const tableData: EventTableItem[] = useMemo(() => {
@@ -133,7 +133,7 @@ export default function OverviewTopEvents({
}
const queryLower = searchQuery.toLowerCase();
return tableData.filter((item) =>
- item.name?.toLowerCase().includes(queryLower),
+ item.name?.toLowerCase().includes(queryLower)
);
}, [tableData, searchQuery]);
@@ -145,7 +145,7 @@ export default function OverviewTopEvents({
key: w.key,
label: w.btn,
})),
- [widgets],
+ [widgets]
);
return (
@@ -168,9 +168,7 @@ export default function OverviewTopEvents({
data={filteredData}
onItemClick={(name) => {
const filterName =
- widget.meta?.type === 'linkOut'
- ? 'properties.href'
- : 'name';
+ widget.meta?.type === 'linkOut' ? 'properties.href' : 'name';
const f = eventQueryFiltersParser.serialize([
{
id: filterName,
diff --git a/apps/start/src/components/overview/overview-top-generic-modal.tsx b/apps/start/src/components/overview/overview-top-generic-modal.tsx
index 9e7ef60f8..d18835a72 100644
--- a/apps/start/src/components/overview/overview-top-generic-modal.tsx
+++ b/apps/start/src/components/overview/overview-top-generic-modal.tsx
@@ -32,7 +32,7 @@ export default function OverviewTopGenericModal({
endDate,
range,
column,
- }),
+ })
);
const columnNamePlural = OVERVIEW_COLUMNS_NAME_PLURAL[column];
diff --git a/apps/start/src/components/overview/overview-top-pages-modal.tsx b/apps/start/src/components/overview/overview-top-pages-modal.tsx
index 0024fc8b5..9f75c9f04 100644
--- a/apps/start/src/components/overview/overview-top-pages-modal.tsx
+++ b/apps/start/src/components/overview/overview-top-pages-modal.tsx
@@ -26,7 +26,7 @@ export default function OverviewTopPagesModal({
endDate,
mode: 'page',
range,
- }),
+ })
);
return (
diff --git a/apps/start/src/components/overview/overview-top-pages.tsx b/apps/start/src/components/overview/overview-top-pages.tsx
index 2e801f457..4fb10d566 100644
--- a/apps/start/src/components/overview/overview-top-pages.tsx
+++ b/apps/start/src/components/overview/overview-top-pages.tsx
@@ -66,7 +66,7 @@ export default function OverviewTopPages({
endDate,
mode: widget.key,
range,
- }),
+ })
);
const filteredData = useMemo(() => {
@@ -78,7 +78,7 @@ export default function OverviewTopPages({
return data.filter(
(item) =>
item.path.toLowerCase().includes(queryLower) ||
- item.origin.toLowerCase().includes(queryLower),
+ item.origin.toLowerCase().includes(queryLower)
);
}, [query.data, searchQuery]);
diff --git a/apps/start/src/components/overview/overview-user-journey.tsx b/apps/start/src/components/overview/overview-user-journey.tsx
index 9e8e7d1b3..7674efdb4 100644
--- a/apps/start/src/components/overview/overview-user-journey.tsx
+++ b/apps/start/src/components/overview/overview-user-journey.tsx
@@ -120,11 +120,11 @@ function SankeyPortalTooltip({
// Clamp inside viewport with a little padding.
left = Math.min(
Math.max(padding, left),
- Math.max(padding, vw - rect.width - padding),
+ Math.max(padding, vw - rect.width - padding)
);
top = Math.min(
Math.max(padding, top),
- Math.max(padding, vh - rect.height - padding),
+ Math.max(padding, vh - rect.height - padding)
);
setPos({ left, top, ready: true });
@@ -152,7 +152,7 @@ function SankeyPortalTooltip({
>
{children}
</div>,
- document.body,
+ document.body
)}
</>
);
@@ -166,7 +166,7 @@ export default function OverviewUserJourney({
const [filters] = useEventQueryFilters();
const [steps, setSteps] = useQueryState(
'journeySteps',
- parseAsInteger.withDefault(5).withOptions({ history: 'push' }),
+ parseAsInteger.withDefault(5).withOptions({ history: 'push' })
);
const containerRef = useRef<HTMLDivElement>(null);
const trpc = useTRPC();
@@ -180,7 +180,7 @@ export default function OverviewUserJourney({
range,
steps: steps ?? 5,
shareId,
- }),
+ })
);
const data = query.data;
@@ -391,7 +391,7 @@ export default function OverviewUserJourney({
}}
label={(node: any) => {
const label = showPath(
- node.data?.label || node.label || node.id,
+ node.data?.label || node.label || node.id
);
return truncate(label, 30, 'middle');
}}
diff --git a/apps/start/src/components/overview/overview-view-toggle.tsx b/apps/start/src/components/overview/overview-view-toggle.tsx
index 776e649f9..fb35f0f22 100644
--- a/apps/start/src/components/overview/overview-view-toggle.tsx
+++ b/apps/start/src/components/overview/overview-view-toggle.tsx
@@ -18,7 +18,7 @@ export function OverviewViewToggle({
'view',
parseAsStringEnum(['table', 'chart'])
.withDefault(defaultView)
- .withOptions({ history: 'push' }),
+ .withOptions({ history: 'push' })
);
return (
@@ -29,7 +29,9 @@ export function OverviewViewToggle({
onClick={() => {
setView(view === 'table' ? 'chart' : 'table');
}}
- title={view === 'table' ? 'Switch to chart view' : 'Switch to table view'}
+ title={
+ view === 'table' ? 'Switch to chart view' : 'Switch to table view'
+ }
>
{view === 'table' ? (
<LineChartIcon size={16} />
@@ -46,9 +48,8 @@ export function useOverviewView() {
'view',
parseAsStringEnum(['table', 'chart'])
.withDefault('table')
- .withOptions({ history: 'push' }),
+ .withOptions({ history: 'push' })
);
return [view, setView] as const;
}
-
diff --git a/apps/start/src/components/overview/overview-weekly-trends.tsx b/apps/start/src/components/overview/overview-weekly-trends.tsx
index 53181030e..7d6bae982 100644
--- a/apps/start/src/components/overview/overview-weekly-trends.tsx
+++ b/apps/start/src/components/overview/overview-weekly-trends.tsx
@@ -58,7 +58,7 @@ function formatHourRange(hour: number) {
}
function getColorClass(ratio: number) {
- if(ratio === 0) return 'bg-transparent';
+ if (ratio === 0) return 'bg-transparent';
if (ratio < 0.1) return 'bg-chart-0/5';
if (ratio < 0.2) return 'bg-chart-0/10';
if (ratio < 0.3) return 'bg-chart-0/20';
@@ -90,7 +90,7 @@ export default function OverviewWeeklyTrends({
filters,
startDate,
endDate,
- }),
+ })
);
// Build a 7×24 heatmap: aggregated[dayOfWeek][hour] averaged over all weeks
@@ -99,11 +99,9 @@ export default function OverviewWeeklyTrends({
if (!series?.length) return null;
// aggregated[day 0=Mon..6=Sun][hour]
- const sums: number[][] = Array.from({ length: 7 }, () =>
- Array(24).fill(0),
- );
+ const sums: number[][] = Array.from({ length: 7 }, () => Array(24).fill(0));
const counts: number[][] = Array.from({ length: 7 }, () =>
- Array(24).fill(0),
+ Array(24).fill(0)
);
for (const item of series) {
@@ -124,7 +122,7 @@ export default function OverviewWeeklyTrends({
row.map((sum, hour) => {
const count = counts[day]![hour]!;
return count > 0 ? sum / count : 0;
- }),
+ })
);
let max = 0;
@@ -166,9 +164,7 @@ export default function OverviewWeeklyTrends({
key={hour}
className="flex h-4 items-center justify-end text-[10px] text-muted-foreground"
>
- {hour % 3 === 0
- ? `${String(hour).padStart(2, '0')}:00`
- : ''}
+ {hour % 3 === 0 ? `${String(hour).padStart(2, '0')}:00` : ''}
</div>
))}
</div>
@@ -187,66 +183,61 @@ export default function OverviewWeeklyTrends({
))}
</div>
- <TooltipProvider disableHoverableContent delayDuration={0}>
- {/* Rows = hours, columns = days */}
- {Array.from({ length: 24 }, (_, hour) => (
- <div key={hour} className="flex h-4">
- {Array.from({ length: 7 }, (_, day) => {
- const value = heatmap.averages[day]![hour]!;
- const ratio =
- heatmap.max > 0 && value > 0
- ? value / heatmap.max
- : 0;
- const colorClass = getColorClass(ratio)
-
- return (
- <Tooltip key={day}>
- <TooltipTrigger asChild>
- <div className={cn(
- 'flex-1 p-0.5 group',
- )}>
- <div className={cn(
- 'size-full rounded-sm transition-all group-hover:ring-1 group-hover:ring-emerald-400',
- colorClass,
- )}
-
- />
- </div>
- </TooltipTrigger>
- <TooltipContent
- side="top"
- className="border-0 bg-transparent p-0 shadow-none"
-
- >
- <ChartTooltipContainer>
- <ChartTooltipHeader>
- <div className="text-sm font-medium">
- {LONG_DAY_NAMES[day]}, {formatHourRange(hour)}
- </div>
- </ChartTooltipHeader>
- <ChartTooltipItem color="#10b981">
- <div className="flex items-center justify-between gap-6 font-mono font-medium text-sm">
- <div className="text-muted-foreground">
- {activeMetric.label}
+ <TooltipProvider disableHoverableContent delayDuration={0}>
+ {/* Rows = hours, columns = days */}
+ {Array.from({ length: 24 }, (_, hour) => (
+ <div key={hour} className="flex h-4">
+ {Array.from({ length: 7 }, (_, day) => {
+ const value = heatmap.averages[day]![hour]!;
+ const ratio =
+ heatmap.max > 0 && value > 0 ? value / heatmap.max : 0;
+ const colorClass = getColorClass(ratio);
+
+ return (
+ <Tooltip key={day}>
+ <TooltipTrigger asChild>
+ <div className={cn('flex-1 p-0.5 group')}>
+ <div
+ className={cn(
+ 'size-full rounded-sm transition-all group-hover:ring-1 group-hover:ring-emerald-400',
+ colorClass
+ )}
+ />
+ </div>
+ </TooltipTrigger>
+ <TooltipContent
+ side="top"
+ className="border-0 bg-transparent p-0 shadow-none"
+ >
+ <ChartTooltipContainer>
+ <ChartTooltipHeader>
+ <div className="text-sm font-medium">
+ {LONG_DAY_NAMES[day]}, {formatHourRange(hour)}
</div>
- <div>
- {activeMetric.unit === 'pct'
- ? `${number.format(value)} %`
- : number.formatWithUnit(
- value,
- activeMetric.unit || null,
- )}
+ </ChartTooltipHeader>
+ <ChartTooltipItem color="#10b981">
+ <div className="flex items-center justify-between gap-6 font-mono font-medium text-sm">
+ <div className="text-muted-foreground">
+ {activeMetric.label}
+ </div>
+ <div>
+ {activeMetric.unit === 'pct'
+ ? `${number.format(value)} %`
+ : number.formatWithUnit(
+ value,
+ activeMetric.unit || null
+ )}
+ </div>
</div>
- </div>
- </ChartTooltipItem>
- </ChartTooltipContainer>
- </TooltipContent>
- </Tooltip>
- );
- })}
- </div>
- ))}
- </TooltipProvider>
+ </ChartTooltipItem>
+ </ChartTooltipContainer>
+ </TooltipContent>
+ </Tooltip>
+ );
+ })}
+ </div>
+ ))}
+ </TooltipProvider>
</div>
</div>
)}
diff --git a/apps/start/src/components/overview/overview-widget-table.tsx b/apps/start/src/components/overview/overview-widget-table.tsx
index 50a297c71..1c665463b 100644
--- a/apps/start/src/components/overview/overview-widget-table.tsx
+++ b/apps/start/src/components/overview/overview-widget-table.tsx
@@ -65,7 +65,7 @@ function SortableHeader({
onClick={onClick}
className={cn(
'row items-center gap-1 hover:opacity-80 transition-opacity',
- isRightAligned && 'justify-end ml-auto',
+ isRightAligned && 'justify-end ml-auto'
)}
>
<span>{name}</span>
@@ -95,7 +95,7 @@ export const OverviewWidgetTable = <T,>({
}: Props<T>) => {
const [sortColumn, setSortColumn] = useState<string | null>(null);
const [sortDirection, setSortDirection] = useState<'asc' | 'desc' | null>(
- null,
+ null
);
// Handle column header click for sorting
@@ -190,7 +190,7 @@ export const OverviewWidgetTable = <T,>({
? 'text-left w-full font-medium min-w-0'
: 'text-right font-mono',
// Remove old responsive logic - now handled by responsive prop
- column.className,
+ column.className
),
};
});
@@ -603,7 +603,7 @@ export function OverviewWidgetTableGeneric({
column: {
name: string;
render: (
- item: RouterOutputs['overview']['topGeneric'][number],
+ item: RouterOutputs['overview']['topGeneric'][number]
) => React.ReactNode;
};
}) {
@@ -631,7 +631,7 @@ export function OverviewWidgetTableGeneric({
width: '100px',
responsive: { priority: 3 },
getSortValue: (
- item: RouterOutputs['overview']['topGeneric'][number],
+ item: RouterOutputs['overview']['topGeneric'][number]
) => item.revenue ?? 0,
render(item: RouterOutputs['overview']['topGeneric'][number]) {
const revenue = item.revenue ?? 0;
@@ -661,7 +661,7 @@ export function OverviewWidgetTableGeneric({
width: '84px',
responsive: { priority: 2 },
getSortValue: (
- item: RouterOutputs['overview']['topGeneric'][number],
+ item: RouterOutputs['overview']['topGeneric'][number]
) => item.pageviews,
render(item: RouterOutputs['overview']['topGeneric'][number]) {
return (
@@ -680,7 +680,7 @@ export function OverviewWidgetTableGeneric({
width: '84px',
responsive: { priority: 2 },
getSortValue: (
- item: RouterOutputs['overview']['topGeneric'][number],
+ item: RouterOutputs['overview']['topGeneric'][number]
) => item.sessions,
render(item) {
return (
diff --git a/apps/start/src/components/overview/overview-widget.tsx b/apps/start/src/components/overview/overview-widget.tsx
index 5ad0b4c0e..ae4f5cad7 100644
--- a/apps/start/src/components/overview/overview-widget.tsx
+++ b/apps/start/src/components/overview/overview-widget.tsx
@@ -20,7 +20,7 @@ export function WidgetHead({ className, ...props }: WidgetHeadProps) {
<WidgetHeadBase
className={cn(
'relative flex flex-col rounded-t-xl p-0 [&_.title]:flex [&_.title]:items-center [&_.title]:p-4 [&_.title]:font-semibold',
- className,
+ className
)}
{...props}
/>
@@ -59,7 +59,7 @@ export function WidgetAbsoluteButtons({
<div
className={cn(
'row gap-1 absolute right-4 top-1/2 -translate-y-1/2',
- className,
+ className
)}
{...props}
>
@@ -83,11 +83,11 @@ export function WidgetButtons({
if (sizes.current.length === 0) {
// Get buttons
const buttons: HTMLButtonElement[] = Array.from(
- container.current.querySelectorAll('button'),
+ container.current.querySelectorAll('button')
);
// Get sizes and cache them
sizes.current = buttons.map(
- (button) => Math.ceil(button.offsetWidth) + gap,
+ (button) => Math.ceil(button.offsetWidth) + gap
);
}
const containerWidth = container.current.offsetWidth;
@@ -102,7 +102,7 @@ export function WidgetButtons({
}
return { index, size: acc.size + size };
},
- { index: 0, size: 0 },
+ { index: 0, size: 0 }
);
setSlice(res.index);
@@ -126,7 +126,7 @@ export function WidgetButtons({
ref={container}
className={cn(
'-mb-px -mt-2 flex flex-wrap justify-start self-stretch px-4 transition-opacity [&_button.active]:border-b-2 [&_button.active]:border-black [&_button.active]:opacity-100 dark:[&_button.active]:border-white [&_button]:whitespace-nowrap [&_button]:py-1 [&_button]:text-sm [&_button]:opacity-50',
- className,
+ className
)}
style={{ gap }}
{...props}
@@ -136,7 +136,7 @@ export function WidgetButtons({
<div
className={cn(
'flex [&_button]:leading-normal',
- slice < index ? hidden : 'opacity-100',
+ slice < index ? hidden : 'opacity-100'
)}
>
{child}
@@ -149,7 +149,7 @@ export function WidgetButtons({
type="button"
className={cn(
'flex select-none items-center gap-1',
- sizes.current.length - 1 === slice ? hidden : 'opacity-50',
+ sizes.current.length - 1 === slice ? hidden : 'opacity-50'
)}
>
More <ChevronsUpDownIcon size={12} />
@@ -207,7 +207,7 @@ export function WidgetHeadSearchable<T extends string>({
setShowLeftGradient(hasOverflow && scrollLeft > 0);
setShowRightGradient(
- hasOverflow && scrollLeft < scrollWidth - clientWidth - 1,
+ hasOverflow && scrollLeft < scrollWidth - clientWidth - 1
);
}, []);
@@ -240,7 +240,7 @@ export function WidgetHeadSearchable<T extends string>({
<div
className={cn(
'pointer-events-none absolute left-0 top-0 z-10 h-full w-8 bg-gradient-to-r from-card to-transparent transition-opacity duration-200',
- showLeftGradient ? 'opacity-100' : 'opacity-0',
+ showLeftGradient ? 'opacity-100' : 'opacity-0'
)}
/>
@@ -258,7 +258,7 @@ export function WidgetHeadSearchable<T extends string>({
'shrink-0 rounded-md py-1.5 text-sm font-medium transition-colors px-2',
activeTab === tab.key
? 'text-foreground'
- : 'text-muted-foreground hover:bg-def-100 hover:text-foreground',
+ : 'text-muted-foreground hover:bg-def-100 hover:text-foreground'
)}
>
{tab.label}
@@ -270,7 +270,7 @@ export function WidgetHeadSearchable<T extends string>({
<div
className={cn(
'pointer-events-none absolute right-0 top-0 z-10 bottom-px w-8 bg-gradient-to-l from-card to-transparent transition-opacity duration-200',
- showRightGradient ? 'opacity-100' : 'opacity-0',
+ showRightGradient ? 'opacity-100' : 'opacity-0'
)}
/>
</div>
@@ -301,7 +301,7 @@ export function WidgetFooter({
<div
className={cn(
'flex rounded-b-md border-t bg-def-100 p-2 py-1',
- className,
+ className
)}
{...props}
>
diff --git a/apps/start/src/components/overview/useOverviewWidget.tsx b/apps/start/src/components/overview/useOverviewWidget.tsx
index db1a2399d..0c9149bd5 100644
--- a/apps/start/src/components/overview/useOverviewWidget.tsx
+++ b/apps/start/src/components/overview/useOverviewWidget.tsx
@@ -9,14 +9,14 @@ export function useOverviewWidget<T extends string>(
widgets: Record<
T,
{ title: string; btn: string; chart: ReportChartProps; hide?: boolean }
- >,
+ >
) {
const keys = Object.keys(widgets) as T[];
const [widget, setWidget] = useQueryState<T>(
key,
parseAsStringEnum(keys)
.withDefault(keys[0]!)
- .withOptions({ history: 'push' }),
+ .withOptions({ history: 'push' })
);
return [
{
@@ -33,17 +33,14 @@ export function useOverviewWidget<T extends string>(
export function useOverviewWidgetV2<T extends string>(
key: string,
- widgets: Record<
- T,
- { title: string; btn: string; meta?: any; hide?: boolean }
- >,
+ widgets: Record<T, { title: string; btn: string; meta?: any; hide?: boolean }>
) {
const keys = Object.keys(widgets) as T[];
const [widget, setWidget] = useQueryState<T>(
key,
parseAsStringEnum(keys)
.withDefault(keys[0]!)
- .withOptions({ history: 'push' }),
+ .withOptions({ history: 'push' })
);
return [
{
diff --git a/apps/start/src/components/page/gsc-breakdown-table.tsx b/apps/start/src/components/page/gsc-breakdown-table.tsx
index 09282c587..2acfef170 100644
--- a/apps/start/src/components/page/gsc-breakdown-table.tsx
+++ b/apps/start/src/components/page/gsc-breakdown-table.tsx
@@ -10,7 +10,11 @@ interface GscBreakdownTableProps {
type: 'page' | 'query';
}
-export function GscBreakdownTable({ projectId, value, type }: GscBreakdownTableProps) {
+export function GscBreakdownTable({
+ projectId,
+ value,
+ type,
+}: GscBreakdownTableProps) {
const { range, startDate, endDate } = useOverviewOptions();
const trpc = useTRPC();
@@ -23,23 +27,26 @@ export function GscBreakdownTable({ projectId, value, type }: GscBreakdownTableP
const pageQuery = useQuery(
trpc.gsc.getPageDetails.queryOptions(
{ projectId, page: value, ...dateInput },
- { enabled: type === 'page' },
- ),
+ { enabled: type === 'page' }
+ )
);
const queryQuery = useQuery(
trpc.gsc.getQueryDetails.queryOptions(
{ projectId, query: value, ...dateInput },
- { enabled: type === 'query' },
- ),
+ { enabled: type === 'query' }
+ )
);
- const isLoading = type === 'page' ? pageQuery.isLoading : queryQuery.isLoading;
+ const isLoading =
+ type === 'page' ? pageQuery.isLoading : queryQuery.isLoading;
const breakdownRows: Record<string, string | number>[] =
type === 'page'
- ? ((pageQuery.data as { queries?: unknown[] } | undefined)?.queries ?? []) as Record<string, string | number>[]
- : ((queryQuery.data as { pages?: unknown[] } | undefined)?.pages ?? []) as Record<string, string | number>[];
+ ? (((pageQuery.data as { queries?: unknown[] } | undefined)?.queries ??
+ []) as Record<string, string | number>[])
+ : (((queryQuery.data as { pages?: unknown[] } | undefined)?.pages ??
+ []) as Record<string, string | number>[]);
const breakdownKey = type === 'page' ? 'query' : 'page';
const breakdownLabel = type === 'page' ? 'Query' : 'Page';
@@ -47,7 +54,7 @@ export function GscBreakdownTable({ projectId, value, type }: GscBreakdownTableP
const maxClicks = Math.max(
...(breakdownRows as { clicks: number }[]).map((r) => r.clicks),
- 1,
+ 1
);
return (
@@ -61,11 +68,31 @@ export function GscBreakdownTable({ projectId, value, type }: GscBreakdownTableP
keyExtractor={(i) => String(i)}
getColumnPercentage={() => 0}
columns={[
- { name: breakdownLabel, width: 'w-full', render: () => <Skeleton className="h-4 w-2/3" /> },
- { name: 'Clicks', width: '70px', render: () => <Skeleton className="h-4 w-10" /> },
- { name: 'Impr.', width: '70px', render: () => <Skeleton className="h-4 w-10" /> },
- { name: 'CTR', width: '60px', render: () => <Skeleton className="h-4 w-8" /> },
- { name: 'Pos.', width: '55px', render: () => <Skeleton className="h-4 w-8" /> },
+ {
+ name: breakdownLabel,
+ width: 'w-full',
+ render: () => <Skeleton className="h-4 w-2/3" />,
+ },
+ {
+ name: 'Clicks',
+ width: '70px',
+ render: () => <Skeleton className="h-4 w-10" />,
+ },
+ {
+ name: 'Impr.',
+ width: '70px',
+ render: () => <Skeleton className="h-4 w-10" />,
+ },
+ {
+ name: 'CTR',
+ width: '60px',
+ render: () => <Skeleton className="h-4 w-8" />,
+ },
+ {
+ name: 'Pos.',
+ width: '55px',
+ render: () => <Skeleton className="h-4 w-8" />,
+ },
]}
/>
) : (
diff --git a/apps/start/src/components/page/gsc-position-chart.tsx b/apps/start/src/components/page/gsc-position-chart.tsx
index 38b036e9d..6479be2f7 100644
--- a/apps/start/src/components/page/gsc-position-chart.tsx
+++ b/apps/start/src/components/page/gsc-position-chart.tsx
@@ -58,7 +58,9 @@ export function GscPositionChart({ data, isLoading }: GscPositionChartProps) {
}));
const positions = chartData.map((d) => d.position).filter((p) => p > 0);
- const minPos = positions.length ? Math.max(1, Math.floor(Math.min(...positions)) - 2) : 1;
+ const minPos = positions.length
+ ? Math.max(1, Math.floor(Math.min(...positions)) - 2)
+ : 1;
const maxPos = positions.length ? Math.ceil(Math.max(...positions)) + 2 : 20;
return (
diff --git a/apps/start/src/components/pages/table/index.tsx b/apps/start/src/components/pages/table/index.tsx
index f09a8f64e..ddbbe89c0 100644
--- a/apps/start/src/components/pages/table/index.tsx
+++ b/apps/start/src/components/pages/table/index.tsx
@@ -32,15 +32,15 @@ export function PagesTable({ projectId }: PagesTableProps) {
range,
interval,
},
- { placeholderData: keepPreviousData },
- ),
+ { placeholderData: keepPreviousData }
+ )
);
const connectionQuery = useQuery(
- trpc.gsc.getConnection.queryOptions({ projectId }),
+ trpc.gsc.getConnection.queryOptions({ projectId })
);
- const isGscConnected = !!(connectionQuery.data?.siteUrl);
+ const isGscConnected = !!connectionQuery.data?.siteUrl;
const gscPagesQuery = useQuery(
trpc.gsc.getPages.queryOptions(
@@ -51,15 +51,15 @@ export function PagesTable({ projectId }: PagesTableProps) {
endDate: endDate ?? undefined,
limit: 10_000,
},
- { enabled: isGscConnected },
- ),
+ { enabled: isGscConnected }
+ )
);
const previousPagesQuery = useQuery(
trpc.event.previousPages.queryOptions(
{ projectId, range, interval },
- { placeholderData: keepPreviousData },
- ),
+ { placeholderData: keepPreviousData }
+ )
);
const previousMap = useMemo(() => {
diff --git a/apps/start/src/components/pagination.tsx b/apps/start/src/components/pagination.tsx
index 87643f4df..130a500bf 100644
--- a/apps/start/src/components/pagination.tsx
+++ b/apps/start/src/components/pagination.tsx
@@ -50,7 +50,7 @@ export function Pagination({
<div
className={cn(
'flex select-none items-center justify-end gap-1',
- className,
+ className
)}
>
{typeof firstPage === 'function' && (
diff --git a/apps/start/src/components/ping.tsx b/apps/start/src/components/ping.tsx
index 78bea3a11..a3571ae8d 100644
--- a/apps/start/src/components/ping.tsx
+++ b/apps/start/src/components/ping.tsx
@@ -8,7 +8,7 @@ export function Ping({ className }: { className?: string }) {
<div
className={cn(
'size-2 bg-emerald-500 rounded-full absolute inset-0 animate-ping',
- className,
+ className
)}
/>
</div>
@@ -18,7 +18,10 @@ export function Ping({ className }: { className?: string }) {
export function PingBadge({
children,
className,
-}: { children: React.ReactNode; className?: string }) {
+}: {
+ children: React.ReactNode;
+ className?: string;
+}) {
return (
<Badge variant={'outline'} className={cn('flex gap-1', className)}>
<Ping />
diff --git a/apps/start/src/components/profiles/latest-events.tsx b/apps/start/src/components/profiles/latest-events.tsx
index fec02e692..321874515 100644
--- a/apps/start/src/components/profiles/latest-events.tsx
+++ b/apps/start/src/components/profiles/latest-events.tsx
@@ -30,7 +30,7 @@ export const LatestEvents = ({
trpc.event.events.queryOptions({
projectId,
profileId,
- }),
+ })
);
const handleShowMore = () => {
diff --git a/apps/start/src/components/profiles/profile-activity.tsx b/apps/start/src/components/profiles/profile-activity.tsx
index f8509e1ff..2b6e000af 100644
--- a/apps/start/src/components/profiles/profile-activity.tsx
+++ b/apps/start/src/components/profiles/profile-activity.tsx
@@ -38,7 +38,11 @@ const MonthCalendar = ({
month,
data,
maxCount,
-}: { month: Date; data: Props['data']; maxCount: number }) => (
+}: {
+ month: Date;
+ data: Props['data'];
+ maxCount: number;
+}) => (
<div>
<div className="mb-2 text-sm">{format(month, 'MMMM yyyy')}</div>
<div className="-m-1 grid grid-cols-7 gap-1 p-1">
@@ -47,7 +51,7 @@ const MonthCalendar = ({
end: endOfMonth(month),
}).map((date) => {
const hit = data.find((item) =>
- item.date.includes(formatISO(date, { representation: 'date' })),
+ item.date.includes(formatISO(date, { representation: 'date' }))
);
const opacity = hit ? getOpacityLevel(hit.count, maxCount) : 0;
return (
@@ -69,7 +73,7 @@ const MonthCalendar = ({
>
<div
className={cn(
- 'aspect-square w-full rounded cursor-default group hover:ring-1 hover:ring-foreground overflow-hidden',
+ 'aspect-square w-full rounded cursor-default group hover:ring-1 hover:ring-foreground overflow-hidden'
)}
>
<div
@@ -79,7 +83,7 @@ const MonthCalendar = ({
? 'bg-highlight'
: hit
? 'bg-foreground'
- : 'bg-def-200',
+ : 'bg-def-200'
)}
style={hit && !isToday(date) ? { opacity } : undefined}
/>
diff --git a/apps/start/src/components/profiles/profile-groups.tsx b/apps/start/src/components/profiles/profile-groups.tsx
index c99f37a37..2512bf1d1 100644
--- a/apps/start/src/components/profiles/profile-groups.tsx
+++ b/apps/start/src/components/profiles/profile-groups.tsx
@@ -15,7 +15,7 @@ export const ProfileGroups = ({ projectId, groups }: Props) => {
trpc.group.listByIds.queryOptions({
projectId,
ids: groups,
- }),
+ })
);
if (groups.length === 0 || !query.data?.length) {
diff --git a/apps/start/src/components/profiles/profile-properties.tsx b/apps/start/src/components/profiles/profile-properties.tsx
index 54ab1a50f..5384eae3c 100644
--- a/apps/start/src/components/profiles/profile-properties.tsx
+++ b/apps/start/src/components/profiles/profile-properties.tsx
@@ -15,7 +15,7 @@ type Props = {
export const ProfileProperties = ({ profile }: Props) => {
const [tab, setTab] = useQueryState(
'tab',
- parseAsStringEnum(['profile', 'properties']).withDefault('profile'),
+ parseAsStringEnum(['profile', 'properties']).withDefault('profile')
);
return (
diff --git a/apps/start/src/components/projects/project-card.tsx b/apps/start/src/components/projects/project-card.tsx
index 10e7eef17..4c68fbe4a 100644
--- a/apps/start/src/components/projects/project-card.tsx
+++ b/apps/start/src/components/projects/project-card.tsx
@@ -16,12 +16,15 @@ import { ProjectChart } from './project-chart';
export function ProjectCardRoot({
children,
className,
-}: { children: React.ReactNode; className?: string }) {
+}: {
+ children: React.ReactNode;
+ className?: string;
+}) {
return (
<div
className={cn(
'relative card hover:-translate-y-px hover:shadow-sm',
- className,
+ className
)}
>
{children}
@@ -82,7 +85,7 @@ function ProjectChartOuter({ id }: { id: string }) {
const { data } = useQuery(
trpc.chart.projectCard.queryOptions({
projectId: id,
- }),
+ })
);
return (
@@ -92,9 +95,22 @@ function ProjectChartOuter({ id }: { id: string }) {
);
}
-function Metric({ value, label, className }: { value: React.ReactNode; label: string; className?: string }) {
+function Metric({
+ value,
+ label,
+ className,
+}: {
+ value: React.ReactNode;
+ label: string;
+ className?: string;
+}) {
return (
- <div className={cn("flex flex-col gap-1 md:flex-row items-center text-sm", className)}>
+ <div
+ className={cn(
+ 'flex flex-col gap-1 md:flex-row items-center text-sm',
+ className
+ )}
+ >
<div className="text-muted-foreground">{label}</div>
<span className="font-medium whitespace-nowrap">{value}</span>
</div>
@@ -107,48 +123,52 @@ function ProjectMetrics({ id }: { id: string }) {
const { data } = useQuery(
trpc.chart.projectCard.queryOptions({
projectId: id,
- }),
+ })
);
return (
<FadeIn className="row flex-wrap gap-3 flex-1">
- {typeof data?.trend?.percentage === 'number' && (
- <Metric
- label="3M DIFF"
- value={
- <span
- className={cn(
- 'font-semibold',
- 'row gap-1 items-center',
- data?.trend?.direction === 'up'
- ? 'text-emerald-300'
- : data?.trend?.direction === 'down'
- ? 'text-orange-300'
- : 'text-muted-foreground',
- )}
- >
- {data.trend.direction === 'up' && (
- <TrendingUpIcon className="size-4" />
- )}
- {data.trend.direction === 'down' && (
- <TrendingDownIcon className="size-4" />
- )}
- {Math.abs(data.trend.percentage)}%
- </span>
- }
- />
- )}
- {!!data?.metrics?.revenue && (
- <Metric
- label="Revenue"
- value={number.currency(data?.metrics?.revenue / 100, {
- short: true,
- })}
- />
- )}
- <Metric label="3M" value={number.short(data?.metrics?.months_3 ?? 0)} className="ml-auto" />
- <Metric label="30D" value={number.short(data?.metrics?.month ?? 0)} />
- <Metric label="24H" value={number.short(data?.metrics?.day ?? 0)} />
+ {typeof data?.trend?.percentage === 'number' && (
+ <Metric
+ label="3M DIFF"
+ value={
+ <span
+ className={cn(
+ 'font-semibold',
+ 'row gap-1 items-center',
+ data?.trend?.direction === 'up'
+ ? 'text-emerald-300'
+ : data?.trend?.direction === 'down'
+ ? 'text-orange-300'
+ : 'text-muted-foreground'
+ )}
+ >
+ {data.trend.direction === 'up' && (
+ <TrendingUpIcon className="size-4" />
+ )}
+ {data.trend.direction === 'down' && (
+ <TrendingDownIcon className="size-4" />
+ )}
+ {Math.abs(data.trend.percentage)}%
+ </span>
+ }
+ />
+ )}
+ {!!data?.metrics?.revenue && (
+ <Metric
+ label="Revenue"
+ value={number.currency(data?.metrics?.revenue / 100, {
+ short: true,
+ })}
+ />
+ )}
+ <Metric
+ label="3M"
+ value={number.short(data?.metrics?.months_3 ?? 0)}
+ className="ml-auto"
+ />
+ <Metric label="30D" value={number.short(data?.metrics?.month ?? 0)} />
+ <Metric label="24H" value={number.short(data?.metrics?.day ?? 0)} />
</FadeIn>
);
}
diff --git a/apps/start/src/components/projects/project-chart.tsx b/apps/start/src/components/projects/project-chart.tsx
index 2925ceb64..b2554e889 100644
--- a/apps/start/src/components/projects/project-chart.tsx
+++ b/apps/start/src/components/projects/project-chart.tsx
@@ -82,7 +82,7 @@ const { Tooltip, TooltipProvider } = createChartTooltip<
)}
</>
);
- },
+ }
);
export function ProjectChart({
@@ -95,7 +95,7 @@ export function ProjectChart({
data: { value: number; date: Date; revenue: number }[];
}) {
const [activeBar, setActiveBar] = useState(-1);
-
+
const yAxisProps = useYAxisProps({
width: 30,
});
@@ -121,25 +121,29 @@ export function ProjectChart({
if (maxValue === 0) {
return (
<div className="relative h-full w-full pl-3">
-
- <div className="pointer-events-none absolute inset-x-3 bottom-2 h-12">
- <div className="flex h-full items-end gap-1.5 opacity-35">
- {[28, 42, 35, 50, 40, 56, 45, 60, 49, 32,98,29,49,69,49,20, 28, 42, 35, 50, 40, 56, 45, 60, 49, 32,98,29,49,69,49,20].map((height, index) => (
- <div
- key={index}
- className="flex-1 rounded-full bg-foreground/20"
- style={{ height: `${height}%` }}
- />
- ))}
- </div>
- </div>
-
- <div className="absolute inset-0 flex flex-col items-center justify-center gap-1 px-4 text-center">
- <p className="text-sm font-medium text-foreground/85">No activity yet</p>
- <p className="text-xs text-muted-foreground">
- Sessions will show up here once tracking starts.
- </p>
+ <div className="pointer-events-none absolute inset-x-3 bottom-2 h-12">
+ <div className="flex h-full items-end gap-1.5 opacity-35">
+ {[
+ 28, 42, 35, 50, 40, 56, 45, 60, 49, 32, 98, 29, 49, 69, 49, 20,
+ 28, 42, 35, 50, 40, 56, 45, 60, 49, 32, 98, 29, 49, 69, 49, 20,
+ ].map((height, index) => (
+ <div
+ key={index}
+ className="flex-1 rounded-full bg-foreground/20"
+ style={{ height: `${height}%` }}
+ />
+ ))}
</div>
+ </div>
+
+ <div className="absolute inset-0 flex flex-col items-center justify-center gap-1 px-4 text-center">
+ <p className="text-sm font-medium text-foreground/85">
+ No activity yet
+ </p>
+ <p className="text-xs text-muted-foreground">
+ Sessions will show up here once tracking starts.
+ </p>
+ </div>
</div>
);
}
@@ -236,7 +240,7 @@ export function ProjectChart({
className={cn(
index === activeBar
? 'fill-emerald-700/100'
- : 'fill-emerald-700/80',
+ : 'fill-emerald-700/80'
)}
/>
))}
@@ -246,4 +250,4 @@ export function ProjectChart({
</TooltipProvider>
</div>
);
-}
\ No newline at end of file
+}
diff --git a/apps/start/src/components/realtime/realtime-geo.tsx b/apps/start/src/components/realtime/realtime-geo.tsx
index e09f1c85f..f257df8e9 100644
--- a/apps/start/src/components/realtime/realtime-geo.tsx
+++ b/apps/start/src/components/realtime/realtime-geo.tsx
@@ -16,7 +16,7 @@ export function RealtimeGeo({ projectId }: RealtimeGeoProps) {
const query = useQuery(
trpc.realtime.geo.queryOptions({
projectId,
- }),
+ })
);
const data = query.data ?? [];
diff --git a/apps/start/src/components/realtime/realtime-paths.tsx b/apps/start/src/components/realtime/realtime-paths.tsx
index 60c9b3963..34632e4da 100644
--- a/apps/start/src/components/realtime/realtime-paths.tsx
+++ b/apps/start/src/components/realtime/realtime-paths.tsx
@@ -16,7 +16,7 @@ export function RealtimePaths({ projectId }: RealtimePathsProps) {
const query = useQuery(
trpc.realtime.paths.queryOptions({
projectId,
- }),
+ })
);
const data = query.data ?? [];
diff --git a/apps/start/src/components/realtime/realtime-referrals.tsx b/apps/start/src/components/realtime/realtime-referrals.tsx
index b3881f1b8..a19790772 100644
--- a/apps/start/src/components/realtime/realtime-referrals.tsx
+++ b/apps/start/src/components/realtime/realtime-referrals.tsx
@@ -15,7 +15,7 @@ export function RealtimeReferrals({ projectId }: RealtimeReferralsProps) {
const query = useQuery(
trpc.realtime.referrals.queryOptions({
projectId,
- }),
+ })
);
const data = query.data ?? [];
diff --git a/apps/start/src/components/realtime/realtime-reloader.tsx b/apps/start/src/components/realtime/realtime-reloader.tsx
index 564850d36..a6f21f50e 100644
--- a/apps/start/src/components/realtime/realtime-reloader.tsx
+++ b/apps/start/src/components/realtime/realtime-reloader.tsx
@@ -17,7 +17,7 @@ const RealtimeReloader = ({ projectId }: Props) => {
// pathFilter() covers all realtime.* queries for this project
client.refetchQueries(trpc.realtime.pathFilter());
client.refetchQueries(
- trpc.overview.liveData.queryFilter({ projectId }),
+ trpc.overview.liveData.queryFilter({ projectId })
);
}
},
@@ -26,7 +26,7 @@ const RealtimeReloader = ({ projectId }: Props) => {
delay: 1000,
maxWait: 60000,
},
- },
+ }
);
return null;
diff --git a/apps/start/src/components/report-chart/area/chart.tsx b/apps/start/src/components/report-chart/area/chart.tsx
index 70adba4be..880597d13 100644
--- a/apps/start/src/components/report-chart/area/chart.tsx
+++ b/apps/start/src/components/report-chart/area/chart.tsx
@@ -67,7 +67,7 @@ export function Chart({ data }: Props) {
startDate,
endDate,
range,
- }),
+ })
);
const { series, setVisibleSeries } = useVisibleSeries(data, {
savedVisibleSeries,
@@ -195,7 +195,7 @@ export function Chart({ data }: Props) {
endDate,
range,
previous,
- ],
+ ]
);
const { getStrokeDasharray, calcStrokeDasharray, handleAnimationEnd } =
diff --git a/apps/start/src/components/report-chart/area/index.tsx b/apps/start/src/components/report-chart/area/index.tsx
index ca97c2d8a..65c9e4e48 100644
--- a/apps/start/src/components/report-chart/area/index.tsx
+++ b/apps/start/src/components/report-chart/area/index.tsx
@@ -22,8 +22,8 @@ export function ReportAreaChart() {
{
placeholderData: keepPreviousData,
enabled: !isLazyLoading,
- },
- ),
+ }
+ )
);
if (
diff --git a/apps/start/src/components/report-chart/bar/index.tsx b/apps/start/src/components/report-chart/bar/index.tsx
index b5778de42..f23a64f47 100644
--- a/apps/start/src/components/report-chart/bar/index.tsx
+++ b/apps/start/src/components/report-chart/bar/index.tsx
@@ -22,8 +22,8 @@ export function ReportBarChart() {
{
placeholderData: keepPreviousData,
enabled: !isLazyLoading,
- },
- ),
+ }
+ )
);
if (
diff --git a/apps/start/src/components/report-chart/common/chart-click-menu.tsx b/apps/start/src/components/report-chart/common/chart-click-menu.tsx
index 197b0ab35..12d3009a5 100644
--- a/apps/start/src/components/report-chart/common/chart-click-menu.tsx
+++ b/apps/start/src/components/report-chart/common/chart-click-menu.tsx
@@ -114,7 +114,7 @@ export const ChartClickMenu = forwardRef<
onClose();
}
},
- [onClose],
+ [onClose]
);
const handleOpenChange = useCallback(
@@ -128,7 +128,7 @@ export const ChartClickMenu = forwardRef<
}
}
},
- [onClose],
+ [onClose]
);
// Expose methods via ref (for advanced use cases)
@@ -140,7 +140,7 @@ export const ChartClickMenu = forwardRef<
},
getContainerElement: () => containerRef.current,
}),
- [],
+ []
);
// Clone children and add onClick handler to chart components
diff --git a/apps/start/src/components/report-chart/common/empty.tsx b/apps/start/src/components/report-chart/common/empty.tsx
index 9f4ecab7d..c41d4ff18 100644
--- a/apps/start/src/components/report-chart/common/empty.tsx
+++ b/apps/start/src/components/report-chart/common/empty.tsx
@@ -48,7 +48,7 @@ export function ReportChartEmpty({
<div
className={cn(
'center-center h-full w-full flex-col',
- isEditMode && 'card p-4',
+ isEditMode && 'card p-4'
)}
>
<BirdIcon
diff --git a/apps/start/src/components/report-chart/common/error.tsx b/apps/start/src/components/report-chart/common/error.tsx
index 158421710..c18430277 100644
--- a/apps/start/src/components/report-chart/common/error.tsx
+++ b/apps/start/src/components/report-chart/common/error.tsx
@@ -8,7 +8,7 @@ export function ReportChartError() {
<div
className={cn(
'center-center h-full w-full flex-col',
- isEditMode && 'card p-4',
+ isEditMode && 'card p-4'
)}
>
<ServerCrashIcon
diff --git a/apps/start/src/components/report-chart/common/linear-gradient.tsx b/apps/start/src/components/report-chart/common/linear-gradient.tsx
index 376cf2b36..edeb9a6b2 100644
--- a/apps/start/src/components/report-chart/common/linear-gradient.tsx
+++ b/apps/start/src/components/report-chart/common/linear-gradient.tsx
@@ -28,7 +28,7 @@ export const SolidToDashedGradient: React.FC<GradientProps> = ({
// Helper function moved to the same file
const generateSolidToDashedLinearGradient = (
percentage: number,
- baseColor: string,
+ baseColor: string
) => {
// Start with solid baseColor up to percentage
const stops = [
@@ -61,7 +61,7 @@ const generateSolidToDashedLinearGradient = (
offset: `${startOffset + 2 * dashWidth}%`,
color: 'transparent',
opacity: 0,
- },
+ }
);
}
diff --git a/apps/start/src/components/report-chart/common/loading.tsx b/apps/start/src/components/report-chart/common/loading.tsx
index 5f5bceae0..b3539d23b 100644
--- a/apps/start/src/components/report-chart/common/loading.tsx
+++ b/apps/start/src/components/report-chart/common/loading.tsx
@@ -77,7 +77,7 @@ export function ReportChartLoading({ things }: { things?: boolean }) {
<div
className={cn(
'absolute top-3/4 opacity-0 transition-opacity text-muted-foreground',
- isSlow && 'opacity-100',
+ isSlow && 'opacity-100'
)}
>
Stay calm, its coming 🙄
diff --git a/apps/start/src/components/report-chart/common/previous-diff-indicator.tsx b/apps/start/src/components/report-chart/common/previous-diff-indicator.tsx
index 18a71d1da..9b9857627 100644
--- a/apps/start/src/components/report-chart/common/previous-diff-indicator.tsx
+++ b/apps/start/src/components/report-chart/common/previous-diff-indicator.tsx
@@ -10,7 +10,7 @@ export function getDiffIndicator<A, B, C>(
state: string | undefined | null,
positive: A,
negative: B,
- neutral: C,
+ neutral: C
): A | B | C {
if (state === 'neutral' || !state) {
return neutral;
@@ -49,7 +49,7 @@ export function PreviousDiffIndicator({
state,
'bg-emerald-300',
'bg-rose-300',
- undefined,
+ undefined
);
const number = useNumber();
@@ -73,7 +73,7 @@ export function PreviousDiffIndicator({
className={cn(
'flex items-center gap-1 font-mono font-medium',
size === 'lg' && 'gap-2',
- className,
+ className
)}
>
<div
@@ -81,7 +81,7 @@ export function PreviousDiffIndicator({
'flex size-4 items-center justify-center rounded-full',
variant,
size === 'lg' && 'size-8',
- size === 'md' && 'size-6',
+ size === 'md' && 'size-6'
)}
>
{renderIcon()}
@@ -115,7 +115,7 @@ export function PreviousDiffIndicatorPure({
state,
'bg-emerald-300',
'bg-rose-300',
- undefined,
+ undefined
);
if (diff === null || diff === undefined || !showPrevious) {
diff --git a/apps/start/src/components/report-chart/common/report-table-utils.ts b/apps/start/src/components/report-chart/common/report-table-utils.ts
index 83187dff1..8c50d2182 100644
--- a/apps/start/src/components/report-chart/common/report-table-utils.ts
+++ b/apps/start/src/components/report-chart/common/report-table-utils.ts
@@ -51,7 +51,7 @@ export type GroupedItem<T> = {
* This creates a tree structure that makes it easier to toggle specific groups
*/
export function groupByNames<T extends { names: string[] }>(
- items: T[],
+ items: T[]
): Array<GroupedItem<T>> {
const rootGroups = new Map<string, GroupedItem<T>>();
@@ -90,7 +90,7 @@ export function groupByNames<T extends { names: string[] }>(
'group' in child &&
child.group === levelName &&
'level' in child &&
- child.level === level,
+ child.level === level
);
if (existingGroup) {
@@ -123,7 +123,7 @@ export function groupByNames<T extends { names: string[] }>(
* Useful for getting all items in a group or its children
*/
export function flattenGroupedItems<T>(
- groupedItems: Array<GroupedItem<T> | T>,
+ groupedItems: Array<GroupedItem<T> | T>
): T[] {
const result: T[] = [];
@@ -145,7 +145,7 @@ export function flattenGroupedItems<T>(
*/
export function findGroup<T>(
groups: Array<GroupedItem<T>>,
- groupKey: string,
+ groupKey: string
): GroupedItem<T> | null {
for (const group of groups) {
if (group.groupKey === groupKey) {
@@ -177,13 +177,13 @@ export function findGroup<T>(
*/
export function groupsToExpandableRows(
groups: Array<GroupedItem<TableRow>>,
- breakdownCount: number,
+ breakdownCount: number
): ExpandableTableRow[] {
const result: ExpandableTableRow[] = [];
function processGroup(
group: GroupedItem<TableRow>,
- parentPath: string[] = [],
+ parentPath: string[] = []
): ExpandableTableRow[] {
const currentPath = [...parentPath, group.group];
const subRows: ExpandableTableRow[] = [];
@@ -253,7 +253,7 @@ export function groupsToExpandableRows(
const summaryRow = createSummaryRow(
groupItems,
group.groupKey,
- breakdownCount,
+ breakdownCount
);
return [
@@ -285,14 +285,14 @@ export function groupsToExpandableRows(
export function groupsToTableRows<T extends TableRow>(
groups: Array<GroupedItem<T>>,
collapsedGroups: Set<string>,
- breakdownCount: number,
+ breakdownCount: number
): GroupedTableRow[] {
const rows: GroupedTableRow[] = [];
function processGroup(
group: GroupedItem<T>,
parentPath: string[] = [],
- parentGroupKey?: string,
+ parentGroupKey?: string
): void {
const isGroupCollapsed = collapsedGroups.has(group.groupKey);
const currentPath = [...parentPath, group.group];
@@ -304,7 +304,7 @@ export function groupsToTableRows<T extends TableRow>(
const summaryRow = createSummaryRow(
groupItems,
group.groupKey,
- breakdownCount,
+ breakdownCount
);
rows.push(summaryRow);
}
@@ -392,7 +392,7 @@ function getUniqueDates(series: IChartData['series']): string[] {
*/
function getBreakdownPropertyNames(
series: IChartData['series'],
- breakdowns: Array<{ name: string }>,
+ breakdowns: Array<{ name: string }>
): string[] {
// If we have breakdowns from state, use those
if (breakdowns.length > 0) {
@@ -412,7 +412,7 @@ function getBreakdownPropertyNames(
*/
export function createFlatRows(
series: IChartData['series'],
- dates: string[],
+ dates: string[]
): TableRow[] {
return series.map((serie) => {
const dateValues: Record<string, number> = {};
@@ -443,7 +443,7 @@ export function createFlatRows(
*/
export function createGroupedRowsHierarchical(
series: IChartData['series'],
- dates: string[],
+ dates: string[]
): Array<GroupedItem<TableRow>> {
const flatRows = createFlatRows(series, dates);
@@ -475,7 +475,7 @@ export function createGroupedRowsHierarchical(
*/
export function createGroupedRows(
series: IChartData['series'],
- dates: string[],
+ dates: string[]
): GroupedTableRow[] {
const flatRows = createFlatRows(series, dates);
@@ -514,7 +514,7 @@ export function createGroupedRows(
const aMax = Math.max(...a[1].map((r) => r.sum));
const bMax = Math.max(...b[1].map((r) => r.sum));
return bMax - aMax;
- },
+ }
);
// Process each group hierarchically
@@ -558,7 +558,7 @@ export function createGroupedRows(
export function createSummaryRow(
groupRows: TableRow[],
groupKey: string,
- breakdownCount: number,
+ breakdownCount: number
): GroupedTableRow {
const firstRow = groupRows[0]!;
@@ -606,7 +606,7 @@ export function createSummaryRow(
*/
function reorderBreakdownsByUniqueCount(
series: IChartData['series'],
- breakdownPropertyNames: string[],
+ breakdownPropertyNames: string[]
): {
reorderedNames: string[];
reorderMap: number[]; // Maps new index -> old index
@@ -637,7 +637,7 @@ function reorderBreakdownsByUniqueCount(
// Create reordered names and mapping
const reorderedNames = uniqueCounts.map(
- (item) => breakdownPropertyNames[item.index]!,
+ (item) => breakdownPropertyNames[item.index]!
);
const reorderMap = uniqueCounts.map((item) => item.index); // new index -> old index
const reverseMap = new Array(breakdownPropertyNames.length);
@@ -654,7 +654,7 @@ function reorderBreakdownsByUniqueCount(
export function transformToTableData(
data: IChartData,
breakdowns: Array<{ name: string }>,
- grouped: boolean,
+ grouped: boolean
): {
rows: TableRow[] | GroupedTableRow[];
dates: string[];
@@ -663,7 +663,7 @@ export function transformToTableData(
const dates = getUniqueDates(data.series);
const originalBreakdownPropertyNames = getBreakdownPropertyNames(
data.series,
- breakdowns,
+ breakdowns
);
// Reorder breakdowns by unique count (fewest first)
@@ -704,7 +704,7 @@ export function transformToTableData(
*/
export function transformToHierarchicalGroups(
data: IChartData,
- breakdowns: Array<{ name: string }>,
+ breakdowns: Array<{ name: string }>
): {
groups: Array<GroupedItem<TableRow>>;
dates: string[];
@@ -713,7 +713,7 @@ export function transformToHierarchicalGroups(
const dates = getUniqueDates(data.series);
const originalBreakdownPropertyNames = getBreakdownPropertyNames(
data.series,
- breakdowns,
+ breakdowns
);
// Reorder breakdowns by unique count (fewest first)
diff --git a/apps/start/src/components/report-chart/common/report-table.tsx b/apps/start/src/components/report-chart/common/report-table.tsx
index aa9e371f4..6d8c35c74 100644
--- a/apps/start/src/components/report-chart/common/report-table.tsx
+++ b/apps/start/src/components/report-chart/common/report-table.tsx
@@ -91,7 +91,7 @@ const VirtualRow = function VirtualRow({
const renderCell = (
column: Header<TableRow | GroupedTableRow, unknown>['column'],
- header: Header<TableRow | GroupedTableRow, unknown> | undefined,
+ header: Header<TableRow | GroupedTableRow, unknown> | undefined
) => {
const cell = cells.find((c) => c.column.id === column.id);
if (!cell || !header) return null;
@@ -143,7 +143,7 @@ const VirtualRow = function VirtualRow({
}}
className={cn(
'absolute right-0 top-0 h-full w-1 cursor-col-resize touch-none select-none bg-transparent hover:bg-primary/50 transition-colors',
- isResizing && 'bg-primary',
+ isResizing && 'bg-primary'
)}
/>
)}
@@ -269,7 +269,7 @@ export function ReportTable({
return groupsToExpandableRows(
hierarchicalGroups,
- breakdownPropertyNames.length,
+ breakdownPropertyNames.length
);
}, [grouped, hierarchicalGroups, breakdownPropertyNames.length]);
@@ -290,7 +290,7 @@ export function ReportTable({
// Search in breakdown values
if (
row.breakdownValues.some((val) =>
- val?.toLowerCase().includes(searchLower),
+ val?.toLowerCase().includes(searchLower)
)
) {
return true;
@@ -300,7 +300,7 @@ export function ReportTable({
const metrics = ['count', 'sum', 'average', 'min', 'max'] as const;
if (
metrics.some((metric) =>
- String(row[metric]).toLowerCase().includes(searchLower),
+ String(row[metric]).toLowerCase().includes(searchLower)
)
) {
return true;
@@ -309,7 +309,7 @@ export function ReportTable({
// Search in date values
if (
Object.values(row.dateValues).some((val) =>
- String(val).toLowerCase().includes(searchLower),
+ String(val).toLowerCase().includes(searchLower)
)
) {
return true;
@@ -326,7 +326,7 @@ export function ReportTable({
// Sort function based on current sort state
const sortFn = (
a: ExpandableTableRow | GroupedTableRow | TableRow,
- b: ExpandableTableRow | GroupedTableRow | TableRow,
+ b: ExpandableTableRow | GroupedTableRow | TableRow
) => {
// If no sorting is selected, return 0 (no change)
if (sorting.length === 0) return 0;
@@ -383,7 +383,7 @@ export function ReportTable({
// For expandable rows, we need to sort recursively
function sortExpandableRows(
rows: ExpandableTableRow[],
- isTopLevel = true,
+ isTopLevel = true
): ExpandableTableRow[] {
// Sort rows: groups by count first (only at top level), then apply user sort
const sorted = [...rows].sort((a, b) => {
@@ -501,7 +501,7 @@ export function ReportTable({
// Helper function to flatten expandable rows and get only individual rows
function getIndividualRows(
- rows: (ExpandableTableRow | TableRow)[],
+ rows: (ExpandableTableRow | TableRow)[]
): TableRow[] {
const individualRows: TableRow[] = [];
for (const row of rows) {
@@ -530,7 +530,7 @@ export function ReportTable({
// For single series, calculate ranges from date values
const singleRow = individualRows[0]!;
const allDateValues = dates.map(
- (date) => singleRow.dateValues[date] ?? 0,
+ (date) => singleRow.dateValues[date] ?? 0
);
const dateMin = Math.min(...allDateValues);
const dateMax = Math.max(...allDateValues);
@@ -592,7 +592,7 @@ export function ReportTable({
value: number,
min: number,
max: number,
- colorClass: 'purple' | 'emerald' = 'emerald',
+ colorClass: 'purple' | 'emerald' = 'emerald'
): { style: React.CSSProperties; opacity: number } => {
if (value === 0) {
return { style: {}, opacity: 0 };
@@ -694,7 +694,7 @@ export function ReportTable({
(r): r is GroupedTableRow =>
'groupKey' in r &&
r.groupKey === original.groupKey &&
- !r.isSummaryRow,
+ !r.isSummaryRow
);
if (groupRows.length > 0) {
@@ -737,7 +737,7 @@ export function ReportTable({
className={cn(
'truncate',
!isExpandable && grouped && 'text-muted-foreground/40',
- isExpandable && 'font-semibold',
+ isExpandable && 'font-semibold'
)}
/>
{isExpandable && (
@@ -798,7 +798,7 @@ export function ReportTable({
function collectRowIdsAtLevel(
rows: ExpandableTableRow[],
targetLevel: number,
- currentLevel = 0,
+ currentLevel = 0
): void {
for (const row of rows) {
if (
@@ -813,7 +813,7 @@ export function ReportTable({
collectRowIdsAtLevel(
row.subRows,
targetLevel,
- currentLevel + 1,
+ currentLevel + 1
);
}
}
@@ -825,7 +825,7 @@ export function ReportTable({
const allExpanded =
rowsAtLevel.length > 0 &&
rowsAtLevel.every(
- (id) => typeof expanded === 'object' && expanded[id] === true,
+ (id) => typeof expanded === 'object' && expanded[id] === true
);
return (
@@ -896,7 +896,7 @@ export function ReportTable({
className={cn(
'truncate block leading-[48px]',
isMuted && 'text-muted-foreground/50',
- isGroupHeader && 'font-semibold',
+ isGroupHeader && 'font-semibold'
)}
>
{value || '(Not set)'}
@@ -971,7 +971,7 @@ export function ReportTable({
className={cn(
'h-12 w-full text-right font-mono text-sm px-4 flex items-center justify-end',
'[text-shadow:_0_0_3px_rgb(0_0_0_/_20%)] shadow-[inset_-1px_-1px_0_var(--border)]',
- (isSummary || isGroupHeader) && 'font-semibold',
+ (isSummary || isGroupHeader) && 'font-semibold'
)}
style={backgroundStyle}
>
@@ -1016,7 +1016,7 @@ export function ReportTable({
className={cn(
'h-12 w-full text-right font-mono text-sm px-4 flex items-center justify-end',
'[text-shadow:_0_0_3px_rgb(0_0_0_/_20%)] shadow-[inset_-1px_-1px_0_var(--border)]',
- (isSummary || isGroupHeader) && 'font-semibold',
+ (isSummary || isGroupHeader) && 'font-semibold'
)}
style={backgroundStyle}
>
@@ -1102,7 +1102,7 @@ export function ReportTable({
setSorting,
setColumnSizing,
setExpanded,
- ],
+ ]
);
const table = useReactTable(tableOptions);
@@ -1112,7 +1112,7 @@ export function ReportTable({
const updateScrollMargin = throttle(() => {
if (parentRef.current) {
setScrollMargin(
- parentRef.current.getBoundingClientRect().top + window.scrollY,
+ parentRef.current.getBoundingClientRect().top + window.scrollY
);
}
}, 500);
@@ -1168,27 +1168,27 @@ export function ReportTable({
// Separate columns into pinned and scrollable
const leftPinnedColumns = headerColumns.filter(
- (col) => col.columnDef.meta?.pinned === 'left',
+ (col) => col.columnDef.meta?.pinned === 'left'
);
const rightPinnedColumns = headerColumns.filter(
- (col) => col.columnDef.meta?.pinned === 'right',
+ (col) => col.columnDef.meta?.pinned === 'right'
);
const scrollableColumns = headerColumns.filter(
- (col) => !col.columnDef.meta?.pinned,
+ (col) => !col.columnDef.meta?.pinned
);
// Calculate widths for virtualization
const leftPinnedWidth = useMemo(
() => leftPinnedColumns.reduce((sum, col) => sum + col.getSize(), 0),
- [leftPinnedColumns, columnSizing],
+ [leftPinnedColumns, columnSizing]
);
const rightPinnedWidth = useMemo(
() => rightPinnedColumns.reduce((sum, col) => sum + col.getSize(), 0),
- [rightPinnedColumns, columnSizing],
+ [rightPinnedColumns, columnSizing]
);
const scrollableColumnsTotalWidth = useMemo(
() => scrollableColumns.reduce((sum, col) => sum + col.getSize(), 0),
- [scrollableColumns, columnSizing],
+ [scrollableColumns, columnSizing]
);
// Horizontal virtualization for scrollable columns
@@ -1277,7 +1277,7 @@ export function ReportTable({
// Helper to get pinning styles (for backward compatibility with header)
const getPinningStyles = (
- column: ReturnType<typeof table.getColumn> | undefined,
+ column: ReturnType<typeof table.getColumn> | undefined
) => {
if (!column) return {};
return pinningStylesMap.get(column.id) ?? {};
@@ -1355,7 +1355,7 @@ export function ReportTable({
className={cn(
'h-10 px-4 flex items-center text-[10px] uppercase font-semibold bg-muted/30 border-r border-border whitespace-nowrap relative',
isMetricOrDate && 'text-right',
- canSort && 'cursor-pointer hover:bg-muted/50 select-none',
+ canSort && 'cursor-pointer hover:bg-muted/50 select-none'
)}
onClick={
canSort
@@ -1365,7 +1365,7 @@ export function ReportTable({
isResizingRef.current ||
column.getIsResizing() ||
(e.target as HTMLElement).closest(
- '[data-resize-handle]',
+ '[data-resize-handle]'
)
) {
return;
@@ -1433,7 +1433,7 @@ export function ReportTable({
}}
className={cn(
'absolute right-0 top-0 h-full w-1 cursor-col-resize touch-none select-none bg-transparent hover:bg-primary/50 transition-colors',
- header.column.getIsResizing() && 'bg-primary',
+ header.column.getIsResizing() && 'bg-primary'
)}
/>
)}
@@ -1476,7 +1476,7 @@ export function ReportTable({
className={cn(
'px-4 flex items-center text-[10px] uppercase font-semibold bg-muted/30 border-r border-border whitespace-nowrap',
isMetricOrDate && 'text-right',
- canSort && 'cursor-pointer hover:bg-muted/50 select-none',
+ canSort && 'cursor-pointer hover:bg-muted/50 select-none'
)}
onClick={
canSort
@@ -1485,7 +1485,7 @@ export function ReportTable({
isResizingRef.current ||
header.column.getIsResizing() ||
(e.target as HTMLElement).closest(
- '[data-resize-handle]',
+ '[data-resize-handle]'
)
) {
return;
@@ -1556,7 +1556,7 @@ export function ReportTable({
className={cn(
'h-10 px-4 flex items-center text-[10px] uppercase font-semibold bg-muted/30 border-r border-border whitespace-nowrap relative',
isMetricOrDate && 'text-right',
- canSort && 'cursor-pointer hover:bg-muted/50 select-none',
+ canSort && 'cursor-pointer hover:bg-muted/50 select-none'
)}
onClick={
canSort
@@ -1565,7 +1565,7 @@ export function ReportTable({
isResizingRef.current ||
header.column.getIsResizing() ||
(e.target as HTMLElement).closest(
- '[data-resize-handle]',
+ '[data-resize-handle]'
)
) {
return;
diff --git a/apps/start/src/components/report-chart/conversion/index.tsx b/apps/start/src/components/report-chart/conversion/index.tsx
index 9d82da56e..462cc5323 100644
--- a/apps/start/src/components/report-chart/conversion/index.tsx
+++ b/apps/start/src/components/report-chart/conversion/index.tsx
@@ -23,8 +23,8 @@ export function ReportConversionChart() {
{
placeholderData: keepPreviousData,
enabled: !isLazyLoading,
- },
- ),
+ }
+ )
);
if (
diff --git a/apps/start/src/components/report-chart/funnel/index.tsx b/apps/start/src/components/report-chart/funnel/index.tsx
index 0a098ff5d..0081e05a3 100644
--- a/apps/start/src/components/report-chart/funnel/index.tsx
+++ b/apps/start/src/components/report-chart/funnel/index.tsx
@@ -27,8 +27,8 @@ export function ReportFunnelChart() {
},
{
enabled: !isLazyLoading && chartInput.series.length > 0,
- },
- ),
+ }
+ )
);
// Hook for limiting which breakdowns are shown in the chart only
diff --git a/apps/start/src/components/report-chart/histogram/chart.tsx b/apps/start/src/components/report-chart/histogram/chart.tsx
index 2acaed660..12e96e207 100644
--- a/apps/start/src/components/report-chart/histogram/chart.tsx
+++ b/apps/start/src/components/report-chart/histogram/chart.tsx
@@ -80,7 +80,7 @@ export function Chart({ data }: Props) {
startDate,
endDate,
range,
- }),
+ })
);
const { series, setVisibleSeries } = useVisibleSeries(data, {
savedVisibleSeries,
@@ -155,7 +155,7 @@ export function Chart({ data }: Props) {
endDate,
range,
previous,
- ],
+ ]
);
return (
diff --git a/apps/start/src/components/report-chart/histogram/index.tsx b/apps/start/src/components/report-chart/histogram/index.tsx
index 67862bd73..1c039446e 100644
--- a/apps/start/src/components/report-chart/histogram/index.tsx
+++ b/apps/start/src/components/report-chart/histogram/index.tsx
@@ -22,8 +22,8 @@ export function ReportHistogramChart() {
{
placeholderData: keepPreviousData,
enabled: !isLazyLoading,
- },
- ),
+ }
+ )
);
if (
diff --git a/apps/start/src/components/report-chart/index.tsx b/apps/start/src/components/report-chart/index.tsx
index 95567b51f..2a8fea226 100644
--- a/apps/start/src/components/report-chart/index.tsx
+++ b/apps/start/src/components/report-chart/index.tsx
@@ -25,7 +25,7 @@ export const ReportChart = ({ lazy = true, ...props }: ReportChartProps) => {
undefined,
{
disconnectOnLeave: true,
- },
+ }
);
useEffect(() => {
diff --git a/apps/start/src/components/report-chart/line/chart.tsx b/apps/start/src/components/report-chart/line/chart.tsx
index c78097ae6..fd1da95a9 100644
--- a/apps/start/src/components/report-chart/line/chart.tsx
+++ b/apps/start/src/components/report-chart/line/chart.tsx
@@ -67,7 +67,7 @@ export function Chart({ data }: Props) {
startDate,
endDate,
range,
- }),
+ })
);
const { series, setVisibleSeries } = useVisibleSeries(data, {
savedVisibleSeries,
@@ -154,7 +154,7 @@ export function Chart({ data }: Props) {
p.dataKey &&
p.dataKey !== 'calcStrokeDasharray' &&
typeof p.dataKey === 'string' &&
- p.dataKey.includes(':count'),
+ p.dataKey.includes(':count')
);
const serieId = validPayload?.dataKey?.toString().replace(':count', '');
@@ -208,7 +208,7 @@ export function Chart({ data }: Props) {
endDate,
range,
previous,
- ],
+ ]
);
return (
diff --git a/apps/start/src/components/report-chart/line/index.tsx b/apps/start/src/components/report-chart/line/index.tsx
index ddb3bd053..ee1d15091 100644
--- a/apps/start/src/components/report-chart/line/index.tsx
+++ b/apps/start/src/components/report-chart/line/index.tsx
@@ -21,8 +21,8 @@ export function ReportLineChart() {
{
placeholderData: keepPreviousData,
enabled: !isLazyLoading,
- },
- ),
+ }
+ )
);
if (
diff --git a/apps/start/src/components/report-chart/map/chart.tsx b/apps/start/src/components/report-chart/map/chart.tsx
index f3f8d3aec..d3f502727 100644
--- a/apps/start/src/components/report-chart/map/chart.tsx
+++ b/apps/start/src/components/report-chart/map/chart.tsx
@@ -23,7 +23,7 @@ export function Chart({ data }: Props) {
country: s.names[1]?.toLowerCase() ?? '',
value: s.metrics[metric] ?? 0,
})),
- [series, metric],
+ [series, metric]
);
return (
diff --git a/apps/start/src/components/report-chart/map/index.tsx b/apps/start/src/components/report-chart/map/index.tsx
index a3ffa45d9..ae6c6eb86 100644
--- a/apps/start/src/components/report-chart/map/index.tsx
+++ b/apps/start/src/components/report-chart/map/index.tsx
@@ -22,8 +22,8 @@ export function ReportMapChart() {
{
placeholderData: keepPreviousData,
enabled: !isLazyLoading,
- },
- ),
+ }
+ )
);
if (
diff --git a/apps/start/src/components/report-chart/metric/chart.tsx b/apps/start/src/components/report-chart/metric/chart.tsx
index c37dca3eb..2aa07cbf2 100644
--- a/apps/start/src/components/report-chart/metric/chart.tsx
+++ b/apps/start/src/components/report-chart/metric/chart.tsx
@@ -19,7 +19,7 @@ export function Chart({ data }: Props) {
<div
className={cn(
'grid grid-cols-1 gap-4',
- isEditMode && 'md:grid-cols-2 lg:grid-cols-3',
+ isEditMode && 'md:grid-cols-2 lg:grid-cols-3'
)}
>
{series.map((serie) => {
diff --git a/apps/start/src/components/report-chart/metric/index.tsx b/apps/start/src/components/report-chart/metric/index.tsx
index 94f086702..2329f0c3f 100644
--- a/apps/start/src/components/report-chart/metric/index.tsx
+++ b/apps/start/src/components/report-chart/metric/index.tsx
@@ -21,8 +21,8 @@ export function ReportMetricChart() {
{
placeholderData: keepPreviousData,
enabled: !isLazyLoading,
- },
- ),
+ }
+ )
);
if (
diff --git a/apps/start/src/components/report-chart/pie/index.tsx b/apps/start/src/components/report-chart/pie/index.tsx
index feae7e443..2fc609e68 100644
--- a/apps/start/src/components/report-chart/pie/index.tsx
+++ b/apps/start/src/components/report-chart/pie/index.tsx
@@ -22,8 +22,8 @@ export function ReportPieChart() {
{
placeholderData: keepPreviousData,
enabled: !isLazyLoading,
- },
- ),
+ }
+ )
);
if (
diff --git a/apps/start/src/components/report-chart/retention/index.tsx b/apps/start/src/components/report-chart/retention/index.tsx
index 875324f64..e41215137 100644
--- a/apps/start/src/components/report-chart/retention/index.tsx
+++ b/apps/start/src/components/report-chart/retention/index.tsx
@@ -20,13 +20,14 @@ export function ReportRetentionChart() {
const filters = [
...(report.globalFilters ?? []),
...eventSeries.flatMap((item) =>
- (item.filters ?? []).filter((filter) => filter.name !== 'name'),
+ (item.filters ?? []).filter((filter) => filter.name !== 'name')
),
];
const isEnabled =
firstEvent.length > 0 && secondEvent.length > 0 && !isLazyLoading;
- const retentionOptions = report.options?.type === 'retention' ? report.options : undefined;
+ const retentionOptions =
+ report.options?.type === 'retention' ? report.options : undefined;
const criteria = retentionOptions?.criteria ?? 'on_or_after';
const trpc = useTRPC();
@@ -48,8 +49,8 @@ export function ReportRetentionChart() {
{
placeholderData: keepPreviousData,
enabled: isEnabled,
- },
- ),
+ }
+ )
);
if (!isEnabled) {
diff --git a/apps/start/src/components/report-chart/sankey/chart.tsx b/apps/start/src/components/report-chart/sankey/chart.tsx
index 73605914f..74a19c3f8 100644
--- a/apps/start/src/components/report-chart/sankey/chart.tsx
+++ b/apps/start/src/components/report-chart/sankey/chart.tsx
@@ -86,11 +86,11 @@ function SankeyPortalTooltip({
left = Math.min(
Math.max(padding, left),
- Math.max(padding, vw - rect.width - padding),
+ Math.max(padding, vw - rect.width - padding)
);
top = Math.min(
Math.max(padding, top),
- Math.max(padding, vh - rect.height - padding),
+ Math.max(padding, vh - rect.height - padding)
);
setPos({ left, top, ready: true });
@@ -116,7 +116,7 @@ function SankeyPortalTooltip({
>
{children}
</div>,
- document.body,
+ document.body
)}
</>
);
diff --git a/apps/start/src/components/report/ReportSaveButton.tsx b/apps/start/src/components/report/ReportSaveButton.tsx
index 66a4865fc..313881934 100644
--- a/apps/start/src/components/report/ReportSaveButton.tsx
+++ b/apps/start/src/components/report/ReportSaveButton.tsx
@@ -38,11 +38,11 @@ export function ReportSaveButton({ className }: ReportSaveButtonProps) {
trpc.report.list.queryFilter({
dashboardId: res.dashboardId,
projectId: res.projectId,
- }),
+ })
);
},
onError: handleError,
- }),
+ })
);
const report = useSelector((state) => state.report);
const isLoading = update.isPending || fetching.some((f) => f !== 0);
diff --git a/apps/start/src/components/sessions/replay/browser-chrome.tsx b/apps/start/src/components/sessions/replay/browser-chrome.tsx
index dfb7d38c8..88773120f 100644
--- a/apps/start/src/components/sessions/replay/browser-chrome.tsx
+++ b/apps/start/src/components/sessions/replay/browser-chrome.tsx
@@ -24,7 +24,7 @@ export function BrowserChrome({
<div
className={cn(
'flex flex-col overflow-hidden rounded-lg border border-border bg-background',
- className,
+ className
)}
>
<div className="flex items-center gap-2 px-4 py-2 border-b border-border bg-background h-10">
diff --git a/apps/start/src/components/sessions/replay/replay-context.tsx b/apps/start/src/components/sessions/replay/replay-context.tsx
index d60b57769..7c5e95847 100644
--- a/apps/start/src/components/sessions/replay/replay-context.tsx
+++ b/apps/start/src/components/sessions/replay/replay-context.tsx
@@ -17,7 +17,10 @@ export interface ReplayPlayerInstance {
getMetaData: () => { startTime: number; endTime: number; totalTime: number };
getReplayer: () => { getCurrentTime: () => number };
addEvent: (event: { type: number; data: unknown; timestamp: number }) => void;
- addEventListener: (event: string, handler: (e: { payload: unknown }) => void) => void;
+ addEventListener: (
+ event: string,
+ handler: (e: { payload: unknown }) => void
+ ) => void;
$set?: (props: Record<string, unknown>) => void;
$destroy?: () => void;
}
@@ -44,7 +47,10 @@ interface ReplayContextValue {
addEvent: (event: { type: number; data: unknown; timestamp: number }) => void;
refreshDuration: () => void;
// Called by ReplayPlayer to register/unregister the rrweb instance
- onPlayerReady: (player: ReplayPlayerInstance, playerStartTime: number) => void;
+ onPlayerReady: (
+ player: ReplayPlayerInstance,
+ playerStartTime: number
+ ) => void;
onPlayerDestroy: () => void;
// State setters exposed so ReplayPlayer can wire rrweb event listeners
setCurrentTime: (t: number) => void;
@@ -131,7 +137,7 @@ export function ReplayProvider({ children }: { children: ReactNode }) {
setIsPlayingWithRef(false);
setIsReady(true);
},
- [setIsPlayingWithRef],
+ [setIsPlayingWithRef]
);
const onPlayerDestroy = useCallback(() => {
@@ -168,7 +174,7 @@ export function ReplayProvider({ children }: { children: ReactNode }) {
(event: { type: number; data: unknown; timestamp: number }) => {
playerRef.current?.addEvent(event);
},
- [],
+ []
);
const refreshDuration = useCallback(() => {
diff --git a/apps/start/src/components/sessions/replay/replay-controls.tsx b/apps/start/src/components/sessions/replay/replay-controls.tsx
index c6a6e1c28..d49ad60e9 100644
--- a/apps/start/src/components/sessions/replay/replay-controls.tsx
+++ b/apps/start/src/components/sessions/replay/replay-controls.tsx
@@ -1,4 +1,7 @@
-import { useCurrentTime, useReplayContext } from '@/components/sessions/replay/replay-context';
+import {
+ useCurrentTime,
+ useReplayContext,
+} from '@/components/sessions/replay/replay-context';
import { Button } from '@/components/ui/button';
import { Pause, Play } from 'lucide-react';
import { formatDuration } from './replay-utils';
diff --git a/apps/start/src/components/sessions/replay/replay-event-feed.tsx b/apps/start/src/components/sessions/replay/replay-event-feed.tsx
index 5d938e50e..ae8cf8fc6 100644
--- a/apps/start/src/components/sessions/replay/replay-event-feed.tsx
+++ b/apps/start/src/components/sessions/replay/replay-event-feed.tsx
@@ -1,4 +1,7 @@
-import { useCurrentTime, useReplayContext } from '@/components/sessions/replay/replay-context';
+import {
+ useCurrentTime,
+ useReplayContext,
+} from '@/components/sessions/replay/replay-context';
import { ReplayEventItem } from '@/components/sessions/replay/replay-event-item';
import { ScrollArea } from '@/components/ui/scroll-area';
import type { IServiceEvent } from '@openpanel/core';
@@ -8,7 +11,13 @@ import { getEventOffsetMs } from './replay-utils';
type EventWithOffset = { event: IServiceEvent; offsetMs: number };
-export function ReplayEventFeed({ events, replayLoading }: { events: IServiceEvent[]; replayLoading: boolean }) {
+export function ReplayEventFeed({
+ events,
+ replayLoading,
+}: {
+ events: IServiceEvent[];
+ replayLoading: boolean;
+}) {
const { startTime, isReady, seek } = useReplayContext();
const currentTime = useCurrentTime(100);
const viewportRef = useRef<HTMLDivElement | null>(null);
@@ -99,7 +108,6 @@ export function ReplayEventFeed({ events, replayLoading }: { events: IServiceEve
<div className="h-3 w-10 shrink-0 animate-pulse rounded bg-muted" />
</div>
))}
-
</div>
</ScrollArea>
</BrowserChrome>
diff --git a/apps/start/src/components/sessions/replay/replay-event-item.tsx b/apps/start/src/components/sessions/replay/replay-event-item.tsx
index 712ef13ef..52e6ad8e5 100644
--- a/apps/start/src/components/sessions/replay/replay-event-item.tsx
+++ b/apps/start/src/components/sessions/replay/replay-event-item.tsx
@@ -30,7 +30,7 @@ export function ReplayEventItem({
onClick={onClick}
className={cn(
'col w-full gap-3 border-b px-3 py-2 text-left transition-colors hover:bg-accent',
- isCurrent ? 'bg-accent/10' : 'bg-card',
+ isCurrent ? 'bg-accent/10' : 'bg-card'
)}
>
<div className="row items-center gap-2">
diff --git a/apps/start/src/components/sessions/replay/replay-player.tsx b/apps/start/src/components/sessions/replay/replay-player.tsx
index d80159cfd..888f7984d 100644
--- a/apps/start/src/components/sessions/replay/replay-player.tsx
+++ b/apps/start/src/components/sessions/replay/replay-player.tsx
@@ -6,7 +6,7 @@ import 'rrweb-player/dist/style.css';
/** rrweb meta event (type 4) carries the recorded viewport size */
function getRecordedDimensions(
- events: Array<{ type: number; data: unknown }>,
+ events: Array<{ type: number; data: unknown }>
): { width: number; height: number } | null {
const meta = events.find((e) => e.type === 4);
if (
@@ -24,7 +24,7 @@ function getRecordedDimensions(
function calcDimensions(
containerWidth: number,
- aspectRatio: number,
+ aspectRatio: number
): { width: number; height: number } {
const maxHeight = window.innerHeight * 0.7;
const height = Math.min(Math.round(containerWidth / aspectRatio), maxHeight);
@@ -50,7 +50,7 @@ export function ReplayPlayer({
const recordedDimensions = useMemo(
() => getRecordedDimensions(events),
- [events],
+ [events]
);
useEffect(() => {
@@ -69,7 +69,7 @@ export function ReplayPlayer({
const { width, height } = calcDimensions(
containerRef.current.offsetWidth,
- aspectRatio,
+ aspectRatio
);
import('rrweb-player')
@@ -141,7 +141,7 @@ export function ReplayPlayer({
if (!containerRef.current || !mounted || !playerRef.current?.$set) return;
const { width: w, height: h } = calcDimensions(
containerRef.current.offsetWidth,
- aspectRatio,
+ aspectRatio
);
playerRef.current.$set({ width: w, height: h });
};
@@ -151,7 +151,10 @@ export function ReplayPlayer({
mounted = false;
window.removeEventListener('resize', onWindowResize);
if (handleVisibilityChange) {
- document.removeEventListener('visibilitychange', handleVisibilityChange);
+ document.removeEventListener(
+ 'visibilitychange',
+ handleVisibilityChange
+ );
}
if (player) {
player.pause();
@@ -162,7 +165,15 @@ export function ReplayPlayer({
playerRef.current = null;
onPlayerDestroy();
};
- }, [events, recordedDimensions, onPlayerReady, onPlayerDestroy, setCurrentTime, setIsPlaying, setDuration]);
+ }, [
+ events,
+ recordedDimensions,
+ onPlayerReady,
+ onPlayerDestroy,
+ setCurrentTime,
+ setIsPlaying,
+ setDuration,
+ ]);
if (importError) {
return (
diff --git a/apps/start/src/components/sessions/replay/replay-timeline.tsx b/apps/start/src/components/sessions/replay/replay-timeline.tsx
index 81bc22701..55def7f82 100644
--- a/apps/start/src/components/sessions/replay/replay-timeline.tsx
+++ b/apps/start/src/components/sessions/replay/replay-timeline.tsx
@@ -1,4 +1,7 @@
-import { useCurrentTime, useReplayContext } from '@/components/sessions/replay/replay-context';
+import {
+ useCurrentTime,
+ useReplayContext,
+} from '@/components/sessions/replay/replay-context';
import {
Tooltip,
TooltipContent,
@@ -15,8 +18,14 @@ import { ReplayPlayPauseButton } from './replay-controls';
import { formatDuration, getEventOffsetMs } from './replay-utils';
export function ReplayTimeline({ events }: { events: IServiceEvent[] }) {
- const { currentTimeRef, duration, startTime, isReady, seek, subscribeToCurrentTime } =
- useReplayContext();
+ const {
+ currentTimeRef,
+ duration,
+ startTime,
+ isReady,
+ seek,
+ subscribeToCurrentTime,
+ } = useReplayContext();
// currentTime as React state is only needed for keyboard seeks (low frequency).
// The progress bar and thumb are updated directly via DOM refs to avoid re-renders.
const currentTime = useCurrentTime(250);
@@ -63,7 +72,7 @@ export function ReplayTimeline({ events }: { events: IServiceEvent[] }) {
const pct = Math.max(0, Math.min(1, x / rect.width));
return { pct, timeMs: pct * duration };
},
- [duration],
+ [duration]
);
const handleTrackMouseMove = useCallback(
@@ -75,7 +84,7 @@ export function ReplayTimeline({ events }: { events: IServiceEvent[] }) {
const info = getTimeFromClientX(e.clientX);
if (info) setHoverInfo(info);
},
- [getTimeFromClientX],
+ [getTimeFromClientX]
);
const handleTrackMouseLeave = useCallback(() => {
@@ -93,7 +102,7 @@ export function ReplayTimeline({ events }: { events: IServiceEvent[] }) {
const info = getTimeFromClientX(e.clientX);
if (info) seek(info.timeMs);
},
- [getTimeFromClientX, seek],
+ [getTimeFromClientX, seek]
);
const eventsWithOffset = useMemo(
@@ -104,7 +113,7 @@ export function ReplayTimeline({ events }: { events: IServiceEvent[] }) {
offsetMs: startTime != null ? getEventOffsetMs(ev, startTime) : 0,
}))
.filter(({ offsetMs }) => offsetMs >= 0 && offsetMs <= duration),
- [events, startTime, duration],
+ [events, startTime, duration]
);
// Group events that are within 24px of each other on the track.
@@ -113,7 +122,9 @@ export function ReplayTimeline({ events }: { events: IServiceEvent[] }) {
if (!eventsWithOffset.length || duration <= 0) return [];
// Sort by offsetMs so we sweep left-to-right
- const sorted = [...eventsWithOffset].sort((a, b) => a.offsetMs - b.offsetMs);
+ const sorted = [...eventsWithOffset].sort(
+ (a, b) => a.offsetMs - b.offsetMs
+ );
// 24px in ms — recalculated from container width; fall back to 2% of duration
const trackWidth = trackRef.current?.offsetWidth ?? 600;
@@ -122,10 +133,16 @@ export function ReplayTimeline({ events }: { events: IServiceEvent[] }) {
const groups: { items: typeof sorted; pct: number }[] = [];
for (const item of sorted) {
const last = groups[groups.length - 1];
- const lastPct = last ? (last.items[last.items.length - 1]!.offsetMs / duration) * 100 : -Infinity;
+ const lastPct = last
+ ? (last.items[last.items.length - 1]!.offsetMs / duration) * 100
+ : -Infinity;
const thisPct = (item.offsetMs / duration) * 100;
- if (last && item.offsetMs - last.items[last.items.length - 1]!.offsetMs <= thresholdMs) {
+ if (
+ last &&
+ item.offsetMs - last.items[last.items.length - 1]!.offsetMs <=
+ thresholdMs
+ ) {
last.items.push(item);
// Anchor the group at its first item's position
} else {
@@ -140,7 +157,10 @@ export function ReplayTimeline({ events }: { events: IServiceEvent[] }) {
if (!isReady || duration <= 0) return null;
- const progressPct = Math.max(0, Math.min(100, (currentTimeRef.current / duration) * 100));
+ const progressPct = Math.max(
+ 0,
+ Math.min(100, (currentTimeRef.current / duration) * 100)
+ );
return (
<TooltipProvider delayDuration={300}>
@@ -227,9 +247,17 @@ export function ReplayTimeline({ events }: { events: IServiceEvent[] }) {
e.stopPropagation();
seek(first.offsetMs);
}}
- aria-label={isGroup ? `${group.items.length} events at ${formatDuration(first.offsetMs)}` : `${first.event.name} at ${formatDuration(first.offsetMs)}`}
+ aria-label={
+ isGroup
+ ? `${group.items.length} events at ${formatDuration(first.offsetMs)}`
+ : `${first.event.name} at ${formatDuration(first.offsetMs)}`
+ }
>
- <EventIcon name={first.event.name} meta={first.event.meta} size="sm" />
+ <EventIcon
+ name={first.event.name}
+ meta={first.event.meta}
+ size="sm"
+ />
{isGroup && (
<span className="absolute -right-1 -top-1 flex h-4 w-4 items-center justify-center rounded-full bg-foreground text-[9px] font-bold leading-none text-background">
{group.items.length}
diff --git a/apps/start/src/components/sessions/replay/replay-utils.ts b/apps/start/src/components/sessions/replay/replay-utils.ts
index f7f3860a2..9e0edd608 100644
--- a/apps/start/src/components/sessions/replay/replay-utils.ts
+++ b/apps/start/src/components/sessions/replay/replay-utils.ts
@@ -2,7 +2,7 @@ import type { IServiceEvent } from '@openpanel/core';
export function getEventOffsetMs(
event: IServiceEvent,
- startTime: number,
+ startTime: number
): number {
const t =
typeof event.createdAt === 'object' && event.createdAt instanceof Date
diff --git a/apps/start/src/components/settings/delete-account.tsx b/apps/start/src/components/settings/delete-account.tsx
index 8f5bab951..8be6c4000 100644
--- a/apps/start/src/components/settings/delete-account.tsx
+++ b/apps/start/src/components/settings/delete-account.tsx
@@ -10,7 +10,7 @@ import { TrashIcon } from 'lucide-react';
export default function DeleteAccount() {
const trpc = useTRPC();
const { data: blockers = [] } = useQuery(
- trpc.user.deletionBlockers.queryOptions(),
+ trpc.user.deletionBlockers.queryOptions()
);
const blocked = blockers.length > 0;
@@ -30,8 +30,8 @@ export default function DeleteAccount() {
<Alert variant="destructive">
<AlertTitle>Cancel your subscriptions first</AlertTitle>
<AlertDescription>
- These organizations you created have an active subscription. Cancel
- each one before deleting your account:
+ These organizations you created have an active subscription.
+ Cancel each one before deleting your account:
<ul className="mt-2 list-disc pl-5">
{blockers.map((organization) => (
<li key={organization.id}>
diff --git a/apps/start/src/components/settings/delete-organization.tsx b/apps/start/src/components/settings/delete-organization.tsx
index 54219b143..e81816035 100644
--- a/apps/start/src/components/settings/delete-organization.tsx
+++ b/apps/start/src/components/settings/delete-organization.tsx
@@ -17,7 +17,7 @@ export default function DeleteOrganization({ organization }: Props) {
const { data: myAccess } = useQuery(
trpc.organization.myAccess.queryOptions({
organizationId: organization.id,
- }),
+ })
);
const cancelDeletionMutation = useMutation(
@@ -28,10 +28,10 @@ export default function DeleteOrganization({ organization }: Props) {
queryClient.invalidateQueries(
trpc.organization.get.queryFilter({
organizationId: organization.id,
- }),
+ })
);
},
- }),
+ })
);
// Only admins can delete the organization. The server enforces this too.
@@ -61,7 +61,7 @@ export default function DeleteOrganization({ organization }: Props) {
<span className="font-medium">
{format(
startOfHour(addHours(organization.deleteAt, 1)),
- 'yyyy-MM-dd HH:mm:ss',
+ 'yyyy-MM-dd HH:mm:ss'
)}
</span>
. All of its projects and their events will be deleted.
diff --git a/apps/start/src/components/settings/delete-project.tsx b/apps/start/src/components/settings/delete-project.tsx
index c2f1aa9f5..ac1dcbc38 100644
--- a/apps/start/src/components/settings/delete-project.tsx
+++ b/apps/start/src/components/settings/delete-project.tsx
@@ -20,7 +20,7 @@ export default function DeleteProject({ project }: Props) {
const { data: organization } = useQuery(
trpc.organization.get.queryOptions({
organizationId: project.organizationId,
- }),
+ })
);
// When the whole organization is scheduled for deletion, this project's
// deletion is part of it and can only be cancelled at the organization level.
@@ -33,10 +33,10 @@ export default function DeleteProject({ project }: Props) {
queryClient.invalidateQueries(
trpc.project.getProjectWithClients.queryFilter({
projectId: project.id,
- }),
+ })
);
},
- }),
+ })
);
const cancelDeletionMutation = useMutation(
@@ -47,10 +47,10 @@ export default function DeleteProject({ project }: Props) {
queryClient.invalidateQueries(
trpc.project.getProjectWithClients.queryFilter({
projectId: project.id,
- }),
+ })
);
},
- }),
+ })
);
return (
@@ -74,7 +74,7 @@ export default function DeleteProject({ project }: Props) {
// Since we run cron once an hour
format(
startOfHour(addHours(project.deleteAt, 1)),
- 'yyyy-MM-dd HH:mm:ss',
+ 'yyyy-MM-dd HH:mm:ss'
)
}
</span>
diff --git a/apps/start/src/components/settings/invites/columns.tsx b/apps/start/src/components/settings/invites/columns.tsx
index beccebc82..a5f218983 100644
--- a/apps/start/src/components/settings/invites/columns.tsx
+++ b/apps/start/src/components/settings/invites/columns.tsx
@@ -69,13 +69,13 @@ export function useColumns(): ColumnDef<
queryClient.invalidateQueries(
trpc.organization.invitations.queryFilter({
organizationId: row.original.organizationId,
- }),
+ })
);
},
onError() {
toast.error(`Failed to revoke invite for ${row.original.email}`);
},
- }),
+ })
);
return (
@@ -83,7 +83,7 @@ export function useColumns(): ColumnDef<
<DropdownMenuItem
onClick={() => {
clipboard(
- `${window.location.origin}/onboarding?inviteId=${row.original.id}`,
+ `${window.location.origin}/onboarding?inviteId=${row.original.id}`
);
}}
>
@@ -112,7 +112,7 @@ function AccessCell({
const projectsQuery = useQuery(
trpc.project.list.queryOptions({
organizationId: row.original.organizationId,
- }),
+ })
);
const projects = projectsQuery.data ?? [];
const access = row.original.projectAccess ?? [];
diff --git a/apps/start/src/components/settings/members/columns.tsx b/apps/start/src/components/settings/members/columns.tsx
index 47a058d47..cf99ecf87 100644
--- a/apps/start/src/components/settings/members/columns.tsx
+++ b/apps/start/src/components/settings/members/columns.tsx
@@ -91,18 +91,18 @@ export function useColumns() {
trpc.organization.removeMember.mutationOptions({
onSuccess() {
toast.success(
- `${row.original.user?.firstName} has been removed from the organization`,
+ `${row.original.user?.firstName} has been removed from the organization`
);
queryClient.invalidateQueries(
- trpc.organization.members.pathFilter(),
+ trpc.organization.members.pathFilter()
);
},
onError() {
toast.error(
- `Failed to remove ${row.original.user?.firstName} from the organization`,
+ `Failed to remove ${row.original.user?.firstName} from the organization`
);
},
- }),
+ })
);
return (
diff --git a/apps/start/src/components/sidebar-link.tsx b/apps/start/src/components/sidebar-link.tsx
index 4c7d498a5..ce0369607 100644
--- a/apps/start/src/components/sidebar-link.tsx
+++ b/apps/start/src/components/sidebar-link.tsx
@@ -20,7 +20,7 @@ export function SidebarLink({
<ProjectLink
className={cn(
'flex items-center gap-2 rounded-md px-3 py-2 font-medium transition-all hover:bg-def-200 text-[13px]',
- className,
+ className
)}
href={href}
exact={exact}
diff --git a/apps/start/src/components/sidebar-project-menu.tsx b/apps/start/src/components/sidebar-project-menu.tsx
index c0f7e59d8..db6f3c6c5 100644
--- a/apps/start/src/components/sidebar-project-menu.tsx
+++ b/apps/start/src/components/sidebar-project-menu.tsx
@@ -164,7 +164,7 @@ export function ActionCTAButton() {
'group flex w-full items-center gap-2 rounded-md border border-border bg-def-200 px-3 py-2 text-left',
'text-[13px] font-medium text-foreground',
'transition-colors hover:bg-def-300',
- 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
+ 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring'
)}
>
<PlusIcon className="size-5 shrink-0" />
diff --git a/apps/start/src/components/stats.tsx b/apps/start/src/components/stats.tsx
index 6c03d8006..51cbe6d14 100644
--- a/apps/start/src/components/stats.tsx
+++ b/apps/start/src/components/stats.tsx
@@ -35,13 +35,13 @@ export function StatsCard({
className={cn(
'col ring-[0.5px] ring-border',
size === 'sm' ? 'gap-1 p-3' : 'gap-2 p-4',
- className,
+ className
)}
>
<div
className={cn(
'text-muted-foreground',
- size === 'sm' ? 'text-xs' : 'text-sm',
+ size === 'sm' ? 'text-xs' : 'text-sm'
)}
>
{title}
@@ -50,7 +50,7 @@ export function StatsCard({
<div
className={cn(
'font-mono leading-snug',
- size === 'sm' ? 'text-sm font-medium' : 'text-lg font-bold',
+ size === 'sm' ? 'text-sm font-medium' : 'text-lg font-bold'
)}
>
{value}
diff --git a/apps/start/src/components/theme-provider.tsx b/apps/start/src/components/theme-provider.tsx
index 9e4b7b4e8..37b155a6d 100644
--- a/apps/start/src/components/theme-provider.tsx
+++ b/apps/start/src/components/theme-provider.tsx
@@ -109,7 +109,7 @@ type ThemeProviderProps = {
export function ThemeProvider({ children }: ThemeProviderProps) {
const [userTheme, setUserTheme] = useCookieStore<UserTheme>(
'ui-theme',
- 'system',
+ 'system'
);
useEffect(() => {
diff --git a/apps/start/src/components/ui/accordion.tsx b/apps/start/src/components/ui/accordion.tsx
index 32d1da5b9..7023215b2 100644
--- a/apps/start/src/components/ui/accordion.tsx
+++ b/apps/start/src/components/ui/accordion.tsx
@@ -26,7 +26,7 @@ const AccordionTrigger = React.forwardRef<
ref={ref}
className={cn(
'flex flex-1 items-center justify-between py-4 font-medium transition-all [&[data-state=closed]]:hover:bg-muted/30 [&[data-state=open]>svg]:rotate-180',
- className,
+ className
)}
{...props}
>
diff --git a/apps/start/src/components/ui/alert-dialog.tsx b/apps/start/src/components/ui/alert-dialog.tsx
index 52196732f..2d1baa50e 100644
--- a/apps/start/src/components/ui/alert-dialog.tsx
+++ b/apps/start/src/components/ui/alert-dialog.tsx
@@ -16,7 +16,7 @@ const AlertDialogOverlay = React.forwardRef<
<AlertDialogPrimitive.Overlay
className={cn(
'fixed inset-0 z-50 bg-card/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',
- className,
+ className
)}
{...props}
ref={ref}
@@ -34,7 +34,7 @@ const AlertDialogContent = React.forwardRef<
ref={ref}
className={cn(
'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-card p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full',
- className,
+ className
)}
{...props}
/>
@@ -49,7 +49,7 @@ const AlertDialogHeader = ({
<div
className={cn(
'flex flex-col space-y-2 text-center sm:text-left',
- className,
+ className
)}
{...props}
/>
@@ -63,7 +63,7 @@ const AlertDialogFooter = ({
<div
className={cn(
'flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2',
- className,
+ className
)}
{...props}
/>
@@ -116,7 +116,7 @@ const AlertDialogCancel = React.forwardRef<
className={cn(
buttonVariants({ variant: 'outline' }),
'mt-2 sm:mt-0',
- className,
+ className
)}
{...props}
/>
diff --git a/apps/start/src/components/ui/alert.tsx b/apps/start/src/components/ui/alert.tsx
index c45b5d577..30bd82278 100644
--- a/apps/start/src/components/ui/alert.tsx
+++ b/apps/start/src/components/ui/alert.tsx
@@ -18,7 +18,7 @@ const alertVariants = cva(
defaultVariants: {
variant: 'default',
},
- },
+ }
);
const Alert = React.forwardRef<
diff --git a/apps/start/src/components/ui/avatar.tsx b/apps/start/src/components/ui/avatar.tsx
index b20339ea0..12a65a65e 100644
--- a/apps/start/src/components/ui/avatar.tsx
+++ b/apps/start/src/components/ui/avatar.tsx
@@ -10,7 +10,7 @@ const Avatar = React.forwardRef<
ref={ref}
className={cn(
'relative flex h-8 w-8 shrink-0 overflow-hidden rounded-full ',
- className,
+ className
)}
{...props}
/>
@@ -37,7 +37,7 @@ const AvatarFallback = React.forwardRef<
ref={ref}
className={cn(
'flex h-full w-full items-center justify-center rounded-full bg-primary text-white',
- className,
+ className
)}
{...props}
/>
diff --git a/apps/start/src/components/ui/badge.tsx b/apps/start/src/components/ui/badge.tsx
index b8b3da2a8..b086c711e 100644
--- a/apps/start/src/components/ui/badge.tsx
+++ b/apps/start/src/components/ui/badge.tsx
@@ -27,7 +27,7 @@ const badgeVariants = cva(
defaultVariants: {
variant: 'default',
},
- },
+ }
);
function Badge({
diff --git a/apps/start/src/components/ui/carousel.tsx b/apps/start/src/components/ui/carousel.tsx
index 664335d6c..0dc7baf2d 100644
--- a/apps/start/src/components/ui/carousel.tsx
+++ b/apps/start/src/components/ui/carousel.tsx
@@ -53,14 +53,14 @@ const Carousel = React.forwardRef<
children,
...props
},
- ref,
+ ref
) => {
const [carouselRef, api] = useEmblaCarousel(
{
...opts,
axis: orientation === 'horizontal' ? 'x' : 'y',
},
- plugins,
+ plugins
);
const [canScrollPrev, setCanScrollPrev] = React.useState(false);
const [canScrollNext, setCanScrollNext] = React.useState(false);
@@ -92,7 +92,7 @@ const Carousel = React.forwardRef<
scrollNext();
}
},
- [scrollPrev, scrollNext],
+ [scrollPrev, scrollNext]
);
React.useEffect(() => {
@@ -148,7 +148,7 @@ const Carousel = React.forwardRef<
</div>
</CarouselContext.Provider>
);
- },
+ }
);
Carousel.displayName = 'Carousel';
@@ -165,7 +165,7 @@ const CarouselContent = React.forwardRef<
className={cn(
'flex',
orientation === 'horizontal' ? '' : 'flex-col',
- className,
+ className
)}
{...props}
/>
@@ -188,7 +188,7 @@ const CarouselItem = React.forwardRef<
className={cn(
'min-w-0 shrink-0 grow-0 basis-full',
orientation === 'horizontal' ? 'pl-4' : 'pt-4',
- className,
+ className
)}
{...props}
/>
@@ -212,7 +212,7 @@ const CarouselPrevious = React.forwardRef<
orientation === 'horizontal'
? 'left-6 top-1/2 -translate-y-1/2'
: '-top-12 left-1/2 -translate-x-1/2 rotate-90',
- className,
+ className
)}
disabled={!canScrollPrev}
onClick={scrollPrev}
@@ -241,7 +241,7 @@ const CarouselNext = React.forwardRef<
orientation === 'horizontal'
? 'right-6 top-1/2 -translate-y-1/2'
: '-bottom-12 left-1/2 -translate-x-1/2 rotate-90',
- className,
+ className
)}
disabled={!canScrollNext}
onClick={scrollNext}
diff --git a/apps/start/src/components/ui/checkbox.tsx b/apps/start/src/components/ui/checkbox.tsx
index 97dccbc38..39d794b81 100644
--- a/apps/start/src/components/ui/checkbox.tsx
+++ b/apps/start/src/components/ui/checkbox.tsx
@@ -8,7 +8,7 @@ export const DumpCheckbox = ({ checked }: { checked: boolean }) => {
<div
className={cn(
'block h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
- checked && 'bg-primary text-primary-foreground',
+ checked && 'bg-primary text-primary-foreground'
)}
>
<div className="flex items-center justify-center text-current">
@@ -26,7 +26,7 @@ const Checkbox = React.forwardRef<
ref={ref}
className={cn(
'block h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground',
- className,
+ className
)}
{...props}
>
@@ -46,7 +46,7 @@ const CheckboxInput = React.forwardRef<
<label
className={cn(
'flex min-h-10 cursor-pointer select-none gap-4 rounded-md border border-border px-3 py-[0.5rem]',
- className,
+ className
)}
>
<Checkbox ref={ref} {...props} className="relative top-0.5" />
diff --git a/apps/start/src/components/ui/combobox-advanced.tsx b/apps/start/src/components/ui/combobox-advanced.tsx
index e19125560..6b5bd2eb2 100644
--- a/apps/start/src/components/ui/combobox-advanced.tsx
+++ b/apps/start/src/components/ui/combobox-advanced.tsx
@@ -53,7 +53,7 @@ export function ComboboxAdvanced({
(typeof item.label === 'string' &&
item.label.toLowerCase().includes(inputValue.toLowerCase())) ||
(typeof item.value === 'string' &&
- item.value.toLowerCase().includes(inputValue.toLowerCase())),
+ item.value.toLowerCase().includes(inputValue.toLowerCase()))
);
const renderItem = (item: IItem) => {
@@ -69,7 +69,7 @@ export function ComboboxAdvanced({
onChange(
value.includes(desanitize(item.value))
? value.filter((s) => s !== desanitize(item.value))
- : [...value, desanitize(item.value)],
+ : [...value, desanitize(item.value)]
);
}}
className={'flex cursor-pointer items-center gap-2'}
diff --git a/apps/start/src/components/ui/combobox-events.tsx b/apps/start/src/components/ui/combobox-events.tsx
index 78e53c452..e8171e8de 100644
--- a/apps/start/src/components/ui/combobox-events.tsx
+++ b/apps/start/src/components/ui/combobox-events.tsx
@@ -90,7 +90,7 @@ export function ComboboxEvents<
function find(value: string) {
return items.find(
- (item) => item.name.toLowerCase() === value.toLowerCase(),
+ (item) => item.name.toLowerCase() === value.toLowerCase()
);
}
@@ -140,7 +140,7 @@ export function ComboboxEvents<
className={cn(
'justify-between',
!!error && 'border-destructive',
- className,
+ className
)}
>
<div className="flex min-w-0 items-center">
@@ -192,7 +192,7 @@ export function ComboboxEvents<
<CommandItem
className={cn(
'p-4 py-2.5 gap-4',
- selectedValues.includes(item.name as T) && 'bg-accent',
+ selectedValues.includes(item.name as T) && 'bg-accent'
)}
key={item.name}
value={item.name}
diff --git a/apps/start/src/components/ui/combobox.tsx b/apps/start/src/components/ui/combobox.tsx
index c9b8525d0..8cc4180fc 100644
--- a/apps/start/src/components/ui/combobox.tsx
+++ b/apps/start/src/components/ui/combobox.tsx
@@ -67,7 +67,7 @@ export function Combobox<T extends string>({
const [search, setSearch] = React.useState('');
function find(value: string) {
return items.find(
- (item) => item.value.toLowerCase() === value.toLowerCase(),
+ (item) => item.value.toLowerCase() === value.toLowerCase()
);
}
@@ -84,7 +84,7 @@ export function Combobox<T extends string>({
className={cn(
'justify-between',
!!error && 'border-destructive',
- className,
+ className
)}
>
<div className="flex min-w-0 items-center">
@@ -150,7 +150,7 @@ export function Combobox<T extends string>({
<Check
className={cn(
'mr-2 h-4 w-4 flex-shrink-0',
- value === item.value ? 'opacity-100' : 'opacity-0',
+ value === item.value ? 'opacity-100' : 'opacity-0'
)}
/>
{item.label}
diff --git a/apps/start/src/components/ui/command.tsx b/apps/start/src/components/ui/command.tsx
index a628f2f09..222fdc6a2 100644
--- a/apps/start/src/components/ui/command.tsx
+++ b/apps/start/src/components/ui/command.tsx
@@ -20,7 +20,7 @@ function Command({
data-slot="command"
className={cn(
'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',
- className,
+ className
)}
{...props}
/>
@@ -72,7 +72,7 @@ function CommandInput({
data-slot="command-input"
className={cn(
'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50',
- className,
+ className
)}
{...props}
/>
@@ -89,7 +89,7 @@ function CommandList({
data-slot="command-list"
className={cn(
'max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto',
- className,
+ className
)}
{...props}
/>
@@ -117,7 +117,7 @@ function CommandGroup({
data-slot="command-group"
className={cn(
'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',
- className,
+ className
)}
{...props}
/>
@@ -146,7 +146,7 @@ function CommandItem({
data-slot="command-item"
className={cn(
"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
- className,
+ className
)}
{...props}
/>
@@ -162,7 +162,7 @@ function CommandShortcut({
data-slot="command-shortcut"
className={cn(
'text-muted-foreground ml-auto text-xs tracking-widest',
- className,
+ className
)}
{...props}
/>
diff --git a/apps/start/src/components/ui/data-table/data-table-column-header.tsx b/apps/start/src/components/ui/data-table/data-table-column-header.tsx
index e9d08fd38..892506f54 100644
--- a/apps/start/src/components/ui/data-table/data-table-column-header.tsx
+++ b/apps/start/src/components/ui/data-table/data-table-column-header.tsx
@@ -42,7 +42,7 @@ export function DataTableColumnHeader<TData, TValue>({
<DropdownMenuTrigger
className={cn(
'text-[10px] uppercase -ml-1.5 flex h-8 items-center gap-1.5 rounded-md px-2 py-1.5 hover:bg-accent focus:outline-none focus:ring-1 focus:ring-ring data-[state=open]:bg-accent [&_svg]:size-3 [&_svg]:shrink-0 [&_svg]:text-muted-foreground',
- className,
+ className
)}
{...props}
>
diff --git a/apps/start/src/components/ui/data-table/data-table-date-filter.tsx b/apps/start/src/components/ui/data-table/data-table-date-filter.tsx
index 3c7fe9a77..59d320eb4 100644
--- a/apps/start/src/components/ui/data-table/data-table-date-filter.tsx
+++ b/apps/start/src/components/ui/data-table/data-table-date-filter.tsx
@@ -94,7 +94,7 @@ export function DataTableDateFilter<TData>({
column.setFilterValue(date.getTime());
}
},
- [column, multiple],
+ [column, multiple]
);
const onReset = React.useCallback(
@@ -102,7 +102,7 @@ export function DataTableDateFilter<TData>({
event.stopPropagation();
column.setFilterValue(undefined);
},
- [column],
+ [column]
);
const hasValue = React.useMemo(() => {
diff --git a/apps/start/src/components/ui/data-table/data-table-faceted-filter.tsx b/apps/start/src/components/ui/data-table/data-table-faceted-filter.tsx
index 34738c529..ba1e34f3c 100644
--- a/apps/start/src/components/ui/data-table/data-table-faceted-filter.tsx
+++ b/apps/start/src/components/ui/data-table/data-table-faceted-filter.tsx
@@ -46,7 +46,7 @@ export function DataTableFacetedFilter<TData, TValue>({
const columnFilterValue = column?.getFilterValue();
const selectedValues = new Set(
- Array.isArray(columnFilterValue) ? columnFilterValue : [],
+ Array.isArray(columnFilterValue) ? columnFilterValue : []
);
const onItemSelect = React.useCallback(
@@ -67,7 +67,7 @@ export function DataTableFacetedFilter<TData, TValue>({
setOpen(false);
}
},
- [column, multiple, selectedValues],
+ [column, multiple, selectedValues]
);
const onReset = React.useCallback(
@@ -75,7 +75,7 @@ export function DataTableFacetedFilter<TData, TValue>({
event?.stopPropagation();
column?.setFilterValue(undefined);
},
- [column],
+ [column]
);
return (
@@ -154,7 +154,7 @@ export function DataTableFacetedFilter<TData, TValue>({
'flex size-4 items-center justify-center rounded-sm border border-primary',
isSelected
? 'bg-primary'
- : 'opacity-50 [&_svg]:invisible',
+ : 'opacity-50 [&_svg]:invisible'
)}
>
<CheckIcon className="size-4" />
diff --git a/apps/start/src/components/ui/data-table/data-table-helpers.tsx b/apps/start/src/components/ui/data-table/data-table-helpers.tsx
index 0d81c4df2..0bcda2dac 100644
--- a/apps/start/src/components/ui/data-table/data-table-helpers.tsx
+++ b/apps/start/src/components/ui/data-table/data-table-helpers.tsx
@@ -9,7 +9,7 @@ import {
import { DataTableColumnHeader } from './data-table-column-header';
export function createHeaderColumn<TData>(
- title: string,
+ title: string
): ColumnDef<TData>['header'] {
return ({ column }) => (
<DataTableColumnHeader column={column} title={title} />
@@ -17,7 +17,7 @@ export function createHeaderColumn<TData>(
}
export function createActionColumn<TData>(
- Component: ({ row }: { row: Row<TData> }) => React.ReactNode,
+ Component: ({ row }: { row: Row<TData> }) => React.ReactNode
): ColumnDef<TData> {
return {
id: 'actions',
diff --git a/apps/start/src/components/ui/data-table/data-table-hooks.tsx b/apps/start/src/components/ui/data-table/data-table-hooks.tsx
index a7fde2e5f..ba57802dc 100644
--- a/apps/start/src/components/ui/data-table/data-table-hooks.tsx
+++ b/apps/start/src/components/ui/data-table/data-table-hooks.tsx
@@ -13,7 +13,7 @@ export const useDataTablePagination = (pageSize = 10) => {
parseAsInteger.withDefault(1).withOptions({
clearOnDefault: true,
history: 'push',
- }),
+ })
);
const state: PaginationState = {
pageIndex: page - 1,
@@ -24,13 +24,13 @@ export const useDataTablePagination = (pageSize = 10) => {
export const useReadColumnVisibility = (persistentKey: string) => {
return useReadLocalStorage<Record<string, boolean>>(
- `@op:${persistentKey}-column-visibility`,
+ `@op:${persistentKey}-column-visibility`
);
};
export const useDataTableColumnVisibility = <TData,>(
columns: ColumnDef<TData>[],
- persistentKey: string,
+ persistentKey: string
) => {
const [columnVisibility, setColumnVisibility] = useLocalStorage<
Record<string, boolean>
@@ -46,7 +46,7 @@ export const useDataTableColumnVisibility = <TData,>(
: true;
}
return acc;
- }, {} as VisibilityState),
+ }, {} as VisibilityState)
);
// somewhat hack
@@ -58,7 +58,7 @@ export const useDataTableColumnVisibility = <TData,>(
const [columnOrder, setColumnOrder] = useLocalStorage<string[]>(
`@op:${persistentKey}-column-order`,
- columns.map((column) => column.id!),
+ columns.map((column) => column.id!)
);
return { columnVisibility, setColumnVisibility, columnOrder, setColumnOrder };
diff --git a/apps/start/src/components/ui/data-table/data-table-parsers.ts b/apps/start/src/components/ui/data-table/data-table-parsers.ts
index 16fcb52ea..b6794813e 100644
--- a/apps/start/src/components/ui/data-table/data-table-parsers.ts
+++ b/apps/start/src/components/ui/data-table/data-table-parsers.ts
@@ -14,7 +14,7 @@ const sortingItemSchema = z.object({
});
export const getSortingStateParser = <TData>(
- columnIds?: string[] | Set<string>,
+ columnIds?: string[] | Set<string>
) => {
const validKeys = columnIds
? columnIds instanceof Set
@@ -44,7 +44,7 @@ export const getSortingStateParser = <TData>(
a.length === b.length &&
a.every(
(item, index) =>
- item.id === b[index]?.id && item.desc === b[index]?.desc,
+ item.id === b[index]?.id && item.desc === b[index]?.desc
),
});
};
@@ -60,7 +60,7 @@ const filterItemSchema = z.object({
export type FilterItemSchema = z.infer<typeof filterItemSchema>;
export const getFiltersStateParser = <TData>(
- columnIds?: string[] | Set<string>,
+ columnIds?: string[] | Set<string>
) => {
const validKeys = columnIds
? columnIds instanceof Set
@@ -93,7 +93,7 @@ export const getFiltersStateParser = <TData>(
filter.id === b[index]?.id &&
filter.value === b[index]?.value &&
filter.variant === b[index]?.variant &&
- filter.operator === b[index]?.operator,
+ filter.operator === b[index]?.operator
),
});
};
diff --git a/apps/start/src/components/ui/data-table/data-table-slider-filter.tsx b/apps/start/src/components/ui/data-table/data-table-slider-filter.tsx
index badc510ac..675514669 100644
--- a/apps/start/src/components/ui/data-table/data-table-slider-filter.tsx
+++ b/apps/start/src/components/ui/data-table/data-table-slider-filter.tsx
@@ -93,7 +93,7 @@ export function DataTableSliderFilter<TData>({
column.setFilterValue([numValue, range[1]]);
}
},
- [column, min, range],
+ [column, min, range]
);
const onToInputChange = React.useCallback(
@@ -103,7 +103,7 @@ export function DataTableSliderFilter<TData>({
column.setFilterValue([range[0], numValue]);
}
},
- [column, max, range],
+ [column, max, range]
);
const onSliderValueChange = React.useCallback(
@@ -112,7 +112,7 @@ export function DataTableSliderFilter<TData>({
column.setFilterValue(value);
}
},
- [column],
+ [column]
);
const onReset = React.useCallback(
@@ -122,7 +122,7 @@ export function DataTableSliderFilter<TData>({
}
column.setFilterValue(undefined);
},
- [column],
+ [column]
);
return (
diff --git a/apps/start/src/components/ui/data-table/data-table-view-options.tsx b/apps/start/src/components/ui/data-table/data-table-view-options.tsx
index 007762668..8bde75eea 100644
--- a/apps/start/src/components/ui/data-table/data-table-view-options.tsx
+++ b/apps/start/src/components/ui/data-table/data-table-view-options.tsx
@@ -88,7 +88,7 @@ function SortableColumnItem({
<Check
className={cn(
'ml-auto size-4 shrink-0',
- column.getIsVisible() ? 'opacity-100' : 'opacity-0',
+ column.getIsVisible() ? 'opacity-100' : 'opacity-0'
)}
/>
</CommandItem>
@@ -100,7 +100,7 @@ export function DataTableViewOptions<TData>({
}: DataTableViewOptionsProps<TData>) {
const allColumns = table.getAllColumns();
const filterableColumns = allColumns.filter(
- (column) => typeof column.accessorFn !== 'undefined' && column.getCanHide(),
+ (column) => typeof column.accessorFn !== 'undefined' && column.getCanHide()
);
// Use the column order from the table state (managed by useDataTableColumnVisibility)
@@ -130,7 +130,7 @@ export function DataTableViewOptions<TData>({
useSensor(PointerSensor),
useSensor(KeyboardSensor, {
coordinateGetter: sortableKeyboardCoordinates,
- }),
+ })
);
const handleDragEnd = (event: DragEndEvent) => {
@@ -159,7 +159,7 @@ export function DataTableViewOptions<TData>({
column.toggleVisibility(
typeof column.columnDef.meta?.hidden === 'boolean'
? !column.columnDef.meta?.hidden
- : true,
+ : true
);
}
});
diff --git a/apps/start/src/components/ui/data-table/data-table.tsx b/apps/start/src/components/ui/data-table/data-table.tsx
index 52f35ab3e..c876e01f7 100644
--- a/apps/start/src/components/ui/data-table/data-table.tsx
+++ b/apps/start/src/components/ui/data-table/data-table.tsx
@@ -67,7 +67,7 @@ export function DataTable<TData>({
? null
: flexRender(
header.column.columnDef.header,
- header.getContext(),
+ header.getContext()
)}
</TableHead>
))}
@@ -92,7 +92,7 @@ export function DataTable<TData>({
}),
}}
className={cn(
- cell.column.columnDef.meta?.bold && 'font-medium',
+ cell.column.columnDef.meta?.bold && 'font-medium'
)}
>
{loading ? (
@@ -100,7 +100,7 @@ export function DataTable<TData>({
) : (
flexRender(
cell.column.columnDef.cell,
- cell.getContext(),
+ cell.getContext()
)
)}
</TableCell>
diff --git a/apps/start/src/components/ui/data-table/use-table.tsx b/apps/start/src/components/ui/data-table/use-table.tsx
index 65705b929..39abf0da5 100644
--- a/apps/start/src/components/ui/data-table/use-table.tsx
+++ b/apps/start/src/components/ui/data-table/use-table.tsx
@@ -46,11 +46,11 @@ export function useTable<TData>({
}) {
const [page, setPage] = useQueryState(
'page',
- parseAsInteger.withDefault(1).withOptions(nuqsOptions),
+ parseAsInteger.withDefault(1).withOptions(nuqsOptions)
);
const [perPage, setPerPage] = useQueryState(
'perPage',
- parseAsInteger.withDefault(pageSize ?? 10).withOptions(nuqsOptions),
+ parseAsInteger.withDefault(pageSize ?? 10).withOptions(nuqsOptions)
);
const pagination: PaginationState = {
pageIndex: page - 1,
@@ -118,7 +118,7 @@ export function useTable<TData>({
}
return filters;
},
- [],
+ []
);
}, [qsFilters]);
@@ -133,7 +133,7 @@ export function useTable<TData>({
const isWithinRange = (
row: Row<TData>,
columnId: string,
- value: [number, number],
+ value: [number, number]
) => {
const cellDate = row.getValue<Date>(columnId);
if (!cellDate) return false;
@@ -162,7 +162,7 @@ export function useTable<TData>({
data: useMemo(
() =>
loading ? ([{}, {}, {}, {}, {}, {}, {}, {}, {}, {}] as TData[]) : data,
- [loading, data],
+ [loading, data]
),
debugTable: false,
filterFns: {
@@ -211,7 +211,7 @@ export function useTable<TData>({
const value = filter.value as any;
if (Array.isArray(value)) {
const cleaned = value.filter(
- (v) => v !== undefined && v !== null,
+ (v) => v !== undefined && v !== null
);
updates[filter.id] = cleaned as any;
} else {
diff --git a/apps/start/src/components/ui/data-table/virtualized-data-table.tsx b/apps/start/src/components/ui/data-table/virtualized-data-table.tsx
index 2666943df..626924be9 100644
--- a/apps/start/src/components/ui/data-table/virtualized-data-table.tsx
+++ b/apps/start/src/components/ui/data-table/virtualized-data-table.tsx
@@ -54,7 +54,7 @@ export function VirtualizedDataTable<TData>({
const updateScrollMargin = throttle(() => {
if (parentRef.current) {
setScrollMargin(
- parentRef.current.getBoundingClientRect().top + window.scrollY,
+ parentRef.current.getBoundingClientRect().top + window.scrollY
);
}
}, 500);
@@ -140,7 +140,7 @@ export function VirtualizedDataTable<TData>({
.columnDef.header === 'function' ? (
flexRender(
header.column.columnDef.header,
- header.getContext(),
+ header.getContext()
)
) : (
<DataTableColumnHeader
diff --git a/apps/start/src/components/ui/date-time.tsx b/apps/start/src/components/ui/date-time.tsx
index 3b797911c..1003a8508 100644
--- a/apps/start/src/components/ui/date-time.tsx
+++ b/apps/start/src/components/ui/date-time.tsx
@@ -15,7 +15,10 @@ import { CalendarIcon } from 'lucide-react';
export function DateTimePicker({
value,
onChange,
-}: { value: Date; onChange: (date: Date) => void }) {
+}: {
+ value: Date;
+ onChange: (date: Date) => void;
+}) {
function handleDateSelect(date: Date | undefined) {
if (date) {
onChange(date);
@@ -43,7 +46,7 @@ export function DateTimePicker({
variant={'outline'}
className={cn(
'w-full pl-3 text-left font-normal',
- !value && 'text-muted-foreground',
+ !value && 'text-muted-foreground'
)}
>
{value ? (
diff --git a/apps/start/src/components/ui/dialog.tsx b/apps/start/src/components/ui/dialog.tsx
index 1b96fca1a..9719282ad 100644
--- a/apps/start/src/components/ui/dialog.tsx
+++ b/apps/start/src/components/ui/dialog.tsx
@@ -37,7 +37,7 @@ function DialogOverlay({
data-slot="dialog-overlay"
className={cn(
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50',
- className,
+ className
)}
{...props}
/>
@@ -64,7 +64,7 @@ function DialogContent({
'focus:outline-none focus:ring-0 transition-none',
'border bg-def-100 shadow-lg sm:rounded-lg md:max-h-[90vh]',
'bg-def-100 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg [&>*]:min-w-0',
- className,
+ className
)}
{...props}
>
@@ -99,7 +99,7 @@ function DialogFooter({ className, ...props }: React.ComponentProps<'div'>) {
data-slot="dialog-footer"
className={cn(
'flex flex-col-reverse gap-2 sm:flex-row sm:justify-end',
- className,
+ className
)}
{...props}
/>
diff --git a/apps/start/src/components/ui/dropdown-menu.tsx b/apps/start/src/components/ui/dropdown-menu.tsx
index 3d6121d85..04510b131 100644
--- a/apps/start/src/components/ui/dropdown-menu.tsx
+++ b/apps/start/src/components/ui/dropdown-menu.tsx
@@ -27,7 +27,7 @@ const DropdownMenuSubTrigger = React.forwardRef<
className={cn(
'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 outline-none focus:bg-accent data-[state=open]:bg-accent',
inset && 'pl-8',
- className,
+ className
)}
{...props}
>
@@ -46,7 +46,7 @@ const DropdownMenuSubContent = React.forwardRef<
ref={ref}
className={cn(
'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
- className,
+ className
)}
{...props}
/>
@@ -64,7 +64,7 @@ const DropdownMenuContent = React.forwardRef<
sideOffset={sideOffset}
className={cn(
'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
- className,
+ className
)}
{...props}
/>
@@ -86,7 +86,7 @@ const DropdownMenuItem = React.forwardRef<
inset && 'pl-8',
variant === 'destructive' &&
'text-destructive hover:text-destructive-foreground',
- className,
+ className
)}
{...props}
/>
@@ -101,7 +101,7 @@ const DropdownMenuCheckboxItem = React.forwardRef<
ref={ref}
className={cn(
'cursor-pointer relative flex select-none items-center rounded-sm py-1.5 pl-8 pr-2 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:mr-2',
- className,
+ className
)}
checked={checked}
{...props}
@@ -125,7 +125,7 @@ const DropdownMenuRadioItem = React.forwardRef<
ref={ref}
className={cn(
'relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
- className,
+ className
)}
{...props}
>
@@ -173,7 +173,7 @@ const DropdownMenuShortcut = ({
<span
className={cn(
'ml-auto font-mono text-sm tracking-widest opacity-60',
- className,
+ className
)}
{...props}
/>
diff --git a/apps/start/src/components/ui/gradient-background.tsx b/apps/start/src/components/ui/gradient-background.tsx
index 24b718ec8..96a2c6f4d 100644
--- a/apps/start/src/components/ui/gradient-background.tsx
+++ b/apps/start/src/components/ui/gradient-background.tsx
@@ -14,7 +14,7 @@ export function GradientBackground({
<div
className={cn(
'from-def-200 rounded-md bg-gradient-to-tr to-white',
- className,
+ className
)}
{...props}
>
diff --git a/apps/start/src/components/ui/input-enter.tsx b/apps/start/src/components/ui/input-enter.tsx
index b01f6a595..cb97f6a9c 100644
--- a/apps/start/src/components/ui/input-enter.tsx
+++ b/apps/start/src/components/ui/input-enter.tsx
@@ -53,10 +53,7 @@ export function InputEnter({
exit={{ opacity: 0, scale: 0.8 }}
onClick={() => onChangeValue(internalValue)}
>
- <Badge
- variant="secondary"
- className="gap-1 px-1.5 py-0 text-xs"
- >
+ <Badge variant="secondary" className="gap-1 px-1.5 py-0 text-xs">
Press
<CornerDownLeftIcon className="h-3 w-3" />
</Badge>
diff --git a/apps/start/src/components/ui/input-otp.tsx b/apps/start/src/components/ui/input-otp.tsx
index 736fcda50..fcbb7b361 100644
--- a/apps/start/src/components/ui/input-otp.tsx
+++ b/apps/start/src/components/ui/input-otp.tsx
@@ -11,7 +11,7 @@ const InputOTP = React.forwardRef<
ref={ref}
containerClassName={cn(
'flex items-center gap-2 has-[:disabled]:opacity-50',
- containerClassName,
+ containerClassName
)}
className={cn('disabled:cursor-not-allowed', className)}
{...props}
@@ -40,7 +40,7 @@ const InputOTPSlot = React.forwardRef<
className={cn(
'relative flex h-10 w-10 items-center justify-center border-y border-r border-input transition-all first:rounded-l-md first:border-l last:rounded-r-md',
isActive && 'z-10 ring-2 ring-ring ring-offset-background',
- className,
+ className
)}
{...props}
>
diff --git a/apps/start/src/components/ui/input.tsx b/apps/start/src/components/ui/input.tsx
index 96a7548d7..60f6eb717 100644
--- a/apps/start/src/components/ui/input.tsx
+++ b/apps/start/src/components/ui/input.tsx
@@ -16,7 +16,7 @@ const inputVariant = cva(
defaultVariants: {
size: 'sm',
},
- },
+ }
);
export type InputProps = VariantProps<typeof inputVariant> &
@@ -33,13 +33,13 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
type={type}
className={cn(
inputVariant({ size, className }),
- !!error && 'border-destructive',
+ !!error && 'border-destructive'
)}
ref={ref}
{...props}
/>
);
- },
+ }
);
Input.displayName = 'Input';
diff --git a/apps/start/src/components/ui/key-value-grid.tsx b/apps/start/src/components/ui/key-value-grid.tsx
index e8299ae38..7304c6d8c 100644
--- a/apps/start/src/components/ui/key-value-grid.tsx
+++ b/apps/start/src/components/ui/key-value-grid.tsx
@@ -113,48 +113,48 @@ export function KeyValueGrid({
const stringValue = toStringValue(item.value);
return (
- <div
- key={`${item.name}-${index}`}
- className={cn(
- 'relative flex items-center justify-between gap-4 p-4 py-3 shadow-[0_0_0_0.5px] shadow-border group',
- onItemClick && 'cursor-pointer hover:bg-muted/50',
- rowClassName,
- )}
- onClick={() => onItemClick?.(item)}
- onKeyDown={(e) => {
- if (onItemClick && (e.key === 'Enter' || e.key === ' ')) {
- e.preventDefault();
- onItemClick(item);
- }
- }}
- tabIndex={onItemClick ? 0 : undefined}
- role={onItemClick ? 'button' : undefined}
- >
- {copyable && stringValue !== undefined && (
- <button
- onClick={(e) => {
- e.stopPropagation();
- clipboard(stringValue);
- }}
- type="button"
- className="absolute left-2 top-1/2 -translate-y-1/2 -translate-x-full opacity-0 group-hover:translate-x-0 group-hover:opacity-100 transition-all duration-200 ease-out bg-background border border-border rounded p-1 shadow-sm z-10"
- >
- <CopyIcon className="size-3 shrink-0" />
- </button>
- )}
- <div className={cn('flex-1 min-w-0 text-sm', keyClassName)}>
- {renderKey ? renderKey(item) : defaultRenderKey(item)}
- </div>
<div
+ key={`${item.name}-${index}`}
className={cn(
- 'text-right text-sm font-mono truncate min-w-0 max-w-[60%]',
- valueClassName,
+ 'relative flex items-center justify-between gap-4 p-4 py-3 shadow-[0_0_0_0.5px] shadow-border group',
+ onItemClick && 'cursor-pointer hover:bg-muted/50',
+ rowClassName
)}
- title={stringValue}
+ onClick={() => onItemClick?.(item)}
+ onKeyDown={(e) => {
+ if (onItemClick && (e.key === 'Enter' || e.key === ' ')) {
+ e.preventDefault();
+ onItemClick(item);
+ }
+ }}
+ tabIndex={onItemClick ? 0 : undefined}
+ role={onItemClick ? 'button' : undefined}
>
- {renderValue ? renderValue(item) : defaultRenderValue(item)}
+ {copyable && stringValue !== undefined && (
+ <button
+ onClick={(e) => {
+ e.stopPropagation();
+ clipboard(stringValue);
+ }}
+ type="button"
+ className="absolute left-2 top-1/2 -translate-y-1/2 -translate-x-full opacity-0 group-hover:translate-x-0 group-hover:opacity-100 transition-all duration-200 ease-out bg-background border border-border rounded p-1 shadow-sm z-10"
+ >
+ <CopyIcon className="size-3 shrink-0" />
+ </button>
+ )}
+ <div className={cn('flex-1 min-w-0 text-sm', keyClassName)}>
+ {renderKey ? renderKey(item) : defaultRenderKey(item)}
+ </div>
+ <div
+ className={cn(
+ 'text-right text-sm font-mono truncate min-w-0 max-w-[60%]',
+ valueClassName
+ )}
+ title={stringValue}
+ >
+ {renderValue ? renderValue(item) : defaultRenderValue(item)}
+ </div>
</div>
- </div>
);
})}
diff --git a/apps/start/src/components/ui/key-value.tsx b/apps/start/src/components/ui/key-value.tsx
index 27a927dc8..4d5d46ff4 100644
--- a/apps/start/src/components/ui/key-value.tsx
+++ b/apps/start/src/components/ui/key-value.tsx
@@ -16,7 +16,7 @@ export function KeyValue({ href, onClick, name, value }: KeyValueProps) {
<Component
className={cn(
'group flex min-w-0 max-w-full divide-x self-start overflow-hidden rounded-md border border-border text-sm font-medium transition-transform',
- clickable && 'hover:-translate-y-0.5',
+ clickable && 'hover:-translate-y-0.5'
)}
{...{ href, onClick }}
>
@@ -24,7 +24,7 @@ export function KeyValue({ href, onClick, name, value }: KeyValueProps) {
<div
className={cn(
'font-mono overflow-hidden max-w-[300px] text-ellipsis whitespace-nowrap bg-card p-1 px-2 text-highlight',
- clickable && 'group-hover:underline',
+ clickable && 'group-hover:underline'
)}
>
{value}
diff --git a/apps/start/src/components/ui/popover.tsx b/apps/start/src/components/ui/popover.tsx
index 562263202..b2047620c 100644
--- a/apps/start/src/components/ui/popover.tsx
+++ b/apps/start/src/components/ui/popover.tsx
@@ -21,7 +21,7 @@ const PopoverContent = React.forwardRef<
sideOffset={sideOffset}
className={cn(
'z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
- className,
+ className
)}
style={{
boxShadow: '0 0 0 9000px rgba(0, 0, 0, 0.05)',
diff --git a/apps/start/src/components/ui/progress.tsx b/apps/start/src/components/ui/progress.tsx
index fb883408f..9bf3191e9 100644
--- a/apps/start/src/components/ui/progress.tsx
+++ b/apps/start/src/components/ui/progress.tsx
@@ -16,14 +16,14 @@ const Progress = React.forwardRef<
'relative h-4 w-full min-w-16 overflow-hidden rounded bg-def-200 shadow-sm',
size === 'sm' && 'h-2',
size === 'lg' && 'h-5',
- className,
+ className
)}
{...props}
>
<ProgressPrimitive.Indicator
className={cn(
'h-full w-full flex-1 rounded bg-primary transition-all',
- innerClassName,
+ innerClassName
)}
style={{
transform: `translateX(-${100 - (value || 0)}%)`,
diff --git a/apps/start/src/components/ui/radio-group.tsx b/apps/start/src/components/ui/radio-group.tsx
index e9c63f291..e7b95c23e 100644
--- a/apps/start/src/components/ui/radio-group.tsx
+++ b/apps/start/src/components/ui/radio-group.tsx
@@ -26,7 +26,7 @@ const RadioGroupItem = React.forwardRef<
ref={ref}
className={cn(
'aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
- className,
+ className
)}
{...props}
>
diff --git a/apps/start/src/components/ui/scroll-area.tsx b/apps/start/src/components/ui/scroll-area.tsx
index 538653c1a..31e98d78f 100644
--- a/apps/start/src/components/ui/scroll-area.tsx
+++ b/apps/start/src/components/ui/scroll-area.tsx
@@ -74,7 +74,7 @@ function ScrollBar({
'h-full w-2.5 border-l border-l-transparent',
orientation === 'horizontal' &&
'h-2.5 flex-col border-t border-t-transparent',
- className,
+ className
)}
{...props}
>
diff --git a/apps/start/src/components/ui/separator.tsx b/apps/start/src/components/ui/separator.tsx
index c6e1fff75..95c1758e9 100644
--- a/apps/start/src/components/ui/separator.tsx
+++ b/apps/start/src/components/ui/separator.tsx
@@ -16,7 +16,7 @@ function Separator({
orientation={orientation}
className={cn(
'bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px',
- className,
+ className
)}
{...props}
/>
diff --git a/apps/start/src/components/ui/sheet.tsx b/apps/start/src/components/ui/sheet.tsx
index 49b3ec631..e55c3bd13 100644
--- a/apps/start/src/components/ui/sheet.tsx
+++ b/apps/start/src/components/ui/sheet.tsx
@@ -20,7 +20,7 @@ const SheetOverlay = React.forwardRef<
<SheetPrimitive.Overlay
className={cn(
'fixed inset-0 z-50 bg-black/20 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',
- className,
+ className
)}
{...props}
ref={ref}
@@ -44,7 +44,7 @@ const sheetVariants = cva(
defaultVariants: {
side: 'right',
},
- },
+ }
);
interface SheetContentProps
@@ -86,7 +86,7 @@ const SheetHeader = ({
<div
className={cn(
'relative -m-6 mb-0 flex justify-between rounded-t-lg border-b bg-def-100 p-6',
- className,
+ className
)}
{...props}
>
@@ -104,7 +104,7 @@ const SheetFooter = ({
<div
className={cn(
'mt-auto flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2',
- className,
+ className
)}
{...props}
/>
diff --git a/apps/start/src/components/ui/slider.tsx b/apps/start/src/components/ui/slider.tsx
index da17fe728..f8ce0390a 100644
--- a/apps/start/src/components/ui/slider.tsx
+++ b/apps/start/src/components/ui/slider.tsx
@@ -18,7 +18,7 @@ function Slider({
: Array.isArray(defaultValue)
? defaultValue
: [min, max],
- [value, defaultValue, min, max],
+ [value, defaultValue, min, max]
);
return (
@@ -30,20 +30,20 @@ function Slider({
max={max}
className={cn(
'relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col',
- className,
+ className
)}
{...props}
>
<SliderPrimitive.Track
data-slot="slider-track"
className={cn(
- 'bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5',
+ 'bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5'
)}
>
<SliderPrimitive.Range
data-slot="slider-range"
className={cn(
- 'bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full',
+ 'bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full'
)}
/>
</SliderPrimitive.Track>
diff --git a/apps/start/src/components/ui/spinner.tsx b/apps/start/src/components/ui/spinner.tsx
index 2bc66809e..8dfeafff9 100644
--- a/apps/start/src/components/ui/spinner.tsx
+++ b/apps/start/src/components/ui/spinner.tsx
@@ -123,7 +123,7 @@ const Spinner = ({
ref={ref as unknown as React.RefObject<HTMLDivElement>}
className={cn(
'rounded-full bg-current animate-pulse',
- spinnerClasses,
+ spinnerClasses
)}
style={{
animationDuration:
diff --git a/apps/start/src/components/ui/switch.tsx b/apps/start/src/components/ui/switch.tsx
index 24e5b48b2..4042c7bc9 100644
--- a/apps/start/src/components/ui/switch.tsx
+++ b/apps/start/src/components/ui/switch.tsx
@@ -9,14 +9,14 @@ const Switch = React.forwardRef<
<SwitchPrimitives.Root
className={cn(
'data-[state=checked]:bg-highlight peer inline-flex h-4 w-7 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:bg-input',
- className,
+ className
)}
{...props}
ref={ref}
>
<SwitchPrimitives.Thumb
className={cn(
- 'pointer-events-none block h-3 w-3 rounded-full bg-card shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-3 data-[state=unchecked]:translate-x-0',
+ 'pointer-events-none block h-3 w-3 rounded-full bg-card shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-3 data-[state=unchecked]:translate-x-0'
)}
/>
</SwitchPrimitives.Root>
diff --git a/apps/start/src/components/ui/table.tsx b/apps/start/src/components/ui/table.tsx
index cbd7b7d6a..b1c6d25a2 100644
--- a/apps/start/src/components/ui/table.tsx
+++ b/apps/start/src/components/ui/table.tsx
@@ -57,7 +57,7 @@ function TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>) {
data-slot="table-footer"
className={cn(
'bg-muted/50 border-t font-medium [&>tr]:last:border-b-0',
- className,
+ className
)}
{...props}
/>
@@ -70,7 +70,7 @@ function TableRow({ className, ...props }: React.ComponentProps<'tr'>) {
data-slot="table-row"
className={cn(
'hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors group/row',
- className,
+ className
)}
{...props}
/>
@@ -83,7 +83,7 @@ function TableHead({ className, ...props }: React.ComponentProps<'th'>) {
data-slot="table-head"
className={cn(
'text-[10px] uppercase text-foreground h-10 px-4 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',
- className,
+ className
)}
{...props}
/>
@@ -96,7 +96,7 @@ function TableCell({ className, ...props }: React.ComponentProps<'td'>) {
data-slot="table-cell"
className={cn(
'p-2 px-4 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] max-w-94',
- className,
+ className
)}
{...props}
/>
diff --git a/apps/start/src/components/ui/tabs.tsx b/apps/start/src/components/ui/tabs.tsx
index 2b42edb73..256db3681 100644
--- a/apps/start/src/components/ui/tabs.tsx
+++ b/apps/start/src/components/ui/tabs.tsx
@@ -12,7 +12,7 @@ const TabsList = React.forwardRef<
ref={ref}
className={cn(
'inline-flex w-full h-auto items-center justify-start overflow-x-auto border-b border-border text-muted-foreground hide-scrollbar',
- className,
+ className
)}
{...props}
/>
@@ -27,7 +27,7 @@ const TabsTrigger = React.forwardRef<
ref={ref}
className={cn(
'group inline-flex items-center justify-center whitespace-nowrap px-3 py-1 font-medium text-muted-foreground transition-all border-b-2 border-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:text-foreground data-[state=active]:border-foreground',
- className,
+ className
)}
{...props}
>
@@ -46,7 +46,7 @@ const TabsContent = React.forwardRef<
ref={ref}
className={cn(
'mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',
- className,
+ className
)}
{...props}
/>
diff --git a/apps/start/src/components/ui/textarea.tsx b/apps/start/src/components/ui/textarea.tsx
index 9cab8bc52..f32c81df7 100644
--- a/apps/start/src/components/ui/textarea.tsx
+++ b/apps/start/src/components/ui/textarea.tsx
@@ -9,13 +9,13 @@ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
<textarea
className={cn(
'flex min-h-[80px] w-full rounded-md border border-input bg-card px-3 py-2 ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
- className,
+ className
)}
ref={ref}
{...props}
/>
);
- },
+ }
);
Textarea.displayName = 'Textarea';
diff --git a/apps/start/src/components/ui/toast.tsx b/apps/start/src/components/ui/toast.tsx
index de72e4fbc..2fa0cb653 100644
--- a/apps/start/src/components/ui/toast.tsx
+++ b/apps/start/src/components/ui/toast.tsx
@@ -15,7 +15,7 @@ const ToastViewport = React.forwardRef<
ref={ref}
className={cn(
'fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]',
- className,
+ className
)}
{...props}
/>
@@ -35,7 +35,7 @@ const toastVariants = cva(
defaultVariants: {
variant: 'default',
},
- },
+ }
);
const Toast = React.forwardRef<
@@ -61,7 +61,7 @@ const ToastAction = React.forwardRef<
ref={ref}
className={cn(
'inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 font-medium ring-offset-background transition-colors hover:bg-def-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive',
- className,
+ className
)}
{...props}
/>
@@ -76,7 +76,7 @@ const ToastClose = React.forwardRef<
ref={ref}
className={cn(
'absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600',
- className,
+ className
)}
toast-close=""
{...props}
diff --git a/apps/start/src/components/ui/toggle-group.tsx b/apps/start/src/components/ui/toggle-group.tsx
index 421a9b907..3a59624ae 100644
--- a/apps/start/src/components/ui/toggle-group.tsx
+++ b/apps/start/src/components/ui/toggle-group.tsx
@@ -44,7 +44,7 @@ const ToggleGroupItem = React.forwardRef<
variant: context.variant || variant,
size: context.size || size,
}),
- className,
+ className
)}
{...props}
>
diff --git a/apps/start/src/components/ui/toggle.tsx b/apps/start/src/components/ui/toggle.tsx
index cf5a487a8..e19b74619 100644
--- a/apps/start/src/components/ui/toggle.tsx
+++ b/apps/start/src/components/ui/toggle.tsx
@@ -23,7 +23,7 @@ const toggleVariants = cva(
variant: 'default',
size: 'default',
},
- },
+ }
);
const Toggle = React.forwardRef<
diff --git a/apps/start/src/components/ui/tooltip.tsx b/apps/start/src/components/ui/tooltip.tsx
index c668150ac..2dc0f1fd1 100644
--- a/apps/start/src/components/ui/tooltip.tsx
+++ b/apps/start/src/components/ui/tooltip.tsx
@@ -21,11 +21,11 @@ const TooltipContent = React.forwardRef<
sideOffset={sideOffset}
className={cn(
'z-50 rounded-md border bg-background p-4 py-2.5 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
- className,
+ className
)}
{...props}
/>
- ),
+ )
);
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
diff --git a/apps/start/src/components/widget-table.tsx b/apps/start/src/components/widget-table.tsx
index ab9c04218..808b704a2 100644
--- a/apps/start/src/components/widget-table.tsx
+++ b/apps/start/src/components/widget-table.tsx
@@ -56,7 +56,7 @@ export const WidgetTableHead = ({
<thead
className={cn(
'text-def-1000 sticky top-0 z-10 border-b border-border bg-def-100 [&_th:last-child]:text-right [&_th]:whitespace-nowrap [&_th]:p-4 [&_th]:py-2 [&_th]:text-right [&_th:first-child]:text-left [&_th]:font-medium',
- className,
+ className
)}
>
{children}
@@ -82,7 +82,7 @@ function getResponsiveClass(priority: ColumnPriority): string {
}
function getResponsiveStyle(
- priority: ColumnPriority,
+ priority: ColumnPriority
): React.CSSProperties | undefined {
if (priority === 1) {
return undefined;
@@ -120,7 +120,7 @@ export function WidgetTable<T>({
const containerId = React.useMemo(
() => `widget-table-${Math.random().toString(36).substring(7)}`,
- [],
+ []
);
// Generate CSS for container queries
@@ -139,19 +139,19 @@ export function WidgetTable<T>({
// Keep in grid flow but take up minimal space
styles.push(
`.${containerId} .cell[data-priority="${column.responsive.priority}"] { min-width: 0; max-width: 0; padding-left: 0; padding-right: 0; overflow: hidden; visibility: hidden; }`,
- `@container (min-width: ${minWidth}px) { .${containerId} .cell[data-priority="${column.responsive.priority}"] { min-width: revert; max-width: revert; padding-left: revert; padding-right: 0.5rem; overflow: revert; visibility: visible !important; } }`,
+ `@container (min-width: ${minWidth}px) { .${containerId} .cell[data-priority="${column.responsive.priority}"] { min-width: revert; max-width: revert; padding-left: revert; padding-right: 0.5rem; overflow: revert; visibility: visible !important; } }`
);
} else if (column.responsive?.minWidth !== undefined) {
styles.push(
`.${containerId} .cell[data-min-width="${column.responsive.minWidth}"] { min-width: 0; max-width: 0; padding-left: 0; padding-right: 0; overflow: hidden; visibility: hidden; }`,
- `@container (min-width: ${column.responsive.minWidth}px) { .${containerId} .cell[data-min-width="${column.responsive.minWidth}"] { min-width: revert; max-width: revert; padding-left: revert; padding-right: 0.5rem; overflow: revert; visibility: visible !important; } }`,
+ `@container (min-width: ${column.responsive.minWidth}px) { .${containerId} .cell[data-min-width="${column.responsive.minWidth}"] { min-width: revert; max-width: revert; padding-left: revert; padding-right: 0.5rem; overflow: revert; visibility: visible !important; } }`
);
}
});
// Ensure last visible cell always has padding-right
styles.push(
- `.${containerId} .cell:last-child { padding-right: 1rem !important; }`,
+ `.${containerId} .cell:last-child { padding-right: 1rem !important; }`
);
return styles.length > 0 ? <style>{styles.join('\n')}</style> : null;
@@ -200,7 +200,7 @@ export function WidgetTable<T>({
columns.length > 1 && column !== columns[0]
? 'text-right'
: 'text-left',
- responsiveClass,
+ responsiveClass
)}
style={{ width: column.width }}
{...dataAttrs}
@@ -218,7 +218,7 @@ export function WidgetTable<T>({
key={keyExtractor(item)}
className={cn(
'group/row relative border-b border-border last:border-0 h-8 overflow-hidden',
- columnClassName,
+ columnClassName
)}
>
{eachRow?.(item, index)}
@@ -237,12 +237,12 @@ export function WidgetTable<T>({
const dataAttrs: Record<string, string> = {};
if (column.responsive?.priority !== undefined) {
dataAttrs['data-priority'] = String(
- column.responsive.priority,
+ column.responsive.priority
);
}
if (column.responsive?.minWidth !== undefined) {
dataAttrs['data-min-width'] = String(
- column.responsive.minWidth,
+ column.responsive.minWidth
);
}
@@ -263,7 +263,7 @@ export function WidgetTable<T>({
: 'text-left',
column.className,
column.width === 'w-full' && 'w-full min-w-0',
- responsiveClass,
+ responsiveClass
)}
style={
column.width !== 'w-full' ? { width: column.width } : {}
diff --git a/apps/start/src/components/widget.tsx b/apps/start/src/components/widget.tsx
index f2435036d..b9bdfa246 100644
--- a/apps/start/src/components/widget.tsx
+++ b/apps/start/src/components/widget.tsx
@@ -10,7 +10,7 @@ export function WidgetHead({ children, className }: WidgetHeadProps) {
<div
className={cn(
'border-b border-border p-4 [&_.title]:whitespace-nowrap [&_.title]:font-semibold [&_.title]:text-lg',
- className,
+ className
)}
>
{children}
@@ -33,7 +33,7 @@ export function WidgetTitle({
className={cn(
'relative flex items-center gap-4',
className,
- !!Icon && 'pl-12',
+ !!Icon && 'pl-12'
)}
>
{Icon && (
diff --git a/apps/start/src/hooks/use-callback-ref.ts b/apps/start/src/hooks/use-callback-ref.ts
index ea0dd8f2d..b965cc4cc 100644
--- a/apps/start/src/hooks/use-callback-ref.ts
+++ b/apps/start/src/hooks/use-callback-ref.ts
@@ -9,7 +9,7 @@ import * as React from 'react';
* prop or avoid re-executing effects when passed as a dependency
*/
function useCallbackRef<T extends (...args: never[]) => unknown>(
- callback: T | undefined,
+ callback: T | undefined
): T {
const callbackRef = React.useRef(callback);
@@ -20,7 +20,7 @@ function useCallbackRef<T extends (...args: never[]) => unknown>(
// https://github.com/facebook/react/issues/19240
return React.useMemo(
() => ((...args) => callbackRef.current?.(...args)) as T,
- [],
+ []
);
}
diff --git a/apps/start/src/hooks/use-cohorts.ts b/apps/start/src/hooks/use-cohorts.ts
index c7a53c0a7..f9bfa48e6 100644
--- a/apps/start/src/hooks/use-cohorts.ts
+++ b/apps/start/src/hooks/use-cohorts.ts
@@ -3,7 +3,7 @@ import { useQuery } from '@tanstack/react-query';
export function useCohorts(
params: { projectId: string; includeCount?: boolean },
- options?: { enabled?: boolean },
+ options?: { enabled?: boolean }
) {
const trpc = useTRPC();
const query = useQuery(
@@ -12,7 +12,7 @@ export function useCohorts(
!!params.projectId && typeof options?.enabled !== 'undefined'
? options.enabled
: true,
- }),
+ })
);
return query.data ?? [];
}
diff --git a/apps/start/src/hooks/use-conversion-rechart-data-model.ts b/apps/start/src/hooks/use-conversion-rechart-data-model.ts
index 0f09230c0..5b7695d6b 100644
--- a/apps/start/src/hooks/use-conversion-rechart-data-model.ts
+++ b/apps/start/src/hooks/use-conversion-rechart-data-model.ts
@@ -2,7 +2,7 @@ import type { RouterOutputs } from '@/trpc/client';
import { useMemo } from 'react';
export function useConversionRechartDataModel(
- series: RouterOutputs['chart']['conversion']['current'],
+ series: RouterOutputs['chart']['conversion']['current']
) {
return useMemo(() => {
if (!series.length || !series[0]?.data.length) {
@@ -41,4 +41,3 @@ export function useConversionRechartDataModel(
});
}, [series]);
}
-
diff --git a/apps/start/src/hooks/use-dashed-stroke.tsx b/apps/start/src/hooks/use-dashed-stroke.tsx
index 6ef9cf4cc..2719a0a07 100644
--- a/apps/start/src/hooks/use-dashed-stroke.tsx
+++ b/apps/start/src/hooks/use-dashed-stroke.tsx
@@ -157,7 +157,7 @@ export function useStrokeDasharray({
const gapDashWidth = targetRestStroke?.[0] + targetRestStroke?.[1] || 1;
const restDasharrayLength = dashedWidth / gapDashWidth;
const restDasharray = new Array(Math.ceil(restDasharrayLength)).fill(
- targetRestStroke.join(' '),
+ targetRestStroke.join(' ')
);
const strokeDasharray = `${firstDasharray} ${restDasharray.join(' ')}`;
@@ -177,7 +177,7 @@ export function useStrokeDasharray({
return null;
},
- [dotIndex],
+ [dotIndex]
);
return [calculateStrokeDasharray, linesStrokeDasharray.current];
diff --git a/apps/start/src/hooks/use-debounce-state.ts b/apps/start/src/hooks/use-debounce-state.ts
index bed71192f..70a4055d1 100644
--- a/apps/start/src/hooks/use-debounce-state.ts
+++ b/apps/start/src/hooks/use-debounce-state.ts
@@ -10,13 +10,13 @@ interface DebouncedState<T> {
export function useDebounceState<T>(
initialValue: T,
delay = 500,
- options?: Parameters<typeof debounce>[2],
+ options?: Parameters<typeof debounce>[2]
): DebouncedState<T> {
const [value, setValue] = useState<T>(initialValue);
const [debouncedValue, _setDebouncedValue] = useState<T>(initialValue);
const setDebouncedValue = useMemo(
() => debounce(_setDebouncedValue, delay, options),
- [],
+ []
);
useEffect(() => {
setDebouncedValue(value);
diff --git a/apps/start/src/hooks/use-debounced-callback.ts b/apps/start/src/hooks/use-debounced-callback.ts
index 8f5ef5f52..e31c23d7b 100644
--- a/apps/start/src/hooks/use-debounced-callback.ts
+++ b/apps/start/src/hooks/use-debounced-callback.ts
@@ -4,13 +4,13 @@ import { useCallbackRef } from '@/hooks/use-callback-ref';
export function useDebouncedCallback<T extends (...args: never[]) => unknown>(
callback: T,
- delay: number,
+ delay: number
) {
const handleCallback = useCallbackRef(callback);
const debounceTimerRef = React.useRef(0);
React.useEffect(
() => () => window.clearTimeout(debounceTimerRef.current),
- [],
+ []
);
const setValue = React.useCallback(
@@ -18,10 +18,10 @@ export function useDebouncedCallback<T extends (...args: never[]) => unknown>(
window.clearTimeout(debounceTimerRef.current);
debounceTimerRef.current = window.setTimeout(
() => handleCallback(...args),
- delay,
+ delay
);
},
- [handleCallback, delay],
+ [handleCallback, delay]
);
return setValue;
diff --git a/apps/start/src/hooks/use-event-names.ts b/apps/start/src/hooks/use-event-names.ts
index d0527c866..d962aac85 100644
--- a/apps/start/src/hooks/use-event-names.ts
+++ b/apps/start/src/hooks/use-event-names.ts
@@ -12,9 +12,9 @@ export function useEventNames(params: {
trpc.chart.events.queryOptions(input, {
enabled: enabled !== false && !!params.projectId,
staleTime: 1000 * 60 * 10,
- }),
+ })
);
return (query.data ?? []).filter((event) =>
- (params.anyEvents ?? true) ? true : event.name !== '*',
+ (params.anyEvents ?? true) ? true : event.name !== '*'
);
}
diff --git a/apps/start/src/hooks/use-event-properties.ts b/apps/start/src/hooks/use-event-properties.ts
index 75e42c2f0..02ae23b62 100644
--- a/apps/start/src/hooks/use-event-properties.ts
+++ b/apps/start/src/hooks/use-event-properties.ts
@@ -6,7 +6,7 @@ export function useEventProperties(
params: RouterInputs['chart']['properties'],
options?: {
enabled: boolean;
- },
+ }
) {
const trpc = useTRPC();
const query = useQuery(
@@ -15,7 +15,7 @@ export function useEventProperties(
!!params.projectId && typeof options?.enabled !== 'undefined'
? options.enabled
: true,
- }),
+ })
);
return query.data ?? [];
}
diff --git a/apps/start/src/hooks/use-logout.ts b/apps/start/src/hooks/use-logout.ts
index 9fd38e578..0952ed938 100644
--- a/apps/start/src/hooks/use-logout.ts
+++ b/apps/start/src/hooks/use-logout.ts
@@ -8,7 +8,7 @@ export function useLogout() {
onSuccess() {
window.location.href = '/';
},
- }),
+ })
);
return signOut;
}
diff --git a/apps/start/src/hooks/use-numer-formatter.ts b/apps/start/src/hooks/use-numer-formatter.ts
index 45fa485e9..b5eba167d 100644
--- a/apps/start/src/hooks/use-numer-formatter.ts
+++ b/apps/start/src/hooks/use-numer-formatter.ts
@@ -38,7 +38,7 @@ export const formatCurrency =
options?: {
currency?: string;
short?: boolean;
- },
+ }
) => {
const short = options?.short ?? false;
const currency = options?.currency ?? 'USD';
@@ -91,7 +91,7 @@ export function useNumber() {
},
formatWithUnit: (
value: number | null | undefined,
- unit?: string | null,
+ unit?: string | null
) => {
if (isNil(value)) {
return 'N/A';
diff --git a/apps/start/src/hooks/use-profile-properties.ts b/apps/start/src/hooks/use-profile-properties.ts
index 6867eb288..1f8cb1bb9 100644
--- a/apps/start/src/hooks/use-profile-properties.ts
+++ b/apps/start/src/hooks/use-profile-properties.ts
@@ -6,7 +6,7 @@ export function useProfileProperties(projectId: string) {
const query = useQuery(
trpc.profile.properties.queryOptions({
projectId,
- }),
+ })
);
return query.data ?? [];
}
diff --git a/apps/start/src/hooks/use-profile-values.ts b/apps/start/src/hooks/use-profile-values.ts
index 71e3feb07..398d0fec8 100644
--- a/apps/start/src/hooks/use-profile-values.ts
+++ b/apps/start/src/hooks/use-profile-values.ts
@@ -7,7 +7,7 @@ export function useProfileValues(projectId: string, property: string) {
trpc.profile.values.queryOptions({
projectId: projectId,
property,
- }),
+ })
);
return query.data?.values ?? [];
}
diff --git a/apps/start/src/hooks/use-rechart-data-model.ts b/apps/start/src/hooks/use-rechart-data-model.ts
index 320b8d324..ba8f069f6 100644
--- a/apps/start/src/hooks/use-rechart-data-model.ts
+++ b/apps/start/src/hooks/use-rechart-data-model.ts
@@ -43,7 +43,7 @@ export function useRechartDataModel(series: IChartData['series']) {
}
return acc2;
},
- {} as Record<string, any>,
+ {} as Record<string, any>
),
};
}, {}),
diff --git a/apps/start/src/hooks/use-resizable-drawer.ts b/apps/start/src/hooks/use-resizable-drawer.ts
index 3717622d3..8f880be55 100644
--- a/apps/start/src/hooks/use-resizable-drawer.ts
+++ b/apps/start/src/hooks/use-resizable-drawer.ts
@@ -72,7 +72,7 @@ export function useResizableDrawer({
: ev.clientX - dragRef.current.startX;
const next = Math.min(
maxWidth,
- Math.max(minWidth, dragRef.current.startWidth + dx),
+ Math.max(minWidth, dragRef.current.startWidth + dx)
);
setWidth(next);
};
@@ -90,7 +90,7 @@ export function useResizableDrawer({
window.addEventListener('mousemove', onMove);
window.addEventListener('mouseup', onUp);
},
- [width, minWidth, maxWidth, edge],
+ [width, minWidth, maxWidth, edge]
);
return {
diff --git a/apps/start/src/hooks/use-throttle.ts b/apps/start/src/hooks/use-throttle.ts
index 0a89a3242..06ab06c19 100644
--- a/apps/start/src/hooks/use-throttle.ts
+++ b/apps/start/src/hooks/use-throttle.ts
@@ -10,6 +10,6 @@ export function useThrottle(cb: () => void, delay: number) {
});
return useCallback(
throttle(() => cbRef.current(), delay, options),
- [delay],
+ [delay]
);
}
diff --git a/apps/start/src/hooks/use-visible-conversion-series.ts b/apps/start/src/hooks/use-visible-conversion-series.ts
index b3d891f27..1c888e198 100644
--- a/apps/start/src/hooks/use-visible-conversion-series.ts
+++ b/apps/start/src/hooks/use-visible-conversion-series.ts
@@ -11,7 +11,7 @@ export function useVisibleConversionSeries(
limit?: number;
savedVisibleSeries?: string[] | null;
onVisibleSeriesChange?: (ids: string[]) => void;
- },
+ }
) {
const max = options?.limit ?? 5;
const savedVisibleSeries = options?.savedVisibleSeries;
@@ -22,11 +22,11 @@ export function useVisibleConversionSeries(
const seriesKey = data?.current?.map((s) => s.id).join(',') ?? '';
const resolveIds = (
- series: RouterOutputs['chart']['conversion']['current'],
+ series: RouterOutputs['chart']['conversion']['current']
): string[] => {
if (savedVisibleSeries && savedVisibleSeries.length > 0) {
const valid = savedVisibleSeries.filter((id) =>
- series.some((s) => s.id === id),
+ series.some((s) => s.id === id)
);
if (valid.length > 0) return valid;
}
@@ -34,7 +34,7 @@ export function useVisibleConversionSeries(
};
const [visibleSeries, setVisibleSeries] = useState<string[]>(() =>
- resolveIds(data?.current ?? []),
+ resolveIds(data?.current ?? [])
);
const prevKeyRef = useRef(seriesKey);
@@ -51,7 +51,7 @@ export function useVisibleConversionSeries(
return next;
});
},
- [],
+ []
);
return useMemo(
@@ -61,6 +61,6 @@ export function useVisibleConversionSeries(
.filter((serie) => visibleSeries.includes(serie.id)),
setVisibleSeries: handleSet,
}),
- [visibleSeries, data.current, handleSet],
+ [visibleSeries, data.current, handleSet]
);
}
diff --git a/apps/start/src/hooks/use-visible-funnel-breakdowns.ts b/apps/start/src/hooks/use-visible-funnel-breakdowns.ts
index 86c072b76..7f47cddcc 100644
--- a/apps/start/src/hooks/use-visible-funnel-breakdowns.ts
+++ b/apps/start/src/hooks/use-visible-funnel-breakdowns.ts
@@ -11,7 +11,7 @@ export function useVisibleFunnelBreakdowns(
limit?: number;
savedVisibleSeries?: string[] | null;
onVisibleSeriesChange?: (ids: string[]) => void;
- },
+ }
) {
const max = options?.limit ?? 10;
const savedVisibleSeries = options?.savedVisibleSeries;
@@ -22,11 +22,11 @@ export function useVisibleFunnelBreakdowns(
const seriesKey = data?.map((s) => s.id).join(',') ?? '';
const resolveIds = (
- items: RouterOutputs['chart']['funnel']['current'],
+ items: RouterOutputs['chart']['funnel']['current']
): string[] => {
if (savedVisibleSeries && savedVisibleSeries.length > 0) {
const valid = savedVisibleSeries.filter((id) =>
- items.some((s) => s.id === id),
+ items.some((s) => s.id === id)
);
if (valid.length > 0) return valid;
}
@@ -34,7 +34,7 @@ export function useVisibleFunnelBreakdowns(
};
const [visibleSeries, setVisibleSeries] = useState<string[]>(() =>
- resolveIds(data ?? []),
+ resolveIds(data ?? [])
);
const prevKeyRef = useRef(seriesKey);
@@ -51,7 +51,7 @@ export function useVisibleFunnelBreakdowns(
return next;
});
},
- [],
+ []
);
return useMemo(
@@ -61,6 +61,6 @@ export function useVisibleFunnelBreakdowns(
.filter((item) => visibleSeries.includes(item.id)),
setVisibleSeries: handleSet,
}),
- [visibleSeries, data, handleSet],
+ [visibleSeries, data, handleSet]
);
}
diff --git a/apps/start/src/hooks/use-visible-series.ts b/apps/start/src/hooks/use-visible-series.ts
index 07935d3f6..adee7eecd 100644
--- a/apps/start/src/hooks/use-visible-series.ts
+++ b/apps/start/src/hooks/use-visible-series.ts
@@ -9,7 +9,7 @@ export function useVisibleSeries(
limit?: number;
savedVisibleSeries?: string[] | null;
onVisibleSeriesChange?: (ids: string[]) => void;
- },
+ }
) {
const max = options?.limit ?? 5;
const savedVisibleSeries = options?.savedVisibleSeries;
@@ -24,7 +24,7 @@ export function useVisibleSeries(
const resolveIds = (series: IChartData['series']): string[] => {
if (savedVisibleSeries && savedVisibleSeries.length > 0) {
const valid = savedVisibleSeries.filter((id) =>
- series.some((s) => s.id === id),
+ series.some((s) => s.id === id)
);
if (valid.length > 0) return valid;
}
@@ -32,7 +32,7 @@ export function useVisibleSeries(
};
const [visibleSeries, setVisibleSeries] = useState<string[]>(() =>
- resolveIds(data?.series ?? []),
+ resolveIds(data?.series ?? [])
);
// Reset only when the actual series IDs change (breakdowns/events changed),
@@ -53,7 +53,7 @@ export function useVisibleSeries(
return next;
});
},
- [],
+ []
);
return useMemo(
@@ -63,6 +63,6 @@ export function useVisibleSeries(
.filter((serie) => visibleSeries.includes(serie.id)),
setVisibleSeries: handleSet,
}),
- [visibleSeries, data.series, handleSet],
+ [visibleSeries, data.series, handleSet]
);
}
diff --git a/apps/start/src/lib/utils.ts b/apps/start/src/lib/utils.ts
index 365058ceb..9ad0df426 100644
--- a/apps/start/src/lib/utils.ts
+++ b/apps/start/src/lib/utils.ts
@@ -1,5 +1,5 @@
-import { type ClassValue, clsx } from "clsx";
-import { twMerge } from "tailwind-merge";
+import { type ClassValue, clsx } from 'clsx';
+import { twMerge } from 'tailwind-merge';
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
diff --git a/apps/start/src/modals/Modal/scrollable-modal.tsx b/apps/start/src/modals/Modal/scrollable-modal.tsx
index 47edc57ba..53e48783b 100644
--- a/apps/start/src/modals/Modal/scrollable-modal.tsx
+++ b/apps/start/src/modals/Modal/scrollable-modal.tsx
@@ -32,7 +32,7 @@ export function ScrollableModal({
className={cn(
'flex-1 min-h-0 w-full',
footer && 'border-b',
- header && 'border-t',
+ header && 'border-t'
)}
>
{children}
diff --git a/apps/start/src/modals/add-client.tsx b/apps/start/src/modals/add-client.tsx
index d4db66a4d..b0114b050 100644
--- a/apps/start/src/modals/add-client.tsx
+++ b/apps/start/src/modals/add-client.tsx
@@ -42,14 +42,14 @@ export default function AddClient() {
onSuccess() {
toast.success('Client created successfully');
queryClient.invalidateQueries(
- trpc.project.getProjectWithClients.pathFilter(),
+ trpc.project.getProjectWithClients.pathFilter()
);
queryClient.invalidateQueries(
- trpc.client.list.queryFilter({ projectId }),
+ trpc.client.list.queryFilter({ projectId })
);
},
onError: handleError,
- }),
+ })
);
const onSubmit: SubmitHandler<IForm> = (values) => {
diff --git a/apps/start/src/modals/add-dashboard.tsx b/apps/start/src/modals/add-dashboard.tsx
index bf8b6c108..bb68b6117 100644
--- a/apps/start/src/modals/add-dashboard.tsx
+++ b/apps/start/src/modals/add-dashboard.tsx
@@ -51,7 +51,7 @@ export default function AddDashboard() {
popModal();
},
onError: handleError,
- }),
+ })
);
return (
diff --git a/apps/start/src/modals/confirm-delete-account.tsx b/apps/start/src/modals/confirm-delete-account.tsx
index 473a69d44..f7334da17 100644
--- a/apps/start/src/modals/confirm-delete-account.tsx
+++ b/apps/start/src/modals/confirm-delete-account.tsx
@@ -22,7 +22,7 @@ export default function ConfirmDeleteAccount() {
// The session is now gone server-side; send the user back to the start.
window.location.href = '/';
},
- }),
+ })
);
const canDelete = confirmation.trim() === CONFIRMATION;
diff --git a/apps/start/src/modals/confirm-delete-organization.tsx b/apps/start/src/modals/confirm-delete-organization.tsx
index a847f9ed4..e4974aeb9 100644
--- a/apps/start/src/modals/confirm-delete-organization.tsx
+++ b/apps/start/src/modals/confirm-delete-organization.tsx
@@ -27,11 +27,11 @@ export default function ConfirmDeleteOrganization({
onSuccess: () => {
toast.success('Organization scheduled for deletion');
queryClient.invalidateQueries(
- trpc.organization.get.queryFilter({ organizationId }),
+ trpc.organization.get.queryFilter({ organizationId })
);
popModal();
},
- }),
+ })
);
const canDelete = confirmation.trim() === organizationName.trim();
diff --git a/apps/start/src/modals/date-time-picker.tsx b/apps/start/src/modals/date-time-picker.tsx
index 94de220a8..9c77710c2 100644
--- a/apps/start/src/modals/date-time-picker.tsx
+++ b/apps/start/src/modals/date-time-picker.tsx
@@ -48,7 +48,7 @@ export default function DateTimePicker({
}: Props) {
const scrollRef = useRef<HTMLDivElement>(null);
const [selectedDate, setSelectedDate] = useState<Date>(
- roundToNearestFiveMinutes(initialDate || new Date()),
+ roundToNearestFiveMinutes(initialDate || new Date())
);
// Generate all time options with 5-minute intervals
@@ -96,7 +96,7 @@ export default function DateTimePicker({
const scrollContainer = scrollRef.current;
const buttonIndex = timeOptions.findIndex(
- (time) => time.value === currentTimeValue,
+ (time) => time.value === currentTimeValue
);
const calculatedScrollTo =
Math.max(0, buttonIndex - 4) * (buttonSize + buttonMargin) +
@@ -156,7 +156,7 @@ export default function DateTimePicker({
'w-full mb-0.5 h-8 text-xs font-mono transition-all duration-200 justify-start',
currentTimeValue === time.value
? 'bg-primary text-primary-foreground shadow-sm'
- : 'hover:bg-muted',
+ : 'hover:bg-muted'
)}
onClick={() => handleTimeSelect(time.value)}
>
diff --git a/apps/start/src/modals/edit-client.tsx b/apps/start/src/modals/edit-client.tsx
index c039eb391..7ea3455cb 100644
--- a/apps/start/src/modals/edit-client.tsx
+++ b/apps/start/src/modals/edit-client.tsx
@@ -47,7 +47,7 @@ export default function EditClient({ id, name }: EditClientProps) {
popModal();
queryClient.invalidateQueries(trpc.client.list.pathFilter());
},
- }),
+ })
);
return (
diff --git a/apps/start/src/modals/edit-dashboard.tsx b/apps/start/src/modals/edit-dashboard.tsx
index 8131fc301..2d9600fad 100644
--- a/apps/start/src/modals/edit-dashboard.tsx
+++ b/apps/start/src/modals/edit-dashboard.tsx
@@ -45,7 +45,7 @@ export default function EditDashboard({ id, name }: EditDashboardProps) {
popModal();
queryClient.invalidateQueries(trpc.dashboard.list.pathFilter());
},
- }),
+ })
);
return (
diff --git a/apps/start/src/modals/edit-event.tsx b/apps/start/src/modals/edit-event.tsx
index be2a4d82f..6aaad4d86 100644
--- a/apps/start/src/modals/edit-event.tsx
+++ b/apps/start/src/modals/edit-event.tsx
@@ -31,7 +31,7 @@ export default function EditEvent({ id }: Props) {
const client = useQueryClient();
const { data: event } = useQuery(
- trpc.event.byId.queryOptions({ id, projectId }),
+ trpc.event.byId.queryOptions({ id, projectId })
);
const [selectedIcon, setIcon] = useState<string | null>(null);
@@ -59,7 +59,7 @@ export default function EditEvent({ id }: Props) {
client.invalidateQueries(trpc.event.pathFilter());
popModal();
},
- }),
+ })
);
const getBg = (color: string) => `bg-${color}-200`;
const getText = (color: string) => `text-${color}-700`;
@@ -116,7 +116,7 @@ export default function EditEvent({ id }: Props) {
<div className={iconGrid}>
{Object.entries(EventIconMapper)
.filter(([name]) =>
- name.toLowerCase().includes(search.toLowerCase()),
+ name.toLowerCase().includes(search.toLowerCase())
)
.map(([name, Icon]) => (
<button
@@ -130,7 +130,7 @@ export default function EditEvent({ id }: Props) {
'inline-flex h-8 w-8 flex-shrink-0 cursor-pointer items-center justify-center rounded-md bg-def-200 transition-all',
name === selectedIcon
? 'scale-110 ring-1 ring-black'
- : '[&_svg]:opacity-50',
+ : '[&_svg]:opacity-50'
)}
>
<Icon size={16} />
@@ -167,7 +167,7 @@ export default function EditEvent({ id }: Props) {
className={cn(
'flex h-8 w-8 flex-shrink-0 cursor-pointer items-center justify-center rounded-md transition-all',
color === selectedColor ? 'ring-1 ring-black' : '',
- getBg(color),
+ getBg(color)
)}
>
{SelectedIcon ? (
diff --git a/apps/start/src/modals/edit-reference.tsx b/apps/start/src/modals/edit-reference.tsx
index ad2a18d2e..315c83f11 100644
--- a/apps/start/src/modals/edit-reference.tsx
+++ b/apps/start/src/modals/edit-reference.tsx
@@ -53,15 +53,15 @@ export default function EditReference({
toast('Success', { description: 'Reference updated.' });
reset();
queryClient.invalidateQueries(
- trpc.reference.getReferences.pathFilter(),
+ trpc.reference.getReferences.pathFilter()
);
queryClient.invalidateQueries(
- trpc.reference.getChartReferences.pathFilter(),
+ trpc.reference.getChartReferences.pathFilter()
);
popModal();
},
onError: handleError,
- }),
+ })
);
return (
diff --git a/apps/start/src/modals/event-details.tsx b/apps/start/src/modals/event-details.tsx
index fe07643de..1ced77b7f 100644
--- a/apps/start/src/modals/event-details.tsx
+++ b/apps/start/src/modals/event-details.tsx
@@ -78,7 +78,9 @@ function EventDetailsContent({ id, createdAt, projectId }: Props) {
},
};
const [widget, setWidget] = useState(TABS.essentials);
- const [propertiesMode, setPropertiesMode] = useState<'table' | 'json'>('table');
+ const [propertiesMode, setPropertiesMode] = useState<'table' | 'json'>(
+ 'table'
+ );
const trpc = useTRPC();
const query = useSuspenseQuery(
trpc.event.details.queryOptions({
@@ -285,24 +287,27 @@ function EventDetailsContent({ id, createdAt, projectId }: Props) {
</button>
</div>
{propertiesMode === 'table' && (
- <KeyValueGrid
- columns={1}
- copyable
- data={properties}
- onItemClick={(item) => {
- popModal();
- setFilter(`properties.${item.name}`, item.value as any);
- }}
- renderValue={(item) => (
- <div className="flex items-center gap-2">
- <span className="font-mono">{String(item.value)}</span>
- <FilterIcon className="size-3 shrink-0" />
- </div>
- )}
- />
+ <KeyValueGrid
+ columns={1}
+ copyable
+ data={properties}
+ onItemClick={(item) => {
+ popModal();
+ setFilter(`properties.${item.name}`, item.value as any);
+ }}
+ renderValue={(item) => (
+ <div className="flex items-center gap-2">
+ <span className="font-mono">{String(item.value)}</span>
+ <FilterIcon className="size-3 shrink-0" />
+ </div>
+ )}
+ />
)}
{propertiesMode === 'json' && (
- <Syntax code={JSON.stringify(properties, null, 2)} language="json" />
+ <Syntax
+ code={JSON.stringify(properties, null, 2)}
+ language="json"
+ />
)}
</section>
)}
diff --git a/apps/start/src/modals/move-report.tsx b/apps/start/src/modals/move-report.tsx
index 0e9acfb6e..333d782a4 100644
--- a/apps/start/src/modals/move-report.tsx
+++ b/apps/start/src/modals/move-report.tsx
@@ -23,10 +23,7 @@ const validator = z.object({
type IForm = z.infer<typeof validator>;
-export default function MoveReport({
- reportId,
- dashboardId,
-}: MoveReportProps) {
+export default function MoveReport({ reportId, dashboardId }: MoveReportProps) {
const queryClient = useQueryClient();
const { projectId } = useAppParams();
@@ -40,7 +37,7 @@ export default function MoveReport({
toast('Report moved');
popModal();
},
- }),
+ })
);
const { handleSubmit, formState, control } = useForm<IForm>({
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.cohorts.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.cohorts.tsx
index 25e4d9ebb..2e0f78bcc 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.cohorts.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.cohorts.tsx
@@ -24,7 +24,7 @@ import {
import { toast } from 'sonner';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/cohorts',
+ '/_app/$organizationId/$projectId/cohorts'
)({
component: Component,
head: () => ({
@@ -35,7 +35,7 @@ export const Route = createFileRoute(
context.trpc.cohort.list.queryOptions({
projectId: params.projectId,
includeCount: true,
- }),
+ })
);
},
pendingComponent: FullPageLoadingState,
@@ -48,7 +48,7 @@ function Component() {
trpc.cohort.list.queryOptions({
projectId,
includeCount: true,
- }),
+ })
);
const cohorts = query.data ?? [];
@@ -59,7 +59,7 @@ function Component() {
query.refetch();
toast('Success', { description: 'Cohort deleted.' });
},
- }),
+ })
);
const refresh = useMutation(
@@ -69,7 +69,7 @@ function Component() {
query.refetch();
toast('Success', { description: 'Cohort refresh queued.' });
},
- }),
+ })
);
const queryClient = useQueryClient();
@@ -77,7 +77,7 @@ function Component() {
async function handleDownload(cohortId: string, cohortName: string) {
try {
const result = await queryClient.fetchQuery(
- trpc.cohort.exportProfiles.queryOptions({ cohortId }),
+ trpc.cohort.exportProfiles.queryOptions({ cohortId })
);
const csv = cohortMembersToCSV(result.profileIds);
downloadCSV(csv, `${cohortName}-members.csv`);
@@ -117,7 +117,9 @@ function Component() {
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3">
{cohorts.map((cohort) => {
const count =
- 'currentCount' in cohort ? cohort.currentCount : cohort.profileCount;
+ 'currentCount' in cohort
+ ? cohort.currentCount
+ : cohort.profileCount;
const displayCount = count ?? 0;
return (
<Card key={cohort.id} hover>
@@ -143,8 +145,7 @@ function Component() {
</div>
{cohort.lastComputedAt && (
<div className={cn('text-xs')}>
- Updated{' '}
- {format(cohort.lastComputedAt, 'MMM d, HH:mm')}
+ Updated {format(cohort.lastComputedAt, 'MMM d, HH:mm')}
</div>
)}
</div>
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.cohorts_.$cohortId._tabs.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.cohorts_.$cohortId._tabs.tsx
index 4be8fcbba..0e570d56b 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.cohorts_.$cohortId._tabs.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.cohorts_.$cohortId._tabs.tsx
@@ -124,11 +124,7 @@ function Component() {
<PageHeader
actions={
<div className="row gap-2">
- <Button
- onClick={handleDownload}
- size="sm"
- variant="outline"
- >
+ <Button onClick={handleDownload} size="sm" variant="outline">
<DownloadIcon className="mr-2 size-4" />
Download
</Button>
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.dashboards.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.dashboards.tsx
index ec217388e..e83c64a7d 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.dashboards.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.dashboards.tsx
@@ -33,7 +33,7 @@ import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
import { Link, createFileRoute } from '@tanstack/react-router';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/dashboards',
+ '/_app/$organizationId/$projectId/dashboards'
)({
component: Component,
head: () => {
@@ -49,7 +49,7 @@ export const Route = createFileRoute(
await context.queryClient.prefetchQuery(
context.trpc.dashboard.list.queryOptions({
projectId: params.projectId,
- }),
+ })
);
},
pendingComponent: FullPageLoadingState,
@@ -62,7 +62,7 @@ function Component() {
const query = useQuery(
trpc.dashboard.list.queryOptions({
projectId,
- }),
+ })
);
const dashboards = query.data ?? [];
const deletion = useMutation(
@@ -87,7 +87,7 @@ function Component() {
description: 'Dashboard deleted.',
});
},
- }),
+ })
);
if (dashboards.length === 0) {
@@ -122,7 +122,7 @@ function Component() {
{dashboards.map((item) => {
const visibleReports = item.reports.slice(
0,
- item.reports.length > 6 ? 5 : 6,
+ item.reports.length > 6 ? 5 : 6
);
return (
<Card key={item.id} hover>
@@ -141,7 +141,7 @@ function Component() {
<div
className={cn(
'mt-4 grid gap-2',
- 'grid-cols-1 @sm:grid-cols-2',
+ 'grid-cols-1 @sm:grid-cols-2'
)}
>
{visibleReports.map((report) => {
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.dashboards_.$dashboardId.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.dashboards_.$dashboardId.tsx
index b3c18d3ac..ea5f992d8 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.dashboards_.$dashboardId.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.dashboards_.$dashboardId.tsx
@@ -43,7 +43,7 @@ import { createFileRoute, useRouter } from '@tanstack/react-router';
import { useCallback, useEffect, useMemo, useState } from 'react';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/dashboards_/$dashboardId',
+ '/_app/$organizationId/$projectId/dashboards_/$dashboardId'
)({
component: Component,
head: () => {
@@ -61,23 +61,23 @@ export const Route = createFileRoute(
context.trpc.dashboard.byId.queryOptions({
id: params.dashboardId,
projectId: params.projectId,
- }),
+ })
),
context.queryClient.prefetchQuery(
context.trpc.report.list.queryOptions({
dashboardId: params.dashboardId,
projectId: params.projectId,
- }),
+ })
),
context.queryClient.prefetchQuery(
context.trpc.project.getProjectWithClients.queryOptions({
projectId: params.projectId,
- }),
+ })
),
context.queryClient.prefetchQuery(
context.trpc.organization.get.queryOptions({
organizationId: params.organizationId,
- }),
+ })
),
]);
},
@@ -95,14 +95,14 @@ function Component() {
trpc.dashboard.byId.queryOptions({
id: dashboardId,
projectId,
- }),
+ })
);
const reportsQuery = useQuery(
trpc.report.list.queryOptions({
dashboardId,
projectId,
- }),
+ })
);
const dashboardDeletion = useMutation(
@@ -119,7 +119,7 @@ function Component() {
},
});
},
- }),
+ })
);
const reports = reportsQuery.data ?? [];
@@ -155,7 +155,7 @@ function Component() {
reportsQuery.refetch();
toast('Report deleted');
},
- }),
+ })
);
const reportDuplicate = useMutation(
@@ -166,7 +166,7 @@ function Component() {
reportsQuery.refetch();
toast('Report duplicated');
},
- }),
+ })
);
const updateLayout = useMutation(
@@ -176,7 +176,7 @@ function Component() {
// Silently refetch reports (which includes layouts)
reportsQuery.refetch();
},
- }),
+ })
);
const resetLayout = useMutation(
@@ -186,7 +186,7 @@ function Component() {
toast('Layout reset to default');
reportsQuery.refetch();
},
- }),
+ })
);
// Convert reports to grid layout format for all breakpoints
@@ -202,7 +202,7 @@ function Component() {
chartType: r.chartType,
})),
}),
- [dashboard?.name, reports],
+ [dashboard?.name, reports]
);
useDashboardPageContext(dashboardId, dashboardPrimer);
@@ -241,7 +241,7 @@ function Component() {
}
});
},
- [reports, updateLayout],
+ [reports, updateLayout]
);
const handleResizeStop = useCallback(
@@ -274,7 +274,7 @@ function Component() {
}
});
},
- [reports, updateLayout],
+ [reports, updateLayout]
);
if (!dashboard) {
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.conversions.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.conversions.tsx
index 05a844ea8..8a813b42d 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.conversions.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.conversions.tsx
@@ -7,7 +7,7 @@ import { createFileRoute } from '@tanstack/react-router';
import { parseAsIsoDateTime, useQueryState } from 'nuqs';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/events/_tabs/conversions',
+ '/_app/$organizationId/$projectId/events/_tabs/conversions'
)({
component: Component,
});
@@ -17,7 +17,7 @@ function Component() {
const trpc = useTRPC();
const [startDate, setStartDate] = useQueryState(
'startDate',
- parseAsIsoDateTime,
+ parseAsIsoDateTime
);
const [endDate, setEndDate] = useQueryState('endDate', parseAsIsoDateTime);
const [eventNames] = useEventQueryNamesFilter();
@@ -33,8 +33,8 @@ function Component() {
},
{
getNextPageParam: (lastPage) => lastPage.meta.next,
- },
- ),
+ }
+ )
);
return <EventsTable query={query} />;
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.events.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.events.tsx
index a9ab7694c..4b34ccd9b 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.events.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.events.tsx
@@ -10,7 +10,7 @@ import { createFileRoute } from '@tanstack/react-router';
import { parseAsIsoDateTime, useQueryState } from 'nuqs';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/events/_tabs/events',
+ '/_app/$organizationId/$projectId/events/_tabs/events'
)({
component: Component,
});
@@ -38,8 +38,8 @@ function Component() {
{
enabled: columnVisibility !== null,
getNextPageParam: (lastPage) => lastPage.meta.next,
- },
- ),
+ }
+ )
);
return <EventsTable query={query} showEventListener />;
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.index.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.index.tsx
index a2c1203fa..81ac05dc8 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.index.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.index.tsx
@@ -1,7 +1,7 @@
import { createFileRoute, redirect } from '@tanstack/react-router';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/events/_tabs/',
+ '/_app/$organizationId/$projectId/events/_tabs/'
)({
component: Component,
beforeLoad({ params }) {
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.stats.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.stats.tsx
index c2570dfb9..a442a4f4a 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.stats.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.stats.tsx
@@ -14,7 +14,7 @@ import type { IChartEventItem } from '@openpanel/core/modules/report/report.cons
import { createFileRoute } from '@tanstack/react-router';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/events/_tabs/stats',
+ '/_app/$organizationId/$projectId/events/_tabs/stats'
)({
component: Component,
});
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.tsx
index 9069ea50c..fb1acb1f6 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.events._tabs.tsx
@@ -6,7 +6,7 @@ import { PAGE_TITLES, createProjectTitle } from '@/utils/title';
import { Outlet, createFileRoute, useRouter } from '@tanstack/react-router';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/events/_tabs',
+ '/_app/$organizationId/$projectId/events/_tabs'
)({
component: Component,
head: () => {
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.groups_.$groupId._tabs.index.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.groups_.$groupId._tabs.index.tsx
index 058afd3ca..84563b361 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.groups_.$groupId._tabs.index.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.groups_.$groupId._tabs.index.tsx
@@ -161,7 +161,6 @@ function Component() {
<div className="col-span-1">
<PopularRoutes data={popularRoutes.data} />
</div>
-
</div>
);
}
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.groups_.$groupId._tabs.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.groups_.$groupId._tabs.tsx
index 6036097b5..9d626754c 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.groups_.$groupId._tabs.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.groups_.$groupId._tabs.tsx
@@ -66,7 +66,7 @@ function Component() {
name: group.data.name,
type: group.data.type,
}
- : undefined,
+ : undefined
);
const deleteMutation = useMutation(
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.insights.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.insights.tsx
index 33c947fd5..214e41bed 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.insights.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.insights.tsx
@@ -30,7 +30,7 @@ import { parseAsString, parseAsStringEnum, useQueryState } from 'nuqs';
import { useMemo } from 'react';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/insights',
+ '/_app/$organizationId/$projectId/insights'
)({
component: Component,
head: () => {
@@ -73,17 +73,17 @@ function Component() {
trpc.insight.listAll.queryOptions({
projectId,
limit: INSIGHT_LIST_ALL_MAX_LIMIT,
- }),
+ })
);
const navigate = useNavigate();
const [search, setSearch] = useQueryState(
'search',
- parseAsString.withDefault(''),
+ parseAsString.withDefault('')
);
const [moduleFilter, setModuleFilter] = useQueryState(
'module',
- parseAsString.withDefault('all'),
+ parseAsString.withDefault('all')
);
const [windowKindFilter, setWindowKindFilter] = useQueryState(
'window',
@@ -92,17 +92,17 @@ function Component() {
'yesterday',
'rolling_7d',
'rolling_30d',
- ]).withDefault('all'),
+ ]).withDefault('all')
);
const [severityFilter, setSeverityFilter] = useQueryState(
'severity',
parseAsStringEnum(['all', 'severe', 'moderate', 'low', 'none']).withDefault(
- 'all',
- ),
+ 'all'
+ )
);
const [directionFilter, setDirectionFilter] = useQueryState(
'direction',
- parseAsStringEnum(['all', 'up', 'down', 'flat']).withDefault('all'),
+ parseAsStringEnum(['all', 'up', 'down', 'flat']).withDefault('all')
);
const [sortBy, setSortBy] = useQueryState(
'sort',
@@ -113,7 +113,7 @@ function Component() {
'severity-desc',
'severity-asc',
'recent',
- ]).withDefault('relevance'),
+ ]).withDefault('relevance')
);
const filteredAndSorted = useMemo(() => {
@@ -255,7 +255,7 @@ function Component() {
// Sort by average impact (high to low)
return avgImpactB - avgImpactA;
- },
+ }
);
}, [filteredAndSorted]);
@@ -277,7 +277,7 @@ function Component() {
>
<Skeleton className="h-48 w-full" />
</CarouselItem>
- ),
+ )
)}
</CarouselContent>
</Carousel>
@@ -403,7 +403,7 @@ function Component() {
<CarouselItem
key={insight.id}
className={cn(
- 'pl-4 basis-full sm:basis-1/2 lg:basis-1/3 xl:basis-1/4',
+ 'pl-4 basis-full sm:basis-1/2 lg:basis-1/3 xl:basis-1/4'
)}
>
<InsightCard
@@ -412,7 +412,7 @@ function Component() {
const filterString = insight.payload?.dimensions
.map(
(dim) =>
- `${dim.key},is,${encodeURIComponent(dim.value)}`,
+ `${dim.key},is,${encodeURIComponent(dim.value)}`
)
.join(';');
if (filterString) {
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.integrations._tabs.available.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.integrations._tabs.available.tsx
index 71f94be10..5ca6560ee 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.integrations._tabs.available.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.integrations._tabs.available.tsx
@@ -2,7 +2,7 @@ import { AllIntegrations } from '@/components/integrations/all-integrations';
import { createFileRoute } from '@tanstack/react-router';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/integrations/_tabs/available',
+ '/_app/$organizationId/$projectId/integrations/_tabs/available'
)({
component: Component,
});
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.integrations._tabs.index.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.integrations._tabs.index.tsx
index 132dd083f..1566dc99e 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.integrations._tabs.index.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.integrations._tabs.index.tsx
@@ -1,7 +1,7 @@
import { createFileRoute, redirect } from '@tanstack/react-router';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/integrations/_tabs/',
+ '/_app/$organizationId/$projectId/integrations/_tabs/'
)({
component: Component,
beforeLoad({ params }) {
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.integrations._tabs.installed.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.integrations._tabs.installed.tsx
index 796905da3..099f7ba64 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.integrations._tabs.installed.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.integrations._tabs.installed.tsx
@@ -2,7 +2,7 @@ import { ActiveIntegrations } from '@/components/integrations/active-integration
import { createFileRoute } from '@tanstack/react-router';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/integrations/_tabs/installed',
+ '/_app/$organizationId/$projectId/integrations/_tabs/installed'
)({
component: Component,
});
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.integrations._tabs.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.integrations._tabs.tsx
index f652542f1..b96dfcfbf 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.integrations._tabs.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.integrations._tabs.tsx
@@ -5,7 +5,7 @@ import { PAGE_TITLES, createProjectTitle } from '@/utils/title';
import { Outlet, createFileRoute, useRouter } from '@tanstack/react-router';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/integrations/_tabs',
+ '/_app/$organizationId/$projectId/integrations/_tabs'
)({
component: Component,
head: () => {
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.notifications._tabs.index.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.notifications._tabs.index.tsx
index 6642d1ef2..4d59e1e2e 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.notifications._tabs.index.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.notifications._tabs.index.tsx
@@ -1,7 +1,7 @@
import { createFileRoute, redirect } from '@tanstack/react-router';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/notifications/_tabs/',
+ '/_app/$organizationId/$projectId/notifications/_tabs/'
)({
component: Component,
beforeLoad({ params }) {
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.notifications._tabs.notifications.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.notifications._tabs.notifications.tsx
index 510ae0b92..edff9905e 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.notifications._tabs.notifications.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.notifications._tabs.notifications.tsx
@@ -5,14 +5,14 @@ import { useQuery } from '@tanstack/react-query';
import { createFileRoute } from '@tanstack/react-router';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/notifications/_tabs/notifications',
+ '/_app/$organizationId/$projectId/notifications/_tabs/notifications'
)({
component: Component,
loader: async ({ context, params }) => {
await context.queryClient.prefetchQuery(
context.trpc.notification.list.queryOptions({
projectId: params.projectId,
- }),
+ })
);
},
pendingComponent: FullPageLoadingState,
@@ -24,7 +24,7 @@ function Component() {
const query = useQuery(
trpc.notification.list.queryOptions({
projectId,
- }),
+ })
);
return <NotificationsTable query={query} />;
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.notifications._tabs.rules.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.notifications._tabs.rules.tsx
index df1788a02..36cbae3f4 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.notifications._tabs.rules.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.notifications._tabs.rules.tsx
@@ -12,14 +12,14 @@ import { PencilRulerIcon, PlusIcon } from 'lucide-react';
import { useMemo } from 'react';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/notifications/_tabs/rules',
+ '/_app/$organizationId/$projectId/notifications/_tabs/rules'
)({
component: Component,
loader: async ({ context, params }) => {
await context.queryClient.prefetchQuery(
context.trpc.notification.rules.queryOptions({
projectId: params.projectId,
- }),
+ })
);
},
pendingComponent: FullPageLoadingState,
@@ -31,7 +31,7 @@ function Component() {
const query = useQuery(
trpc.notification.rules.queryOptions({
projectId,
- }),
+ })
);
const data = useMemo(() => {
return query.data || [];
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.notifications._tabs.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.notifications._tabs.tsx
index a3973b264..6319c9a20 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.notifications._tabs.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.notifications._tabs.tsx
@@ -5,7 +5,7 @@ import { PAGE_TITLES, createProjectTitle } from '@/utils/title';
import { Outlet, createFileRoute, useRouter } from '@tanstack/react-router';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/notifications/_tabs',
+ '/_app/$organizationId/$projectId/notifications/_tabs'
)({
component: Component,
head: () => {
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.pages.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.pages.tsx
index 984aeb2bc..1d7fdede7 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.pages.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.pages.tsx
@@ -17,7 +17,11 @@ function Component() {
useRangePageContext('pages');
return (
<PageContainer>
- <PageHeader title="Pages" description="Access all your pages here" className="mb-8" />
+ <PageHeader
+ title="Pages"
+ description="Access all your pages here"
+ className="mb-8"
+ />
<PagesTable projectId={projectId} />
</PageContainer>
);
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.events.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.events.tsx
index a121191a6..8f40452b8 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.events.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.events.tsx
@@ -11,7 +11,7 @@ import { createFileRoute } from '@tanstack/react-router';
import { parseAsIsoDateTime, useQueryState } from 'nuqs';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/profiles/$profileId/_tabs/events',
+ '/_app/$organizationId/$projectId/profiles/$profileId/_tabs/events'
)({
component: Component,
head: () => {
@@ -47,8 +47,8 @@ function Component() {
{
enabled: columnVisibility !== null,
getNextPageParam: (lastPage) => lastPage.meta.next,
- },
- ),
+ }
+ )
);
return <EventsTable query={query} />;
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.index.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.index.tsx
index f3bd8b954..57bf8439c 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.index.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.index.tsx
@@ -13,7 +13,7 @@ import { useSuspenseQuery } from '@tanstack/react-query';
import { createFileRoute } from '@tanstack/react-router';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/profiles/$profileId/_tabs/',
+ '/_app/$organizationId/$projectId/profiles/$profileId/_tabs/'
)({
component: Component,
loader: async ({ context, params }) => {
@@ -23,25 +23,25 @@ export const Route = createFileRoute(
context.trpc.profile.metrics.queryOptions({
profileId: params.profileId,
projectId: params.projectId,
- }),
+ })
),
context.queryClient.prefetchQuery(
context.trpc.profile.activity.queryOptions({
profileId: params.profileId,
projectId: params.projectId,
- }),
+ })
),
context.queryClient.prefetchQuery(
context.trpc.profile.mostEvents.queryOptions({
profileId: params.profileId,
projectId: params.projectId,
- }),
+ })
),
context.queryClient.prefetchQuery(
context.trpc.profile.popularRoutes.queryOptions({
profileId: params.profileId,
projectId: params.projectId,
- }),
+ })
),
]);
},
@@ -65,35 +65,35 @@ function Component() {
trpc.profile.byId.queryOptions({
profileId,
projectId,
- }),
+ })
);
const metrics = useSuspenseQuery(
trpc.profile.metrics.queryOptions({
profileId,
projectId,
- }),
+ })
);
const activity = useSuspenseQuery(
trpc.profile.activity.queryOptions({
profileId,
projectId,
- }),
+ })
);
const mostEvents = useSuspenseQuery(
trpc.profile.mostEvents.queryOptions({
profileId,
projectId,
- }),
+ })
);
const popularRoutes = useSuspenseQuery(
trpc.profile.popularRoutes.queryOptions({
profileId,
projectId,
- }),
+ })
);
return (
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.sessions.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.sessions.tsx
index 4645e8720..3755456cd 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.sessions.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.sessions.tsx
@@ -5,7 +5,7 @@ import { useInfiniteQuery } from '@tanstack/react-query';
import { createFileRoute } from '@tanstack/react-router';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/profiles/$profileId/_tabs/sessions',
+ '/_app/$organizationId/$projectId/profiles/$profileId/_tabs/sessions'
)({
component: Component,
});
@@ -25,8 +25,8 @@ function Component() {
},
{
getNextPageParam: (lastPage) => lastPage.meta.next,
- },
- ),
+ }
+ )
);
return <SessionsTable query={query} />;
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.tsx
index 26bf91daf..8692a6370 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.tsx
@@ -12,7 +12,7 @@ import { useSuspenseQuery } from '@tanstack/react-query';
import { Outlet, createFileRoute, useRouter } from '@tanstack/react-router';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/profiles/$profileId/_tabs',
+ '/_app/$organizationId/$projectId/profiles/$profileId/_tabs'
)({
component: Component,
loader: async ({ context, params }) => {
@@ -20,7 +20,7 @@ export const Route = createFileRoute(
context.trpc.profile.byId.queryOptions({
profileId: params.profileId,
projectId: params.projectId,
- }),
+ })
);
},
pendingComponent: FullPageLoadingState,
@@ -35,7 +35,7 @@ function Component() {
trpc.profile.byId.queryOptions({
profileId,
projectId,
- }),
+ })
);
useEntityPageContext(
@@ -47,7 +47,7 @@ function Component() {
browser: profile.data?.properties.browser,
os: profile.data?.properties.os,
email: profile.data?.email,
- },
+ }
);
const { activeTab, tabs } = usePageTabs([
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.anonymous.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.anonymous.tsx
index 967de0525..e1ad99392 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.anonymous.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.anonymous.tsx
@@ -8,7 +8,7 @@ import { keepPreviousData, useQuery } from '@tanstack/react-query';
import { createFileRoute } from '@tanstack/react-router';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/profiles/_tabs/anonymous',
+ '/_app/$organizationId/$projectId/profiles/_tabs/anonymous'
)({
component: Component,
head: () => {
@@ -40,8 +40,8 @@ function Component() {
},
{
placeholderData: keepPreviousData,
- },
- ),
+ }
+ )
);
return <ProfilesTable query={query} type="profiles" />;
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.identified.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.identified.tsx
index 77cfa1588..fbfaf3ba0 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.identified.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.identified.tsx
@@ -8,7 +8,7 @@ import { keepPreviousData, useQuery } from '@tanstack/react-query';
import { createFileRoute } from '@tanstack/react-router';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/profiles/_tabs/identified',
+ '/_app/$organizationId/$projectId/profiles/_tabs/identified'
)({
head: () => {
return {
@@ -42,8 +42,8 @@ function Component() {
},
{
placeholderData: keepPreviousData,
- },
- ),
+ }
+ )
);
return <ProfilesTable type="profiles" query={query} />;
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.index.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.index.tsx
index 4be908ad2..75fe129b8 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.index.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.index.tsx
@@ -1,7 +1,7 @@
import { createFileRoute, redirect } from '@tanstack/react-router';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/profiles/_tabs/',
+ '/_app/$organizationId/$projectId/profiles/_tabs/'
)({
component: Component,
beforeLoad({ params }) {
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.power-users.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.power-users.tsx
index 12070a701..3b7c06857 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.power-users.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.power-users.tsx
@@ -6,7 +6,7 @@ import { keepPreviousData, useQuery } from '@tanstack/react-query';
import { createFileRoute } from '@tanstack/react-router';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/profiles/_tabs/power-users',
+ '/_app/$organizationId/$projectId/profiles/_tabs/power-users'
)({
component: Component,
head: () => {
@@ -33,8 +33,8 @@ function Component() {
},
{
placeholderData: keepPreviousData,
- },
- ),
+ }
+ )
);
return <ProfilesTable query={query} type="power-users" />;
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.tsx
index 7aa3df7c9..cf2aab05c 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.profiles._tabs.tsx
@@ -5,7 +5,7 @@ import { PAGE_TITLES, createProjectTitle } from '@/utils/title';
import { Outlet, createFileRoute, useRouter } from '@tanstack/react-router';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/profiles/_tabs',
+ '/_app/$organizationId/$projectId/profiles/_tabs'
)({
component: Component,
head: () => {
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.references.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.references.tsx
index 5461bffe0..7fb501aba 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.references.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.references.tsx
@@ -33,7 +33,7 @@ import { PlusIcon } from 'lucide-react';
import { toast } from 'sonner';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/references',
+ '/_app/$organizationId/$projectId/references'
)({
component: Component,
head: () => {
@@ -110,7 +110,7 @@ export const columnDefs: ColumnDef<IServiceReference>[] = [
toast.success('Reference deleted');
queryClient.invalidateQueries(trpc.reference.pathFilter());
},
- }),
+ })
);
const ref = row.original;
return (
@@ -159,8 +159,8 @@ function Component() {
},
{
placeholderData: keepPreviousData,
- },
- ),
+ }
+ )
);
const data = query.data ?? [];
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.reports.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.reports.tsx
index 43c6d545c..8bfa4665d 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.reports.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.reports.tsx
@@ -4,7 +4,7 @@ import { createFileRoute } from '@tanstack/react-router';
import { z } from 'zod';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/reports',
+ '/_app/$organizationId/$projectId/reports'
)({
component: Component,
head: () => {
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.reports_.$reportId.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.reports_.$reportId.tsx
index 65c9388c3..5b78ebaef 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.reports_.$reportId.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.reports_.$reportId.tsx
@@ -8,7 +8,7 @@ import { createFileRoute } from '@tanstack/react-router';
import { z } from 'zod';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/reports_/$reportId',
+ '/_app/$organizationId/$projectId/reports_/$reportId'
)({
component: Component,
head: () => {
@@ -24,7 +24,7 @@ export const Route = createFileRoute(
await context.queryClient.prefetchQuery(
context.trpc.report.get.queryOptions({
reportId: params.reportId,
- }),
+ })
);
},
validateSearch: z.object({
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.sessions_.$sessionId.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.sessions_.$sessionId.tsx
index 3be8da025..0b5a7c559 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.sessions_.$sessionId.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.sessions_.$sessionId.tsx
@@ -157,7 +157,7 @@ function Component() {
isBounce: session.isBounce,
entryPath: session.entryPath,
exitPath: session.exitPath,
- },
+ }
);
const { data: eventsData } = useSuspenseQuery(
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.clients.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.clients.tsx
index 5c46a85df..1e643cb8b 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.clients.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.clients.tsx
@@ -5,7 +5,7 @@ import { useQuery } from '@tanstack/react-query';
import { createFileRoute } from '@tanstack/react-router';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/settings/_tabs/clients',
+ '/_app/$organizationId/$projectId/settings/_tabs/clients'
)({
component: Component,
});
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.details.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.details.tsx
index 535a03e06..212ddcc0e 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.details.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.details.tsx
@@ -7,7 +7,7 @@ import { useQuery } from '@tanstack/react-query';
import { createFileRoute } from '@tanstack/react-router';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/settings/_tabs/details',
+ '/_app/$organizationId/$projectId/settings/_tabs/details'
)({
component: Component,
});
@@ -16,7 +16,7 @@ function Component() {
const { projectId } = useAppParams();
const trpc = useTRPC();
const query = useQuery(
- trpc.project.getProjectWithClients.queryOptions({ projectId }),
+ trpc.project.getProjectWithClients.queryOptions({ projectId })
);
if (query.isLoading) {
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.events.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.events.tsx
index 41be91093..67a442bf1 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.events.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.events.tsx
@@ -6,7 +6,7 @@ import { useQuery } from '@tanstack/react-query';
import { createFileRoute } from '@tanstack/react-router';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/settings/_tabs/events',
+ '/_app/$organizationId/$projectId/settings/_tabs/events'
)({
component: Component,
});
@@ -15,7 +15,7 @@ function Component() {
const { projectId } = useAppParams();
const trpc = useTRPC();
const query = useQuery(
- trpc.project.getProjectWithClients.queryOptions({ projectId }),
+ trpc.project.getProjectWithClients.queryOptions({ projectId })
);
if (query.isLoading) {
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.index.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.index.tsx
index 04f1c0cc2..a4d8a25b0 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.index.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.index.tsx
@@ -1,7 +1,7 @@
import { createFileRoute, redirect } from '@tanstack/react-router';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/settings/_tabs/',
+ '/_app/$organizationId/$projectId/settings/_tabs/'
)({
component: Component,
beforeLoad: ({ params }) => {
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.widgets.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.widgets.tsx
index 798d07b6a..65fb66f30 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.widgets.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.widgets.tsx
@@ -8,7 +8,10 @@ import { Widget, WidgetBody, WidgetHead } from '@/components/widget';
import { useAppContext } from '@/hooks/use-app-context';
import { useAppParams } from '@/hooks/use-app-params';
import { useTRPC } from '@/integrations/trpc/react';
-import type { IRealtimeWidgetOptions, IWidgetType } from '@openpanel/core/modules/report/report.constants';
+import type {
+ IRealtimeWidgetOptions,
+ IWidgetType,
+} from '@openpanel/core/modules/report/report.constants';
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
import { createFileRoute } from '@tanstack/react-router';
import { ExternalLinkIcon } from 'lucide-react';
@@ -16,7 +19,7 @@ import { useEffect, useState } from 'react';
import { toast } from 'sonner';
export const Route = createFileRoute(
- '/_app/$organizationId/$projectId/settings/_tabs/widgets',
+ '/_app/$organizationId/$projectId/settings/_tabs/widgets'
)({
component: Component,
});
@@ -29,10 +32,10 @@ function Component() {
// Fetch both widget types
const realtimeWidgetQuery = useQuery(
- trpc.widget.get.queryOptions({ projectId, type: 'realtime' }),
+ trpc.widget.get.queryOptions({ projectId, type: 'realtime' })
);
const counterWidgetQuery = useQuery(
- trpc.widget.get.queryOptions({ projectId, type: 'counter' }),
+ trpc.widget.get.queryOptions({ projectId, type: 'counter' })
);
// Toggle mutation
@@ -40,14 +43,14 @@ function Component() {
trpc.widget.toggle.mutationOptions({
onSuccess: (_, variables) => {
queryClient.invalidateQueries(
- trpc.widget.get.queryFilter({ projectId, type: variables.type }),
+ trpc.widget.get.queryFilter({ projectId, type: variables.type })
);
toast.success(variables.enabled ? 'Widget enabled' : 'Widget disabled');
},
onError: (error) => {
toast.error(error.message || 'Failed to update widget');
},
- }),
+ })
);
// Update options mutation
@@ -55,14 +58,14 @@ function Component() {
trpc.widget.updateOptions.mutationOptions({
onSuccess: () => {
queryClient.invalidateQueries(
- trpc.widget.get.queryFilter({ projectId, type: 'realtime' }),
+ trpc.widget.get.queryFilter({ projectId, type: 'realtime' })
);
toast.success('Widget options updated');
},
onError: (error) => {
toast.error(error.message || 'Failed to update options');
},
- }),
+ })
);
const handleToggle = (type: IWidgetType, enabled: boolean) => {
@@ -151,7 +154,7 @@ function RealtimeWidgetSection({
paths: false,
};
const [options, setOptions] = useState<IRealtimeWidgetOptions>(
- (widget?.options as IRealtimeWidgetOptions) || defaultOptions,
+ (widget?.options as IRealtimeWidgetOptions) || defaultOptions
);
// Create a checksum based on URL and current options to force iframe reload
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.tsx
index 252fbfca1..297f078f4 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.tsx
@@ -24,12 +24,12 @@ export const Route = createFileRoute('/_app/$organizationId/$projectId')({
context.queryClient.prefetchQuery(
context.trpc.organization.get.queryOptions({
organizationId: params.organizationId,
- }),
+ })
),
context.queryClient.prefetchQuery(
context.trpc.project.getProjectWithClients.queryOptions({
projectId: params.projectId,
- }),
+ })
),
]);
},
@@ -41,10 +41,10 @@ function ProjectDashboard() {
const { data: organization } = useSuspenseQuery(
trpc.organization.get.queryOptions({
organizationId,
- }),
+ })
);
const { data: project } = useSuspenseQuery(
- trpc.project.getProjectWithClients.queryOptions({ projectId }),
+ trpc.project.getProjectWithClients.queryOptions({ projectId })
);
useProjectDocumentTitle(project?.name);
@@ -64,7 +64,10 @@ function ProjectDashboard() {
}
);
return (
- <BillingPrompt organization={organization} type={blockType ?? 'expired'} />
+ <BillingPrompt
+ organization={organization}
+ type={blockType ?? 'expired'}
+ />
);
}
diff --git a/apps/start/src/routes/_app.$organizationId.account._tabs.email-preferences.tsx b/apps/start/src/routes/_app.$organizationId.account._tabs.email-preferences.tsx
index 71ce594e8..bb8033173 100644
--- a/apps/start/src/routes/_app.$organizationId.account._tabs.email-preferences.tsx
+++ b/apps/start/src/routes/_app.$organizationId.account._tabs.email-preferences.tsx
@@ -115,7 +115,7 @@ function Component() {
</div>
)}
/>
- ),
+ )
)}
</div>
diff --git a/apps/start/src/routes/_app.$organizationId.account._tabs.index.tsx b/apps/start/src/routes/_app.$organizationId.account._tabs.index.tsx
index 8203b37b0..6faeff98b 100644
--- a/apps/start/src/routes/_app.$organizationId.account._tabs.index.tsx
+++ b/apps/start/src/routes/_app.$organizationId.account._tabs.index.tsx
@@ -50,7 +50,7 @@ function Component() {
});
},
onError: handleError,
- }),
+ })
);
if (!user) {
@@ -65,38 +65,38 @@ function Component() {
})}
>
<Widget className="max-w-screen-md w-full">
- <WidgetHead>
- <span className="title">Profile</span>
- </WidgetHead>
- <WidgetBody className="gap-4 col">
- <InputWithLabel
- label="Email"
- value={user.email}
- disabled
- readOnly
- />
- <InputWithLabel
- label="First name"
- {...register('firstName')}
- defaultValue={user.firstName ?? ''}
- />
- <InputWithLabel
- label="Last name"
- {...register('lastName')}
- defaultValue={user.lastName ?? ''}
- />
- <Button
- size="sm"
- type="submit"
- disabled={!formState.isDirty || mutation.isPending}
- className="self-end"
- icon={SaveIcon}
- loading={mutation.isPending}
- >
- Save
- </Button>
- </WidgetBody>
- </Widget>
+ <WidgetHead>
+ <span className="title">Profile</span>
+ </WidgetHead>
+ <WidgetBody className="gap-4 col">
+ <InputWithLabel
+ label="Email"
+ value={user.email}
+ disabled
+ readOnly
+ />
+ <InputWithLabel
+ label="First name"
+ {...register('firstName')}
+ defaultValue={user.firstName ?? ''}
+ />
+ <InputWithLabel
+ label="Last name"
+ {...register('lastName')}
+ defaultValue={user.lastName ?? ''}
+ />
+ <Button
+ size="sm"
+ type="submit"
+ disabled={!formState.isDirty || mutation.isPending}
+ className="self-end"
+ icon={SaveIcon}
+ loading={mutation.isPending}
+ >
+ Save
+ </Button>
+ </WidgetBody>
+ </Widget>
</form>
<DeleteAccount />
</div>
diff --git a/apps/start/src/routes/_app.$organizationId.account._tabs.two-factor.tsx b/apps/start/src/routes/_app.$organizationId.account._tabs.two-factor.tsx
index 1e62445c7..0b1ad000a 100644
--- a/apps/start/src/routes/_app.$organizationId.account._tabs.two-factor.tsx
+++ b/apps/start/src/routes/_app.$organizationId.account._tabs.two-factor.tsx
@@ -8,7 +8,7 @@ import { createFileRoute } from '@tanstack/react-router';
import { ShieldCheckIcon, ShieldOffIcon } from 'lucide-react';
export const Route = createFileRoute(
- '/_app/$organizationId/account/_tabs/two-factor',
+ '/_app/$organizationId/account/_tabs/two-factor'
)({
component: Component,
pendingComponent: FullPageLoadingState,
@@ -85,7 +85,7 @@ function EnabledView({
<div className="row items-center justify-between rounded-md border border-border bg-def-100 px-4 py-3">
<div className="row items-center gap-2">
<div className="size-10 bg-emerald-500/10 rounded-full center-center">
- <ShieldCheckIcon className="size-4 text-emerald-500" />
+ <ShieldCheckIcon className="size-4 text-emerald-500" />
</div>
<div className="col gap-1">
<span>Two-factor authentication is enabled.</span>
diff --git a/apps/start/src/routes/_app.$organizationId.billing.tsx b/apps/start/src/routes/_app.$organizationId.billing.tsx
index 63b2a2ffd..c17061a84 100644
--- a/apps/start/src/routes/_app.$organizationId.billing.tsx
+++ b/apps/start/src/routes/_app.$organizationId.billing.tsx
@@ -23,7 +23,7 @@ export const Route = createFileRoute('/_app/$organizationId/billing')({
const access = await context.queryClient.fetchQuery(
context.trpc.organization.myAccess.queryOptions({
organizationId: params.organizationId,
- }),
+ })
);
if (access?.role !== 'org:admin') {
throw redirect({
@@ -35,12 +35,12 @@ export const Route = createFileRoute('/_app/$organizationId/billing')({
context.queryClient.prefetchQuery(
context.trpc.subscription.products.queryOptions({
organizationId: params.organizationId,
- }),
+ })
),
context.queryClient.prefetchQuery(
context.trpc.subscription.getCurrent.queryOptions({
organizationId: params.organizationId,
- }),
+ })
),
]);
},
@@ -52,7 +52,7 @@ function OrganizationPage() {
const { data: organization, isLoading } = useQuery(
trpc.organization.get.queryOptions({
organizationId,
- }),
+ })
);
if (isLoading) {
diff --git a/apps/start/src/routes/_app.$organizationId.index.tsx b/apps/start/src/routes/_app.$organizationId.index.tsx
index 027c11a49..024c45b24 100644
--- a/apps/start/src/routes/_app.$organizationId.index.tsx
+++ b/apps/start/src/routes/_app.$organizationId.index.tsx
@@ -23,7 +23,7 @@ export const Route = createFileRoute('/_app/$organizationId/')({
await context.queryClient.prefetchQuery(
context.trpc.project.list.queryOptions({
organizationId: params.organizationId,
- }),
+ })
);
},
pendingComponent: FullPageLoadingState,
@@ -44,7 +44,7 @@ function OrganizationPage() {
const { data: projects } = useQuery(
trpc.project.list.queryOptions({
organizationId,
- }),
+ })
);
const { isAdmin } = useOrganizationAccess(organizationId);
const { setSearch, search } = useSearchQueryState();
diff --git a/apps/start/src/routes/_app.$organizationId.members._tabs.invitations.tsx b/apps/start/src/routes/_app.$organizationId.members._tabs.invitations.tsx
index 7fc547a40..00251ccd9 100644
--- a/apps/start/src/routes/_app.$organizationId.members._tabs.invitations.tsx
+++ b/apps/start/src/routes/_app.$organizationId.members._tabs.invitations.tsx
@@ -7,7 +7,7 @@ import { createFileRoute } from '@tanstack/react-router';
import { PlusIcon } from 'lucide-react';
export const Route = createFileRoute(
- '/_app/$organizationId/members/_tabs/invitations',
+ '/_app/$organizationId/members/_tabs/invitations'
)({
component: Component,
});
@@ -16,7 +16,7 @@ function Component() {
const { organizationId } = Route.useParams();
const trpc = useTRPC();
const query = useQuery(
- trpc.organization.invitations.queryOptions({ organizationId }),
+ trpc.organization.invitations.queryOptions({ organizationId })
);
return <InvitesTable query={query} />;
diff --git a/apps/start/src/routes/_app.$organizationId.members._tabs.members.tsx b/apps/start/src/routes/_app.$organizationId.members._tabs.members.tsx
index b6a398051..00ef66439 100644
--- a/apps/start/src/routes/_app.$organizationId.members._tabs.members.tsx
+++ b/apps/start/src/routes/_app.$organizationId.members._tabs.members.tsx
@@ -5,7 +5,7 @@ import { useQuery } from '@tanstack/react-query';
import { createFileRoute } from '@tanstack/react-router';
export const Route = createFileRoute(
- '/_app/$organizationId/members/_tabs/members',
+ '/_app/$organizationId/members/_tabs/members'
)({
component: Component,
});
@@ -14,7 +14,7 @@ function Component() {
const { organizationId } = useAppParams();
const trpc = useTRPC();
const query = useQuery(
- trpc.organization.members.queryOptions({ organizationId }),
+ trpc.organization.members.queryOptions({ organizationId })
);
return <MembersTable query={query} />;
diff --git a/apps/start/src/routes/_app.$organizationId.members._tabs.tsx b/apps/start/src/routes/_app.$organizationId.members._tabs.tsx
index 128bd2f9e..c46dde4f5 100644
--- a/apps/start/src/routes/_app.$organizationId.members._tabs.tsx
+++ b/apps/start/src/routes/_app.$organizationId.members._tabs.tsx
@@ -24,7 +24,7 @@ export const Route = createFileRoute('/_app/$organizationId/members/_tabs')({
const access = await context.queryClient.fetchQuery(
context.trpc.organization.myAccess.queryOptions({
organizationId: params.organizationId,
- }),
+ })
);
if (access?.role !== 'org:admin') {
throw redirect({
diff --git a/apps/start/src/routes/_app.$organizationId.settings.tsx b/apps/start/src/routes/_app.$organizationId.settings.tsx
index 5ae63068f..48ac9159d 100644
--- a/apps/start/src/routes/_app.$organizationId.settings.tsx
+++ b/apps/start/src/routes/_app.$organizationId.settings.tsx
@@ -42,7 +42,7 @@ function Component() {
} = useQuery(
trpc.organization.get.queryOptions({
organizationId,
- }),
+ })
);
if (isLoading) {
@@ -74,7 +74,7 @@ function Component() {
refetch();
},
onError: handleError,
- }),
+ })
);
return (
diff --git a/apps/start/src/routes/_app.$organizationId.tsx b/apps/start/src/routes/_app.$organizationId.tsx
index e86ad5f62..2c46d5821 100644
--- a/apps/start/src/routes/_app.$organizationId.tsx
+++ b/apps/start/src/routes/_app.$organizationId.tsx
@@ -57,7 +57,7 @@ export const Route = createFileRoute('/_app/$organizationId')({
const access = await context.queryClient.fetchQuery(
context.trpc.organization.myAccess.queryOptions({
organizationId: params.organizationId,
- }),
+ })
);
if (access === null) {
throw notFound();
@@ -68,7 +68,7 @@ export const Route = createFileRoute('/_app/$organizationId')({
await context.queryClient.prefetchQuery(
context.trpc.organization.get.queryOptions({
organizationId: params.organizationId,
- }),
+ })
);
},
pendingComponent: FullPageLoadingState,
@@ -117,7 +117,7 @@ function Component() {
const { data: organization } = useSuspenseQuery(
trpc.organization.get.queryOptions({
organizationId,
- }),
+ })
);
const stateMeta = getSubscriptionStateMeta(organization.subscriptionState, {
@@ -132,7 +132,7 @@ function Component() {
const isProjectRoute = useMatches({
select: (matches) =>
matches.some(
- (match) => match.routeId === '/_app/$organizationId/$projectId',
+ (match) => match.routeId === '/_app/$organizationId/$projectId'
),
});
const hideBannerForPrompt =
diff --git a/apps/start/src/routes/_app.account.tsx b/apps/start/src/routes/_app.account.tsx
index 4889d4a08..903f42916 100644
--- a/apps/start/src/routes/_app.account.tsx
+++ b/apps/start/src/routes/_app.account.tsx
@@ -7,7 +7,7 @@ export const Route = createFileRoute('/_app/account')({
context.trpc.organization.list.queryOptions(undefined, {
staleTime: 0,
gcTime: 0,
- }),
+ })
)
.catch(() => []);
diff --git a/apps/start/src/routes/_login.verify.tsx b/apps/start/src/routes/_login.verify.tsx
index ee053e382..73c83cd25 100644
--- a/apps/start/src/routes/_login.verify.tsx
+++ b/apps/start/src/routes/_login.verify.tsx
@@ -37,7 +37,7 @@ function VerifyPage() {
toast.error(error.message);
setCode('');
},
- }),
+ })
);
const canSubmit =
diff --git a/apps/start/src/routes/_steps.onboarding.$projectId.verify.tsx b/apps/start/src/routes/_steps.onboarding.$projectId.verify.tsx
index abe43ebcd..b68607633 100644
--- a/apps/start/src/routes/_steps.onboarding.$projectId.verify.tsx
+++ b/apps/start/src/routes/_steps.onboarding.$projectId.verify.tsx
@@ -51,9 +51,7 @@ function Component() {
// Refetch the event list the moment an event arrives instead of waiting for
// the next poll — same channel the in-app live event feed uses.
useWS(`/live/events/${projectId}`, () => {
- queryClient.invalidateQueries(
- trpc.event.events.queryFilter({ projectId })
- );
+ queryClient.invalidateQueries(trpc.event.events.queryFilter({ projectId }));
});
const isVerified = events?.data && events.data.length > 0;
diff --git a/apps/start/src/routes/share.dashboard.$shareId.tsx b/apps/start/src/routes/share.dashboard.$shareId.tsx
index b02fe4081..6e7775462 100644
--- a/apps/start/src/routes/share.dashboard.$shareId.tsx
+++ b/apps/start/src/routes/share.dashboard.$shareId.tsx
@@ -30,7 +30,7 @@ export const Route = createFileRoute('/share/dashboard/$shareId')({
const share = await context.queryClient.ensureQueryData(
context.trpc.share.dashboard.queryOptions({
shareId: params.shareId,
- }),
+ })
);
return { share };
@@ -86,13 +86,13 @@ function RouteComponent() {
const shareQuery = useSuspenseQuery(
trpc.share.dashboard.queryOptions({
shareId,
- }),
+ })
);
const reportsQuery = useQuery(
trpc.share.dashboardReports.queryOptions({
shareId,
- }),
+ })
);
const share = shareQuery.data;
diff --git a/apps/start/src/routes/share.overview.$shareId.tsx b/apps/start/src/routes/share.overview.$shareId.tsx
index 0d8fccf18..7a884c070 100644
--- a/apps/start/src/routes/share.overview.$shareId.tsx
+++ b/apps/start/src/routes/share.overview.$shareId.tsx
@@ -30,7 +30,7 @@ export const Route = createFileRoute('/share/overview/$shareId')({
const share = await context.queryClient.ensureQueryData(
context.trpc.share.overview.queryOptions({
shareId: params.shareId,
- }),
+ })
);
return { share };
@@ -73,7 +73,7 @@ function RouteComponent() {
const shareQuery = useSuspenseQuery(
trpc.share.overview.queryOptions({
shareId,
- }),
+ })
);
if (shareQuery.isLoading) {
diff --git a/apps/start/src/routes/share.report.$shareId.tsx b/apps/start/src/routes/share.report.$shareId.tsx
index e908e3f6a..a38a94857 100644
--- a/apps/start/src/routes/share.report.$shareId.tsx
+++ b/apps/start/src/routes/share.report.$shareId.tsx
@@ -22,7 +22,7 @@ export const Route = createFileRoute('/share/report/$shareId')({
const share = await context.queryClient.ensureQueryData(
context.trpc.share.report.queryOptions({
shareId: params.shareId,
- }),
+ })
);
if (!share) {
@@ -81,7 +81,7 @@ function RouteComponent() {
const shareQuery = useSuspenseQuery(
trpc.share.report.queryOptions({
shareId,
- }),
+ })
);
const share = shareQuery.data;
diff --git a/apps/start/src/routes/widget/badge.tsx b/apps/start/src/routes/widget/badge.tsx
index 0d614a127..cf9551a2e 100644
--- a/apps/start/src/routes/widget/badge.tsx
+++ b/apps/start/src/routes/widget/badge.tsx
@@ -22,7 +22,7 @@ function RouteComponent() {
// Fetch widget data
const { data, isLoading } = useQuery(
- trpc.widget.badge.queryOptions({ shareId }),
+ trpc.widget.badge.queryOptions({ shareId })
);
if (isLoading) {
diff --git a/apps/start/src/styles.css b/apps/start/src/styles.css
index 2b5731eea..40b6e8b90 100644
--- a/apps/start/src/styles.css
+++ b/apps/start/src/styles.css
@@ -1,6 +1,6 @@
-@import 'tailwindcss';
+@import "tailwindcss";
-@import 'tw-animate-css';
+@import "tw-animate-css";
@custom-variant dark (&:is(.dark *));
@custom-variant light (&:is(.light *));
@@ -8,14 +8,21 @@
body {
@apply m-0;
- font-family: ui-sans-serif, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
+ font-family:
+ ui-sans-serif,
+ system-ui,
+ sans-serif,
+ Apple Color Emoji,
+ Segoe UI Emoji,
+ Segoe UI Symbol,
+ Noto Color Emoji;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family:
- source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
+ source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
}
:root {
@@ -34,19 +41,31 @@ code {
--background: oklch(100% 0 0); /* hsl(0, 0%, 100%) -> #FFFFFF */
--foreground: oklch(13.7% 0.04 259); /* hsl(222.2, 84%, 4.9%) -> #0C162A */
--card: oklch(100% 0 0); /* hsl(0, 0%, 100%) -> #FFFFFF */
- --card-foreground: oklch(13.7% 0.04 259); /* hsl(222.2, 84%, 4.9%) -> #0C162A */
+ --card-foreground: oklch(
+ 13.7% 0.04 259
+ ); /* hsl(222.2, 84%, 4.9%) -> #0C162A */
--popover: oklch(100% 0 0); /* hsl(0, 0%, 100%) -> #FFFFFF */
- --popover-foreground: oklch(13.7% 0.04 259); /* hsl(222.2, 84%, 4.9%) -> #0C162A */
+ --popover-foreground: oklch(
+ 13.7% 0.04 259
+ ); /* hsl(222.2, 84%, 4.9%) -> #0C162A */
--primary: oklch(20.8% 0.04 266); /* hsl(222.2, 47.4%, 11.2%) -> #163049 */
--primary-foreground: oklch(98.4% 0 248); /* hsl(210, 40%, 98%) -> #F0F4F9 */
--secondary: oklch(96.8% 0.01 248); /* hsl(210, 40%, 96.1%) -> #E7ECF2 */
- --secondary-foreground: oklch(20.8% 0.04 266); /* hsl(222.2, 47.4%, 11.2%) -> #163049 */
+ --secondary-foreground: oklch(
+ 20.8% 0.04 266
+ ); /* hsl(222.2, 47.4%, 11.2%) -> #163049 */
--muted: oklch(96.8% 0.01 248); /* hsl(210, 40%, 96.1%) -> #E7ECF2 */
- --muted-foreground: oklch(55.5% 0.04 257); /* hsl(215.4, 16.3%, 46.9%) -> #798290 */
+ --muted-foreground: oklch(
+ 55.5% 0.04 257
+ ); /* hsl(215.4, 16.3%, 46.9%) -> #798290 */
--accent: oklch(96.8% 0.01 248); /* hsl(210, 40%, 96.1%) -> #E7ECF2 */
- --accent-foreground: oklch(20.8% 0.04 266); /* hsl(222.2, 47.4%, 11.2%) -> #163049 */
+ --accent-foreground: oklch(
+ 20.8% 0.04 266
+ ); /* hsl(222.2, 47.4%, 11.2%) -> #163049 */
--destructive: oklch(63.7% 0.21 25.3); /* hsl(0, 84.2%, 60.2%) -> #F2677D */
- --destructive-foreground: oklch(96.9% 0.02 17.4); /* hsl(0, 100%, 97.25%) -> #F8F9FB */
+ --destructive-foreground: oklch(
+ 96.9% 0.02 17.4
+ ); /* hsl(0, 100%, 97.25%) -> #F8F9FB */
--border: oklch(92.9% 0.01 256); /* hsl(214.3, 31.8%, 91.4%) -> #E8EBF1 */
--input: oklch(92.9% 0.01 256); /* hsl(214.3, 31.8%, 91.4%) -> #E8EBF1 */
--ring: oklch(86.9% 0.02 253); /* hsl(212.73, 26.83%, 83.92%) -> #CDD6E2 */
@@ -123,7 +142,9 @@ code {
--accent: oklch(27.1% 0 0); /* hsl(0, 0%, 15.1%) -> #262626 */
--accent-foreground: oklch(98.5% 0 0); /* hsl(0, 0%, 98%) -> #fafafa */
--destructive: oklch(63.7% 0.21 25.3); /* hsl(0, 84.2%, 60.2%) -> #F2677D */
- --destructive-foreground: oklch(96.9% 0.02 17.4); /* hsl(0, 100%, 97.25%) -> #F8F9FB */
+ --destructive-foreground: oklch(
+ 96.9% 0.02 17.4
+ ); /* hsl(0, 100%, 97.25%) -> #F8F9FB */
--border: oklch(27.1% 0 0); /* hsl(0, 0%, 15.1%) -> #262626 */
--input: oklch(27.1% 0 0); /* hsl(0, 0%, 15.1%) -> #262626 */
--ring: oklch(87.6% 0 0); /* hsl(0, 0%, 83.9%) -> #d6d6d6 */
@@ -385,7 +406,8 @@ button {
/* Custom slow pulse animation */
@keyframes slow-pulse {
- 0%, 100% {
+ 0%,
+ 100% {
opacity: 0.5;
}
50% {
@@ -399,7 +421,8 @@ button {
/* Floating element animations */
@keyframes float-1 {
- 0%, 100% {
+ 0%,
+ 100% {
transform: scale(1);
opacity: 0.3;
}
@@ -410,7 +433,8 @@ button {
}
@keyframes float-2 {
- 0%, 100% {
+ 0%,
+ 100% {
transform: scale(1.2);
opacity: 0.4;
}
@@ -431,7 +455,8 @@ button {
/* Slow ping animation for success modal */
@keyframes ping-slow {
- 75%, 100% {
+ 75%,
+ 100% {
transform: scale(1.2);
opacity: 0;
}
@@ -452,27 +477,27 @@ button {
height: 100%;
width: 100%;
overflow-y: scroll;
- padding-right: 16px; /* preserve space for custom scrollbar */
- scrollbar-width: none; /* hide Firefox scrollbar */
+ padding-right: 16px; /* preserve space for custom scrollbar */
+ scrollbar-width: none; /* hide Firefox scrollbar */
}
.scrollarea-content::-webkit-scrollbar {
- width: 8px; /* size of custom scrollbar */
+ width: 8px; /* size of custom scrollbar */
}
.scrollarea-content::-webkit-scrollbar-track {
- background: transparent; /* no visible track, like shadcn */
+ background: transparent; /* no visible track, like shadcn */
}
.scrollarea-content::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, 0.2);
- border-radius: 9999px; /* fully rounded */
+ border-radius: 9999px; /* fully rounded */
transition: background 0.2s;
}
.scrollarea-content:hover::-webkit-scrollbar-thumb,
.scrollarea-content:active::-webkit-scrollbar-thumb {
- background: rgba(0, 0, 0, 0.4); /* darken on hover/scroll */
+ background: rgba(0, 0, 0, 0.4); /* darken on hover/scroll */
}
/* Scroll-driven animation for sticky header */
@@ -522,4 +547,4 @@ button {
--color-chart-marker-foreground: var(----chart-marker-foreground);
--color-chart-ring-background: var(----chart-ring-background);
--color-chart-label: var(----chart-label);
-}
\ No newline at end of file
+}
diff --git a/apps/start/src/types/react-simple-map.d.ts b/apps/start/src/types/react-simple-map.d.ts
index 41edac521..262f99736 100644
--- a/apps/start/src/types/react-simple-map.d.ts
+++ b/apps/start/src/types/react-simple-map.d.ts
@@ -15,7 +15,7 @@ declare module 'react-simple-maps' {
export type ProjectionFunction = (
width: number,
height: number,
- config: ProjectionConfig,
+ config: ProjectionConfig
) => GeoProjection;
export interface ComposableMapProps
@@ -81,7 +81,7 @@ declare module 'react-simple-maps' {
onMoveStart?:
| ((
position: { coordinates: [number, number]; zoom: number },
- event: D3ZoomEvent<SVGElement, any>,
+ event: D3ZoomEvent<SVGElement, any>
) => void)
| undefined;
onMove?:
@@ -92,13 +92,13 @@ declare module 'react-simple-maps' {
zoom: number;
dragging: WheelEvent;
},
- event: D3ZoomEvent<SVGElement, any>,
+ event: D3ZoomEvent<SVGElement, any>
) => void)
| undefined;
onMoveEnd?:
| ((
position: { coordinates: [number, number]; zoom: number },
- event: D3ZoomEvent<SVGElement, any>,
+ event: D3ZoomEvent<SVGElement, any>
) => void)
| undefined;
filterZoomEvent?: ((element: SVGElement) => boolean) | undefined;
diff --git a/apps/start/src/types/rrweb-player.d.ts b/apps/start/src/types/rrweb-player.d.ts
index 2cae9bf92..f561662ee 100644
--- a/apps/start/src/types/rrweb-player.d.ts
+++ b/apps/start/src/types/rrweb-player.d.ts
@@ -33,10 +33,14 @@ declare module 'rrweb-player' {
setSpeed: (speed: number) => void;
getMetaData: () => RrwebPlayerMetaData;
getReplayer: () => RrwebReplayer;
- addEvent: (event: { type: number; data: unknown; timestamp: number }) => void;
+ addEvent: (event: {
+ type: number;
+ data: unknown;
+ timestamp: number;
+ }) => void;
addEventListener?: (
event: string,
- handler: (...args: unknown[]) => void,
+ handler: (...args: unknown[]) => void
) => void;
$set?: (props: Partial<RrwebPlayerProps>) => void;
$destroy?: () => void;
diff --git a/apps/start/src/utils/are-props-equal.ts b/apps/start/src/utils/are-props-equal.ts
index d0c54d700..88c0563e5 100644
--- a/apps/start/src/utils/are-props-equal.ts
+++ b/apps/start/src/utils/are-props-equal.ts
@@ -6,7 +6,7 @@ export function arePropsEqual(paths: string[]) {
paths.every((path) =>
shallowEqual(
pathOr(undefined, path.split('.'), prevProps),
- pathOr(undefined, path.split('.'), nextProps),
- ),
+ pathOr(undefined, path.split('.'), nextProps)
+ )
);
}
diff --git a/apps/start/src/utils/getters.ts b/apps/start/src/utils/getters.ts
index b8e294fc4..b10f1167f 100644
--- a/apps/start/src/utils/getters.ts
+++ b/apps/start/src/utils/getters.ts
@@ -8,7 +8,7 @@ export type GetProfileNameProps = Partial<
>;
export function getProfileName(
profile: GetProfileNameProps | undefined | null,
- short = true,
+ short = true
) {
if (!profile) {
return '';
diff --git a/apps/start/src/utils/truncate.ts b/apps/start/src/utils/truncate.ts
index 15978540e..23d334d00 100644
--- a/apps/start/src/utils/truncate.ts
+++ b/apps/start/src/utils/truncate.ts
@@ -1,7 +1,7 @@
export function truncate(
str: string,
len: number,
- mode: 'start' | 'end' | 'middle' = 'end',
+ mode: 'start' | 'end' | 'middle' = 'end'
) {
if (str.length <= len) {
return str;
diff --git a/apps/start/vite.config.ts b/apps/start/vite.config.ts
index 12855dcd9..3f0d052a8 100644
--- a/apps/start/vite.config.ts
+++ b/apps/start/vite.config.ts
@@ -21,7 +21,7 @@ if (process.env.NITRO) {
nitroV2Plugin({
preset: 'node-server',
compatibilityDate: '2025-10-21',
- }),
+ })
);
} else {
plugins.unshift(cloudflare({ viteEnvironment: { name: 'ssr' } }));
diff --git a/apps/testbed/index.html b/apps/testbed/index.html
index 41a794b69..46a7d7354 100644
--- a/apps/testbed/index.html
+++ b/apps/testbed/index.html
@@ -1,8 +1,8 @@
<!doctype html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Testbed | OpenPanel SDK</title>
</head>
<body>
diff --git a/apps/testbed/src/pages/Cart.tsx b/apps/testbed/src/pages/Cart.tsx
index f1c9983c9..3cfd5449e 100644
--- a/apps/testbed/src/pages/Cart.tsx
+++ b/apps/testbed/src/pages/Cart.tsx
@@ -15,7 +15,9 @@ export function CartPage({ cart, onRemove, onCheckout }: Props) {
<div>
<div className="page-title">Cart</div>
<div className="cart-empty">Your cart is empty.</div>
- <Link to="/"><button type="button">← Back to shop</button></Link>
+ <Link to="/">
+ <button type="button">← Back to shop</button>
+ </Link>
</div>
);
}
@@ -41,7 +43,11 @@ export function CartPage({ cart, onRemove, onCheckout }: Props) {
<td>{item.qty}</td>
<td>${item.price * item.qty}</td>
<td>
- <button type="button" className="danger" onClick={() => onRemove(item.id)}>
+ <button
+ type="button"
+ className="danger"
+ onClick={() => onRemove(item.id)}
+ >
Remove
</button>
</td>
@@ -52,7 +58,9 @@ export function CartPage({ cart, onRemove, onCheckout }: Props) {
<div className="cart-summary">
<div className="cart-total">Total: ${total}</div>
<div className="cart-actions">
- <Link to="/"><button type="button">← Shop</button></Link>
+ <Link to="/">
+ <button type="button">← Shop</button>
+ </Link>
<button type="button" className="primary" onClick={onCheckout}>
Checkout →
</button>
diff --git a/apps/testbed/src/pages/Checkout.tsx b/apps/testbed/src/pages/Checkout.tsx
index 94c9ecb15..01eadf5d2 100644
--- a/apps/testbed/src/pages/Checkout.tsx
+++ b/apps/testbed/src/pages/Checkout.tsx
@@ -14,22 +14,32 @@ export function CheckoutPage({ cart, onPay }: Props) {
<div className="page-title">Checkout</div>
<div className="checkout-form">
<div className="form-group">
- <label className="form-label" htmlFor="card">Card number</label>
+ <label className="form-label" htmlFor="card">
+ Card number
+ </label>
<input id="card" defaultValue="4242 4242 4242 4242" readOnly />
</div>
- <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }}>
+ <div
+ style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }}
+ >
<div className="form-group">
- <label className="form-label" htmlFor="expiry">Expiry</label>
+ <label className="form-label" htmlFor="expiry">
+ Expiry
+ </label>
<input id="expiry" defaultValue="12/28" readOnly />
</div>
<div className="form-group">
- <label className="form-label" htmlFor="cvc">CVC</label>
+ <label className="form-label" htmlFor="cvc">
+ CVC
+ </label>
<input id="cvc" defaultValue="123" readOnly />
</div>
</div>
<div className="checkout-total">Total: ${total}</div>
<div className="checkout-pay-buttons">
- <Link to="/cart"><button type="button">← Back</button></Link>
+ <Link to="/cart">
+ <button type="button">← Back</button>
+ </Link>
<button type="button" className="primary" onClick={() => onPay(true)}>
Pay ${total} (success)
</button>
diff --git a/apps/testbed/src/pages/Login.tsx b/apps/testbed/src/pages/Login.tsx
index ec5b2908b..f7a145c4d 100644
--- a/apps/testbed/src/pages/Login.tsx
+++ b/apps/testbed/src/pages/Login.tsx
@@ -64,8 +64,30 @@ export const PRESET_GROUPS: Group[] = [
},
];
-const FIRST_NAMES = ['Alice', 'Bob', 'Carol', 'Dave', 'Eve', 'Frank', 'Grace', 'Hank', 'Iris', 'Jack'];
-const LAST_NAMES = ['Smith', 'Jones', 'Brown', 'Taylor', 'Wilson', 'Davis', 'Clark', 'Hall', 'Lewis', 'Young'];
+const FIRST_NAMES = [
+ 'Alice',
+ 'Bob',
+ 'Carol',
+ 'Dave',
+ 'Eve',
+ 'Frank',
+ 'Grace',
+ 'Hank',
+ 'Iris',
+ 'Jack',
+];
+const LAST_NAMES = [
+ 'Smith',
+ 'Jones',
+ 'Brown',
+ 'Taylor',
+ 'Wilson',
+ 'Davis',
+ 'Clark',
+ 'Hall',
+ 'Lewis',
+ 'Young',
+];
function randomMock(): User {
const first = FIRST_NAMES[Math.floor(Math.random() * FIRST_NAMES.length)];
diff --git a/apps/testbed/src/pages/Product.tsx b/apps/testbed/src/pages/Product.tsx
index 9eb8d6d37..b14eaaa73 100644
--- a/apps/testbed/src/pages/Product.tsx
+++ b/apps/testbed/src/pages/Product.tsx
@@ -27,7 +27,9 @@ export function ProductPage({ products, onAddToCart }: Props) {
return (
<div>
<div className="page-title">Product not found</div>
- <Link to="/"><button type="button">← Back to shop</button></Link>
+ <Link to="/">
+ <button type="button">← Back to shop</button>
+ </Link>
</div>
);
}
diff --git a/apps/testbed/src/styles.css b/apps/testbed/src/styles.css
index ba8857d8e..2442124b7 100644
--- a/apps/testbed/src/styles.css
+++ b/apps/testbed/src/styles.css
@@ -1,4 +1,6 @@
-*, *::before, *::after {
+*,
+*::before,
+*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
@@ -22,7 +24,9 @@ body {
line-height: 1.5;
}
-button, input, select {
+button,
+input,
+select {
font-family: monospace;
font-size: 14px;
}
diff --git a/docs/migrations-fresh-install/ch-scratch-proxy.ts b/docs/migrations-fresh-install/ch-scratch-proxy.ts
index a39c9632d..0de73b6f2 100644
--- a/docs/migrations-fresh-install/ch-scratch-proxy.ts
+++ b/docs/migrations-fresh-install/ch-scratch-proxy.ts
@@ -22,7 +22,8 @@
* appended to LOG_FILE.
*/
-const UPSTREAM_URL = process.env.UPSTREAM_CLICKHOUSE_URL ?? 'http://127.0.0.1:8123';
+const UPSTREAM_URL =
+ process.env.UPSTREAM_CLICKHOUSE_URL ?? 'http://127.0.0.1:8123';
const LISTEN_PORT = Number(process.env.PROXY_PORT ?? 8199);
const SCRATCH_DATABASE = process.env.SCRATCH_DATABASE ?? '';
const MODE = process.env.PROXY_MODE ?? 'rewrite';
@@ -79,7 +80,10 @@ const isRefused = (target: string, statement: string) => {
? 'still names openpanel'
: null;
}
- if (PROTECTED_DATABASE_TOKEN.test(statement) && !READ_STATEMENT.test(statement)) {
+ if (
+ PROTECTED_DATABASE_TOKEN.test(statement) &&
+ !READ_STATEMENT.test(statement)
+ ) {
return 'non-read statement naming openpanel';
}
if (PROTECTED_DATABASE_TOKEN.test(target)) {
@@ -102,7 +106,8 @@ const server = Bun.serve({
);
const outgoingBody = rewrite(body);
const target = `${outgoing.pathname}?${outgoing.searchParams.get('database') ?? ''}`;
- const statement = outgoingBody || (outgoing.searchParams.get('query') ?? '');
+ const statement =
+ outgoingBody || (outgoing.searchParams.get('query') ?? '');
const inspected = `${outgoing.pathname}${outgoing.search}\n${outgoingBody}`;
const refusal = isRefused(target, statement);
@@ -113,7 +118,9 @@ const server = Bun.serve({
});
}
- append(`[${request.method}] ${outgoing.pathname}${outgoing.search}\n${outgoingBody}`);
+ append(
+ `[${request.method}] ${outgoing.pathname}${outgoing.search}\n${outgoingBody}`
+ );
const headers = new Headers(request.headers);
// The body is rewritten, so any length/encoding the client set is stale.
diff --git a/hub.config.ts b/hub.config.ts
index a4f030a6f..afe153463 100644
--- a/hub.config.ts
+++ b/hub.config.ts
@@ -2,11 +2,16 @@ import { readFileSync } from 'node:fs';
import { join } from 'node:path';
/** The product's MCP on this worktree's API, authenticated with the seed's root client. */
-function seededMcp(w: { dir: string; url(process: string): string }): Record<string, { url: string }> {
+function seededMcp(w: {
+ dir: string;
+ url(process: string): string;
+}): Record<string, { url: string }> {
try {
const seed = JSON.parse(readFileSync(join(w.dir, '.seed.json'), 'utf8'));
if (typeof seed?.mcp?.token !== 'string') return {};
- return { openpanel: { url: `${w.url('api')}/mcp?token=${seed.mcp.token}` } };
+ return {
+ openpanel: { url: `${w.url('api')}/mcp?token=${seed.mcp.token}` },
+ };
} catch {
return {};
}
@@ -20,14 +25,25 @@ export default {
worktreesDir: '.worktrees',
github: 'Openpanel-dev/openpanel',
domains: { local: 'local.openpanel.cc', remote: 'openpanel.cc' },
- install: 'bun install && bun run --filter @openpanel/db codegen && bunx playwright install chromium',
+ install:
+ 'bun install && bun run --filter @openpanel/db codegen && bunx playwright install chromium',
// port = 21000 + block×100 + offset. Main checkout is block 0.
processes: {
// host: label in front of `<name>.<suffix>`; null is the bare `<name>.<suffix>`.
web: { host: null, offset: 0, cmd: 'bun run --filter start dev', cwd: '.' },
- api: { host: 'api', offset: 1, cmd: 'bun run --filter @openpanel/api dev', cwd: '.' },
- studio: { host: 'studio', offset: 2, cmd: 'bun run --filter @openpanel/db studio', cwd: '.' },
+ api: {
+ host: 'api',
+ offset: 1,
+ cmd: 'bun run --filter @openpanel/api dev',
+ cwd: '.',
+ },
+ studio: {
+ host: 'studio',
+ offset: 2,
+ cmd: 'bun run --filter @openpanel/db studio',
+ cwd: '.',
+ },
},
// Injected as process env. Wins over .env because dotenv-cli runs without -o.
@@ -61,8 +77,14 @@ export default {
// A worktree name is a DNS label; a database name is an identifier, so hyphens become underscores.
databases: {
- postgres: { shared: 'postgres', isolated: (n) => `openpanel_${n.replace(/-/g, '_')}` },
- clickhouse: { shared: 'openpanel', isolated: (n) => `openpanel_${n.replace(/-/g, '_')}` },
+ postgres: {
+ shared: 'postgres',
+ isolated: (n) => `openpanel_${n.replace(/-/g, '_')}`,
+ },
+ clickhouse: {
+ shared: 'openpanel',
+ isolated: (n) => `openpanel_${n.replace(/-/g, '_')}`,
+ },
redis: { index: (block) => block }, // always per worktree
kafka: { topics: (n) => [`events-${n}`, `events-${n}-dlq`] },
migrate: 'bun run --filter @openpanel/db migrate:deploy',
@@ -82,11 +104,15 @@ export default {
// The containers belong to the main checkout's compose project, whichever worktree asks.
data: {
- clickhouse: (w) => `docker compose -f ${w.root}/docker-compose.yml exec op-ch clickhouse-client -d ${w.db.clickhouseName}`,
- redis: (w) => `docker compose -f ${w.root}/docker-compose.yml exec op-kv redis-cli -n ${w.db.redisIndex}`,
- postgres: (w) => `docker compose -f ${w.root}/docker-compose.yml exec op-db psql -U postgres ${w.db.postgresName}`,
+ clickhouse: (w) =>
+ `docker compose -f ${w.root}/docker-compose.yml exec op-ch clickhouse-client -d ${w.db.clickhouseName}`,
+ redis: (w) =>
+ `docker compose -f ${w.root}/docker-compose.yml exec op-kv redis-cli -n ${w.db.redisIndex}`,
+ postgres: (w) =>
+ `docker compose -f ${w.root}/docker-compose.yml exec op-db psql -U postgres ${w.db.postgresName}`,
// rpk has no REPL: list this worktree's topics, then leave a shell in the container with rpk on PATH.
- kafka: (w) => `docker compose -f ${w.root}/docker-compose.yml exec op-rp sh -c 'rpk topic list; echo; echo "this worktree: ${w.db.kafkaTopics.join(' ')}"; exec sh'`,
+ kafka: (w) =>
+ `docker compose -f ${w.root}/docker-compose.yml exec op-rp sh -c 'rpk topic list; echo; echo "this worktree: ${w.db.kafkaTopics.join(' ')}"; exec sh'`,
},
// Every agent the hub launches can drive the dashboard in a real browser (--ignore-https-errors
@@ -94,7 +120,15 @@ export default {
// talks to this worktree's own OpenPanel MCP once the seed has written its root-client token.
agents: {
mcp: (w) => ({
- playwright: { command: 'npx', args: ['-y', '@playwright/mcp@latest', '--isolated', '--ignore-https-errors'] },
+ playwright: {
+ command: 'npx',
+ args: [
+ '-y',
+ '@playwright/mcp@latest',
+ '--isolated',
+ '--ignore-https-errors',
+ ],
+ },
...seededMcp(w),
}),
},
diff --git a/packages/core/src/buffers/session-buffer.test.ts b/packages/core/src/buffers/session-buffer.test.ts
index d22fc972d..17e8a41c0 100644
--- a/packages/core/src/buffers/session-buffer.test.ts
+++ b/packages/core/src/buffers/session-buffer.test.ts
@@ -1,11 +1,4 @@
-import {
- afterEach,
- beforeEach,
- describe,
- expect,
- it,
- mock,
-} from 'bun:test';
+import { afterEach, beforeEach, describe, expect, it, mock } from 'bun:test';
import { getRedisCache } from '@openpanel/redis';
import { bufferDepsWithCh } from '../../test/buffer-fixtures';
import type { IServiceCreateEventPayload } from '../modules/event/event.service';
diff --git a/packages/core/src/clients/datacenter-asns.ts b/packages/core/src/clients/datacenter-asns.ts
index 2193a1634..3c0953ab6 100644
--- a/packages/core/src/clients/datacenter-asns.ts
+++ b/packages/core/src/clients/datacenter-asns.ts
@@ -4,5 +4,91 @@
// Autonomous System Numbers belonging to datacenters / hosting providers.
// Used to flag (not block) traffic that is unlikely to be a real end user.
-const datacenterAsns: readonly number[] = [1442,3223,3561,3722,3842,4250,4323,4694,4851,5435,5577,6188,6698,6718,6724,6764,6870,6939,7203,7349,7489,7506,7595,7598,7850,7979,8075,8100,8455,8556,8560,8849,8972,9009,9166,9290,9370,9412,9667,9823,9925,10200,10207,10297,10439,10532,10929,11230,11235,11274,11588,11831,11878,12200,12222,12586,12617,12824,12876,12989,13209,13213,13378,13647,13739,13909,13926,13955,14061,14120,14127,14160,14244,14384,14415,14442,14567,14576,14618,14708,14956,14986,14987,14992,15003,15083,15169,15189,15391,15395,15497,15510,15626,15694,15734,15919,15967,16125,16262,16276,16284,16397,16509,16535,16625,16628,16652,16862,16973,17019,17216,17439,17669,17881,17918,17920,17971,18120,18450,18570,18779,18978,19084,19133,19148,19234,19318,19437,19531,19624,19844,19871,19969,19994,20021,20068,20248,20264,20401,20450,20454,20473,20552,20598,20692,20738,20773,20836,20860,20940,21100,21159,21217,21321,21342,21499,21501,21859,22152,22363,22552,22611,22720,22781,22903,23033,23052,23108,23273,23342,23352,23470,23535,23881,24220,24319,24381,24482,24549,24558,24611,24679,24725,24768,24806,24875,24931,24940,24958,24961,24971,24997,25048,25128,25163,25260,25291,25369,25379,25532,25642,25780,25820,25926,26277,26347,26481,26484,26496,26548,26978,27175,27223,27229,27257,27357,27411,27589,27597,27640,28099,28216,28333,28682,28747,28753,28855,28997,29066,29067,29073,29097,29119,29140,29182,29302,29311,29331,29354,29452,29522,29550,29593,29691,29713,29748,29802,29838,29854,29869,29883,30083,30152,30176,30235,30475,30633,30693,30836,30849,30900,30998,31034,31103,31240,31242,31472,31590,31659,31698,31898,31981,32097,32181,32244,32275,32306,32338,32400,32475,32489,32613,32647,32740,32780,32911,33070,33083,33182,33251,33260,33302,33322,33330,33387,33438,33480,33552,33569,33696,33724,33785,33891,33905,34011,34164,34305,34432,34541,34649,34745,34927,34971,34989,35017,35048,35278,35295,35366,35415,35470,35540,35662,35908,35913,35914,35916,35974,35994,36007,36024,36114,36183,36236,36290,36351,36352,36408,36536,36666,36791,36887,36970,37018,37088,37153,37170,37209,37230,37248,37269,37280,37308,37347,37377,37472,37506,37518,37521,37540,37643,37661,37692,37714,38001,38107,38279,38894,39020,39326,39351,39392,39451,39458,39486,39566,39572,39704,39756,39832,39839,40156,40244,40281,40374,40438,40476,40539,40676,40715,40728,40819,40824,40861,41062,41079,41369,41406,41427,41562,41653,41665,41828,42120,42160,42210,42244,42311,42331,42399,42400,42418,42442,42465,42473,42532,42612,42622,42675,42695,42699,42705,42708,42730,42776,42831,42927,43021,43128,43146,43198,43289,43317,43350,43472,43541,43620,43962,44050,44066,44144,44398,44477,44803,44901,45090,45102,45152,45179,45187,45201,45470,45481,45486,45577,45671,45693,45815,45887,46177,46260,46261,46430,46433,46475,46516,46562,46606,46664,46805,46816,46844,46873,46945,47143,47161,47172,47205,47223,47328,47385,47447,47544,47549,47577,47583,47588,47625,48031,48093,48282,48446,48505,48812,48825,48894,48896,49313,49349,49367,49453,49485,49505,49532,49544,49693,49815,49834,49949,49981,50297,50465,50608,50613,50655,50673,50835,50872,50915,50926,50968,50986,51050,51109,51159,51167,51191,51241,51248,51290,51294,51395,51430,51698,51731,51765,51790,51852,51862,52000,52048,52173,52219,52236,52270,52321,52335,52347,52465,52468,52674,52925,53013,53055,53057,53101,53221,53225,53281,53332,53340,53342,53370,53559,53589,53597,53667,53755,53850,53889,53914,53918,54104,54203,54290,54334,54455,54489,54500,54527,54540,54555,54641,54817,54825,54839,55051,55225,55229,55286,55293,55536,55720,55761,55799,55933,55967,55990,56106,56110,56322,56617,56630,56635,56732,56784,56799,56934,57043,57169,57230,57286,57345,57363,57367,57433,57669,57682,57752,57773,57858,57879,58065,58073,58113,58305,58667,58683,58797,58922,58936,59135,59253,59349,59432,59472,59504,59554,59615,59632,59677,59705,59711,59729,59764,59787,59791,59795,59816,59854,60011,60068,60117,60118,60253,60362,60404,60435,60476,60485,60505,60558,60567,60713,60729,60739,60781,60800,60973,61046,61102,61107,61138,61147,61157,61280,61317,61412,61440,62005,62026,62049,62071,62082,62088,62217,62240,62282,62310,62370,62471,62540,62563,62567,62605,62651,62756,62838,62899,62904,63008,63018,63119,63128,63129,63199,63213,63473,63567,63916,63949,64022,64245,64249,64286,64484,132070,132071,132203,132225,132425,132509,132717,132779,132816,132869,133120,133143,133229,133296,133393,133480,133499,133752,134351,134450,134451,134963,135377,135822,136052,136258,136557,136907,136988,137373,137409,138608,141039,141995,142036,147049,149020,152390,196645,196678,196745,196827,197155,197226,197328,197372,197395,197439,197450,197540,197648,197706,197902,197914,198047,198153,198171,198310,198313,198347,198414,198432,198524,198605,198651,198968,199129,199213,199481,199653,199733,199785,199847,199883,199990,199997,200000,200019,200039,200088,200147,200350,200532,200904,201011,201200,201449,201525,201553,201597,201630,201634,201670,201702,201709,201814,201862,201983,202015,202023,202053,202118,202276,202448,202836,203020,203417,203523,203629,203758,204196,204287,204601,204957,205016,205053,205544,206092,206216,206246,206589,206898,207990,208323,208566,208795,208969,210329,210558,210731,210779,211619,212238,212317,212861,213010,213230,213887,214036,214574,215859,216071,262170,262287,262603,262978,262990,263032,263093,263237,265620,327705,327784,327813,327942,328035,329184,393326,393886,394256,394330,394380,394474,395089,395111,395954,395978,396190,396356,396362,396931,396982,397373,398101,398787,399804,400754];
+const datacenterAsns: readonly number[] = [
+ 1442, 3223, 3561, 3722, 3842, 4250, 4323, 4694, 4851, 5435, 5577, 6188, 6698,
+ 6718, 6724, 6764, 6870, 6939, 7203, 7349, 7489, 7506, 7595, 7598, 7850, 7979,
+ 8075, 8100, 8455, 8556, 8560, 8849, 8972, 9009, 9166, 9290, 9370, 9412, 9667,
+ 9823, 9925, 10200, 10207, 10297, 10439, 10532, 10929, 11230, 11235, 11274,
+ 11588, 11831, 11878, 12200, 12222, 12586, 12617, 12824, 12876, 12989, 13209,
+ 13213, 13378, 13647, 13739, 13909, 13926, 13955, 14061, 14120, 14127, 14160,
+ 14244, 14384, 14415, 14442, 14567, 14576, 14618, 14708, 14956, 14986, 14987,
+ 14992, 15003, 15083, 15169, 15189, 15391, 15395, 15497, 15510, 15626, 15694,
+ 15734, 15919, 15967, 16125, 16262, 16276, 16284, 16397, 16509, 16535, 16625,
+ 16628, 16652, 16862, 16973, 17019, 17216, 17439, 17669, 17881, 17918, 17920,
+ 17971, 18120, 18450, 18570, 18779, 18978, 19084, 19133, 19148, 19234, 19318,
+ 19437, 19531, 19624, 19844, 19871, 19969, 19994, 20021, 20068, 20248, 20264,
+ 20401, 20450, 20454, 20473, 20552, 20598, 20692, 20738, 20773, 20836, 20860,
+ 20940, 21100, 21159, 21217, 21321, 21342, 21499, 21501, 21859, 22152, 22363,
+ 22552, 22611, 22720, 22781, 22903, 23033, 23052, 23108, 23273, 23342, 23352,
+ 23470, 23535, 23881, 24220, 24319, 24381, 24482, 24549, 24558, 24611, 24679,
+ 24725, 24768, 24806, 24875, 24931, 24940, 24958, 24961, 24971, 24997, 25048,
+ 25128, 25163, 25260, 25291, 25369, 25379, 25532, 25642, 25780, 25820, 25926,
+ 26277, 26347, 26481, 26484, 26496, 26548, 26978, 27175, 27223, 27229, 27257,
+ 27357, 27411, 27589, 27597, 27640, 28099, 28216, 28333, 28682, 28747, 28753,
+ 28855, 28997, 29066, 29067, 29073, 29097, 29119, 29140, 29182, 29302, 29311,
+ 29331, 29354, 29452, 29522, 29550, 29593, 29691, 29713, 29748, 29802, 29838,
+ 29854, 29869, 29883, 30083, 30152, 30176, 30235, 30475, 30633, 30693, 30836,
+ 30849, 30900, 30998, 31034, 31103, 31240, 31242, 31472, 31590, 31659, 31698,
+ 31898, 31981, 32097, 32181, 32244, 32275, 32306, 32338, 32400, 32475, 32489,
+ 32613, 32647, 32740, 32780, 32911, 33070, 33083, 33182, 33251, 33260, 33302,
+ 33322, 33330, 33387, 33438, 33480, 33552, 33569, 33696, 33724, 33785, 33891,
+ 33905, 34011, 34164, 34305, 34432, 34541, 34649, 34745, 34927, 34971, 34989,
+ 35017, 35048, 35278, 35295, 35366, 35415, 35470, 35540, 35662, 35908, 35913,
+ 35914, 35916, 35974, 35994, 36007, 36024, 36114, 36183, 36236, 36290, 36351,
+ 36352, 36408, 36536, 36666, 36791, 36887, 36970, 37018, 37088, 37153, 37170,
+ 37209, 37230, 37248, 37269, 37280, 37308, 37347, 37377, 37472, 37506, 37518,
+ 37521, 37540, 37643, 37661, 37692, 37714, 38001, 38107, 38279, 38894, 39020,
+ 39326, 39351, 39392, 39451, 39458, 39486, 39566, 39572, 39704, 39756, 39832,
+ 39839, 40156, 40244, 40281, 40374, 40438, 40476, 40539, 40676, 40715, 40728,
+ 40819, 40824, 40861, 41062, 41079, 41369, 41406, 41427, 41562, 41653, 41665,
+ 41828, 42120, 42160, 42210, 42244, 42311, 42331, 42399, 42400, 42418, 42442,
+ 42465, 42473, 42532, 42612, 42622, 42675, 42695, 42699, 42705, 42708, 42730,
+ 42776, 42831, 42927, 43021, 43128, 43146, 43198, 43289, 43317, 43350, 43472,
+ 43541, 43620, 43962, 44050, 44066, 44144, 44398, 44477, 44803, 44901, 45090,
+ 45102, 45152, 45179, 45187, 45201, 45470, 45481, 45486, 45577, 45671, 45693,
+ 45815, 45887, 46177, 46260, 46261, 46430, 46433, 46475, 46516, 46562, 46606,
+ 46664, 46805, 46816, 46844, 46873, 46945, 47143, 47161, 47172, 47205, 47223,
+ 47328, 47385, 47447, 47544, 47549, 47577, 47583, 47588, 47625, 48031, 48093,
+ 48282, 48446, 48505, 48812, 48825, 48894, 48896, 49313, 49349, 49367, 49453,
+ 49485, 49505, 49532, 49544, 49693, 49815, 49834, 49949, 49981, 50297, 50465,
+ 50608, 50613, 50655, 50673, 50835, 50872, 50915, 50926, 50968, 50986, 51050,
+ 51109, 51159, 51167, 51191, 51241, 51248, 51290, 51294, 51395, 51430, 51698,
+ 51731, 51765, 51790, 51852, 51862, 52000, 52048, 52173, 52219, 52236, 52270,
+ 52321, 52335, 52347, 52465, 52468, 52674, 52925, 53013, 53055, 53057, 53101,
+ 53221, 53225, 53281, 53332, 53340, 53342, 53370, 53559, 53589, 53597, 53667,
+ 53755, 53850, 53889, 53914, 53918, 54104, 54203, 54290, 54334, 54455, 54489,
+ 54500, 54527, 54540, 54555, 54641, 54817, 54825, 54839, 55051, 55225, 55229,
+ 55286, 55293, 55536, 55720, 55761, 55799, 55933, 55967, 55990, 56106, 56110,
+ 56322, 56617, 56630, 56635, 56732, 56784, 56799, 56934, 57043, 57169, 57230,
+ 57286, 57345, 57363, 57367, 57433, 57669, 57682, 57752, 57773, 57858, 57879,
+ 58065, 58073, 58113, 58305, 58667, 58683, 58797, 58922, 58936, 59135, 59253,
+ 59349, 59432, 59472, 59504, 59554, 59615, 59632, 59677, 59705, 59711, 59729,
+ 59764, 59787, 59791, 59795, 59816, 59854, 60011, 60068, 60117, 60118, 60253,
+ 60362, 60404, 60435, 60476, 60485, 60505, 60558, 60567, 60713, 60729, 60739,
+ 60781, 60800, 60973, 61046, 61102, 61107, 61138, 61147, 61157, 61280, 61317,
+ 61412, 61440, 62005, 62026, 62049, 62071, 62082, 62088, 62217, 62240, 62282,
+ 62310, 62370, 62471, 62540, 62563, 62567, 62605, 62651, 62756, 62838, 62899,
+ 62904, 63008, 63018, 63119, 63128, 63129, 63199, 63213, 63473, 63567, 63916,
+ 63949, 64022, 64245, 64249, 64286, 64484, 132070, 132071, 132203, 132225,
+ 132425, 132509, 132717, 132779, 132816, 132869, 133120, 133143, 133229,
+ 133296, 133393, 133480, 133499, 133752, 134351, 134450, 134451, 134963,
+ 135377, 135822, 136052, 136258, 136557, 136907, 136988, 137373, 137409,
+ 138608, 141039, 141995, 142036, 147049, 149020, 152390, 196645, 196678,
+ 196745, 196827, 197155, 197226, 197328, 197372, 197395, 197439, 197450,
+ 197540, 197648, 197706, 197902, 197914, 198047, 198153, 198171, 198310,
+ 198313, 198347, 198414, 198432, 198524, 198605, 198651, 198968, 199129,
+ 199213, 199481, 199653, 199733, 199785, 199847, 199883, 199990, 199997,
+ 200000, 200019, 200039, 200088, 200147, 200350, 200532, 200904, 201011,
+ 201200, 201449, 201525, 201553, 201597, 201630, 201634, 201670, 201702,
+ 201709, 201814, 201862, 201983, 202015, 202023, 202053, 202118, 202276,
+ 202448, 202836, 203020, 203417, 203523, 203629, 203758, 204196, 204287,
+ 204601, 204957, 205016, 205053, 205544, 206092, 206216, 206246, 206589,
+ 206898, 207990, 208323, 208566, 208795, 208969, 210329, 210558, 210731,
+ 210779, 211619, 212238, 212317, 212861, 213010, 213230, 213887, 214036,
+ 214574, 215859, 216071, 262170, 262287, 262603, 262978, 262990, 263032,
+ 263093, 263237, 265620, 327705, 327784, 327813, 327942, 328035, 329184,
+ 393326, 393886, 394256, 394330, 394380, 394474, 395089, 395111, 395954,
+ 395978, 396190, 396356, 396362, 396931, 396982, 397373, 398101, 398787,
+ 399804, 400754,
+];
export default datacenterAsns;
diff --git a/packages/core/src/modules/cohort/cohort.constants.test.ts b/packages/core/src/modules/cohort/cohort.constants.test.ts
index f8403365c..7d7d0d147 100644
--- a/packages/core/src/modules/cohort/cohort.constants.test.ts
+++ b/packages/core/src/modules/cohort/cohort.constants.test.ts
@@ -22,14 +22,16 @@ describe('zAbsoluteTimeframe', () => {
).toBe(true);
});
- test.each(["2024-01-01') OR 1=1 --", '2024-1-1', 'yesterday', ''])(
- 'rejects a non-date start (%s)',
- (start) => {
- expect(
- zAbsoluteTimeframe.safeParse({ type: 'absolute', start }).success
- ).toBe(false);
- }
- );
+ test.each([
+ "2024-01-01') OR 1=1 --",
+ '2024-1-1',
+ 'yesterday',
+ '',
+ ])('rejects a non-date start (%s)', (start) => {
+ expect(
+ zAbsoluteTimeframe.safeParse({ type: 'absolute', start }).success
+ ).toBe(false);
+ });
test('rejects a non-date end', () => {
expect(
@@ -43,12 +45,12 @@ describe('zAbsoluteTimeframe', () => {
});
describe('zFrequency', () => {
- test.each(['eq', 'lte'] as const)(
- 'accepts a count of 0 with %s ("never did this event")',
- (operator) => {
- expect(zFrequency.safeParse({ operator, count: 0 }).success).toBe(true);
- }
- );
+ test.each([
+ 'eq',
+ 'lte',
+ ] as const)('accepts a count of 0 with %s ("never did this event")', (operator) => {
+ expect(zFrequency.safeParse({ operator, count: 0 }).success).toBe(true);
+ });
test('rejects a count of 0 with gte, which would match every profile', () => {
expect(zFrequency.safeParse({ operator: 'gte', count: 0 }).success).toBe(
@@ -56,12 +58,13 @@ describe('zFrequency', () => {
);
});
- test.each(['gte', 'eq', 'lte'] as const)(
- 'still accepts positive counts with %s',
- (operator) => {
- expect(zFrequency.safeParse({ operator, count: 3 }).success).toBe(true);
- }
- );
+ test.each([
+ 'gte',
+ 'eq',
+ 'lte',
+ ] as const)('still accepts positive counts with %s', (operator) => {
+ expect(zFrequency.safeParse({ operator, count: 3 }).success).toBe(true);
+ });
test('still rejects negative and fractional counts', () => {
expect(zFrequency.safeParse({ operator: 'eq', count: -1 }).success).toBe(
diff --git a/packages/core/src/modules/cohort/src/cohort-event-sql.test.ts b/packages/core/src/modules/cohort/src/cohort-event-sql.test.ts
index 5dfac60cd..430ea67bc 100644
--- a/packages/core/src/modules/cohort/src/cohort-event-sql.test.ts
+++ b/packages/core/src/modules/cohort/src/cohort-event-sql.test.ts
@@ -118,27 +118,27 @@ function outsideExclusion(query: string): string {
}
describe('buildEventCriteriaQuery zero frequency', () => {
- test.each(['eq', 'lte'] as const)(
- 'excludes anyone who did the event when the count is 0 (%s)',
- (operator) => {
- const { query, query_params } = render(
- buildEventCriteriaQuery(
- PROJECT_ID,
- frequencyCriteria({ operator, count: 0 })
- )
- );
-
- // The summary MV has no row for zero occurrences, so a HAVING can never
- // match here — the query has to be inverted.
- expect(query).not.toContain('HAVING');
- expect(query).toContain('SELECT DISTINCT id AS profile_id');
- expect(query).toContain('FROM profiles');
- expect(query).toContain('NOT IN (');
- expect(query).toContain('FROM event_profile_summary_mv');
- expect(query).toContain('name = {p3:String}');
- expect(query_params.p3).toBe('subscription_started');
- }
- );
+ test.each([
+ 'eq',
+ 'lte',
+ ] as const)('excludes anyone who did the event when the count is 0 (%s)', (operator) => {
+ const { query, query_params } = render(
+ buildEventCriteriaQuery(
+ PROJECT_ID,
+ frequencyCriteria({ operator, count: 0 })
+ )
+ );
+
+ // The summary MV has no row for zero occurrences, so a HAVING can never
+ // match here — the query has to be inverted.
+ expect(query).not.toContain('HAVING');
+ expect(query).toContain('SELECT DISTINCT id AS profile_id');
+ expect(query).toContain('FROM profiles');
+ expect(query).toContain('NOT IN (');
+ expect(query).toContain('FROM event_profile_summary_mv');
+ expect(query).toContain('name = {p3:String}');
+ expect(query_params.p3).toBe('subscription_started');
+ });
test('gives eq 0 and lte 0 the same query', () => {
expect(
@@ -218,24 +218,21 @@ describe('buildEventCriteriaQuery zero frequency', () => {
['gte', 1, '>='],
['eq', 2, '='],
['lte', 3, '<='],
- ] as const)(
- 'still groups and filters for positive counts (%s %i)',
- (operator, count, comparison) => {
- const { query, query_params } = render(
- buildEventCriteriaQuery(
- PROJECT_ID,
- frequencyCriteria({ operator, count })
- )
- );
-
- expect(query).toContain('GROUP BY profile_id');
- expect(query).toContain(
- `HAVING countMerge(event_count) ${comparison} {p4:UInt64}`
- );
- expect(query_params.p4).toBe(count);
- expect(query).not.toContain('FROM profiles');
- }
- );
+ ] as const)('still groups and filters for positive counts (%s %i)', (operator, count, comparison) => {
+ const { query, query_params } = render(
+ buildEventCriteriaQuery(
+ PROJECT_ID,
+ frequencyCriteria({ operator, count })
+ )
+ );
+
+ expect(query).toContain('GROUP BY profile_id');
+ expect(query).toContain(
+ `HAVING countMerge(event_count) ${comparison} {p4:UInt64}`
+ );
+ expect(query_params.p4).toBe(count);
+ expect(query).not.toContain('FROM profiles');
+ });
});
describe('buildEventBasedCohortQuery with a zero-count criterion', () => {
diff --git a/packages/core/src/modules/group/group.service.ts b/packages/core/src/modules/group/group.service.ts
index bc350e974..e70f9bbe1 100644
--- a/packages/core/src/modules/group/group.service.ts
+++ b/packages/core/src/modules/group/group.service.ts
@@ -526,9 +526,8 @@ export function createGroupService(
id: string,
projectId: string
): ReturnType<typeof getGroupById> => getGroupById(deps, id, projectId),
- upsertGroup: (
- input: IServiceUpsertGroup
- ): ReturnType<typeof upsertGroup> => upsertGroup(deps, input),
+ upsertGroup: (input: IServiceUpsertGroup): ReturnType<typeof upsertGroup> =>
+ upsertGroup(deps, input),
getGroupList: (
options: GetGroupListOptions
): ReturnType<typeof getGroupList> => getGroupList(deps, options),
@@ -540,15 +539,17 @@ export function createGroupService(
getGroupListCount(deps, options),
getGroupTypes: (projectId: string): ReturnType<typeof getGroupTypes> =>
getGroupTypes(deps, projectId),
- createGroup: (
- input: IServiceUpsertGroup
- ): ReturnType<typeof createGroup> => createGroup(deps, input),
+ createGroup: (input: IServiceUpsertGroup): ReturnType<typeof createGroup> =>
+ createGroup(deps, input),
updateGroup: (
id: string,
projectId: string,
- data: { type?: string; name?: string; properties?: Record<string, unknown> }
- ): ReturnType<typeof updateGroup> =>
- updateGroup(deps, id, projectId, data),
+ data: {
+ type?: string;
+ name?: string;
+ properties?: Record<string, unknown>;
+ }
+ ): ReturnType<typeof updateGroup> => updateGroup(deps, id, projectId, data),
deleteGroup: (
id: string,
projectId: string
diff --git a/packages/core/src/modules/import/src/providers/mixpanel.ts b/packages/core/src/modules/import/src/providers/mixpanel.ts
index 9056186b2..b7d0c1b96 100644
--- a/packages/core/src/modules/import/src/providers/mixpanel.ts
+++ b/packages/core/src/modules/import/src/providers/mixpanel.ts
@@ -1,9 +1,6 @@
import { randomUUID } from 'node:crypto';
import { isSameDomain, parsePath, toDots } from '@openpanel/shared';
-import {
- parseUserAgent,
- type UserAgentInfo,
-} from '@openpanel/shared/server';
+import { parseUserAgent, type UserAgentInfo } from '@openpanel/shared/server';
import { z } from 'zod';
import type { Logger } from '../../../../logger';
// core's own date helper, not @openpanel/db's — see umami.ts's header.
diff --git a/packages/core/src/modules/insight/src/store.ts b/packages/core/src/modules/insight/src/store.ts
index a545c6813..82fd34c88 100644
--- a/packages/core/src/modules/insight/src/store.ts
+++ b/packages/core/src/modules/insight/src/store.ts
@@ -114,7 +114,11 @@ export function createInsightStore(deps: ServiceDeps): InsightStore {
direction: metrics.direction ?? null,
impactScore: metrics.impactScore,
severityBand: metrics.severityBand ?? null,
- version: prev ? (decision.material ? prev.version + 1 : prev.version) : 1,
+ version: prev
+ ? decision.material
+ ? prev.version + 1
+ : prev.version
+ : 1,
windowStart: window.start,
windowEnd: window.end,
lastSeenAt: now,
@@ -208,9 +212,7 @@ export function createInsightStore(deps: ServiceDeps): InsightStore {
changeFrom: changeFrom
? (changeFrom as Prisma.InputJsonValue)
: DbNull,
- changeTo: changeTo
- ? (changeTo as Prisma.InputJsonValue)
- : DbNull,
+ changeTo: changeTo ? (changeTo as Prisma.InputJsonValue) : DbNull,
createdAt: now,
},
});
diff --git a/packages/core/src/modules/integration/src/object-store/s3-adapter.ts b/packages/core/src/modules/integration/src/object-store/s3-adapter.ts
index 2f61290e0..9e7451746 100644
--- a/packages/core/src/modules/integration/src/object-store/s3-adapter.ts
+++ b/packages/core/src/modules/integration/src/object-store/s3-adapter.ts
@@ -9,7 +9,11 @@ import {
S3Client,
} from '@aws-sdk/client-s3';
import { AssumeRoleCommand, STSClient } from '@aws-sdk/client-sts';
-import { assertSafeUrl, createPinnedLookup, decryptCredential } from '@openpanel/shared/server';
+import {
+ assertSafeUrl,
+ createPinnedLookup,
+ decryptCredential,
+} from '@openpanel/shared/server';
import {
callProvider,
ProviderError,
diff --git a/packages/core/src/modules/overview/src/pages.sql.test.ts b/packages/core/src/modules/overview/src/pages.sql.test.ts
index f6285611f..86cc4b75f 100644
--- a/packages/core/src/modules/overview/src/pages.sql.test.ts
+++ b/packages/core/src/modules/overview/src/pages.sql.test.ts
@@ -26,7 +26,12 @@ beforeAll(async () => {
describe('pages.sql — parses against ClickHouse', () => {
it('topPagesQuery — no search', async () => {
await explain(
- PG.topPagesQuery({ projectId: PROJECT_ID, startDate: START, endDate: END, limit: 20 })
+ PG.topPagesQuery({
+ projectId: PROJECT_ID,
+ startDate: START,
+ endDate: END,
+ limit: 20,
+ })
);
});
@@ -44,7 +49,11 @@ describe('pages.sql — parses against ClickHouse', () => {
it('topPagesQuery — no limit', async () => {
await explain(
- PG.topPagesQuery({ projectId: PROJECT_ID, startDate: START, endDate: END })
+ PG.topPagesQuery({
+ projectId: PROJECT_ID,
+ startDate: START,
+ endDate: END,
+ })
);
});
diff --git a/packages/db/prisma/prisma-json-types.ts b/packages/db/prisma/prisma-json-types.ts
index a76868835..3ef1a3659 100644
--- a/packages/db/prisma/prisma-json-types.ts
+++ b/packages/db/prisma/prisma-json-types.ts
@@ -52,7 +52,7 @@ function parseSchemaForJsonTypes(schemaPath: string): JsonFieldMapping[] {
function processGeneratedFiles(
generatedDir: string,
- mappings: JsonFieldMapping[],
+ mappings: JsonFieldMapping[]
): void {
// Process the main files in the generated directory
const mainFiles = [
@@ -100,7 +100,7 @@ function processGeneratedFiles(
function replaceJsonValueInFileForModel(
filePath: string,
- mappings: JsonFieldMapping[],
+ mappings: JsonFieldMapping[]
): void {
let content = readFileSync(filePath, 'utf-8');
let modified = false;
@@ -109,12 +109,12 @@ function replaceJsonValueInFileForModel(
// Pattern 1: Simple runtime.JsonValue replacement (for select/return types)
const simpleJsonValueRegex = new RegExp(
`\\b${mapping.field}:\\s*runtime\\.JsonValue\\b`,
- 'g',
+ 'g'
);
if (simpleJsonValueRegex.test(content)) {
content = content.replace(
simpleJsonValueRegex,
- `${mapping.field}: PrismaJson.${mapping.type}`,
+ `${mapping.field}: PrismaJson.${mapping.type}`
);
modified = true;
}
@@ -122,12 +122,12 @@ function replaceJsonValueInFileForModel(
// Pattern 2: runtime.InputJsonValue with optional JsonNullValueInput (for create/update inputs)
const inputJsonValueRegex = new RegExp(
`\\b${mapping.field}:\\s*(?:Prisma\\.JsonNullValueInput\\s*\\|\\s*)?runtime\\.InputJsonValue\\b`,
- 'g',
+ 'g'
);
if (inputJsonValueRegex.test(content)) {
content = content.replace(
inputJsonValueRegex,
- `${mapping.field}: PrismaJson.${mapping.type}`,
+ `${mapping.field}: PrismaJson.${mapping.type}`
);
modified = true;
}
@@ -135,12 +135,12 @@ function replaceJsonValueInFileForModel(
// Pattern 3: Optional runtime.InputJsonValue with optional JsonNullValueInput
const optionalInputJsonValueRegex = new RegExp(
`\\b${mapping.field}\\?:\\s*(?:Prisma\\.JsonNullValueInput\\s*\\|\\s*)?runtime\\.InputJsonValue\\b`,
- 'g',
+ 'g'
);
if (optionalInputJsonValueRegex.test(content)) {
content = content.replace(
optionalInputJsonValueRegex,
- `${mapping.field}?: PrismaJson.${mapping.type}`,
+ `${mapping.field}?: PrismaJson.${mapping.type}`
);
modified = true;
}
@@ -151,7 +151,7 @@ function replaceJsonValueInFileForModel(
if (unionJsonValueRegex.test(content)) {
content = content.replace(
unionJsonValueRegex,
- `$1PrismaJson.${mapping.type}`,
+ `$1PrismaJson.${mapping.type}`
);
modified = true;
}
@@ -161,7 +161,7 @@ function replaceJsonValueInFileForModel(
if (simpleInputJsonValueRegex.test(content)) {
content = content.replace(
simpleInputJsonValueRegex,
- `| PrismaJson.${mapping.type}`,
+ `| PrismaJson.${mapping.type}`
);
modified = true;
}
@@ -169,12 +169,12 @@ function replaceJsonValueInFileForModel(
// Pattern 6: Optional union types with JsonNullValueInput | runtime.InputJsonValue
const optionalUnionJsonValueRegex = new RegExp(
`\\b${mapping.field}\\?:\\s*(?:Prisma\\.JsonNullValueInput\\s*\\|\\s*)?runtime\\.InputJsonValue\\b`,
- 'g',
+ 'g'
);
if (optionalUnionJsonValueRegex.test(content)) {
content = content.replace(
optionalUnionJsonValueRegex,
- `${mapping.field}?: PrismaJson.${mapping.type}`,
+ `${mapping.field}?: PrismaJson.${mapping.type}`
);
modified = true;
}
diff --git a/packages/db/scripts/set-subscription-state.ts b/packages/db/scripts/set-subscription-state.ts
index 71362534e..76f229922 100644
--- a/packages/db/scripts/set-subscription-state.ts
+++ b/packages/db/scripts/set-subscription-state.ts
@@ -135,10 +135,13 @@ async function main() {
delete process.env.SELF_HOSTED;
const resolved = getSubscriptionState(recipe);
- console.log(`Set ${orgId} -> requested "${state}", resolves to "${resolved}"`);
+ console.log(
+ `Set ${orgId} -> requested "${state}", resolves to "${resolved}"`
+ );
console.table({
subscriptionStatus: recipe.subscriptionStatus,
- subscriptionCanceledAt: recipe.subscriptionCanceledAt?.toISOString() ?? null,
+ subscriptionCanceledAt:
+ recipe.subscriptionCanceledAt?.toISOString() ?? null,
subscriptionStartsAt: recipe.subscriptionStartsAt?.toISOString() ?? null,
subscriptionEndsAt: recipe.subscriptionEndsAt?.toISOString() ?? null,
});
diff --git a/packages/db/src/clickhouse/round-robin.test.ts b/packages/db/src/clickhouse/round-robin.test.ts
index 73d0faba4..52dfa8019 100644
--- a/packages/db/src/clickhouse/round-robin.test.ts
+++ b/packages/db/src/clickhouse/round-robin.test.ts
@@ -20,25 +20,23 @@ describe('isRetriableConnectionError', () => {
{
label: 'SQL syntax error',
err: new Error(
- 'Code: 62, DB::Exception: Syntax error: failed at position 42',
+ 'Code: 62, DB::Exception: Syntax error: failed at position 42'
),
},
{
label: 'Unknown identifier (e.g. wrong column)',
- err: new Error(
- "Code: 47, DB::Exception: Unknown identifier 'fooooo'",
- ),
+ err: new Error("Code: 47, DB::Exception: Unknown identifier 'fooooo'"),
},
{
label: 'ILLEGAL_AGGREGATION',
err: new Error(
- 'Code: 184, DB::Exception: Aggregate function max(...) is found in WHERE',
+ 'Code: 184, DB::Exception: Aggregate function max(...) is found in WHERE'
),
},
{
label: 'Missing columns',
err: new Error(
- 'Code: 47, DB::Exception: Missing columns: a, b while processing query',
+ 'Code: 47, DB::Exception: Missing columns: a, b while processing query'
),
},
{
@@ -48,13 +46,13 @@ describe('isRetriableConnectionError', () => {
{
label: 'MEMORY_LIMIT_EXCEEDED',
err: new Error(
- 'Code: 241, DB::Exception: Memory limit (for query) exceeded',
+ 'Code: 241, DB::Exception: Memory limit (for query) exceeded'
),
},
{
label: 'TIMEOUT_EXCEEDED — server-side query timeout',
err: new Error(
- 'Code: 159, DB::Exception: Timeout exceeded: elapsed 60.001 sec',
+ 'Code: 159, DB::Exception: Timeout exceeded: elapsed 60.001 sec'
),
},
{
@@ -69,9 +67,7 @@ describe('isRetriableConnectionError', () => {
},
{
label: 'CH error whose body happens to mention "connect"',
- err: new Error(
- 'Code: 999, DB::Exception: Cannot connect to ZooKeeper',
- ),
+ err: new Error('Code: 999, DB::Exception: Cannot connect to ZooKeeper'),
},
];
@@ -110,10 +106,9 @@ describe('isRetriableConnectionError', () => {
},
{
label: 'EAI_AGAIN (transient DNS)',
- err: Object.assign(
- new Error('getaddrinfo EAI_AGAIN ch.internal'),
- { code: 'EAI_AGAIN' },
- ),
+ err: Object.assign(new Error('getaddrinfo EAI_AGAIN ch.internal'), {
+ code: 'EAI_AGAIN',
+ }),
},
{
label: 'EPIPE on broken socket',
@@ -275,7 +270,8 @@ describe('isRetriableConnectionError', () => {
expected: 'transient',
},
{
- label: 'CH TOO_MANY_SIMULTANEOUS_QUERIES (@clickhouse/client parsed shape)',
+ label:
+ 'CH TOO_MANY_SIMULTANEOUS_QUERIES (@clickhouse/client parsed shape)',
err: Object.assign(
new Error('Too many simultaneous queries. Maximum: 100.'),
{ code: '202', type: 'TOO_MANY_SIMULTANEOUS_QUERIES' }
@@ -283,7 +279,8 @@ describe('isRetriableConnectionError', () => {
expected: 'transient',
},
{
- label: 'CH TOO_MANY_SIMULTANEOUS_QUERIES (numeric code from a re-wrapping layer)',
+ label:
+ 'CH TOO_MANY_SIMULTANEOUS_QUERIES (numeric code from a re-wrapping layer)',
err: Object.assign(new Error('query rejected'), { code: 202 }),
expected: 'transient',
},
diff --git a/packages/email/src/components/button.tsx b/packages/email/src/components/button.tsx
index bb1b5bff4..7a1553087 100644
--- a/packages/email/src/components/button.tsx
+++ b/packages/email/src/components/button.tsx
@@ -6,7 +6,11 @@ export function Button({
href,
children,
style,
-}: { href: string; children: React.ReactNode; style?: React.CSSProperties }) {
+}: {
+ href: string;
+ children: React.ReactNode;
+ style?: React.CSSProperties;
+}) {
return (
<EmailButton
href={href}
diff --git a/packages/email/src/emails/onboarding-dashboards.tsx b/packages/email/src/emails/onboarding-dashboards.tsx
index 1f0892d0e..4449ccb74 100644
--- a/packages/email/src/emails/onboarding-dashboards.tsx
+++ b/packages/email/src/emails/onboarding-dashboards.tsx
@@ -38,7 +38,7 @@ export function OnboardingDashboards({
<Link
href={withUtm(
'https://openpanel.dev/docs/get-started/install-openpanel',
- 'onboarding-dashboards',
+ 'onboarding-dashboards'
)}
>
install guide
@@ -46,8 +46,8 @@ export function OnboardingDashboards({
.
</Text>
<Text>
- If something about the product put you off, I'd like to know what.
- One line is enough.
+ If something about the product put you off, I'd like to know what. One
+ line is enough.
</Text>
<Text>Carl</Text>
</Layout>
diff --git a/packages/email/src/emails/onboarding-feature-request.tsx b/packages/email/src/emails/onboarding-feature-request.tsx
index 772723ca0..a67e7f927 100644
--- a/packages/email/src/emails/onboarding-feature-request.tsx
+++ b/packages/email/src/emails/onboarding-feature-request.tsx
@@ -26,7 +26,12 @@ export function OnboardingFeatureRequest({
<Text>
Just reply to this email. If you'd rather post publicly, the feedback
board is at{' '}
- <Link href={withUtm('https://feedback.openpanel.dev', 'onboarding-feature-request')}>
+ <Link
+ href={withUtm(
+ 'https://feedback.openpanel.dev',
+ 'onboarding-feature-request'
+ )}
+ >
feedback.openpanel.dev
</Link>
.
diff --git a/packages/email/src/emails/onboarding-trial-ending.tsx b/packages/email/src/emails/onboarding-trial-ending.tsx
index af1a95047..c87f38a17 100644
--- a/packages/email/src/emails/onboarding-trial-ending.tsx
+++ b/packages/email/src/emails/onboarding-trial-ending.tsx
@@ -44,7 +44,7 @@ export function OnboardingTrialEnding({
<Link
href={withUtm(
'https://openpanel.dev/docs/get-started/install-openpanel',
- 'onboarding-trial-ending',
+ 'onboarding-trial-ending'
)}
>
install guide
diff --git a/packages/email/src/emails/onboarding-welcome.tsx b/packages/email/src/emails/onboarding-welcome.tsx
index ab0a3eb83..efe12d5e9 100644
--- a/packages/email/src/emails/onboarding-welcome.tsx
+++ b/packages/email/src/emails/onboarding-welcome.tsx
@@ -51,7 +51,7 @@ export function OnboardingWelcome({
key="install"
href={withUtm(
'https://openpanel.dev/docs/get-started/install-openpanel',
- 'onboarding-welcome',
+ 'onboarding-welcome'
)}
>
Install the tracking script
@@ -60,7 +60,7 @@ export function OnboardingWelcome({
key="track"
href={withUtm(
'https://openpanel.dev/docs/get-started/track-events',
- 'onboarding-welcome',
+ 'onboarding-welcome'
)}
>
Track custom events
diff --git a/packages/email/src/emails/onboarding-what-to-track.tsx b/packages/email/src/emails/onboarding-what-to-track.tsx
index fb9dfa1bd..bde868878 100644
--- a/packages/email/src/emails/onboarding-what-to-track.tsx
+++ b/packages/email/src/emails/onboarding-what-to-track.tsx
@@ -57,7 +57,7 @@ export function OnboardingWhatToTrack({
<Link
href={withUtm(
'https://openpanel.dev/docs/get-started/install-openpanel',
- 'onboarding-what-to-track',
+ 'onboarding-what-to-track'
)}
>
install guide
diff --git a/packages/email/src/emails/weekly-digest.tsx b/packages/email/src/emails/weekly-digest.tsx
index bb8b9bd37..839006881 100644
--- a/packages/email/src/emails/weekly-digest.tsx
+++ b/packages/email/src/emails/weekly-digest.tsx
@@ -16,13 +16,13 @@ export const zWeeklyDigest = z.object({
value: z.string(),
delta: z.string().optional(),
direction: z.enum(['up', 'down', 'flat']).optional(),
- }),
+ })
),
insights: z.array(
z.object({
title: z.string(),
summary: z.string().optional(),
- }),
+ })
),
});
diff --git a/packages/email/src/emails/wind-down-expired.tsx b/packages/email/src/emails/wind-down-expired.tsx
index d1731937f..668bf5e64 100644
--- a/packages/email/src/emails/wind-down-expired.tsx
+++ b/packages/email/src/emails/wind-down-expired.tsx
@@ -54,7 +54,9 @@ export function WindDownExpired({
const mcpPitch = (
<Text>
A lot has shipped since your trial — including our{' '}
- <Link href={withUtm('https://openpanel.dev/docs/mcp', 'wind-down-expired')}>
+ <Link
+ href={withUtm('https://openpanel.dev/docs/mcp', 'wind-down-expired')}
+ >
MCP server
</Link>
: connect Claude, Cursor, or any MCP client and ask questions about this
@@ -76,7 +78,9 @@ export function WindDownExpired({
{greeting}
<Text>
Your OpenPanel tracking is still running
- {trialEndedDate ? `, even though your trial ended ${trialEndedDate}` : ''}
+ {trialEndedDate
+ ? `, even though your trial ended ${trialEndedDate}`
+ : ''}
.
{recentEventsCount
? ` You've sent ${formatEvents(recentEventsCount)} events in the last 30 days and we've recorded every one of them.`
diff --git a/packages/email/src/index.tsx b/packages/email/src/index.tsx
index d27437dab..6d1d7e13d 100644
--- a/packages/email/src/index.tsx
+++ b/packages/email/src/index.tsx
@@ -35,7 +35,7 @@ export async function sendEmail<T extends TemplateKey>(
options: {
to: string;
data: z.infer<Templates[T]['schema']>;
- },
+ }
) {
const { to, data } = options;
const template = templates[templateKey];
@@ -58,7 +58,7 @@ export async function sendEmail<T extends TemplateKey>(
if (unsubscribed) {
console.log(
- `Skipping email to ${to} - unsubscribed from ${template.category}`,
+ `Skipping email to ${to} - unsubscribed from ${template.category}`
);
return null;
}
@@ -77,7 +77,7 @@ export async function sendEmail<T extends TemplateKey>(
if (process.env.SMTP_HOST) {
try {
const html = await render(
- <template.Component {...(props.data as any)} />,
+ <template.Component {...(props.data as any)} />
);
const transport = createSmtpTransport();
const res = await transport.sendMail({
diff --git a/packages/email/src/unsubscribe.ts b/packages/email/src/unsubscribe.ts
index 1a6ced129..69da61ccc 100644
--- a/packages/email/src/unsubscribe.ts
+++ b/packages/email/src/unsubscribe.ts
@@ -6,7 +6,10 @@ const SECRET =
process.env.SECRET ||
'default-secret-change-in-production';
-export function generateUnsubscribeToken(email: string, category: string): string {
+export function generateUnsubscribeToken(
+ email: string,
+ category: string
+): string {
const data = `${email}:${category}`;
return createHmac('sha256', SECRET).update(data).digest('hex');
}
@@ -14,7 +17,7 @@ export function generateUnsubscribeToken(email: string, category: string): strin
export function verifyUnsubscribeToken(
email: string,
category: string,
- token: string,
+ token: string
): boolean {
const expectedToken = generateUnsubscribeToken(email, category);
const tokenBuffer = Buffer.from(token, 'hex');
diff --git a/packages/payments/package.json b/packages/payments/package.json
index 4832c0586..9e4bd44a7 100644
--- a/packages/payments/package.json
+++ b/packages/payments/package.json
@@ -27,4 +27,4 @@
"inquirer-autocomplete-prompt": "3.0.1",
"typescript": "catalog:"
}
-}
\ No newline at end of file
+}
diff --git a/packages/payments/scripts/create-checkout-link.ts b/packages/payments/scripts/create-checkout-link.ts
index 14b2bee08..c9f52bfe2 100644
--- a/packages/payments/scripts/create-checkout-link.ts
+++ b/packages/payments/scripts/create-checkout-link.ts
@@ -31,13 +31,15 @@ async function promptForInput(polar: Polar) {
sorting: ['price_amount'],
});
products = productsResponse.result.items;
-
+
if (products.length === 0) {
console.warn('Warning: No products found in Polar');
}
} catch (error) {
console.error('Error fetching products from Polar:', error);
- throw new Error('Failed to fetch products. Please check your API key and try again.');
+ throw new Error(
+ 'Failed to fetch products. Please check your API key and try again.'
+ );
}
const answers = await inquirer.prompt<Answers>([
@@ -50,7 +52,7 @@ async function promptForInput(polar: Polar) {
.filter(
(product) =>
product.name.toLowerCase().includes(input.toLowerCase()) ||
- product.id.toLowerCase().includes(input.toLowerCase()),
+ product.id.toLowerCase().includes(input.toLowerCase())
)
.map((product) => {
const price = product.prices[0];
@@ -73,7 +75,7 @@ async function promptForInput(polar: Polar) {
.filter(
(org) =>
org.name.toLowerCase().includes(input.toLowerCase()) ||
- org.id.toLowerCase().includes(input.toLowerCase()),
+ org.id.toLowerCase().includes(input.toLowerCase())
)
.map((org) => ({
name: `${org.name} (${org.id})`,
@@ -103,11 +105,11 @@ async function promptForInput(polar: Polar) {
},
},
});
-
+
if (!org || !org.members || org.members.length === 0) {
return [{ name: 'No members found', value: '', disabled: true }];
}
-
+
return org.members
.filter(
(member) =>
@@ -116,7 +118,7 @@ async function promptForInput(polar: Polar) {
.includes(input.toLowerCase()) ||
member.user?.firstName
?.toLowerCase()
- .includes(input.toLowerCase()),
+ .includes(input.toLowerCase())
)
.map((member) => ({
name: `${
@@ -220,7 +222,7 @@ async function main() {
isProduction
? 'https://dashboard.openpanel.dev'
: 'http://localhost:3000',
- organization.id,
+ organization.id
),
customerEmail: user.email,
customerName: [user.firstName, user.lastName].filter(Boolean).join(' '),
diff --git a/packages/payments/scripts/create-custom-pricing.ts b/packages/payments/scripts/create-custom-pricing.ts
index 35fa23227..c783900e2 100644
--- a/packages/payments/scripts/create-custom-pricing.ts
+++ b/packages/payments/scripts/create-custom-pricing.ts
@@ -63,7 +63,7 @@ async function promptForInput() {
.filter(
(org) =>
org.name.toLowerCase().includes(input.toLowerCase()) ||
- org.id.toLowerCase().includes(input.toLowerCase()),
+ org.id.toLowerCase().includes(input.toLowerCase())
)
.map((org) => ({
name: `${org.name} (${org.id})`,
@@ -99,7 +99,7 @@ async function promptForInput() {
.includes(input.toLowerCase()) ||
member.user?.firstName
?.toLowerCase()
- .includes(input.toLowerCase()),
+ .includes(input.toLowerCase())
)
.map((member) => ({
name: `${
@@ -108,7 +108,7 @@ async function promptForInput() {
.join(' ') || 'No name'
} (${member.user?.email}) [${member.role}]`,
value: member.user?.id,
- })),
+ }))
);
},
},
@@ -232,7 +232,7 @@ async function main() {
? 'https://dashboard.openpanel.dev'
: 'http://localhost:3000',
organization.id,
- organization.projects[0]?.id,
+ organization.projects[0]?.id
),
});
diff --git a/packages/payments/scripts/create-products.ts b/packages/payments/scripts/create-products.ts
index 91b5b52d4..79964d542 100644
--- a/packages/payments/scripts/create-products.ts
+++ b/packages/payments/scripts/create-products.ts
@@ -76,7 +76,7 @@ async function main() {
const exists = products.find(
(p) =>
p.metadata?.eventsLimit === price.events &&
- p.recurringInterval === 'month',
+ p.recurringInterval === 'month'
);
if (exists) {
console.log('Free product already exists:');
@@ -129,13 +129,13 @@ async function main() {
(p) =>
p.metadata?.eventsLimit === price.events &&
p.recurringInterval === 'month' &&
- p.name === productCreate.name,
+ p.name === productCreate.name
);
const yearlyProductExists = products.find(
(p) =>
p.metadata?.eventsLimit === price.events &&
p.recurringInterval === 'year' &&
- p.name === `${productCreate.name} (yearly)`,
+ p.name === `${productCreate.name} (yearly)`
);
if (monthlyProductExists) {
diff --git a/packages/payments/src/polar.ts b/packages/payments/src/polar.ts
index 5bc6b1f66..796d809e9 100644
--- a/packages/payments/src/polar.ts
+++ b/packages/payments/src/polar.ts
@@ -33,11 +33,7 @@ export async function getProduct(id: string) {
return polar.products.get({ id });
}
-export async function createPortal({
- customerId,
-}: {
- customerId: string;
-}) {
+export async function createPortal({ customerId }: { customerId: string }) {
return polar.customerSessions.create({
customerId,
});
@@ -64,7 +60,7 @@ export async function createCheckout({
products: [productId],
successUrl: getSuccessUrl(
process.env.DASHBOARD_URL || process.env.NEXT_PUBLIC_DASHBOARD_URL!,
- organizationId,
+ organizationId
),
customerEmail: user.email,
customerName: [user.firstName, user.lastName].filter(Boolean).join(' '),
diff --git a/packages/payments/src/prices.ts b/packages/payments/src/prices.ts
index 6e3fb719f..c0b9be39f 100644
--- a/packages/payments/src/prices.ts
+++ b/packages/payments/src/prices.ts
@@ -52,8 +52,8 @@ export function getRecommendedPlan<T>(
options: {
formattedEvents: string;
formattedPrice: string;
- } & IPrice,
- ) => T,
+ } & IPrice
+ ) => T
): T | undefined {
if (!monthlyEvents) {
return undefined;
diff --git a/packages/payments/src/subscription-state.test.ts b/packages/payments/src/subscription-state.test.ts
index 1a9a4a38c..bedef5569 100644
--- a/packages/payments/src/subscription-state.test.ts
+++ b/packages/payments/src/subscription-state.test.ts
@@ -35,42 +35,179 @@ describe('getSubscriptionState', () => {
const cases: Case[] = [
// No paid subscription (trial is our own concept, Polar status null)
- { name: 'null status, ends in future', status: null, canceledAt: null, endsAt: future, expected: 'trialing' },
- { name: 'null status, ended', status: null, canceledAt: null, endsAt: past, expected: 'trial_expired' },
- { name: 'null status, no end date', status: null, canceledAt: null, endsAt: null, expected: 'trial_expired' },
- { name: 'trialing status, ends in future', status: 'trialing', canceledAt: null, endsAt: future, expected: 'trialing' },
- { name: 'trialing status, ended', status: 'trialing', canceledAt: null, endsAt: past, expected: 'trial_expired' },
+ {
+ name: 'null status, ends in future',
+ status: null,
+ canceledAt: null,
+ endsAt: future,
+ expected: 'trialing',
+ },
+ {
+ name: 'null status, ended',
+ status: null,
+ canceledAt: null,
+ endsAt: past,
+ expected: 'trial_expired',
+ },
+ {
+ name: 'null status, no end date',
+ status: null,
+ canceledAt: null,
+ endsAt: null,
+ expected: 'trial_expired',
+ },
+ {
+ name: 'trialing status, ends in future',
+ status: 'trialing',
+ canceledAt: null,
+ endsAt: future,
+ expected: 'trialing',
+ },
+ {
+ name: 'trialing status, ended',
+ status: 'trialing',
+ canceledAt: null,
+ endsAt: past,
+ expected: 'trial_expired',
+ },
// Active paid subscription
- { name: 'active, renewing', status: 'active', canceledAt: null, endsAt: future, expected: 'active' },
- { name: 'active, no end date', status: 'active', canceledAt: null, endsAt: null, expected: 'active' },
- { name: 'active but period already passed', status: 'active', canceledAt: null, endsAt: past, expected: 'expired' },
+ {
+ name: 'active, renewing',
+ status: 'active',
+ canceledAt: null,
+ endsAt: future,
+ expected: 'active',
+ },
+ {
+ name: 'active, no end date',
+ status: 'active',
+ canceledAt: null,
+ endsAt: null,
+ expected: 'active',
+ },
+ {
+ name: 'active but period already passed',
+ status: 'active',
+ canceledAt: null,
+ endsAt: past,
+ expected: 'expired',
+ },
// Cancel-at-period-end keeps status active while canceledAt is set
- { name: 'active + canceledAt (canceling)', status: 'active', canceledAt: past, endsAt: future, expected: 'canceling' },
- { name: 'canceledAt wins even if period passed', status: 'active', canceledAt: past, endsAt: past, expected: 'canceling' },
+ {
+ name: 'active + canceledAt (canceling)',
+ status: 'active',
+ canceledAt: past,
+ endsAt: future,
+ expected: 'canceling',
+ },
+ {
+ name: 'canceledAt wins even if period passed',
+ status: 'active',
+ canceledAt: past,
+ endsAt: past,
+ expected: 'canceling',
+ },
// Payment-problem states
- { name: 'past_due', status: 'past_due', canceledAt: null, endsAt: future, expected: 'past_due' },
- { name: 'unpaid', status: 'unpaid', canceledAt: null, endsAt: future, expected: 'unpaid' },
- { name: 'incomplete', status: 'incomplete', canceledAt: null, endsAt: future, expected: 'incomplete' },
- { name: 'incomplete_expired', status: 'incomplete_expired', canceledAt: null, endsAt: past, expected: 'expired' },
+ {
+ name: 'past_due',
+ status: 'past_due',
+ canceledAt: null,
+ endsAt: future,
+ expected: 'past_due',
+ },
+ {
+ name: 'unpaid',
+ status: 'unpaid',
+ canceledAt: null,
+ endsAt: future,
+ expected: 'unpaid',
+ },
+ {
+ name: 'incomplete',
+ status: 'incomplete',
+ canceledAt: null,
+ endsAt: future,
+ expected: 'incomplete',
+ },
+ {
+ name: 'incomplete_expired',
+ status: 'incomplete_expired',
+ canceledAt: null,
+ endsAt: past,
+ expected: 'expired',
+ },
// Pause-at-period-end keeps status active while the flag is set
- { name: 'active + pause scheduled (pausing)', status: 'active', canceledAt: null, endsAt: future, pauseAtPeriodEnd: true, expected: 'pausing' },
- { name: 'cancel wins over scheduled pause', status: 'active', canceledAt: past, endsAt: future, pauseAtPeriodEnd: true, expected: 'canceling' },
+ {
+ name: 'active + pause scheduled (pausing)',
+ status: 'active',
+ canceledAt: null,
+ endsAt: future,
+ pauseAtPeriodEnd: true,
+ expected: 'pausing',
+ },
+ {
+ name: 'cancel wins over scheduled pause',
+ status: 'active',
+ canceledAt: past,
+ endsAt: future,
+ pauseAtPeriodEnd: true,
+ expected: 'canceling',
+ },
// Stale data: period ended but status wasn't flipped (missed webhook).
// Must resolve to paused (blocks dashboard), never a lingering pausing.
- { name: 'pause scheduled, period already ended', status: 'active', canceledAt: null, endsAt: past, pauseAtPeriodEnd: true, expected: 'paused' },
- { name: 'pause scheduled, no end date', status: 'active', canceledAt: null, endsAt: null, pauseAtPeriodEnd: true, expected: 'paused' },
- { name: 'paused', status: 'paused', canceledAt: null, endsAt: past, expected: 'paused' },
- { name: 'paused ignores stale pause flag', status: 'paused', canceledAt: null, endsAt: past, pauseAtPeriodEnd: true, expected: 'paused' },
+ {
+ name: 'pause scheduled, period already ended',
+ status: 'active',
+ canceledAt: null,
+ endsAt: past,
+ pauseAtPeriodEnd: true,
+ expected: 'paused',
+ },
+ {
+ name: 'pause scheduled, no end date',
+ status: 'active',
+ canceledAt: null,
+ endsAt: null,
+ pauseAtPeriodEnd: true,
+ expected: 'paused',
+ },
+ {
+ name: 'paused',
+ status: 'paused',
+ canceledAt: null,
+ endsAt: past,
+ expected: 'paused',
+ },
+ {
+ name: 'paused ignores stale pause flag',
+ status: 'paused',
+ canceledAt: null,
+ endsAt: past,
+ pauseAtPeriodEnd: true,
+ expected: 'paused',
+ },
// Fully canceled / revoked
- { name: 'canceled', status: 'canceled', canceledAt: past, endsAt: past, expected: 'canceled' },
+ {
+ name: 'canceled',
+ status: 'canceled',
+ canceledAt: past,
+ endsAt: past,
+ expected: 'canceled',
+ },
// Unknown status falls back to expired (fail safe, never silently active)
- { name: 'unknown status', status: 'something_new', canceledAt: null, endsAt: future, expected: 'expired' },
+ {
+ name: 'unknown status',
+ status: 'something_new',
+ canceledAt: null,
+ endsAt: future,
+ expected: 'expired',
+ },
];
for (const c of cases) {
diff --git a/packages/redis/publisher.ts b/packages/redis/publisher.ts
index 107626bcc..ddb036694 100644
--- a/packages/redis/publisher.ts
+++ b/packages/redis/publisher.ts
@@ -20,7 +20,7 @@ export type IPublishChannels = {
export function getSubscribeChannel<Channel extends keyof IPublishChannels>(
channel: Channel,
- type: keyof IPublishChannels[Channel],
+ type: keyof IPublishChannels[Channel]
) {
return `${channel}:${String(type)}`;
}
@@ -29,7 +29,7 @@ export function publishEvent<Channel extends keyof IPublishChannels>(
channel: Channel,
type: keyof IPublishChannels[Channel],
event: IPublishChannels[Channel][typeof type],
- multi?: ReturnType<Redis['multi']>,
+ multi?: ReturnType<Redis['multi']>
) {
const redis = multi ?? getRedisPub();
return redis.publish(getSubscribeChannel(channel, type), setSuperJson(event));
@@ -38,7 +38,7 @@ export function publishEvent<Channel extends keyof IPublishChannels>(
export function parsePublishedEvent<Channel extends keyof IPublishChannels>(
_channel: Channel,
_type: keyof IPublishChannels[Channel],
- message: string,
+ message: string
): IPublishChannels[Channel][typeof _type] {
return getSuperJson<IPublishChannels[Channel][typeof _type]>(message)!;
}
@@ -108,7 +108,7 @@ function addChannelListener(channel: string, listener: ChannelMessageListener) {
function removeChannelListener(
channel: string,
- listener: ChannelMessageListener,
+ listener: ChannelMessageListener
) {
const listeners = listenersByChannel.get(channel);
if (!listeners?.delete(listener)) {
@@ -127,7 +127,7 @@ export function subscribeToPublishedEvent<
>(
channel: Channel,
type: keyof IPublishChannels[Channel],
- callback: (event: IPublishChannels[Channel][typeof type]) => void,
+ callback: (event: IPublishChannels[Channel][typeof type]) => void
) {
const subscribeChannel = getSubscribeChannel(channel, type);
@@ -152,7 +152,7 @@ export function subscribeToPublishedEvent<
export function psubscribeToPublishedEvent(
pattern: string,
- callback: (key: string) => void,
+ callback: (key: string) => void
) {
getRedisSub().psubscribe(pattern);
const pmessage = (_: unknown, pattern: string, key: string) => callback(key);
diff --git a/packages/redis/redis.ts b/packages/redis/redis.ts
index 3161134ef..a4a87ec7d 100644
--- a/packages/redis/redis.ts
+++ b/packages/redis/redis.ts
@@ -60,14 +60,14 @@ export interface ExtendedRedis extends Redis {
setJson: <T = any>(
key: string,
expireInSec: number,
- value: T,
+ value: T
) => Promise<void>;
}
const createRedisClient = (
name: string,
url: string,
- overrides: RedisOptions = {},
+ overrides: RedisOptions = {}
): ExtendedRedis => {
const client = new Redis(url, {
...options,
@@ -100,7 +100,7 @@ const createRedisClient = (
client.setJson = async <T = any>(
key: string,
expireInSec: number,
- value: T,
+ value: T
): Promise<void> => {
await client.setex(key, expireInSec, setSuperJson(value));
};
diff --git a/packages/sdks/astro/index.ts b/packages/sdks/astro/index.ts
index 8bf2b0a2d..de247e40b 100644
--- a/packages/sdks/astro/index.ts
+++ b/packages/sdks/astro/index.ts
@@ -24,7 +24,7 @@ export function screenView(properties?: TrackProperties): void;
export function screenView(path: string, properties?: TrackProperties): void;
export function screenView(
pathOrProperties?: string | TrackProperties,
- propertiesOrUndefined?: TrackProperties,
+ propertiesOrUndefined?: TrackProperties
) {
window.op?.('screenView', pathOrProperties, propertiesOrUndefined);
}
diff --git a/packages/sdks/astro/src/OpenPanelComponent.astro b/packages/sdks/astro/src/OpenPanelComponent.astro
index aabf4f774..56c126adb 100644
--- a/packages/sdks/astro/src/OpenPanelComponent.astro
+++ b/packages/sdks/astro/src/OpenPanelComponent.astro
@@ -11,7 +11,8 @@ type Props = Omit<OpenPanelOptions, 'filter'> & {
globalProperties?: Record<string, unknown>;
};
-const { profileId, cdnUrl, scriptUrl, globalProperties, ...options } = Astro.props;
+const { profileId, cdnUrl, scriptUrl, globalProperties, ...options } =
+ Astro.props;
const CDN_URL = 'https://openpanel.dev/op1.js';
diff --git a/packages/sdks/astro/src/asto-utils.ts b/packages/sdks/astro/src/asto-utils.ts
index 1b3e1419b..2cbfcfc87 100644
--- a/packages/sdks/astro/src/asto-utils.ts
+++ b/packages/sdks/astro/src/asto-utils.ts
@@ -2,6 +2,6 @@ const BLACKLISTED_PROPS = ['class'];
export function filterProps(props: Record<string, unknown>) {
return Object.fromEntries(
- Object.entries(props).filter(([key]) => !BLACKLISTED_PROPS.includes(key)),
+ Object.entries(props).filter(([key]) => !BLACKLISTED_PROPS.includes(key))
);
}
diff --git a/packages/sdks/nextjs/createNextRouteHandler.ts b/packages/sdks/nextjs/createNextRouteHandler.ts
index 1a54c8546..a5115eac4 100644
--- a/packages/sdks/nextjs/createNextRouteHandler.ts
+++ b/packages/sdks/nextjs/createNextRouteHandler.ts
@@ -21,7 +21,7 @@ function getClientHeaders(req: Request): Headers {
headers.set('Content-Type', 'application/json');
headers.set(
'openpanel-client-id',
- req.headers.get('openpanel-client-id') ?? '',
+ req.headers.get('openpanel-client-id') ?? ''
);
// Construct origin: browsers send Origin header for POST requests and cross-origin requests,
@@ -45,7 +45,7 @@ function getClientHeaders(req: Request): Headers {
async function handleApiRoute(
req: Request,
apiUrl: string,
- apiPath: string,
+ apiPath: string
): Promise<NextResponse> {
const headers = getClientHeaders(req);
@@ -67,7 +67,7 @@ async function handleApiRoute(
error: 'Failed to proxy request',
message: e instanceof Error ? e.message : String(e),
},
- { status: 500 },
+ { status: 500 }
);
}
}
@@ -108,7 +108,7 @@ async function handleScriptProxyRoute(req: Request): Promise<NextResponse> {
error: 'Failed to fetch script',
message: e instanceof Error ? e.message : String(e),
},
- { status: 500 },
+ { status: 500 }
);
}
}
diff --git a/packages/sdks/nuxt/src/runtime/server/api/[...openpanel].ts b/packages/sdks/nuxt/src/runtime/server/api/[...openpanel].ts
index 5138e57bc..320382d74 100644
--- a/packages/sdks/nuxt/src/runtime/server/api/[...openpanel].ts
+++ b/packages/sdks/nuxt/src/runtime/server/api/[...openpanel].ts
@@ -24,7 +24,7 @@ function getClientHeaders(event: H3Event<EventHandlerRequest>): Headers {
headers.set('Content-Type', 'application/json');
headers.set(
'openpanel-client-id',
- getHeader(event, 'openpanel-client-id') || '',
+ getHeader(event, 'openpanel-client-id') || ''
);
// Construct origin: browsers send Origin header for POST requests and cross-origin requests,
@@ -47,7 +47,7 @@ function getClientHeaders(event: H3Event<EventHandlerRequest>): Headers {
async function handleApiRoute(
event: H3Event<EventHandlerRequest>,
- apiPath: string,
+ apiPath: string
) {
try {
const res = await fetch(`${API_URL}${apiPath}`, {
diff --git a/packages/sdks/nuxt/tsconfig.json b/packages/sdks/nuxt/tsconfig.json
index 95771a83c..fa2d4b759 100644
--- a/packages/sdks/nuxt/tsconfig.json
+++ b/packages/sdks/nuxt/tsconfig.json
@@ -4,14 +4,9 @@
"incremental": false,
"outDir": "dist",
"paths": {
- "#app": [
- "./node_modules/nuxt/dist/app/index"
- ]
+ "#app": ["./node_modules/nuxt/dist/app/index"]
},
- "types": [
- "@types/node",
- "@nuxt/types"
- ],
+ "types": ["@types/node", "@nuxt/types"],
"strictNullChecks": true
},
"exclude": ["dist"]
diff --git a/packages/sdks/sdk/src/api.ts b/packages/sdks/sdk/src/api.ts
index 3a1673691..fef7dc4ac 100644
--- a/packages/sdks/sdk/src/api.ts
+++ b/packages/sdks/sdk/src/api.ts
@@ -44,7 +44,7 @@ export class Api {
url: string,
data: ReqBody,
options: FetchOptions,
- attempt: number,
+ attempt: number
): Promise<ResBody | null> {
try {
const response = await fetch(url, {
@@ -77,7 +77,7 @@ export class Api {
async fetch<ReqBody, ResBody>(
path: string,
data: ReqBody,
- options: FetchOptions = {},
+ options: FetchOptions = {}
): Promise<ResBody | null> {
const url = `${this.baseUrl}${path}`;
return this.post<ReqBody, ResBody>(url, data, options, 0);
diff --git a/packages/sdks/web/src/replay/recorder.ts b/packages/sdks/web/src/replay/recorder.ts
index 137aafe77..70cb486f5 100644
--- a/packages/sdks/web/src/replay/recorder.ts
+++ b/packages/sdks/web/src/replay/recorder.ts
@@ -26,7 +26,7 @@ let stopRecording: (() => void) | null = null;
export function startReplayRecorder(
config: ReplayRecorderConfig,
- sendChunk: (payload: ReplayChunkPayload) => void,
+ sendChunk: (payload: ReplayChunkPayload) => void
): void {
if (typeof document === 'undefined' || typeof window === 'undefined') {
return;
@@ -111,12 +111,13 @@ export function startReplayRecorder(
checkoutEveryNms: flushIntervalMs,
maskAllInputs: config.maskAllInputs ?? true,
maskTextSelector: maskAllText ? '*' : '[data-openpanel-replay-mask]',
- maskTextFn: maskAllText && unmaskTextSelector
- ? (text, element) => {
- if (element?.closest(unmaskTextSelector)) return text;
- return text.replace(/\S/g, '*');
- }
- : undefined,
+ maskTextFn:
+ maskAllText && unmaskTextSelector
+ ? (text, element) => {
+ if (element?.closest(unmaskTextSelector)) return text;
+ return text.replace(/\S/g, '*');
+ }
+ : undefined,
blockSelector: config.blockSelector ?? '[data-openpanel-replay-block]',
blockClass: config.blockClass,
ignoreSelector: config.ignoreSelector,
diff --git a/packages/sdks/web/src/tracker.ts b/packages/sdks/web/src/tracker.ts
index ebe49880a..5e789082a 100644
--- a/packages/sdks/web/src/tracker.ts
+++ b/packages/sdks/web/src/tracker.ts
@@ -38,7 +38,7 @@ import { OpenPanel } from './index';
// Otherwise return the property from op (for things like options, etc.)
return value;
},
- },
+ }
);
window.op = opCallable;
diff --git a/scripts/add-internal-links.mjs b/scripts/add-internal-links.mjs
index e9844ea2d..9d017e7e0 100644
--- a/scripts/add-internal-links.mjs
+++ b/scripts/add-internal-links.mjs
@@ -58,20 +58,39 @@ const FEATURES = [
slug: 'funnels',
url: '/features/funnels',
// "conversion funnel(s)" links to funnels, not conversion
- patterns: ['conversion funnels', 'conversion funnel', 'funnel analysis', 'funnels', 'funnel'],
+ patterns: [
+ 'conversion funnels',
+ 'conversion funnel',
+ 'funnel analysis',
+ 'funnels',
+ 'funnel',
+ ],
},
{
slug: 'retention',
url: '/features/retention',
// "retention" alone is included but guarded by excludeBefore
- patterns: ['retention analysis', 'user retention', 'retention rates', 'retention rate', 'retention'],
- excludeBefore: ['data', 'unlimited'], // skip "data retention", "unlimited retention"
+ patterns: [
+ 'retention analysis',
+ 'user retention',
+ 'retention rates',
+ 'retention rate',
+ 'retention',
+ ],
+ excludeBefore: ['data', 'unlimited'], // skip "data retention", "unlimited retention"
excludeAfter: ['period', 'policy', 'limit', 'of data'],
},
{
slug: 'conversion',
url: '/features/conversion',
- patterns: ['conversion tracking', 'conversion rates', 'conversion rate', 'conversion paths', 'conversions', 'conversion'],
+ patterns: [
+ 'conversion tracking',
+ 'conversion rates',
+ 'conversion rate',
+ 'conversion paths',
+ 'conversions',
+ 'conversion',
+ ],
excludeBefore: ['data'],
},
];
@@ -90,39 +109,48 @@ function getSkipZones(text) {
// Fenced code blocks ```…```
const codeBlock = /```[\s\S]*?```/g;
- while ((m = codeBlock.exec(text))) zones.push({ start: m.index, end: m.index + m[0].length });
+ while ((m = codeBlock.exec(text)))
+ zones.push({ start: m.index, end: m.index + m[0].length });
// Inline code `…`
const inlineCode = /`[^`\n]+`/g;
- while ((m = inlineCode.exec(text))) zones.push({ start: m.index, end: m.index + m[0].length });
+ while ((m = inlineCode.exec(text)))
+ zones.push({ start: m.index, end: m.index + m[0].length });
// Existing markdown links [text](url)
const mdLink = /\[[^\]]*\]\([^)]*\)/g;
- while ((m = mdLink.exec(text))) zones.push({ start: m.index, end: m.index + m[0].length });
+ while ((m = mdLink.exec(text)))
+ zones.push({ start: m.index, end: m.index + m[0].length });
// Headings # … (entire line)
const heading = /^#{1,6}\s+.+$/gm;
- while ((m = heading.exec(text))) zones.push({ start: m.index, end: m.index + m[0].length });
+ while ((m = heading.exec(text)))
+ zones.push({ start: m.index, end: m.index + m[0].length });
// JSX / HTML tags (attributes may contain feature words)
const jsxTag = /<[^>]+>/g;
- while ((m = jsxTag.exec(text))) zones.push({ start: m.index, end: m.index + m[0].length });
+ while ((m = jsxTag.exec(text)))
+ zones.push({ start: m.index, end: m.index + m[0].length });
// import statements
const imp = /^import\s+.+$/gm;
- while ((m = imp.exec(text))) zones.push({ start: m.index, end: m.index + m[0].length });
+ while ((m = imp.exec(text)))
+ zones.push({ start: m.index, end: m.index + m[0].length });
// Frontmatter block
const fm = /^---[\s\S]*?---/;
- if ((m = fm.exec(text))) zones.push({ start: m.index, end: m.index + m[0].length });
+ if ((m = fm.exec(text)))
+ zones.push({ start: m.index, end: m.index + m[0].length });
// Markdown table rows (| … |)
const tableRow = /^\|.+\|$/gm;
- while ((m = tableRow.exec(text))) zones.push({ start: m.index, end: m.index + m[0].length });
+ while ((m = tableRow.exec(text)))
+ zones.push({ start: m.index, end: m.index + m[0].length });
// > blockquote lines that contain links
const bqLink = /^>\s.*\[.*\]\(.*\).*$/gm;
- while ((m = bqLink.exec(text))) zones.push({ start: m.index, end: m.index + m[0].length });
+ while ((m = bqLink.exec(text)))
+ zones.push({ start: m.index, end: m.index + m[0].length });
return zones;
}
@@ -162,12 +190,18 @@ function processFile(filePath, dir) {
// Check excludeBefore / excludeAfter
if (feature.excludeBefore) {
- const before = content.slice(Math.max(0, m.index - 20), m.index).toLowerCase();
- if (feature.excludeBefore.some((w) => before.endsWith(w + ' '))) continue;
+ const before = content
+ .slice(Math.max(0, m.index - 20), m.index)
+ .toLowerCase();
+ if (feature.excludeBefore.some((w) => before.endsWith(w + ' ')))
+ continue;
}
if (feature.excludeAfter) {
- const after = content.slice(m.index + m[0].length, m.index + m[0].length + 20).toLowerCase();
- if (feature.excludeAfter.some((w) => after.startsWith(' ' + w))) continue;
+ const after = content
+ .slice(m.index + m[0].length, m.index + m[0].length + 20)
+ .toLowerCase();
+ if (feature.excludeAfter.some((w) => after.startsWith(' ' + w)))
+ continue;
}
// Build replacement
@@ -247,7 +281,9 @@ for (const dir of DIRS) {
console.log('=== Internal Linking Report ===\n');
console.log(`Total files modified: ${results.length}`);
-console.log(`Total links added: ${results.reduce((s, r) => s + r.changes.length, 0)}\n`);
+console.log(
+ `Total links added: ${results.reduce((s, r) => s + r.changes.length, 0)}\n`
+);
for (const r of results) {
console.log(` ${r.file}`);
diff --git a/scripts/seed-events.mjs b/scripts/seed-events.mjs
index 45fa895da..223bf6eb5 100644
--- a/scripts/seed-events.mjs
+++ b/scripts/seed-events.mjs
@@ -71,19 +71,70 @@ function randFloat(min, max, rng = eventRng) {
// ---------------------------------------------------------------------------
const FIRST_NAMES = [
- 'Alice', 'Bob', 'Charlie', 'Diana', 'Eve', 'Frank', 'Grace', 'Hank',
- 'Iris', 'Jack', 'Karen', 'Leo', 'Mia', 'Noah', 'Olivia', 'Pete',
- 'Quinn', 'Rachel', 'Sam', 'Tina', 'Uma', 'Victor', 'Wendy', 'Xavier',
- 'Yara', 'Zoe', 'Aaron', 'Bella', 'Carlos', 'Dani', 'Ethan', 'Fiona',
+ 'Alice',
+ 'Bob',
+ 'Charlie',
+ 'Diana',
+ 'Eve',
+ 'Frank',
+ 'Grace',
+ 'Hank',
+ 'Iris',
+ 'Jack',
+ 'Karen',
+ 'Leo',
+ 'Mia',
+ 'Noah',
+ 'Olivia',
+ 'Pete',
+ 'Quinn',
+ 'Rachel',
+ 'Sam',
+ 'Tina',
+ 'Uma',
+ 'Victor',
+ 'Wendy',
+ 'Xavier',
+ 'Yara',
+ 'Zoe',
+ 'Aaron',
+ 'Bella',
+ 'Carlos',
+ 'Dani',
+ 'Ethan',
+ 'Fiona',
];
const LAST_NAMES = [
- 'Smith', 'Johnson', 'Williams', 'Brown', 'Jones', 'Garcia', 'Miller',
- 'Davis', 'Wilson', 'Taylor', 'Anderson', 'Thomas', 'Jackson', 'White',
- 'Harris', 'Martin', 'Thompson', 'Moore', 'Young', 'Allen',
+ 'Smith',
+ 'Johnson',
+ 'Williams',
+ 'Brown',
+ 'Jones',
+ 'Garcia',
+ 'Miller',
+ 'Davis',
+ 'Wilson',
+ 'Taylor',
+ 'Anderson',
+ 'Thomas',
+ 'Jackson',
+ 'White',
+ 'Harris',
+ 'Martin',
+ 'Thompson',
+ 'Moore',
+ 'Young',
+ 'Allen',
];
-const EMAIL_DOMAINS = ['gmail.com', 'yahoo.com', 'outlook.com', 'icloud.com', 'proton.me'];
+const EMAIL_DOMAINS = [
+ 'gmail.com',
+ 'yahoo.com',
+ 'outlook.com',
+ 'icloud.com',
+ 'proton.me',
+];
const USER_AGENTS = [
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36',
@@ -119,7 +170,7 @@ function makeIP(index) {
const a = base[0];
const b = Math.floor(index / 65025) % 256;
const c = Math.floor(index / 255) % 256;
- const d = index % 255 + 1;
+ const d = (index % 255) + 1;
return `${a}.${b}.${c}.${d}`;
}
@@ -128,28 +179,71 @@ function makeIP(index) {
// ---------------------------------------------------------------------------
const PRODUCTS = [
- { id: 'prod_001', name: 'Wireless Headphones', category: 'Electronics', price: 8999 },
+ {
+ id: 'prod_001',
+ name: 'Wireless Headphones',
+ category: 'Electronics',
+ price: 8999,
+ },
{ id: 'prod_002', name: 'Running Shoes', category: 'Sports', price: 12999 },
{ id: 'prod_003', name: 'Coffee Maker', category: 'Kitchen', price: 5499 },
{ id: 'prod_004', name: 'Yoga Mat', category: 'Sports', price: 2999 },
- { id: 'prod_005', name: 'Smart Watch', category: 'Electronics', price: 29999 },
+ {
+ id: 'prod_005',
+ name: 'Smart Watch',
+ category: 'Electronics',
+ price: 29999,
+ },
{ id: 'prod_006', name: 'Blender', category: 'Kitchen', price: 7999 },
{ id: 'prod_007', name: 'Backpack', category: 'Travel', price: 4999 },
{ id: 'prod_008', name: 'Sunglasses', category: 'Accessories', price: 3499 },
- { id: 'prod_009', name: 'Novel: The Last Algorithm', category: 'Books', price: 1499 },
- { id: 'prod_010', name: 'Standing Desk', category: 'Furniture', price: 45999 },
+ {
+ id: 'prod_009',
+ name: 'Novel: The Last Algorithm',
+ category: 'Books',
+ price: 1499,
+ },
+ {
+ id: 'prod_010',
+ name: 'Standing Desk',
+ category: 'Furniture',
+ price: 45999,
+ },
];
-const CATEGORIES = ['Electronics', 'Sports', 'Kitchen', 'Travel', 'Accessories', 'Books', 'Furniture'];
+const CATEGORIES = [
+ 'Electronics',
+ 'Sports',
+ 'Kitchen',
+ 'Travel',
+ 'Accessories',
+ 'Books',
+ 'Furniture',
+];
// ---------------------------------------------------------------------------
// Groups (3 pre-defined companies)
// ---------------------------------------------------------------------------
const GROUPS = [
- { id: 'org_acme', type: 'company', name: 'Acme Corp', properties: { plan: 'enterprise', industry: 'Technology', employees: 500 } },
- { id: 'org_globex', type: 'company', name: 'Globex Inc', properties: { plan: 'pro', industry: 'Finance', employees: 120 } },
- { id: 'org_initech', type: 'company', name: 'Initech LLC', properties: { plan: 'starter', industry: 'Consulting', employees: 45 } },
+ {
+ id: 'org_acme',
+ type: 'company',
+ name: 'Acme Corp',
+ properties: { plan: 'enterprise', industry: 'Technology', employees: 500 },
+ },
+ {
+ id: 'org_globex',
+ type: 'company',
+ name: 'Globex Inc',
+ properties: { plan: 'pro', industry: 'Finance', employees: 120 },
+ },
+ {
+ id: 'org_initech',
+ type: 'company',
+ name: 'Initech LLC',
+ properties: { plan: 'starter', industry: 'Consulting', employees: 45 },
+ },
];
// ---------------------------------------------------------------------------
@@ -164,83 +258,312 @@ const GROUPS = [
const SCENARIOS = [
// 1. Full e-commerce checkout success
(product) => [
- { name: 'screen_view', props: { path: `${ORIGIN}/`, title: 'Home', referrer: 'https://google.com' } },
- { name: 'screen_view', props: { path: `${ORIGIN}/products/${product.id}`, title: product.name } },
- { name: 'product_viewed', props: { product_id: product.id, product_name: product.name, price: product.price, category: product.category } },
- { name: 'add_to_cart', props: { product_id: product.id, product_name: product.name, price: product.price, quantity: 1 } },
+ {
+ name: 'screen_view',
+ props: {
+ path: `${ORIGIN}/`,
+ title: 'Home',
+ referrer: 'https://google.com',
+ },
+ },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/products/${product.id}`, title: product.name },
+ },
+ {
+ name: 'product_viewed',
+ props: {
+ product_id: product.id,
+ product_name: product.name,
+ price: product.price,
+ category: product.category,
+ },
+ },
+ {
+ name: 'add_to_cart',
+ props: {
+ product_id: product.id,
+ product_name: product.name,
+ price: product.price,
+ quantity: 1,
+ },
+ },
{ name: 'screen_view', props: { path: `${ORIGIN}/cart`, title: 'Cart' } },
- { name: 'checkout_started', props: { cart_total: product.price, item_count: 1 } },
- { name: 'screen_view', props: { path: `${ORIGIN}/checkout/shipping`, title: 'Shipping Info' } },
- { name: 'shipping_info_submitted', props: { shipping_method: 'standard', estimated_days: 5 } },
- { name: 'screen_view', props: { path: `${ORIGIN}/checkout/payment`, title: 'Payment' } },
- { name: 'payment_info_submitted', props: { payment_method: 'credit_card' } },
- { name: 'screen_view', props: { path: `${ORIGIN}/checkout/review`, title: 'Order Review' } },
- { name: 'purchase', props: { order_id: `ord_${Date.now()}`, revenue: product.price, product_id: product.id, product_name: product.name, quantity: 1 }, revenue: true },
- { name: 'screen_view', props: { path: `${ORIGIN}/checkout/success`, title: 'Order Confirmed' } },
- { name: 'checkout_success', props: { order_id: `ord_${Date.now()}`, revenue: product.price } },
+ {
+ name: 'checkout_started',
+ props: { cart_total: product.price, item_count: 1 },
+ },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/checkout/shipping`, title: 'Shipping Info' },
+ },
+ {
+ name: 'shipping_info_submitted',
+ props: { shipping_method: 'standard', estimated_days: 5 },
+ },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/checkout/payment`, title: 'Payment' },
+ },
+ {
+ name: 'payment_info_submitted',
+ props: { payment_method: 'credit_card' },
+ },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/checkout/review`, title: 'Order Review' },
+ },
+ {
+ name: 'purchase',
+ props: {
+ order_id: `ord_${Date.now()}`,
+ revenue: product.price,
+ product_id: product.id,
+ product_name: product.name,
+ quantity: 1,
+ },
+ revenue: true,
+ },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/checkout/success`, title: 'Order Confirmed' },
+ },
+ {
+ name: 'checkout_success',
+ props: { order_id: `ord_${Date.now()}`, revenue: product.price },
+ },
],
// 2. Checkout failed (payment declined)
(product) => [
{ name: 'screen_view', props: { path: `${ORIGIN}/`, title: 'Home' } },
- { name: 'screen_view', props: { path: `${ORIGIN}/products/${product.id}`, title: product.name } },
- { name: 'product_viewed', props: { product_id: product.id, product_name: product.name, price: product.price, category: product.category } },
- { name: 'add_to_cart', props: { product_id: product.id, product_name: product.name, price: product.price, quantity: 1 } },
- { name: 'checkout_started', props: { cart_total: product.price, item_count: 1 } },
- { name: 'screen_view', props: { path: `${ORIGIN}/checkout/shipping`, title: 'Shipping Info' } },
- { name: 'shipping_info_submitted', props: { shipping_method: 'express', estimated_days: 2 } },
- { name: 'screen_view', props: { path: `${ORIGIN}/checkout/payment`, title: 'Payment' } },
- { name: 'payment_info_submitted', props: { payment_method: 'credit_card' } },
- { name: 'checkout_failed', props: { reason: 'payment_declined', error_code: 'insufficient_funds' } },
- { name: 'screen_view', props: { path: `${ORIGIN}/checkout/payment`, title: 'Payment' } },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/products/${product.id}`, title: product.name },
+ },
+ {
+ name: 'product_viewed',
+ props: {
+ product_id: product.id,
+ product_name: product.name,
+ price: product.price,
+ category: product.category,
+ },
+ },
+ {
+ name: 'add_to_cart',
+ props: {
+ product_id: product.id,
+ product_name: product.name,
+ price: product.price,
+ quantity: 1,
+ },
+ },
+ {
+ name: 'checkout_started',
+ props: { cart_total: product.price, item_count: 1 },
+ },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/checkout/shipping`, title: 'Shipping Info' },
+ },
+ {
+ name: 'shipping_info_submitted',
+ props: { shipping_method: 'express', estimated_days: 2 },
+ },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/checkout/payment`, title: 'Payment' },
+ },
+ {
+ name: 'payment_info_submitted',
+ props: { payment_method: 'credit_card' },
+ },
+ {
+ name: 'checkout_failed',
+ props: { reason: 'payment_declined', error_code: 'insufficient_funds' },
+ },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/checkout/payment`, title: 'Payment' },
+ },
],
// 3. Browse only — no purchase
(product) => [
- { name: 'screen_view', props: { path: `${ORIGIN}/`, title: 'Home', referrer: 'https://facebook.com' } },
- { name: 'screen_view', props: { path: `${ORIGIN}/categories/${product.category.toLowerCase()}`, title: product.category } },
+ {
+ name: 'screen_view',
+ props: {
+ path: `${ORIGIN}/`,
+ title: 'Home',
+ referrer: 'https://facebook.com',
+ },
+ },
+ {
+ name: 'screen_view',
+ props: {
+ path: `${ORIGIN}/categories/${product.category.toLowerCase()}`,
+ title: product.category,
+ },
+ },
{ name: 'category_viewed', props: { category: product.category } },
- { name: 'screen_view', props: { path: `${ORIGIN}/products/${product.id}`, title: product.name } },
- { name: 'product_viewed', props: { product_id: product.id, product_name: product.name, price: product.price, category: product.category } },
- { name: 'screen_view', props: { path: `${ORIGIN}/products/${PRODUCTS[1].id}`, title: PRODUCTS[1].name } },
- { name: 'product_viewed', props: { product_id: PRODUCTS[1].id, product_name: PRODUCTS[1].name, price: PRODUCTS[1].price, category: PRODUCTS[1].category } },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/products/${product.id}`, title: product.name },
+ },
+ {
+ name: 'product_viewed',
+ props: {
+ product_id: product.id,
+ product_name: product.name,
+ price: product.price,
+ category: product.category,
+ },
+ },
+ {
+ name: 'screen_view',
+ props: {
+ path: `${ORIGIN}/products/${PRODUCTS[1].id}`,
+ title: PRODUCTS[1].name,
+ },
+ },
+ {
+ name: 'product_viewed',
+ props: {
+ product_id: PRODUCTS[1].id,
+ product_name: PRODUCTS[1].name,
+ price: PRODUCTS[1].price,
+ category: PRODUCTS[1].category,
+ },
+ },
],
// 4. Add to cart then abandon
(product) => [
{ name: 'screen_view', props: { path: `${ORIGIN}/`, title: 'Home' } },
- { name: 'screen_view', props: { path: `${ORIGIN}/products/${product.id}`, title: product.name } },
- { name: 'product_viewed', props: { product_id: product.id, product_name: product.name, price: product.price, category: product.category } },
- { name: 'add_to_cart', props: { product_id: product.id, product_name: product.name, price: product.price, quantity: 1 } },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/products/${product.id}`, title: product.name },
+ },
+ {
+ name: 'product_viewed',
+ props: {
+ product_id: product.id,
+ product_name: product.name,
+ price: product.price,
+ category: product.category,
+ },
+ },
+ {
+ name: 'add_to_cart',
+ props: {
+ product_id: product.id,
+ product_name: product.name,
+ price: product.price,
+ quantity: 1,
+ },
+ },
{ name: 'screen_view', props: { path: `${ORIGIN}/cart`, title: 'Cart' } },
- { name: 'cart_abandoned', props: { cart_total: product.price, item_count: 1 } },
+ {
+ name: 'cart_abandoned',
+ props: { cart_total: product.price, item_count: 1 },
+ },
],
// 5. Search → product → purchase
(product) => [
{ name: 'screen_view', props: { path: `${ORIGIN}/`, title: 'Home' } },
- { name: 'search', props: { query: product.name.split(' ')[0], result_count: randInt(3, 20) } },
- { name: 'screen_view', props: { path: `${ORIGIN}/search?q=${encodeURIComponent(product.name)}`, title: 'Search Results' } },
- { name: 'screen_view', props: { path: `${ORIGIN}/products/${product.id}`, title: product.name } },
- { name: 'product_viewed', props: { product_id: product.id, product_name: product.name, price: product.price, category: product.category } },
- { name: 'add_to_cart', props: { product_id: product.id, product_name: product.name, price: product.price, quantity: 1 } },
- { name: 'checkout_started', props: { cart_total: product.price, item_count: 1 } },
- { name: 'shipping_info_submitted', props: { shipping_method: 'standard', estimated_days: 5 } },
+ {
+ name: 'search',
+ props: {
+ query: product.name.split(' ')[0],
+ result_count: randInt(3, 20),
+ },
+ },
+ {
+ name: 'screen_view',
+ props: {
+ path: `${ORIGIN}/search?q=${encodeURIComponent(product.name)}`,
+ title: 'Search Results',
+ },
+ },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/products/${product.id}`, title: product.name },
+ },
+ {
+ name: 'product_viewed',
+ props: {
+ product_id: product.id,
+ product_name: product.name,
+ price: product.price,
+ category: product.category,
+ },
+ },
+ {
+ name: 'add_to_cart',
+ props: {
+ product_id: product.id,
+ product_name: product.name,
+ price: product.price,
+ quantity: 1,
+ },
+ },
+ {
+ name: 'checkout_started',
+ props: { cart_total: product.price, item_count: 1 },
+ },
+ {
+ name: 'shipping_info_submitted',
+ props: { shipping_method: 'standard', estimated_days: 5 },
+ },
{ name: 'payment_info_submitted', props: { payment_method: 'paypal' } },
- { name: 'purchase', props: { order_id: `ord_${Date.now()}`, revenue: product.price, product_id: product.id, product_name: product.name, quantity: 1 }, revenue: true },
- { name: 'checkout_success', props: { order_id: `ord_${Date.now()}`, revenue: product.price } },
+ {
+ name: 'purchase',
+ props: {
+ order_id: `ord_${Date.now()}`,
+ revenue: product.price,
+ product_id: product.id,
+ product_name: product.name,
+ quantity: 1,
+ },
+ revenue: true,
+ },
+ {
+ name: 'checkout_success',
+ props: { order_id: `ord_${Date.now()}`, revenue: product.price },
+ },
],
// 6. Sign up flow
(_product) => [
- { name: 'screen_view', props: { path: `${ORIGIN}/`, title: 'Home', referrer: 'https://twitter.com' } },
- { name: 'screen_view', props: { path: `${ORIGIN}/signup`, title: 'Sign Up' } },
+ {
+ name: 'screen_view',
+ props: {
+ path: `${ORIGIN}/`,
+ title: 'Home',
+ referrer: 'https://twitter.com',
+ },
+ },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/signup`, title: 'Sign Up' },
+ },
{ name: 'signup_started', props: {} },
{ name: 'signup_step_completed', props: { step: 'email', step_number: 1 } },
- { name: 'signup_step_completed', props: { step: 'password', step_number: 2 } },
- { name: 'signup_step_completed', props: { step: 'profile', step_number: 3 } },
+ {
+ name: 'signup_step_completed',
+ props: { step: 'password', step_number: 2 },
+ },
+ {
+ name: 'signup_step_completed',
+ props: { step: 'profile', step_number: 3 },
+ },
{ name: 'signup_completed', props: { method: 'email' } },
- { name: 'screen_view', props: { path: `${ORIGIN}/dashboard`, title: 'Dashboard' } },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/dashboard`, title: 'Dashboard' },
+ },
],
// 7. Login → browse → wishlist
@@ -248,24 +571,104 @@ const SCENARIOS = [
{ name: 'screen_view', props: { path: `${ORIGIN}/login`, title: 'Login' } },
{ name: 'login', props: { method: 'email' } },
{ name: 'screen_view', props: { path: `${ORIGIN}/`, title: 'Home' } },
- { name: 'screen_view', props: { path: `${ORIGIN}/products/${product.id}`, title: product.name } },
- { name: 'product_viewed', props: { product_id: product.id, product_name: product.name, price: product.price, category: product.category } },
- { name: 'add_to_wishlist', props: { product_id: product.id, product_name: product.name, price: product.price } },
- { name: 'screen_view', props: { path: `${ORIGIN}/wishlist`, title: 'Wishlist' } },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/products/${product.id}`, title: product.name },
+ },
+ {
+ name: 'product_viewed',
+ props: {
+ product_id: product.id,
+ product_name: product.name,
+ price: product.price,
+ category: product.category,
+ },
+ },
+ {
+ name: 'add_to_wishlist',
+ props: {
+ product_id: product.id,
+ product_name: product.name,
+ price: product.price,
+ },
+ },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/wishlist`, title: 'Wishlist' },
+ },
],
// 8. Promo code → purchase
(product) => [
- { name: 'screen_view', props: { path: `${ORIGIN}/`, title: 'Home', referrer: 'https://newsletter.example.com' } },
- { name: 'screen_view', props: { path: `${ORIGIN}/products/${product.id}`, title: product.name } },
- { name: 'product_viewed', props: { product_id: product.id, product_name: product.name, price: product.price, category: product.category } },
- { name: 'add_to_cart', props: { product_id: product.id, product_name: product.name, price: product.price, quantity: 1 } },
- { name: 'checkout_started', props: { cart_total: product.price, item_count: 1 } },
- { name: 'promo_code_applied', props: { code: 'SAVE20', discount_percent: 20, discount_amount: Math.round(product.price * 0.2) } },
- { name: 'shipping_info_submitted', props: { shipping_method: 'standard', estimated_days: 5 } },
- { name: 'payment_info_submitted', props: { payment_method: 'credit_card' } },
- { name: 'purchase', props: { order_id: `ord_${Date.now()}`, revenue: Math.round(product.price * 0.8), product_id: product.id, product_name: product.name, quantity: 1, promo_code: 'SAVE20' }, revenue: true },
- { name: 'checkout_success', props: { order_id: `ord_${Date.now()}`, revenue: Math.round(product.price * 0.8) } },
+ {
+ name: 'screen_view',
+ props: {
+ path: `${ORIGIN}/`,
+ title: 'Home',
+ referrer: 'https://newsletter.example.com',
+ },
+ },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/products/${product.id}`, title: product.name },
+ },
+ {
+ name: 'product_viewed',
+ props: {
+ product_id: product.id,
+ product_name: product.name,
+ price: product.price,
+ category: product.category,
+ },
+ },
+ {
+ name: 'add_to_cart',
+ props: {
+ product_id: product.id,
+ product_name: product.name,
+ price: product.price,
+ quantity: 1,
+ },
+ },
+ {
+ name: 'checkout_started',
+ props: { cart_total: product.price, item_count: 1 },
+ },
+ {
+ name: 'promo_code_applied',
+ props: {
+ code: 'SAVE20',
+ discount_percent: 20,
+ discount_amount: Math.round(product.price * 0.2),
+ },
+ },
+ {
+ name: 'shipping_info_submitted',
+ props: { shipping_method: 'standard', estimated_days: 5 },
+ },
+ {
+ name: 'payment_info_submitted',
+ props: { payment_method: 'credit_card' },
+ },
+ {
+ name: 'purchase',
+ props: {
+ order_id: `ord_${Date.now()}`,
+ revenue: Math.round(product.price * 0.8),
+ product_id: product.id,
+ product_name: product.name,
+ quantity: 1,
+ promo_code: 'SAVE20',
+ },
+ revenue: true,
+ },
+ {
+ name: 'checkout_success',
+ props: {
+ order_id: `ord_${Date.now()}`,
+ revenue: Math.round(product.price * 0.8),
+ },
+ },
],
// 9. Multi-item purchase
@@ -275,133 +678,447 @@ const SCENARIOS = [
const total = p1.price + p2.price;
return [
{ name: 'screen_view', props: { path: `${ORIGIN}/`, title: 'Home' } },
- { name: 'screen_view', props: { path: `${ORIGIN}/products/${p1.id}`, title: p1.name } },
- { name: 'product_viewed', props: { product_id: p1.id, product_name: p1.name, price: p1.price, category: p1.category } },
- { name: 'add_to_cart', props: { product_id: p1.id, product_name: p1.name, price: p1.price, quantity: 1 } },
- { name: 'screen_view', props: { path: `${ORIGIN}/products/${p2.id}`, title: p2.name } },
- { name: 'product_viewed', props: { product_id: p2.id, product_name: p2.name, price: p2.price, category: p2.category } },
- { name: 'add_to_cart', props: { product_id: p2.id, product_name: p2.name, price: p2.price, quantity: 1 } },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/products/${p1.id}`, title: p1.name },
+ },
+ {
+ name: 'product_viewed',
+ props: {
+ product_id: p1.id,
+ product_name: p1.name,
+ price: p1.price,
+ category: p1.category,
+ },
+ },
+ {
+ name: 'add_to_cart',
+ props: {
+ product_id: p1.id,
+ product_name: p1.name,
+ price: p1.price,
+ quantity: 1,
+ },
+ },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/products/${p2.id}`, title: p2.name },
+ },
+ {
+ name: 'product_viewed',
+ props: {
+ product_id: p2.id,
+ product_name: p2.name,
+ price: p2.price,
+ category: p2.category,
+ },
+ },
+ {
+ name: 'add_to_cart',
+ props: {
+ product_id: p2.id,
+ product_name: p2.name,
+ price: p2.price,
+ quantity: 1,
+ },
+ },
{ name: 'checkout_started', props: { cart_total: total, item_count: 2 } },
- { name: 'shipping_info_submitted', props: { shipping_method: 'express', estimated_days: 2 } },
- { name: 'payment_info_submitted', props: { payment_method: 'credit_card' } },
- { name: 'purchase', props: { order_id: `ord_${Date.now()}`, revenue: total, item_count: 2 }, revenue: true },
- { name: 'checkout_success', props: { order_id: `ord_${Date.now()}`, revenue: total } },
+ {
+ name: 'shipping_info_submitted',
+ props: { shipping_method: 'express', estimated_days: 2 },
+ },
+ {
+ name: 'payment_info_submitted',
+ props: { payment_method: 'credit_card' },
+ },
+ {
+ name: 'purchase',
+ props: { order_id: `ord_${Date.now()}`, revenue: total, item_count: 2 },
+ revenue: true,
+ },
+ {
+ name: 'checkout_success',
+ props: { order_id: `ord_${Date.now()}`, revenue: total },
+ },
];
},
// 10. Help center visit
(_product) => [
{ name: 'screen_view', props: { path: `${ORIGIN}/`, title: 'Home' } },
- { name: 'screen_view', props: { path: `${ORIGIN}/help`, title: 'Help Center' } },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/help`, title: 'Help Center' },
+ },
{ name: 'help_search', props: { query: 'return policy', result_count: 4 } },
- { name: 'screen_view', props: { path: `${ORIGIN}/help/returns`, title: 'Return Policy' } },
- { name: 'help_article_read', props: { article: 'return_policy', time_on_page: randInt(60, 180) } },
- { name: 'screen_view', props: { path: `${ORIGIN}/help/shipping`, title: 'Shipping Info' } },
- { name: 'help_article_read', props: { article: 'shipping_times', time_on_page: randInt(30, 120) } },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/help/returns`, title: 'Return Policy' },
+ },
+ {
+ name: 'help_article_read',
+ props: { article: 'return_policy', time_on_page: randInt(60, 180) },
+ },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/help/shipping`, title: 'Shipping Info' },
+ },
+ {
+ name: 'help_article_read',
+ props: { article: 'shipping_times', time_on_page: randInt(30, 120) },
+ },
],
// 11. Product review submitted
(product) => [
{ name: 'screen_view', props: { path: `${ORIGIN}/`, title: 'Home' } },
- { name: 'screen_view', props: { path: `${ORIGIN}/products/${product.id}`, title: product.name } },
- { name: 'product_viewed', props: { product_id: product.id, product_name: product.name, price: product.price, category: product.category } },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/products/${product.id}`, title: product.name },
+ },
+ {
+ name: 'product_viewed',
+ props: {
+ product_id: product.id,
+ product_name: product.name,
+ price: product.price,
+ category: product.category,
+ },
+ },
{ name: 'review_started', props: { product_id: product.id } },
- { name: 'review_submitted', props: { product_id: product.id, rating: randInt(3, 5), has_text: true } },
+ {
+ name: 'review_submitted',
+ props: { product_id: product.id, rating: randInt(3, 5), has_text: true },
+ },
],
// 12. Newsletter signup only
(_product) => [
- { name: 'screen_view', props: { path: `${ORIGIN}/`, title: 'Home', referrer: 'https://instagram.com' } },
+ {
+ name: 'screen_view',
+ props: {
+ path: `${ORIGIN}/`,
+ title: 'Home',
+ referrer: 'https://instagram.com',
+ },
+ },
{ name: 'screen_view', props: { path: `${ORIGIN}/blog`, title: 'Blog' } },
- { name: 'screen_view', props: { path: `${ORIGIN}/blog/top-10-gadgets-2024`, title: 'Top 10 Gadgets 2024' } },
- { name: 'newsletter_signup', props: { source: 'blog_article', campaign: 'gadgets_2024' } },
+ {
+ name: 'screen_view',
+ props: {
+ path: `${ORIGIN}/blog/top-10-gadgets-2024`,
+ title: 'Top 10 Gadgets 2024',
+ },
+ },
+ {
+ name: 'newsletter_signup',
+ props: { source: 'blog_article', campaign: 'gadgets_2024' },
+ },
],
// 13. Account settings update
(_product) => [
{ name: 'screen_view', props: { path: `${ORIGIN}/login`, title: 'Login' } },
{ name: 'login', props: { method: 'google' } },
- { name: 'screen_view', props: { path: `${ORIGIN}/account`, title: 'Account' } },
- { name: 'screen_view', props: { path: `${ORIGIN}/account/settings`, title: 'Settings' } },
- { name: 'settings_updated', props: { field: 'notification_preferences', value: 'email_only' } },
- { name: 'screen_view', props: { path: `${ORIGIN}/account/address`, title: 'Addresses' } },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/account`, title: 'Account' },
+ },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/account/settings`, title: 'Settings' },
+ },
+ {
+ name: 'settings_updated',
+ props: { field: 'notification_preferences', value: 'email_only' },
+ },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/account/address`, title: 'Addresses' },
+ },
{ name: 'address_added', props: { is_default: true } },
],
// 14. Referral program engagement
(product) => [
- { name: 'screen_view', props: { path: `${ORIGIN}/`, title: 'Home', referrer: 'https://referral.example.com/?ref=abc123' } },
- { name: 'referral_link_clicked', props: { referrer_id: 'usr_ref123', campaign: 'summer_referral' } },
- { name: 'screen_view', props: { path: `${ORIGIN}/products/${product.id}`, title: product.name } },
- { name: 'product_viewed', props: { product_id: product.id, product_name: product.name, price: product.price, category: product.category } },
- { name: 'add_to_cart', props: { product_id: product.id, product_name: product.name, price: product.price, quantity: 1 } },
- { name: 'checkout_started', props: { cart_total: product.price, item_count: 1 } },
- { name: 'shipping_info_submitted', props: { shipping_method: 'standard', estimated_days: 5 } },
- { name: 'payment_info_submitted', props: { payment_method: 'credit_card' } },
- { name: 'purchase', props: { order_id: `ord_${Date.now()}`, revenue: product.price, referral_code: 'abc123' }, revenue: true },
- { name: 'checkout_success', props: { order_id: `ord_${Date.now()}`, revenue: product.price } },
+ {
+ name: 'screen_view',
+ props: {
+ path: `${ORIGIN}/`,
+ title: 'Home',
+ referrer: 'https://referral.example.com/?ref=abc123',
+ },
+ },
+ {
+ name: 'referral_link_clicked',
+ props: { referrer_id: 'usr_ref123', campaign: 'summer_referral' },
+ },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/products/${product.id}`, title: product.name },
+ },
+ {
+ name: 'product_viewed',
+ props: {
+ product_id: product.id,
+ product_name: product.name,
+ price: product.price,
+ category: product.category,
+ },
+ },
+ {
+ name: 'add_to_cart',
+ props: {
+ product_id: product.id,
+ product_name: product.name,
+ price: product.price,
+ quantity: 1,
+ },
+ },
+ {
+ name: 'checkout_started',
+ props: { cart_total: product.price, item_count: 1 },
+ },
+ {
+ name: 'shipping_info_submitted',
+ props: { shipping_method: 'standard', estimated_days: 5 },
+ },
+ {
+ name: 'payment_info_submitted',
+ props: { payment_method: 'credit_card' },
+ },
+ {
+ name: 'purchase',
+ props: {
+ order_id: `ord_${Date.now()}`,
+ revenue: product.price,
+ referral_code: 'abc123',
+ },
+ revenue: true,
+ },
+ {
+ name: 'checkout_success',
+ props: { order_id: `ord_${Date.now()}`, revenue: product.price },
+ },
],
// 15. Mobile quick browse — short session
(product) => [
{ name: 'screen_view', props: { path: `${ORIGIN}/`, title: 'Home' } },
- { name: 'screen_view', props: { path: `${ORIGIN}/categories/${product.category.toLowerCase()}`, title: product.category } },
- { name: 'screen_view', props: { path: `${ORIGIN}/products/${product.id}`, title: product.name } },
- { name: 'product_viewed', props: { product_id: product.id, product_name: product.name, price: product.price, category: product.category } },
+ {
+ name: 'screen_view',
+ props: {
+ path: `${ORIGIN}/categories/${product.category.toLowerCase()}`,
+ title: product.category,
+ },
+ },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/products/${product.id}`, title: product.name },
+ },
+ {
+ name: 'product_viewed',
+ props: {
+ product_id: product.id,
+ product_name: product.name,
+ price: product.price,
+ category: product.category,
+ },
+ },
],
// 16. Compare products
(product) => [
{ name: 'screen_view', props: { path: `${ORIGIN}/`, title: 'Home' } },
- { name: 'screen_view', props: { path: `${ORIGIN}/products/${product.id}`, title: product.name } },
- { name: 'product_viewed', props: { product_id: product.id, product_name: product.name, price: product.price, category: product.category } },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/products/${product.id}`, title: product.name },
+ },
+ {
+ name: 'product_viewed',
+ props: {
+ product_id: product.id,
+ product_name: product.name,
+ price: product.price,
+ category: product.category,
+ },
+ },
{ name: 'compare_added', props: { product_id: product.id } },
- { name: 'screen_view', props: { path: `${ORIGIN}/products/${PRODUCTS[4].id}`, title: PRODUCTS[4].name } },
- { name: 'product_viewed', props: { product_id: PRODUCTS[4].id, product_name: PRODUCTS[4].name, price: PRODUCTS[4].price, category: PRODUCTS[4].category } },
+ {
+ name: 'screen_view',
+ props: {
+ path: `${ORIGIN}/products/${PRODUCTS[4].id}`,
+ title: PRODUCTS[4].name,
+ },
+ },
+ {
+ name: 'product_viewed',
+ props: {
+ product_id: PRODUCTS[4].id,
+ product_name: PRODUCTS[4].name,
+ price: PRODUCTS[4].price,
+ category: PRODUCTS[4].category,
+ },
+ },
{ name: 'compare_added', props: { product_id: PRODUCTS[4].id } },
- { name: 'screen_view', props: { path: `${ORIGIN}/compare?ids=${product.id},${PRODUCTS[4].id}`, title: 'Compare Products' } },
- { name: 'compare_viewed', props: { product_ids: [product.id, PRODUCTS[4].id] } },
+ {
+ name: 'screen_view',
+ props: {
+ path: `${ORIGIN}/compare?ids=${product.id},${PRODUCTS[4].id}`,
+ title: 'Compare Products',
+ },
+ },
+ {
+ name: 'compare_viewed',
+ props: { product_ids: [product.id, PRODUCTS[4].id] },
+ },
],
// 17. Shipping failure retry → success
(product) => [
{ name: 'screen_view', props: { path: `${ORIGIN}/`, title: 'Home' } },
- { name: 'screen_view', props: { path: `${ORIGIN}/products/${product.id}`, title: product.name } },
- { name: 'product_viewed', props: { product_id: product.id, product_name: product.name, price: product.price, category: product.category } },
- { name: 'add_to_cart', props: { product_id: product.id, product_name: product.name, price: product.price, quantity: 1 } },
- { name: 'checkout_started', props: { cart_total: product.price, item_count: 1 } },
- { name: 'screen_view', props: { path: `${ORIGIN}/checkout/shipping`, title: 'Shipping Info' } },
- { name: 'shipping_info_error', props: { error: 'invalid_address', attempt: 1 } },
- { name: 'shipping_info_submitted', props: { shipping_method: 'standard', estimated_days: 5, attempt: 2 } },
- { name: 'payment_info_submitted', props: { payment_method: 'credit_card' } },
- { name: 'purchase', props: { order_id: `ord_${Date.now()}`, revenue: product.price, product_id: product.id }, revenue: true },
- { name: 'checkout_success', props: { order_id: `ord_${Date.now()}`, revenue: product.price } },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/products/${product.id}`, title: product.name },
+ },
+ {
+ name: 'product_viewed',
+ props: {
+ product_id: product.id,
+ product_name: product.name,
+ price: product.price,
+ category: product.category,
+ },
+ },
+ {
+ name: 'add_to_cart',
+ props: {
+ product_id: product.id,
+ product_name: product.name,
+ price: product.price,
+ quantity: 1,
+ },
+ },
+ {
+ name: 'checkout_started',
+ props: { cart_total: product.price, item_count: 1 },
+ },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/checkout/shipping`, title: 'Shipping Info' },
+ },
+ {
+ name: 'shipping_info_error',
+ props: { error: 'invalid_address', attempt: 1 },
+ },
+ {
+ name: 'shipping_info_submitted',
+ props: { shipping_method: 'standard', estimated_days: 5, attempt: 2 },
+ },
+ {
+ name: 'payment_info_submitted',
+ props: { payment_method: 'credit_card' },
+ },
+ {
+ name: 'purchase',
+ props: {
+ order_id: `ord_${Date.now()}`,
+ revenue: product.price,
+ product_id: product.id,
+ },
+ revenue: true,
+ },
+ {
+ name: 'checkout_success',
+ props: { order_id: `ord_${Date.now()}`, revenue: product.price },
+ },
],
// 18. Subscription / SaaS upgrade
(_product) => [
- { name: 'screen_view', props: { path: `${ORIGIN}/pricing`, title: 'Pricing' } },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/pricing`, title: 'Pricing' },
+ },
{ name: 'pricing_viewed', props: {} },
- { name: 'plan_selected', props: { plan: 'pro', billing: 'annual', price: 9900 } },
- { name: 'screen_view', props: { path: `${ORIGIN}/checkout/subscription`, title: 'Subscribe' } },
- { name: 'payment_info_submitted', props: { payment_method: 'credit_card' } },
- { name: 'subscription_started', props: { plan: 'pro', billing: 'annual', revenue: 9900 }, revenue: true },
- { name: 'screen_view', props: { path: `${ORIGIN}/dashboard`, title: 'Dashboard' } },
+ {
+ name: 'plan_selected',
+ props: { plan: 'pro', billing: 'annual', price: 9900 },
+ },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/checkout/subscription`, title: 'Subscribe' },
+ },
+ {
+ name: 'payment_info_submitted',
+ props: { payment_method: 'credit_card' },
+ },
+ {
+ name: 'subscription_started',
+ props: { plan: 'pro', billing: 'annual', revenue: 9900 },
+ revenue: true,
+ },
+ {
+ name: 'screen_view',
+ props: { path: `${ORIGIN}/dashboard`, title: 'Dashboard' },
+ },
],
// 19. Deep content engagement (blog)
(_product) => [
- { name: 'screen_view', props: { path: `${ORIGIN}/blog`, title: 'Blog', referrer: 'https://google.com' } },
- { name: 'screen_view', props: { path: `${ORIGIN}/blog/buying-guide-headphones`, title: 'Headphones Buying Guide' } },
- { name: 'content_read', props: { article: 'headphones_buying_guide', reading_time: randInt(120, 480), scroll_depth: randFloat(0.6, 1.0) } },
- { name: 'screen_view', props: { path: `${ORIGIN}/blog/best-running-shoes-2024`, title: 'Best Running Shoes 2024' } },
- { name: 'content_read', props: { article: 'best_running_shoes_2024', reading_time: randInt(90, 300), scroll_depth: randFloat(0.5, 1.0) } },
+ {
+ name: 'screen_view',
+ props: {
+ path: `${ORIGIN}/blog`,
+ title: 'Blog',
+ referrer: 'https://google.com',
+ },
+ },
+ {
+ name: 'screen_view',
+ props: {
+ path: `${ORIGIN}/blog/buying-guide-headphones`,
+ title: 'Headphones Buying Guide',
+ },
+ },
+ {
+ name: 'content_read',
+ props: {
+ article: 'headphones_buying_guide',
+ reading_time: randInt(120, 480),
+ scroll_depth: randFloat(0.6, 1.0),
+ },
+ },
+ {
+ name: 'screen_view',
+ props: {
+ path: `${ORIGIN}/blog/best-running-shoes-2024`,
+ title: 'Best Running Shoes 2024',
+ },
+ },
+ {
+ name: 'content_read',
+ props: {
+ article: 'best_running_shoes_2024',
+ reading_time: randInt(90, 300),
+ scroll_depth: randFloat(0.5, 1.0),
+ },
+ },
],
// 20. Error / 404 bounce
(_product) => [
- { name: 'screen_view', props: { path: `${ORIGIN}/products/old-discontinued-product`, title: 'Product Not Found' } },
- { name: 'page_error', props: { error_code: 404, path: '/products/old-discontinued-product' } },
+ {
+ name: 'screen_view',
+ props: {
+ path: `${ORIGIN}/products/old-discontinued-product`,
+ title: 'Product Not Found',
+ },
+ },
+ {
+ name: 'page_error',
+ props: { error_code: 404, path: '/products/old-discontinued-product' },
+ },
{ name: 'screen_view', props: { path: `${ORIGIN}/`, title: 'Home' } },
],
];
@@ -452,7 +1169,9 @@ async function sendEvent(payload, ua, ip) {
if (!res.ok) {
const text = await res.text().catch(() => '');
- console.warn(` [WARN] ${res.status} ${payload.type}/${payload.payload?.name ?? ''}: ${text.slice(0, 120)}`);
+ console.warn(
+ ` [WARN] ${res.status} ${payload.type}/${payload.payload?.name ?? ''}: ${text.slice(0, 120)}`
+ );
}
return res;
}
@@ -492,7 +1211,8 @@ function scheduleSession(session, sessionIndex, totalSessions) {
const eventCount = session.events.length;
return session.events.map((event, i) => {
- const eventOffset = eventCount > 1 ? (i / (eventCount - 1)) * sessionDurationMs : 0;
+ const eventOffset =
+ eventCount > 1 ? (i / (eventCount - 1)) * sessionDurationMs : 0;
return {
...event,
timestamp: Math.round(sessionStart + eventOffset),
@@ -524,66 +1244,78 @@ async function withConcurrency(tasks, limit) {
// ---------------------------------------------------------------------------
async function main() {
- console.log(`\nSeeding ${SESSION_COUNT} sessions over ${TIMELINE_MINUTES} minutes`);
+ console.log(
+ `\nSeeding ${SESSION_COUNT} sessions over ${TIMELINE_MINUTES} minutes`
+ );
console.log(`API: ${TRACK_URL}`);
console.log(`Client ID: ${CLIENT_ID}\n`);
let totalEvents = 0;
let errors = 0;
- const sessionTasks = Array.from({ length: SESSION_COUNT }, (_, i) => async () => {
- const session = buildSession(i);
- const scheduledEvents = scheduleSession(session, i, SESSION_COUNT);
- const { identity, group, ua, ip } = session;
-
- // 1. Identify
- try {
- await sendEvent({ type: 'identify', payload: identity }, ua, ip);
- } catch (e) {
- errors++;
- console.error(` [ERROR] identify session ${i}:`, e.message);
- }
+ const sessionTasks = Array.from(
+ { length: SESSION_COUNT },
+ (_, i) => async () => {
+ const session = buildSession(i);
+ const scheduledEvents = scheduleSession(session, i, SESSION_COUNT);
+ const { identity, group, ua, ip } = session;
- // 2. Group (if applicable)
- if (group) {
+ // 1. Identify
try {
- await sendEvent({ type: 'group', payload: { ...group, profileId: identity.profileId } }, ua, ip);
+ await sendEvent({ type: 'identify', payload: identity }, ua, ip);
} catch (e) {
errors++;
- console.error(` [ERROR] group session ${i}:`, e.message);
+ console.error(` [ERROR] identify session ${i}:`, e.message);
}
- }
- // 3. Track events in order
- for (const ev of scheduledEvents) {
- const trackPayload = {
- name: ev.name,
- profileId: identity.profileId,
- properties: {
- ...ev.props,
- __timestamp: new Date(ev.timestamp).toISOString(),
- ...(group ? { __group: group.id } : {}),
- },
- groups: group ? [group.id] : [],
- };
-
- if (ev.revenue) {
- trackPayload.properties.__revenue = ev.props.revenue;
+ // 2. Group (if applicable)
+ if (group) {
+ try {
+ await sendEvent(
+ {
+ type: 'group',
+ payload: { ...group, profileId: identity.profileId },
+ },
+ ua,
+ ip
+ );
+ } catch (e) {
+ errors++;
+ console.error(` [ERROR] group session ${i}:`, e.message);
+ }
}
- try {
- await sendEvent({ type: 'track', payload: trackPayload }, ua, ip);
- totalEvents++;
- } catch (e) {
- errors++;
- console.error(` [ERROR] track ${ev.name} session ${i}:`, e.message);
+ // 3. Track events in order
+ for (const ev of scheduledEvents) {
+ const trackPayload = {
+ name: ev.name,
+ profileId: identity.profileId,
+ properties: {
+ ...ev.props,
+ __timestamp: new Date(ev.timestamp).toISOString(),
+ ...(group ? { __group: group.id } : {}),
+ },
+ groups: group ? [group.id] : [],
+ };
+
+ if (ev.revenue) {
+ trackPayload.properties.__revenue = ev.props.revenue;
+ }
+
+ try {
+ await sendEvent({ type: 'track', payload: trackPayload }, ua, ip);
+ totalEvents++;
+ } catch (e) {
+ errors++;
+ console.error(` [ERROR] track ${ev.name} session ${i}:`, e.message);
+ }
}
- }
- if ((i + 1) % 50 === 0 || i + 1 === SESSION_COUNT) {
- console.log(` Progress: ${i + 1}/${SESSION_COUNT} sessions`);
+ if ((i + 1) % 50 === 0 || i + 1 === SESSION_COUNT) {
+ console.log(` Progress: ${i + 1}/${SESSION_COUNT} sessions`);
+ }
}
- });
+ );
await withConcurrency(sessionTasks, CONCURRENCY);
diff --git a/self-hosting/import-to-cloud.mjs b/self-hosting/import-to-cloud.mjs
index 0f18af080..f1f495c66 100755
--- a/self-hosting/import-to-cloud.mjs
+++ b/self-hosting/import-to-cloud.mjs
@@ -37,7 +37,12 @@
* database and the mapping itself, so changing any of them starts a fresh
* state rather than silently skipping files the previous mapping had filtered.
*/
-import { createReadStream, existsSync, appendFileSync, readFileSync } from 'node:fs';
+import {
+ createReadStream,
+ existsSync,
+ appendFileSync,
+ readFileSync,
+} from 'node:fs';
import { readdir } from 'node:fs/promises';
import { createHash } from 'node:crypto';
import { createInterface } from 'node:readline';
@@ -93,7 +98,9 @@ function parseArgs(argv) {
}
if (!args.url) throw new Error('Missing --url (or CLICKHOUSE_URL)');
if (!args.noMap && args.map.size === 0) {
- throw new Error('Pass --map <old>=<new> to remap project_id, or --no-map to keep it');
+ throw new Error(
+ 'Pass --map <old>=<new> to remap project_id, or --no-map to keep it'
+ );
}
// OpenPanel writes CLICKHOUSE_URL as http://host:8123/openpanel, so accept the
@@ -104,7 +111,7 @@ function parseArgs(argv) {
const pathDb = parsed.pathname.replace(/^\/+|\/+$/g, '');
if (args.db && pathDb && args.db !== pathDb) {
console.warn(
- `⚠️ --db "${args.db}" overrides the database "${pathDb}" in the URL path`,
+ `⚠️ --db "${args.db}" overrides the database "${pathDb}" in the URL path`
);
}
args.db = args.db ?? (pathDb || 'openpanel');
@@ -124,7 +131,7 @@ async function insert(args, table, rows) {
const headers = { 'Content-Type': 'application/json' };
if (url.username || url.password) {
headers.Authorization = `Basic ${Buffer.from(
- `${decodeURIComponent(url.username)}:${decodeURIComponent(url.password)}`,
+ `${decodeURIComponent(url.username)}:${decodeURIComponent(url.password)}`
).toString('base64')}`;
url.username = '';
url.password = '';
@@ -144,7 +151,9 @@ async function insert(args, table, rows) {
const text = await res.text();
// 4xx means the payload is wrong — retrying will not help.
if (res.status < 500 || attempt === 5) {
- throw new Error(`INSERT INTO ${table} failed (${res.status}): ${text.slice(0, 800)}`);
+ throw new Error(
+ `INSERT INTO ${table} failed (${res.status}): ${text.slice(0, 800)}`
+ );
}
console.warn(` ⚠️ ${res.status} on ${table}, retry ${attempt}/4`);
await new Promise((resolve) => setTimeout(resolve, 1000 * attempt));
@@ -200,7 +209,10 @@ async function importFile(args, table, file, state) {
const stream = file.endsWith('.gz')
? createReadStream(file).pipe(createGunzip())
: createReadStream(file);
- const lines = createInterface({ input: stream, crlfDelay: Number.POSITIVE_INFINITY });
+ const lines = createInterface({
+ input: stream,
+ crlfDelay: Number.POSITIVE_INFINITY,
+ });
let batch = [];
let total = 0;
@@ -253,7 +265,7 @@ async function main() {
const state = new Set(
existsSync(stateFile)
? readFileSync(stateFile, 'utf8').split('\n').filter(Boolean)
- : [],
+ : []
);
state.file = stateFile;
@@ -269,7 +281,9 @@ async function main() {
const dir = path.join(args.dir, table);
if (!existsSync(dir)) continue;
- const files = (await readdir(dir)).filter((f) => f.includes('.jsonl')).sort();
+ const files = (await readdir(dir))
+ .filter((f) => f.includes('.jsonl'))
+ .sort();
if (files.length === 0) continue;
console.log(`▶️ ${table} (${files.length} files)`);
@@ -288,36 +302,45 @@ async function main() {
if (importedByProject.size > 0) {
console.log('\n Imported by project:');
- for (const [source, rows] of [...importedByProject].sort((a, b) => b[1] - a[1])) {
+ for (const [source, rows] of [...importedByProject].sort(
+ (a, b) => b[1] - a[1]
+ )) {
const dest = args.noMap ? source : args.map.get(source);
- console.log(` ${source} → ${dest}`.padEnd(58) + `${String(rows).padStart(10)} rows`);
+ console.log(
+ ` ${source} → ${dest}`.padEnd(58) +
+ `${String(rows).padStart(10)} rows`
+ );
}
}
if (droppedByProject.size > 0) {
console.log('\n Ignored (no --map entry):');
- for (const [source, rows] of [...droppedByProject].sort((a, b) => b[1] - a[1])) {
- console.log(` ${source}`.padEnd(58) + `${String(rows).padStart(10)} rows`);
+ for (const [source, rows] of [...droppedByProject].sort(
+ (a, b) => b[1] - a[1]
+ )) {
+ console.log(
+ ` ${source}`.padEnd(58) + `${String(rows).padStart(10)} rows`
+ );
}
}
// Every row filtered out is almost always a typo in --map rather than intent.
if (importedByProject.size === 0 && droppedByProject.size > 0) {
console.error(
- '\n❌ Every row was dropped — no project_id in the export matched a --map entry.',
+ '\n❌ Every row was dropped — no project_id in the export matched a --map entry.'
);
console.error(' Check _meta.json for the exact source project ids.');
process.exit(1);
}
if (backfilled.last_seen_at > 0) {
console.log(
- `\nℹ️ Seeded last_seen_at from created_at for ${backfilled.last_seen_at} profiles`,
+ `\nℹ️ Seeded last_seen_at from created_at for ${backfilled.last_seen_at} profiles`
);
console.log(
- ' (source install predates the 20260504 profiles restructure — see',
+ ' (source install predates the 20260504 profiles restructure — see'
);
console.log(
- ' 16-restructure-profiles.ts for the optional events-derived backfill)',
+ ' 16-restructure-profiles.ts for the optional events-derived backfill)'
);
}
}
diff --git a/self-hosting/verify-export.mjs b/self-hosting/verify-export.mjs
index 7ee56da5c..45a488385 100755
--- a/self-hosting/verify-export.mjs
+++ b/self-hosting/verify-export.mjs
@@ -19,7 +19,9 @@ const dir = process.argv[2] ?? './op-export';
const manifestPath = path.join(dir, 'manifest.jsonl');
if (!existsSync(manifestPath)) {
- console.error(`❌ No manifest.jsonl in ${dir} — is that the export directory?`);
+ console.error(
+ `❌ No manifest.jsonl in ${dir} — is that the export directory?`
+ );
process.exit(1);
}
@@ -27,7 +29,10 @@ async function countRows(file) {
const stream = file.endsWith('.gz')
? createReadStream(file).pipe(createGunzip())
: createReadStream(file);
- const lines = createInterface({ input: stream, crlfDelay: Number.POSITIVE_INFINITY });
+ const lines = createInterface({
+ input: stream,
+ crlfDelay: Number.POSITIVE_INFINITY,
+ });
let rows = 0;
for await (const line of lines) {
if (line.trim()) rows++;
@@ -68,14 +73,14 @@ for (const entry of entries) {
// first case is a problem.
if (rows < entry.rows) {
problems.push(
- `TRUNCATED ${entry.table}/${entry.file} — manifest says ${entry.rows}, file has ${rows}`,
+ `TRUNCATED ${entry.table}/${entry.file} — manifest says ${entry.rows}, file has ${rows}`
);
continue;
}
if (rows > entry.rows) {
notes.push(
- `${entry.table}/${entry.file} — ${rows - entry.rows} row(s) beyond the manifest (written while the export ran)`,
+ `${entry.table}/${entry.file} — ${rows - entry.rows} row(s) beyond the manifest (written while the export ran)`
);
}
@@ -100,4 +105,6 @@ if (problems.length > 0) {
process.exit(1);
}
-console.log('\n✅ Export is complete — no missing, truncated or corrupt files.');
+console.log(
+ '\n✅ Export is complete — no missing, truncated or corrupt files.'
+);
diff --git a/test/fixtures.ts b/test/fixtures.ts
index 481e2128d..9684a13c0 100644
--- a/test/fixtures.ts
+++ b/test/fixtures.ts
@@ -427,8 +427,6 @@ export async function teardownPostgresFixtures(
}
}
-
-
export async function setupFixtures(projectId: string): Promise<void> {
const client = getClient();
await deleteFixtures(client, projectId);
diff --git a/tooling/codemods/p11-map.json b/tooling/codemods/p11-map.json
index 30e6a314e..c738e2c14 100644
--- a/tooling/codemods/p11-map.json
+++ b/tooling/codemods/p11-map.json
@@ -1,377 +1,2644 @@
[
-{"from":"@openpanel/validation","symbol":"DEFAULT_ASPECT_RATIO","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"DEFAULT_ASPECT_RATIO","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"NOT_SET_VALUE","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"NOT_SET_VALUE","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"timeWindows","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"timeWindows","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"operators","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"operators","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"operatorsShort","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"operatorsShort","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"filterValueTypes","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"filterValueTypes","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IFilterValueType","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/constants","symbol":"IFilterValueType","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"getOperatorsForType","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"getOperatorsForType","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"chartTypes","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"chartTypes","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"chartSegments","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"chartSegments","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"lineTypes","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"lineTypes","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"intervals","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"intervals","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"alphabetIds","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"alphabetIds","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"metrics","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"metrics","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"isMinuteIntervalEnabledByRange","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"isMinuteIntervalEnabledByRange","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"isHourIntervalEnabledByRange","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"isHourIntervalEnabledByRange","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"getDefaultIntervalByRange","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"getDefaultIntervalByRange","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"getDefaultIntervalByDates","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"getDefaultIntervalByDates","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"countries","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"countries","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"getCountry","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"getCountry","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"chartColors","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"chartColors","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zChartEventFilter","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"zChartEventFilter","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"getCohortIds","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"getCohortIds","kind":"value","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zChartEventSegment","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"zChartEventSegment","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zChartEvent","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"zChartEvent","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zChartFormula","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"zChartFormula","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zChartEventWithType","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"zChartEventWithType","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zChartEventItem","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"zChartEventItem","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zChartBreakdown","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"zChartBreakdown","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zChartSeries","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"zChartSeries","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zChartBreakdowns","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"zChartBreakdowns","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zChartType","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"zChartType","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zLineType","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"zLineType","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zTimeInterval","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"zTimeInterval","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zMetric","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"zMetric","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zRange","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"zRange","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zCriteria","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"zCriteria","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zFunnelOptions","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"zFunnelOptions","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zRetentionOptions","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"zRetentionOptions","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zSankeyOptions","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"zSankeyOptions","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zHistogramOptions","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"zHistogramOptions","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zReportOptions","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"zReportOptions","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IReportOptions","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/constants","symbol":"IReportOptions","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"ISankeyOptions","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/constants","symbol":"ISankeyOptions","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IHistogramOptions","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/constants","symbol":"IHistogramOptions","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zWidgetType","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"zWidgetType","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IWidgetType","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/constants","symbol":"IWidgetType","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zRealtimeWidgetOptions","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"zRealtimeWidgetOptions","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zCounterWidgetOptions","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"zCounterWidgetOptions","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zWidgetOptions","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"zWidgetOptions","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IWidgetOptions","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/constants","symbol":"IWidgetOptions","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"ICounterWidgetOptions","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/constants","symbol":"ICounterWidgetOptions","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IRealtimeWidgetOptions","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/constants","symbol":"IRealtimeWidgetOptions","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zReportInput","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"zReportInput","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zReport","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"zReport","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zChartInput","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"zChartInput","kind":"schema","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zShareOverview","kind":"schema","to":"@openpanel/core/modules/share/share.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zShareDashboard","kind":"schema","to":"@openpanel/core/modules/share/share.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zShareReport","kind":"schema","to":"@openpanel/core/modules/share/share.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"ENCRYPTED_SECRET_PREFIX","kind":"value","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"looksEncrypted","kind":"value","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IServiceAccountKey","kind":"type","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IServiceAccountKeyResult","kind":"type","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"parseServiceAccountKey","kind":"value","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zSlackConfig","kind":"schema","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"ISlackConfig","kind":"type","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zWebhookConfig","kind":"schema","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IWebhookConfig","kind":"type","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zDiscordConfig","kind":"schema","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IDiscordConfig","kind":"type","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zAppConfig","kind":"schema","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IAppConfig","kind":"type","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zEmailConfig","kind":"schema","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IEmailConfig","kind":"type","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zS3ExportConfigIamRole","kind":"schema","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IS3ExportConfigIamRole","kind":"type","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zS3ExportConfigAccessKey","kind":"schema","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IS3ExportConfigAccessKey","kind":"type","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zS3ExportConfig","kind":"schema","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IS3ExportConfig","kind":"type","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zGCSExportConfig","kind":"schema","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IGCSExportConfig","kind":"type","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IIntegrationConfig","kind":"type","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IIntegrationType","kind":"type","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IIntegrationKind","kind":"type","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IIntegrationDescriptor","kind":"type","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"slackDescriptor","kind":"value","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"discordDescriptor","kind":"value","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"webhookDescriptor","kind":"value","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"appDescriptor","kind":"value","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"emailDescriptor","kind":"value","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"s3ExportDescriptor","kind":"value","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"gcsExportDescriptor","kind":"value","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"INTEGRATION_DESCRIPTORS","kind":"value","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"isKind","kind":"value","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zIntegrationConfig","kind":"schema","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zCreateSlackIntegration","kind":"schema","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zCreateWebhookIntegration","kind":"schema","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zCreateDiscordIntegration","kind":"schema","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zCreateS3ExportIntegration","kind":"schema","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zCreateGCSExportIntegration","kind":"schema","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"DISCORD_TEST_NOTIFICATION_MESSAGE","kind":"value","to":"@openpanel/core/modules/integration/integration.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zNotificationRuleEventConfig","kind":"schema","to":"@openpanel/core/modules/notification/notification.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"INotificationRuleEventConfig","kind":"type","to":"@openpanel/core/modules/notification/notification.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zNotificationRuleFunnelConfig","kind":"schema","to":"@openpanel/core/modules/notification/notification.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"INotificationRuleFunnelConfig","kind":"type","to":"@openpanel/core/modules/notification/notification.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zNotificationRuleConfig","kind":"schema","to":"@openpanel/core/modules/notification/notification.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"INotificationRuleConfig","kind":"type","to":"@openpanel/core/modules/notification/notification.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zCreateNotificationRule","kind":"schema","to":"@openpanel/core/modules/notification/notification.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"ICreateNotificationRule","kind":"type","to":"@openpanel/core/modules/notification/notification.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zOnboardingProject","kind":"schema","to":"@openpanel/core/modules/onboarding/onboarding.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IOnboardingProject","kind":"type","to":"@openpanel/core/modules/onboarding/onboarding.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zProvider","kind":"schema","to":"@openpanel/core/modules/auth/auth.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zPassword","kind":"schema","to":"@openpanel/core/modules/auth/auth.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zSignInEmail","kind":"schema","to":"@openpanel/core/modules/auth/auth.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"ISignInEmail","kind":"type","to":"@openpanel/core/modules/auth/auth.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zSignUpEmail","kind":"schema","to":"@openpanel/core/modules/auth/auth.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"ISignUpEmail","kind":"type","to":"@openpanel/core/modules/auth/auth.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zResetPassword","kind":"schema","to":"@openpanel/core/modules/auth/auth.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IResetPassword","kind":"type","to":"@openpanel/core/modules/auth/auth.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zRequestResetPassword","kind":"schema","to":"@openpanel/core/modules/auth/auth.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IRequestResetPassword","kind":"type","to":"@openpanel/core/modules/auth/auth.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zTotpCode","kind":"schema","to":"@openpanel/core/modules/auth/auth.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"ITotpCode","kind":"type","to":"@openpanel/core/modules/auth/auth.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zTotpOrRecoveryCode","kind":"schema","to":"@openpanel/core/modules/auth/auth.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"ITotpOrRecoveryCode","kind":"type","to":"@openpanel/core/modules/auth/auth.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zSignInShare","kind":"schema","to":"@openpanel/core/modules/auth/auth.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"ISignInShare","kind":"type","to":"@openpanel/core/modules/auth/auth.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zGroupId","kind":"schema","to":"@openpanel/core/modules/group/group.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zCreateGroup","kind":"schema","to":"@openpanel/core/modules/group/group.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"ICreateGroup","kind":"type","to":"@openpanel/core/modules/group/group.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zUpdateGroup","kind":"schema","to":"@openpanel/core/modules/group/group.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IUpdateGroup","kind":"type","to":"@openpanel/core/modules/group/group.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zCheckout","kind":"schema","to":"@openpanel/core/modules/subscription/subscription.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"ICheckout","kind":"type","to":"@openpanel/core/modules/subscription/subscription.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zCancellationReason","kind":"schema","to":"@openpanel/core/modules/subscription/subscription.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"ICancellationReason","kind":"type","to":"@openpanel/core/modules/subscription/subscription.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zCancelSubscription","kind":"schema","to":"@openpanel/core/modules/subscription/subscription.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"ICancelSubscription","kind":"type","to":"@openpanel/core/modules/subscription/subscription.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zPauseSubscription","kind":"schema","to":"@openpanel/core/modules/subscription/subscription.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IPauseSubscription","kind":"type","to":"@openpanel/core/modules/subscription/subscription.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"pageContextPageSchema","kind":"schema","to":"@openpanel/core/modules/assistant/assistant.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"pageContextSchema","kind":"schema","to":"@openpanel/core/modules/assistant/assistant.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"PageContext","kind":"type","to":"@openpanel/core/modules/assistant/assistant.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"PageContextPage","kind":"type","to":"@openpanel/core/modules/assistant/assistant.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"chatContextSchema","kind":"schema","to":"@openpanel/core/modules/assistant/assistant.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"ChatAgentContext","kind":"type","to":"@openpanel/core/modules/assistant/assistant.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"ChatProvider","kind":"type","to":"@openpanel/core/modules/assistant/assistant.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"ChatModelEntry","kind":"type","to":"@openpanel/core/modules/assistant/assistant.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"CHAT_MODELS","kind":"value","to":"@openpanel/core/modules/assistant/assistant.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"ChatModelId","kind":"type","to":"@openpanel/core/modules/assistant/assistant.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"MODEL_STORAGE_KEY","kind":"value","to":"@openpanel/core/modules/assistant/assistant.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"PREFERRED_DEFAULT_MODEL_ID","kind":"value","to":"@openpanel/core/modules/assistant/assistant.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"isValidModelId","kind":"value","to":"@openpanel/core/modules/assistant/assistant.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"getModelLabel","kind":"value","to":"@openpanel/core/modules/assistant/assistant.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"getAvailableChatModels","kind":"value","to":"@openpanel/core/modules/assistant/assistant.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"applyFiltersSchema","kind":"schema","to":"@openpanel/core/modules/assistant/assistant.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"ApplyFiltersInput","kind":"type","to":"@openpanel/core/modules/assistant/assistant.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"setPropertyFiltersSchema","kind":"schema","to":"@openpanel/core/modules/assistant/assistant.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"SetPropertyFiltersInput","kind":"type","to":"@openpanel/core/modules/assistant/assistant.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"setEventNamesFilterSchema","kind":"schema","to":"@openpanel/core/modules/assistant/assistant.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"SetEventNamesFilterInput","kind":"type","to":"@openpanel/core/modules/assistant/assistant.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"ChatClientToolHandlers","kind":"type","to":"@openpanel/core/modules/assistant/assistant.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zRelativeTimeframe","kind":"schema","to":"@openpanel/core/modules/cohort/cohort.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zAbsoluteTimeframe","kind":"schema","to":"@openpanel/core/modules/cohort/cohort.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zTimeframe","kind":"schema","to":"@openpanel/core/modules/cohort/cohort.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"Timeframe","kind":"type","to":"@openpanel/core/modules/cohort/cohort.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zFrequency","kind":"schema","to":"@openpanel/core/modules/cohort/cohort.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"Frequency","kind":"type","to":"@openpanel/core/modules/cohort/cohort.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zEventCriteria","kind":"schema","to":"@openpanel/core/modules/cohort/cohort.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"EventCriteria","kind":"type","to":"@openpanel/core/modules/cohort/cohort.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zEventBasedCohortDefinition","kind":"schema","to":"@openpanel/core/modules/cohort/cohort.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"EventBasedCohortDefinition","kind":"type","to":"@openpanel/core/modules/cohort/cohort.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zPropertyBasedCohortDefinition","kind":"schema","to":"@openpanel/core/modules/cohort/cohort.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"PropertyBasedCohortDefinition","kind":"type","to":"@openpanel/core/modules/cohort/cohort.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zCohortDefinition","kind":"schema","to":"@openpanel/core/modules/cohort/cohort.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"CohortDefinition","kind":"type","to":"@openpanel/core/modules/cohort/cohort.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zCohortInput","kind":"schema","to":"@openpanel/core/modules/cohort/cohort.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"CohortInput","kind":"type","to":"@openpanel/core/modules/cohort/cohort.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zCohortUpdate","kind":"schema","to":"@openpanel/core/modules/cohort/cohort.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"CohortUpdate","kind":"type","to":"@openpanel/core/modules/cohort/cohort.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zCohortFilter","kind":"schema","to":"@openpanel/core/modules/cohort/cohort.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"CohortFilter","kind":"type","to":"@openpanel/core/modules/cohort/cohort.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"ImportProviderId","kind":"type","to":"@openpanel/core/modules/import/import.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"ImportProviderType","kind":"type","to":"@openpanel/core/modules/import/import.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"ImportProviderMeta","kind":"type","to":"@openpanel/core/modules/import/import.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IMPORT_PROVIDERS","kind":"value","to":"@openpanel/core/modules/import/import.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zHttpUrl","kind":"schema","to":"@openpanel/core/modules/import/import.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zUmamiImportConfig","kind":"schema","to":"@openpanel/core/modules/import/import.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IUmamiImportConfig","kind":"type","to":"@openpanel/core/modules/import/import.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zPlausibleImportConfig","kind":"schema","to":"@openpanel/core/modules/import/import.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IPlausibleImportConfig","kind":"type","to":"@openpanel/core/modules/import/import.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zAmplitudeDataResidency","kind":"schema","to":"@openpanel/core/modules/import/import.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IAmplitudeDataResidency","kind":"type","to":"@openpanel/core/modules/import/import.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zAmplitudeImportConfig","kind":"schema","to":"@openpanel/core/modules/import/import.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IAmplitudeImportConfig","kind":"type","to":"@openpanel/core/modules/import/import.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zMixpanelDataResidency","kind":"schema","to":"@openpanel/core/modules/import/import.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IMixpanelDataResidency","kind":"type","to":"@openpanel/core/modules/import/import.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zMixpanelImportConfig","kind":"schema","to":"@openpanel/core/modules/import/import.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IMixpanelImportConfig","kind":"type","to":"@openpanel/core/modules/import/import.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IImportConfig","kind":"type","to":"@openpanel/core/modules/import/import.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zCreateImport","kind":"schema","to":"@openpanel/core/modules/import/import.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"ICreateImport","kind":"type","to":"@openpanel/core/modules/import/import.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"RESERVED_EVENT_NAMES","kind":"value","to":"@openpanel/core/modules/ingest/ingest.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"isBlockedEventName","kind":"value","to":"@openpanel/core/modules/ingest/ingest.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IProfileId","kind":"type","to":"@openpanel/core/modules/ingest/ingest.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IGroupPayload","kind":"type","to":"@openpanel/core/modules/ingest/ingest.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IAssignGroupPayload","kind":"type","to":"@openpanel/core/modules/ingest/ingest.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"ITrackPayload","kind":"type","to":"@openpanel/core/modules/ingest/ingest.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IIdentifyPayload","kind":"type","to":"@openpanel/core/modules/ingest/ingest.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IIncrementPayload","kind":"type","to":"@openpanel/core/modules/ingest/ingest.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IDecrementPayload","kind":"type","to":"@openpanel/core/modules/ingest/ingest.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IAliasPayload","kind":"type","to":"@openpanel/core/modules/ingest/ingest.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IReplayPayload","kind":"type","to":"@openpanel/core/modules/ingest/ingest.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"ITrackHandlerPayload","kind":"type","to":"@openpanel/core/modules/ingest/ingest.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zProfileId","kind":"schema","to":"@openpanel/core/modules/ingest/ingest.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zGroupPayload","kind":"schema","to":"@openpanel/core/modules/ingest/ingest.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zAssignGroupPayload","kind":"schema","to":"@openpanel/core/modules/ingest/ingest.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zTrackPayload","kind":"schema","to":"@openpanel/core/modules/ingest/ingest.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zIdentifyPayload","kind":"schema","to":"@openpanel/core/modules/ingest/ingest.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zIncrementPayload","kind":"schema","to":"@openpanel/core/modules/ingest/ingest.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zDecrementPayload","kind":"schema","to":"@openpanel/core/modules/ingest/ingest.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zAliasPayload","kind":"schema","to":"@openpanel/core/modules/ingest/ingest.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zReplayPayload","kind":"schema","to":"@openpanel/core/modules/ingest/ingest.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zTrackHandlerPayload","kind":"schema","to":"@openpanel/core/modules/ingest/ingest.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"DeprecatedOpenpanelEventOptions","kind":"type","to":"@openpanel/core/modules/ingest/ingest.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"DeprecatedPostEventPayload","kind":"type","to":"@openpanel/core/modules/ingest/ingest.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"DeprecatedUpdateProfilePayload","kind":"type","to":"@openpanel/core/modules/ingest/ingest.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"DeprecatedIncrementProfilePayload","kind":"type","to":"@openpanel/core/modules/ingest/ingest.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"DeprecatedDecrementProfilePayload","kind":"type","to":"@openpanel/core/modules/ingest/ingest.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zProjectAccessGrant","kind":"schema","to":"@openpanel/core/modules/organization/organization.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IProjectAccessGrant","kind":"type","to":"@openpanel/core/modules/organization/organization.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zInviteUser","kind":"schema","to":"@openpanel/core/modules/organization/organization.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zUpdateMemberAccess","kind":"schema","to":"@openpanel/core/modules/organization/organization.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zCreateReference","kind":"schema","to":"@openpanel/core/modules/reference/reference.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"zProjectFilterIp","kind":"schema","to":"@openpanel/core/modules/project/project.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IProjectFilterIp","kind":"type","to":"@openpanel/core/modules/project/project.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zProjectFilterProfileId","kind":"schema","to":"@openpanel/core/modules/project/project.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IProjectFilterProfileId","kind":"type","to":"@openpanel/core/modules/project/project.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zProjectFilterEvent","kind":"schema","to":"@openpanel/core/modules/project/project.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IProjectFilterEvent","kind":"type","to":"@openpanel/core/modules/project/project.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zProjectFilters","kind":"schema","to":"@openpanel/core/modules/project/project.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IProjectFilters","kind":"type","to":"@openpanel/core/modules/project/project.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zProject","kind":"schema","to":"@openpanel/core/modules/project/project.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IProjectEdit","kind":"type","to":"@openpanel/core/modules/project/project.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zProjectUpdate","kind":"schema","to":"@openpanel/core/modules/project/project.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"IProjectUpdate","kind":"type","to":"@openpanel/core/modules/project/project.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"zEditOrganization","kind":"schema","to":"@openpanel/core/modules/organization/organization.constants","keepTypeKeyword":false},
-{"from":"@openpanel/validation","symbol":"InsightMetricKey","kind":"type","to":"@openpanel/core/modules/insight/insight.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"InsightMetricUnit","kind":"type","to":"@openpanel/core/modules/insight/insight.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"InsightMetricEntry","kind":"type","to":"@openpanel/core/modules/insight/insight.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"InsightDimension","kind":"type","to":"@openpanel/core/modules/insight/insight.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"InsightExtra","kind":"type","to":"@openpanel/core/modules/insight/insight.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"InsightPayload","kind":"type","to":"@openpanel/core/modules/insight/insight.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"UnionOmit","kind":"type","to":"apps/start/src/utils/union-omit.ts","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IReport","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IReportInput","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IReportInputWithDates","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IChartEvent","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IChartFormula","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IChartEventItem","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IChartSeries","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IChartEvents","kind":"type","to":"DELETE","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IChartEventSegment","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IChartEventFilter","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IChartEventFilterValue","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IChartEventFilterOperator","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IChartFilterValueType","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IChartBreakdown","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IInterval","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IChartType","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IChartMetric","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IChartLineType","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IChartRange","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IGetChartDataInput","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"ICriteria","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"PreviousValue","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"Metrics","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"IChartSerie","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"FinalChart","kind":"type","to":"@openpanel/core/modules/report/report.constants","keepTypeKeyword":true},
-{"from":"@openpanel/validation","symbol":"ISetCookie","kind":"type","to":"DELETE","keepTypeKeyword":true},
-{"from":"@openpanel/constants","symbol":"emailCategories","kind":"value","to":"@openpanel/core/modules/email/email.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"EmailCategory","kind":"type","to":"@openpanel/core/modules/email/email.constants","keepTypeKeyword":true},
-{"from":"@openpanel/constants","symbol":"RESERVED_EVENT_NAMES","kind":"value","to":"@openpanel/core/modules/ingest/ingest.constants","keepTypeKeyword":false},
-{"from":"@openpanel/constants","symbol":"ProjectTypeNames","kind":"value","to":"@openpanel/core/modules/project/project.constants","keepTypeKeyword":false},
-{"from":"@openpanel/common","symbol":"DateTime","kind":"value","to":"packages/core/src/shared/date.ts","keepTypeKeyword":false},
-{"from":"@openpanel/common","symbol":"getTime","kind":"value","to":"packages/core/src/shared/date.ts","keepTypeKeyword":false},
-{"from":"@openpanel/common","symbol":"DEFAULT_IP_HEADER_ORDER","kind":"value","to":"packages/core/src/shared/get-client-ip.ts","keepTypeKeyword":false},
-{"from":"@openpanel/common","symbol":"getClientIpFromHeaders","kind":"value","to":"packages/core/src/shared/get-client-ip.ts","keepTypeKeyword":false,"toByConsumer":{"packages/sdks/express":"packages/sdks/express/get-client-ip.ts"}},
-{"from":"@openpanel/common","symbol":"getPreviousMetric","kind":"value","to":"packages/core/src/shared/math.ts","keepTypeKeyword":false,"toByConsumer":{"apps/start":"apps/start/src/utils/math.ts"}},
-{"from":"@openpanel/common","symbol":"ISerieDataItem","kind":"type","to":"packages/core/src/shared/group-by-labels.ts","keepTypeKeyword":true},
-{"from":"@openpanel/common","symbol":"groupByLabels","kind":"value","to":"packages/core/src/shared/group-by-labels.ts","keepTypeKeyword":false},
-{"from":"@openpanel/common","symbol":"shortId","kind":"value","to":"packages/core/src/shared/id.ts","keepTypeKeyword":false,"toByConsumer":{"apps/start":"apps/start/src/utils/math.ts"}},
-{"from":"@openpanel/common","symbol":"generateId","kind":"value","to":"packages/core/src/shared/id.ts","keepTypeKeyword":false,"toByConsumer":{"apps/api":"@openpanel/core"}},
-{"from":"@openpanel/common","symbol":"round","kind":"value","to":"packages/core/src/shared/math.ts","keepTypeKeyword":false,"toByConsumer":{"apps/start":"apps/start/src/utils/math.ts"}},
-{"from":"@openpanel/common","symbol":"average","kind":"value","to":"packages/core/src/shared/math.ts","keepTypeKeyword":false,"toByConsumer":{"apps/start":"apps/start/src/utils/math.ts"}},
-{"from":"@openpanel/common","symbol":"sum","kind":"value","to":"packages/core/src/shared/math.ts","keepTypeKeyword":false,"toByConsumer":{"apps/start":"apps/start/src/utils/math.ts"}},
-{"from":"@openpanel/common","symbol":"min","kind":"value","to":"packages/core/src/shared/math.ts","keepTypeKeyword":false,"toByConsumer":{"apps/start":"apps/start/src/utils/math.ts"}},
-{"from":"@openpanel/common","symbol":"max","kind":"value","to":"packages/core/src/shared/math.ts","keepTypeKeyword":false,"toByConsumer":{"apps/start":"apps/start/src/utils/math.ts"}},
-{"from":"@openpanel/common","symbol":"isFloat","kind":"value","to":"DELETE","keepTypeKeyword":false},
-{"from":"@openpanel/common","symbol":"ifNaN","kind":"value","to":"packages/core/src/shared/math.ts","keepTypeKeyword":false},
-{"from":"@openpanel/common","symbol":"randomName","kind":"value","to":"DELETE","keepTypeKeyword":false},
-{"from":"@openpanel/common","symbol":"randomSplitName","kind":"value","to":"DELETE","keepTypeKeyword":false},
-{"from":"@openpanel/common","symbol":"toDots","kind":"value","to":"packages/core/src/shared/object.ts","keepTypeKeyword":false},
-{"from":"@openpanel/common","symbol":"toObject","kind":"value","to":"packages/core/src/shared/object.ts","keepTypeKeyword":false},
-{"from":"@openpanel/common","symbol":"strip","kind":"value","to":"packages/core/src/shared/object.ts","keepTypeKeyword":false},
-{"from":"@openpanel/common","symbol":"deepMergeObjects","kind":"value","to":"packages/core/src/shared/object.ts","keepTypeKeyword":false},
-{"from":"@openpanel/common","symbol":"slug","kind":"value","to":"packages/core/src/shared/slug.ts","keepTypeKeyword":false,"toByConsumer":{"apps/start":"apps/start/src/utils/slug.ts"}},
-{"from":"@openpanel/common","symbol":"stripTrailingSlash","kind":"value","to":"packages/core/src/shared/string.ts","keepTypeKeyword":false},
-{"from":"@openpanel/common","symbol":"stripLeadingAndTrailingSlashes","kind":"value","to":"packages/core/src/shared/string.ts","keepTypeKeyword":false},
-{"from":"@openpanel/common","symbol":"TIMEZONES","kind":"value","to":"DELETE","keepTypeKeyword":false},
-{"from":"@openpanel/common","symbol":"TryCatchResult","kind":"type","to":"DELETE","keepTypeKeyword":true},
-{"from":"@openpanel/common","symbol":"tryCatch","kind":"value","to":"DELETE","keepTypeKeyword":false},
-{"from":"@openpanel/common","symbol":"parseSearchParams","kind":"value","to":"packages/core/src/shared/url.ts","keepTypeKeyword":false},
-{"from":"@openpanel/common","symbol":"parsePath","kind":"value","to":"packages/core/src/shared/url.ts","keepTypeKeyword":false},
-{"from":"@openpanel/common","symbol":"isSameDomain","kind":"value","to":"packages/core/src/shared/url.ts","keepTypeKeyword":false},
-{"from":"@openpanel/json","symbol":"getSafeJson","kind":"value","to":"packages/core/src/shared/json.ts","keepTypeKeyword":false},
-{"from":"@openpanel/json","symbol":"getSuperJson","kind":"value","to":"packages/core/src/shared/json.ts","keepTypeKeyword":false,"toByConsumer":{"apps/start":"apps/start/src/utils/super-json.ts","packages/redis":"packages/redis/json.ts"}},
-{"from":"@openpanel/json","symbol":"setSuperJson","kind":"value","to":"packages/core/src/shared/json.ts","keepTypeKeyword":false,"toByConsumer":{"packages/redis":"packages/redis/json.ts"}}
+ {
+ "from": "@openpanel/validation",
+ "symbol": "DEFAULT_ASPECT_RATIO",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "DEFAULT_ASPECT_RATIO",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "NOT_SET_VALUE",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "NOT_SET_VALUE",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "timeWindows",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "timeWindows",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "operators",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "operators",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "operatorsShort",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "operatorsShort",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "filterValueTypes",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "filterValueTypes",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IFilterValueType",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "IFilterValueType",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "getOperatorsForType",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "getOperatorsForType",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "chartTypes",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "chartTypes",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "chartSegments",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "chartSegments",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "lineTypes",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "lineTypes",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "intervals",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "intervals",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "alphabetIds",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "alphabetIds",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "metrics",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "metrics",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "isMinuteIntervalEnabledByRange",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "isMinuteIntervalEnabledByRange",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "isHourIntervalEnabledByRange",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "isHourIntervalEnabledByRange",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "getDefaultIntervalByRange",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "getDefaultIntervalByRange",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "getDefaultIntervalByDates",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "getDefaultIntervalByDates",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "countries",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "countries",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "getCountry",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "getCountry",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "chartColors",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "chartColors",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zChartEventFilter",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "zChartEventFilter",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "getCohortIds",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "getCohortIds",
+ "kind": "value",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zChartEventSegment",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "zChartEventSegment",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zChartEvent",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "zChartEvent",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zChartFormula",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "zChartFormula",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zChartEventWithType",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "zChartEventWithType",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zChartEventItem",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "zChartEventItem",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zChartBreakdown",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "zChartBreakdown",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zChartSeries",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "zChartSeries",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zChartBreakdowns",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "zChartBreakdowns",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zChartType",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "zChartType",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zLineType",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "zLineType",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zTimeInterval",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "zTimeInterval",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zMetric",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "zMetric",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zRange",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "zRange",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zCriteria",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "zCriteria",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zFunnelOptions",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "zFunnelOptions",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zRetentionOptions",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "zRetentionOptions",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zSankeyOptions",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "zSankeyOptions",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zHistogramOptions",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "zHistogramOptions",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zReportOptions",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "zReportOptions",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IReportOptions",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "IReportOptions",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "ISankeyOptions",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "ISankeyOptions",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IHistogramOptions",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "IHistogramOptions",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zWidgetType",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "zWidgetType",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IWidgetType",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "IWidgetType",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zRealtimeWidgetOptions",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "zRealtimeWidgetOptions",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zCounterWidgetOptions",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "zCounterWidgetOptions",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zWidgetOptions",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "zWidgetOptions",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IWidgetOptions",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "IWidgetOptions",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "ICounterWidgetOptions",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "ICounterWidgetOptions",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IRealtimeWidgetOptions",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "IRealtimeWidgetOptions",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zReportInput",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "zReportInput",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zReport",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "zReport",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zChartInput",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "zChartInput",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zShareOverview",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/share/share.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zShareDashboard",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/share/share.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zShareReport",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/share/share.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "ENCRYPTED_SECRET_PREFIX",
+ "kind": "value",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "looksEncrypted",
+ "kind": "value",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IServiceAccountKey",
+ "kind": "type",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IServiceAccountKeyResult",
+ "kind": "type",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "parseServiceAccountKey",
+ "kind": "value",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zSlackConfig",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "ISlackConfig",
+ "kind": "type",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zWebhookConfig",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IWebhookConfig",
+ "kind": "type",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zDiscordConfig",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IDiscordConfig",
+ "kind": "type",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zAppConfig",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IAppConfig",
+ "kind": "type",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zEmailConfig",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IEmailConfig",
+ "kind": "type",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zS3ExportConfigIamRole",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IS3ExportConfigIamRole",
+ "kind": "type",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zS3ExportConfigAccessKey",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IS3ExportConfigAccessKey",
+ "kind": "type",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zS3ExportConfig",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IS3ExportConfig",
+ "kind": "type",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zGCSExportConfig",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IGCSExportConfig",
+ "kind": "type",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IIntegrationConfig",
+ "kind": "type",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IIntegrationType",
+ "kind": "type",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IIntegrationKind",
+ "kind": "type",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IIntegrationDescriptor",
+ "kind": "type",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "slackDescriptor",
+ "kind": "value",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "discordDescriptor",
+ "kind": "value",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "webhookDescriptor",
+ "kind": "value",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "appDescriptor",
+ "kind": "value",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "emailDescriptor",
+ "kind": "value",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "s3ExportDescriptor",
+ "kind": "value",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "gcsExportDescriptor",
+ "kind": "value",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "INTEGRATION_DESCRIPTORS",
+ "kind": "value",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "isKind",
+ "kind": "value",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zIntegrationConfig",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zCreateSlackIntegration",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zCreateWebhookIntegration",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zCreateDiscordIntegration",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zCreateS3ExportIntegration",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zCreateGCSExportIntegration",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "DISCORD_TEST_NOTIFICATION_MESSAGE",
+ "kind": "value",
+ "to": "@openpanel/core/modules/integration/integration.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zNotificationRuleEventConfig",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/notification/notification.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "INotificationRuleEventConfig",
+ "kind": "type",
+ "to": "@openpanel/core/modules/notification/notification.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zNotificationRuleFunnelConfig",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/notification/notification.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "INotificationRuleFunnelConfig",
+ "kind": "type",
+ "to": "@openpanel/core/modules/notification/notification.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zNotificationRuleConfig",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/notification/notification.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "INotificationRuleConfig",
+ "kind": "type",
+ "to": "@openpanel/core/modules/notification/notification.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zCreateNotificationRule",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/notification/notification.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "ICreateNotificationRule",
+ "kind": "type",
+ "to": "@openpanel/core/modules/notification/notification.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zOnboardingProject",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/onboarding/onboarding.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IOnboardingProject",
+ "kind": "type",
+ "to": "@openpanel/core/modules/onboarding/onboarding.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zProvider",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/auth/auth.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zPassword",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/auth/auth.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zSignInEmail",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/auth/auth.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "ISignInEmail",
+ "kind": "type",
+ "to": "@openpanel/core/modules/auth/auth.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zSignUpEmail",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/auth/auth.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "ISignUpEmail",
+ "kind": "type",
+ "to": "@openpanel/core/modules/auth/auth.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zResetPassword",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/auth/auth.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IResetPassword",
+ "kind": "type",
+ "to": "@openpanel/core/modules/auth/auth.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zRequestResetPassword",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/auth/auth.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IRequestResetPassword",
+ "kind": "type",
+ "to": "@openpanel/core/modules/auth/auth.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zTotpCode",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/auth/auth.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "ITotpCode",
+ "kind": "type",
+ "to": "@openpanel/core/modules/auth/auth.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zTotpOrRecoveryCode",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/auth/auth.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "ITotpOrRecoveryCode",
+ "kind": "type",
+ "to": "@openpanel/core/modules/auth/auth.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zSignInShare",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/auth/auth.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "ISignInShare",
+ "kind": "type",
+ "to": "@openpanel/core/modules/auth/auth.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zGroupId",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/group/group.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zCreateGroup",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/group/group.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "ICreateGroup",
+ "kind": "type",
+ "to": "@openpanel/core/modules/group/group.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zUpdateGroup",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/group/group.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IUpdateGroup",
+ "kind": "type",
+ "to": "@openpanel/core/modules/group/group.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zCheckout",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/subscription/subscription.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "ICheckout",
+ "kind": "type",
+ "to": "@openpanel/core/modules/subscription/subscription.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zCancellationReason",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/subscription/subscription.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "ICancellationReason",
+ "kind": "type",
+ "to": "@openpanel/core/modules/subscription/subscription.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zCancelSubscription",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/subscription/subscription.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "ICancelSubscription",
+ "kind": "type",
+ "to": "@openpanel/core/modules/subscription/subscription.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zPauseSubscription",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/subscription/subscription.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IPauseSubscription",
+ "kind": "type",
+ "to": "@openpanel/core/modules/subscription/subscription.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "pageContextPageSchema",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/assistant/assistant.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "pageContextSchema",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/assistant/assistant.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "PageContext",
+ "kind": "type",
+ "to": "@openpanel/core/modules/assistant/assistant.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "PageContextPage",
+ "kind": "type",
+ "to": "@openpanel/core/modules/assistant/assistant.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "chatContextSchema",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/assistant/assistant.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "ChatAgentContext",
+ "kind": "type",
+ "to": "@openpanel/core/modules/assistant/assistant.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "ChatProvider",
+ "kind": "type",
+ "to": "@openpanel/core/modules/assistant/assistant.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "ChatModelEntry",
+ "kind": "type",
+ "to": "@openpanel/core/modules/assistant/assistant.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "CHAT_MODELS",
+ "kind": "value",
+ "to": "@openpanel/core/modules/assistant/assistant.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "ChatModelId",
+ "kind": "type",
+ "to": "@openpanel/core/modules/assistant/assistant.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "MODEL_STORAGE_KEY",
+ "kind": "value",
+ "to": "@openpanel/core/modules/assistant/assistant.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "PREFERRED_DEFAULT_MODEL_ID",
+ "kind": "value",
+ "to": "@openpanel/core/modules/assistant/assistant.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "isValidModelId",
+ "kind": "value",
+ "to": "@openpanel/core/modules/assistant/assistant.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "getModelLabel",
+ "kind": "value",
+ "to": "@openpanel/core/modules/assistant/assistant.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "getAvailableChatModels",
+ "kind": "value",
+ "to": "@openpanel/core/modules/assistant/assistant.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "applyFiltersSchema",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/assistant/assistant.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "ApplyFiltersInput",
+ "kind": "type",
+ "to": "@openpanel/core/modules/assistant/assistant.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "setPropertyFiltersSchema",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/assistant/assistant.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "SetPropertyFiltersInput",
+ "kind": "type",
+ "to": "@openpanel/core/modules/assistant/assistant.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "setEventNamesFilterSchema",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/assistant/assistant.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "SetEventNamesFilterInput",
+ "kind": "type",
+ "to": "@openpanel/core/modules/assistant/assistant.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "ChatClientToolHandlers",
+ "kind": "type",
+ "to": "@openpanel/core/modules/assistant/assistant.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zRelativeTimeframe",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/cohort/cohort.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zAbsoluteTimeframe",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/cohort/cohort.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zTimeframe",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/cohort/cohort.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "Timeframe",
+ "kind": "type",
+ "to": "@openpanel/core/modules/cohort/cohort.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zFrequency",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/cohort/cohort.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "Frequency",
+ "kind": "type",
+ "to": "@openpanel/core/modules/cohort/cohort.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zEventCriteria",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/cohort/cohort.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "EventCriteria",
+ "kind": "type",
+ "to": "@openpanel/core/modules/cohort/cohort.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zEventBasedCohortDefinition",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/cohort/cohort.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "EventBasedCohortDefinition",
+ "kind": "type",
+ "to": "@openpanel/core/modules/cohort/cohort.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zPropertyBasedCohortDefinition",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/cohort/cohort.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "PropertyBasedCohortDefinition",
+ "kind": "type",
+ "to": "@openpanel/core/modules/cohort/cohort.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zCohortDefinition",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/cohort/cohort.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "CohortDefinition",
+ "kind": "type",
+ "to": "@openpanel/core/modules/cohort/cohort.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zCohortInput",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/cohort/cohort.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "CohortInput",
+ "kind": "type",
+ "to": "@openpanel/core/modules/cohort/cohort.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zCohortUpdate",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/cohort/cohort.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "CohortUpdate",
+ "kind": "type",
+ "to": "@openpanel/core/modules/cohort/cohort.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zCohortFilter",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/cohort/cohort.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "CohortFilter",
+ "kind": "type",
+ "to": "@openpanel/core/modules/cohort/cohort.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "ImportProviderId",
+ "kind": "type",
+ "to": "@openpanel/core/modules/import/import.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "ImportProviderType",
+ "kind": "type",
+ "to": "@openpanel/core/modules/import/import.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "ImportProviderMeta",
+ "kind": "type",
+ "to": "@openpanel/core/modules/import/import.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IMPORT_PROVIDERS",
+ "kind": "value",
+ "to": "@openpanel/core/modules/import/import.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zHttpUrl",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/import/import.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zUmamiImportConfig",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/import/import.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IUmamiImportConfig",
+ "kind": "type",
+ "to": "@openpanel/core/modules/import/import.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zPlausibleImportConfig",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/import/import.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IPlausibleImportConfig",
+ "kind": "type",
+ "to": "@openpanel/core/modules/import/import.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zAmplitudeDataResidency",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/import/import.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IAmplitudeDataResidency",
+ "kind": "type",
+ "to": "@openpanel/core/modules/import/import.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zAmplitudeImportConfig",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/import/import.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IAmplitudeImportConfig",
+ "kind": "type",
+ "to": "@openpanel/core/modules/import/import.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zMixpanelDataResidency",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/import/import.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IMixpanelDataResidency",
+ "kind": "type",
+ "to": "@openpanel/core/modules/import/import.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zMixpanelImportConfig",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/import/import.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IMixpanelImportConfig",
+ "kind": "type",
+ "to": "@openpanel/core/modules/import/import.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IImportConfig",
+ "kind": "type",
+ "to": "@openpanel/core/modules/import/import.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zCreateImport",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/import/import.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "ICreateImport",
+ "kind": "type",
+ "to": "@openpanel/core/modules/import/import.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "RESERVED_EVENT_NAMES",
+ "kind": "value",
+ "to": "@openpanel/core/modules/ingest/ingest.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "isBlockedEventName",
+ "kind": "value",
+ "to": "@openpanel/core/modules/ingest/ingest.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IProfileId",
+ "kind": "type",
+ "to": "@openpanel/core/modules/ingest/ingest.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IGroupPayload",
+ "kind": "type",
+ "to": "@openpanel/core/modules/ingest/ingest.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IAssignGroupPayload",
+ "kind": "type",
+ "to": "@openpanel/core/modules/ingest/ingest.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "ITrackPayload",
+ "kind": "type",
+ "to": "@openpanel/core/modules/ingest/ingest.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IIdentifyPayload",
+ "kind": "type",
+ "to": "@openpanel/core/modules/ingest/ingest.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IIncrementPayload",
+ "kind": "type",
+ "to": "@openpanel/core/modules/ingest/ingest.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IDecrementPayload",
+ "kind": "type",
+ "to": "@openpanel/core/modules/ingest/ingest.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IAliasPayload",
+ "kind": "type",
+ "to": "@openpanel/core/modules/ingest/ingest.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IReplayPayload",
+ "kind": "type",
+ "to": "@openpanel/core/modules/ingest/ingest.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "ITrackHandlerPayload",
+ "kind": "type",
+ "to": "@openpanel/core/modules/ingest/ingest.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zProfileId",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/ingest/ingest.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zGroupPayload",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/ingest/ingest.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zAssignGroupPayload",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/ingest/ingest.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zTrackPayload",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/ingest/ingest.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zIdentifyPayload",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/ingest/ingest.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zIncrementPayload",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/ingest/ingest.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zDecrementPayload",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/ingest/ingest.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zAliasPayload",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/ingest/ingest.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zReplayPayload",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/ingest/ingest.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zTrackHandlerPayload",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/ingest/ingest.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "DeprecatedOpenpanelEventOptions",
+ "kind": "type",
+ "to": "@openpanel/core/modules/ingest/ingest.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "DeprecatedPostEventPayload",
+ "kind": "type",
+ "to": "@openpanel/core/modules/ingest/ingest.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "DeprecatedUpdateProfilePayload",
+ "kind": "type",
+ "to": "@openpanel/core/modules/ingest/ingest.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "DeprecatedIncrementProfilePayload",
+ "kind": "type",
+ "to": "@openpanel/core/modules/ingest/ingest.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "DeprecatedDecrementProfilePayload",
+ "kind": "type",
+ "to": "@openpanel/core/modules/ingest/ingest.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zProjectAccessGrant",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/organization/organization.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IProjectAccessGrant",
+ "kind": "type",
+ "to": "@openpanel/core/modules/organization/organization.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zInviteUser",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/organization/organization.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zUpdateMemberAccess",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/organization/organization.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zCreateReference",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/reference/reference.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zProjectFilterIp",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/project/project.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IProjectFilterIp",
+ "kind": "type",
+ "to": "@openpanel/core/modules/project/project.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zProjectFilterProfileId",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/project/project.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IProjectFilterProfileId",
+ "kind": "type",
+ "to": "@openpanel/core/modules/project/project.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zProjectFilterEvent",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/project/project.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IProjectFilterEvent",
+ "kind": "type",
+ "to": "@openpanel/core/modules/project/project.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zProjectFilters",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/project/project.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IProjectFilters",
+ "kind": "type",
+ "to": "@openpanel/core/modules/project/project.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zProject",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/project/project.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IProjectEdit",
+ "kind": "type",
+ "to": "@openpanel/core/modules/project/project.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zProjectUpdate",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/project/project.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IProjectUpdate",
+ "kind": "type",
+ "to": "@openpanel/core/modules/project/project.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "zEditOrganization",
+ "kind": "schema",
+ "to": "@openpanel/core/modules/organization/organization.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "InsightMetricKey",
+ "kind": "type",
+ "to": "@openpanel/core/modules/insight/insight.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "InsightMetricUnit",
+ "kind": "type",
+ "to": "@openpanel/core/modules/insight/insight.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "InsightMetricEntry",
+ "kind": "type",
+ "to": "@openpanel/core/modules/insight/insight.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "InsightDimension",
+ "kind": "type",
+ "to": "@openpanel/core/modules/insight/insight.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "InsightExtra",
+ "kind": "type",
+ "to": "@openpanel/core/modules/insight/insight.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "InsightPayload",
+ "kind": "type",
+ "to": "@openpanel/core/modules/insight/insight.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "UnionOmit",
+ "kind": "type",
+ "to": "apps/start/src/utils/union-omit.ts",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IReport",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IReportInput",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IReportInputWithDates",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IChartEvent",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IChartFormula",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IChartEventItem",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IChartSeries",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IChartEvents",
+ "kind": "type",
+ "to": "DELETE",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IChartEventSegment",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IChartEventFilter",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IChartEventFilterValue",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IChartEventFilterOperator",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IChartFilterValueType",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IChartBreakdown",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IInterval",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IChartType",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IChartMetric",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IChartLineType",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IChartRange",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IGetChartDataInput",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "ICriteria",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "PreviousValue",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "Metrics",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "IChartSerie",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "FinalChart",
+ "kind": "type",
+ "to": "@openpanel/core/modules/report/report.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/validation",
+ "symbol": "ISetCookie",
+ "kind": "type",
+ "to": "DELETE",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "emailCategories",
+ "kind": "value",
+ "to": "@openpanel/core/modules/email/email.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "EmailCategory",
+ "kind": "type",
+ "to": "@openpanel/core/modules/email/email.constants",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "RESERVED_EVENT_NAMES",
+ "kind": "value",
+ "to": "@openpanel/core/modules/ingest/ingest.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/constants",
+ "symbol": "ProjectTypeNames",
+ "kind": "value",
+ "to": "@openpanel/core/modules/project/project.constants",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "DateTime",
+ "kind": "value",
+ "to": "packages/core/src/shared/date.ts",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "getTime",
+ "kind": "value",
+ "to": "packages/core/src/shared/date.ts",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "DEFAULT_IP_HEADER_ORDER",
+ "kind": "value",
+ "to": "packages/core/src/shared/get-client-ip.ts",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "getClientIpFromHeaders",
+ "kind": "value",
+ "to": "packages/core/src/shared/get-client-ip.ts",
+ "keepTypeKeyword": false,
+ "toByConsumer": {
+ "packages/sdks/express": "packages/sdks/express/get-client-ip.ts"
+ }
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "getPreviousMetric",
+ "kind": "value",
+ "to": "packages/core/src/shared/math.ts",
+ "keepTypeKeyword": false,
+ "toByConsumer": { "apps/start": "apps/start/src/utils/math.ts" }
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "ISerieDataItem",
+ "kind": "type",
+ "to": "packages/core/src/shared/group-by-labels.ts",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "groupByLabels",
+ "kind": "value",
+ "to": "packages/core/src/shared/group-by-labels.ts",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "shortId",
+ "kind": "value",
+ "to": "packages/core/src/shared/id.ts",
+ "keepTypeKeyword": false,
+ "toByConsumer": { "apps/start": "apps/start/src/utils/math.ts" }
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "generateId",
+ "kind": "value",
+ "to": "packages/core/src/shared/id.ts",
+ "keepTypeKeyword": false,
+ "toByConsumer": { "apps/api": "@openpanel/core" }
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "round",
+ "kind": "value",
+ "to": "packages/core/src/shared/math.ts",
+ "keepTypeKeyword": false,
+ "toByConsumer": { "apps/start": "apps/start/src/utils/math.ts" }
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "average",
+ "kind": "value",
+ "to": "packages/core/src/shared/math.ts",
+ "keepTypeKeyword": false,
+ "toByConsumer": { "apps/start": "apps/start/src/utils/math.ts" }
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "sum",
+ "kind": "value",
+ "to": "packages/core/src/shared/math.ts",
+ "keepTypeKeyword": false,
+ "toByConsumer": { "apps/start": "apps/start/src/utils/math.ts" }
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "min",
+ "kind": "value",
+ "to": "packages/core/src/shared/math.ts",
+ "keepTypeKeyword": false,
+ "toByConsumer": { "apps/start": "apps/start/src/utils/math.ts" }
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "max",
+ "kind": "value",
+ "to": "packages/core/src/shared/math.ts",
+ "keepTypeKeyword": false,
+ "toByConsumer": { "apps/start": "apps/start/src/utils/math.ts" }
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "isFloat",
+ "kind": "value",
+ "to": "DELETE",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "ifNaN",
+ "kind": "value",
+ "to": "packages/core/src/shared/math.ts",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "randomName",
+ "kind": "value",
+ "to": "DELETE",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "randomSplitName",
+ "kind": "value",
+ "to": "DELETE",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "toDots",
+ "kind": "value",
+ "to": "packages/core/src/shared/object.ts",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "toObject",
+ "kind": "value",
+ "to": "packages/core/src/shared/object.ts",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "strip",
+ "kind": "value",
+ "to": "packages/core/src/shared/object.ts",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "deepMergeObjects",
+ "kind": "value",
+ "to": "packages/core/src/shared/object.ts",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "slug",
+ "kind": "value",
+ "to": "packages/core/src/shared/slug.ts",
+ "keepTypeKeyword": false,
+ "toByConsumer": { "apps/start": "apps/start/src/utils/slug.ts" }
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "stripTrailingSlash",
+ "kind": "value",
+ "to": "packages/core/src/shared/string.ts",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "stripLeadingAndTrailingSlashes",
+ "kind": "value",
+ "to": "packages/core/src/shared/string.ts",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "TIMEZONES",
+ "kind": "value",
+ "to": "DELETE",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "TryCatchResult",
+ "kind": "type",
+ "to": "DELETE",
+ "keepTypeKeyword": true
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "tryCatch",
+ "kind": "value",
+ "to": "DELETE",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "parseSearchParams",
+ "kind": "value",
+ "to": "packages/core/src/shared/url.ts",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "parsePath",
+ "kind": "value",
+ "to": "packages/core/src/shared/url.ts",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/common",
+ "symbol": "isSameDomain",
+ "kind": "value",
+ "to": "packages/core/src/shared/url.ts",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/json",
+ "symbol": "getSafeJson",
+ "kind": "value",
+ "to": "packages/core/src/shared/json.ts",
+ "keepTypeKeyword": false
+ },
+ {
+ "from": "@openpanel/json",
+ "symbol": "getSuperJson",
+ "kind": "value",
+ "to": "packages/core/src/shared/json.ts",
+ "keepTypeKeyword": false,
+ "toByConsumer": {
+ "apps/start": "apps/start/src/utils/super-json.ts",
+ "packages/redis": "packages/redis/json.ts"
+ }
+ },
+ {
+ "from": "@openpanel/json",
+ "symbol": "setSuperJson",
+ "kind": "value",
+ "to": "packages/core/src/shared/json.ts",
+ "keepTypeKeyword": false,
+ "toByConsumer": { "packages/redis": "packages/redis/json.ts" }
+ }
]
diff --git a/tooling/gates/conformance/cli.ts b/tooling/gates/conformance/cli.ts
index 0d6b5d1d7..0db49e912 100644
--- a/tooling/gates/conformance/cli.ts
+++ b/tooling/gates/conformance/cli.ts
@@ -209,7 +209,12 @@ function collectRouters(tree: Tree) {
// routerKey -> identifier, from `createTRPCRouter({ key: xRouter, ... })`.
const mounted = new Map<string, string>();
visit(registry.sourceFile, (node) => {
- if (!(ts.isCallExpression(node) && node.expression.getText().endsWith('Router'))) {
+ if (
+ !(
+ ts.isCallExpression(node) &&
+ node.expression.getText().endsWith('Router')
+ )
+ ) {
return;
}
const literal = objectLiteralOf(node);
@@ -333,8 +338,9 @@ function buildRules(tree: Tree): RuleBlock[] {
);
// Tests count: ADR-022's "69 importers" is what fix-wave step 2 has to move,
// and a test importing v1-compat is as much a caller as a service is.
- const v1CompatImporters = tree.allCoreText.filter(({ path, text }) =>
- path !== CORE_V1_COMPAT_FILE && V1_COMPAT_IMPORT.test(text)
+ const v1CompatImporters = tree.allCoreText.filter(
+ ({ path, text }) =>
+ path !== CORE_V1_COMPAT_FILE && V1_COMPAT_IMPORT.test(text)
).length;
return [
@@ -376,7 +382,8 @@ function buildRules(tree: Tree): RuleBlock[] {
},
{
id: 'R6',
- title: 'The graph is rebuilt per unit of work; there is no "no context" path',
+ title:
+ 'The graph is rebuilt per unit of work; there is no "no context" path',
asserted: true,
metrics: [
checkCreateServicesCallSites([...tree.core, ...tree.api]),
@@ -394,12 +401,13 @@ function buildRules(tree: Tree): RuleBlock[] {
},
{
id: 'R9',
- title: 'Clients are transports: config in, typed result or ProviderError out, no logger',
+ title:
+ 'Clients are transports: config in, typed result or ProviderError out, no logger',
asserted: false,
metrics: [
reviewOnly(
'client shape',
- 'Review rule (ADR-022 check line: "review"). Read packages/core/src/clients/*: no logger, built once at boot, a missing thing is null.',
+ 'Review rule (ADR-022 check line: "review"). Read packages/core/src/clients/*: no logger, built once at boot, a missing thing is null.'
),
],
},
@@ -416,7 +424,7 @@ function buildRules(tree: Tree): RuleBlock[] {
metrics: [
reviewOnly(
'job file shape',
- 'Review rule (ADR-022 check line: "review + ADR-021"). See R18 below for the one mechanical half.',
+ 'Review rule (ADR-022 check line: "review + ADR-021"). See R18 below for the one mechanical half.'
),
],
},
@@ -440,7 +448,7 @@ function buildRules(tree: Tree): RuleBlock[] {
metrics: [
reviewOnly(
'index.ts and main.ts shape',
- 'Review rule (ADR-022 check line: "review of index.ts and main.ts").',
+ 'Review rule (ADR-022 check line: "review of index.ts and main.ts").'
),
],
},
@@ -463,7 +471,7 @@ function buildRules(tree: Tree): RuleBlock[] {
metrics: [
reviewOnly(
'lifecycle',
- 'Review rule (ADR-022 check line: "main.ts shutdown order vs open order; core does not close handed-in connections").',
+ 'Review rule (ADR-022 check line: "main.ts shutdown order vs open order; core does not close handed-in connections").'
),
],
},
@@ -486,7 +494,7 @@ function buildRules(tree: Tree): RuleBlock[] {
metrics: [
reviewOnly(
'provider error handling',
- 'Review rule (ADR-022 check line: "review of every job-handler catch around a client call").',
+ 'Review rule (ADR-022 check line: "review of every job-handler catch around a client call").'
),
],
},
@@ -536,7 +544,7 @@ function buildRules(tree: Tree): RuleBlock[] {
),
],
note: cruiser.available
- ? 'M14-002 landed these rules and verified cruiser resolves its typescript peer, so R22 is the cruiser rule, not ADR-022\'s grep fallback. A bare ../ depth grep is forbidden: a module importing defineJob at ../../jobs/define is importing DOWNWARD.'
+ ? "M14-002 landed these rules and verified cruiser resolves its typescript peer, so R22 is the cruiser rule, not ADR-022's grep fallback. A bare ../ depth grep is forbidden: a module importing defineJob at ../../jobs/define is importing DOWNWARD."
: undefined,
},
// R20 (test shapes) is deferred by Carl, 2026-09-08, and is deliberately
@@ -600,21 +608,29 @@ function metricIsAboveTarget(metric: Metric): boolean {
* the metric it comes from; the numbers themselves come from the same Metric
* objects the blocks below print, never from a second measurement.
*/
-const BASELINE_METRICS: readonly { rule: string; metric: number; label: string }[] =
- [
- { rule: 'R3', metric: 0, label: 'factories not on (deps, services)' },
- { rule: 'R5', metric: 0, label: 'hand-written XService interfaces' },
- { rule: 'R5', metric: 1, label: 'Services members NOT typed by ReturnType (see the block for how many DO)' },
- { rule: 'R6', metric: 0, label: 'unsanctioned createServices( call sites' },
- { rule: 'R6', metric: 1, label: 'load* dependency loaders' },
- { rule: 'R7', metric: 0, label: 'process.env.<name> reads in core' },
- { rule: 'R10', metric: 0, label: 'require* defs outside the auth stack' },
- { rule: 'R14', metric: 0, label: 'NEXT_PUBLIC_ in core' },
- { rule: 'R15', metric: 0, label: 'module-scope construction in core' },
- { rule: 'R21', metric: 1, label: 'duplicate util copies' },
- { rule: 'R22', metric: 6, label: 'upward imports: shared/ -> above' },
- { rule: 'R22', metric: 7, label: 'upward imports: transport -> module src' },
- ];
+const BASELINE_METRICS: readonly {
+ rule: string;
+ metric: number;
+ label: string;
+}[] = [
+ { rule: 'R3', metric: 0, label: 'factories not on (deps, services)' },
+ { rule: 'R5', metric: 0, label: 'hand-written XService interfaces' },
+ {
+ rule: 'R5',
+ metric: 1,
+ label:
+ 'Services members NOT typed by ReturnType (see the block for how many DO)',
+ },
+ { rule: 'R6', metric: 0, label: 'unsanctioned createServices( call sites' },
+ { rule: 'R6', metric: 1, label: 'load* dependency loaders' },
+ { rule: 'R7', metric: 0, label: 'process.env.<name> reads in core' },
+ { rule: 'R10', metric: 0, label: 'require* defs outside the auth stack' },
+ { rule: 'R14', metric: 0, label: 'NEXT_PUBLIC_ in core' },
+ { rule: 'R15', metric: 0, label: 'module-scope construction in core' },
+ { rule: 'R21', metric: 1, label: 'duplicate util copies' },
+ { rule: 'R22', metric: 6, label: 'upward imports: shared/ -> above' },
+ { rule: 'R22', metric: 7, label: 'upward imports: transport -> module src' },
+];
function renderBaseline(rules: RuleBlock[], lines: string[]): void {
lines.push('BASELINE REPRODUCTION (ADR-022 / CONFORMANCE_GATE_SPEC.md)');
@@ -627,7 +643,9 @@ function renderBaseline(rules: RuleBlock[], lines: string[]): void {
continue;
}
const count = metric.count < 0 ? 'UNAVAILABLE' : String(metric.count);
- lines.push(` ${entry.rule.padEnd(RULE_ID_WIDTH)} ${count.padStart(4)} ${entry.label}`);
+ lines.push(
+ ` ${entry.rule.padEnd(RULE_ID_WIDTH)} ${count.padStart(4)} ${entry.label}`
+ );
}
lines.push('');
}
diff --git a/tooling/gates/conformance/conformance.constants.ts b/tooling/gates/conformance/conformance.constants.ts
index 434852abc..2b90eb7b0 100644
--- a/tooling/gates/conformance/conformance.constants.ts
+++ b/tooling/gates/conformance/conformance.constants.ts
@@ -162,7 +162,11 @@ export const UTIL_DIRECTORY_PATTERNS: readonly RegExp[] = [
* without this the basename check reports six `index.ts` "duplicates" and buries
* the five real copies.
*/
-export const UTIL_BASENAME_EXCLUSIONS = new Set(['index', 'types', 'constants']);
+export const UTIL_BASENAME_EXCLUSIONS = new Set([
+ 'index',
+ 'types',
+ 'constants',
+]);
/** R21 — the package ADR-022's C7 chore will create. Absent today. */
export const SHARED_PACKAGE_NAME = '@openpanel/shared';
diff --git a/tooling/gates/conformance/cruiser.ts b/tooling/gates/conformance/cruiser.ts
index 3fd238261..88db1e57c 100644
--- a/tooling/gates/conformance/cruiser.ts
+++ b/tooling/gates/conformance/cruiser.ts
@@ -61,7 +61,9 @@ export function runCruiser(repoRoot: string): CruiserResult {
}
let parsed: {
- summary?: { violations?: { rule: { name: string }; from: string; to: string }[] };
+ summary?: {
+ violations?: { rule: { name: string }; from: string; to: string }[];
+ };
};
try {
parsed = JSON.parse(run.stdout);
@@ -110,10 +112,7 @@ const RESOLVED_SUFFIXES = ['.ts', '.tsx', '/index.ts', '/index.tsx', ''];
* `to`. Returns 0 when the specifier is not relative (an aliased or package
* import), which the report renders as a bare path rather than inventing a line.
*/
-export function resolveImportLine(
- source: ParsedSource,
- to: string
-): number {
+export function resolveImportLine(source: ParsedSource, to: string): number {
const directory = dirname(source.path);
let line = 0;
@@ -135,10 +134,17 @@ export function resolveImportLine(
}
function importSpecifierOf(node: ts.Node): ts.StringLiteral | undefined {
- if (ts.isImportDeclaration(node) && ts.isStringLiteral(node.moduleSpecifier)) {
+ if (
+ ts.isImportDeclaration(node) &&
+ ts.isStringLiteral(node.moduleSpecifier)
+ ) {
return node.moduleSpecifier;
}
- if (ts.isExportDeclaration(node) && node.moduleSpecifier && ts.isStringLiteral(node.moduleSpecifier)) {
+ if (
+ ts.isExportDeclaration(node) &&
+ node.moduleSpecifier &&
+ ts.isStringLiteral(node.moduleSpecifier)
+ ) {
return node.moduleSpecifier;
}
if (
diff --git a/tooling/gates/conformance/rules.ts b/tooling/gates/conformance/rules.ts
index 0428f6348..457bdf5d0 100644
--- a/tooling/gates/conformance/rules.ts
+++ b/tooling/gates/conformance/rules.ts
@@ -71,7 +71,8 @@ const SERVICE_DEPS_TYPE = 'ServiceDeps';
const SERVICES_TYPE = 'Services';
const SERVICES_INTERFACE_NAME = 'Services';
const CREATE_SERVICES_CALLEE = 'createServices';
-const MODULE_ROOT_FILE = /^([a-z0-9-]+)\.(rpc|service|routes|jobs|constants)\.tsx?$/;
+const MODULE_ROOT_FILE =
+ /^([a-z0-9-]+)\.(rpc|service|routes|jobs|constants)\.tsx?$/;
const byFileThenLine = (a: Offender, b: Offender): number =>
a.file === b.file ? a.line - b.line : a.file < b.file ? -1 : 1;
@@ -88,9 +89,7 @@ const typeText = (node: ts.TypeNode | undefined): string =>
node ? node.getText().replace(/\s+/g, ' ') : '<untyped>';
/** `services: () => Services`, in any of the ways that can be written. */
-const isServicesThunk = (
- parameter: ts.ParameterDeclaration
-): boolean => {
+const isServicesThunk = (parameter: ts.ParameterDeclaration): boolean => {
const type = parameter.type;
if (!(type && ts.isFunctionTypeNode(type))) {
return false;
@@ -102,9 +101,7 @@ const isServicesThunk = (
);
};
-const isServiceDeps = (
- parameter: ts.ParameterDeclaration
-): boolean =>
+const isServiceDeps = (parameter: ts.ParameterDeclaration): boolean =>
Boolean(
parameter.type &&
ts.isTypeReferenceNode(parameter.type) &&
@@ -140,7 +137,10 @@ export function checkFactorySignatures(sources: ParsedSource[]): Metric {
}
const signature = parameters
- .map((parameter) => `${parameter.name.getText()}: ${typeText(parameter.type)}`)
+ .map(
+ (parameter) =>
+ `${parameter.name.getText()}: ${typeText(parameter.type)}`
+ )
.join(', ');
const missing = hasThunk
? 'first parameter is not ServiceDeps'
@@ -193,9 +193,7 @@ export function checkServiceInterfaces(sources: ParsedSource[]): Metric {
};
}
-const isReturnTypeOfFactory = (
- type: ts.TypeNode | undefined
-): boolean => {
+const isReturnTypeOfFactory = (type: ts.TypeNode | undefined): boolean => {
if (!(type && ts.isTypeReferenceNode(type))) {
return false;
}
@@ -352,7 +350,9 @@ export function checkDependencyLoaders(sources: ParsedSource[]): Metric {
target: 0,
offenders: sorted(offenders),
note: sorted(allowed)
- .map((entry) => `allowlisted: ${entry.file}:${entry.line} ${entry.detail}`)
+ .map(
+ (entry) => `allowlisted: ${entry.file}:${entry.line} ${entry.detail}`
+ )
.join('\n'),
};
}
@@ -377,7 +377,10 @@ export function collectEnvReads(sources: ParsedSource[]): EnvReadSplit {
for (const source of sources) {
visit(source.sourceFile, (node) => {
- if (ts.isPropertyAccessExpression(node) && isProcessEnv(node.expression)) {
+ if (
+ ts.isPropertyAccessExpression(node) &&
+ isProcessEnv(node.expression)
+ ) {
dotted.push({
file: source.path,
line: lineOf(source, node.getStart(source.sourceFile)),
@@ -798,7 +801,8 @@ export function checkJobPayloadDates(sources: ParsedSource[]): Metric {
offenders.push({
file: source.path,
line: lineOf(source, node.getStart(source.sourceFile)),
- detail: 'z.date() in a job file — a payload must survive a JSON round-trip',
+ detail:
+ 'z.date() in a job file — a payload must survive a JSON round-trip',
});
}
});
@@ -820,7 +824,11 @@ export function checkJobPayloadDates(sources: ParsedSource[]): Metric {
* which is exactly why R2 is reported and not asserted.
*/
export function checkRpcProceduresWithoutCallers(
- routers: { routerKey: string; source: ParsedSource; procedures: { name: string; line: number }[] }[],
+ routers: {
+ routerKey: string;
+ source: ParsedSource;
+ procedures: { name: string; line: number }[];
+ }[],
frontendText: string
): Metric {
const offenders: Offender[] = [];
@@ -847,7 +855,9 @@ export function checkRpcProceduresWithoutCallers(
}
/** R17 — refines precede the transform, and loadConfig takes env as a parameter. */
-export function checkConfigLoaderShape(source: ParsedSource | undefined): Metric {
+export function checkConfigLoaderShape(
+ source: ParsedSource | undefined
+): Metric {
if (!source) {
return {
label: 'config loader shape (apps/api/src/config/env.ts)',
@@ -865,7 +875,8 @@ export function checkConfigLoaderShape(source: ParsedSource | undefined): Metric
visit(source.sourceFile, (node) => {
if (
!(
- ts.isCallExpression(node) && ts.isPropertyAccessExpression(node.expression)
+ ts.isCallExpression(node) &&
+ ts.isPropertyAccessExpression(node.expression)
)
) {
return;
diff --git a/tooling/gates/conformance/sources.ts b/tooling/gates/conformance/sources.ts
index 6a59069f2..8955d94e2 100644
--- a/tooling/gates/conformance/sources.ts
+++ b/tooling/gates/conformance/sources.ts
@@ -92,15 +92,10 @@ export function readSources(repoRoot: string, paths: string[]): ParsedSource[] {
/** 1-indexed, the way every editor and every `file:line` offender reads. */
export function lineOf(source: ParsedSource, position: number): number {
- return (
- source.sourceFile.getLineAndCharacterOfPosition(position).line + 1
- );
+ return source.sourceFile.getLineAndCharacterOfPosition(position).line + 1;
}
-export function visit(
- node: ts.Node,
- callback: (node: ts.Node) => void
-): void {
+export function visit(node: ts.Node, callback: (node: ts.Node) => void): void {
callback(node);
ts.forEachChild(node, (child) => visit(child, callback));
}
@@ -150,7 +145,10 @@ export function isExported(node: ts.Node): boolean {
export interface NamedFunction {
name: string;
/** Narrow enough that `.parameters` and `.body` are both reachable. */
- declaration: ts.FunctionDeclaration | ts.FunctionExpression | ts.ArrowFunction;
+ declaration:
+ | ts.FunctionDeclaration
+ | ts.FunctionExpression
+ | ts.ArrowFunction;
/** The node whose position the offender line is reported at. */
anchor: ts.Node;
}
diff --git a/tooling/publish/generate-readme.ts b/tooling/publish/generate-readme.ts
index 4d2332a64..cd99bcabd 100644
--- a/tooling/publish/generate-readme.ts
+++ b/tooling/publish/generate-readme.ts
@@ -44,16 +44,16 @@ const dedentContent = (text: string): string => {
const transformMdxToReadme = (
mdxContent: string,
- packageName: string,
+ packageName: string
): string => {
let content = mdxContent;
// Load MDX component content files
const commonSdkConfigPath = workspacePath(
- 'apps/public/src/components/common-sdk-config.mdx',
+ 'apps/public/src/components/common-sdk-config.mdx'
);
const webSdkConfigPath = workspacePath(
- 'apps/public/src/components/web-sdk-config.mdx',
+ 'apps/public/src/components/web-sdk-config.mdx'
);
let commonSdkConfigContent = '';
@@ -96,13 +96,13 @@ const transformMdxToReadme = (
if (commonSdkConfigContent) {
content = content.replace(
/<CommonSdkConfig\s*\/>/g,
- `\n${commonSdkConfigContent}\n`,
+ `\n${commonSdkConfigContent}\n`
);
}
if (webSdkConfigContent) {
content = content.replace(
/<WebSdkConfig\s*\/>/g,
- `\n${webSdkConfigContent}\n`,
+ `\n${webSdkConfigContent}\n`
);
}
@@ -141,7 +141,7 @@ const transformMdxToReadme = (
(match, value, tabContent) => {
const dedented = dedentContent(tabContent).trim();
return `\n#### ${value}\n\n${dedented}\n\n`;
- },
+ }
);
// Remove the Tabs wrapper
content = content.replace(/<Tabs[^>]*>([\s\S]*?)<\/Tabs>/g, '$1');
@@ -152,7 +152,7 @@ const transformMdxToReadme = (
(match, value, tabContent) => {
const dedented = dedentContent(tabContent).trim();
return `\n#### ${value}\n\n${dedented}\n\n`;
- },
+ }
);
content = content.replace(/<Tabs[^>]*>([\s\S]*?)<\/Tabs>/g, '$1');
}
@@ -171,7 +171,7 @@ const transformMdxToReadme = (
/<([A-Z][a-zA-Z]*)[^>]*>([\s\S]*?)<\/\1>/g,
(match, tagName, innerContent) => {
return dedentContent(innerContent).trim();
- },
+ }
);
}
@@ -186,7 +186,7 @@ const transformMdxToReadme = (
// Convert internal links (starting with /) to absolute URLs
content = content.replace(
/\[([^\]]+)\]\((\/[^\)]+)\)/g,
- '[$1](https://openpanel.dev$2)',
+ '[$1](https://openpanel.dev$2)'
);
// Clean up extra blank lines
@@ -209,7 +209,7 @@ const transformMdxToReadme = (
export const generateReadme = (
packages: Record<string, PackageInfo>,
- dependents: string[],
+ dependents: string[]
): string[] => {
const generatedReadmes: string[] = [];
for (const dep of dependents) {
@@ -217,7 +217,7 @@ export const generateReadme = (
const docPath = pkg?.config?.docPath;
if (!docPath) {
console.log(
- `📝 Skipping README generation for ${dep} (no docPath configured)`,
+ `📝 Skipping README generation for ${dep} (no docPath configured)`
);
continue;
}
diff --git a/tooling/typescript/package.json b/tooling/typescript/package.json
index 3db24fdaf..1de0950e2 100644
--- a/tooling/typescript/package.json
+++ b/tooling/typescript/package.json
@@ -3,7 +3,11 @@
"version": "0.1.0",
"type": "module",
"private": true,
- "files": ["base.json", "sdk.json", "tsup.config.json"],
+ "files": [
+ "base.json",
+ "sdk.json",
+ "tsup.config.json"
+ ],
"devDependencies": {
"tsup": "7.3.0"
}