htmltofigma
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -1070,3 +1070,3 @@ 'use strict'; | ||
} | ||
return { "layers": layers }; | ||
return (layers.length !== 0) ? { "layers": layers } : false; | ||
}; | ||
@@ -1105,4 +1105,6 @@ | ||
} | ||
// @ts-ignore | ||
download(layers, `${this.element.tagName.toLowerCase()}`); | ||
if (layers) { | ||
// @ts-ignore | ||
download(layers, `${this.element.tagName.toLowerCase()}`); | ||
} | ||
} | ||
@@ -1109,0 +1111,0 @@ render() { |
{ | ||
"entries": [ | ||
"components/export-to-figma/export-to-figma.js", | ||
"components/with-shadow/with-shadow.js", | ||
"components/no-shadow/no-shadow.js" | ||
"components/no-shadow/no-shadow.js", | ||
"components/with-shadow/with-shadow.js" | ||
], | ||
@@ -7,0 +7,0 @@ "compiler": { |
@@ -33,4 +33,6 @@ import { Host, h } from "@stencil/core"; | ||
} | ||
// @ts-ignore | ||
download(layers, `${this.element.tagName.toLowerCase()}`); | ||
if (layers) { | ||
// @ts-ignore | ||
download(layers, `${this.element.tagName.toLowerCase()}`); | ||
} | ||
} | ||
@@ -37,0 +39,0 @@ render() { |
@@ -439,3 +439,3 @@ import { isHidden } from "./functions/isHidden"; | ||
} | ||
return { "layers": layers }; | ||
return (layers.length !== 0) ? { "layers": layers } : false; | ||
}; |
@@ -1107,3 +1107,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
} | ||
return { "layers": layers }; | ||
return (layers.length !== 0) ? { "layers": layers } : false; | ||
}; | ||
@@ -1146,4 +1146,6 @@ var ExportToFigma = /** @class */ (function () { | ||
layers = _a.sent(); | ||
// @ts-ignore | ||
download(layers, "" + this.element.tagName.toLowerCase()); | ||
if (layers) { | ||
// @ts-ignore | ||
download(layers, "" + this.element.tagName.toLowerCase()); | ||
} | ||
return [2 /*return*/]; | ||
@@ -1150,0 +1152,0 @@ } |
@@ -1066,3 +1066,3 @@ import { r as registerInstance, h, H as Host, g as getElement } from './core-bf2f5ebf.js'; | ||
} | ||
return { "layers": layers }; | ||
return (layers.length !== 0) ? { "layers": layers } : false; | ||
}; | ||
@@ -1101,4 +1101,6 @@ | ||
} | ||
// @ts-ignore | ||
download(layers, `${this.element.tagName.toLowerCase()}`); | ||
if (layers) { | ||
// @ts-ignore | ||
download(layers, `${this.element.tagName.toLowerCase()}`); | ||
} | ||
} | ||
@@ -1105,0 +1107,0 @@ render() { |
@@ -1,1 +0,1 @@ | ||
import{p as e,b as o}from"./p-985bdf78.js";e().then(e=>o([["p-bh7uvomv",[[4,"example-no-shadow"],[1,"example-with-shadow"],[1,"export-to-figma",{nokey:[4],element:[1040]},[[8,"keydown","handleSaveComponents"]]]]]],e)); | ||
import{p as e,b as o}from"./p-985bdf78.js";e().then(e=>o([["p-oc6zekp4",[[4,"example-no-shadow"],[1,"example-with-shadow"],[1,"export-to-figma",{nokey:[4],element:[1040]},[[8,"keydown","handleSaveComponents"]]]]]],e)); |
@@ -1,1 +0,1 @@ | ||
System.register(["./p-d8b78ec4.system.js"],(function(){"use strict";var e,t;return{setters:[function(n){e=n.p;t=n.b}],execute:function(){e().then((function(e){return t([["p-nkkto1bx.system",[[4,"example-no-shadow"],[1,"example-with-shadow"],[1,"export-to-figma",{nokey:[4],element:[1040]},[[8,"keydown","handleSaveComponents"]]]]]],e)}))}}})); | ||
System.register(["./p-d8b78ec4.system.js"],(function(){"use strict";var e,t;return{setters:[function(n){e=n.p;t=n.b}],execute:function(){e().then((function(e){return t([["p-icj28vvp.system",[[4,"example-no-shadow"],[1,"example-with-shadow"],[1,"export-to-figma",{nokey:[4],element:[1040]},[[8,"keydown","handleSaveComponents"]]]]]],e)}))}}})); |
@@ -1,3 +0,3 @@ | ||
export declare const htmlToFigma: (selector?: string | HTMLElement, useFrames?: boolean, time?: boolean) => { | ||
export declare const htmlToFigma: (selector?: string | HTMLElement, useFrames?: boolean, time?: boolean) => false | { | ||
"layers": WithRef<RectangleNode | TextNode | FrameNode | SvgNode>[]; | ||
}; |
{ | ||
"name": "htmltofigma", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "BEHOLD, a way to export shadow dom components into Figma.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
1038599
17527