major: import Fresh 2.0 code (#2449)

🎉
This commit is contained in:
Marvin Hagemeister
2024-05-24 09:40:08 +02:00
committed by GitHub
parent 990357629e
commit 287929e4d2
958 changed files with 15794 additions and 28287 deletions
+1 -2
View File
@@ -1,6 +1,5 @@
import { ComponentChildren } from "preact";
import { useEffect } from "preact/hooks";
import { IS_BROWSER } from "$fresh/runtime.ts";
import { IS_BROWSER } from "@fresh/core/runtime";
import * as Icons from "../components/Icons.tsx";
import { useSignal } from "@preact/signals";
+1 -1
View File
@@ -1,6 +1,6 @@
import { useSignal } from "@preact/signals";
import * as Icons from "../components/Icons.tsx";
import { JSX } from "preact";
import type { JSX } from "preact";
interface CounterProps {
start: number;
+6 -15
View File
@@ -1,4 +1,3 @@
import { Head } from "$fresh/runtime.ts";
import { useEffect, useRef } from "preact/hooks";
import docsearch from "https://esm.sh/@docsearch/js@3.5.2?target=es2020";
@@ -25,19 +24,11 @@ export default function SearchButton(
}
}, [ref.current]);
return (
<>
<Head>
<link
rel="stylesheet"
href="/docsearch.css"
/>
</Head>
<div
title="Search Button"
class={"h-9 mb-6 " + (props.class ?? "")}
ref={ref}
>
</div>
</>
<div
title="Search Button"
class={"h-9 mb-6 " + (props.class ?? "")}
ref={ref}
>
</div>
);
}
+1 -1
View File
@@ -1,5 +1,5 @@
import { useEffect, useRef, useState } from "preact/hooks";
import { MarkdownHeading } from "../utils/markdown.ts";
import type { MarkdownHeading } from "../utils/markdown.ts";
export interface TableOfContentsProps {
headings: MarkdownHeading[];
+2 -2
View File
@@ -1,7 +1,7 @@
// Copyright 2022-2023 the Deno authors. All rights reserved. MIT license.
import { IS_BROWSER } from "$fresh/runtime.ts";
import { type VersionLink } from "../routes/docs/[...slug].tsx";
import { IS_BROWSER } from "@fresh/core/runtime";
import type { VersionLink } from "../routes/docs/[...slug].tsx";
export default function VersionSelect(
{ versions, selectedVersion }: {