figma-api-stub
Advanced tools
Comparing version 0.0.44 to 0.0.45
@@ -67,2 +67,3 @@ "use strict"; | ||
var fonts_1 = require("./fonts"); | ||
var nanoid_1 = require("nanoid"); | ||
var defaultConfig = { | ||
@@ -90,3 +91,3 @@ simulateErrors: false, | ||
var minorId = 1; | ||
var allocateId = function (node, shouldIncreaseMajor) { | ||
var allocateNodeId = function (node, shouldIncreaseMajor) { | ||
minorId += 1; | ||
@@ -101,2 +102,5 @@ if (!shouldIncreaseMajor) { | ||
}; | ||
var allocateStyleId = function (style) { | ||
style.id = "S:" + nanoid_1.nanoid(40) + ","; | ||
}; | ||
var UIAPIStub = /** @class */ (function () { | ||
@@ -544,3 +548,3 @@ function UIAPIStub() { | ||
var result = new PageNodeStub(); | ||
allocateId(result, true); | ||
allocateNodeId(result, true); | ||
this.root.appendChild(result); | ||
@@ -552,3 +556,3 @@ return result; | ||
var result = new FrameNodeStub(); | ||
allocateId(result); | ||
allocateNodeId(result); | ||
this.currentPage.appendChild(result); | ||
@@ -560,3 +564,3 @@ return result; | ||
var result = new ComponentNodeStub(); | ||
allocateId(result); | ||
allocateNodeId(result); | ||
this.currentPage.appendChild(result); | ||
@@ -568,3 +572,3 @@ return result; | ||
var result = new RectangleNodeStub(); | ||
allocateId(result); | ||
allocateNodeId(result); | ||
this.currentPage.appendChild(result); | ||
@@ -576,3 +580,3 @@ return result; | ||
var result = new TextNodeStub(); | ||
allocateId(result); | ||
allocateNodeId(result); | ||
this.currentPage.appendChild(result); | ||
@@ -602,3 +606,3 @@ return result; | ||
var style = new PaintStyleStub(); | ||
allocateId(style); | ||
allocateStyleId(style); | ||
styles.set(style.id, style); | ||
@@ -611,3 +615,3 @@ paintStyles.push(style); | ||
var style = new EffectStyleStub(); | ||
allocateId(style); | ||
allocateStyleId(style); | ||
styles.set(style.id, style); | ||
@@ -620,3 +624,3 @@ effectStyles.push(style); | ||
var style = new TextStyleStub(); | ||
allocateId(style); | ||
allocateStyleId(style); | ||
styles.set(style.id, style); | ||
@@ -629,3 +633,3 @@ textStyles.push(style); | ||
var style = new GridStyleStub(); | ||
allocateId(style); | ||
allocateStyleId(style); | ||
styles.set(style.id, style); | ||
@@ -641,3 +645,3 @@ gridStyles.push(style); | ||
var group = new GroupNodeStub(); | ||
allocateId(group); | ||
allocateNodeId(group); | ||
nodes.forEach(function (node) { return group.appendChild(node); }); | ||
@@ -644,0 +648,0 @@ if (index) { |
{ | ||
"name": "figma-api-stub", | ||
"version": "0.0.44", | ||
"version": "0.0.45", | ||
"description": "Figma API stub", | ||
@@ -50,4 +50,5 @@ "main": "./dist/index.js", | ||
"clone-deep": "^4.0.1", | ||
"nanoid": "^3.1.20", | ||
"rxjs": "^6.5.3" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53350
894
3
+ Addednanoid@^3.1.20
+ Addednanoid@3.3.7(transitive)