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.30 to 0.0.31

3

dist/stubs.d.ts
declare type TConfig = {
simulateErrors?: boolean;
isWithoutTimeout?: boolean;
};
export declare const createFigma: (config: TConfig) => PluginAPI;
export declare const createParentPostMessage: (figma: PluginAPI) => (message: {
export declare const createParentPostMessage: (figma: PluginAPI, isWithoutTimeout?: boolean) => (message: {
pluginMessage: any;
}, target: string) => void;
export {};

@@ -20,3 +20,4 @@ "use strict";

var defaultConfig = {
simulateErrors: false
simulateErrors: false,
isWithoutTimeout: false
};

@@ -49,6 +50,12 @@ var isInsideInstance = function (node) {

if (global && global.onmessage) {
setTimeout(function () {
if (config.isWithoutTimeout) {
// @ts-ignore
global.onmessage(message);
}, 0);
}
else {
setTimeout(function () {
// @ts-ignore
global.onmessage(message);
}, 0);
}
}

@@ -412,10 +419,16 @@ };

};
exports.createParentPostMessage = function (figma) { return function (message, target) {
exports.createParentPostMessage = function (figma, isWithoutTimeout) { return function (message, target) {
if (figma.ui.onmessage) {
setTimeout(function () {
var call = function () {
// @ts-ignore
figma.ui.onmessage(message.pluginMessage, { origin: null });
}, 0);
};
if (isWithoutTimeout) {
call();
}
else {
setTimeout(call, 0);
}
}
}; };
//# sourceMappingURL=stubs.js.map
{
"name": "figma-api-stub",
"version": "0.0.30",
"version": "0.0.31",
"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