Skip to content

Commit f880b9a

Browse files
committed
wip share
1 parent 13bd16b commit f880b9a

File tree

19 files changed

+1576
-398
lines changed

19 files changed

+1576
-398
lines changed

apps/start/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"cf-typegen": "wrangler types",
1111
"build": "pnpm with-env vite build",
1212
"serve": "vite preview",
13-
"test": "vitest run",
1413
"format": "biome format",
1514
"lint": "biome lint",
1615
"check": "biome check",
@@ -26,7 +25,7 @@
2625
"@hookform/resolvers": "^3.3.4",
2726
"@hyperdx/node-opentelemetry": "^0.8.1",
2827
"@nivo/sankey": "^0.99.0",
29-
"@number-flow/react": "0.3.5",
28+
"@number-flow/react": "0.5.10",
3029
"@openpanel/common": "workspace:^",
3130
"@openpanel/constants": "workspace:^",
3231
"@openpanel/integrations": "workspace:^",
@@ -150,7 +149,7 @@
150149
},
151150
"devDependencies": {
152151
"@biomejs/biome": "1.9.4",
153-
"@cloudflare/vite-plugin": "^1.13.12",
152+
"@cloudflare/vite-plugin": "1.20.3",
154153
"@openpanel/db": "workspace:*",
155154
"@openpanel/trpc": "workspace:*",
156155
"@tanstack/devtools-event-client": "^0.3.3",
@@ -171,6 +170,6 @@
171170
"vite": "^6.3.5",
172171
"vitest": "^3.0.5",
173172
"web-vitals": "^4.2.4",
174-
"wrangler": "^4.42.2"
173+
"wrangler": "4.59.1"
175174
}
176175
}
Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
11
import type { NumberFlowProps } from '@number-flow/react';
2-
import { useEffect, useState } from 'react';
2+
import ReactAnimatedNumber from '@number-flow/react';
33

4-
// NumberFlow is breaking ssr and forces loaders to fetch twice
54
export function AnimatedNumber(props: NumberFlowProps) {
6-
const [Component, setComponent] =
7-
useState<React.ComponentType<NumberFlowProps> | null>(null);
8-
9-
useEffect(() => {
10-
import('@number-flow/react').then(({ default: NumberFlow }) => {
11-
setComponent(NumberFlow);
12-
});
13-
}, []);
14-
15-
if (!Component) {
16-
return <>{props.value}</>;
17-
}
18-
19-
return <Component {...props} />;
5+
return <ReactAnimatedNumber {...props} />;
206
}

