From 56201260ffb663e9e89c77f1ad85c17756a0e668 Mon Sep 17 00:00:00 2001 From: zouhang Date: Mon, 26 Aug 2024 14:37:22 +0800 Subject: [PATCH] chore: remove react-rough-fiber --- entrypoints/injected/components/Download.tsx | 34 +----------------- package.json | 2 -- pnpm-lock.yaml | 38 -------------------- 3 files changed, 1 insertion(+), 73 deletions(-) diff --git a/entrypoints/injected/components/Download.tsx b/entrypoints/injected/components/Download.tsx index 466d2cb..52b7c27 100644 --- a/entrypoints/injected/components/Download.tsx +++ b/entrypoints/injected/components/Download.tsx @@ -3,7 +3,6 @@ import { useAtomValue } from 'jotai' import { memo, useEffect, useState } from 'react' import { Clipboard } from 'react-feather' import SVG from 'react-inlinesvg' -import { RoughSVG } from 'react-rough-fiber' import { useCopyToClipboard } from 'usehooks-ts' import { arrayBufferToBase64, arrayBufferToImageFile } from '@/entrypoints/utils/file' @@ -22,7 +21,6 @@ function isSVG(node: SceneNode, depth: number = 0): boolean { export const Download = memo((props: { minimized?: boolean }) => { const node = useAtomValue(currentSelection) - const [rough, setRough] = useState(false) const [imageBase64, setImageBase64] = useState('') const [svgString, setSvgString] = useState('') const scale = useAtomValue(exportScale) @@ -118,40 +116,10 @@ export const Download = memo((props: { minimized?: boolean }) => { }} > {svgString ? ( - rough ? ( - - - - ) : ( - - ) + ) : ( )} - - {svgString && ( - setRough(!rough)} /> - )} )} {svgString && ( diff --git a/package.json b/package.json index 6194535..b6d3eab 100644 --- a/package.json +++ b/package.json @@ -50,8 +50,6 @@ "react-dom": "^18.2.0", "react-feather": "^2.0.10", "react-inlinesvg": "^4.1.3", - "react-reconciler": "^0.29.2", - "react-rough-fiber": "^0.0.5", "shiki": "^1.1.7", "tailwind-merge": "^2.2.1", "transform-to-tailwindcss-core": "^0.0.19", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 399d8d8..9c0ba83 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -47,12 +47,6 @@ importers: react-inlinesvg: specifier: ^4.1.3 version: 4.1.3(react@18.2.0) - react-reconciler: - specifier: ^0.29.2 - version: 0.29.2(react@18.2.0) - react-rough-fiber: - specifier: ^0.0.5 - version: 0.0.5(react-dom@18.2.0(react@18.2.0))(react-reconciler@0.29.2(react@18.2.0))(react@18.2.0) shiki: specifier: ^1.1.7 version: 1.1.7 @@ -3194,12 +3188,6 @@ packages: react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} - react-reconciler@0.29.2: - resolution: {integrity: sha512-zZQqIiYgDCTP/f1N/mAR10nJGrPD2ZR+jDSEsKWJHYC7Cm2wodlwbR3upZRdC3cjIjSlTLNVyO7Iu0Yy7t2AYg==} - engines: {node: '>=0.10.0'} - peerDependencies: - react: ^18.3.1 - react-refresh@0.14.0: resolution: {integrity: sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==} engines: {node: '>=0.10.0'} @@ -3224,13 +3212,6 @@ packages: '@types/react': optional: true - react-rough-fiber@0.0.5: - resolution: {integrity: sha512-shWkzQIJu1hJWmbp2va7dr8tmjELb3QqwCB2S/tw22HWet4UBeQmSfM6UmP0vZz7hU56T2BP5BrSzcEKaxkJLw==} - peerDependencies: - react: '>=17.0.0' - react-dom: '>=17.0.0' - react-reconciler: '>=0.26.2' - react-style-singleton@2.2.1: resolution: {integrity: sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g==} engines: {node: '>=10'} @@ -3353,9 +3334,6 @@ packages: scheduler@0.23.0: resolution: {integrity: sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==} - scheduler@0.23.2: - resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==} - scule@1.3.0: resolution: {integrity: sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==} @@ -7156,12 +7134,6 @@ snapshots: react-is@16.13.1: {} - react-reconciler@0.29.2(react@18.2.0): - dependencies: - loose-envify: 1.4.0 - react: 18.2.0 - scheduler: 0.23.2 - react-refresh@0.14.0: {} react-remove-scroll-bar@2.3.5(@types/react@18.2.57)(react@18.2.0): @@ -7183,12 +7155,6 @@ snapshots: optionalDependencies: '@types/react': 18.2.57 - react-rough-fiber@0.0.5(react-dom@18.2.0(react@18.2.0))(react-reconciler@0.29.2(react@18.2.0))(react@18.2.0): - dependencies: - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - react-reconciler: 0.29.2(react@18.2.0) - react-style-singleton@2.2.1(@types/react@18.2.57)(react@18.2.0): dependencies: get-nonce: 1.0.1 @@ -7336,10 +7302,6 @@ snapshots: dependencies: loose-envify: 1.4.0 - scheduler@0.23.2: - dependencies: - loose-envify: 1.4.0 - scule@1.3.0: {} semver-diff@4.0.0: