From 891c8134598e243fd691bcdfa0646742bfba0209 Mon Sep 17 00:00:00 2001 From: 0xPenryn Date: Mon, 25 Mar 2024 13:44:48 -0600 Subject: [PATCH] chore: clean up unused code (#241) * chore: format & remove unused code * chore: remove unused dependencies * cleanup BaseWidget * fix: remove unnecessary check in standalone --- .vscode/settings.json | 2 +- cspell.json | 21 +++++-- packages/react/package.json | 3 - packages/react/public/images/verified.webp | Bin 8542 -> 0 bytes .../react/src/components/AboutWorldID.tsx | 44 -------------- packages/react/src/components/Button.tsx | 21 ------- packages/react/src/components/Frame.tsx | 35 ----------- .../src/components/IDKitWidget/BaseWidget.tsx | 21 +------ .../IDKitWidget/States/ErrorState.tsx | 5 +- .../States/HostAppVerificationState.tsx | 2 +- .../IDKitWidget/States/PrivacyState.tsx | 40 ------------- .../src/components/Icons/ChevronDownIcon.tsx | 15 ----- .../react/src/components/Icons/InfoIcon.tsx | 14 ----- .../src/components/Icons/QuestionMarkIcon.tsx | 7 --- .../src/components/Icons/WorldIDWordmark.tsx | 56 ------------------ packages/react/src/components/WorldIDIcon.tsx | 32 ---------- packages/react/src/store/idkit.ts | 10 ---- packages/react/src/types/index.ts | 1 - packages/standalone/src/index.tsx | 1 - pnpm-lock.yaml | 29 --------- 20 files changed, 23 insertions(+), 336 deletions(-) delete mode 100644 packages/react/public/images/verified.webp delete mode 100644 packages/react/src/components/AboutWorldID.tsx delete mode 100644 packages/react/src/components/Button.tsx delete mode 100644 packages/react/src/components/Frame.tsx delete mode 100644 packages/react/src/components/IDKitWidget/States/PrivacyState.tsx delete mode 100644 packages/react/src/components/Icons/ChevronDownIcon.tsx delete mode 100644 packages/react/src/components/Icons/InfoIcon.tsx delete mode 100644 packages/react/src/components/Icons/QuestionMarkIcon.tsx delete mode 100644 packages/react/src/components/Icons/WorldIDWordmark.tsx delete mode 100644 packages/react/src/components/WorldIDIcon.tsx diff --git a/.vscode/settings.json b/.vscode/settings.json index 954000cb..db64ead1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,7 +2,7 @@ "editor.formatOnSave": true, "editor.codeActionsOnSave": { - "source.fixAll": true + "source.fixAll": "explicit" }, "[typescriptreact]": { diff --git a/cspell.json b/cspell.json index e1d3c0f1..5ea81418 100644 --- a/cspell.json +++ b/cspell.json @@ -3,10 +3,23 @@ "enabled": true, "language": "en-US", "allowCompoundWords": true, - "dictionaries": ["typescript", "node", "npm", "html"], - "enabledLanguageIds": ["typescript", "typescriptreact", "javascript", "markdown", "yaml", "json"], + "dictionaries": [ + "typescript", + "node", + "npm", + "html" + ], + "enabledLanguageIds": [ + "typescript", + "typescriptreact", + "javascript", + "markdown", + "yaml", + "json" + ], "words": [ "arrayify", + "consts", "dfea", "eafc", "esbuild", @@ -18,11 +31,11 @@ "merkle", "NextJS", "QRCode", + "tsup", "TTFB", "viem", "webp", - "zustand", "worldid", - "consts" + "zustand" ] } diff --git a/packages/react/package.json b/packages/react/package.json index 6e970a8a..5cbec4a6 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -60,15 +60,12 @@ "react-dom": ">18.0.0" }, "dependencies": { - "@fontsource/rubik": "^4.5.11", - "@headlessui/react": "^1.7.4", "@radix-ui/react-dialog": "^1.0.3", "@radix-ui/react-toast": "^1.1.3", "@tailwindcss/forms": "^0.5.3", "@worldcoin/idkit-core": "workspace:*", "copy-to-clipboard": "^3.3.3", "framer-motion": "^7.6.7", - "posthog-js-lite": "2.4.0", "qrcode": "^1.5.1", "react-shadow": "^19.1.0", "zustand": "^4.5" diff --git a/packages/react/public/images/verified.webp b/packages/react/public/images/verified.webp deleted file mode 100644 index ce95ee9e6a8a35abcd90eae4933453279c0a523c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8542 zcmV-kA)($}g0RW(d zy#OQtA4ydABPskY17=j<0Bj~V!f}VnBs(H_?Or4^bJ;#z;|!Pd<{9ggNt#)B=16+* zuEd3dNRkvOkL$p{+IxNxZXDZold(;X&VHi$V*iVxLex1Ug>Bn5{Q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K{8Dn%TPlLf-WrEn&=oEj1+wxCCSFkWQy(ub6vfqoH1`HC=k?G1J%+| zw`;f<9}I7GAyrLqd#x)A_YPe>Ru2*ZNQRn%KV-8D|J(;6;7K3#x8!x-=@Ob~)5^A< zDN!quWMrrzi=YB10;nfd)L2=nC?FYyERB_@NJUu$Sqfwb3aF)P^dw8={NK3WSaePf z`}^nM5%6?=u^&_@{=Z-C*}iyHTVw@Lv5#4;SfO~y_)p=galOi%%kIBBx&FuhF7&*+ zyXf=du3ty}zMq^&eyggLyGk}SYFkaFWUyFKl?J7YO=jreQPG8t>(6Y@W52+^-UX+C Yr~OO(BlrLU5CV^O5*Yv}0zLr*0M$y~_W%F@ diff --git a/packages/react/src/components/AboutWorldID.tsx b/packages/react/src/components/AboutWorldID.tsx deleted file mode 100644 index c563a861..00000000 --- a/packages/react/src/components/AboutWorldID.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import { __ } from '@/lang' -import LockIcon from './Icons/LockIcon' -import { classNames } from '@/lib/utils' -import HumanIcon from './Icons/HumanIcon' -import type { FC, HTMLAttributes, PropsWithChildren } from 'react' - -type Props = { - className?: string -} - -const AboutWorldID: FC = ({ className }) => { - return ( -
-

{__('What is World ID?')}

-
- -

{__('With Worldcoin and World ID sign in seamlessly and prove you are a unique human.')}

-
- -

{__('Maximum privacy. Prevents cross-tracking and can be used fully anonymously.')}

-
-
-
- ) -} - -type FeatureHighlightProps = PropsWithChildren<{ - title: string - icon: FC> -}> - -const FeatureHighlight: FC = ({ icon: Icon, title, children }) => ( -
-
- -
-
-

{title}

-
{children}
-
-
-) - -export default AboutWorldID diff --git a/packages/react/src/components/Button.tsx b/packages/react/src/components/Button.tsx deleted file mode 100644 index 435d224c..00000000 --- a/packages/react/src/components/Button.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { forwardRef } from 'react' -import { classNames } from '@/lib/utils' -import type { ButtonHTMLAttributes, ForwardedRef } from 'react' - -const Button = forwardRef(function Button( - { className, ...props }: ButtonHTMLAttributes, - ref: ForwardedRef -) { - return ( - - diff --git a/packages/react/src/components/IDKitWidget/States/ErrorState.tsx b/packages/react/src/components/IDKitWidget/States/ErrorState.tsx index 5f547cf0..e7ee10b4 100644 --- a/packages/react/src/components/IDKitWidget/States/ErrorState.tsx +++ b/packages/react/src/components/IDKitWidget/States/ErrorState.tsx @@ -50,11 +50,10 @@ const ErrorState = () => {

- {(errorState?.code && ERROR_TITLES[errorState.code]) || ERROR_TITLES[AppErrorCodes.GenericError]} + {(errorState?.code && ERROR_TITLES[errorState.code]) ?? ERROR_TITLES[AppErrorCodes.GenericError]}

- {/* eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing */} - {errorState?.message || ERROR_MESSAGES[errorState?.code ?? AppErrorCodes.GenericError]} + {errorState?.message ?? ERROR_MESSAGES[errorState?.code ?? AppErrorCodes.GenericError]}

diff --git a/packages/react/src/components/IDKitWidget/States/HostAppVerificationState.tsx b/packages/react/src/components/IDKitWidget/States/HostAppVerificationState.tsx index b1868373..e2aaa977 100644 --- a/packages/react/src/components/IDKitWidget/States/HostAppVerificationState.tsx +++ b/packages/react/src/components/IDKitWidget/States/HostAppVerificationState.tsx @@ -13,7 +13,7 @@ const HostAppVerificationState = () => {
-
{__('Transmitting verification to host app. Please wait...')}
+
{__('Transmitting verification to host app. Please wait...')}
) } diff --git a/packages/react/src/components/IDKitWidget/States/PrivacyState.tsx b/packages/react/src/components/IDKitWidget/States/PrivacyState.tsx deleted file mode 100644 index 1b3a5381..00000000 --- a/packages/react/src/components/IDKitWidget/States/PrivacyState.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import { __ } from '@/lang' -import WorldIDIcon from '@/components/WorldIDIcon' -import InfoIcon from '@/components/Icons/InfoIcon' - -const PrivacyState = () => { - return ( -
- -

- {__('Privacy preserving to the core.')} -

-
    -
  • - {__( - 'World ID uses Zero-Knowledge Proofs to make it cryptographically impossible to track persons across applications.' - )} -
  • -
  • {__('Orb biometrics analyzed by the Orb are not stored.')}
  • -
  • - {__('Code and hardware are open source or source available on')}{' '} - - GitHub - - . -
  • -
-
- -

{__('Biometrics are never shared.')}

-
-
- ) -} - -export default PrivacyState diff --git a/packages/react/src/components/Icons/ChevronDownIcon.tsx b/packages/react/src/components/Icons/ChevronDownIcon.tsx deleted file mode 100644 index 9c4614df..00000000 --- a/packages/react/src/components/Icons/ChevronDownIcon.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import type { FC, HTMLAttributes } from 'react' - -const ChevronDownIcon: FC> = props => ( - - - -) - -export default ChevronDownIcon diff --git a/packages/react/src/components/Icons/InfoIcon.tsx b/packages/react/src/components/Icons/InfoIcon.tsx deleted file mode 100644 index 6f50d0be..00000000 --- a/packages/react/src/components/Icons/InfoIcon.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import type { FC, HTMLAttributes } from 'react' - -const InfoIcon: FC> = props => ( - - - -) - -export default InfoIcon diff --git a/packages/react/src/components/Icons/QuestionMarkIcon.tsx b/packages/react/src/components/Icons/QuestionMarkIcon.tsx deleted file mode 100644 index b44a5328..00000000 --- a/packages/react/src/components/Icons/QuestionMarkIcon.tsx +++ /dev/null @@ -1,7 +0,0 @@ -const QuestionMarkIcon = ({ className = '' }: { className?: string }) => ( - - - -) - -export default QuestionMarkIcon diff --git a/packages/react/src/components/Icons/WorldIDWordmark.tsx b/packages/react/src/components/Icons/WorldIDWordmark.tsx deleted file mode 100644 index 70015681..00000000 --- a/packages/react/src/components/Icons/WorldIDWordmark.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import type { HTMLAttributes, FC } from 'react' - -const WorldIDWordmark: FC> = props => ( - - - - - - - - - - - - - - - - - - - -) - -export default WorldIDWordmark diff --git a/packages/react/src/components/WorldIDIcon.tsx b/packages/react/src/components/WorldIDIcon.tsx deleted file mode 100644 index c79113b2..00000000 --- a/packages/react/src/components/WorldIDIcon.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import { classNames } from '@/lib/utils' -import verifiedIcon from '@images/verified.webp' -import type { DetailedHTMLProps, ImgHTMLAttributes } from 'react' - -type Props = Omit< - DetailedHTMLProps, HTMLImageElement> & { border?: string; size?: 'md' | 'sm' }, - 'height' | 'src' | 'width' -> - -const WorldIDIcon = ({ border, size = 'sm', ...props }: Props) => { - const heightWidth = size === 'md' ? 36 : 24 // NOTE: we enforce sizes because something larger than 48px will not render well (image's native resolution is 96px) - return ( - <> - {border && ( - - - - )} - Verified - - ) -} - -export default WorldIDIcon diff --git a/packages/react/src/store/idkit.ts b/packages/react/src/store/idkit.ts index f348d2d9..d6f4d509 100644 --- a/packages/react/src/store/idkit.ts +++ b/packages/react/src/store/idkit.ts @@ -32,10 +32,6 @@ export type IDKitStore = { verifyCallbacks: Record | undefined> | Record successCallbacks: Record | undefined> | Record - computed: { - canGoBack: (stage: IDKITStage) => boolean - } - retryFlow: () => void setStage: (stage: IDKITStage) => void onOpenChange: (open: boolean) => void @@ -69,12 +65,6 @@ const useIDKitStore = createWithEqualityFn()( successCallbacks: {}, stage: IDKITStage.WORLD_ID, - computed: { - canGoBack: (stage: IDKITStage) => { - return stage == IDKITStage.PRIVACY - }, - }, - setStage: stage => set({ stage }), setErrorState: errorState => set({ errorState }), setProcessing: (processing: boolean) => set({ processing }), diff --git a/packages/react/src/types/index.ts b/packages/react/src/types/index.ts index 6685b313..e073332d 100644 --- a/packages/react/src/types/index.ts +++ b/packages/react/src/types/index.ts @@ -1,6 +1,5 @@ export enum IDKITStage { WORLD_ID = 'WORLD_ID', - PRIVACY = 'PRIVACY', SUCCESS = 'SUCCESS', ERROR = 'ERROR', HOST_APP_VERIFICATION = 'HOST_APP_VERIFICATION', diff --git a/packages/standalone/src/index.tsx b/packages/standalone/src/index.tsx index 7b6dafbe..bd1d7ad9 100644 --- a/packages/standalone/src/index.tsx +++ b/packages/standalone/src/index.tsx @@ -11,7 +11,6 @@ let isInitialized = false */ const init = (config: Config): void => { if (isInitialized) throw new Error(__('IDKit is already initialized')) - if (!config.app_id) throw new Error(__('You must provide your App ID & Action')) const startApp = () => { try { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64c246f7..b1e9fae2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -89,12 +89,6 @@ importers: packages/react: dependencies: - '@fontsource/rubik': - specifier: ^4.5.11 - version: 4.5.14 - '@headlessui/react': - specifier: ^1.7.4 - version: 1.7.17(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-dialog': specifier: ^1.0.3 version: 1.0.5(@types/react-dom@18.0.9)(@types/react@18.0.25)(react-dom@18.2.0)(react@18.2.0) @@ -113,9 +107,6 @@ importers: framer-motion: specifier: ^7.6.7 version: 7.10.3(react-dom@18.2.0)(react@18.2.0) - posthog-js-lite: - specifier: 2.4.0 - version: 2.4.0 qrcode: specifier: ^1.5.1 version: 1.5.3 @@ -567,22 +558,6 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@fontsource/rubik@4.5.14: - resolution: {integrity: sha512-EvMK3kkeAgKkk8qAeT4PjpyAYyu72pIlJm+SXJ5vR/xhCX2yj2xoq3+YS38rPmPcCAnrAVONoQ3ezLxVm6jhBA==} - dev: false - - /@headlessui/react@1.7.17(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-4am+tzvkqDSSgiwrsEpGWqgGo9dz8qU5M3znCkC4PgkpY4HcCZzEDEvozltGGGHIKl9jbXbZPSH5TWn4sWJdow==} - engines: {node: '>=10'} - peerDependencies: - react: ^16 || ^17 || ^18 - react-dom: ^16 || ^17 || ^18 - dependencies: - client-only: 0.0.1 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: false - /@humanwhocodes/config-array@0.11.11: resolution: {integrity: sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==} engines: {node: '>=10.10.0'} @@ -4262,10 +4237,6 @@ packages: picocolors: 1.0.0 source-map-js: 1.0.2 - /posthog-js-lite@2.4.0: - resolution: {integrity: sha512-BslsygPtDEeFIIRgW9za0mzTtZGv5iy5HrmpRd5KIUPtd3J24mItFMhf8cU9GguqS+oq/Dugt2K2ijpC8mSlzQ==} - dev: false - /prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'}