diff --git a/element-template.js b/element-template.js
index cd52418..026eabe 100644
--- a/element-template.js
+++ b/element-template.js
@@ -1,4 +1,3 @@
-
const templates = {
start: `
@@ -60,7 +59,6 @@ const templates = {
`
}
-
const elementTemplates = {
text: {
title: {
diff --git a/index.css b/index.css
index 2c4aa54..10aa184 100644
--- a/index.css
+++ b/index.css
@@ -9,5 +9,4 @@
body {
font-family: Inter, sans-serif;
font-weight: 500;
-
-}
\ No newline at end of file
+}
diff --git a/index.js b/index.js
index 36b80cf..558e822 100644
--- a/index.js
+++ b/index.js
@@ -9,7 +9,7 @@ const heightInput = document.getElementById('height')
const selector = '*' // '*:not(head *, style, script, #preview, #preview *)'
// Initialize tenoxui at first render
-document.querySelectorAll(selector).forEach(element => {
+document.querySelectorAll(selector).forEach((element) => {
new __tenoxui_core.MakeTenoxUI({ element, ...tenoxuiConfig }).useDOM()
})
@@ -59,7 +59,7 @@ function loadDesign(event) {
const file = event.target.files[0]
const reader = new FileReader()
- reader.onload = e => {
+ reader.onload = (e) => {
try {
const designData = JSON.parse(e.target.result)
document.getElementById('htmlInput').value = designData.html
@@ -101,10 +101,10 @@ async function getGoogleFontsStyles() {
const fontFormat = fontUrl.endsWith('woff2')
? 'woff2'
: fontUrl.endsWith('woff')
- ? 'woff'
- : fontUrl.endsWith('ttf')
- ? 'truetype'
- : 'opentype'
+ ? 'woff'
+ : fontUrl.endsWith('ttf')
+ ? 'truetype'
+ : 'opentype'
const processedRule = rule.replace(
/url\([^)]+\)/,
`url(data:application/font-${fontFormat};charset=utf-8;base64,${base64Font})`
@@ -139,18 +139,18 @@ async function generateSVG() {
contentDiv.classList.add(`[transform]-[scale(${scale})]`, '[transform-origin]-[top_left]')
}
- temp.querySelectorAll('*').forEach(element => {
+ temp.querySelectorAll('*').forEach((element) => {
new __tenoxui_core.MakeTenoxUI({ element, ...tenoxuiConfig }).useDOM()
})
- const removeAttributesAndElements = element => {
+ const removeAttributesAndElements = (element) => {
if (element.tagName.toLowerCase() !== 'style') {
- Array.from(element.attributes).forEach(attr => {
+ Array.from(element.attributes).forEach((attr) => {
if (attr.name !== 'style') {
element.removeAttribute(attr.name)
}
})
- Array.from(element.children).forEach(child => {
+ Array.from(element.children).forEach((child) => {
if (child.tagName.toLowerCase() !== 'style') {
removeAttributesAndElements(child)
}
diff --git a/live-preview.js b/live-preview.js
index 859dd27..8117187 100644
--- a/live-preview.js
+++ b/live-preview.js
@@ -7,7 +7,7 @@ const tuiInstances = new Map()
function initializeTenoxUI(config) {
tuiInstances.clear()
- document.querySelectorAll('#preview *').forEach(element => {
+ document.querySelectorAll('#preview *').forEach((element) => {
const instance = new __tenoxui_core.MakeTenoxUI({ element, ...config }).useDOM()
tuiInstances.set(element, instance)
})
diff --git a/package.json b/package.json
index ae0274d..5e21efb 100644
--- a/package.json
+++ b/package.json
@@ -29,4 +29,4 @@
"scripts": {
"start": "echo 'hello world'"
}
-}
\ No newline at end of file
+}