Skip to main content

Built and signed on GitHub Actions

The knowledge hacker's notebook

This package works with Deno, Browsers
This package works with Deno
This package works with Browsers
JSR Score
76%
Published
a month ago (0.9.4)

Functions

f
asset.readAsset

Reads an asset embedded in a plug (via the assets field in the plug manifest).

f
clientStore.del

Deletes a value from the client store.

f
clientStore.get

Gets a value from the client store.

f
clientStore.set

Sets a value in the client store.

f
codeWidget.refreshAll

Refreshes all code widgets on the page that support it.

f
codeWidget.render

Renders a code widget.

f
datastore.batchDel

Deletes multiple values from the key value store.

f
datastore.batchGet

Gets multiple values from the key value store.

f
datastore.batchSet

Sets multiple values in the key value store.

f
datastore.del

Deletes a value from the key value store.

f
datastore.get

Gets a value from the key value store.

f
datastore.listFunctions

Lists all functions currently defined and available for use in queries

f
datastore.query

Queries the key value store.

f
datastore.queryDelete

Queries the key value store and deletes all matching items

f
datastore.set

Sets a value in the key value store.

f
debug.cleanup

Wipes the entire state KV store and the entire space KV store.

f
debug.resetClient

Completely wipes the client state, both cached files as well as databases (best effort)

f
editor.confirm

Prompt the user for confirmation

f
editor.copyToClipboard

Copy the specified data to the clipboard

f
editor.deleteLine

Delete the current line in the editor

f
editor.downloadFile

Force the client to download the file in dataUrl with filename as file name

f
editor.filterBox

Exposes a filter box UI (similar to the page navigator and command palette)

f
editor.flashNotification

Shows a flash notification to the user (top right corner)

f
editor.fold

Perform a fold at the current cursor position

f
editor.foldAll

Fold all code blocks in the editor

f
editor.getCurrentPage

Returns the name of the page currently open in the editor.

f
editor.getCursor

Returns the position (in # of characters from the beginning of the file) of the cursor in the editor

f
editor.getSelection

Returns the line number and column number of the cursor in the editor

f
editor.getText

Returns the full text of the currently open page

f
editor.getUiOption

Get the value of a UI option

f
editor.goHistory

This is calling the go() method from the History Web API.

f
editor.hidePanel

Hides a panel in the editor

f
editor.insertAtCursor

Insert text at the cursor position in the editor

f
editor.insertAtPos

Insert text at the specified position into the editor

f
editor.moveCursor

Move the cursor to the specified position in the editor

f
editor.moveCursorToLine

Move the cursor to the specified line and column in the editor

f
editor.navigate

Navigates to the specified page reference

f
editor.openCommandPalette

Opens the command palette

f
editor.openPageNavigator

Opens the page navigator

f
editor.openSearchPanel

Open the editor's native search panel

f
editor.openUrl

Opens the specified URL in the browser

f
editor.prompt

Prompt the user for text input

f
editor.redo

Perform a redo operation of the last undo in the editor

f
editor.reloadConfigAndCommands

Reloads the config and commands, also in the server

f
editor.reloadPage

Force reloads the current page

f
editor.reloadUI

Force reloads the browser UI

f
editor.replaceRange

Replace the text in the specified range in the editor

f
editor.save

Forces a save of the current page

f
editor.setSelection

Sets the position of the cursor in the editor

f
editor.setText

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

f
editor.setUiOption

Set the value of a UI option

f
editor.showPanel

Shows a panel in the editor

f
editor.toggleFold

Toggle the fold at the current cursor position

f
editor.undo

Perform an undo operation of the last edit in the editor

f
editor.unfold

Perform an unfold at the current cursor position

f
editor.unfoldAll

Unfold all code blocks in the editor

f
editor.uploadFile

Triggers the browser's native file upload dialog/popup

f
editor.vimEx

Execute a Vim ex command

f
events.dispatchEvent

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.

f
events.listEvents

List all events currently registered (listened to) on the SilverBullet event bus.

f
jsonschema.validateObject

Validates a JSON object against a JSON schema.

f
jsonschema.validateSchema

Validates a JSON schema.

f
language.listLanguages

Lists all supported languages in fenced code blocks

f
language.parseLanguage

Parses a piece of code using any of the supported SB languages, see common/languages.ts for a list

f
markdown.parseMarkdown

Parses a piece of markdown text into a ParseTree.

f
markdown.renderParseTree

Renders a ParseTree to markdown.

f
mq.ack

Acknowledges a message from a queue, in case it needs to be explicitly acknowledged.

f
mq.batchAck

Acknowledges a batch of messages from a queue, in case they need to be explicitly acknowledged.

f
mq.batchSend

Sends a batch of messages to a queue.

f
mq.getQueueStats

Retrieves stats on a particular queue.

f
mq.send

Sends a message to a queue.

f
shell.run

Runs a shell command.

f
space.deleteAttachment

Deletes an attachment from the space

f
space.deleteFile

Delete a file from the space.

f
space.deletePage

Delete a page from the space.

f
space.fileExists
No documentation available
f
space.getAttachmentMeta

Get metadata for an attachment in the space.

f
space.getFileMeta

Get metadata for a file in the space.

f
space.getPageMeta

Get metadata for a page in the space.

f
space.listAttachments

Lists all attachments in the space (all files not ending in .md).

f
space.listFiles

List all files in the space (pages, attachments and plugs).

f
space.listPages

Lists all pages (files ending in .md) in the space.

f
space.listPlugs

List all plugs in the space.

f
space.readAttachment

Read an attachment from the space

f
space.readFile

Read a file from the space as a Uint8Array.

f
space.readPage

Read a page from the space as text.

f
space.writeAttachment

Writes an attachment to the space

f
space.writeFile

Write a file to the space.

f
space.writePage

Write a page to the space.

f
sync.hasInitialSyncCompleted

Checks if an initial sync has completed

f
sync.isSyncing

Checks if a sync is currently in progress

f
sync.scheduleFileSync

Actively schedules a file to be synced. Sync will happen by default too, but this prioritizes the file.

f
sync.scheduleSpaceSync

Schedules a sync of without waiting for the usual sync interval.

f
syscall
No documentation available
f
system.applyAttributeExtractors

Applies attribute extractors to a ParseTree

f
system.getEnv

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)

f
system.getMode

Returns the current mode of the system, either "ro" (read-only) or "rw" (read-write)

f
system.getSpaceConfig

Loads a particular space configuration key (or all of them when no key is spacified)

f
system.getVersion

Returns the SilverBullet version

f
system.invokeCommand

Invoke a client command by nameNote: only available on the client

f
system.invokeFunction

Invoke a plug function

f
system.invokeSpaceFunction

Invoke a space function by name

f
system.listCommands

Lists all commands available

f
system.listSyscalls

Lists all syscalls available

f
system.reloadConfig

Trigger an explicit reload of the configuration

f
system.reloadPlugs

Trigger a reload of all plugs

f
template.parseTemplate

Parses a template into an AST.

f
template.renderTemplate

Renders a template with the given object and globals.

f
YAML.parse

Parses a YAML string into a JavaScript object.

f
YAML.stringify

Converts a JavaScript object into a YAML string.

Namespaces

N
asset
No documentation available
N
clientStore
No documentation available
N
codeWidget
No documentation available
N
datastore
No documentation available
N
debug
No documentation available
N
editor
No documentation available
N
events
No documentation available
N
jsonschema
No documentation available
N
language
No documentation available
N
markdown
No documentation available
N
mq
No documentation available
N
shell
No documentation available
N
space
No documentation available
N
sync
No documentation available
N
system
No documentation available
N
template
No documentation available
N
YAML
No documentation available

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";