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

figma-api-stub

Package Overview
Dependencies
Maintainers
2
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

figma-api-stub - npm Package Compare versions

Comparing version 0.0.55 to 0.0.56

44

dist/stubs.js

@@ -28,2 +28,6 @@ "use strict";

var ChildrenMixinStub = mixins_1.getChildrenMixinStub(config);
// @ts-ignore
global.__html__ = "main.html";
// @ts-ignore
global.__uiFiles__ = {};
applyMixins_1.applyMixins(componentStubs_1.RectangleNodeStub, [

@@ -120,2 +124,23 @@ BaseNodeMixinStub,

function UIAPIStub() {
var _this = this;
this._listeners = new Set();
this.on = function (type, cb) {
if (type === "message" && cb) {
_this._listeners.add(cb);
}
};
this.off = function (type, cb) {
if (type === "message" && cb) {
_this._listeners.delete(cb);
}
};
this.once = function (type, cb) {
if (type === "message" && cb) {
var wrappedCb_1 = function (pluginMessage, props) {
cb(pluginMessage, props);
_this.off("message", wrappedCb_1);
};
_this.on("message", wrappedCb_1);
}
};
}

@@ -158,2 +183,3 @@ UIAPIStub.prototype.postMessage = function (pluginMessage, options) {

function PluginApiStub() {
this.skipInvisibleInstanceChildren = false;
// @ts-ignore

@@ -399,2 +425,6 @@ this.root = new componentStubs_1.DocumentNodeStub();

};
PluginApiStub.prototype.notify = function () {
return { cancel: function () { } };
};
PluginApiStub.prototype.showUI = function () { };
return PluginApiStub;

@@ -418,3 +448,17 @@ }());

}
else {
var call = function () {
// @ts-ignore
figma.ui._listeners.forEach(function (cb) {
cb(message.pluginMessage, { origin: null });
});
};
if (isWithoutTimeout) {
call();
}
else {
setTimeout(call, 0);
}
}
}; };
//# sourceMappingURL=stubs.js.map

2

package.json
{
"name": "figma-api-stub",
"version": "0.0.55",
"version": "0.0.56",
"description": "Figma API stub",

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

Sorry, the diff of this file is not supported yet

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