Comparing version 1.3.3 to 1.3.4
@@ -45,6 +45,2 @@ export interface Global { | ||
readonly blendMode: BlendMode; | ||
/** | ||
* Keep height and width constrained to same ratio | ||
* @default false | ||
*/ | ||
readonly preserveRatio: boolean; | ||
@@ -187,2 +183,3 @@ /** Horizontal and vertical layout constraints for node */ | ||
readonly cornerRadius: number; | ||
readonly rectangleCornerRadii: [number, number, number, number]; | ||
} | ||
@@ -189,0 +186,0 @@ /** A text box */ |
@@ -34,2 +34,2 @@ "use strict"; | ||
})(BlendMode = exports.BlendMode || (exports.BlendMode = {})); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlnbWFUeXBlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9maWdtYVR5cGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBeVVBOzs7R0FHRztBQUNILElBQVksU0E4Qlg7QUE5QkQsV0FBWSxTQUFTO0lBQ25CLHlEQUFjLENBQUEsQ0FBQyxpREFBaUQ7SUFDaEUsNkNBQVEsQ0FBQTtJQUVSLGNBQWM7SUFDZCw2Q0FBUSxDQUFBO0lBQ1IsaURBQVUsQ0FBQTtJQUNWLHVEQUFhLENBQUE7SUFDYixxREFBWSxDQUFBO0lBRVosZUFBZTtJQUNmLCtDQUFTLENBQUE7SUFDVCw2Q0FBUSxDQUFBO0lBQ1IseURBQWMsQ0FBQTtJQUNkLHVEQUFhLENBQUE7SUFFYixnQkFBZ0I7SUFDaEIsZ0RBQVMsQ0FBQTtJQUNULHNEQUFZLENBQUE7SUFDWixzREFBWSxDQUFBO0lBRVosaUJBQWlCO0lBQ2pCLHNEQUFZLENBQUE7SUFDWixvREFBVyxDQUFBO0lBRVgsaUJBQWlCO0lBQ2pCLHdDQUFLLENBQUE7SUFDTCxzREFBWSxDQUFBO0lBQ1osNENBQU8sQ0FBQTtJQUNQLHNEQUFZLENBQUE7QUFDZCxDQUFDLEVBOUJXLFNBQVMsR0FBVCxpQkFBUyxLQUFULGlCQUFTLFFBOEJwQiJ9 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlnbWFUeXBlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9maWdtYVR5cGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBMFVBOzs7R0FHRztBQUNILElBQVksU0E4Qlg7QUE5QkQsV0FBWSxTQUFTO0lBQ25CLHlEQUFjLENBQUEsQ0FBQyxpREFBaUQ7SUFDaEUsNkNBQVEsQ0FBQTtJQUVSLGNBQWM7SUFDZCw2Q0FBUSxDQUFBO0lBQ1IsaURBQVUsQ0FBQTtJQUNWLHVEQUFhLENBQUE7SUFDYixxREFBWSxDQUFBO0lBRVosZUFBZTtJQUNmLCtDQUFTLENBQUE7SUFDVCw2Q0FBUSxDQUFBO0lBQ1IseURBQWMsQ0FBQTtJQUNkLHVEQUFhLENBQUE7SUFFYixnQkFBZ0I7SUFDaEIsZ0RBQVMsQ0FBQTtJQUNULHNEQUFZLENBQUE7SUFDWixzREFBWSxDQUFBO0lBRVosaUJBQWlCO0lBQ2pCLHNEQUFZLENBQUE7SUFDWixvREFBVyxDQUFBO0lBRVgsaUJBQWlCO0lBQ2pCLHdDQUFLLENBQUE7SUFDTCxzREFBWSxDQUFBO0lBQ1osNENBQU8sQ0FBQTtJQUNQLHNEQUFZLENBQUE7QUFDZCxDQUFDLEVBOUJXLFNBQVMsR0FBVCxpQkFBUyxLQUFULGlCQUFTLFFBOEJwQiJ9 |
@@ -45,6 +45,2 @@ export interface Global { | ||
readonly blendMode: BlendMode; | ||
/** | ||
* Keep height and width constrained to same ratio | ||
* @default false | ||
*/ | ||
readonly preserveRatio: boolean; | ||
@@ -187,2 +183,3 @@ /** Horizontal and vertical layout constraints for node */ | ||
readonly cornerRadius: number; | ||
readonly rectangleCornerRadii: [number, number, number, number]; | ||
} | ||
@@ -189,0 +186,0 @@ /** A text box */ |
@@ -32,2 +32,2 @@ /** | ||
})(BlendMode || (BlendMode = {})); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlnbWFUeXBlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9maWdtYVR5cGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlVQTs7O0dBR0c7QUFDSCxNQUFNLENBQU4sSUFBWSxTQThCWDtBQTlCRCxXQUFZLFNBQVM7SUFDbkIseURBQWMsQ0FBQSxDQUFDLGlEQUFpRDtJQUNoRSw2Q0FBUSxDQUFBO0lBRVIsY0FBYztJQUNkLDZDQUFRLENBQUE7SUFDUixpREFBVSxDQUFBO0lBQ1YsdURBQWEsQ0FBQTtJQUNiLHFEQUFZLENBQUE7SUFFWixlQUFlO0lBQ2YsK0NBQVMsQ0FBQTtJQUNULDZDQUFRLENBQUE7SUFDUix5REFBYyxDQUFBO0lBQ2QsdURBQWEsQ0FBQTtJQUViLGdCQUFnQjtJQUNoQixnREFBUyxDQUFBO0lBQ1Qsc0RBQVksQ0FBQTtJQUNaLHNEQUFZLENBQUE7SUFFWixpQkFBaUI7SUFDakIsc0RBQVksQ0FBQTtJQUNaLG9EQUFXLENBQUE7SUFFWCxpQkFBaUI7SUFDakIsd0NBQUssQ0FBQTtJQUNMLHNEQUFZLENBQUE7SUFDWiw0Q0FBTyxDQUFBO0lBQ1Asc0RBQVksQ0FBQTtBQUNkLENBQUMsRUE5QlcsU0FBUyxLQUFULFNBQVMsUUE4QnBCIn0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlnbWFUeXBlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9maWdtYVR5cGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTBVQTs7O0dBR0c7QUFDSCxNQUFNLENBQU4sSUFBWSxTQThCWDtBQTlCRCxXQUFZLFNBQVM7SUFDbkIseURBQWMsQ0FBQSxDQUFDLGlEQUFpRDtJQUNoRSw2Q0FBUSxDQUFBO0lBRVIsY0FBYztJQUNkLDZDQUFRLENBQUE7SUFDUixpREFBVSxDQUFBO0lBQ1YsdURBQWEsQ0FBQTtJQUNiLHFEQUFZLENBQUE7SUFFWixlQUFlO0lBQ2YsK0NBQVMsQ0FBQTtJQUNULDZDQUFRLENBQUE7SUFDUix5REFBYyxDQUFBO0lBQ2QsdURBQWEsQ0FBQTtJQUViLGdCQUFnQjtJQUNoQixnREFBUyxDQUFBO0lBQ1Qsc0RBQVksQ0FBQTtJQUNaLHNEQUFZLENBQUE7SUFFWixpQkFBaUI7SUFDakIsc0RBQVksQ0FBQTtJQUNaLG9EQUFXLENBQUE7SUFFWCxpQkFBaUI7SUFDakIsd0NBQUssQ0FBQTtJQUNMLHNEQUFZLENBQUE7SUFDWiw0Q0FBTyxDQUFBO0lBQ1Asc0RBQVksQ0FBQTtBQUNkLENBQUMsRUE5QlcsU0FBUyxLQUFULFNBQVMsUUE4QnBCIn0= |
@@ -0,7 +1,15 @@ | ||
var __assign = (this && this.__assign) || Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
export * from './figmaTypes'; | ||
import axios from 'axios'; | ||
export const Client = (opts) => { | ||
const headers = opts.accessToken | ||
export var Client = function (opts) { | ||
var headers = opts.accessToken | ||
? { | ||
Authorization: `Bearer ${opts.accessToken}` | ||
Authorization: "Bearer " + opts.accessToken | ||
} | ||
@@ -11,20 +19,21 @@ : { | ||
}; | ||
const client = axios.create({ | ||
baseURL: `https://${opts.apiRoot || 'api.figma.com'}/v1/`, | ||
headers | ||
var client = axios.create({ | ||
baseURL: "https://" + (opts.apiRoot || 'api.figma.com') + "/v1/", | ||
headers: headers | ||
}); | ||
return { | ||
file: fileId => client.get(`files/${fileId}`), | ||
fileImages: (fileId, params) => client.get(`images/${fileId}`, { | ||
params: { | ||
...params, | ||
ids: params.ids.join(',') | ||
} | ||
}), | ||
comments: fileId => client.get(`files/${fileId}/comments`), | ||
postComment: (fileId, params) => client.post(`files/${fileId}/comments`, params), | ||
teamProjects: teamId => client.get(`teams/${teamId}/projects`), | ||
projectFiles: projectId => client.get(`projects/${projectId}/files`) | ||
file: function (fileId) { return client.get("files/" + fileId); }, | ||
fileImages: function (fileId, params) { | ||
return client.get("images/" + fileId, { | ||
params: __assign({}, params, { ids: params.ids.join(',') }) | ||
}); | ||
}, | ||
comments: function (fileId) { return client.get("files/" + fileId + "/comments"); }, | ||
postComment: function (fileId, params) { | ||
return client.post("files/" + fileId + "/comments", params); | ||
}, | ||
teamProjects: function (teamId) { return client.get("teams/" + teamId + "/projects"); }, | ||
projectFiles: function (projectId) { return client.get("projects/" + projectId + "/files"); } | ||
}; | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsY0FBYyxjQUFjLENBQUM7QUFDN0IsT0FBTyxLQUF1QixNQUFNLE9BQU8sQ0FBQztBQXlGNUMsTUFBTSxDQUFDLE1BQU0sTUFBTSxHQUFHLENBQUMsSUFBbUIsRUFBbUIsRUFBRTtJQUM3RCxNQUFNLE9BQU8sR0FBRyxJQUFJLENBQUMsV0FBVztRQUM5QixDQUFDLENBQUM7WUFDRSxhQUFhLEVBQUUsVUFBVSxJQUFJLENBQUMsV0FBVyxFQUFFO1NBQzVDO1FBQ0gsQ0FBQyxDQUFDO1lB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EYsQ0FLRTtRQUVKLFFBQVEsRUFBRSxVQUFBLE1BQU0sSUFBSSxPQUFBLE1BQU0sQ0FBQyxHQUFHLENBQUMsV0FBUyxNQUFNLGNBQVcsQ0FBQyxFQUF0QyxDQUFzQztRQUUxRCxXQUFXLEVBQUUsVUFBQyxNQUFNLEVBQUUsTUFBTTtZQUMxQixPQUFBLE1BQU0sQ0FBQyxJQUFJLENBQUMsV0FBUyxNQUFNLGNBQVcsRUFBRSxNQUFNLENBQUM7UUFBL0MsQ0FBK0M7UUFFakQsWUFBWSxFQUFFLFVBQUEsTUFBTSxJQUFJLE9BQUEsTUFBTSxDQUFDLEdBQUcsQ0FBQyxXQUFTLE1BQU0sY0FBVyxDQUFDLEVBQXRDLENBQXNDO1FBRTlELFlBQVksRUFBRSxVQUFBLFNBQVMsSUFBSSxPQUFBLE1BQU0sQ0FBQyxHQUFHLENBQUMsY0FBWSxTQUFTLFdBQVEsQ0FBQyxFQUF6QyxDQUF5QztLQUNyRSxDQUFDO0FBQ0osQ0FBQyxDQUFDIn0= |
{ | ||
"name": "figma-js", | ||
"version": "1.3.3", | ||
"version": "1.3.4", | ||
"description": "A simple wrapper for the Figma API", | ||
@@ -5,0 +5,0 @@ "main": "build/main/index.js", |
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
1366
63947
15