Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@blockprotocol/action

Package Overview
Dependencies
Maintainers
7
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blockprotocol/action

Implementation of the Block Protocol Action module specification for blocks and embedding applications

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
7
Created
Source

Block Protocol – Action Module

This package implements the Block Protocol Action module for blocks and embedding applications.

To get started:

  1. yarn add @blockprotocol/action or npm install @blockprotocol/action
  2. Follow the instructions to use the action module as a block or an embedding application

Blocks

To create a ActionBlockHandler, pass the constructor:

  1. An element in the block
  2. callbacks to respond to messages from the embedder
    • You should register a callback for the updateAction message, which allows embedding application to set new `labels for block actions.

To tell the embedding application what elements will dispatch actions, call the availableActions function. Send this message again if the available actions change.

To send an action message, you call the action function.

Embedding applications

To create a ActionEmbedderHandler, pass the constructor:

  1. An element wrapping the block
  2. callbacks to respond to messages from the block
    • you should register callbacks for availableActions to do something with the actions the block advises are possible
    • action to process individual action reports

To update the label in an action, call updateAction. The block should respond with the updated availableActions.

Keywords

FAQs

Package last updated on 03 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc