@silverbulletmd/silverbullet@0.9.4Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
The knowledge hacker's notebook
Reads an asset embedded in a plug (via the assets
field in the plug manifest).
Deletes a value from the client store.
Gets a value from the client store.
Sets a value in the client store.
Refreshes all code widgets on the page that support it.
Renders a code widget.
Deletes multiple values from the key value store.
Gets multiple values from the key value store.
Sets multiple values in the key value store.
Deletes a value from the key value store.
Gets a value from the key value store.
Lists all functions currently defined and available for use in queries
Queries the key value store.
Queries the key value store and deletes all matching items
Sets a value in the key value store.
Wipes the entire state KV store and the entire space KV store.
Completely wipes the client state, both cached files as well as databases (best effort)
Prompt the user for confirmation
Copy the specified data to the clipboard
Delete the current line in the editor
Dispatch a CodeMirror transaction: https://codemirror.net/docs/ref/#state.Transaction
Force the client to download the file in dataUrl with filename as file name
Exposes a filter box UI (similar to the page navigator and command palette)
Shows a flash notification to the user (top right corner)
Perform a fold at the current cursor position
Fold all code blocks in the editor
Returns the name of the page currently open in the editor.
Returns the position (in # of characters from the beginning of the file) of the cursor in the editor
Returns the line number and column number of the cursor in the editor
Returns the full text of the currently open page
Get the value of a UI option
This is calling the go()
method from the History Web API.
Hides a panel in the editor
Insert text at the cursor position in the editor
Insert text at the specified position into the editor
Move the cursor to the specified position in the editor
Move the cursor to the specified line and column in the editor
Opens the command palette
Open the editor's native search panel
Opens the specified URL in the browser
Prompt the user for text input
Perform a redo operation of the last undo in the editor
Reloads the config and commands, also in the server
Force reloads the current page
Force reloads the browser UI
Replace the text in the specified range in the editor
Forces a save of the current page
Sets the position of the cursor in the editor
This updates the editor text, but in a minimal-diff way:it compares the current editor text with the new text, and only sends the changes to the editor, thereby preserving cursor location
Set the value of a UI option
Shows a panel in the editor
Toggle the fold at the current cursor position
Perform an undo operation of the last edit in the editor
Perform an unfold at the current cursor position
Unfold all code blocks in the editor
Triggers the browser's native file upload dialog/popup
Execute a Vim ex command
Triggers an event on the SilverBullet event bus.This can be used to implement an RPC-style system too, because event handlers can return values,which are then accumulated in an array and returned to the caller.
List all events currently registered (listened to) on the SilverBullet event bus.
Validates a JSON object against a JSON schema.
Validates a JSON schema.
Lists all supported languages in fenced code blocks
Parses a piece of code using any of the supported SB languages, see common/languages.ts
for a list
Parses a piece of markdown text into a ParseTree.
Renders a ParseTree to markdown.
Acknowledges a message from a queue, in case it needs to be explicitly acknowledged.
Acknowledges a batch of messages from a queue, in case they need to be explicitly acknowledged.
Sends a batch of messages to a queue.
Retrieves stats on a particular queue.
Sends a message to a queue.
Runs a shell command.
Deletes an attachment from the space
Delete a file from the space.
Delete a page from the space.
Get metadata for an attachment in the space.
Get metadata for a file in the space.
Get metadata for a page in the space.
Lists all attachments in the space (all files not ending in .md).
List all files in the space (pages, attachments and plugs).
Lists all pages (files ending in .md) in the space.
List all plugs in the space.
Read an attachment from the space
Read a file from the space as a Uint8Array.
Read a page from the space as text.
Writes an attachment to the space
Write a file to the space.
Write a page to the space.
Checks if an initial sync has completed
Checks if a sync is currently in progress
Actively schedules a file to be synced. Sync will happen by default too, but this prioritizes the file.
Schedules a sync of without waiting for the usual sync interval.
Applies attribute extractors to a ParseTree
Returns what runtime environment this plug is run in, e.g. "server" or "client" can be undefined, which would mean a hybrid environment (such as mobile)
Returns the current mode of the system, either "ro" (read-only) or "rw" (read-write)
Loads a particular space configuration key (or all of them when no key is spacified)
Returns the SilverBullet version
Invoke a client command by nameNote: only available on the client
Invoke a plug function
Invoke a space function by name
Lists all commands available
Lists all syscalls available
Trigger an explicit reload of the configuration
Trigger a reload of all plugs
Parses a template into an AST.
Renders a template with the given object and globals.
Parses a YAML string into a JavaScript object.
Converts a JavaScript object into a YAML string.
Add Package
deno add jsr:@silverbulletmd/silverbullet
Import symbol
import * as mod from "@silverbulletmd/silverbullet/syscalls";
---- OR ----
Import directly with a jsr specifier
import * as mod from "jsr:@silverbulletmd/silverbullet/syscalls";