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

lucid-extension-sdk

Package Overview
Dependencies
Maintainers
2
Versions
322
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lucid-extension-sdk - npm Package Compare versions

Comparing version 0.0.100 to 0.0.101

2

package.json
{
"name": "lucid-extension-sdk",
"version": "0.0.100",
"version": "0.0.101",
"description": "Utility classes for writing Lucid Software editor extensions",

@@ -5,0 +5,0 @@ "main": "sdk/index.js",

@@ -65,2 +65,3 @@ import { SerializedFieldTypeDefinition } from './core/data/fieldtypedefinition/fieldtypedefinition';

HookCreateItems = "hci",
HookDeleteItems = "hdi",
HookSelection = "hs",

@@ -107,2 +108,3 @@ HookTextEdit = "hte",

UnhookCreateItems = "uci",
UnhookDeleteItems = "udi",
UnhookSelection = "us",

@@ -291,2 +293,6 @@ UnhookTextEdit = "ute"

};
[CommandName.HookDeleteItems]: {
query: HookDeleteItemsQuery;
result: HookDeleteItemsResult;
};
[CommandName.HookSelection]: {

@@ -456,2 +462,6 @@ query: HookSelectionQuery;

};
[CommandName.UnhookDeleteItems]: {
query: UnhookDeleteItemsQuery;
result: UnhookDeleteItemsResult;
};
[CommandName.UnhookSelection]: {

@@ -831,2 +841,7 @@ query: UnhookSelectionQuery;

export declare type HookCreateItemsResult = undefined;
export declare type HookDeleteItemsQuery = {
/** Name of the action for receiving events. Will be called with an array of strings of all recently deleted item IDs. */
'n': string;
};
export declare type HookDeleteItemsResult = undefined;
export declare type HookSelectionQuery = {

@@ -1100,2 +1115,7 @@ /** Name of the action for receiving events. Will be called with an array of strings of all selected item IDs. */

export declare type UnhookCreateItemsResult = undefined;
export declare type UnhookDeleteItemsQuery = {
/** Name of the action passed to HookDeleteItems */
'n': string;
};
export declare type UnhookDeleteItemsResult = undefined;
export declare type UnhookSelectionQuery = {

@@ -1102,0 +1122,0 @@ /** Name of the action for receiving these events */

@@ -48,2 +48,3 @@ "use strict";

["hci" /* CommandName.HookCreateItems */, 'HookCreateItems'],
["hdi" /* CommandName.HookDeleteItems */, 'HookDeleteItems'],
["hs" /* CommandName.HookSelection */, 'HookSelection'],

@@ -88,2 +89,3 @@ ["hte" /* CommandName.HookTextEdit */, 'HookTextEdit'],

["uci" /* CommandName.UnhookCreateItems */, 'UnhookCreateItems'],
["udi" /* CommandName.UnhookDeleteItems */, 'UnhookDeleteItems'],
["us" /* CommandName.UnhookSelection */, 'UnhookSelection'],

@@ -90,0 +92,0 @@ ["ute" /* CommandName.UnhookTextEdit */, 'UnhookTextEdit'],

@@ -44,3 +44,2 @@ import { EditorClient } from '../editorclient';

* - As part of a generated diagram, e.g. org chart
* - As a result of undo or redo
* - By another user on the same document

@@ -57,2 +56,18 @@ *

readonly cardIntegrationConfigs: MapProxy<string, CardConfigProxy>;
/**
* Watch for new blocks, lines, or groups deleted from this document. The callback will
* be called with items deleted by the current user, but will not be called with items
* deleted
*
* - As part of a generated diagram, e.g. org chart
* - By another user on the same document
*
* @param callback
* @returns A handle that can be passed to `unhookDeleteItems`
*/
hookDeleteItems(callback: (itemIds: string[]) => void): string;
/**
* @param handle Return value from `hookDeleteItems`
*/
unhookDeleteItems(handle: string): void;
}

@@ -64,3 +64,2 @@ "use strict";

* - As part of a generated diagram, e.g. org chart
* - As a result of undo or redo
* - By another user on the same document

@@ -86,4 +85,30 @@ *

}
/**
* Watch for new blocks, lines, or groups deleted from this document. The callback will
* be called with items deleted by the current user, but will not be called with items
* deleted
*
* - As part of a generated diagram, e.g. org chart
* - By another user on the same document
*
* @param callback
* @returns A handle that can be passed to `unhookDeleteItems`
*/
hookDeleteItems(callback) {
const actionName = DocumentProxy.getNextHookName();
this.client.registerAction(actionName, (msg) => {
callback(msg['ids']);
});
this.client.sendCommand("hdi" /* CommandName.HookDeleteItems */, { 'n': actionName });
return actionName;
}
/**
* @param handle Return value from `hookDeleteItems`
*/
unhookDeleteItems(handle) {
this.client.deleteAction(handle);
this.client.sendCommand("udi" /* CommandName.UnhookDeleteItems */, { 'n': handle });
}
}
exports.DocumentProxy = DocumentProxy;
DocumentProxy.nextHookId = 0;
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