The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Fix formatting in ref docs params list
Terry Suttonc759d6ba08be
diff --git a/apps/reference/generator/legacy.ts b/apps/reference/generator/legacy.tsindex c2d03442d7b..f8524a18c62 100644--- a/apps/reference/generator/legacy.ts+++ b/apps/reference/generator/legacy.ts@@ -189,7 +189,7 @@ const methodListItemLabel = () => `<li className="method-list-item"><h4 className="method-list-item-label">- <span className="method-list-item-label-name">+ <span className="method-list-item-label-name hello">${name}</span><span className="method-list-item-label-badge ${!isOptional && 'required'}">diff --git a/apps/temp-docs/components/CodeBlock/CodeBlock.tsx b/apps/temp-docs/components/CodeBlock/CodeBlock.tsxindex 103a242a107..ea545d4f1b7 100644--- a/apps/temp-docs/components/CodeBlock/CodeBlock.tsx+++ b/apps/temp-docs/components/CodeBlock/CodeBlock.tsx@@ -6,11 +6,13 @@ import CopyToClipboard from 'react-copy-to-clipboard'import js from 'react-syntax-highlighter/dist/cjs/languages/hljs/javascript'import py from 'react-syntax-highlighter/dist/cjs/languages/hljs/python'import sql from 'react-syntax-highlighter/dist/cjs/languages/hljs/sql'+import bash from 'react-syntax-highlighter/dist/cjs/languages/hljs/bash'+import { useState } from 'react'import { useTheme } from '../Providers'interface Props {- lang: 'js' | 'sql' | 'py'+ lang: 'js' | 'sql' | 'py' | 'bash'startingLineNumber?: numberhideCopy?: booleanclassName?: string@@ -37,10 +39,10 @@ function CodeBlock(props: Props) {: 'js'// force jsx to be js highlightedif (lang === 'jsx') lang = 'js'-SyntaxHighlighter.registerLanguage('js', js)SyntaxHighlighter.registerLanguage('py', py)SyntaxHighlighter.registerLanguage('sql', sql)+ SyntaxHighlighter.registerLanguage('bash', bash)// const large = props.size === 'large' ? true : falseconst large = false@@ -50,39 +52,43 @@ function CodeBlock(props: Props) {return (<div className="relative">- <SyntaxHighlighter- language={lang}- style={monokaiTheme}- className={`code-block rounded-lg border p-4 ${!showLineNumbers && 'pl-6'}`}- customStyle={{- fontSize: large ? 18 : 12,- lineHeight: large ? 1.4 : 1.2,- // borderTop: '1px solid #393939',- //background: isDarkMode ? 'bg-scale-700' : 'bg-scale-300',- //background: isDarkMode ? '#444' : '#F1F3F5',- // we really should support proper light mode, not just show dark in both modes- background: isDarkMode ? '#444' : '#F1F3F5',- }}- showLineNumbers={showLineNumbers}- lineNumberContainerStyle={{- paddingTop: '128px',- }}- lineNumberStyle={{- minWidth: '44px',- background: isDarkMode ? '#444' : '#F1F3F5',- paddingLeft: '4px',- paddingRight: '4px',- marginRight: '12px',- color: '#828282',- textAlign: 'center',- fontSize: large ? 14 : 12,- paddingTop: '4px',- paddingBottom: '4px',- }}- >- {props.children?.trimEnd()}- </SyntaxHighlighter>- {!props.hideCopy && props.children ? (+ {props.className ? (+ <SyntaxHighlighter+ language={lang}+ style={monokaiTheme}+ className={`code-block rounded-lg border p-4 ${!showLineNumbers && 'pl-6'}`}+ customStyle={{+ fontSize: large ? 18 : 12,+ lineHeight: large ? 1.4 : 1.2,+ // borderTop: '1px solid #393939',+ //background: isDarkMode ? 'bg-scale-700' : 'bg-scale-300',+ //background: isDarkMode ? '#444' : '#F1F3F5',+ // we really should support proper light mode, not just show dark in both modes+ background: isDarkMode ? '#444' : '#F1F3F5',+ }}+ showLineNumbers={showLineNumbers}+ lineNumberContainerStyle={{+ paddingTop: '128px',+ }}+ lineNumberStyle={{+ minWidth: '44px',+ background: isDarkMode ? '#444' : '#F1F3F5',+ paddingLeft: '4px',+ paddingRight: '4px',+ marginRight: '12px',+ color: '#828282',+ textAlign: 'center',+ fontSize: large ? 14 : 12,+ paddingTop: '4px',+ paddingBottom: '4px',+ }}+ >+ {props.children?.trimEnd()}+ </SyntaxHighlighter>+ ) : (+ <code>{props.children}</code>+ )}+ {!props.hideCopy && props.children && props.className ? (<div className={`${isDarkMode ?? 'dark'} absolute right-2 top-2`}><CopyToClipboard text={props.children}><Buttondiff --git a/apps/temp-docs/components/CustomMDX/H3.tsx b/apps/temp-docs/components/CustomMDX/H3.tsxindex 1586391c30a..e22d9b00e64 100644--- a/apps/temp-docs/components/CustomMDX/H3.tsx+++ b/apps/temp-docs/components/CustomMDX/H3.tsx@@ -4,7 +4,7 @@ const H3 = ({ children }) => {const anchor = getAnchor(children)const link = `#${anchor}`return (- <h3 id={anchor} className="group">+ <h3 id={anchor} className="group flex gap-1 items-center">{removeAnchor(children)}{anchor && (<a href={link} className="opacity-0 group-hover:opacity-100 transition">diff --git a/apps/temp-docs/components/CustomMDX/H4.tsx b/apps/temp-docs/components/CustomMDX/H4.tsxindex 294d257d6b4..95f17286061 100644--- a/apps/temp-docs/components/CustomMDX/H4.tsx+++ b/apps/temp-docs/components/CustomMDX/H4.tsx@@ -4,7 +4,7 @@ const H4 = ({ children }) => {const anchor = getAnchor(children)const link = `#${anchor}`return (- <h4 id={anchor} className="group">+ <h4 id={anchor} className="group flex gap-1 items-center">{removeAnchor(children)}{anchor && (<a href={link} className="opacity-0 group-hover:opacity-100 transition">diff --git a/apps/temp-docs/generator/legacy.ts b/apps/temp-docs/generator/legacy.tsindex e3d6130be4f..26a4fb071bf 100644--- a/apps/temp-docs/generator/legacy.ts+++ b/apps/temp-docs/generator/legacy.ts@@ -146,21 +146,23 @@ const mergeUnion = (paramDefinition: TsDoc.TypeDefinition) => {}const methodListGroup = (items) => `-<ul className="method-list-group">+<ul className="method-list-group p-0 m-0 list-none">${items}</ul>`const methodListItemLabel = ({ name, isOptional, type, description }, subContent) => `-<li className="method-list-item">- <h4 className="method-list-item-label">- <span className="method-list-item-label-name">+<li className="method-list-item border-t border-gray-300">+ <h4 className="method-list-item-label flex items-center gap-1">+ <span className="method-list-item-label-name font-mono font-bold text-sm py-2">${name}</span>- <span className="method-list-item-label-badge ${!isOptional && 'required'}">+ <span className="method-list-item-label-badge font-mono text-xs px-1 ${+ !isOptional && 'required'+ }">${isOptional ? 'optional' : 'required'}</span>- <span className="method-list-item-validation">+ <span className="method-list-item-validation flex flex-wrap gap-2">${type}</span></h4>diff --git a/apps/temp-docs/layouts/Default.tsx b/apps/temp-docs/layouts/Default.tsxindex 698e448bf43..c1348c1da17 100644--- a/apps/temp-docs/layouts/Default.tsx+++ b/apps/temp-docs/layouts/Default.tsx@@ -24,8 +24,6 @@ const Layout: FC<Props> = ({ meta, children, toc, menuItems, currentPage }) => {}}, [])- console.log('Default:Layout', { currentPage })-return (<><Head>@@ -52,7 +50,7 @@ const Layout: FC<Props> = ({ meta, children, toc, menuItems, currentPage }) => {<div className="docs-width grid grid-cols-12 gap-4 justify-between p-4 pb-8 w-full"><divclassName={`${- meta?.hide_table_of_contents ? 'col-span-12' : 'col-span-12 xl:col-span-8'+ meta?.hide_table_of_contents ? 'col-span-12' : 'col-span-12 xl:col-span-9'} py-4 px-8`}><article className="prose dark:prose-dark dark:bg-scale-200 width-full mt-8">@@ -60,7 +58,7 @@ const Layout: FC<Props> = ({ meta, children, toc, menuItems, currentPage }) => {</article></div>{toc && !meta?.hide_table_of_contents && (- <div className="prose border-scale-400 dark:bg-scale-200 thin-scrollbar table-of-contents-height col-span-4 border-l px-4">+ <div className="prose border-scale-400 dark:bg-scale-200 thin-scrollbar table-of-contents-height col-span-3 border-l px-4"><h5>On this page</h5><ul className="list-none pl-2 text-[0.8rem]">{toc.json.map((item: any, i: number) => {diff --git a/apps/temp-docs/styles/main.scss b/apps/temp-docs/styles/main.scssindex 1bffa806d5b..e1f0d7748a1 100644--- a/apps/temp-docs/styles/main.scss+++ b/apps/temp-docs/styles/main.scss@@ -82,17 +82,8 @@ pre[class*='language-'] {// Spec doc specifics ported from docusaurus// @TODO these should be converted to Tailwind classes-.method-list-group {- list-style: none;- padding: 0;- margin: 0;-}-.method-list-group li {- border-top: 1px solid var(--custom-border-color);- padding-top: 12px;-}.method-list-group li:last-child {- border-bottom: 1px solid var(--custom-border-color);+ border-bottom: 1px solid var(--colors-scale3);}.method-list-title-isChild {@@ -102,57 +93,27 @@ pre[class*='language-'] {}}-h4.method-list-item-label {- display: flex;- align-items: center;- gap: 0.5rem;-}--h4.method-list-item-label .method-list-item-label-name {- font-family: var(--ifm-font-family-monospace);- font-weight: 700;- font-size: var(--custom-font-size-sm);- color: var(--ifm-font-color-base);- padding: var(--ifm-code-padding-vertical) 0;-}--h4.method-list-item-label .method-list-item-label-badge {+.method-list-item-label-badge {overflow-wrap: anywhere;- font-family: var(--ifm-font-family-monospace);- color: var(--ifm-font-color-base);- font-size: var(--custom-font-size-xs);- padding: 0 5px;- font-weight: 300;- padding: var(--ifm-code-padding-vertical) var(--ifm-code-padding-horizontal);-}-h4.method-list-item-label .method-list-item-validation {- font-family: var(--ifm-font-family-monospace);- font-size: var(--custom-font-size-xs);- font-weight: 300;- display: flex;- flex-wrap: wrap;- gap: 6px;+}+.method-list-item-validation {code {padding: 1px 6px;border-radius: 4px;- background-color: var(--custom-background-color-diff-1);- color: var(--ifm-font-color-base);+ background-color: var(--colors-scale3);}}-.method-list-item-description p {- color: var(--custom-content-color-light);- font-size: var(--custom-font-size-sm);-}-.method-list-group .method-list-group {- border: 1px solid var(--custom-border-color);+ border: 1px solid var(--colors-scale3);border-radius: 8px;margin-bottom: 20px;max-width: 600px;}+.method-list-group .method-list-group li {+ margin-top: 0;padding: 12px;border-bottom: none;}