diff --git a/scripts/vendor-dependencies.mjs b/scripts/vendor-dependencies.mjs index 8995474..f5bae2c 100644 --- a/scripts/vendor-dependencies.mjs +++ b/scripts/vendor-dependencies.mjs @@ -13,8 +13,10 @@ const dependencies = { "htm.min.js": "https://unpkg.com/htm@3.1.1/mini/index.js", "twind.min.js": "https://unpkg.com/@twind/cdn@1.0.7/cdn.global.js", "lucide.min.js": "https://unpkg.com/lucide@0.104.0/dist/umd/lucide.min.js", - "jscolor.min.js": - "https://cdnjs.cloudflare.com/ajax/libs/jscolor/2.5.1/jscolor.min.js", + "coloris.min.js": + "https://cdn.jsdelivr.net/gh/mdbassit/Coloris@latest/dist/coloris.min.js", + "coloris.min.css": + "https://cdn.jsdelivr.net/gh/mdbassit/Coloris@latest/dist/coloris.min.css", }; const output = fileURLToPath(new URL("../src/vendor", import.meta.url)), diff --git a/src/api/events.js b/src/api/events.js index cb8141a..81e21d1 100644 --- a/src/api/events.js +++ b/src/api/events.js @@ -77,7 +77,11 @@ const modifierAliases = [ return true; } } - if (key === "plus") key = "+"; + if (key === "space") key = " "; + if (key === "plus") key = "equal"; + if (key === "minus") key = "-"; + if (key === ",") key = "comma"; + if (key === ".") key = "period"; const keyPressed = [ event.key.toLowerCase(), event.code.toLowerCase(), diff --git a/src/api/interface.js b/src/api/interface.js index 6d1782f..1504f55 100644 --- a/src/api/interface.js +++ b/src/api/interface.js @@ -543,7 +543,7 @@ const h = (type, props, ...children) => { ? document.createElementNS("http://www.w3.org/2000/svg", type) : document.createElement(type); for (const prop in props ?? {}) { - if (htmlAttributes.includes(prop)) { + if (htmlAttributes.includes(prop) || prop.startsWith("data-")) { elem.setAttribute(prop, props[prop]); } else elem[prop] = props[prop]; } diff --git a/src/core/menu/components.mjs b/src/core/menu/components.mjs index 2af0a7b..be6c77e 100644 --- a/src/core/menu/components.mjs +++ b/src/core/menu/components.mjs @@ -6,7 +6,7 @@ import { setState, useState } from "./state.mjs"; -const Sidebar = ({}, ...children) => { +function Sidebar({}, ...children) { const { html } = globalThis.__enhancerApi; return html`