Skip to content

Commit 38c35ba

Browse files
committed
Merge branch 'main' into feature/analytics-category
2 parents e73f43c + eb5534e commit 38c35ba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+1104
-1249
lines changed

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@
5252
"@tanstack/pacer": "^0.16.4",
5353
"@tanstack/react-pacer": "^0.17.4",
5454
"@tanstack/react-query": "^5.90.12",
55-
"@tanstack/react-router": "1.141.6",
56-
"@tanstack/react-router-devtools": "1.141.6",
57-
"@tanstack/react-router-ssr-query": "1.141.6",
58-
"@tanstack/react-start": "1.141.8",
55+
"@tanstack/react-router": "1.157.16",
56+
"@tanstack/react-router-devtools": "1.157.16",
57+
"@tanstack/react-router-ssr-query": "1.157.16",
58+
"@tanstack/react-start": "1.157.16",
5959
"@tanstack/react-table": "^8.21.3",
6060
"@types/d3": "^7.4.3",
6161
"@uploadthing/react": "^7.3.3",
@@ -84,9 +84,9 @@
8484
"mermaid": "^11.11.0",
8585
"postgres": "^3.4.7",
8686
"posthog-node": "^5.20.0",
87-
"react": "^19.2.0",
87+
"react": "19.2.3",
8888
"react-colorful": "^5.6.1",
89-
"react-dom": "^19.2.0",
89+
"react-dom": "19.2.3",
9090
"react-easy-crop": "^5.5.6",
9191
"react-instantsearch": "7",
9292
"rehype-autolink-headings": "^7.1.0",
@@ -124,8 +124,8 @@
124124
"@types/hast": "^3.0.4",
125125
"@types/node": "^24.3.0",
126126
"@types/pg": "^8.15.6",
127-
"@types/react": "^19.2.0",
128-
"@types/react-dom": "^19.2.0",
127+
"@types/react": "^19.2.10",
128+
"@types/react-dom": "19.2.3",
129129
"@types/remove-markdown": "^0.3.4",
130130
"@types/three": "^0.182.0",
131131
"autoprefixer": "^10.4.18",

pnpm-lock.yaml

Lines changed: 773 additions & 890 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/builder/api/compile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ function extractWarnings(addOns: Array<AddOn>): Array<string> {
174174
.map((a) => `${a.name}: ${a.warning}`)
175175
}
176176

