Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
2 changes: 1 addition & 1 deletion app/blog/[...slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export default async function Page({ params }: Readonly<Props>) {
<script
type="application/ld+json"
dangerouslySetInnerHTML={{
__html: JSON.stringify(jsonLd).replaceAll('<', String.raw`<`),
__html: JSON.stringify(jsonLd).replaceAll('<', '\\u003c'),
}}
/>
<MDXServer source={content} />
Expand Down
22 changes: 22 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,27 @@ export const metadata: Metadata = {
},
};

// Aplica o tema salvo ANTES do primeiro paint (parser-blocking), evitando o
// flash de tema escuro para quem usa tema claro. Espelha a resolução do
// ThemeProvider: 'light' | 'dark' | 'system' (via prefers-color-scheme), com
// 'dark' como padrão. O ThemeProvider assume o controle após a hidratação.
const themeInitScript = `(function () {
try {
var stored = localStorage.getItem('theme');
var resolved =
stored === 'light' || stored === 'dark'
? stored
: stored === 'system' &&
matchMedia('(prefers-color-scheme: light)').matches
? 'light'
: 'dark';
document.documentElement.classList.add(resolved);
document.documentElement.style.colorScheme = resolved;
} catch (e) {
document.documentElement.classList.add('dark');
}
})();`;

export const viewport: Viewport = {
themeColor: [
{ media: '(prefers-color-scheme: light)', color: '#fffdf9' },
Expand All @@ -74,6 +95,7 @@ export default function RootLayout({
suppressHydrationWarning
>
<body>
<script dangerouslySetInnerHTML={{ __html: themeInitScript }} />
<a
href="#main"
className="sr-only focus:not-sr-only focus:fixed focus:left-4 focus:top-4 focus:z-[9999] focus:rounded focus:bg-site-card focus:px-4 focus:py-2 focus:text-sm focus:font-medium focus:text-site-foreground focus:outline-none focus:ring-2 focus:ring-site-primary"
Expand Down
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"eslint:fix": "eslint --cache --fix",
"pretypecheck": "yarn content:sync",
"typecheck": "tsc",
"prepare": "husky install",
"update:webperf": "cd packages/scripts && yarn build:repo-content"
"prepare": "husky install"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^7.2.0",
"@shikijs/rehype": "^4.1.0",
"@fortawesome/free-brands-svg-icons": "^7.2.0",
"@fortawesome/free-solid-svg-icons": "^7.2.0",
"@fortawesome/react-fontawesome": "^3.3.1",
Expand All @@ -32,17 +32,19 @@
"lightningcss-linux-x64-gnu": "^1.32.0",
"motion": "^12.40.0",
"next": "^16.2.6",
"next-mdx-remote": "^6.0.0",
"react": "^19",
"react-dom": "^19",
"react-intersection-observer": "^8.33.1",
"react-katex": "^3.1.0",
"react-tweet-embed": "^2.0.0",
"reading-time": "^1.5.0",
"rehype-slug": "^6.0.0",
"remark-gfm": "^4.0.1",
"sharp": "^0.34.5",
"swr": "^2.4.1"
},
"devDependencies": {
"@shikijs/rehype": "^4.1.0",
"@tailwindcss/postcss": "^4.3.0",
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
"@types/node": "^22.15.0",
Expand All @@ -55,11 +57,8 @@
"eslint-plugin-unused-imports": "^4",
"husky": ">=6",
"lint-staged": ">=10",
"next-mdx-remote": "^6.0.0",
"postcss": "^8.5.15",
"prettier": "^2.4.1",
"react-tweet-embed": "^2.0.0",
"remark-gfm": "^4.0.1",
"shadcn": "^4.8.0",
"tailwindcss": "^4.3.0",
"typescript": "^5.8.3"
Expand Down
9 changes: 0 additions & 9 deletions src/base/hooks/useReactFlowAttributionRemoval.ts

This file was deleted.

47 changes: 0 additions & 47 deletions src/base/links-graph/Dialog/index.tsx

This file was deleted.

29 changes: 0 additions & 29 deletions src/base/links-graph/Layout/index.tsx

This file was deleted.

54 changes: 0 additions & 54 deletions src/base/links-graph/Position/getNodePosition.ts

This file was deleted.

10 changes: 0 additions & 10 deletions src/base/mediaQuery.ts

This file was deleted.

22 changes: 0 additions & 22 deletions src/base/testing/graphPrint.js

This file was deleted.

17 changes: 0 additions & 17 deletions src/lib/LocalStorage.ts

This file was deleted.

Loading
Loading