acederberg.io
  • Home
  • Projects
    • Projects
    • Blog
    • Nvim Configuration
    • Blog and Demo Automation
    • Captura
  • Resume
  • Posts
  • Kaggle
  • Leetcode

On this page

  • Modules
  • Variables
    • BannerInstances
    • QuartoInstances
    • ServerInstances
  • Functions
    • Banner()
    • BannerControls()
    • Quarto()
    • QuartoLogItem()
    • QuartoOverlayItem()
    • Server()

Live

Author

Adrian Cederberg

Note

Documentation generated by typedoc on Thu Feb 20 2025 16:25:49 GMT+0000 (Coordinated Universal Time) with typedoc-plugin-markdown (and then rendered by quarto).

blog


Modules

  • <internal>

Variables

BannerInstances

const BannerInstances: Map<string, TBanner>;

Defined in: live/banner.js:67


QuartoInstances

const QuartoInstances: Map<string, TQuarto>;

Defined in: live/quarto.js:67


ServerInstances

const ServerInstances: Map<string, TServer>;

Defined in: live/server.js:56

Functions

Banner()

function Banner(options): TBanner;

Defined in: live/banner.js:452

Create the live banner.

This should make it so that any module can easily dispatch renders, view render data, etc.

Parameters

options

TControlsOptions

Returns

TBanner


BannerControls()

function BannerControls(options): TBannerControls;

Defined in: live/banner.js:412

Create the render controls shown on the left hand side of the render banner.

The following functionality should be achieved:

  1. Tools should show up in their own overlay, where inputs are displayed and requests are sent to the API.
  2. Responses should be be shown in a separate overlay.
  3. Errors should be pushed to a separate overlay where they can be observed.

Parameters

options

TControlsOptions

Returns

TBannerControls


Quarto()

function Quarto(options): TQuarto;

Defined in: live/quarto.js:275

Handles new log items for the logs table (if exists) and banner *(if included).

  • When a message arrives, ensure that a row is added to the display.
  • When the message is an error, show the overlay with the page scrolled down to the bottom of the content.

Parameters

options

TQuartoOptions

Returns

TQuarto


QuartoLogItem()

function QuartoLogItem(item): TQuartoLogItem;

Defined in: live/quarto.js:162

Create quarto table table row for a log item.

Includes buttons to active the overlay and re-render, kind, origin, time, target, and origin. Highlights depending on success or failure of render.

Parameters

item

TQuartoRender

Log item pushed from websocket.

Returns

TQuartoLogItem


QuartoOverlayItem()

function QuartoOverlayItem(item, options): TQuartoOverlayItem;

Defined in: live/quarto.js:82

Create overlay content for a quarto render.

All errors will be highlighted in red and the overlay content will be colorized to red. Successful renders of qmd documents will be colorized to blue. Successful updates of static assets will be colorized in teal.

Parameters

item

TQuartoRender

an item pushed from quarto logs websocket.

options
overlayRenders

TOverlay

Returns

TQuartoOverlayItem


Server()

function Server(options): TServer;

Defined in: live/server.js:208

Add reactivity to ServerLog. Generates new rows when logs are pushed to the websocket.

Parameters

options

TServerOptions

Returns

TServer