177-
function convertToStarter(template: StarterCompiled): Starter {
177+
function _convertToStarter(template: StarterCompiled): Starter {
178178
return {
179179
...template,
180180
getFiles: () => Promise.resolve(Object.keys(template.files)),

src/components/BottomCTA.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import * as React from 'react'
2-
import type { LinkProps } from '@tanstack/react-router'
3-
import { Link } from '@tanstack/react-router'
2+
import { Link, LinkProps } from '@tanstack/react-router'
43
import { Button } from '~/ui'
54

65
type BottomCTAProps = {
7-
linkProps: Omit<LinkProps, 'className' | 'children'>
6+
linkProps: LinkProps
87
label?: string
98
className?: string
109
}
@@ -23,6 +22,7 @@ export function BottomCTA({
2322
Only one thing left to do...
2423
</div>
2524
<div>
25+
{/* @ts-expect-error - LinkProps is not assignable to ButtonProps */}
2626
<Button
2727
as={Link}
2828
{...linkProps}

src/components/ExampleDeployDialog.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,14 @@ export function ExampleDeployDialog({
9292
// Reset repo name when dialog opens with new example
9393
useEffect(() => {
9494
if (isOpen) {
95+
// eslint-disable-next-line react-hooks/set-state-in-effect
9596
setRepoName(defaultRepoName)
9697
}
9798
}, [isOpen, defaultRepoName])
9899

99100
// Validate and check repo name
100101
useEffect(() => {
102+
// eslint-disable-next-line react-hooks/set-state-in-effect
101103
setRepoNameError(null)
102104

103105
const validation = validateRepoNameFormat(repoName)
@@ -126,6 +128,7 @@ export function ExampleDeployDialog({
126128
// Check auth state when dialog opens or auth changes
127129
useEffect(() => {
128130
if (!isOpen) {
131+
// eslint-disable-next-line react-hooks/set-state-in-effect
129132
setState({ step: 'auth-check' })
130133
setCountdown(null)
131134
return
@@ -155,6 +158,7 @@ export function ExampleDeployDialog({
155158
if (state.step !== 'success' || countdown === null) return
156159

157160
if (countdown <= 0) {
161+
// eslint-disable-next-line react-hooks/set-state-in-effect
158162
setCountdown(null)
159163
const deployUrl = providerInfo.deployUrl(state.owner, state.repoName)
160164
window.open(deployUrl, '_blank')

src/components/FeedbackModerationTopBar.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { libraries } from '~/libraries'
1+
import { libraries, type LibraryId } from '~/libraries'
22
import { DOC_FEEDBACK_STATUSES, type DocFeedbackStatus } from '~/db/types'
33
import {
44
TopBarFilter,
@@ -13,14 +13,14 @@ import { FormInput } from '~/ui'
1313
interface FeedbackModerationTopBarProps {
1414
filters: {
1515
status?: DocFeedbackStatus[]
16-
libraryId?: string
16+
libraryId?: LibraryId
1717
isDetached?: boolean
1818
dateFrom?: string
1919
dateTo?: string
2020
}
2121
onFilterChange: (filters: {
2222
status?: DocFeedbackStatus[]
23-
libraryId?: string
23+
libraryId?: LibraryId
2424
isDetached?: boolean
2525
dateFrom?: string
2626
dateTo?: string
@@ -63,7 +63,7 @@ export function FeedbackModerationTopBar({
6363
filters.dateTo,
6464
)
6565

66-
const getLibraryName = (id: string) =>
66+
const getLibraryName = (id: LibraryId) =>
6767
libraries.find((l) => l.id === id)?.name || id
6868

6969
const formatDateRange = () => {
@@ -130,7 +130,11 @@ export function FeedbackModerationTopBar({
130130
<select
131131
value={filters.libraryId || ''}
132132
onChange={(e) =>
133-
onFilterChange({ libraryId: e.target.value || undefined })
133+
onFilterChange({
134+
libraryId: (e.target.value || undefined) as
135+
| LibraryId
136+
| undefined,
137+
})
134138
}
135139
className="w-full px-3 py-2 text-sm border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500"
136140
>

src/components/Gam.tsx

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -55,50 +55,6 @@ export function GamOnPageChange() {
5555

5656
export const GamScripts = () => (
5757
<>
58-
<script
59-
dangerouslySetInnerHTML={{
60-
__html: `
61-
// Add global error handler to suppress Publift Fuse cross-origin errors
62-
// These errors occur in iOS Safari due to strict Same-Origin Policy enforcement
63-
// when the ad viewability script tries to access parent window properties
64-
// Also suppress race condition errors during navigation
65-
(function() {
66-
var originalErrorHandler = window.onerror;
67-
window.onerror = function(message, source, lineno, colno, error) {
68-
// Check if this is a Publift Fuse cross-origin error
69-
if (
70-
source && (
71-
source.includes('/media/native/') ||
72-
source.includes('fuse.js') ||
73-
source.includes('fuseplatform.net') ||
74-
source.includes('/nobid/blocking_script.js')
75-
) && (
76-
(message && typeof message === 'string' && (
77-
message.includes('contextWindow.parent') ||
78-
message.includes('null is not an object') ||
79-
message.includes('is not a function')
80-
)) ||
81-
(error && error.message && (
82-
error.message.includes('contextWindow.parent') ||
83-
error.message.includes('null is not an object') ||
84-
error.message.includes('is not a function')
85-
))
86-
)
87-
) {
88-
// Suppress the error - log to console in debug mode
89-
console.debug('Suppressed Publift Fuse cross-origin error:', message, source);
90-
return true; // Prevent default error handling
91-
}
92-
// Call original error handler for other errors
93-
if (originalErrorHandler) {
94-
return originalErrorHandler.apply(this, arguments);
95-
}
96-
return false;
97-
};
98-
})();
99-
`,
100-
}}
101-
/>
10258
<script
10359
async
10460
src="https://cdn.fuseplatform.net/publift/tags/2/4019/fuse.js"

src/components/LibraryHero.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export function LibraryHero({ project, cta, actions }: LibraryHeroProps) {
5454
{actions ? (
5555
<div className="flex flex-wrap gap-2 justify-center">{actions}</div>
5656
) : cta ? (
57+
// @ts-expect-error - LinkProps is not assignable to ButtonProps
5758
<Button
5859
as={Link}
5960
{...cta.linkProps}

src/components/Navbar.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ export function Navbar({ children }: { children: React.ReactNode }) {
180180

181181
const { Title, library } = React.useMemo(() => {
182182
const match = [...matches].reverse().find((m) => m.staticData.Title)
183-
const libraryId = match?.params?.libraryId
183+
const params = match?.params as { libraryId?: string } | undefined
184+
const libraryId = params?.libraryId
184185

185186
return {
186187
Title: match?.staticData.Title ?? null,
@@ -253,7 +254,7 @@ export function Navbar({ children }: { children: React.ReactNode }) {
253254
<Authenticated>
254255
<React.Suspense fallback={<div className="w-[26px] h-[26px]" />}>
255256
<LazyAuthenticatedUserMenu
256-
user={user}
257+
user={user ?? null}
257258
canAdmin={canAdmin}
258259
canApiKeys={canApiKeys}
259260
onSignOut={signOut}
@@ -333,7 +334,8 @@ export function Navbar({ children }: { children: React.ReactNode }) {
333334
</div>
334335
<div className="hidden xl:flex flex-1 justify-end min-w-0">
335336
<Link
336-
to="/cli"
337+
to="/$libraryId/$version"
338+
params={{ libraryId: 'cli', version: 'latest' }}
337339
className="inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md
338340
bg-gradient-to-r from-indigo-600 to-violet-700
339341
hover:from-indigo-500 hover:to-violet-600
@@ -437,7 +439,8 @@ export function Navbar({ children }: { children: React.ReactNode }) {
437439
{/* Mobile: Direct link with Card */}
438440
<MobileCard isActive={isActive}>
439441
<Link
440-
to={`${library.to}/latest`}
442+
to="/$libraryId/$version"
443+
params={{ libraryId: library.id, version: 'latest' }}
441444
className={twMerge(
442445
linkClasses,
443446
'md:hidden',
@@ -477,7 +480,8 @@ export function Navbar({ children }: { children: React.ReactNode }) {
477480
</MobileCard>
478481
{/* Desktop: Simple link */}
479482
<Link
480-
to={`${library.to}/latest`}
483+
to="/$libraryId/$version"
484+
params={{ libraryId: library.id, version: 'latest' }}
481485
className={twMerge(
482486
linkClasses,
483487
'hidden md:flex',

src/components/NotesModerationTopBar.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { libraries } from '~/libraries'
1+
import { libraries, type LibraryId } from '~/libraries'
22
import {
33
TopBarFilter,
44
FilterChip,
@@ -10,13 +10,13 @@ import { FormInput } from '~/ui'
1010

1111
interface NotesModerationTopBarProps {
1212
filters: {
13-
libraryId?: string
13+
libraryId?: LibraryId
1414
isDetached?: boolean
1515
dateFrom?: string
1616
dateTo?: string
1717
}
1818
onFilterChange: (filters: {
19-
libraryId?: string
19+
libraryId?: LibraryId
2020
isDetached?: boolean
2121
dateFrom?: string
2222
dateTo?: string
@@ -43,7 +43,7 @@ export function NotesModerationTopBar({
4343
filters.dateTo,
4444
)
4545

46-
const getLibraryName = (id: string) =>
46+
const getLibraryName = (id: LibraryId) =>
4747
libraries.find((l) => l.id === id)?.name || id
4848

4949
const formatDateRange = () => {
@@ -89,7 +89,11 @@ export function NotesModerationTopBar({
8989
<select
9090
value={filters.libraryId || ''}
9191
onChange={(e) =>
92-
onFilterChange({ libraryId: e.target.value || undefined })
92+
onFilterChange({
93+
libraryId: (e.target.value || undefined) as
94+
| LibraryId
95+
| undefined,
96+
})
9397
}
9498
className="w-full px-3 py-2 text-sm border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500"
9599
>

0 commit comments

Comments
 (0)