The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Add QR Code API
Steven Tey628b0bec894f
diff --git a/apps/web/app/api/qr/route.tsx b/apps/web/app/api/qr/route.tsxnew file mode 100644index 0000000000..c4c0049b5a--- /dev/null+++ b/apps/web/app/api/qr/route.tsx@@ -0,0 +1,45 @@+import { NextRequest } from "next/server";+import { ratelimit } from "@/lib/upstash";+import { LOCALHOST_IP } from "@dub/utils";+import { ipAddress } from "@vercel/edge";+import { getToken } from "next-auth/jwt";+import { ImageResponse } from "next/og";+import { QRCodeSVG } from "@/lib/qr/utils";++export const runtime = "edge";++export async function GET(req: NextRequest) {+ // Rate limit if user is not logged in+ const session = await getToken({+ req,+ secret: process.env.NEXTAUTH_SECRET,+ });+ if (!session?.email) {+ const ip = ipAddress(req) || LOCALHOST_IP;+ const { success } = await ratelimit().limit(ip);+ if (!success) {+ return new Response("Don't DDoS me pls 🥺", { status: 429 });+ }+ }++ const url = req.nextUrl.searchParams.get("url") || "https://dub.co";+ const size = parseInt(req.nextUrl.searchParams.get("size") || "600", 10);+ // const logo = req.nextUrl.searchParams.get("logo") || "https://d2vwwcvoksz7ty.cloudfront.net/logo.png";++ return new ImageResponse(+ QRCodeSVG({+ value: url,+ size: size,+ // imageSettings: {+ // src: logo,+ // height: size / 4,+ // width: size / 4,+ // excavate: true,+ // },+ }),+ {+ width: size,+ height: size,+ },+ );+}diff --git a/apps/web/app/api/route.ts b/apps/web/app/api/route.tsindex 5f4ce38eea..b0fdf09a2c 100644--- a/apps/web/app/api/route.ts+++ b/apps/web/app/api/route.ts@@ -733,6 +733,12 @@ export function GET(): NextResponse<OpenAPIV3.Document> {"The full URL of the short link, including the https protocol (e.g. https://dub.sh/try).",readOnly: true,},+ qrCode: {+ type: "string",+ description:+ "The full URL of the QR code for the short link (e.g. https://api.dub.co/qr?url=https://dub.sh/try).",+ readOnly: true,+ },utm_source: {type: "string",description: "The UTM source of the short link.",diff --git a/apps/web/lib/api/links.ts b/apps/web/lib/api/links.tsindex 43af346560..1102c36291 100644--- a/apps/web/lib/api/links.ts+++ b/apps/web/lib/api/links.ts@@ -73,13 +73,17 @@ export async function getLinksForProject({}),});- return links.map((link) => ({- ...link,- shortLink: linkConstructor({+ return links.map((link) => {+ const shortLink = linkConstructor({domain: link.domain,key: link.key,- }),- }));+ });+ return {+ ...link,+ shortLink,+ qrCode: `https://api.dub.co/qr?url=${shortLink}`,+ };+ });}export async function getLinksCount({@@ -373,8 +377,9 @@ export async function processLink({}}- // remove shortLink attribute from payload since it's a polyfill+ // remove shortLink & qrCode attributes from payload since it's a polyfilldelete payload["shortLink"];+ delete payload["qrCode"];return {link: {@@ -395,18 +400,8 @@ export async function processLink({}export async function addLink(link: LinkProps) {- const {- domain,- key,- url,- expiresAt,- password,- title,- description,- image,- proxy,- geo,- } = link;+ const { domain, key, url, expiresAt, title, description, image, proxy, geo } =+ link;const uploadedImage = image && image.startsWith("data:image") ? true : false;const exists = await checkIfKeyExists(domain, key);@@ -448,12 +443,14 @@ export async function addLink(link: LinkProps) {},});}+ const shortLink = linkConstructor({+ domain: response.domain,+ key: response.key,+ });return {...response,- shortLink: linkConstructor({- domain: response.domain,- key: response.key,- }),+ shortLink,+ qrCode: `https://api.dub.co/qr?url=${shortLink}`,};}@@ -519,13 +516,17 @@ export async function bulkCreateLinks(links: LinkProps[]) {await pipeline.exec();- return createdLinks.map((link) => ({- ...link,- shortLink: linkConstructor({- domain: link?.domain,- key: link?.key,- }),- }));+ return createdLinks.map((link) => {+ const shortLink = linkConstructor({+ domain: link.domain,+ key: link.key,+ });+ return {+ ...link,+ shortLink,+ qrCode: `https://api.dub.co/qr?url=${shortLink}`,+ };+ });}export async function editLink({@@ -622,12 +623,15 @@ export async function editLink({});}+ const shortLink = linkConstructor({+ domain: response.domain,+ key: response.key,+ });+return {...response,- shortLink: linkConstructor({- domain: response.domain,- key: response.key,- }),+ shortLink,+ qrCode: `https://api.dub.co/qr?url=${shortLink}`,};}diff --git a/apps/web/lib/qr/constants.ts b/apps/web/lib/qr/constants.tsnew file mode 100644index 0000000000..6e060cb8bc--- /dev/null+++ b/apps/web/lib/qr/constants.ts@@ -0,0 +1,22 @@+import qrcodegen from "./codegen";++export const ERROR_LEVEL_MAP: { [index: string]: qrcodegen.QrCode.Ecc } = {+ L: qrcodegen.QrCode.Ecc.LOW,+ M: qrcodegen.QrCode.Ecc.MEDIUM,+ Q: qrcodegen.QrCode.Ecc.QUARTILE,+ H: qrcodegen.QrCode.Ecc.HIGH,+};++export const DEFAULT_SIZE = 128;+export const DEFAULT_LEVEL = "L";+export const DEFAULT_BGCOLOR = "#FFFFFF";+export const DEFAULT_FGCOLOR = "#000000";+export const DEFAULT_INCLUDEMARGIN = false;++export const MARGIN_SIZE = 4;++// This is *very* rough estimate of max amount of QRCode allowed to be covered.+// It is "wrong" in a lot of ways (area is a terrible way to estimate, it+// really should be number of modules covered), but if for some reason we don't+// get an explicit height or width, I'd rather default to something than throw.+export const DEFAULT_IMG_SCALE = 0.1;diff --git a/apps/web/lib/qr/index.tsx b/apps/web/lib/qr/index.tsxindex 563c49b6ca..a1c42bcaea 100644--- a/apps/web/lib/qr/index.tsx+++ b/apps/web/lib/qr/index.tsx@@ -1,177 +1,29 @@-// @ts-nocheck-/*** @license qrcode.react* Copyright (c) Paul O'Shannessy* SPDX-License-Identifier: ISC*/import { escape } from "html-escaper";-import type { CSSProperties } from "react";import React, { useEffect, useRef, useState } from "react";import qrcodegen from "./codegen";--type Modules = ReturnType<qrcodegen.QrCode["getModules"]>;-type Excavation = { x: number; y: number; w: number; h: number };--const ERROR_LEVEL_MAP: { [index: string]: qrcodegen.QrCode.Ecc } = {- L: qrcodegen.QrCode.Ecc.LOW,- M: qrcodegen.QrCode.Ecc.MEDIUM,- Q: qrcodegen.QrCode.Ecc.QUARTILE,- H: qrcodegen.QrCode.Ecc.HIGH,-};--type ImageSettings = {- src: string;- height: number;- width: number;- excavate: boolean;- x?: number;- y?: number;-};--type QRProps = {- value: string;- size?: number;- // Should be a real enum, but doesn't seem to be compatible with real code.- level?: string;- bgColor?: string;- fgColor?: string;- style?: CSSProperties;- includeMargin?: boolean;- imageSettings?: ImageSettings;-};-type QRPropsCanvas = QRProps & React.CanvasHTMLAttributes<HTMLCanvasElement>;-type QRPropsSVG = QRProps & React.SVGProps<SVGSVGElement>;--const DEFAULT_SIZE = 128;-const DEFAULT_LEVEL = "L";-const DEFAULT_BGCOLOR = "#FFFFFF";-const DEFAULT_FGCOLOR = "#000000";-const DEFAULT_INCLUDEMARGIN = false;--const MARGIN_SIZE = 4;--// This is *very* rough estimate of max amount of QRCode allowed to be covered.-// It is "wrong" in a lot of ways (area is a terrible way to estimate, it-// really should be number of modules covered), but if for some reason we don't-// get an explicit height or width, I'd rather default to something than throw.-const DEFAULT_IMG_SCALE = 0.1;--function generatePath(modules: Modules, margin = 0): string {- const ops: Array<string> = [];- modules.forEach(function (row, y) {- let start: number | null = null;- row.forEach(function (cell, x) {- if (!cell && start !== null) {- // M0 0h7v1H0z injects the space with the move and drops the comma,- // saving a char per operation- ops.push(- `M${start + margin} ${y + margin}h${x - start}v1H${start + margin}z`,- );- start = null;- return;- }-- // end of row, clean up or skip- if (x === row.length - 1) {- if (!cell) {- // We would have closed the op above already so this can only mean- // 2+ light modules in a row.- return;- }- if (start === null) {- // Just a single dark module.- ops.push(`M${x + margin},${y + margin} h1v1H${x + margin}z`);- } else {- // Otherwise finish the current line.- ops.push(- `M${start + margin},${y + margin} h${x + 1 - start}v1H${- start + margin- }z`,- );- }- return;- }-- if (cell && start === null) {- start = x;- }- });- });- return ops.join("");-}--// We could just do this in generatePath, except that we want to support-// non-Path2D canvas, so we need to keep it an explicit step.-function excavateModules(modules: Modules, excavation: Excavation): Modules {- return modules.slice().map((row, y) => {- if (y < excavation.y || y >= excavation.y + excavation.h) {- return row;- }- return row.map((cell, x) => {- if (x < excavation.x || x >= excavation.x + excavation.w) {- return cell;- }- return false;- });- });-}--function getImageSettings(- cells: Modules,- size: number,- includeMargin: boolean,- imageSettings?: ImageSettings,-): null | {- x: number;- y: number;- h: number;- w: number;- excavation: Excavation | null;-} {- if (imageSettings == null) {- return null;- }- const margin = includeMargin ? MARGIN_SIZE : 0;- const numCells = cells.length + margin * 2;- const defaultSize = Math.floor(size * DEFAULT_IMG_SCALE);- const scale = numCells / size;- const w = (imageSettings.width || defaultSize) * scale;- const h = (imageSettings.height || defaultSize) * scale;- const x =- imageSettings.x == null- ? cells.length / 2 - w / 2- : imageSettings.x * scale;- const y =- imageSettings.y == null- ? cells.length / 2 - h / 2- : imageSettings.y * scale;-- let excavation = null;- if (imageSettings.excavate) {- const floorX = Math.floor(x);- const floorY = Math.floor(y);- const ceilW = Math.ceil(w + x - floorX);- const ceilH = Math.ceil(h + y - floorY);- excavation = { x: floorX, y: floorY, w: ceilW, h: ceilH };- }-- return { x, y, h, w, excavation };-}--// For canvas we're going to switch our drawing mode based on whether or not-// the environment supports Path2D. We only need the constructor to be-// supported, but Edge doesn't actually support the path (string) type-// argument. Luckily it also doesn't support the addPath() method. We can-// treat that as the same thing.-const SUPPORTS_PATH2D = (function () {- try {- new Path2D().addPath(new Path2D());- } catch (e) {- return false;- }- return true;-})();+import {+ ERROR_LEVEL_MAP,+ DEFAULT_SIZE,+ DEFAULT_LEVEL,+ DEFAULT_BGCOLOR,+ DEFAULT_FGCOLOR,+ DEFAULT_INCLUDEMARGIN,+ MARGIN_SIZE,+} from "./constants";+import { QRProps, QRPropsCanvas } from "./types";+import {+ excavateModules,+ generatePath,+ getImageSettings,+ SUPPORTS_PATH2D,+} from "./utils";+export * from "./types";+export * from "./utils";export function QRCodeCanvas(props: QRPropsCanvas) {const {@@ -280,7 +132,7 @@ export function QRCodeCanvas(props: QRPropsCanvas) {}, [imgSrc]);const canvasStyle = { height: size, width: size, ...style };- let img = null;+ let img: JSX.Element | null = null;if (imgSrc != null) {img = (<img@@ -309,76 +161,6 @@ export function QRCodeCanvas(props: QRPropsCanvas) {);}-export function QRCodeSVG(props: QRPropsSVG) {- const {- value,- size = DEFAULT_SIZE,- level = DEFAULT_LEVEL,- bgColor = DEFAULT_BGCOLOR,- fgColor = DEFAULT_FGCOLOR,- includeMargin = DEFAULT_INCLUDEMARGIN,- imageSettings,- ...otherProps- } = props;-- let cells = qrcodegen.QrCode.encodeText(- value,- ERROR_LEVEL_MAP[level],- ).getModules();-- const margin = includeMargin ? MARGIN_SIZE : 0;- const numCells = cells.length + margin * 2;- const calculatedImageSettings = getImageSettings(- cells,- size,- includeMargin,- imageSettings,- );-- let image = null;- if (imageSettings != null && calculatedImageSettings != null) {- if (calculatedImageSettings.excavation != null) {- cells = excavateModules(cells, calculatedImageSettings.excavation);- }-- image = (- <image- xlinkHref={imageSettings.src}- height={calculatedImageSettings.h}- width={calculatedImageSettings.w}- x={calculatedImageSettings.x + margin}- y={calculatedImageSettings.y + margin}- preserveAspectRatio="none"- />- );- }-- // Drawing strategy: instead of a rect per module, we're going to create a- // single path for the dark modules and layer that on top of a light rect,- // for a total of 2 DOM nodes. We pay a bit more in string concat but that's- // way faster than DOM ops.- // For level 1, 441 nodes -> 2- // For level 40, 31329 -> 2- const fgPath = generatePath(cells, margin);-- return (- <svg- height={size}- width={size}- viewBox={`0 0 ${numCells} ${numCells}`}- {...otherProps}- >- <path- fill={bgColor}- d={`M0,0 h${numCells}v${numCells}H0z`}- shapeRendering="crispEdges"- />- <path fill={fgColor} d={fgPath} shapeRendering="crispEdges" />- {image}- </svg>- );-}-export function getQRAsSVGDataUri(props: QRProps) {const {value,@@ -460,7 +242,7 @@ export async function getQRAsCanvas(} = props;const canvas = document.createElement("canvas");- const ctx = canvas.getContext("2d");+ const ctx = canvas.getContext("2d") as CanvasRenderingContext2D;let cells = qrcodegen.QrCode.encodeText(value,@@ -478,6 +260,7 @@ export async function getQRAsCanvas(const image = new Image();image.crossOrigin = "anonymous";if (calculatedImageSettings) {+ // @ts-expect-error: imageSettings is not nullawait waitUntilImageLoaded(image, imageSettings.src);if (calculatedImageSettings.excavation != null) {cells = excavateModules(cells, calculatedImageSettings.excavation);diff --git a/apps/web/lib/qr/types.ts b/apps/web/lib/qr/types.tsnew file mode 100644index 0000000000..d730baddf5--- /dev/null+++ b/apps/web/lib/qr/types.ts@@ -0,0 +1,29 @@+import qrcodegen from "./codegen";+import type { CSSProperties } from "react";++export type Modules = ReturnType<qrcodegen.QrCode["getModules"]>;+export type Excavation = { x: number; y: number; w: number; h: number };++export type ImageSettings = {+ src: string;+ height: number;+ width: number;+ excavate: boolean;+ x?: number;+ y?: number;+};++export type QRProps = {+ value: string;+ size?: number;+ // Should be a real enum, but doesn't seem to be compatible with real code.+ level?: string;+ bgColor?: string;+ fgColor?: string;+ style?: CSSProperties;+ includeMargin?: boolean;+ imageSettings?: ImageSettings;+};+export type QRPropsCanvas = QRProps &+ React.CanvasHTMLAttributes<HTMLCanvasElement>;+export type QRPropsSVG = QRProps & React.SVGProps<SVGSVGElement>;diff --git a/apps/web/lib/qr/utils.tsx b/apps/web/lib/qr/utils.tsxnew file mode 100644index 0000000000..c080a2762b--- /dev/null+++ b/apps/web/lib/qr/utils.tsx@@ -0,0 +1,201 @@+import { Excavation, ImageSettings, Modules, QRPropsSVG } from "./types";+import {+ ERROR_LEVEL_MAP,+ DEFAULT_SIZE,+ DEFAULT_LEVEL,+ DEFAULT_BGCOLOR,+ DEFAULT_FGCOLOR,+ DEFAULT_INCLUDEMARGIN,+ MARGIN_SIZE,+ DEFAULT_IMG_SCALE,+} from "./constants";+import qrcodegen from "./codegen";++// We could just do this in generatePath, except that we want to support+// non-Path2D canvas, so we need to keep it an explicit step.+export function excavateModules(+ modules: Modules,+ excavation: Excavation,+): Modules {+ return modules.slice().map((row, y) => {+ if (y < excavation.y || y >= excavation.y + excavation.h) {+ return row;+ }+ return row.map((cell, x) => {+ if (x < excavation.x || x >= excavation.x + excavation.w) {+ return cell;+ }+ return false;+ });+ });+}++export function generatePath(modules: Modules, margin = 0): string {+ const ops: Array<string> = [];+ modules.forEach(function (row, y) {+ let start: number | null = null;+ row.forEach(function (cell, x) {+ if (!cell && start !== null) {+ // M0 0h7v1H0z injects the space with the move and drops the comma,+ // saving a char per operation+ ops.push(+ `M${start + margin} ${y + margin}h${x - start}v1H${start + margin}z`,+ );+ start = null;+ return;+ }++ // end of row, clean up or skip+ if (x === row.length - 1) {+ if (!cell) {+ // We would have closed the op above already so this can only mean+ // 2+ light modules in a row.+ return;+ }+ if (start === null) {+ // Just a single dark module.+ ops.push(`M${x + margin},${y + margin} h1v1H${x + margin}z`);+ } else {+ // Otherwise finish the current line.+ ops.push(+ `M${start + margin},${y + margin} h${x + 1 - start}v1H${+ start + margin+ }z`,+ );+ }+ return;+ }++ if (cell && start === null) {+ start = x;+ }+ });+ });+ return ops.join("");+}++export function getImageSettings(+ cells: Modules,+ size: number,+ includeMargin: boolean,+ imageSettings?: ImageSettings,+): null | {+ x: number;+ y: number;+ h: number;+ w: number;+ excavation: Excavation | null;+} {+ if (imageSettings == null) {+ return null;+ }+ const margin = includeMargin ? MARGIN_SIZE : 0;+ const numCells = cells.length + margin * 2;+ const defaultSize = Math.floor(size * DEFAULT_IMG_SCALE);+ const scale = numCells / size;+ const w = (imageSettings.width || defaultSize) * scale;+ const h = (imageSettings.height || defaultSize) * scale;+ const x =+ imageSettings.x == null+ ? cells.length / 2 - w / 2+ : imageSettings.x * scale;+ const y =+ imageSettings.y == null+ ? cells.length / 2 - h / 2+ : imageSettings.y * scale;++ let excavation: Excavation | null = null;+ if (imageSettings.excavate) {+ const floorX = Math.floor(x);+ const floorY = Math.floor(y);+ const ceilW = Math.ceil(w + x - floorX);+ const ceilH = Math.ceil(h + y - floorY);+ excavation = { x: floorX, y: floorY, w: ceilW, h: ceilH };+ }++ return { x, y, h, w, excavation };+}++export function QRCodeSVG(props: QRPropsSVG) {+ const {+ value,+ size = DEFAULT_SIZE,+ level = DEFAULT_LEVEL,+ bgColor = DEFAULT_BGCOLOR,+ fgColor = DEFAULT_FGCOLOR,+ includeMargin = DEFAULT_INCLUDEMARGIN,+ imageSettings,+ ...otherProps+ } = props;++ let cells = qrcodegen.QrCode.encodeText(+ value,+ ERROR_LEVEL_MAP[level],+ ).getModules();++ const margin = includeMargin ? MARGIN_SIZE : 0;+ const numCells = cells.length + margin * 2;+ const calculatedImageSettings = getImageSettings(+ cells,+ size,+ includeMargin,+ imageSettings,+ );++ let image: null | JSX.Element = null;+ if (imageSettings != null && calculatedImageSettings != null) {+ if (calculatedImageSettings.excavation != null) {+ cells = excavateModules(cells, calculatedImageSettings.excavation);+ }++ image = (+ <image+ href={imageSettings.src}+ height={calculatedImageSettings.h}+ width={calculatedImageSettings.w}+ x={calculatedImageSettings.x + margin}+ y={calculatedImageSettings.y + margin}+ preserveAspectRatio="none"+ />+ );+ }++ // Drawing strategy: instead of a rect per module, we're going to create a+ // single path for the dark modules and layer that on top of a light rect,+ // for a total of 2 DOM nodes. We pay a bit more in string concat but that's+ // way faster than DOM ops.+ // For level 1, 441 nodes -> 2+ // For level 40, 31329 -> 2+ const fgPath = generatePath(cells, margin);++ return (+ <svg+ height={size}+ width={size}+ viewBox={`0 0 ${numCells} ${numCells}`}+ {...otherProps}+ >+ <path+ fill={bgColor}+ d={`M0,0 h${numCells}v${numCells}H0z`}+ shapeRendering="crispEdges"+ />+ <path fill={fgColor} d={fgPath} shapeRendering="crispEdges" />+ {image}+ </svg>+ );+}++// For canvas we're going to switch our drawing mode based on whether or not+// the environment supports Path2D. We only need the constructor to be+// supported, but Edge doesn't actually support the path (string) type+// argument. Luckily it also doesn't support the addPath() method. We can+// treat that as the same thing.+export const SUPPORTS_PATH2D = (function () {+ try {+ new Path2D().addPath(new Path2D());+ } catch (e) {+ return false;+ }+ return true;+})();diff --git a/apps/web/ui/modals/link-qr-modal.tsx b/apps/web/ui/modals/link-qr-modal.tsxindex 1d04a1e90a..7520047067 100644--- a/apps/web/ui/modals/link-qr-modal.tsx+++ b/apps/web/ui/modals/link-qr-modal.tsx@@ -162,9 +162,8 @@ export function QRCodePicker({fgColor={qrData.fgColor}level={qrData.level}includeMargin={false}- // @ts-ignore- imageSettings={- showLogo && {+ {...(qrData.imageSettings && {+ imageSettings: {...qrData.imageSettings,height: qrData.imageSettings? qrData.imageSettings.height / 8@@ -172,8 +171,8 @@ export function QRCodePicker({width: qrData.imageSettings? qrData.imageSettings.width / 8: 0,- }- }+ },+ })}/></div>diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 20373b7fdd..3f24099072 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -7917,7 +7917,7 @@ packages:react-native:optional: truedependencies:- '@babel/runtime': 7.23.2+ '@babel/runtime': 7.23.8'@types/react-reconciler': 0.26.7base64-js: 1.5.1its-fine: 1.1.1([email protected])@@ -9384,7 +9384,7 @@ packages:'@vue/shared': 3.3.4estree-walker: 2.0.2magic-string: 0.30.4- postcss: 8.4.31+ postcss: 8.4.32source-map-js: 1.0.2dev: true@@ -14210,7 +14210,7 @@ packages:resolution: {integrity: sha512-Orbvg18qXHCrSj1KbaeSDVYRy/gkro2PC7Fy2tDSH1c9RB4aH8tuMOIXnKJE+1SXxBtjWmQ5Yirwkth2DyyEZA==}engines: {node: '>=16'}dependencies:- terser: 5.21.0+ terser: 5.27.0dev: false@@ -14342,7 +14342,7 @@ packages:resolution: {integrity: sha512-XKahvB+iuYJSCr3QqCpROli4B4zASAYpkK+j3a0CJmokxCDNbgyI4Fp88uIL6rNaZfN0Mv35S0b99SdFXIfHjg==}engines: {node: '>=16'}dependencies:- '@babel/runtime': 7.23.2+ '@babel/runtime': 7.23.8react-refresh: 0.4.3dev: false@@ -14936,7 +14936,6 @@ packages:resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==}engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}hasBin: true- dev: falseresolution: {integrity: sha512-vWeVtV5Cw68aML/QaZvqN/3QQXc6fBfIieAlu05m7FZW2Dgb+3f0xc0TTxuJW+7u30t7iSDTV/j3kVI0oJqIfQ==}@@ -16117,7 +16116,6 @@ packages:nanoid: 3.3.7picocolors: 1.0.0source-map-js: 1.0.2- dev: falseresolution: {integrity: sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==}@@ -16890,7 +16888,7 @@ packages:peerDependencies:react: ^16.8.0 || ^17.0.0 || ^18.0.0dependencies:- '@babel/runtime': 7.23.2+ '@babel/runtime': 7.23.1react: 18.2.0use-composed-ref: 1.3.0([email protected])use-latest: 1.2.1(@types/[email protected])([email protected])@@ -17126,7 +17124,7 @@ packages:resolution: {integrity: sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==}dependencies:- '@babel/runtime': 7.23.2+ '@babel/runtime': 7.23.8dev: false@@ -18251,17 +18249,6 @@ packages:webpack: 5.90.0(@swc/[email protected])([email protected])dev: false- resolution: {integrity: sha512-WtnFKrxu9kaoXuiZFSGrcAvvBqAdmKx0SFNmVNYdJamMu9yyN3I/QF0FbH4QcqJQ+y1CJnzxGIKH0cSj+FGYRw==}- engines: {node: '>=10'}- hasBin: true- dependencies:- '@jridgewell/source-map': 0.3.5- acorn: 8.10.0- commander: 2.20.3- source-map-support: 0.5.21- dev: false-resolution: {integrity: sha512-bi1HRwVRskAjheeYl291n3JC4GgO/Ty4z1nVs5AAsmonJulGxpSektecnNedrwK9C7vpvVtcX3cw00VSLt7U2A==}engines: {node: '>=10'}