replace carta with bun's own api

This commit is contained in:
2026-03-17 01:26:52 +01:00
parent 090a145211
commit 64681befad
5 changed files with 6 additions and 291 deletions
+1
View File
@@ -15,5 +15,6 @@ export interface StreamSummary {
export interface Stream extends StreamSummary {
format: string;
description: string | null;
descriptionHtml: string;
tracks: Track[];
}
@@ -46,6 +46,10 @@ export function load({ params }) {
error(404);
}
result.descriptionHtml = Bun.markdown.html(
result.description || 'No description available.'
);
if (dev) {
// pass raw JSON for metadata editor
const original = JSON.parse(getOriginalJson(params.stream_id));
@@ -2,12 +2,6 @@
import { getStreamContext } from '$lib/streamContext.svelte.ts';
import { shorthandCode, formatTrackTime, formatDate } from '$lib/utils.ts';
import { jumpToTrack } from './Player.svelte';
import { Carta } from 'carta-md';
import DOMPurify from 'isomorphic-dompurify';
const carta = new Carta({
sanitizer: DOMPurify.sanitize
});
const ctx = getStreamContext();
@@ -30,7 +24,7 @@
</div>
<div class="description-bubble">
{@html carta.renderSSR(ctx.current.description || 'No description available.')}
{@html ctx.current.descriptionHtml}
</div>
<div id="table-container">