wsb-daemon 0.275.7622

wsb's daemon: the workbench, the GitHub mirror's schedule and peer continuity, for every workspace on the machine
<script lang="ts">
  import { applyHighlight, escapeHTML } from "../../utils/highlight.js";

  interface Props {
    content: string;
    language?: string;
    highlightQuery?: string;
    isCurrentHighlight?: boolean;
  }

  let { content, language, highlightQuery = "", isCurrentHighlight = false }: Props = $props();
</script>

<div class="code-block">
  {#if language}
    <div class="code-lang">{language}</div>
  {/if}
  <pre
    class="code-content"
    use:applyHighlight={{ q: highlightQuery, current: isCurrentHighlight, content }}
  ><code>{@html escapeHTML(content)}</code></pre>
</div>

<style>
  .code-block {
    background: var(--wb-code-bg);
    border-radius: var(--wsb-radius-md);
    margin: var(--wb-spacing-4) 0;
    overflow: hidden;
  }

  .code-lang {
    padding: var(--wb-spacing-4) var(--wb-spacing-12);
    font-family: var(--wsb-font-mono);
    font-size: var(--wb-font-size-11);
    font-weight: 500;
    color: var(--wb-code-text);
    opacity: 0.5;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .code-content {
    padding: var(--wb-spacing-12) var(--wb-spacing-16);
    font-family: var(--wsb-font-mono);
    font-size: var(--wb-font-size-13);
    line-height: 1.55;
    color: var(--wb-code-text);
    overflow-x: auto;
  }

  .code-content code {
    font-family: inherit;
  }

  @media (max-width: 767px) {
    .code-content {
      max-width: calc(100vw - var(--wb-control-size-32));
    }
  }
</style>