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

figma-api-stub

Package Overview
Dependencies
Maintainers
1
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.2 to 0.0.3

57

dist/stubs.js

@@ -88,2 +88,9 @@ "use strict";

applyMixins_1.applyMixins(RectangleNodeStub, [BaseNodeMixinStub, LayoutMixinStub]);
var TextNodeStub = /** @class */ (function () {
function TextNodeStub() {
this.type = "TEXT";
}
return TextNodeStub;
}());
applyMixins_1.applyMixins(TextNodeStub, [BaseNodeMixinStub, LayoutMixinStub]);
var DocumentNodeStub = /** @class */ (function () {

@@ -96,2 +103,30 @@ function DocumentNodeStub() {

applyMixins_1.applyMixins(DocumentNodeStub, [BaseNodeMixinStub, ChildrenMixinStub]);
var PageNodeStub = /** @class */ (function () {
function PageNodeStub() {
this.type = "PAGE";
}
return PageNodeStub;
}());
applyMixins_1.applyMixins(PageNodeStub, [BaseNodeMixinStub, ChildrenMixinStub]);
var FrameNodeStub = /** @class */ (function () {
function FrameNodeStub() {
this.type = "FRAME";
}
return FrameNodeStub;
}());
applyMixins_1.applyMixins(FrameNodeStub, [BaseNodeMixinStub, ChildrenMixinStub]);
var GroupNodeStub = /** @class */ (function () {
function GroupNodeStub() {
this.type = "GROUP";
}
return GroupNodeStub;
}());
applyMixins_1.applyMixins(GroupNodeStub, [BaseNodeMixinStub, ChildrenMixinStub]);
var ComponentNodeStub = /** @class */ (function () {
function ComponentNodeStub() {
this.type = "COMPONENT";
}
return ComponentNodeStub;
}());
applyMixins_1.applyMixins(ComponentNodeStub, [BaseNodeMixinStub, ChildrenMixinStub]);
exports.createFigma = function () { return ({

@@ -101,4 +136,24 @@ // @ts-ignore

// @ts-ignore
createRectangle: function () { return new RectangleNodeStub(); }
createPage: function () { return new PageNodeStub(); },
// @ts-ignore
createFrame: function () { return new FrameNodeStub(); },
// @ts-ignore
createComponent: function () { return new ComponentNodeStub(); },
// @ts-ignore
createRectangle: function () { return new RectangleNodeStub(); },
// @ts-ignore
createText: function () { return new TextNodeStub(); },
// @ts-ignore
group: function (nodes, parent, index) {
var group = new GroupNodeStub();
nodes.forEach(function (node) { return group.appendChild(node); });
if (index) {
parent.insertChild(index, group);
}
else {
parent.appendChild(group);
}
return group;
}
}); };
//# sourceMappingURL=stubs.js.map

2

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

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

# Figma API Stub
[![npm version](https://img.shields.io/npm/v/figma-api-stub.svg)](https://www.npmjs.com/package/figma-api-stub)
Stub implementation of [Figma Plugins API](https://www.figma.com/plugin-docs/intro/).

@@ -4,0 +6,0 @@

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