diff --git a/components/stream/EndingSoonWidget.tsx b/components/stream/EndingSoonWidget.tsx new file mode 100644 index 0000000..68515d8 --- /dev/null +++ b/components/stream/EndingSoonWidget.tsx @@ -0,0 +1,113 @@ +'use client'; + +import { useMemo, useState } from 'react'; +import Link from 'next/link'; +import { AlertTriangle, ArrowRight } from 'lucide-react'; +import { truncateAddress } from '@/lib/format'; + +export type EndingSoonRole = 'sender' | 'recipient'; + +export interface EndingSoonItem { + id: string; + role: EndingSoonRole; + counterparty: string; + token: string; + endTime: number; +} + +interface EndingSoonWidgetProps { + streams: EndingSoonItem[]; +} + +const DAY_SECONDS = 24 * 60 * 60; + +export function EndingSoonWidget({ streams }: EndingSoonWidgetProps) { + const [view, setView] = useState('sender'); + + const sorted = useMemo( + () => + [...streams] + .filter((stream) => stream.role === view) + .sort((a, b) => a.endTime - b.endTime), + [streams, view], + ); + + const title = view === 'sender' ? 'Need top-ups' : 'Expiring payrolls'; + + if (sorted.length === 0) { + return ( +
+
+
+

Ending soon

+

{title}

+
+
+
+ No streams are ending soon in this view. +
+
+ ); + } + + return ( +
+
+
+

Ending soon

+

{title}

+
+
+ {(['sender', 'recipient'] as const).map((option) => ( + + ))} +
+
+ +
+ {sorted.slice(0, 5).map((stream) => { + const daysLeft = Math.max(0, Math.ceil((stream.endTime - Date.now() / 1000) / DAY_SECONDS)); + + return ( + +
+
+ +
+
+

+ {truncateAddress(stream.counterparty)} +

+

+ {stream.token} • {daysLeft}d left +

+
+
+ + + View + + + + ); + })} +
+
+ ); +} diff --git a/components/ui/Input.tsx b/components/ui/Input.tsx index e21e5ad..7aa8820 100644 --- a/components/ui/Input.tsx +++ b/components/ui/Input.tsx @@ -1,15 +1,48 @@ -import { forwardRef, useId, type InputHTMLAttributes } from 'react'; +import { forwardRef, useRef, type ChangeEvent, type InputHTMLAttributes } from 'react'; +import { X } from 'lucide-react'; interface InputProps extends InputHTMLAttributes { - label?: string; - hint?: string; - error?: string; + label?: string; + hint?: string; + error?: string; + allowClear?: boolean; } export const Input = forwardRef( - ({ label, hint, error, id, className = '', ...props }, ref) => { - const reactId = useId(); - const inputId = id ?? reactId; + ({ label, hint, error, id, className = '', allowClear = false, value, onChange, ...props }, ref) => { + const inputId = id ?? label?.toLowerCase().replace(/\s+/g, '-'); + const inputRef = useRef(null); + + const setRefs = (node: HTMLInputElement | null) => { + if (typeof ref === 'function') ref(node); + else if (ref) ref.current = node; + inputRef.current = node; + }; + + const handleClear = () => { + const el = inputRef.current; + if (!el) return; + + el.value = ''; + + if (onChange) { + const event = { + target: el, + currentTarget: el, + } as ChangeEvent; + onChange(event); + } + + el.focus(); + }; + + const hasValue = + typeof value === 'string' + ? value.length > 0 + : typeof value === 'number' + ? value > 0 + : Boolean(inputRef.current?.value.length); + return (
{label && ( @@ -17,14 +50,28 @@ export const Input = forwardRef( {label} )} - +
+ + {allowClear && hasValue && ( + + )} +
{hint && !error && (

{hint}

)} diff --git a/components/ui/QrCodeModal.tsx b/components/ui/QrCodeModal.tsx index a1f0ab8..62106da 100644 --- a/components/ui/QrCodeModal.tsx +++ b/components/ui/QrCodeModal.tsx @@ -1,87 +1,92 @@ -"use client"; +'use client'; -import { useMemo } from "react"; -import qrcode from "qrcode-generator"; -import { Modal } from "@/components/ui/Modal"; +import { useEffect, useMemo, useRef, useState } from 'react'; +import QRCode from 'qrcode'; +import { Download } from 'lucide-react'; +import { Modal } from '@/components/ui/Modal'; + +export type ErrorCorrectionLevel = 'L' | 'M' | 'Q' | 'H'; interface QrCodeModalProps { - /** The address encoded into the QR code (legacy prop, kept for backwards compat). */ - address?: string; - /** - * Generic payload encoded into the QR code (e.g. a stream claim URL). - * Takes precedence over `address` when both are provided (#688). - */ - value?: string; - /** Modal title. Defaults to "Scan address" for address codes. */ + isOpen: boolean; + value: string; title?: string; onClose: () => void; + errorCorrectionLevel?: ErrorCorrectionLevel; } -/** Cell size in SVG user units — kept small since the itself scales via CSS. */ -const CELL_SIZE = 4; +export function QrCodeModal({ + isOpen, + value, + title = 'QR code', + onClose, + errorCorrectionLevel = 'H', +}: QrCodeModalProps) { + const [qrDataUrl, setQrDataUrl] = useState(''); + const canvasRef = useRef(null); + + const levelLabel = useMemo(() => errorCorrectionLevel, [errorCorrectionLevel]); + + useEffect(() => { + if (!isOpen || !value) return; + + QRCode.toCanvas( + canvasRef.current, + value, + { + errorCorrectionLevel, + margin: 1, + width: 240, + color: { + dark: '#111827', + light: '#ffffff', + }, + }, + (error) => { + if (error) { + console.error('QR code render failed', error); + return; + } + + if (!canvasRef.current) return; -/** - * Renders a scannable QR code for a Stellar address in a modal (#550). - * - * Builds the code with `qrcode-generator` (zero dependencies, ~16 KB) and - * draws it as plain inline SVG rects rather than using the library's - * `createSvgTag` HTML-string output, so it needs no `dangerouslySetInnerHTML` - * and can follow the app's light/dark theme. - */ -export function QrCodeModal({ address, value, title, onClose }: QrCodeModalProps) { - // #688 — generic share payload (stream claim URL) with legacy address fallback. - const payload = value ?? address ?? ""; - const modalTitle = title ?? "Scan address"; - const modules = useMemo(() => { - // Type number 0 = auto-select the smallest size that fits the data. - const qr = qrcode(0, "M"); - qr.addData(payload); - qr.make(); - const count = qr.getModuleCount(); - const cells: boolean[][] = []; - for (let row = 0; row < count; row++) { - const line: boolean[] = []; - for (let col = 0; col < count; col++) { - line.push(qr.isDark(row, col)); - } - cells.push(line); - } - return cells; - }, [payload]); + const dataUrl = canvasRef.current.toDataURL('image/png'); + setQrDataUrl(dataUrl); + }, + ); + }, [isOpen, value, errorCorrectionLevel]); - const size = modules.length * CELL_SIZE; + if (!isOpen) return null; + + const handleDownload = () => { + if (!qrDataUrl) return; + const link = document.createElement('a'); + link.download = 'streamfi-qr.png'; + link.href = qrDataUrl; + link.click(); + }; return ( - -
-
- +
+
+ Correction: {levelLabel} + +
+ +
+
-

- {payload} + +

+ {value}

diff --git a/components/ui/Tooltip.tsx b/components/ui/Tooltip.tsx index 2e63fd6..68f8140 100644 --- a/components/ui/Tooltip.tsx +++ b/components/ui/Tooltip.tsx @@ -12,14 +12,19 @@ export function Tooltip({ content, children, side = 'top' }: TooltipProps) { const [show, setShow] = useState(false); const tooltipId = useId(); + const handleShow = () => setShow(true); + const handleHide = () => setShow(false); + return ( setShow(true)} - onMouseLeave={() => setShow(false)} - onFocus={() => setShow(true)} - onBlur={() => setShow(false)} - aria-describedby={show ? tooltipId : undefined} + onMouseEnter={handleShow} + onMouseLeave={handleHide} + onFocus={handleShow} + onBlur={handleHide} + onTouchStart={handleShow} + onTouchEnd={handleHide} + onTouchCancel={handleHide} > {children} {show && ( diff --git a/components/ui/__tests__/ui-upgrades.test.tsx b/components/ui/__tests__/ui-upgrades.test.tsx new file mode 100644 index 0000000..d485b96 --- /dev/null +++ b/components/ui/__tests__/ui-upgrades.test.tsx @@ -0,0 +1,139 @@ +import { act } from 'react'; +import { createRoot } from 'react-dom/client'; +import { afterEach, describe, expect, it, vi } from 'vitest'; +import React, { useState } from 'react'; +import { Input } from '@/components/ui/Input'; +import { Tooltip } from '@/components/ui/Tooltip'; +import { QrCodeModal } from '@/components/ui/QrCodeModal'; +import { EndingSoonWidget } from '@/components/stream/EndingSoonWidget'; + +describe('UI upgrade behaviors', () => { + let container: HTMLDivElement | undefined; + let root: ReturnType | undefined; + + afterEach(() => { + if (root) act(() => root.unmount()); + container?.remove(); + container = undefined; + root = undefined; + }); + + it('clears the input value when the clear action is used', () => { + function TestInput() { + const [value, setValue] = useState('GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'); + return ( + setValue(event.target.value)} + aria-label="wallet input" + /> + ); + } + + container = document.createElement('div'); + document.body.appendChild(container); + root = createRoot(container); + + act(() => { + root!.render(); + }); + + const clearButton = container.querySelector('button[aria-label="Clear input"]') as HTMLButtonElement | null; + expect(clearButton).not.toBeNull(); + + act(() => { + clearButton!.click(); + }); + + const input = container.querySelector('input[aria-label="wallet input"]') as HTMLInputElement; + expect(input.value).toBe(''); + }); + + it('shows and hides the tooltip on touch interactions', () => { + container = document.createElement('div'); + document.body.appendChild(container); + root = createRoot(container); + + act(() => { + root!.render( + + + , + ); + }); + + const trigger = container.querySelector('button') as HTMLButtonElement; + act(() => { + trigger.dispatchEvent(new Event('touchstart', { bubbles: true })); + }); + expect(container.textContent).toContain('Helpful text'); + + act(() => { + trigger.dispatchEvent(new Event('touchend', { bubbles: true })); + }); + expect(container.querySelector('[role="tooltip"]')).toBeNull(); + }); + + it('uses high error correction and includes a PNG download action in the QR modal', () => { + container = document.createElement('div'); + document.body.appendChild(container); + root = createRoot(container); + + act(() => { + root!.render( + undefined} + />, + ); + }); + + expect(container.querySelector('svg')).not.toBeNull(); + expect(container.textContent).toContain('Download PNG'); + expect(container.textContent).toContain('H'); + }); + + it('toggles between sender and recipient views in the ending-soon widget', () => { + const now = Date.now(); + const streams = [ + { + id: 'sender-stream', + role: 'sender' as const, + counterparty: 'GBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', + token: 'XLM', + endTime: now / 1000 + 60 * 60 * 24 * 2, + }, + { + id: 'recipient-stream', + role: 'recipient' as const, + counterparty: 'GCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC', + token: 'USDC', + endTime: now / 1000 + 60 * 60 * 24 * 5, + }, + ]; + + container = document.createElement('div'); + document.body.appendChild(container); + root = createRoot(container); + + act(() => { + root!.render(); + }); + + const buttons = Array.from(container.querySelectorAll('button')); + const senderToggle = buttons.find((button) => button.textContent?.includes('As Sender')); + const recipientToggle = buttons.find((button) => button.textContent?.includes('As Recipient')); + + expect(senderToggle).not.toBeNull(); + expect(recipientToggle).not.toBeNull(); + + act(() => { + recipientToggle!.dispatchEvent(new MouseEvent('click', { bubbles: true })); + }); + + expect(container.textContent).toContain('As Recipient'); + }); +}); diff --git a/package-lock.json b/package-lock.json index 0538f94..ad62a2b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "lucide-react": "^0.417.0", "next": "15.0.0", "next-themes": "^0.4.6", - "qrcode-generator": "^2.0.4", + "qrcode": "^1.5.4", "react": "^18.3.1", "react-dom": "^18.3.1", "react-hook-form": "^7.52.0", @@ -4189,7 +4189,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -4199,7 +4198,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, "license": "MIT", "dependencies": { "color-convert": "^2.0.1" @@ -4816,6 +4814,15 @@ "node": ">=6" } }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/camelcase-css": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", @@ -4934,6 +4941,17 @@ "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==", "license": "MIT" }, + "node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, "node_modules/color": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", @@ -4952,7 +4970,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "devOptional": true, "license": "MIT", "dependencies": { "color-name": "~1.1.4" @@ -4965,7 +4982,6 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "devOptional": true, "license": "MIT" }, "node_modules/color-string": { @@ -5177,6 +5193,15 @@ } } }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/decimal.js": { "version": "10.6.0", "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz", @@ -5272,6 +5297,12 @@ "dev": true, "license": "Apache-2.0" }, + "node_modules/dijkstrajs": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.3.tgz", + "integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==", + "license": "MIT" + }, "node_modules/dlv": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", @@ -6406,13 +6437,13 @@ "node": ">= 0.4" } }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "license": "MIT", + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "license": "ISC", "engines": { - "node": ">=6.9.0" + "node": "6.* || 8.* || >= 10.*" } }, "node_modules/get-intrinsic": { @@ -7059,7 +7090,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -8280,12 +8310,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/package-json-from-dist": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", - "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", - "dev": true, - "license": "BlueOak-1.0.0" + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } }, "node_modules/parent-module": { "version": "1.0.1", @@ -8317,7 +8349,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -8420,51 +8451,13 @@ "node": ">= 6" } }, - "node_modules/playwright": { - "version": "1.62.1", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.62.1.tgz", - "integrity": "sha512-0M+L3LAD8/nm554LOla9Ayx0j0tmFZ0FBcoQ7F1VuVHpM/XpiC8RcDzBQB8W5+hA8L22THxELzeF+2WcUzvcLg==", - "devOptional": true, - "license": "Apache-2.0", - "dependencies": { - "playwright-core": "1.62.1" - }, - "bin": { - "playwright": "cli.js" - }, - "engines": { - "node": ">=20" - }, - "optionalDependencies": { - "fsevents": "2.3.2" - } - }, - "node_modules/playwright-core": { - "version": "1.62.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.62.1.tgz", - "integrity": "sha512-wPYSwEBJY9GHraISXqyqtx0na0LpO3XEX7jNDhntbex7tzUS7kLnZsOlFruFJB4Hi/rhDMjXGqHewDZ68nYZVw==", - "devOptional": true, - "license": "Apache-2.0", - "bin": { - "playwright-core": "cli.js" - }, - "engines": { - "node": ">=20" - } - }, - "node_modules/playwright/node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, + "node_modules/pngjs": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz", + "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==", "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + "node": ">=10.13.0" } }, "node_modules/possible-typed-array-names": { @@ -8739,11 +8732,22 @@ "node": ">=6" } }, - "node_modules/qrcode-generator": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/qrcode-generator/-/qrcode-generator-2.0.4.tgz", - "integrity": "sha512-mZSiP6RnbHl4xL2Ap5HfkjLnmxfKcPWpWe/c+5XxCuetEenqmNFf1FH/ftXPCtFG5/TDobjsjz6sSNL0Sr8Z9g==", - "license": "MIT" + "node_modules/qrcode": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.4.tgz", + "integrity": "sha512-1ca71Zgiu6ORjHqFBDpnSMTR2ReToX4l1Au1VFLyVeBTFavzQnv5JxMFr3ukHVKpSrSA2MCk0lNJSykjUfz7Zg==", + "license": "MIT", + "dependencies": { + "dijkstrajs": "^1.0.1", + "pngjs": "^5.0.0", + "yargs": "^15.3.1" + }, + "bin": { + "qrcode": "bin/qrcode" + }, + "engines": { + "node": ">=10.13.0" + } }, "node_modules/queue-microtask": { "version": "1.2.3", @@ -8954,6 +8958,15 @@ "bare": ">=1.10.0" } }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/require-from-string": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", @@ -8964,6 +8977,12 @@ "node": ">=0.10.0" } }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "license": "ISC" + }, "node_modules/resolve": { "version": "2.0.0-next.7", "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.7.tgz", @@ -9214,17 +9233,11 @@ "node": ">=10" } }, - "node_modules/sentry": { - "version": "0.44.1", - "resolved": "https://registry.npmjs.org/sentry/-/sentry-0.44.1.tgz", - "integrity": "sha512-LK+RJ2PFsJKM+P0D/zYC+M5gFB1ytfVONU9DVUqJu67YFlwnj3wGJkUzBhCS8R4iUqRdRTAYbFbRKTAe03rW/Q==", - "license": "FSL-1.1-Apache-2.0", - "bin": { - "sentry": "dist/bin.cjs" - }, - "engines": { - "node": ">=20.0" - } + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "license": "ISC" }, "node_modules/set-function-length": { "version": "1.2.2", @@ -9547,29 +9560,9 @@ } }, "node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/string-width-cjs": { - "name": "string-width", "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", @@ -9580,42 +9573,12 @@ "node": ">=8" } }, - "node_modules/string-width-cjs/node_modules/emoji-regex": { + "node_modules/string-width/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, "license": "MIT" }, - "node_modules/string-width/node_modules/ansi-regex": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.3.0.tgz", - "integrity": "sha512-WpDfL7NO6j7tH88IDBNVdUJxDh9nmCteAVW9dsep846XdwF4naCBK+/tGLX3KJgcpgMRXCFlTM2hKGoK9FsdrQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/string-width/node_modules/strip-ansi": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", - "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.2.2" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, "node_modules/string.prototype.includes": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/string.prototype.includes/-/string.prototype.includes-2.0.1.tgz", @@ -9734,7 +9697,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" @@ -10856,6 +10818,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", + "license": "ISC" + }, "node_modules/which-typed-array": { "version": "1.1.22", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.22.tgz", @@ -10905,136 +10873,136 @@ } }, "node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "license": "MIT", "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + "node": ">=8" } }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, + "license": "ISC" + }, + "node_modules/xml-name-validator": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", + "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", + "dev": true, + "license": "Apache-2.0", "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + "node": ">=18" } }, - "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "node_modules/xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "dev": true, "license": "MIT" }, - "node_modules/wrap-ansi-cjs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, + "node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "license": "ISC" + }, + "node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", "license": "MIT", "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" }, "engines": { "node": ">=8" } }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.3.0.tgz", - "integrity": "sha512-WpDfL7NO6j7tH88IDBNVdUJxDh9nmCteAVW9dsep846XdwF4naCBK+/tGLX3KJgcpgMRXCFlTM2hKGoK9FsdrQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" + "node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "license": "ISC", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" + "engines": { + "node": ">=6" } }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", - "dev": true, + "node_modules/yargs/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, "engines": { - "node": ">=12" + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "engines": { + "node": ">=8" } }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", - "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", - "dev": true, + "node_modules/yargs/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "license": "MIT", "dependencies": { - "ansi-regex": "^6.2.2" + "p-try": "^2.0.0" }, "engines": { - "node": ">=12" + "node": ">=6" }, "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/xml-name-validator": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", - "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", - "dev": true, - "license": "Apache-2.0", + "node_modules/yargs/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, "engines": { - "node": ">=18" + "node": ">=8" } }, - "node_modules/xmlchars": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", - "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", - "dev": true, - "license": "MIT" - }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "license": "ISC" - }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 94091ed..08e3ce3 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "lucide-react": "^0.417.0", "next": "15.0.0", "next-themes": "^0.4.6", - "qrcode-generator": "^2.0.4", + "qrcode": "^1.5.4", "react": "^18.3.1", "react-dom": "^18.3.1", "react-hook-form": "^7.52.0",