From e2e36e57fc7af4cd07f33f9bb9407f46a6a77489 Mon Sep 17 00:00:00 2001
From: Niel Thiart
Date: Sat, 31 May 2025 15:22:25 +0200
Subject: [PATCH] feat: enhance QR code generation and input handling
- Updated QRCodeController to use a textarea for input instead of an input field for better user experience.
- Implemented debouncing for input changes to optimize QR code generation.
- Removed unnecessary SVG sanitization functions and adjusted SVG handling in QR code rendering.
- Added default debounce delay option in QRCodeController.
- Improved error handling in the application initialization process with a more structured error message display.
- Removed inline css again.
- Updated Vite configuration to include plugins for single file output and minification, along with CSP policies for security.
---
.stylelintrc.json | 16 +
index.html | 214 +-------
package.json | 12 +-
pnpm-lock.yaml | 687 ++++++++++++++++++++++++--
src/controllers/qr-code-controller.ts | 50 +-
src/core/qr-generator.ts | 1 +
src/main.ts | 20 +-
src/style.css | 200 ++++++++
src/utils/svg-sanitizer.ts | 16 -
vite.config.ts | 9 +
10 files changed, 931 insertions(+), 294 deletions(-)
create mode 100644 .stylelintrc.json
create mode 100644 src/style.css
delete mode 100644 src/utils/svg-sanitizer.ts
diff --git a/.stylelintrc.json b/.stylelintrc.json
new file mode 100644
index 0000000..e21e79a
--- /dev/null
+++ b/.stylelintrc.json
@@ -0,0 +1,16 @@
+{
+ "$schema": "https://json.schemastore.org/stylelintrc.json",
+ "extends": ["stylelint-config-standard"],
+ "rules": {
+ "selector-class-pattern": null,
+ "color-hex-length": "short",
+ "declaration-empty-line-before": null,
+ "rule-empty-line-before": [
+ "always-multi-line",
+ {
+ "except": ["first-nested"],
+ "ignore": ["after-comment"]
+ }
+ ]
+ }
+}
diff --git a/index.html b/index.html
index 731ebbc..f72c0a9 100644
--- a/index.html
+++ b/index.html
@@ -33,215 +33,7 @@
}
}
-
+
@@ -250,7 +42,7 @@
-
+