feat: embed Tangled code files
36 unmodified lines37383940414243444519 unmodified lines6566676869707172737475767778798081828329 unmodified lines36 unmodified lines "@atcute/multibase": "^1.2.5", "@atcute/oauth-browser-client": "^5.0.0", "@atcute/oauth-cab": "^0.1.1", "@atcute/ozone": "^4.0.9", "@atcute/tangled": "^2.0.16", "@atcute/tid": "^1.1.4", "@atcute/uint8array": "^1.1.5", "@atcute/util-text": "^1.3.4", "@atcute/xrpc-server": "^2.0.2",19 unmodified lines "@vanilla-extract/css": "^1.21.2", "@vanilla-extract/dynamic": "^2.1.5", "clsx": "^2.1.1", "dequal": "^2.0.3", "highlight.js": "11.11.2", "idb-keyval": "^6.3.0", "lowlight": "^3.3.0", "tldts": "^7.4.10", "valibot": "^1.4.2" }, "devDependencies": { "@inlang/paraglide-js": "2.24.1", "@oomfware/vite-plugin-svg-sprites": "^0.1.2", "@oomfware/vite-plugin-vanilla-extract": "^0.1.0", "@types/hast": "^3.0.5", "@types/node": "^26.2.0", "@types/wicg-file-system-access": "^2023.10.7", "@typescript/native": "npm:typescript@^7.0.2", "@vanilla-extract/private": "^1.0.9",29 unmodified lines67 unmodified lines686970717273747576777873 unmodified lines1521531541551561571581591601611621631641651661671688 unmodified lines177178179180181182183184185186187137 unmodified linesExpand all3253263273283293303313323333343353363371269 unmodified linesExpand all16071608160916101611161216131614161516161617161816191620162116221623162416251626232 unmodified linesExpand all1859186018611862186318641865186618671868186956 unmodified lines19261927192819291930193119321933193419351936193785 unmodified lines20232024202520262027202820292030203120322033454 unmodified linesExpand all2488248924902491249224932494249524962497249824992500791 unmodified linesExpand all3292329332943295329632973298329933003301330233031 unmodified line3305330633073308330933103311331233133314153 unmodified linesExpand all34683469347034713472347334743475347634773478347992 unmodified lines357235733574357535763577357835793580358151 unmodified lines36333634363536363637363836393640364136423643364436453646368 unmodified linesExpand all67 unmodified lines version: 0.1.1(@typescript/typescript6@6.0.2) '@atcute/ozone': specifier: ^4.0.9 version: 4.0.9(@atcute/lexicons@2.1.0) '@atcute/tangled': specifier: ^2.0.16 version: 2.0.16(@atcute/lexicons@2.1.0) '@atcute/tid': specifier: ^1.1.4 version: 1.1.4 '@atcute/uint8array':73 unmodified lines version: 2.1.1 dequal: specifier: ^2.0.3 version: 2.0.3 highlight.js: specifier: 11.11.2 version: 11.11.2 idb-keyval: specifier: ^6.3.0 version: 6.3.0 lowlight: specifier: ^3.3.0 version: 3.3.0 tldts: specifier: ^7.4.10 version: 7.4.10 valibot:8 unmodified lines version: 0.1.2(react@19.2.8)(vite@8.2.2(@types/node@26.2.0)(esbuild@0.28.2)(terser@5.48.0)) '@oomfware/vite-plugin-vanilla-extract': specifier: ^0.1.0 version: 0.1.0(@oxc-project/types@0.146.0)(@vanilla-extract/css@1.21.2(patch_hash=db5f4b15486aaa4226da06516bfb01460b8d79a52973e5b8695b3a3bbc9a4a98))(rolldown@1.2.5)(vite@8.2.2(@types/node@26.2.0)(esbuild@0.28.2)(terser@5.48.0)) '@types/hast': specifier: ^3.0.5 version: 3.0.5 '@types/node': specifier: ^26.2.0 version: 26.2.0 '@types/wicg-file-system-access':137 unmodified linesExpand all resolution: {integrity: sha512-kP0s4txO/vM6w24HpLqjj+bHty3ZXVYN9al8KYBUKFhid5PMmNkWbwXjfyiERiUad8TIHBm/HMvHTKXueJAwpw==} peerDependencies: '@atcute/lexicons': ^2.0.0
'@atcute/tangled@2.0.16': resolution: {integrity: sha512-VW6ZOo8z2njfB9NfLbkWSwloBuCE/kO8vby8WVq+RHt9MHC0vbhYvOZTfaZEXnF8Qlwfy47CZD7iDwEMyXYQog==} peerDependencies: '@atcute/lexicons': ^2.0.0
'@atcute/tid@1.1.4': resolution: {integrity: sha512-RVjGAxu+WgcQjs7AkicZKOqLOncnuXh7a0xUHTfXTYZjXSszB7jBLgrcLWjpU0mBTko9dT+GajsXAcBGYmzYKQ==}
'@atcute/time-ms@1.3.3':1269 unmodified linesExpand all resolution: {integrity: sha512-KxU8ZyOEuJ81eTSgXa8GQbk/jO/rz0elYtNKt3VMtM2pRjeO8ADIu7sqqmEjFKJKqco9h2N1ojIDuHs6VfDItQ==} peerDependencies: react: ^18 || ^19
'@types/hast@3.0.5': resolution: {integrity: sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g==}
'@types/node@26.2.0': resolution: {integrity: sha512-5IviulTZeRNp2vAJ514cc/HUlY5nZ9fCbq9DMyC52BrhFZACo3nI0R7qBxhQmo/d27NFe96ur/b7Wwxklda+kg==}
'@types/react@19.2.18': resolution: {integrity: sha512-AnzbBERsrLKtk2XSfTbYRLjQPdy116Sty4q+T+Bp3IC4l6jNBvreVPAHmpq9qhXQM7CXZPjLVmGMw9sy+hxQ3w==}
'@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==}
'@types/wicg-file-system-access@2023.10.7': resolution: {integrity: sha512-g49ijasEJvCd7ifmAY2D0wdEtt1xRjBbA33PJTiv8mKBr7DoMsPeISoJ8oQOTopSRi+FBWPpPW5ouDj2QPKtGA==}
'@typescript/typescript-aix-ppc64@7.0.2':232 unmodified linesExpand all detect-libc@2.1.2: resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} engines: {node: '>=8'}
devlop@1.1.0: resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==}
dom-serializer@2.0.0: resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==}
domelementtype@2.3.0:56 unmodified lines resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin]
highlight.js@11.11.2: resolution: {integrity: sha512-oaXMACAU0kzOMXBjWpNcX+vlwSBCIAiZ9BHa7gA15NOTtT2L/l8OSZDuqS2XppOhZBPJ7hm4o8ep2kyuip2uEQ==} engines: {node: '>=12.0.0'}
idb-keyval@6.3.0: resolution: {integrity: sha512-um+2dgAWmYsu615EXpWVwSmapJhON0G43t3Ka/EVaohzPQXSMqKEqeDK/oIW3Ow+BXaF2PvSc+oBTFp793A5Ow==}
javascript-stringify@2.1.0:85 unmodified lines lightningcss@1.33.0: resolution: {integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==} engines: {node: '>= 12.0.0'}
lowlight@3.3.0: resolution: {integrity: sha512-0JNhgFoPvP6U6lE/UdVsSq99tn6DhjjpAj5MxG49ewd2mOBVtwWYIT8ClyABhq198aXXODMU6Ox8DrGy/CpTZQ==}
lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==}
magic-string@1.2.2:454 unmodified linesExpand all '@atcute/atproto': 4.0.4(@atcute/lexicons@2.1.0) '@atcute/bluesky': 4.0.20(@atcute/lexicons@2.1.0) '@atcute/lexicons': 2.1.0
'@atcute/tangled@2.0.16(@atcute/lexicons@2.1.0)': dependencies: '@atcute/atproto': 4.0.4(@atcute/lexicons@2.1.0) '@atcute/lexicons': 2.1.0
'@atcute/tid@1.1.4': dependencies: '@atcute/time-ms': 1.3.3
791 unmodified linesExpand all dependencies: '@tanstack/query-core': 5.102.2 react: 19.2.8
'@types/hast@3.0.5': dependencies: '@types/unist': 3.0.3
'@types/node@26.2.0': dependencies: undici-types: 8.3.0
1 unmodified line dependencies: csstype: 3.2.3 optional: true
'@types/unist@3.0.3': {}
'@types/wicg-file-system-access@2023.10.7': {}
'@typescript/typescript-aix-ppc64@7.0.2': optional: true153 unmodified linesExpand all dequal@2.0.3: {}
detect-libc@2.1.2: {}
devlop@1.1.0: dependencies: dequal: 2.0.3
dom-serializer@2.0.0: dependencies: domelementtype: 2.3.0 domhandler: 5.0.392 unmodified lines
fsevents@2.3.3: optional: true
highlight.js@11.11.2: {}
idb-keyval@6.3.0: {}
javascript-stringify@2.1.0: {}
51 unmodified lines lightningcss-linux-x64-musl: 1.33.0 lightningcss-win32-arm64-msvc: 1.33.0 lightningcss-win32-x64-msvc: 1.33.0
lowlight@3.3.0: dependencies: '@types/hast': 3.0.5 devlop: 1.1.0 highlight.js: 11.11.2
lru-cache@10.4.3: {}
magic-string@1.2.2: dependencies:368 unmodified linesExpand all72 unmodified lines73747576777879808182838485868788899091929394959697989910010110247 unmodified lines72 unmodified lines "components.post.state.blocksYou": "Quoted author blocks you", "components.post.state.deleted": "Deleted", "components.post.state.removedByAuthor": "Removed by author", "components.post.state.removedByYou": "Removed by you", "components.post.tangledString.a11y.open": [ { "declarations": ["input filename"], "selectors": [], "match": { "": "Open {filename} on tangled.org" } } ], "components.post.tangledString.a11y.openSnippet": "Open this snippet on tangled.org", "components.post.tangledString.error": "This snippet couldn't be loaded.", "components.post.tangledString.lineCount": [ { "declarations": ["input lineCount", "local cp = lineCount: plural", "local n = lineCount: number"], "selectors": ["cp"], "match": { "cp=one": "{n} line", "cp=other": "{n} lines" } } ], "components.post.tangledString.viewFile": "View file", "components.post.text.expand": "Expand post text", "components.post.text.showMore": "Show more", "components.post.translate.action.hide": "Hide translation", "components.post.translate.action.translate": "Translate",47 unmodified lines123456789101112131415161718192021222324252627282930313233343536373839404142434445import { style } from '@vanilla-extract/css';
// GitHub's syntax palette.const token = (light: string, dark: string) => style({ color: light, selectors: { '.theme--dark &, .theme--dim &': { color: dark }, }, });
const added = token('#116329', '#aff5b4');const blue = token('#0550ae', '#79c0ff');const green = token('#116329', '#7ee787');const grey = token('#6e7781', '#8b949e');const navy = token('#0a3069', '#a5d6ff');const orange = token('#953800', '#ffa657');const purple = token('#8250df', '#d2a8ff');const red = token('#cf222e', '#ff7b72');const removed = token('#82071e', '#ffdcd7');
export const scopeClasses: Record<string, string> = { addition: added, attr: blue, attribute: blue, built_in: orange, comment: grey, deletion: removed, keyword: red, literal: blue, meta: grey, name: green, number: blue, property: blue, regexp: navy, 'selector-tag': green, string: navy, symbol: blue, tag: green, title: purple, 'title.class_': orange, 'title.function_': purple, type: red, variable: orange,};52 unmodified lines5354555657585960616241 unmodified lines52 unmodified linesexport const themeFontFamily = `"Inter Variable", ${systemFontFamily}`;
export const emojiFontFamily = `"Twemoji Mozilla", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif`;
export const monoFontFamily = `ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`;
export const fontFamilyVar = createVar();
export const fontFamily = fallbackVar(fontFamilyVar, themeFontFamily);
41 unmodified lines123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169import type { LanguageFn } from 'highlight.js';
// preserve per-grammar chunks.export const LANGUAGES = { bash: () => import('highlight.js/lib/languages/bash'), c: () => import('highlight.js/lib/languages/c'), cpp: () => import('highlight.js/lib/languages/cpp'), csharp: () => import('highlight.js/lib/languages/csharp'), css: () => import('highlight.js/lib/languages/css'), dart: () => import('highlight.js/lib/languages/dart'), diff: () => import('highlight.js/lib/languages/diff'), dockerfile: () => import('highlight.js/lib/languages/dockerfile'), elixir: () => import('highlight.js/lib/languages/elixir'), go: () => import('highlight.js/lib/languages/go'), graphql: () => import('highlight.js/lib/languages/graphql'), haskell: () => import('highlight.js/lib/languages/haskell'), ini: () => import('highlight.js/lib/languages/ini'), java: () => import('highlight.js/lib/languages/java'), javascript: () => import('highlight.js/lib/languages/javascript'), json: () => import('highlight.js/lib/languages/json'), kotlin: () => import('highlight.js/lib/languages/kotlin'), less: () => import('highlight.js/lib/languages/less'), lua: () => import('highlight.js/lib/languages/lua'), makefile: () => import('highlight.js/lib/languages/makefile'), markdown: () => import('highlight.js/lib/languages/markdown'), nix: () => import('highlight.js/lib/languages/nix'), perl: () => import('highlight.js/lib/languages/perl'), php: () => import('highlight.js/lib/languages/php'), protobuf: () => import('highlight.js/lib/languages/protobuf'), python: () => import('highlight.js/lib/languages/python'), r: () => import('highlight.js/lib/languages/r'), ruby: () => import('highlight.js/lib/languages/ruby'), rust: () => import('highlight.js/lib/languages/rust'), scala: () => import('highlight.js/lib/languages/scala'), scss: () => import('highlight.js/lib/languages/scss'), sql: () => import('highlight.js/lib/languages/sql'), swift: () => import('highlight.js/lib/languages/swift'), typescript: () => import('highlight.js/lib/languages/typescript'), vim: () => import('highlight.js/lib/languages/vim'), xml: () => import('highlight.js/lib/languages/xml'), yaml: () => import('highlight.js/lib/languages/yaml'),} satisfies Record<string, () => Promise<{ default: LanguageFn }>>;
export type LanguageName = keyof typeof LANGUAGES;
// highlight.js uses JS/TS for JSX and INI for TOML.const EXT_TO_LANG: Record<string, LanguageName> = { bash: 'bash', c: 'c', cc: 'cpp', cjs: 'javascript', cpp: 'cpp', cs: 'csharp', css: 'css', cts: 'typescript', cxx: 'cpp', dart: 'dart', diff: 'diff', dockerfile: 'dockerfile', ex: 'elixir', exs: 'elixir', go: 'go', gql: 'graphql', graphql: 'graphql', h: 'c', hpp: 'cpp', hs: 'haskell', htm: 'xml', html: 'xml', ini: 'ini', java: 'java', js: 'javascript', json: 'json', jsonc: 'json', jsx: 'javascript', kt: 'kotlin', kts: 'kotlin', less: 'less', lua: 'lua', makefile: 'makefile', markdown: 'markdown', md: 'markdown', mjs: 'javascript', mk: 'makefile', mts: 'typescript', nix: 'nix', patch: 'diff', php: 'php', pl: 'perl', pm: 'perl', proto: 'protobuf', py: 'python', pyi: 'python', r: 'r', rb: 'ruby', rs: 'rust', scala: 'scala', scss: 'scss', sh: 'bash', sql: 'sql', svg: 'xml', swift: 'swift', toml: 'ini', ts: 'typescript', tsx: 'typescript', vim: 'vim', xml: 'xml', yaml: 'yaml', yml: 'yaml', zsh: 'bash',};
const FILENAME_TO_LANG: Record<string, LanguageName> = { dockerfile: 'dockerfile', gemfile: 'ruby', makefile: 'makefile', rakefile: 'ruby', vimrc: 'vim',};
const INTERPRETER_TO_LANG: Record<string, LanguageName> = { bash: 'bash', dash: 'bash', deno: 'typescript', node: 'javascript', perl: 'perl', php: 'php', python: 'python', python2: 'python', python3: 'python', ruby: 'ruby', sh: 'bash', zsh: 'bash',};
// support direct interpreters and env options.const SHEBANG_RE = /^#!(?:\S*\/)?(?:env\s+(?:-\S+\s+)*)?([\w.-]+)/;
/** * detects a language from a filename or shebang. * * @param filename filename to inspect * @param contents source to inspect * @returns the grammar name, if detected */export function detectLanguage({ contents, filename,}: { contents: string; filename: string | undefined;}): LanguageName | undefined { if (filename) { const name = filename.toLowerCase(); const whole = FILENAME_TO_LANG[name.replace(/^\./, '')]; if (whole) { return whole; }
const dot = name.lastIndexOf('.'); const ext = dot > 0 ? EXT_TO_LANG[name.slice(dot + 1)] : undefined; if (ext) { return ext; } }
const interpreter = SHEBANG_RE.exec(contents)?.[1]; return interpreter ? INTERPRETER_TO_LANG[interpreter.toLowerCase()] : undefined;}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113import type { Root, RootContent } from 'hast';import { createLowlight } from 'lowlight';
import { detectLanguage, LANGUAGES, type LanguageName } from '#/lib/code/grammars';import { type Line, type Span, splitLines } from '#/lib/code/lines';
const lowlight = createLowlight();
const loads = new Map<LanguageName, Promise<void>>();
function loadLanguage(language: LanguageName): Promise<void> { let load = loads.get(language); if (!load) { load = LANGUAGES[language]() .then((mod) => { lowlight.register(language, mod.default); }) .catch(() => { // fall back to plain text. }); loads.set(language, load); } return load;}
function flatten(nodes: RootContent[], inherited: string | undefined, out: Span[]): void { for (const node of nodes) { switch (node.type) { case 'text': { out.push({ scope: inherited, value: node.value }); break; } case 'element': { flatten(node.children, scopeOf(node.properties?.className) ?? inherited, out); break; } } }}
function scopeOf(className: unknown): string | undefined { if (!Array.isArray(className)) { return undefined; }
const parts = className.map(String); const scope = parts.find((part) => part.startsWith('hljs-')); if (!scope) { return undefined; }
return [scope.slice('hljs-'.length), ...parts.filter((part) => part !== scope)].join('.');}
function highlightToLines(source: string, language: LanguageName): Line[] { const code = splitLines(source).join('\n');
let tree: Root; try { tree = lowlight.highlight(language, code); } catch { // fall back to plain text. tree = { type: 'root', children: [{ type: 'text', value: code }] }; }
const spans: Span[] = []; flatten(tree.children, undefined, spans);
const lines: Line[] = []; let line: Line = []; for (const span of spans) { const parts = span.value.split('\n'); for (const [index, part] of parts.entries()) { if (index > 0) { lines.push(line); line = []; } if (part) { line.push({ scope: span.scope, value: part }); } } } lines.push(line);
return lines;}
/** * detects and highlights source code. * * @param contents source to highlight * @param filename filename used for detection * @returns highlighted lines, or null if unsupported */export async function highlightSource({ contents, filename,}: { contents: string; filename: string | undefined;}): Promise<Line[] | null> { const language = detectLanguage({ contents, filename }); if (!language) { return null; }
await loadLanguage(language); if (!lowlight.registered(language)) { return null; }
return highlightToLines(contents, language);}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354export type Span = { scope?: string; value: string };
export type Line = Span[];
const LINE_BREAK = /\r\n?|\n/;
/** * splits source on LF, CRLF, or CR. * * @param source text to split * @param limit maximum lines * @returns one entry per line */export const splitLines = (source: string, limit?: number): string[] => source.split(LINE_BREAK, limit);
/** * counts LF, CRLF, and CR-delimited lines. * * @param source text to count * @returns at least one */export const countLines = (source: string): number => { let count = 1; for (let index = 0; index < source.length; index++) { const char = source[index]; if (char === '\n') { count++; } else if (char === '\r') { count++; if (source[index + 1] === '\n') { index++; } } } return count;};
/** * takes leading source lines. * * @param source text to truncate * @param rows lines to keep * @returns lines joined with LF */export const takeLines = (source: string, rows: number): string => splitLines(source, rows).join('\n');
/** * converts source text to plain lines. * * @param source text to convert * @returns unhighlighted lines */export const plainLines = (source: string): Line[] => splitLines(source).map((line) => (line ? [{ value: line }] : []));1234567891011121314151617181947 unmodified lines/** * decodes a URL path segment without throwing. * * @param raw encoded segment * @returns the decoded or original segment */export const decodeUrlSegment = (raw: string): string => { try { return decodeURIComponent(raw); } catch { return raw; }};
/** * parses a string into a URL, accepting only safe http(s) schemes. * * @param text the URL string to parse * @returns the parsed URL, or null if invalid or unsafe47 unmodified lines1234567891011121314151617181920212223242526import { useQuery } from '@tanstack/react-query';
import { GCTIME, STALE } from '#/state/queries';
const RQKEY_ROOT = 'code-highlight';export const RQKEY = (filename: string, contents: string) => [RQKEY_ROOT, filename, contents];
/** * caches highlighted source code. * * @param contents source to highlight * @param filename filename used for detection * @returns the highlight query */export function useCodeHighlightQuery({ contents, filename }: { contents: string; filename: string }) { return useQuery({ queryKey: RQKEY(filename, contents), staleTime: STALE.INFINITY, gcTime: GCTIME.MINUTES.FIVE, async queryFn() { const { highlightSource } = await import('#/lib/code/highlight');
return await highlightSource({ contents, filename }); }, });}123456789101112131415161718192021222324252627282930313233343536import { ok } from '@atcute/client';import type { ResourceUri } from '@atcute/lexicons';import type { ShTangledString } from '@atcute/tangled';
import { useQuery } from '@tanstack/react-query';
import { slingshotClient } from '#/lib/api/slingshot-client';
import { STALE } from '#/state/queries';
const RQKEY_ROOT = 'tangled-string';export const RQKEY = (uri: ResourceUri) => [RQKEY_ROOT, uri];
/** * queries a Tangled string record. * * @param uri record at-uri * @returns the record query */export function useTangledStringQuery({ uri }: { uri: ResourceUri }) { return useQuery({ queryKey: RQKEY(uri), staleTime: STALE.MINUTES.FIFTEEN, async queryFn({ signal }) { const response = await ok( slingshotClient.get('blue.microcosm.repo.getRecordByUri', { signal, params: { at_uri: uri }, }), );
// oxlint-disable-next-line typescript/no-unsafe-type-assertion -- collection determines value type return response.value as unknown as ShTangledString.Main; }, });}12344567815 unmodified lines2425262728282930import { style } from '@vanilla-extract/css';
import { vars } from '#/styles/contract.css';import { borderRadius, space } from '#/styles/tokens.css';import { borderRadius, monoFontFamily, space } from '#/styles/tokens.css';
export const root = style({ boxSizing: 'border-box', display: 'flex',15 unmodified lines textAlign: 'left', whiteSpace: 'pre-wrap', wordBreak: 'break-word', color: vars.palette.contrast_500, fontFamily: `ui-monospace, SFMono-Regular, Menlo, monospace`, fontFamily: monoFontFamily, fontSize: 12,});