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.34 to 0.0.35

25

dist/stubs.js

@@ -39,7 +39,11 @@ "use strict";

var currentPageChangeSubscribes = new Map();
var lastId = 1;
var allocateId = function (node) {
lastId += 1;
node.id = "1:" + lastId;
var majorId = 0;
var minorIds = {};
var allocateId = function (node, majorVersion, minorVersion) {
var major = majorVersion === undefined ? majorId : majorVersion;
var minor = minorVersion === undefined ? (minorIds[major] || 1) + 1 : minorVersion;
minorIds[major] = minor;
node.id = major + ":" + minor;
};
var getMajorId = function (node) { return Math.max(node.id.split(":")[0], 1); };
var UIAPIStub = /** @class */ (function () {

@@ -342,3 +346,4 @@ function UIAPIStub() {

var result = new PageNodeStub();
allocateId(result);
majorId += 1;
allocateId(result, undefined, 1);
this.root.appendChild(result);

@@ -350,3 +355,3 @@ return result;

var result = new FrameNodeStub();
allocateId(result);
allocateId(result, getMajorId(this.currentPage));
this.currentPage.appendChild(result);

@@ -358,3 +363,3 @@ return result;

var result = new ComponentNodeStub();
allocateId(result);
allocateId(result, getMajorId(this.currentPage));
this.currentPage.appendChild(result);

@@ -366,3 +371,3 @@ return result;

var result = new RectangleNodeStub();
allocateId(result);
allocateId(result, getMajorId(this.currentPage));
this.currentPage.appendChild(result);

@@ -374,3 +379,3 @@ return result;

var result = new TextNodeStub();
allocateId(result);
allocateId(result, getMajorId(this.currentPage));
this.currentPage.appendChild(result);

@@ -385,3 +390,3 @@ return result;

var group = new GroupNodeStub();
allocateId(group);
allocateId(group, getMajorId(this.currentPage));
nodes.forEach(function (node) { return group.appendChild(node); });

@@ -388,0 +393,0 @@ if (index) {

4

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

@@ -12,3 +12,3 @@ "main": "./dist/index.js",

"build:lib": "cross-env BABEL_ENV=production tsc -p tsconfig.json",
"prepublish": "npm run build",
"prepublishOnly": "npm run build",
"test": "jest"

@@ -15,0 +15,0 @@ },

@@ -15,2 +15,7 @@ # Figma API Stub

---
⚠️ Warning! It's not official implementation and it hasn't purpose to fully reproduce Figma behavior and API.
---
## Installation

@@ -17,0 +22,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