mevebu 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mevebu/app/mevebu.js +12 -15
- package/mevebu/app/tailwind.css +2742 -0
- package/mevebu/app/tailwind.src.css +1172 -0
- package/mevebu/index.html +2 -3
- package/mevebu/libs/js/core.js +3 -3
- package/mevebu/libs/js/registry.js +1 -1
- package/mevebu/libs/js/tools/coin-flip.js +34 -11
- package/mevebu/libs/js/tools/color-converter.js +1 -1
- package/mevebu/libs/js/tools/hash-generator.js +2 -2
- package/mevebu/libs/js/tools/hmac-generator.js +1 -2
- package/mevebu/libs/js/tools/jwt-generator.js +15 -16
- package/mevebu/libs/js/tools/name-picker.js +1 -1
- package/mevebu/libs/js/tools/password-generator.js +12 -7
- package/mevebu/libs/js/tools/password-strength.js +12 -12
- package/mevebu/libs/js/tools/qr-generator.js +1 -1
- package/mevebu/libs/js/tools/qr-scanner.js +1 -1
- package/mevebu/libs/js/tools/secure-token.js +1 -2
- package/mevebu/libs/js/tools/spin-wheel.js +25 -13
- package/package.json +6 -2
- package/mevebu/app/mevebu.css +0 -1207
- package/mevebu/libs/css/tools.css +0 -237
package/mevebu/app/mevebu.js
CHANGED
|
@@ -32,7 +32,7 @@ function searchButton() {
|
|
|
32
32
|
},
|
|
33
33
|
icon("search"),
|
|
34
34
|
el("span", { class: "mvb-searchbtn__txt" }, "Search"),
|
|
35
|
-
el("kbd", { class: "mvb-
|
|
35
|
+
el("kbd", { class: "mvb-kbd" }, "⌘K")
|
|
36
36
|
);
|
|
37
37
|
return btn;
|
|
38
38
|
}
|
|
@@ -106,9 +106,6 @@ function openHelp(tool) {
|
|
|
106
106
|
el("p", { class: "mvb-help__note" }, tool.tutorial?.intro ?? tool.about),
|
|
107
107
|
el("ol", { class: "mvb-help__steps" },
|
|
108
108
|
...(tool.tutorial?.steps ?? []).map((step) => el("li", {}, step))),
|
|
109
|
-
el("p", { class: "mvb-help__note" },
|
|
110
|
-
"Open the tool: ",
|
|
111
|
-
el("a", { class: "mvb-link", href: toolHref(tool) }, toolHref(tool).slice(1))),
|
|
112
109
|
];
|
|
113
110
|
modal({
|
|
114
111
|
label: `${tool.name} how to use it`,
|
|
@@ -336,14 +333,14 @@ function toolRow(tool, onToggle) {
|
|
|
336
333
|
return el(
|
|
337
334
|
"li",
|
|
338
335
|
{
|
|
339
|
-
class: "mvb-
|
|
336
|
+
class: "mvb-listrow",
|
|
340
337
|
dataset: { href: toolHref(tool), haystack: `${tool.name} ${tool.note} ${tool.keywords ?? ""}`.toLowerCase() },
|
|
341
338
|
},
|
|
342
339
|
el(
|
|
343
340
|
"a",
|
|
344
|
-
{ class: "mvb-
|
|
345
|
-
el("span", { class: "mvb-
|
|
346
|
-
el("span", { class: "mvb-
|
|
341
|
+
{ class: "mvb-listrow__link", href: toolHref(tool) },
|
|
342
|
+
el("span", { class: "mvb-listrow__name" }, tool.name),
|
|
343
|
+
el("span", { class: "mvb-listrow__note" }, tool.note)
|
|
347
344
|
),
|
|
348
345
|
starButton(tool, onToggle)
|
|
349
346
|
);
|
|
@@ -363,25 +360,25 @@ function filterBar(placeholder = "Search tools") {
|
|
|
363
360
|
{ class: "mvb-filter", role: "search", onsubmit: (event) => event.preventDefault() },
|
|
364
361
|
el("span", { class: "mvb-filter__icon" }, icon("search")),
|
|
365
362
|
input,
|
|
366
|
-
el("kbd", { class: "mvb-
|
|
363
|
+
el("kbd", { class: "mvb-kbd" }, "/")
|
|
367
364
|
);
|
|
368
365
|
}
|
|
369
366
|
|
|
370
|
-
/** Live filters `.mvb-card` grids and `.mvb-
|
|
367
|
+
/** Live filters `.mvb-card` grids and `.mvb-listrow` lists already in the tree. */
|
|
371
368
|
function wireFilter(root, meta) {
|
|
372
369
|
const input = root.querySelector(".mvb-filter__in");
|
|
373
370
|
if (!input) return;
|
|
374
371
|
const run = () => {
|
|
375
372
|
const query = input.value.trim().toLowerCase();
|
|
376
373
|
let shown = 0;
|
|
377
|
-
for (const item of root.querySelectorAll(".mvb-card, .mvb-
|
|
374
|
+
for (const item of root.querySelectorAll(".mvb-card, .mvb-listrow")) {
|
|
378
375
|
const hay = item.dataset.haystack ?? item.textContent.toLowerCase();
|
|
379
376
|
const hit = !query || hay.includes(query);
|
|
380
377
|
item.hidden = !hit;
|
|
381
378
|
if (hit) shown++;
|
|
382
379
|
}
|
|
383
380
|
for (const section of root.querySelectorAll("[data-mvb-group]")) {
|
|
384
|
-
const any = [...section.querySelectorAll(".mvb-card, .mvb-
|
|
381
|
+
const any = [...section.querySelectorAll(".mvb-card, .mvb-listrow")].some((item) => !item.hidden);
|
|
385
382
|
section.hidden = !any;
|
|
386
383
|
}
|
|
387
384
|
meta.textContent = query ? `${shown} of ${TOOLS.length} tools` : `${TOOLS.length} tools`;
|
|
@@ -389,7 +386,7 @@ function wireFilter(root, meta) {
|
|
|
389
386
|
input.addEventListener("input", run);
|
|
390
387
|
input.addEventListener("keydown", (event) => {
|
|
391
388
|
if (event.key !== "Enter") return;
|
|
392
|
-
const first = [...root.querySelectorAll(".mvb-card, .mvb-
|
|
389
|
+
const first = [...root.querySelectorAll(".mvb-card, .mvb-listrow")].find((item) => !item.hidden);
|
|
393
390
|
if (first) {
|
|
394
391
|
const href = first.tagName === "A" ? first.getAttribute("href") : first.dataset.href;
|
|
395
392
|
go(href.slice(1));
|
|
@@ -532,7 +529,7 @@ function favoritesPage() {
|
|
|
532
529
|
"Tap the star on any tool to keep it here. ",
|
|
533
530
|
el("a", { class: "mvb-link", href: "#/tools" }, "Browse the tools")),
|
|
534
531
|
el("section", { class: "mvb-section" },
|
|
535
|
-
el("ul", { class: "mvb-
|
|
532
|
+
el("ul", { class: "mvb-list" }, ...saved.map((tool) => toolRow(tool, rerenderFavorites))))
|
|
536
533
|
);
|
|
537
534
|
}
|
|
538
535
|
|
|
@@ -653,7 +650,7 @@ function aboutPage() {
|
|
|
653
650
|
el("p", {}, "Add one object to ", el("code", {}, "mevebu/libs/js/registry.js"), " and one file in ", el("code", {}, "mevebu/libs/js/tools/"), ". The home page, the index, the categories, search and the route all come from that entry.")),
|
|
654
651
|
|
|
655
652
|
block("Built with",
|
|
656
|
-
el("p", {}, "
|
|
653
|
+
el("p", {}, "Hand written HTML, CSS and JavaScript, with Tailwind for the stylesheet. Icons are Lucide and the QR decoder is jsQR."),
|
|
657
654
|
el("p", {}, "Source and issues: ",
|
|
658
655
|
el("a", { class: "mvb-link", href: REPO_URL, target: "_blank", rel: "noopener" }, "github.com/mevebu/mevebu")),
|
|
659
656
|
el("p", {}, copyButton(() => location.href, "Copy this page link")))
|