fix: improve mdx code block pipeline

This commit is contained in:
OpenCode Worker
2026-06-03 11:25:25 -05:00
parent 2a9a3f6550
commit d223c5f512
7 changed files with 8912 additions and 16 deletions

View File

@@ -271,15 +271,19 @@
background-color: oklch(0.10 0 0 / 0.85);
color: var(--color-code-copy);
}
[data-rehype-pretty-code-figure]:hover .rehype-pretty-copy {
[data-rehype-pretty-code-figure]:hover .rehype-pretty-copy,
[data-rehype-pretty-code-figure] .rehype-pretty-copy:focus-visible,
[data-rehype-pretty-code-figure] .rehype-pretty-copy:focus {
opacity: 1;
}
[data-rehype-pretty-code-figure] .rehype-pretty-copy:hover {
[data-rehype-pretty-code-figure] .rehype-pretty-copy:hover,
[data-rehype-pretty-code-figure] .rehype-pretty-copy:focus-visible {
@apply border-current;
background-color: oklch(0.95 0 0 / 0.95);
color: var(--color-code-copy-hover);
}
.dark [data-rehype-pretty-code-figure] .rehype-pretty-copy:hover {
.dark [data-rehype-pretty-code-figure] .rehype-pretty-copy:hover,
.dark [data-rehype-pretty-code-figure] .rehype-pretty-copy:focus-visible {
background-color: oklch(0.15 0 0 / 0.95);
}
[data-rehype-pretty-code-figure] .rehype-pretty-copy.rehype-pretty-copied {

View File

@@ -1,6 +1,7 @@
"use client";
import { LazyMotion, domAnimation, MotionConfig } from "motion/react";
import { CodeCopyInit } from "@/components/ui/CodeCopyInit";
export function Providers({ children }: { children: React.ReactNode }) {
return (
@@ -9,6 +10,7 @@ export function Providers({ children }: { children: React.ReactNode }) {
reducedMotion="user"
transition={{ duration: 0.3, ease: [0.22, 1, 0.36, 1] }}
>
<CodeCopyInit />
{children}
</MotionConfig>
</LazyMotion>