feat: some more docs

This commit is contained in:
TrèsAbhi committed 2026-03-20 19:58:56 -05:00
1 parent d88f7ad539
commit c116b40dfc
5 files changed
+18 -14

No files matched your search

@@ -59,6 +59,8 @@ for (const line of bodyOriginal.split("\n")) {
flex-direction: column;
gap: var(--space-4);
width: 100%;
padding-top: var(--space-4);
padding-bottom: var(--space-3);
}
@@ -1,22 +1,12 @@
---
import { resolve } from "path";
import { readFile } from "fs/promises";
import { Link } from "./Link";
import { api } from "../core/api/dynamic";
import HighlightedCodeBlock from "./HighlightedCodeBlock.astro";
import { Text } from "./Text";
import { ArrowBottomRightIcon } from "@radix-ui/react-icons";
import { Code } from "./Code";
import { resolve } from "path";
import {
createProgram,
forEachChild,
isArrayTypeNode,
isEnumDeclaration,
isExpressionWithTypeArguments,
isInterfaceDeclaration,
isMethodSignature,
isPropertySignature,
isTypeAliasDeclaration,
isTypeNode,
isTypeReferenceNode,
type InterfaceDeclaration,
@@ -24,12 +14,19 @@ import {
type Symbol,
type TypeNode,
} from "typescript";
import { api } from "../core/api/dynamic";
import { Code } from "./Code";
import HighlightedCodeBlock from "./HighlightedCodeBlock.astro";
import { Link } from "./Link";
import { Text } from "./Text";
interface Props {
value: string;
locale: string;
}
const DEFAULT_EXPANDED = 8;
const { value, locale } = Astro.props;
const strings = await api.strings(locale);
@@ -192,7 +189,10 @@ content = content.trim();
<ArrowBottomRightIcon />
</div>
<div class="types">
<div
class="types"
data-expanded={content.split("\n").length <= DEFAULT_EXPANDED}
>
<HighlightedCodeBlock {lang} content={content} />
<div class="overlay">
+1 -1
View File
@@ -195,7 +195,7 @@ export class ServerAPI extends AbstractAPI {
protected async _avatarList() {
const avatars = await this.avatars();
const list = Object.keys(avatars.avatars);
const list = avatars.avatars.map((avatar) => avatar.name);
return { list };
}
@@ -2,7 +2,7 @@ import { api } from "../../../core/api/dynamic";
/**
* Identical to `avatars/[id].json`, but returns data on all avatars at once,
* mapped by `id`. Beware, the returned `JSON` is large.
* mapped by `id`.
*
* @type avatars.Avatars
*/
@@ -1,6 +1,8 @@
import { api } from "../../../core/api/dynamic";
/**
* Returns a list of all avatars ids.
*
* @type avatar_list.AvatarList
*/
export async function GET() {