Skip to Content
sdeck docs

Overview

What @sdeck/plugin exports, at a glance.

Everything a plugin needs comes from @sdeck/plugin, and the helpers for looks from @sdeck/schema. Your editor shows the types and what each of them is for; these pages are the overview.

ExportWhat it is for
createPluginMakes a plugin and its parts
settingThe fields of a form
Permissions, PermissionErrorWhat a plugin asks to do
Shared, following, useSharedSeveral live values from one connection
ManagedConnection, PermanentErrorA connection that looks after itself
onSettingsChangeActs on changed settings
OAuthErrorWhat a failed sign-in throws
layoutText, fitTextText that fits, for overlays
formatDate, formatDuration, formatNumberThe formats of expressions, in code
usePress, useHold, useHostState and other hooksFor actions that draw themselves

createPlugin

Field
idThe package's name
name, versionShown to users; the version matches package.json
description
namespacePrefix of live values and events. By default the name without sdeck-plugin-
permissionsEverything it may ask for
settingsThe plugin's own settings

The builder it returns has action, state, trigger, source, command and link, the running plugin's context, its overlays, and define, which takes the parts plus onboarding and activate.

API versions

apiVersion in package.json says what a plugin needs. Each version only adds to the one before.

VersionAdds
6The slot dial, and hooks for dials
5Sign-ins and links
4useValues, context.buttons and the format… functions
3createPlugin, setting and the helpers for looks
2Actions without a component
1The first

On this page