apps/start/src/routeTree.gen.ts

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ import { Route as PublicRouteImport } from './routes/_public'
1616
import { Route as LoginRouteImport } from './routes/_login'
1717
import { Route as AppRouteImport } from './routes/_app'
1818
import { Route as IndexRouteImport } from './routes/index'
19+
import { Route as WidgetTestRouteImport } from './routes/widget/test'
20+
import { Route as WidgetRealtimeRouteImport } from './routes/widget/realtime'
21+
import { Route as WidgetCounterRouteImport } from './routes/widget/counter'
1922
import { Route as ApiHealthcheckRouteImport } from './routes/api/healthcheck'
2023
import { Route as ApiConfigRouteImport } from './routes/api/config'
2124
import { Route as PublicOnboardingRouteImport } from './routes/_public.onboarding'
@@ -60,6 +63,7 @@ import { Route as AppOrganizationIdProjectIdSettingsTabsIndexRouteImport } from
6063
import { Route as AppOrganizationIdProjectIdProfilesTabsIndexRouteImport } from './routes/_app.$organizationId.$projectId.profiles._tabs.index'
6164
import { Route as AppOrganizationIdProjectIdNotificationsTabsIndexRouteImport } from './routes/_app.$organizationId.$projectId.notifications._tabs.index'
6265
import { Route as AppOrganizationIdProjectIdEventsTabsIndexRouteImport } from './routes/_app.$organizationId.$projectId.events._tabs.index'
66+
import { Route as AppOrganizationIdProjectIdSettingsTabsWidgetsRouteImport } from './routes/_app.$organizationId.$projectId.settings._tabs.widgets'
6367
import { Route as AppOrganizationIdProjectIdSettingsTabsImportsRouteImport } from './routes/_app.$organizationId.$projectId.settings._tabs.imports'
6468
import { Route as AppOrganizationIdProjectIdSettingsTabsEventsRouteImport } from './routes/_app.$organizationId.$projectId.settings._tabs.events'
6569
import { Route as AppOrganizationIdProjectIdSettingsTabsDetailsRouteImport } from './routes/_app.$organizationId.$projectId.settings._tabs.details'
@@ -119,6 +123,21 @@ const IndexRoute = IndexRouteImport.update({
119123
path: '/',
120124
getParentRoute: () => rootRouteImport,
121125
} as any)
126+
const WidgetTestRoute = WidgetTestRouteImport.update({
127+
id: '/widget/test',
128+
path: '/widget/test',
129+
getParentRoute: () => rootRouteImport,
130+
} as any)
131+
const WidgetRealtimeRoute = WidgetRealtimeRouteImport.update({
132+
id: '/widget/realtime',
133+
path: '/widget/realtime',
134+
getParentRoute: () => rootRouteImport,
135+
} as any)
136+
const WidgetCounterRoute = WidgetCounterRouteImport.update({
137+
id: '/widget/counter',
138+
path: '/widget/counter',
139+
getParentRoute: () => rootRouteImport,
140+
} as any)
122141
const ApiHealthcheckRoute = ApiHealthcheckRouteImport.update({
123142
id: '/api/healthcheck',
124143
path: '/api/healthcheck',
@@ -408,6 +427,12 @@ const AppOrganizationIdProjectIdEventsTabsIndexRoute =
408427
path: '/',
409428
getParentRoute: () => AppOrganizationIdProjectIdEventsTabsRoute,
410429
} as any)
430+
const AppOrganizationIdProjectIdSettingsTabsWidgetsRoute =
431+
AppOrganizationIdProjectIdSettingsTabsWidgetsRouteImport.update({
432+
id: '/widgets',
433+
path: '/widgets',
434+
getParentRoute: () => AppOrganizationIdProjectIdSettingsTabsRoute,
435+
} as any)
411436
const AppOrganizationIdProjectIdSettingsTabsImportsRoute =
412437
AppOrganizationIdProjectIdSettingsTabsImportsRouteImport.update({
413438
id: '/imports',
@@ -506,6 +531,9 @@ export interface FileRoutesByFullPath {
506531
'/onboarding': typeof PublicOnboardingRoute
507532
'/api/config': typeof ApiConfigRoute
508533
'/api/healthcheck': typeof ApiHealthcheckRoute
534+
'/widget/counter': typeof WidgetCounterRoute
535+
'/widget/realtime': typeof WidgetRealtimeRoute
536+
'/widget/test': typeof WidgetTestRoute
509537
'/$organizationId/$projectId': typeof AppOrganizationIdProjectIdRouteWithChildren
510538
'/$organizationId/billing': typeof AppOrganizationIdBillingRoute
511539
'/$organizationId/settings': typeof AppOrganizationIdSettingsRoute
@@ -553,6 +581,7 @@ export interface FileRoutesByFullPath {
553581
'/$organizationId/$projectId/settings/details': typeof AppOrganizationIdProjectIdSettingsTabsDetailsRoute
554582
'/$organizationId/$projectId/settings/events': typeof AppOrganizationIdProjectIdSettingsTabsEventsRoute
555583
'/$organizationId/$projectId/settings/imports': typeof AppOrganizationIdProjectIdSettingsTabsImportsRoute
584+
'/$organizationId/$projectId/settings/widgets': typeof AppOrganizationIdProjectIdSettingsTabsWidgetsRoute
556585
'/$organizationId/$projectId/events/': typeof AppOrganizationIdProjectIdEventsTabsIndexRoute
557586
'/$organizationId/$projectId/notifications/': typeof AppOrganizationIdProjectIdNotificationsTabsIndexRoute
558587
'/$organizationId/$projectId/profiles/': typeof AppOrganizationIdProjectIdProfilesTabsIndexRoute
@@ -567,6 +596,9 @@ export interface FileRoutesByTo {
567596
'/onboarding': typeof PublicOnboardingRoute
568597
'/api/config': typeof ApiConfigRoute
569598
'/api/healthcheck': typeof ApiHealthcheckRoute
599+
'/widget/counter': typeof WidgetCounterRoute
600+
'/widget/realtime': typeof WidgetRealtimeRoute
601+
'/widget/test': typeof WidgetTestRoute
570602
'/$organizationId/billing': typeof AppOrganizationIdBillingRoute
571603
'/$organizationId/settings': typeof AppOrganizationIdSettingsRoute
572604
'/onboarding/project': typeof StepsOnboardingProjectRoute
@@ -611,6 +643,7 @@ export interface FileRoutesByTo {
611643
'/$organizationId/$projectId/settings/details': typeof AppOrganizationIdProjectIdSettingsTabsDetailsRoute
612644
'/$organizationId/$projectId/settings/events': typeof AppOrganizationIdProjectIdSettingsTabsEventsRoute
613645
'/$organizationId/$projectId/settings/imports': typeof AppOrganizationIdProjectIdSettingsTabsImportsRoute
646+
'/$organizationId/$projectId/settings/widgets': typeof AppOrganizationIdProjectIdSettingsTabsWidgetsRoute
614647
'/$organizationId/$projectId/profiles/$profileId/events': typeof AppOrganizationIdProjectIdProfilesProfileIdTabsEventsRoute
615648
}
616649
export interface FileRoutesById {
@@ -626,6 +659,9 @@ export interface FileRoutesById {
626659
'/_public/onboarding': typeof PublicOnboardingRoute
627660
'/api/config': typeof ApiConfigRoute
628661
'/api/healthcheck': typeof ApiHealthcheckRoute
662+
'/widget/counter': typeof WidgetCounterRoute
663+
'/widget/realtime': typeof WidgetRealtimeRoute
664+
'/widget/test': typeof WidgetTestRoute
629665
'/_app/$organizationId/$projectId': typeof AppOrganizationIdProjectIdRouteWithChildren
630666
'/_app/$organizationId/billing': typeof AppOrganizationIdBillingRoute
631667
'/_app/$organizationId/settings': typeof AppOrganizationIdSettingsRoute
@@ -680,6 +716,7 @@ export interface FileRoutesById {
680716
'/_app/$organizationId/$projectId/settings/_tabs/details': typeof AppOrganizationIdProjectIdSettingsTabsDetailsRoute
681717
'/_app/$organizationId/$projectId/settings/_tabs/events': typeof AppOrganizationIdProjectIdSettingsTabsEventsRoute
682718
'/_app/$organizationId/$projectId/settings/_tabs/imports': typeof AppOrganizationIdProjectIdSettingsTabsImportsRoute
719+
'/_app/$organizationId/$projectId/settings/_tabs/widgets': typeof AppOrganizationIdProjectIdSettingsTabsWidgetsRoute
683720
'/_app/$organizationId/$projectId/events/_tabs/': typeof AppOrganizationIdProjectIdEventsTabsIndexRoute
684721
'/_app/$organizationId/$projectId/notifications/_tabs/': typeof AppOrganizationIdProjectIdNotificationsTabsIndexRoute
685722
'/_app/$organizationId/$projectId/profiles/_tabs/': typeof AppOrganizationIdProjectIdProfilesTabsIndexRoute
@@ -697,6 +734,9 @@ export interface FileRouteTypes {
697734
| '/onboarding'
698735
| '/api/config'
699736
| '/api/healthcheck'
737+
| '/widget/counter'
738+
| '/widget/realtime'
739+
| '/widget/test'
700740
| '/$organizationId/$projectId'
701741
| '/$organizationId/billing'
702742
| '/$organizationId/settings'
@@ -744,6 +784,7 @@ export interface FileRouteTypes {
744784
| '/$organizationId/$projectId/settings/details'
745785
| '/$organizationId/$projectId/settings/events'
746786
| '/$organizationId/$projectId/settings/imports'
787+
| '/$organizationId/$projectId/settings/widgets'
747788
| '/$organizationId/$projectId/events/'
748789
| '/$organizationId/$projectId/notifications/'
749790
| '/$organizationId/$projectId/profiles/'
@@ -758,6 +799,9 @@ export interface FileRouteTypes {
758799
| '/onboarding'
759800
| '/api/config'
760801
| '/api/healthcheck'
802+
| '/widget/counter'
803+
| '/widget/realtime'
804+
| '/widget/test'
761805
| '/$organizationId/billing'
762806
| '/$organizationId/settings'
763807
| '/onboarding/project'
@@ -802,6 +846,7 @@ export interface FileRouteTypes {
802846
| '/$organizationId/$projectId/settings/details'
803847
| '/$organizationId/$projectId/settings/events'
804848
| '/$organizationId/$projectId/settings/imports'
849+
| '/$organizationId/$projectId/settings/widgets'
805850
| '/$organizationId/$projectId/profiles/$profileId/events'
806851
id:
807852
| '__root__'
@@ -816,6 +861,9 @@ export interface FileRouteTypes {
816861
| '/_public/onboarding'
817862
| '/api/config'
818863
| '/api/healthcheck'
864+
| '/widget/counter'
865+
| '/widget/realtime'
866+
| '/widget/test'
819867
| '/_app/$organizationId/$projectId'
820868
| '/_app/$organizationId/billing'
821869
| '/_app/$organizationId/settings'
@@ -870,6 +918,7 @@ export interface FileRouteTypes {
870918
| '/_app/$organizationId/$projectId/settings/_tabs/details'
871919
| '/_app/$organizationId/$projectId/settings/_tabs/events'
872920
| '/_app/$organizationId/$projectId/settings/_tabs/imports'
921+
| '/_app/$organizationId/$projectId/settings/_tabs/widgets'
873922
| '/_app/$organizationId/$projectId/events/_tabs/'
874923
| '/_app/$organizationId/$projectId/notifications/_tabs/'
875924
| '/_app/$organizationId/$projectId/profiles/_tabs/'
@@ -886,6 +935,9 @@ export interface RootRouteChildren {
886935
StepsRoute: typeof StepsRouteWithChildren
887936
ApiConfigRoute: typeof ApiConfigRoute
888937
ApiHealthcheckRoute: typeof ApiHealthcheckRoute
938+
WidgetCounterRoute: typeof WidgetCounterRoute
939+
WidgetRealtimeRoute: typeof WidgetRealtimeRoute
940+
WidgetTestRoute: typeof WidgetTestRoute
889941
ShareDashboardShareIdRoute: typeof ShareDashboardShareIdRoute
890942
ShareOverviewShareIdRoute: typeof ShareOverviewShareIdRoute
891943
ShareReportShareIdRoute: typeof ShareReportShareIdRoute
@@ -928,6 +980,27 @@ declare module '@tanstack/react-router' {
928980
preLoaderRoute: typeof IndexRouteImport
929981
parentRoute: typeof rootRouteImport
930982
}
983+
'/widget/test': {
984+
id: '/widget/test'
985+
path: '/widget/test'
986+
fullPath: '/widget/test'
987+
preLoaderRoute: typeof WidgetTestRouteImport
988+
parentRoute: typeof rootRouteImport
989+
}
990+
'/widget/realtime': {
991+
id: '/widget/realtime'
992+
path: '/widget/realtime'
993+
fullPath: '/widget/realtime'
994+
preLoaderRoute: typeof WidgetRealtimeRouteImport
995+
parentRoute: typeof rootRouteImport
996+
}
997+
'/widget/counter': {
998+
id: '/widget/counter'
999+
path: '/widget/counter'
1000+
fullPath: '/widget/counter'
1001+
preLoaderRoute: typeof WidgetCounterRouteImport
1002+
parentRoute: typeof rootRouteImport
1003+
}
9311004
'/api/healthcheck': {
9321005
id: '/api/healthcheck'
9331006
path: '/api/healthcheck'
@@ -1285,6 +1358,13 @@ declare module '@tanstack/react-router' {
12851358
preLoaderRoute: typeof AppOrganizationIdProjectIdEventsTabsIndexRouteImport
12861359
parentRoute: typeof AppOrganizationIdProjectIdEventsTabsRoute
12871360
}
1361+
'/_app/$organizationId/$projectId/settings/_tabs/widgets': {
1362+
id: '/_app/$organizationId/$projectId/settings/_tabs/widgets'
1363+
path: '/widgets'
1364+
fullPath: '/$organizationId/$projectId/settings/widgets'
1365+
preLoaderRoute: typeof AppOrganizationIdProjectIdSettingsTabsWidgetsRouteImport
1366+
parentRoute: typeof AppOrganizationIdProjectIdSettingsTabsRoute
1367+
}
12881368
'/_app/$organizationId/$projectId/settings/_tabs/imports': {
12891369
id: '/_app/$organizationId/$projectId/settings/_tabs/imports'
12901370
path: '/imports'
@@ -1548,6 +1628,7 @@ interface AppOrganizationIdProjectIdSettingsTabsRouteChildren {
15481628
AppOrganizationIdProjectIdSettingsTabsDetailsRoute: typeof AppOrganizationIdProjectIdSettingsTabsDetailsRoute
15491629
AppOrganizationIdProjectIdSettingsTabsEventsRoute: typeof AppOrganizationIdProjectIdSettingsTabsEventsRoute
15501630
AppOrganizationIdProjectIdSettingsTabsImportsRoute: typeof AppOrganizationIdProjectIdSettingsTabsImportsRoute
1631+
AppOrganizationIdProjectIdSettingsTabsWidgetsRoute: typeof AppOrganizationIdProjectIdSettingsTabsWidgetsRoute
15511632
AppOrganizationIdProjectIdSettingsTabsIndexRoute: typeof AppOrganizationIdProjectIdSettingsTabsIndexRoute
15521633
}
15531634

@@ -1561,6 +1642,8 @@ const AppOrganizationIdProjectIdSettingsTabsRouteChildren: AppOrganizationIdProj
15611642
AppOrganizationIdProjectIdSettingsTabsEventsRoute,
15621643
AppOrganizationIdProjectIdSettingsTabsImportsRoute:
15631644
AppOrganizationIdProjectIdSettingsTabsImportsRoute,
1645+
AppOrganizationIdProjectIdSettingsTabsWidgetsRoute:
1646+
AppOrganizationIdProjectIdSettingsTabsWidgetsRoute,
15641647
AppOrganizationIdProjectIdSettingsTabsIndexRoute:
15651648
AppOrganizationIdProjectIdSettingsTabsIndexRoute,
15661649
}
@@ -1791,6 +1874,9 @@ const rootRouteChildren: RootRouteChildren = {
17911874
StepsRoute: StepsRouteWithChildren,
17921875
ApiConfigRoute: ApiConfigRoute,
17931876
ApiHealthcheckRoute: ApiHealthcheckRoute,
1877+
WidgetCounterRoute: WidgetCounterRoute,
1878+
WidgetRealtimeRoute: WidgetRealtimeRoute,
1879+
WidgetTestRoute: WidgetTestRoute,
17941880
ShareDashboardShareIdRoute: ShareDashboardShareIdRoute,
17951881
ShareOverviewShareIdRoute: ShareOverviewShareIdRoute,
17961882
ShareReportShareIdRoute: ShareReportShareIdRoute,

apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ function ProjectDashboard() {
4242
{ id: 'details', label: 'Details' },
4343
{ id: 'events', label: 'Events' },
4444
{ id: 'clients', label: 'Clients' },
45+
{ id: 'widgets', label: 'Widgets' },
4546
{ id: 'imports', label: 'Imports' },
4647
];
4748

0 commit comments

Comments
 (0)