diff --git a/src/auth/oauth.server.ts b/src/auth/oauth.server.ts index f980169b2..418eb886c 100644 --- a/src/auth/oauth.server.ts +++ b/src/auth/oauth.server.ts @@ -269,23 +269,13 @@ export async function exchangeGitHubCode( code: string, clientId: string, clientSecret: string, - redirectUri?: string, ): Promise { - const body: { - client_id: string - client_secret: string - code: string - redirect_uri?: string - } = { + const body = { client_id: clientId, client_secret: clientSecret, code, } - if (redirectUri) { - body.redirect_uri = redirectUri - } - const tokenResponse = await fetch( 'https://github.com/login/oauth/access_token', { diff --git a/src/builder/api/create-worker.ts b/src/builder/api/create-worker.ts index 8bdd95275..c53017fe0 100644 --- a/src/builder/api/create-worker.ts +++ b/src/builder/api/create-worker.ts @@ -123,9 +123,7 @@ type GeneratedAddOnMetadata = Omit< | 'partner' | 'packageAdditions' > & - GeneratedAddOnFields & { - packageAdditions?: GeneratedAddOnPackageAdditions - } + GeneratedAddOnFields type GeneratedWorkerAddOnManifestModule = GeneratedWorkerManifestModule & { addOn: GeneratedAddOnManifest @@ -365,7 +363,6 @@ function getAddOnMetadata( envVars: getAddOnEnvVars(addOn.envVars), options: getAddOnOptions(addOn.options), partner: getAddOnPartner(addOn.partner), - packageAdditions: getPackageAdditions(addOn.packageAdditions), } } diff --git a/src/builder/api/feature-artifacts.ts b/src/builder/api/feature-artifacts.ts index 905c22c35..335f020b0 100644 --- a/src/builder/api/feature-artifacts.ts +++ b/src/builder/api/feature-artifacts.ts @@ -1,4 +1,3 @@ -import { type AddOnCompiled } from './compile' import { compileWithAttributionHandler, type ProjectDefinition } from './compile' import { type FrameworkId } from './config' @@ -8,7 +7,6 @@ export interface FeatureArtifactsRequest { framework?: FrameworkId tailwind?: boolean featureOptions?: Record> - customIntegrations?: Array } export interface FeatureArtifact { @@ -44,7 +42,6 @@ export async function featureArtifactsHandler( tailwind, features: request.features, featureOptions: request.featureOptions ?? {}, - customIntegrations: request.customIntegrations, } const output = await compileWithAttributionHandler(definition) diff --git a/src/components/ApplicationStarter.tsx b/src/components/ApplicationStarter.tsx index c4ec2c9b7..e021fdf62 100644 --- a/src/components/ApplicationStarter.tsx +++ b/src/components/ApplicationStarter.tsx @@ -47,21 +47,12 @@ export interface ApplicationStarterProps { builderIntegration?: ApplicationStarterBuilderIntegration className?: string context: ApplicationStarterContext - footerContent?: React.ReactNode enableHotkeys?: boolean - forceRouterOnly?: boolean - formId?: string headerAction?: React.ReactNode - mode?: 'compact' | 'full' onDirtyStateChange?: (dirty: boolean) => void onResolvedResult?: (result: ApplicationStarterResult | null) => void - primaryActionLabel?: string revealOptionsImmediately?: boolean - secondaryActionLabel?: string - showCliExportActions?: boolean showPromptPreview?: boolean - suggestionContext?: ApplicationStarterContext - submitButton?: React.ReactNode title?: React.ReactNode tone?: StarterTone } @@ -143,21 +134,12 @@ export function ApplicationStarter({ builderIntegration, className, context, - footerContent, enableHotkeys = false, - forceRouterOnly = false, - formId, headerAction, - mode = 'full', onDirtyStateChange, onResolvedResult, - primaryActionLabel = 'Copy Prompt', revealOptionsImmediately = false, - secondaryActionLabel = 'Build with Netlify', - showCliExportActions = true, showPromptPreview = true, - suggestionContext, - submitButton, title = 'What would you like to build?', tone = 'cyan', }: ApplicationStarterProps) { @@ -204,16 +186,15 @@ export function ApplicationStarter({ } = useApplicationBuilder({ builderIntegration, context, - forceRouterOnly, - mode, + forceRouterOnly: false, + mode: 'full', onDirtyStateChange, onResolvedResult, revealOptionsImmediately, - suggestionContext, }) const palette = toneClasses[tone] - const compact = mode === 'compact' + const compact = false const isHomeStarter = context === 'home' const [pendingHostingDeployPartner, setPendingHostingDeployPartner] = React.useState(null) @@ -382,13 +363,6 @@ export function ApplicationStarter({ : undefined, [result?.prompt, selectedPromptDeployProvider], ) - const netlifyStartHref = React.useMemo( - () => - resultPrompt - ? buildStarterPromptDeployUrl('netlify', resultPrompt) - : undefined, - [resultPrompt], - ) const codexStartHref = React.useMemo( () => (resultPrompt ? buildCodexStartUrl(resultPrompt) : undefined), [resultPrompt], @@ -462,7 +436,7 @@ export function ApplicationStarter({ ? loadingPhrase : isPromptCopied ? 'Copied' - : primaryActionLabel} + : 'Copy Prompt'} ) const renderCopyCliCommandButton = () => ( @@ -498,9 +472,7 @@ export function ApplicationStarter({ label, iconOnly = false, onTrack, - rel = 'noopener noreferrer', size, - target = '_blank', variant = 'primary', }: { action: StarterTransientAction @@ -510,9 +482,7 @@ export function ApplicationStarter({ label: string iconOnly?: boolean onTrack: () => void - rel?: string size: 'xs' | 'sm' - target?: string variant?: 'primary' | 'secondary' }) => { const disabled = !canUseFinalActions || !href || transientAction === action @@ -525,8 +495,8 @@ export function ApplicationStarter({ color={iconOnly ? 'gray' : undefined} size={iconOnly ? 'icon-sm' : size} href={disabled ? undefined : href} - target={target} - rel={rel} + target="_blank" + rel="noopener noreferrer" aria-disabled={disabled} aria-label={iconOnly ? label : undefined} tabIndex={disabled ? -1 : undefined} @@ -765,7 +735,6 @@ export function ApplicationStarter({ ) : null}
{ event.preventDefault() @@ -1311,10 +1280,6 @@ export function ApplicationStarter({ - - {footerContent ? ( -
{footerContent}
- ) : null} ) : null} @@ -1341,45 +1306,6 @@ export function ApplicationStarter({ isHomeStarter && 'items-end', )} > - {!showCliExportActions ? ( -
- {!selectedHostingDeployPartner - ? renderActionAnchor({ - action: 'netlify', - className: - 'border-[#00AD9F] bg-[#00AD9F] text-white hover:bg-[#009a8e]', - href: netlifyStartHref, - icon: , - label: secondaryActionLabel, - onTrack: () => { - trackActivation({ - action: 'netlify_start', - surface: 'result_panel', - provider: 'netlify', - }) - }, - size: 'sm', - }) - : null} - - {renderActionAnchor({ - action: 'codex', - className: - 'border-gray-900 bg-gray-900 text-white hover:bg-gray-800 dark:border-gray-100 dark:bg-gray-100 dark:text-gray-950 dark:hover:bg-gray-200', - href: codexStartHref, - icon: , - label: 'Open in Codex', - onTrack: () => { - trackActivation({ - action: 'open_codex', - surface: 'result_panel', - }) - }, - size: 'sm', - })} -
- ) : null} -
{renderSelectedHostingDeployButton()} - {showCliExportActions - ? renderCopyCliCommandButton() - : null} + {renderCopyCliCommandButton()} {renderCopyPromptButton()}
- {showCliExportActions ? ( -
- {renderActionAnchor({ - action: 'codex', - className: - 'text-text-secondary hover:text-text-primary', - href: codexStartHref, - icon: ( - - ), - iconOnly: true, - label: 'Open in Codex', - onTrack: () => { - trackActivation({ - action: 'open_codex', - surface: 'result_panel', - }) - }, - size: 'xs', - })} - - {renderActionAnchor({ - action: 'claude', - className: - 'text-text-secondary hover:text-text-primary', - href: claudeStartHref, - icon: , - iconOnly: true, - label: 'Open in Claude', - onTrack: () => { - trackActivation({ - action: 'open_claude', - surface: 'result_panel', - }) - }, - size: 'xs', - })} - - {renderActionAnchor({ - action: 'cursor', - className: - 'text-text-secondary hover:text-text-primary', - href: cursorStartHref, - icon: , - iconOnly: true, - label: 'Open in Cursor', - onTrack: () => { - trackActivation({ - action: 'open_cursor', - surface: 'result_panel', - }) - }, - size: 'xs', - })} - - + {renderActionAnchor({ + action: 'codex', + className: + 'text-text-secondary hover:text-text-primary', + href: codexStartHref, + icon: ( + + ), + iconOnly: true, + label: 'Open in Codex', + onTrack: () => { + trackActivation({ + action: 'open_codex', + surface: 'result_panel', + }) + }, + size: 'xs', + })} + + {renderActionAnchor({ + action: 'claude', + className: + 'text-text-secondary hover:text-text-primary', + href: claudeStartHref, + icon: , + iconOnly: true, + label: 'Open in Claude', + onTrack: () => { + trackActivation({ + action: 'open_claude', + surface: 'result_panel', + }) + }, + size: 'xs', + })} + + {renderActionAnchor({ + action: 'cursor', + className: + 'text-text-secondary hover:text-text-primary', + href: cursorStartHref, + icon: , + iconOnly: true, + label: 'Open in Cursor', + onTrack: () => { + trackActivation({ + action: 'open_cursor', + surface: 'result_panel', + }) + }, + size: 'xs', + })} + + + - - - {renderActionAnchor({ - action: 'download', - className: - 'text-text-secondary hover:text-text-primary', - href: downloadHref, - icon: ( - + ) : ( + - ), - iconOnly: true, - label: 'Download ZIP', - onTrack: () => { - trackActivation({ - action: 'download', - surface: 'result_panel', - }) - }, - size: 'xs', - variant: 'secondary', - })} -
- ) : null} + )} + + + + {renderActionAnchor({ + action: 'download', + className: + 'text-text-secondary hover:text-text-primary', + href: downloadHref, + icon: ( + + ), + iconOnly: true, + label: 'Download ZIP', + onTrack: () => { + trackActivation({ + action: 'download', + surface: 'result_panel', + }) + }, + size: 'xs', + variant: 'secondary', + })} + ) : null} @@ -1536,8 +1455,6 @@ export function ApplicationStarter({ )} - - {compact ? submitButton : null} diff --git a/src/components/AvatarCropModal.tsx b/src/components/AvatarCropModal.tsx index 47772969c..4b543ca5a 100644 --- a/src/components/AvatarCropModal.tsx +++ b/src/components/AvatarCropModal.tsx @@ -12,11 +12,8 @@ interface AvatarCropModalProps { onCropComplete: (croppedBlob: Blob) => void } -async function getCroppedImg( - imageSrc: string, - pixelCrop: Area, - outputSize: number = 256, -): Promise { +async function getCroppedImg(imageSrc: string, pixelCrop: Area): Promise { + const outputSize = 256 const image = new Image() image.crossOrigin = 'anonymous' diff --git a/src/components/BlogCard.tsx b/src/components/BlogCard.tsx index 688ca4302..55b311703 100644 --- a/src/components/BlogCard.tsx +++ b/src/components/BlogCard.tsx @@ -16,16 +16,9 @@ export type { BlogCardPost } from '~/utils/blog-format' type BlogCardProps = { post: BlogCardPost showLibraryBadges?: boolean - /** Hero treatment: side-by-side on wider screens with larger type. Used for - * the single latest post at the top of the blog index. */ - featured?: boolean } -export function BlogCard({ - post, - showLibraryBadges = true, - featured = false, -}: BlogCardProps) { +export function BlogCard({ post, showLibraryBadges = true }: BlogCardProps) { const { slug, title, @@ -40,12 +33,9 @@ export function BlogCard({ const blogLibraries = showLibraryBadges ? getBlogLibraries(library) : [] const cardClassName = twMerge( 'relative flex flex-col justify-between overflow-hidden transition-all hover:shadow-sm hover:border-blue-500', - // Featured: image and copy sit side-by-side once there's room. - featured && 'md:flex-row md:justify-start', ) const mediaClassName = twMerge( 'aspect-video w-full overflow-hidden bg-background-subtle', - featured && 'md:aspect-auto md:w-1/2', ) const content = ( @@ -69,10 +59,10 @@ export function BlogCard({ fit: 'cover', format: 'auto', quality: 80, - width: featured ? 1200 : 800, + width: 800, })} alt="" - loading={featured ? 'eager' : 'lazy'} + loading="lazy" decoding="async" className="w-full h-full object-cover" /> @@ -84,21 +74,9 @@ export function BlogCard({ className={mediaClassName} /> )} -
+
-

- {title} -

+

{title}

by {formatAuthors(authors)} {published ? ( @@ -109,12 +87,7 @@ export function BlogCard({ ) : null}
{excerpt ? ( -

+

{excerpt}

) : null} diff --git a/src/components/Doc.tsx b/src/components/Doc.tsx index a58a2df54..2d21c9d02 100644 --- a/src/components/Doc.tsx +++ b/src/components/Doc.tsx @@ -35,8 +35,6 @@ type DocProps = { pagePath?: string // Breadcrumb props (optional) config?: ConfigSchema - // Footer content rendered after markdown - footer?: React.ReactNode // Optional framework to use (overrides URL and local storage) framework?: string } @@ -55,7 +53,6 @@ export function Doc({ libraryVersion, pagePath, config, - footer, framework: frameworkProp, }: DocProps) { const { groups: startHostingPartnerGroups } = useStartHostingPartners() @@ -194,7 +191,7 @@ export function Doc({ ) : null } /> - {footer ?? } +
diff --git a/src/components/Dropdown.tsx b/src/components/Dropdown.tsx index 2754c6a1e..f62d9e823 100644 --- a/src/components/Dropdown.tsx +++ b/src/components/Dropdown.tsx @@ -20,10 +20,8 @@ type DropdownContentProps = { className?: string align?: 'start' | 'center' | 'end' sideOffset?: number - portal?: boolean onFocus?: React.FocusEventHandler onPointerEnter?: React.PointerEventHandler - onPointerLeave?: React.PointerEventHandler } type DropdownItemProps = { @@ -67,35 +65,28 @@ export function DropdownContent({ className, align = 'end', sideOffset = 6, - portal = true, onFocus, onPointerEnter, - onPointerLeave, }: DropdownContentProps) { - const content = ( - - {children} - + return ( + + + {children} + + ) - - if (!portal) { - return content - } - - return {content} } export function DropdownItem({ diff --git a/src/components/FilterComponents.tsx b/src/components/FilterComponents.tsx index 936ca3442..a164aa7a8 100644 --- a/src/components/FilterComponents.tsx +++ b/src/components/FilterComponents.tsx @@ -154,27 +154,16 @@ export function TopBarFilter({ interface FilterChipProps { label: string onRemove: () => void - onClick?: () => void className?: string } -export function FilterChip({ - label, - onRemove, - onClick, - className, -}: FilterChipProps) { +export function FilterChip({ label, onRemove, className }: FilterChipProps) { return ( e.key === 'Enter' && onClick() : undefined} - role={onClick ? 'button' : undefined} - tabIndex={onClick ? 0 : undefined} > {label} - {showNote ? ( -

- We'll use your TanStack login email. -

- ) : null} +

+ We'll use your TanStack login email. +

) } diff --git a/src/components/OpenSourceStats.tsx b/src/components/OpenSourceStats.tsx index 85e3d6835..d766991c2 100644 --- a/src/components/OpenSourceStats.tsx +++ b/src/components/OpenSourceStats.tsx @@ -4,20 +4,9 @@ import { DownloadSimpleIcon, StarIcon, } from '@phosphor-icons/react' -import { type Library } from '~/libraries' -import { - homepageNpmStatsSummaryQuery, - ossStatsQuery, - recentDownloadsQuery, -} from '~/queries/stats' +import { homepageNpmStatsSummaryQuery, ossStatsQuery } from '~/queries/stats' import { useNpmDownloadCounter } from '~/hooks/useNpmDownloadCounter' -import { - StatsSection, - type StatItem, - type StatsLayout, - type StatsPage, -} from '~/components/ds/ui' -import { tanStackTotalNpmStatsLibrary } from '~/utils/tanstack-npm-stats' +import { StatsSection, type StatItem, type StatsPage } from '~/components/ds/ui' /** Compact count with a single-letter magnitude, e.g. 2_340_000_000 → "2.3B". */ function formatCompact(value: number) { @@ -39,40 +28,19 @@ function isValidMetric(value: number | undefined | null): boolean { export default function OssStats({ className, - layout = 'landscape', - library, page = 'home', }: { className?: string - layout?: StatsLayout - library?: Library page?: StatsPage }) { - const { data: stats, isLoading } = useQuery(ossStatsQuery({ library })) + const { data: stats, isLoading } = useQuery(ossStatsQuery()) const { data: homepageNpmSummary, isLoading: isLoadingHomepageNpmSummary } = - useQuery({ - ...homepageNpmStatsSummaryQuery(), - enabled: !library, - }) - const { data: recentDownloads, isLoading: isLoadingRecentDownloads } = - useQuery({ - ...recentDownloadsQuery({ - library: library ?? tanStackTotalNpmStatsLibrary, - }), - enabled: Boolean(library), - }) + useQuery(homepageNpmStatsSummaryQuery()) - const totalNpmStats = stats?.npm - const npmDownloads = library - ? (totalNpmStats?.totalDownloads ?? 0) - : (homepageNpmSummary?.totalDownloads ?? 0) + const npmDownloads = homepageNpmSummary?.totalDownloads ?? 0 const starCount = stats?.github?.starCount ?? 0 - const weeklyDownloads = library - ? (recentDownloads?.weeklyDownloads ?? 0) - : (homepageNpmSummary?.weeklyDownloads ?? 0) - const weeklyRatePerDay = library - ? undefined - : homepageNpmSummary?.weeklyRatePerDay + const weeklyDownloads = homepageNpmSummary?.weeklyDownloads ?? 0 + const weeklyRatePerDay = homepageNpmSummary?.weeklyRatePerDay // Live-ticking weekly counter — writes into the value node after mount. const weeklyRef = useNpmDownloadCounter({ @@ -81,20 +49,14 @@ export default function OssStats({ }) const hasNpmDownloads = - !(library ? isLoading : isLoadingHomepageNpmSummary) && - isValidMetric(npmDownloads) + !isLoadingHomepageNpmSummary && isValidMetric(npmDownloads) const hasStarCount = !isLoading && isValidMetric(starCount) const hasWeeklyDownloads = - !(library ? isLoadingRecentDownloads : isLoadingHomepageNpmSummary) && - isValidMetric(weeklyDownloads) + !isLoadingHomepageNpmSummary && isValidMetric(weeklyDownloads) const loading = isLoading || !stats - const npmLoading = library - ? isLoading || !totalNpmStats - : isLoadingHomepageNpmSummary || !homepageNpmSummary - const weeklyLoading = library - ? isLoadingRecentDownloads || !recentDownloads - : isLoadingHomepageNpmSummary || !homepageNpmSummary + const npmLoading = isLoadingHomepageNpmSummary || !homepageNpmSummary + const weeklyLoading = isLoadingHomepageNpmSummary || !homepageNpmSummary const items: Array = [] @@ -139,7 +101,7 @@ export default function OssStats({ ) diff --git a/src/components/PartnersSponsorsSection.tsx b/src/components/PartnersSponsorsSection.tsx index 34dbae7ce..bad805537 100644 --- a/src/components/PartnersSponsorsSection.tsx +++ b/src/components/PartnersSponsorsSection.tsx @@ -12,7 +12,6 @@ type PartnersSponsorsContentProps = { } type PartnersSponsorsSectionProps = { - analyticsPlacement?: PartnerPlacement className?: string } @@ -106,7 +105,6 @@ function PartnersSponsorsSkeleton() { } export function PartnersSponsorsSection({ - analyticsPlacement = 'library_grid', className = '', }: PartnersSponsorsSectionProps) { return ( @@ -115,7 +113,7 @@ export function PartnersSponsorsSection({ when={visible({ rootMargin: '25%' })} fallback={} > - + ) diff --git a/src/components/RecentPostsWidget.tsx b/src/components/RecentPostsWidget.tsx index 9380fb323..66fbf9583 100644 --- a/src/components/RecentPostsWidget.tsx +++ b/src/components/RecentPostsWidget.tsx @@ -4,8 +4,7 @@ import { fetchRecentPosts, type RecentPost } from '~/utils/blog.functions' import { formatPublishedDate } from '~/utils/blog-format' type RecentPostsWidgetProps = { - posts?: ReadonlyArray - /** Set to false to skip the client fetch when the widget is rendered but not visible (e.g. hidden below a CSS breakpoint). Ignored when `posts` is provided. */ + /** Set to false to skip the client fetch when the widget is rendered but not visible (e.g. hidden below a CSS breakpoint). */ enabled?: boolean } @@ -88,18 +87,15 @@ function RecentPostsSkeleton() { ) } -export function RecentPostsWidget({ - posts, - enabled = true, -}: RecentPostsWidgetProps) { +export function RecentPostsWidget({ enabled = true }: RecentPostsWidgetProps) { const recentPostsQuery = useQuery({ queryKey: ['recentPosts'], queryFn: () => fetchRecentPosts(), - enabled: posts === undefined && enabled, + enabled, staleTime: 1000 * 60 * 5, }) - const visiblePosts = posts ?? recentPostsQuery.data + const visiblePosts = recentPostsQuery.data if (!visiblePosts) { return diff --git a/src/components/RightRail.tsx b/src/components/RightRail.tsx index 0d80f9e3f..ef153d719 100644 --- a/src/components/RightRail.tsx +++ b/src/components/RightRail.tsx @@ -122,13 +122,9 @@ const railTierLayout: Record< export function PartnersRail({ analyticsPlacement, partners, - title = 'Partners', - titleTo = '/partners', }: { analyticsPlacement: PartnerPlacement partners: Array - title?: string - titleTo?: '/partners' }) { const placementContext = usePartnerPlacementContext({ orderStrategy: 'tier-rotated', @@ -147,9 +143,9 @@ export function PartnersRail({ - {action}
) } @@ -2935,13 +2934,11 @@ function SearchResultsInChat({ surface }: { surface: SearchSurface }) { const Hit = ({ hit, commandValue, - isFocused, refinedLibrary, refinedFramework, }: { hit: AlgoliaHit commandValue?: string - isFocused?: boolean refinedLibrary: string | null refinedFramework: string | null }) => { @@ -2986,12 +2983,6 @@ const Hit = ({ const ref = React.useRef(null!) - React.useEffect(() => { - if (isFocused) { - ref.current?.scrollIntoView({ behavior: 'instant', block: 'nearest' }) - } - }, [isFocused]) - // Get library and framework info for this hit const hitLibrary = hit.library as string | undefined const hitFramework = @@ -3128,13 +3119,13 @@ const Hit = ({ href={hitUrl} className={twMerge( 'block px-4 py-2.5 focus:outline-none border-b border-gray-300 dark:border-gray-700', - isFocused ? 'bg-gray-500/20' : 'hover:bg-gray-500/10', + 'hover:bg-gray-500/10', )} onKeyDown={handleKeyDown} onFocus={() => ref.current?.focus()} onClick={handleClick} role="option" - aria-selected={isFocused} + aria-selected={false} tabIndex={-1} data-search-hit="true" ref={ref} diff --git a/src/components/ShowcaseSection.tsx b/src/components/ShowcaseSection.tsx index 6c7d6b9f4..2257491e5 100644 --- a/src/components/ShowcaseSection.tsx +++ b/src/components/ShowcaseSection.tsx @@ -19,8 +19,6 @@ interface ShowcaseSectionProps { subtitle?: string libraryId?: LibraryId limit?: number - showViewAll?: boolean - minItems?: number } export function SubmitShowcasePlaceholder({ @@ -61,8 +59,6 @@ export function ShowcaseSection({ subtitle = 'See what the community is building', libraryId, limit = 6, - showViewAll = true, - minItems = 3, }: ShowcaseSectionProps) { const queryClient = useQueryClient() const currentUser = useCurrentUser() @@ -78,7 +74,7 @@ export function ShowcaseSection({ () => data?.showcases || [], [data?.showcases], ) - const placeholdersNeeded = Math.max(0, minItems - showcases.length) + const placeholdersNeeded = Math.max(0, 3 - showcases.length) const showcaseIds = React.useMemo( () => showcases.map((s) => s.showcase.id), @@ -206,7 +202,7 @@ export function ShowcaseSection({ {isLoading ? (
- {Array.from({ length: Math.max(limit, minItems) }).map((_, i) => ( + {Array.from({ length: Math.max(limit, 3) }).map((_, i) => ( ))}
@@ -234,21 +230,19 @@ export function ShowcaseSection({
)} - {showViewAll && ( -
- - - -
- )} +
+ + + +
) } diff --git a/src/components/StackBlitzEmbed.tsx b/src/components/StackBlitzEmbed.tsx index 11e54fdbc..6d412ddc4 100644 --- a/src/components/StackBlitzEmbed.tsx +++ b/src/components/StackBlitzEmbed.tsx @@ -6,9 +6,6 @@ type StackBlitzEmbedProps = { repo: string branch: string examplePath: string - file?: string - preset?: 'node' - height?: string | number title?: string } @@ -16,16 +13,12 @@ export function StackBlitzEmbed({ repo, branch, examplePath, - file, - preset = 'node', - height = '80vh', title, }: StackBlitzEmbedProps) { const isDark = useIsDark() const themeParam = isDark ? 'dark' : 'light' - const fileParam = file ? `&file=${encodeURIComponent(file)}` : '' - const src = `https://stackblitz.com/github/${repo}/tree/${branch}/${examplePath}?embed=1&theme=${themeParam}&preset=${preset}${fileParam}` + const src = `https://stackblitz.com/github/${repo}/tree/${branch}/${examplePath}?embed=1&theme=${themeParam}&preset=node` return ( //oxlint-disable-next-line jsx-a11y/iframe-has-title @@ -37,7 +30,7 @@ export function StackBlitzEmbed({ sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts" className="shadow-lg" loading="lazy" - style={{ width: '100%', height, border: '0' }} + style={{ width: '100%', height: '80vh', border: '0' }} /> ) } diff --git a/src/components/TableComponents.tsx b/src/components/TableComponents.tsx index 239cfa97e..0926665be 100644 --- a/src/components/TableComponents.tsx +++ b/src/components/TableComponents.tsx @@ -59,16 +59,12 @@ interface TableHeaderCellProps { children?: React.ReactNode className?: string align?: 'left' | 'right' | 'center' - width?: string - compact?: boolean } export function TableHeaderCell({ children, className = '', align = 'left', - width, - compact = true, }: TableHeaderCellProps) { const alignClass = align === 'right' @@ -76,12 +72,9 @@ export function TableHeaderCell({ : align === 'center' ? 'text-center' : 'text-left' - const paddingClass = compact ? 'px-2 py-1.5' : 'px-4 py-2' - const textSizeClass = compact ? 'text-[10px]' : 'text-xs' return ( {children} @@ -93,8 +86,6 @@ interface SortableTableHeaderCellProps { children?: React.ReactNode className?: string align?: 'left' | 'right' | 'center' - width?: string - compact?: boolean sortable?: boolean sortDirection?: 'asc' | 'desc' | false onSort?: () => void @@ -104,8 +95,6 @@ export function SortableTableHeaderCell({ children, className = '', align = 'left', - width, - compact = true, sortable = false, sortDirection = false, onSort, @@ -116,22 +105,15 @@ export function SortableTableHeaderCell({ : align === 'center' ? 'text-center' : 'text-left' - const paddingClass = compact ? 'px-2 py-1.5' : 'px-4 py-2' - const textSizeClass = compact ? 'text-[10px]' : 'text-xs' - const baseClass = `${paddingClass} ${alignClass} ${textSizeClass} font-semibold text-gray-600 dark:text-gray-400 uppercase whitespace-nowrap ${className}` + const baseClass = `px-2 py-1.5 ${alignClass} text-[10px] font-semibold text-gray-600 dark:text-gray-400 uppercase whitespace-nowrap ${className}` if (!sortable) { - return ( - - {children} - - ) + return {children} } return ( ) => void } @@ -197,7 +178,6 @@ export function TableCell({ className = '', align = 'left', colSpan, - compact = true, onClick, }: TableCellProps) { const alignClass = @@ -206,10 +186,9 @@ export function TableCell({ : align === 'center' ? 'text-center' : 'text-left' - const paddingClass = compact ? 'px-2 py-2' : 'px-4 py-3' return ( diff --git a/src/components/ToastProvider.tsx b/src/components/ToastProvider.tsx index 927627c28..924df823a 100644 --- a/src/components/ToastProvider.tsx +++ b/src/components/ToastProvider.tsx @@ -3,7 +3,6 @@ import { Toaster, toast } from 'sonner' import { useTheme } from '~/components/ThemeProvider' type ToastOptions = { - durationMs?: number id?: number | string } @@ -31,7 +30,7 @@ export function ToastProvider({ const notify = React.useCallback( (content: React.ReactNode, options?: ToastOptions) => { const id = toast(content, { - duration: options?.durationMs ?? 2500, + duration: 2500, id: options?.id, }) return String(id) diff --git a/src/components/admin/AdminEmptyState.tsx b/src/components/admin/AdminEmptyState.tsx index 6fa2cc84a..04cdb4319 100644 --- a/src/components/admin/AdminEmptyState.tsx +++ b/src/components/admin/AdminEmptyState.tsx @@ -1,22 +1,15 @@ import * as React from 'react' -import { Link } from '@tanstack/react-router' -import { Button } from '~/ui' type AdminEmptyStateProps = { icon: React.ReactNode title: string description?: string - action?: { - label: string - to: string - } } export function AdminEmptyState({ icon, title, description, - action, }: AdminEmptyStateProps) { return (
@@ -31,13 +24,6 @@ export function AdminEmptyState({ {description}

)} - {action && ( -
- - - -
- )}
) } diff --git a/src/components/application-builder/parts.tsx b/src/components/application-builder/parts.tsx index b4b1315d1..ba664df1d 100644 --- a/src/components/application-builder/parts.tsx +++ b/src/components/application-builder/parts.tsx @@ -22,7 +22,6 @@ export function StarterChipButton({ className, children, compact = false, - disabled = false, onClick, palette, selected, @@ -31,7 +30,6 @@ export function StarterChipButton({ className?: string children: React.ReactNode compact?: boolean - disabled?: boolean onClick?: () => void palette: StarterPalette selected: boolean @@ -41,7 +39,6 @@ export function StarterChipButton({