From dfff3724b0c858b431648662fc172e3227d43788 Mon Sep 17 00:00:00 2001 From: Alex Freska Date: Sun, 14 Apr 2024 15:14:34 +0200 Subject: [PATCH] refactor: update library naming scheme --- .changeset/breezy-turkeys-knock.md | 11 ++++++++++ .changeset/many-panthers-wonder.md | 2 +- .changeset/wicked-buses-tap.md | 2 +- README.md | 12 +++++------ apps/explorer/components/Layout/Search.tsx | 2 +- .../components/CmdRoot/WalletCmdGroup.tsx | 2 +- .../components/Config/AnnounceButton.tsx | 2 +- .../Contracts/ContractContextMenu.tsx | 2 +- .../DirectorySelectCmd/DirectoryCreate.tsx | 2 +- .../DirectorySelectCmd/index.tsx | 2 +- .../components/DirectorySelectMenu/index.tsx | 2 +- apps/hostd/components/HostdAuthedLayout.tsx | 2 +- apps/hostd/components/HostdSidenav.tsx | 2 +- .../components/HostdTestnetWarningBanner.tsx | 2 +- apps/hostd/components/Node/Logs.tsx | 2 +- apps/hostd/components/Node/index.tsx | 2 +- apps/hostd/components/OnboardingBar.tsx | 2 +- apps/hostd/components/Profile/index.tsx | 2 +- .../components/Volumes/VolumeContextMenu.tsx | 2 +- apps/hostd/components/Wallet/index.tsx | 2 +- apps/hostd/config/routes.ts | 2 +- apps/hostd/contexts/config/resources.ts | 2 +- apps/hostd/contexts/config/transform.ts | 2 +- apps/hostd/contexts/config/types.ts | 2 +- apps/hostd/contexts/config/useForm.tsx | 2 +- apps/hostd/contexts/config/useOnValid.tsx | 2 +- apps/hostd/contexts/config/useResources.tsx | 2 +- apps/hostd/contexts/contracts/columns.tsx | 2 +- apps/hostd/contexts/contracts/dataset.ts | 2 +- apps/hostd/contexts/contracts/index.tsx | 2 +- apps/hostd/contexts/contracts/types.ts | 2 +- apps/hostd/contexts/dialog.tsx | 2 +- apps/hostd/contexts/metrics/index.tsx | 2 +- apps/hostd/contexts/transactions/index.tsx | 2 +- apps/hostd/contexts/volumes/dataset.ts | 2 +- apps/hostd/contexts/volumes/index.tsx | 2 +- apps/hostd/contexts/volumes/types.ts | 2 +- apps/hostd/dialogs/AlertsDialog.tsx | 2 +- apps/hostd/dialogs/HostdSendSiacoinDialog.tsx | 2 +- apps/hostd/dialogs/VolumeCreateDialog.tsx | 2 +- apps/hostd/dialogs/VolumeDeleteDialog.tsx | 2 +- apps/hostd/dialogs/VolumeResizeDialog.tsx | 2 +- apps/hostd/hooks/useHostOSPathSeparator.ts | 2 +- apps/hostd/hooks/useSiascanUrl.ts | 2 +- apps/hostd/hooks/useSyncStatus.ts | 2 +- .../renterd/components/AccountContextMenu.tsx | 2 +- .../components/CmdRoot/WalletCmdGroup.tsx | 2 +- .../Contracts/ContractContextMenu.tsx | 2 +- .../Contracts/ContractContextMenuFromId.tsx | 2 +- .../Contracts/useContractConfirmDelete.tsx | 2 +- .../FilesHealthColumnContents.tsx | 2 +- .../FileContextMenu/CopyMetadataMenuItem.tsx | 2 +- .../Files/FilesCmd/FilesSearchCmd/index.tsx | 2 +- .../FilesStatsMenuCount.tsx | 2 +- .../FilesStatsMenuHealth.tsx | 2 +- .../FilesStatsMenuSize.tsx | 2 +- .../checks/useAutopilotNotConfigured.tsx | 2 +- .../components/Files/useDirectoryDelete.tsx | 2 +- .../components/Files/useFileDelete.tsx | 2 +- .../components/Hosts/HostContextMenu.tsx | 2 +- .../Hosts/HostContextMenuFromKey.tsx | 2 +- .../components/Hosts/HostMap/Globe.tsx | 2 +- .../HostsAllowBlockDialog/AllowlistForm.tsx | 2 +- .../HostsAllowBlockDialog/BlocklistForm.tsx | 2 +- .../components/Keys/KeyContextMenu.tsx | 2 +- .../components/Keys/KeysCreateDialog.tsx | 2 +- apps/renterd/components/Node/index.tsx | 2 +- apps/renterd/components/OnboardingBar.tsx | 2 +- apps/renterd/components/Profile/index.tsx | 2 +- .../components/RenterdAuthedLayout.tsx | 2 +- .../RenterdTestnetWarningBanner.tsx | 2 +- apps/renterd/components/Wallet/index.tsx | 2 +- apps/renterd/config/routes.ts | 2 +- apps/renterd/contexts/alerts/data.tsx | 2 +- apps/renterd/contexts/alerts/index.tsx | 2 +- apps/renterd/contexts/app/useAutopilot.tsx | 2 +- apps/renterd/contexts/config/resources.ts | 2 +- apps/renterd/contexts/config/transform.ts | 2 +- apps/renterd/contexts/config/useAverages.tsx | 2 +- apps/renterd/contexts/config/useForm.tsx | 2 +- apps/renterd/contexts/config/useOnValid.tsx | 2 +- apps/renterd/contexts/config/useResources.tsx | 4 ++-- .../contexts/config/useSyncContractSet.tsx | 2 +- apps/renterd/contexts/contracts/columns.tsx | 2 +- apps/renterd/contexts/contracts/index.tsx | 4 ++-- apps/renterd/contexts/contracts/types.ts | 2 +- .../contexts/contracts/useContractMetrics.tsx | 2 +- .../contracts/useContractSetMetrics.tsx | 2 +- apps/renterd/contexts/dialog.tsx | 2 +- .../contexts/filesDirectory/dataset.tsx | 2 +- apps/renterd/contexts/filesDirectory/move.tsx | 2 +- apps/renterd/contexts/filesFlat/dataset.tsx | 2 +- .../renterd/contexts/filesManager/dataset.tsx | 2 +- .../contexts/filesManager/downloads.tsx | 2 +- apps/renterd/contexts/filesManager/index.tsx | 2 +- apps/renterd/contexts/filesManager/types.ts | 2 +- .../renterd/contexts/filesManager/uploads.tsx | 2 +- apps/renterd/contexts/hosts/columns.tsx | 2 +- apps/renterd/contexts/hosts/dataset.ts | 2 +- apps/renterd/contexts/hosts/index.tsx | 4 ++-- apps/renterd/contexts/hosts/types.tsx | 2 +- apps/renterd/contexts/transactions/index.tsx | 2 +- apps/renterd/contexts/uploads/index.tsx | 2 +- apps/renterd/dialogs/FileRenameDialog.tsx | 2 +- .../dialogs/FilesBucketCreateDialog.tsx | 2 +- .../dialogs/FilesBucketDeleteDialog.tsx | 2 +- .../dialogs/FilesBucketPolicyDialog.tsx | 2 +- .../dialogs/FilesCreateDirectoryDialog.tsx | 2 +- .../dialogs/RenterdSendSiacoinDialog.tsx | 2 +- apps/renterd/hooks/useAllowlistUpdate.tsx | 2 +- apps/renterd/hooks/useBlocklistUpdate.tsx | 2 +- apps/renterd/hooks/useContractSetSettings.tsx | 2 +- apps/renterd/hooks/useGougingSettings.tsx | 2 +- apps/renterd/hooks/useIsApcsEqDcs.tsx | 2 +- apps/renterd/hooks/useRedundancySettings.tsx | 2 +- .../hooks/useS3AuthenticationSettings.tsx | 2 +- apps/renterd/hooks/useSiascanUrl.tsx | 2 +- apps/renterd/hooks/useSyncStatus.ts | 2 +- .../hooks/useUploadPackingSettings.tsx | 2 +- apps/renterd/lib/health.ts | 2 +- apps/renterd/lib/multipartUpload.ts | 2 +- apps/renterd/mock/mock.tsx | 2 +- apps/walletd-e2e/src/fixtures/createWallet.ts | 4 ++-- .../src/fixtures/navigateToWallet.ts | 2 +- apps/walletd-e2e/src/specs/login.spec.ts | 2 +- .../src/specs/seedGenerateAddresses.spec.ts | 4 ++-- .../src/specs/seedSendSiacoin.spec.ts | 2 +- .../src/specs/walletCreate.spec.ts | 2 +- apps/walletd/components/Node/index.tsx | 2 +- apps/walletd/components/Profile/index.tsx | 2 +- apps/walletd/components/RescanStatus.tsx | 2 +- .../components/Wallet/WalletActionsMenu.tsx | 2 +- .../WalletAddresses/AddressContextMenu.tsx | 2 +- .../WalletdTestnetWarningBanner.tsx | 2 +- apps/walletd/config/routes.ts | 2 +- apps/walletd/contexts/addresses/dataset.tsx | 2 +- apps/walletd/contexts/addresses/index.tsx | 2 +- apps/walletd/contexts/addresses/types.ts | 2 +- apps/walletd/contexts/dialog.tsx | 2 +- apps/walletd/contexts/events/index.tsx | 2 +- apps/walletd/contexts/wallets/columns.tsx | 2 +- apps/walletd/contexts/wallets/index.tsx | 2 +- apps/walletd/contexts/wallets/types.ts | 2 +- apps/walletd/dialogs/AddressRemoveDialog.tsx | 2 +- .../dialogs/AddressUpdateDialog/index.tsx | 2 +- apps/walletd/dialogs/FieldRescan.tsx | 2 +- .../dialogs/WalletAddLedgerDialog/index.tsx | 2 +- .../dialogs/WalletAddNewDialog/index.tsx | 2 +- .../dialogs/WalletAddRecoverDialog/index.tsx | 2 +- .../dialogs/WalletAddWatchDialog/index.tsx | 2 +- .../dialogs/WalletAddressesAddDialog.tsx | 2 +- .../index.tsx | 2 +- .../index.tsx | 2 +- apps/walletd/dialogs/WalletRemoveDialog.tsx | 2 +- .../dialogs/WalletSendLedgerDialog/index.tsx | 2 +- .../WalletSendLedgerDialog/useSign.tsx | 2 +- .../dialogs/WalletSendSeedDialog/index.tsx | 2 +- .../useSignAndBroadcast.tsx | 2 +- .../dialogs/WalletUpdateDialog/index.tsx | 2 +- .../_sharedWalletSend/useBroadcast.tsx | 2 +- .../dialogs/_sharedWalletSend/useCancel.tsx | 2 +- .../dialogs/_sharedWalletSend/useFund.tsx | 2 +- apps/walletd/hooks/useSiascanUrl.ts | 2 +- apps/walletd/hooks/useSyncStatus.ts | 2 +- apps/walletd/hooks/useWalletAddresses.tsx | 2 +- apps/walletd/lib/signLedger.spec.ts | 2 +- apps/walletd/lib/signSeed.spec.ts | 2 +- apps/walletd/lib/testMocks.ts | 2 +- apps/website/components/Map/Globe.tsx | 2 +- libs/design-system/CHANGELOG.md | 18 ++++++++--------- libs/design-system/package.json | 2 +- .../src/components/ValueFiat.tsx | 2 +- .../src/components/ValueScFiat.tsx | 2 +- libs/design-system/src/core/SiacoinField.tsx | 2 +- .../src/hooks/useSiacoinFiat.tsx | 2 +- .../.babelrc | 0 .../.eslintrc.json | 2 +- .../{react-hostd => hostd-react}/CHANGELOG.md | 2 +- libs/{react-hostd => hostd-react}/README.md | 4 ++-- .../jest.config.ts | 4 ++-- .../{react-hostd => hostd-react}/package.json | 2 +- .../{react-hostd => hostd-react}/project.json | 20 +++++++++---------- .../rollup.config.js | 0 libs/{react-hostd => hostd-react}/src/api.ts | 0 .../{react-hostd => hostd-react}/src/index.ts | 0 .../src/siaTypes.ts | 0 .../tsconfig.json | 0 .../tsconfig.lib.json | 0 .../tsconfig.spec.json | 0 libs/react-core/CHANGELOG.md | 2 +- libs/react-sia-central/jest.config.ts | 17 ---------------- libs/{mock-walletd => renterd-react}/.babelrc | 0 .../.eslintrc.json | 2 +- .../CHANGELOG.md | 4 ++-- .../README.md | 4 ++-- .../jest.config.ts | 4 ++-- .../package.json | 2 +- .../project.json | 20 +++++++++---------- .../rollup.config.js | 0 .../src/autopilot.ts | 0 .../src/bus.ts | 0 .../src/index.ts | 0 .../src/siaTypes.ts | 0 .../src/worker.ts | 0 .../tsconfig.json | 0 .../tsconfig.lib.json | 0 .../tsconfig.spec.json | 0 .../.babelrc | 0 .../.eslintrc.json | 2 +- .../README.md | 2 +- .../jest.config.ts | 4 ++-- .../package.json | 2 +- .../project.json | 20 +++++++++---------- .../rollup.config.js | 0 .../src/index.ts | 0 .../src/siaCentralExchangeRates.ts | 0 .../tsconfig.json | 0 .../tsconfig.lib.json | 0 .../tsconfig.spec.json | 0 .../.babelrc | 0 .../.eslintrc.json | 2 +- .../CHANGELOG.md | 2 +- .../README.md | 4 ++-- libs/sia-central-react/jest.config.ts | 17 ++++++++++++++++ .../package.json | 2 +- .../project.json | 20 +++++++++---------- .../rollup.config.js | 0 .../src/index.ts | 0 .../src/useSiaCentralAddress.tsx | 0 .../src/useSiaCentralBlock.tsx | 0 .../src/useSiaCentralBlockLatest.tsx | 0 .../src/useSiaCentralBlocks.tsx | 0 .../src/useSiaCentralContract.tsx | 0 .../src/useSiaCentralExchangeRates.tsx | 0 .../src/useSiaCentralHost.tsx | 0 .../src/useSiaCentralHosts.tsx | 0 .../src/useSiaCentralHostsNetworkAverages.tsx | 0 .../src/useSiaCentralHostsNetworkMetrics.tsx | 0 .../src/useSiaCentralSearch.tsx | 0 .../src/useSiaCentralTransaction.tsx | 0 .../tsconfig.json | 0 .../tsconfig.lib.json | 0 .../tsconfig.spec.json | 0 .../.babelrc | 0 .../.eslintrc.json | 2 +- .../CHANGELOG.md | 4 ++-- libs/{mock-walletd => walletd-mock}/README.md | 2 +- .../jest.config.ts | 4 ++-- .../package.json | 6 +++--- .../project.json | 20 +++++++++---------- .../rollup.config.js | 0 .../src/index.ts | 0 .../src/mocks/consensusNetwork.ts | 0 .../src/mocks/consensusTip.ts | 2 +- .../src/mocks/consensusTipState.ts | 0 .../src/mocks/defaults.ts | 4 ++-- .../src/mocks/peers.ts | 2 +- .../src/mocks/rescan.ts | 2 +- .../src/mocks/txPoolBroadcast.ts | 0 .../src/mocks/wallet.ts | 2 +- .../src/mocks/walletAddresses.ts | 2 +- .../src/mocks/walletBalance.ts | 2 +- .../src/mocks/walletEvents.ts | 2 +- .../src/mocks/walletFundSiacoin.ts | 2 +- .../src/mocks/walletFundSiafund.ts | 2 +- .../src/mocks/walletOutputsSiacoin.ts | 2 +- .../src/mocks/walletOutputsSiafund.ts | 2 +- .../src/mocks/walletRelease.ts | 2 +- .../src/mocks/walletTxPool.ts | 2 +- .../src/mocks/wallets.ts | 2 +- .../src/scenarios/seedWallet.ts | 2 +- .../tsconfig.json | 0 .../tsconfig.lib.json | 0 .../tsconfig.spec.json | 0 .../{react-walletd => walletd-react}/.babelrc | 0 .../.eslintrc.json | 2 +- .../CHANGELOG.md | 2 +- .../README.md | 4 ++-- .../jest.config.ts | 4 ++-- .../package.json | 2 +- .../project.json | 20 +++++++++---------- .../rollup.config.js | 0 .../src/api.ts | 0 .../src/index.ts | 0 .../src/siaTypes.ts | 0 .../tsconfig.json | 0 .../tsconfig.lib.json | 0 .../tsconfig.spec.json | 0 .../replace-src-with-dists-for-publishing.sh | 4 ++-- tsconfig.base.json | 14 ++++++------- 290 files changed, 348 insertions(+), 337 deletions(-) create mode 100644 .changeset/breezy-turkeys-knock.md rename libs/{mock-sia-central => hostd-react}/.babelrc (100%) rename libs/{react-hostd => hostd-react}/.eslintrc.json (84%) rename libs/{react-hostd => hostd-react}/CHANGELOG.md (98%) rename libs/{react-hostd => hostd-react}/README.md (52%) rename libs/{react-hostd => hostd-react}/jest.config.ts (81%) rename libs/{react-hostd => hostd-react}/package.json (87%) rename libs/{react-hostd => hostd-react}/project.json (57%) rename libs/{mock-sia-central => hostd-react}/rollup.config.js (100%) rename libs/{react-hostd => hostd-react}/src/api.ts (100%) rename libs/{react-hostd => hostd-react}/src/index.ts (100%) rename libs/{react-hostd => hostd-react}/src/siaTypes.ts (100%) rename libs/{mock-sia-central => hostd-react}/tsconfig.json (100%) rename libs/{mock-sia-central => hostd-react}/tsconfig.lib.json (100%) rename libs/{mock-sia-central => hostd-react}/tsconfig.spec.json (100%) delete mode 100644 libs/react-sia-central/jest.config.ts rename libs/{mock-walletd => renterd-react}/.babelrc (100%) rename libs/{react-walletd => renterd-react}/.eslintrc.json (84%) rename libs/{react-renterd => renterd-react}/CHANGELOG.md (97%) rename libs/{react-renterd => renterd-react}/README.md (52%) rename libs/{react-renterd => renterd-react}/jest.config.ts (80%) rename libs/{react-renterd => renterd-react}/package.json (88%) rename libs/{react-walletd => renterd-react}/project.json (56%) rename libs/{mock-walletd => renterd-react}/rollup.config.js (100%) rename libs/{react-renterd => renterd-react}/src/autopilot.ts (100%) rename libs/{react-renterd => renterd-react}/src/bus.ts (100%) rename libs/{react-renterd => renterd-react}/src/index.ts (100%) rename libs/{react-renterd => renterd-react}/src/siaTypes.ts (100%) rename libs/{react-renterd => renterd-react}/src/worker.ts (100%) rename libs/{mock-walletd => renterd-react}/tsconfig.json (100%) rename libs/{mock-walletd => renterd-react}/tsconfig.lib.json (100%) rename libs/{mock-walletd => renterd-react}/tsconfig.spec.json (100%) rename libs/{react-hostd => sia-central-mock}/.babelrc (100%) rename libs/{mock-sia-central => sia-central-mock}/.eslintrc.json (84%) rename libs/{mock-sia-central => sia-central-mock}/README.md (73%) rename libs/{mock-sia-central => sia-central-mock}/jest.config.ts (79%) rename libs/{mock-sia-central => sia-central-mock}/package.json (84%) rename libs/{mock-sia-central => sia-central-mock}/project.json (55%) rename libs/{react-hostd => sia-central-mock}/rollup.config.js (100%) rename libs/{mock-sia-central => sia-central-mock}/src/index.ts (100%) rename libs/{mock-sia-central => sia-central-mock}/src/siaCentralExchangeRates.ts (100%) rename libs/{react-hostd => sia-central-mock}/tsconfig.json (100%) rename libs/{react-hostd => sia-central-mock}/tsconfig.lib.json (100%) rename libs/{react-hostd => sia-central-mock}/tsconfig.spec.json (100%) rename libs/{react-renterd => sia-central-react}/.babelrc (100%) rename libs/{react-sia-central => sia-central-react}/.eslintrc.json (84%) rename libs/{react-sia-central => sia-central-react}/CHANGELOG.md (97%) rename libs/{react-sia-central => sia-central-react}/README.md (55%) create mode 100644 libs/sia-central-react/jest.config.ts rename libs/{react-sia-central => sia-central-react}/package.json (85%) rename libs/{react-sia-central => sia-central-react}/project.json (55%) rename libs/{react-renterd => sia-central-react}/rollup.config.js (100%) rename libs/{react-sia-central => sia-central-react}/src/index.ts (100%) rename libs/{react-sia-central => sia-central-react}/src/useSiaCentralAddress.tsx (100%) rename libs/{react-sia-central => sia-central-react}/src/useSiaCentralBlock.tsx (100%) rename libs/{react-sia-central => sia-central-react}/src/useSiaCentralBlockLatest.tsx (100%) rename libs/{react-sia-central => sia-central-react}/src/useSiaCentralBlocks.tsx (100%) rename libs/{react-sia-central => sia-central-react}/src/useSiaCentralContract.tsx (100%) rename libs/{react-sia-central => sia-central-react}/src/useSiaCentralExchangeRates.tsx (100%) rename libs/{react-sia-central => sia-central-react}/src/useSiaCentralHost.tsx (100%) rename libs/{react-sia-central => sia-central-react}/src/useSiaCentralHosts.tsx (100%) rename libs/{react-sia-central => sia-central-react}/src/useSiaCentralHostsNetworkAverages.tsx (100%) rename libs/{react-sia-central => sia-central-react}/src/useSiaCentralHostsNetworkMetrics.tsx (100%) rename libs/{react-sia-central => sia-central-react}/src/useSiaCentralSearch.tsx (100%) rename libs/{react-sia-central => sia-central-react}/src/useSiaCentralTransaction.tsx (100%) rename libs/{react-renterd => sia-central-react}/tsconfig.json (100%) rename libs/{react-renterd => sia-central-react}/tsconfig.lib.json (100%) rename libs/{react-renterd => sia-central-react}/tsconfig.spec.json (100%) rename libs/{react-sia-central => walletd-mock}/.babelrc (100%) rename libs/{mock-walletd => walletd-mock}/.eslintrc.json (84%) rename libs/{mock-walletd => walletd-mock}/CHANGELOG.md (65%) rename libs/{mock-walletd => walletd-mock}/README.md (76%) rename libs/{mock-walletd => walletd-mock}/jest.config.ts (81%) rename libs/{mock-walletd => walletd-mock}/package.json (66%) rename libs/{mock-walletd => walletd-mock}/project.json (57%) rename libs/{react-sia-central => walletd-mock}/rollup.config.js (100%) rename libs/{mock-walletd => walletd-mock}/src/index.ts (100%) rename libs/{mock-walletd => walletd-mock}/src/mocks/consensusNetwork.ts (100%) rename libs/{mock-walletd => walletd-mock}/src/mocks/consensusTip.ts (86%) rename libs/{mock-walletd => walletd-mock}/src/mocks/consensusTipState.ts (100%) rename libs/{mock-walletd => walletd-mock}/src/mocks/defaults.ts (87%) rename libs/{mock-walletd => walletd-mock}/src/mocks/peers.ts (96%) rename libs/{mock-walletd => walletd-mock}/src/mocks/rescan.ts (92%) rename libs/{mock-walletd => walletd-mock}/src/mocks/txPoolBroadcast.ts (100%) rename libs/{mock-walletd => walletd-mock}/src/mocks/wallet.ts (98%) rename libs/{mock-walletd => walletd-mock}/src/mocks/walletAddresses.ts (98%) rename libs/{mock-walletd => walletd-mock}/src/mocks/walletBalance.ts (90%) rename libs/{mock-walletd => walletd-mock}/src/mocks/walletEvents.ts (85%) rename libs/{mock-walletd => walletd-mock}/src/mocks/walletFundSiacoin.ts (96%) rename libs/{mock-walletd => walletd-mock}/src/mocks/walletFundSiafund.ts (91%) rename libs/{mock-walletd => walletd-mock}/src/mocks/walletOutputsSiacoin.ts (97%) rename libs/{mock-walletd => walletd-mock}/src/mocks/walletOutputsSiafund.ts (85%) rename libs/{mock-walletd => walletd-mock}/src/mocks/walletRelease.ts (81%) rename libs/{mock-walletd => walletd-mock}/src/mocks/walletTxPool.ts (85%) rename libs/{mock-walletd => walletd-mock}/src/mocks/wallets.ts (95%) rename libs/{mock-walletd => walletd-mock}/src/scenarios/seedWallet.ts (99%) rename libs/{react-sia-central => walletd-mock}/tsconfig.json (100%) rename libs/{react-sia-central => walletd-mock}/tsconfig.lib.json (100%) rename libs/{react-sia-central => walletd-mock}/tsconfig.spec.json (100%) rename libs/{react-walletd => walletd-react}/.babelrc (100%) rename libs/{react-renterd => walletd-react}/.eslintrc.json (84%) rename libs/{react-walletd => walletd-react}/CHANGELOG.md (98%) rename libs/{react-walletd => walletd-react}/README.md (52%) rename libs/{react-walletd => walletd-react}/jest.config.ts (80%) rename libs/{react-walletd => walletd-react}/package.json (86%) rename libs/{react-renterd => walletd-react}/project.json (56%) rename libs/{react-walletd => walletd-react}/rollup.config.js (100%) rename libs/{react-walletd => walletd-react}/src/api.ts (100%) rename libs/{react-walletd => walletd-react}/src/index.ts (100%) rename libs/{react-walletd => walletd-react}/src/siaTypes.ts (100%) rename libs/{react-walletd => walletd-react}/tsconfig.json (100%) rename libs/{react-walletd => walletd-react}/tsconfig.lib.json (100%) rename libs/{react-walletd => walletd-react}/tsconfig.spec.json (100%) diff --git a/.changeset/breezy-turkeys-knock.md b/.changeset/breezy-turkeys-knock.md new file mode 100644 index 000000000..3d232c8d0 --- /dev/null +++ b/.changeset/breezy-turkeys-knock.md @@ -0,0 +1,11 @@ +--- +'@siafoundation/hostd-react': minor +'@siafoundation/react-core': minor +'@siafoundation/renterd-react': minor +'@siafoundation/sia-central-mock': minor +'@siafoundation/sia-central-react': minor +'@siafoundation/walletd-mock': minor +'@siafoundation/walletd-react': minor +--- + +Libraries now follow new naming scheme. diff --git a/.changeset/many-panthers-wonder.md b/.changeset/many-panthers-wonder.md index 9c6ef8576..abc511d2f 100644 --- a/.changeset/many-panthers-wonder.md +++ b/.changeset/many-panthers-wonder.md @@ -1,5 +1,5 @@ --- -'@siafoundation/react-walletd': minor +'@siafoundation/walletd-react': minor --- Added useNodeState. diff --git a/.changeset/wicked-buses-tap.md b/.changeset/wicked-buses-tap.md index a70eb67cf..7bd28d7f8 100644 --- a/.changeset/wicked-buses-tap.md +++ b/.changeset/wicked-buses-tap.md @@ -1,5 +1,5 @@ --- -'@siafoundation/react-walletd': minor +'@siafoundation/walletd-react': minor --- Added useRescanStart, useRescanStatus. diff --git a/README.md b/README.md index 7d29c49bd..010139af7 100644 --- a/README.md +++ b/README.md @@ -23,11 +23,11 @@ The Sia web libraries provide developers with convenient TypeScript SDKs for usi - [@siafoundation/sdk](libs/sdk) - SDK for interacting directly with the Sia network from browsers and web clients. - [@siafoundation/react-core](libs/react-core) - Core library for building React hooks for interacting with a Sia daemon. -- [@siafoundation/react-renterd](libs/react-renterd) - React hooks for interacting with `renterd`. -- [@siafoundation/react-hostd](libs/react-hostd) - React hooks for interacting with `hostd`. -- [@siafoundation/react-walletd](libs/react-walletd) - React hooks for interacting with `walletd`. +- [@siafoundation/renterd-react](libs/renterd-react) - React hooks for interacting with `renterd`. +- [@siafoundation/hostd-react](libs/hostd-react) - React hooks for interacting with `hostd`. +- [@siafoundation/walletd-react](libs/walletd-react) - React hooks for interacting with `walletd`. - [@siafoundation/design-system](libs/design-system) - React-based design system used across Sia apps and websites. -- [@siafoundation/react-sia-central](libs/react-sia-central) - React hooks for interacting with the Sia Central API. +- [@siafoundation/sia-central-react](libs/sia-central-react) - React hooks for interacting with the Sia Central API. - [@siafoundation/sia-central](libs/sia-central) - Methods and types for interacting with the Sia Central API. - [@siafoundation/data-sources](libs/data-sources) - Data sources used for stats on the website. - [@siafoundation/fonts](libs/fonts) - Next font configuration for use across apps. @@ -53,8 +53,8 @@ The Sia web libraries provide developers with convenient TypeScript SDKs for usi ### Testing - [walletd-e2e](walletd-e2e) - App for testing walletd. -- [@siafoundation/mock-walletd](mock-walletd) - `walletd` data and API mock library for testing. -- [@siafoundation/mock-sia-central](mock-sia-central) - Sia Central data and API mock library for testing. +- [@siafoundation/walletd-mock](walletd-mock) - `walletd` data and API mock library for testing. +- [@siafoundation/sia-central-mock](sia-central-mock) - Sia Central data and API mock library for testing. ## Development diff --git a/apps/explorer/components/Layout/Search.tsx b/apps/explorer/components/Layout/Search.tsx index d35dd5591..c6321c927 100644 --- a/apps/explorer/components/Layout/Search.tsx +++ b/apps/explorer/components/Layout/Search.tsx @@ -11,7 +11,7 @@ import { Search16 } from '@siafoundation/react-icons' import React, { useCallback } from 'react' import { useRouter } from 'next/navigation' import { useForm } from 'react-hook-form' -import { useSiaCentralSearch } from '@siafoundation/react-sia-central' +import { useSiaCentralSearch } from '@siafoundation/sia-central-react' import { routes } from '../../config/routes' import { siaCentralApi } from '../../config' diff --git a/apps/hostd/components/CmdRoot/WalletCmdGroup.tsx b/apps/hostd/components/CmdRoot/WalletCmdGroup.tsx index 0b9b32f60..cdf41cd8b 100644 --- a/apps/hostd/components/CmdRoot/WalletCmdGroup.tsx +++ b/apps/hostd/components/CmdRoot/WalletCmdGroup.tsx @@ -3,7 +3,7 @@ import { routes } from '../../config/routes' import { useRouter } from 'next/router' import { useDialog } from '../../contexts/dialog' import { CommandGroup, CommandItemNav, CommandItemSearch } from './Item' -import { useStateHost } from '@siafoundation/react-hostd' +import { useStateHost } from '@siafoundation/hostd-react' import { Page } from './types' const commandPage = { diff --git a/apps/hostd/components/Config/AnnounceButton.tsx b/apps/hostd/components/Config/AnnounceButton.tsx index 0658aab32..847eaefdc 100644 --- a/apps/hostd/components/Config/AnnounceButton.tsx +++ b/apps/hostd/components/Config/AnnounceButton.tsx @@ -12,7 +12,7 @@ import { useSettingsAnnounce, useStateHost, useTxPoolFee, -} from '@siafoundation/react-hostd' +} from '@siafoundation/hostd-react' import { humanSiacoin } from '@siafoundation/units' import { useCallback } from 'react' import BigNumber from 'bignumber.js' diff --git a/apps/hostd/components/Contracts/ContractContextMenu.tsx b/apps/hostd/components/Contracts/ContractContextMenu.tsx index 473cca2ce..6854c2959 100644 --- a/apps/hostd/components/Contracts/ContractContextMenu.tsx +++ b/apps/hostd/components/Contracts/ContractContextMenu.tsx @@ -15,7 +15,7 @@ import { CaretDown16, DataCheck16 } from '@siafoundation/react-icons' import { ContractStatus, useContractsIntegrityCheck, -} from '@siafoundation/react-hostd' +} from '@siafoundation/hostd-react' import { useDialog } from '../../contexts/dialog' import { useCallback } from 'react' diff --git a/apps/hostd/components/DirectorySelectMenu/DirectorySelectCmd/DirectoryCreate.tsx b/apps/hostd/components/DirectorySelectMenu/DirectorySelectCmd/DirectoryCreate.tsx index 7dd651fdb..3b2a8ac08 100644 --- a/apps/hostd/components/DirectorySelectMenu/DirectorySelectCmd/DirectoryCreate.tsx +++ b/apps/hostd/components/DirectorySelectMenu/DirectorySelectCmd/DirectoryCreate.tsx @@ -4,7 +4,7 @@ import { triggerErrorToast, } from '@siafoundation/design-system' import { FolderAdd16 } from '@siafoundation/react-icons' -import { useSystemDirectoryCreate } from '@siafoundation/react-hostd' +import { useSystemDirectoryCreate } from '@siafoundation/hostd-react' import { useHostOSPathSeparator } from '../../../hooks/useHostOSPathSeparator' import { getChildDirectoryPath } from '../../../lib/system' import { useCallback, useState } from 'react' diff --git a/apps/hostd/components/DirectorySelectMenu/DirectorySelectCmd/index.tsx b/apps/hostd/components/DirectorySelectMenu/DirectorySelectCmd/index.tsx index 5ecc02bf9..4aa33257a 100644 --- a/apps/hostd/components/DirectorySelectMenu/DirectorySelectCmd/index.tsx +++ b/apps/hostd/components/DirectorySelectMenu/DirectorySelectCmd/index.tsx @@ -3,7 +3,7 @@ import { Page } from '../../CmdRoot/types' import { Text } from '@siafoundation/design-system' import { FolderIcon } from '@siafoundation/react-icons' import { DirectorySelectEmpty } from './DirectorySelectEmpty' -import { SystemDirResponse } from '@siafoundation/react-hostd' +import { SystemDirResponse } from '@siafoundation/hostd-react' import { useHostOSPathSeparator } from '../../../hooks/useHostOSPathSeparator' import { getChildDirectoryPath } from '../../../lib/system' import { DirectorySelectError } from './DirectorySelectError' diff --git a/apps/hostd/components/DirectorySelectMenu/index.tsx b/apps/hostd/components/DirectorySelectMenu/index.tsx index 8d91e7d35..74316a22e 100644 --- a/apps/hostd/components/DirectorySelectMenu/index.tsx +++ b/apps/hostd/components/DirectorySelectMenu/index.tsx @@ -1,6 +1,6 @@ import { Panel, ScrollArea } from '@siafoundation/design-system' import { SWRError } from '@siafoundation/react-core' -import { SystemDirResponse } from '@siafoundation/react-hostd' +import { SystemDirResponse } from '@siafoundation/hostd-react' import { Command } from 'cmdk' import { SWRResponse } from 'swr' import { diff --git a/apps/hostd/components/HostdAuthedLayout.tsx b/apps/hostd/components/HostdAuthedLayout.tsx index fc676ea84..db8b1679b 100644 --- a/apps/hostd/components/HostdAuthedLayout.tsx +++ b/apps/hostd/components/HostdAuthedLayout.tsx @@ -1,5 +1,5 @@ import { AppAuthedLayout } from '@siafoundation/design-system' -import { useWallet } from '@siafoundation/react-hostd' +import { useWallet } from '@siafoundation/hostd-react' import BigNumber from 'bignumber.js' import { connectivityRoute } from '../config/routes' import { useSyncStatus } from '../hooks/useSyncStatus' diff --git a/apps/hostd/components/HostdSidenav.tsx b/apps/hostd/components/HostdSidenav.tsx index 423741c06..0922091d8 100644 --- a/apps/hostd/components/HostdSidenav.tsx +++ b/apps/hostd/components/HostdSidenav.tsx @@ -6,7 +6,7 @@ import { HardDriveIcon, BellIcon, } from '@siafoundation/react-icons' -import { useAlerts } from '@siafoundation/react-hostd' +import { useAlerts } from '@siafoundation/hostd-react' import { cx } from 'class-variance-authority' import { routes } from '../config/routes' import { useDialog } from '../contexts/dialog' diff --git a/apps/hostd/components/HostdTestnetWarningBanner.tsx b/apps/hostd/components/HostdTestnetWarningBanner.tsx index 7c0b6d54c..4ea2ae6ea 100644 --- a/apps/hostd/components/HostdTestnetWarningBanner.tsx +++ b/apps/hostd/components/HostdTestnetWarningBanner.tsx @@ -1,5 +1,5 @@ import { TestnetWarningBanner } from '@siafoundation/design-system' -import { useStateHost } from '@siafoundation/react-hostd' +import { useStateHost } from '@siafoundation/hostd-react' export function HostdTestnetWarningBanner() { const host = useStateHost({ diff --git a/apps/hostd/components/Node/Logs.tsx b/apps/hostd/components/Node/Logs.tsx index 6edf23fcf..fde74e77b 100644 --- a/apps/hostd/components/Node/Logs.tsx +++ b/apps/hostd/components/Node/Logs.tsx @@ -6,7 +6,7 @@ import { Text, useDatasetEmptyState, } from '@siafoundation/design-system' -import { useLogsSearch } from '@siafoundation/react-hostd' +import { useLogsSearch } from '@siafoundation/hostd-react' import { humanDate } from '@siafoundation/units' import { cx } from 'class-variance-authority' import { times } from '@technically/lodash' diff --git a/apps/hostd/components/Node/index.tsx b/apps/hostd/components/Node/index.tsx index 86e6a77e1..e7b105b52 100644 --- a/apps/hostd/components/Node/index.tsx +++ b/apps/hostd/components/Node/index.tsx @@ -1,5 +1,5 @@ import { DatumCard, PeerList } from '@siafoundation/design-system' -import { useSyncerPeers } from '@siafoundation/react-hostd' +import { useSyncerPeers } from '@siafoundation/hostd-react' import { routes } from '../../config/routes' import { useDialog } from '../../contexts/dialog' import { HostdSidenav } from '../HostdSidenav' diff --git a/apps/hostd/components/OnboardingBar.tsx b/apps/hostd/components/OnboardingBar.tsx index ca712bca8..0cca3aef9 100644 --- a/apps/hostd/components/OnboardingBar.tsx +++ b/apps/hostd/components/OnboardingBar.tsx @@ -17,7 +17,7 @@ import { import { useSyncStatus } from '../hooks/useSyncStatus' import { routes } from '../config/routes' import { useDialog } from '../contexts/dialog' -import { useSettings, useWallet } from '@siafoundation/react-hostd' +import { useSettings, useWallet } from '@siafoundation/hostd-react' import BigNumber from 'bignumber.js' import { toHastings } from '@siafoundation/units' import { useAppSettings } from '@siafoundation/react-core' diff --git a/apps/hostd/components/Profile/index.tsx b/apps/hostd/components/Profile/index.tsx index a3ae1507c..0cc2fe218 100644 --- a/apps/hostd/components/Profile/index.tsx +++ b/apps/hostd/components/Profile/index.tsx @@ -9,7 +9,7 @@ import { useSettings, useStateHost, useSyncerPeers, -} from '@siafoundation/react-hostd' +} from '@siafoundation/hostd-react' import { useSyncStatus } from '../../hooks/useSyncStatus' import { useDialog } from '../../contexts/dialog' import { useSiascanUrl } from '../../hooks/useSiascanUrl' diff --git a/apps/hostd/components/Volumes/VolumeContextMenu.tsx b/apps/hostd/components/Volumes/VolumeContextMenu.tsx index bccb3cce9..a80faba2f 100644 --- a/apps/hostd/components/Volumes/VolumeContextMenu.tsx +++ b/apps/hostd/components/Volumes/VolumeContextMenu.tsx @@ -22,7 +22,7 @@ import { useVolume, useVolumeCancel, useVolumeUpdate, -} from '@siafoundation/react-hostd' +} from '@siafoundation/hostd-react' import { useDialog } from '../../contexts/dialog' type Props = { diff --git a/apps/hostd/components/Wallet/index.tsx b/apps/hostd/components/Wallet/index.tsx index 1ab128f38..63e5cea4d 100644 --- a/apps/hostd/components/Wallet/index.tsx +++ b/apps/hostd/components/Wallet/index.tsx @@ -4,7 +4,7 @@ import { BalanceEvolution, PaginatorUnknownTotal, } from '@siafoundation/design-system' -import { useWallet } from '@siafoundation/react-hostd' +import { useWallet } from '@siafoundation/hostd-react' import { useDialog } from '../../contexts/dialog' import { routes } from '../../config/routes' import BigNumber from 'bignumber.js' diff --git a/apps/hostd/config/routes.ts b/apps/hostd/config/routes.ts index d23048d3d..8d8fbf463 100644 --- a/apps/hostd/config/routes.ts +++ b/apps/hostd/config/routes.ts @@ -1,4 +1,4 @@ -import { stateHostKey } from '@siafoundation/react-hostd' +import { stateHostKey } from '@siafoundation/hostd-react' export const routes = { home: '/', diff --git a/apps/hostd/contexts/config/resources.ts b/apps/hostd/contexts/config/resources.ts index ea28ae0c1..a737b199f 100644 --- a/apps/hostd/contexts/config/resources.ts +++ b/apps/hostd/contexts/config/resources.ts @@ -1,5 +1,5 @@ import { SWRError } from '@siafoundation/react-core' -import { HostSettings } from '@siafoundation/react-hostd' +import { HostSettings } from '@siafoundation/hostd-react' export type Resources = { settings: { diff --git a/apps/hostd/contexts/config/transform.ts b/apps/hostd/contexts/config/transform.ts index 1891fca2c..faa585051 100644 --- a/apps/hostd/contexts/config/transform.ts +++ b/apps/hostd/contexts/config/transform.ts @@ -4,7 +4,7 @@ import { DNSDuckDNSOptions, DNSNoIPOptions, HostSettings, -} from '@siafoundation/react-hostd' +} from '@siafoundation/hostd-react' import { bytesToMB, MBToBytes, diff --git a/apps/hostd/contexts/config/types.ts b/apps/hostd/contexts/config/types.ts index ff876ab56..e8e7a3eb2 100644 --- a/apps/hostd/contexts/config/types.ts +++ b/apps/hostd/contexts/config/types.ts @@ -1,4 +1,4 @@ -import { DNSProvider } from '@siafoundation/react-hostd' +import { DNSProvider } from '@siafoundation/hostd-react' import BigNumber from 'bignumber.js' export const scDecimalPlaces = 6 diff --git a/apps/hostd/contexts/config/useForm.tsx b/apps/hostd/contexts/config/useForm.tsx index 77d676124..1553b1c15 100644 --- a/apps/hostd/contexts/config/useForm.tsx +++ b/apps/hostd/contexts/config/useForm.tsx @@ -3,7 +3,7 @@ import { initialValues } from './types' import { useMemo } from 'react' import { getFields } from './fields' import useLocalStorageState from 'use-local-storage-state' -import { useSiaCentralExchangeRates } from '@siafoundation/react-sia-central' +import { useSiaCentralExchangeRates } from '@siafoundation/sia-central-react' export function useForm() { const form = useHookForm({ diff --git a/apps/hostd/contexts/config/useOnValid.tsx b/apps/hostd/contexts/config/useOnValid.tsx index b3ce7135e..12ac2a10c 100644 --- a/apps/hostd/contexts/config/useOnValid.tsx +++ b/apps/hostd/contexts/config/useOnValid.tsx @@ -7,7 +7,7 @@ import { useCallback } from 'react' import { SettingsData, initialValues } from './types' import { calculateMaxCollateral, transformUp } from './transform' import { Resources } from './resources' -import { useSettingsUpdate, useStateHost } from '@siafoundation/react-hostd' +import { useSettingsUpdate, useStateHost } from '@siafoundation/hostd-react' export function useOnValid({ resources, diff --git a/apps/hostd/contexts/config/useResources.tsx b/apps/hostd/contexts/config/useResources.tsx index ec5e9f64b..db1149448 100644 --- a/apps/hostd/contexts/config/useResources.tsx +++ b/apps/hostd/contexts/config/useResources.tsx @@ -1,5 +1,5 @@ import { minutesInMilliseconds } from '@siafoundation/design-system' -import { useSettings, useSettingsDdns } from '@siafoundation/react-hostd' +import { useSettings, useSettingsDdns } from '@siafoundation/hostd-react' export function useResources() { const settings = useSettings({ diff --git a/apps/hostd/contexts/contracts/columns.tsx b/apps/hostd/contexts/contracts/columns.tsx index c80792a33..d3228de29 100644 --- a/apps/hostd/contexts/contracts/columns.tsx +++ b/apps/hostd/contexts/contracts/columns.tsx @@ -14,7 +14,7 @@ import { ArrowDownRight16, Money16, } from '@siafoundation/react-icons' -import { ContractStatus } from '@siafoundation/react-hostd' +import { ContractStatus } from '@siafoundation/hostd-react' import { blockHeightToTime, humanBytes, humanDate } from '@siafoundation/units' import { ContractContextMenu } from '../../components/Contracts/ContractContextMenu' import { ContractData, TableColumnId } from './types' diff --git a/apps/hostd/contexts/contracts/dataset.ts b/apps/hostd/contexts/contracts/dataset.ts index 50efe1140..db1acba9d 100644 --- a/apps/hostd/contexts/contracts/dataset.ts +++ b/apps/hostd/contexts/contracts/dataset.ts @@ -1,5 +1,5 @@ import { useMemo } from 'react' -import { Contract, useContracts } from '@siafoundation/react-hostd' +import { Contract, useContracts } from '@siafoundation/hostd-react' import { ContractData } from './types' import BigNumber from 'bignumber.js' diff --git a/apps/hostd/contexts/contracts/index.tsx b/apps/hostd/contexts/contracts/index.tsx index 996506a3a..e30761045 100644 --- a/apps/hostd/contexts/contracts/index.tsx +++ b/apps/hostd/contexts/contracts/index.tsx @@ -8,7 +8,7 @@ import { useRouter } from 'next/router' import { ContractStatus, useContracts as useContractsData, -} from '@siafoundation/react-hostd' +} from '@siafoundation/hostd-react' import { createContext, useContext, useMemo } from 'react' import { columnsDefaultVisible, diff --git a/apps/hostd/contexts/contracts/types.ts b/apps/hostd/contexts/contracts/types.ts index 6e6d7ae05..7f257de07 100644 --- a/apps/hostd/contexts/contracts/types.ts +++ b/apps/hostd/contexts/contracts/types.ts @@ -8,7 +8,7 @@ import { import { ContractFilterSortField, ContractStatus, -} from '@siafoundation/react-hostd' +} from '@siafoundation/hostd-react' import BigNumber from 'bignumber.js' export type ContractData = { diff --git a/apps/hostd/contexts/dialog.tsx b/apps/hostd/contexts/dialog.tsx index b5d16c97a..a603b9681 100644 --- a/apps/hostd/contexts/dialog.tsx +++ b/apps/hostd/contexts/dialog.tsx @@ -8,7 +8,7 @@ import { import { VolumeCreateDialog } from '../dialogs/VolumeCreateDialog' import { VolumeResizeDialog } from '../dialogs/VolumeResizeDialog' import { VolumeDeleteDialog } from '../dialogs/VolumeDeleteDialog' -import { useSyncerConnect, useWallet } from '@siafoundation/react-hostd' +import { useSyncerConnect, useWallet } from '@siafoundation/hostd-react' import { HostdSendSiacoinDialog } from '../dialogs/HostdSendSiacoinDialog' import { HostdTransactionDetailsDialog } from '../dialogs/HostdTransactionDetailsDialog' import { ContractsFilterContractIdDialog } from '../dialogs/ContractsFilterContractIdDialog' diff --git a/apps/hostd/contexts/metrics/index.tsx b/apps/hostd/contexts/metrics/index.tsx index 5f1424e0f..b005e83bc 100644 --- a/apps/hostd/contexts/metrics/index.tsx +++ b/apps/hostd/contexts/metrics/index.tsx @@ -16,7 +16,7 @@ import { } from '@siafoundation/units' import { useCallback, useMemo } from 'react' import { chartConfigs } from '../../config/charts' -import { useMetricsPeriod } from '@siafoundation/react-hostd' +import { useMetricsPeriod } from '@siafoundation/hostd-react' import { configCategoryPattern, configCategoryLabel } from './utils' import BigNumber from 'bignumber.js' import { diff --git a/apps/hostd/contexts/transactions/index.tsx b/apps/hostd/contexts/transactions/index.tsx index f19a8d8a0..6e17e556b 100644 --- a/apps/hostd/contexts/transactions/index.tsx +++ b/apps/hostd/contexts/transactions/index.tsx @@ -8,7 +8,7 @@ import { useMetricsPeriod, useWalletPending, useWalletTransactions, -} from '@siafoundation/react-hostd' +} from '@siafoundation/hostd-react' import { createContext, useContext, useMemo } from 'react' import { useDialog } from '../dialog' import BigNumber from 'bignumber.js' diff --git a/apps/hostd/contexts/volumes/dataset.ts b/apps/hostd/contexts/volumes/dataset.ts index 47c9d0033..ae9305a17 100644 --- a/apps/hostd/contexts/volumes/dataset.ts +++ b/apps/hostd/contexts/volumes/dataset.ts @@ -1,5 +1,5 @@ import { useMemo } from 'react' -import { useVolumes, VolumeMeta } from '@siafoundation/react-hostd' +import { useVolumes, VolumeMeta } from '@siafoundation/hostd-react' import { VolumeData } from './types' import BigNumber from 'bignumber.js' import { MiBToBytes } from '@siafoundation/units' diff --git a/apps/hostd/contexts/volumes/index.tsx b/apps/hostd/contexts/volumes/index.tsx index 6c96458fa..aa162aad2 100644 --- a/apps/hostd/contexts/volumes/index.tsx +++ b/apps/hostd/contexts/volumes/index.tsx @@ -6,7 +6,7 @@ import { import { VolumeMeta, useVolumes as useVolumesData, -} from '@siafoundation/react-hostd' +} from '@siafoundation/hostd-react' import { createContext, useContext, useMemo } from 'react' import { columnsDefaultVisible, TableColumnId } from './types' import { columns } from './columns' diff --git a/apps/hostd/contexts/volumes/types.ts b/apps/hostd/contexts/volumes/types.ts index e45e981fe..abf017910 100644 --- a/apps/hostd/contexts/volumes/types.ts +++ b/apps/hostd/contexts/volumes/types.ts @@ -1,4 +1,4 @@ -import { VolumeStatus } from '@siafoundation/react-hostd' +import { VolumeStatus } from '@siafoundation/hostd-react' import BigNumber from 'bignumber.js' export type VolumeData = { diff --git a/apps/hostd/dialogs/AlertsDialog.tsx b/apps/hostd/dialogs/AlertsDialog.tsx index adf75132f..5e66a9e7f 100644 --- a/apps/hostd/dialogs/AlertsDialog.tsx +++ b/apps/hostd/dialogs/AlertsDialog.tsx @@ -9,7 +9,7 @@ import { AlertSeverity, useAlerts, useAlertsDismiss, -} from '@siafoundation/react-hostd' +} from '@siafoundation/hostd-react' import { humanTime } from '@siafoundation/units' import { useCallback } from 'react' import { defaultDatasetRefreshInterval } from '../config/swr' diff --git a/apps/hostd/dialogs/HostdSendSiacoinDialog.tsx b/apps/hostd/dialogs/HostdSendSiacoinDialog.tsx index 3ef528486..7214b2b62 100644 --- a/apps/hostd/dialogs/HostdSendSiacoinDialog.tsx +++ b/apps/hostd/dialogs/HostdSendSiacoinDialog.tsx @@ -1,6 +1,6 @@ import { useCallback } from 'react' import { WalletSendSiacoinDialog } from '@siafoundation/design-system' -import { useWallet, useWalletSend } from '@siafoundation/react-hostd' +import { useWallet, useWalletSend } from '@siafoundation/hostd-react' import { useDialog } from '../contexts/dialog' import BigNumber from 'bignumber.js' diff --git a/apps/hostd/dialogs/VolumeCreateDialog.tsx b/apps/hostd/dialogs/VolumeCreateDialog.tsx index c8efdadca..660d01abc 100644 --- a/apps/hostd/dialogs/VolumeCreateDialog.tsx +++ b/apps/hostd/dialogs/VolumeCreateDialog.tsx @@ -10,7 +10,7 @@ import { ConfigFields, useOnInvalid, } from '@siafoundation/design-system' -import { useSystemDirectory, useVolumeCreate } from '@siafoundation/react-hostd' +import { useSystemDirectory, useVolumeCreate } from '@siafoundation/hostd-react' import { bytesToGB, GBToBytes, humanBytes } from '@siafoundation/units' import BigNumber from 'bignumber.js' import { useCallback, useEffect, useMemo } from 'react' diff --git a/apps/hostd/dialogs/VolumeDeleteDialog.tsx b/apps/hostd/dialogs/VolumeDeleteDialog.tsx index 699d8c3c5..61aeb77b8 100644 --- a/apps/hostd/dialogs/VolumeDeleteDialog.tsx +++ b/apps/hostd/dialogs/VolumeDeleteDialog.tsx @@ -13,7 +13,7 @@ import { FieldSwitch, FieldText, } from '@siafoundation/design-system' -import { useVolume, useVolumeDelete } from '@siafoundation/react-hostd' +import { useVolume, useVolumeDelete } from '@siafoundation/hostd-react' import { humanBytes } from '@siafoundation/units' import { useCallback, useMemo } from 'react' import { useForm } from 'react-hook-form' diff --git a/apps/hostd/dialogs/VolumeResizeDialog.tsx b/apps/hostd/dialogs/VolumeResizeDialog.tsx index 36c813168..81582a08b 100644 --- a/apps/hostd/dialogs/VolumeResizeDialog.tsx +++ b/apps/hostd/dialogs/VolumeResizeDialog.tsx @@ -17,7 +17,7 @@ import { useSystemDirectory, useVolume, useVolumeResize, -} from '@siafoundation/react-hostd' +} from '@siafoundation/hostd-react' import { bytesToGB, GBToBytes, humanBytes } from '@siafoundation/units' import BigNumber from 'bignumber.js' import { useCallback, useEffect, useMemo } from 'react' diff --git a/apps/hostd/hooks/useHostOSPathSeparator.ts b/apps/hostd/hooks/useHostOSPathSeparator.ts index b38fa26ab..89e69acbc 100644 --- a/apps/hostd/hooks/useHostOSPathSeparator.ts +++ b/apps/hostd/hooks/useHostOSPathSeparator.ts @@ -1,4 +1,4 @@ -import { useStateHost } from '@siafoundation/react-hostd' +import { useStateHost } from '@siafoundation/hostd-react' export function useHostOSPathSeparator() { const state = useStateHost({ diff --git a/apps/hostd/hooks/useSiascanUrl.ts b/apps/hostd/hooks/useSiascanUrl.ts index e90e3c150..92ce44e0c 100644 --- a/apps/hostd/hooks/useSiascanUrl.ts +++ b/apps/hostd/hooks/useSiascanUrl.ts @@ -1,5 +1,5 @@ import { webLinks } from '@siafoundation/design-system' -import { useStateHost } from '@siafoundation/react-hostd' +import { useStateHost } from '@siafoundation/hostd-react' export function useSiascanUrl() { const state = useStateHost() diff --git a/apps/hostd/hooks/useSyncStatus.ts b/apps/hostd/hooks/useSyncStatus.ts index 63f180508..8b18be4d6 100644 --- a/apps/hostd/hooks/useSyncStatus.ts +++ b/apps/hostd/hooks/useSyncStatus.ts @@ -3,7 +3,7 @@ import { useEstimatedNetworkBlockHeight, useStateConsensus, useWallet, -} from '@siafoundation/react-hostd' +} from '@siafoundation/hostd-react' export function useSyncStatus() { const { isUnlockedAndAuthedRoute } = useAppSettings() diff --git a/apps/renterd/components/AccountContextMenu.tsx b/apps/renterd/components/AccountContextMenu.tsx index 4cdb06922..f526efedf 100644 --- a/apps/renterd/components/AccountContextMenu.tsx +++ b/apps/renterd/components/AccountContextMenu.tsx @@ -8,7 +8,7 @@ import { copyToClipboard, } from '@siafoundation/design-system' import { Copy16, ResetAlt16, CaretDown16 } from '@siafoundation/react-icons' -import { useAccountResetDrift } from '@siafoundation/react-renterd' +import { useAccountResetDrift } from '@siafoundation/renterd-react' type Props = { id: string diff --git a/apps/renterd/components/CmdRoot/WalletCmdGroup.tsx b/apps/renterd/components/CmdRoot/WalletCmdGroup.tsx index e80ea7abb..7b0b36208 100644 --- a/apps/renterd/components/CmdRoot/WalletCmdGroup.tsx +++ b/apps/renterd/components/CmdRoot/WalletCmdGroup.tsx @@ -3,7 +3,7 @@ import { routes } from '../../config/routes' import { useRouter } from 'next/router' import { useDialog } from '../../contexts/dialog' import { CommandGroup, CommandItemNav, CommandItemSearch } from './Item' -import { useWallet } from '@siafoundation/react-renterd' +import { useWallet } from '@siafoundation/renterd-react' import { Page } from './types' const commandPage = { diff --git a/apps/renterd/components/Contracts/ContractContextMenu.tsx b/apps/renterd/components/Contracts/ContractContextMenu.tsx index 66c35ab0c..f1cbb6200 100644 --- a/apps/renterd/components/Contracts/ContractContextMenu.tsx +++ b/apps/renterd/components/Contracts/ContractContextMenu.tsx @@ -17,7 +17,7 @@ import { import { useHostsAllowlist, useHostsBlocklist, -} from '@siafoundation/react-renterd' +} from '@siafoundation/renterd-react' import { routes } from '../../config/routes' import { useRouter } from 'next/router' import { useContracts } from '../../contexts/contracts' diff --git a/apps/renterd/components/Contracts/ContractContextMenuFromId.tsx b/apps/renterd/components/Contracts/ContractContextMenuFromId.tsx index 02b82e2f6..fe585086b 100644 --- a/apps/renterd/components/Contracts/ContractContextMenuFromId.tsx +++ b/apps/renterd/components/Contracts/ContractContextMenuFromId.tsx @@ -1,6 +1,6 @@ import { Button, DropdownMenu } from '@siafoundation/design-system' import { CaretDown16 } from '@siafoundation/react-icons' -import { useContract } from '@siafoundation/react-renterd' +import { useContract } from '@siafoundation/renterd-react' import { ContractContextMenuContent } from './ContractContextMenu' type Props = { diff --git a/apps/renterd/components/Contracts/useContractConfirmDelete.tsx b/apps/renterd/components/Contracts/useContractConfirmDelete.tsx index 606cdbb90..ea8c132a9 100644 --- a/apps/renterd/components/Contracts/useContractConfirmDelete.tsx +++ b/apps/renterd/components/Contracts/useContractConfirmDelete.tsx @@ -6,7 +6,7 @@ import { import { Delete16 } from '@siafoundation/react-icons' import { useDialog } from '../../contexts/dialog' import { useCallback } from 'react' -import { useContractDelete } from '@siafoundation/react-renterd' +import { useContractDelete } from '@siafoundation/renterd-react' export function useContractConfirmDelete() { const { openConfirmDialog } = useDialog() diff --git a/apps/renterd/components/Files/Columns/FilesHealthColumn/FilesHealthColumnContents.tsx b/apps/renterd/components/Files/Columns/FilesHealthColumn/FilesHealthColumnContents.tsx index 16480f30a..e3699fedd 100644 --- a/apps/renterd/components/Files/Columns/FilesHealthColumn/FilesHealthColumnContents.tsx +++ b/apps/renterd/components/Files/Columns/FilesHealthColumn/FilesHealthColumnContents.tsx @@ -4,7 +4,7 @@ import { Separator, Text, } from '@siafoundation/design-system' -import { useObject } from '@siafoundation/react-renterd' +import { useObject } from '@siafoundation/renterd-react' import { cx } from 'class-variance-authority' import { sortBy } from '@technically/lodash' import { computeSlabContractSetShards } from '../../../../lib/health' diff --git a/apps/renterd/components/Files/FileContextMenu/CopyMetadataMenuItem.tsx b/apps/renterd/components/Files/FileContextMenu/CopyMetadataMenuItem.tsx index cf87d3c97..f51564f97 100644 --- a/apps/renterd/components/Files/FileContextMenu/CopyMetadataMenuItem.tsx +++ b/apps/renterd/components/Files/FileContextMenu/CopyMetadataMenuItem.tsx @@ -4,7 +4,7 @@ import { DropdownMenuLeftSlot, } from '@siafoundation/design-system' import { Copy16 } from '@siafoundation/react-icons' -import { useObject } from '@siafoundation/react-renterd' +import { useObject } from '@siafoundation/renterd-react' import { bucketAndKeyParamsFromPath } from '../../../lib/paths' type Props = { diff --git a/apps/renterd/components/Files/FilesCmd/FilesSearchCmd/index.tsx b/apps/renterd/components/Files/FilesCmd/FilesSearchCmd/index.tsx index da02b2707..8a46a6b98 100644 --- a/apps/renterd/components/Files/FilesCmd/FilesSearchCmd/index.tsx +++ b/apps/renterd/components/Files/FilesCmd/FilesSearchCmd/index.tsx @@ -1,6 +1,6 @@ import { CommandGroup, CommandItemSearch } from '../../../CmdRoot/Item' import { Page } from '../../../CmdRoot/types' -import { useObjectSearch } from '@siafoundation/react-renterd' +import { useObjectSearch } from '@siafoundation/renterd-react' import { isDirectory } from '../../../../lib/paths' import { Text } from '@siafoundation/design-system' import { Document16, FolderIcon } from '@siafoundation/react-icons' diff --git a/apps/renterd/components/Files/FilesStatsMenuShared/FilesStatsMenuCount.tsx b/apps/renterd/components/Files/FilesStatsMenuShared/FilesStatsMenuCount.tsx index 6f8b0f83f..a2d07b4dc 100644 --- a/apps/renterd/components/Files/FilesStatsMenuShared/FilesStatsMenuCount.tsx +++ b/apps/renterd/components/Files/FilesStatsMenuShared/FilesStatsMenuCount.tsx @@ -1,5 +1,5 @@ import { LoadingDots, Text, Tooltip } from '@siafoundation/design-system' -import { useObjectStats } from '@siafoundation/react-renterd' +import { useObjectStats } from '@siafoundation/renterd-react' import { useFilesManager } from '../../../contexts/filesManager' import { useFilesDirectory } from '../../../contexts/filesDirectory' import { useFilesFlat } from '../../../contexts/filesFlat' diff --git a/apps/renterd/components/Files/FilesStatsMenuShared/FilesStatsMenuHealth.tsx b/apps/renterd/components/Files/FilesStatsMenuShared/FilesStatsMenuHealth.tsx index 4fde0cb82..7249f2744 100644 --- a/apps/renterd/components/Files/FilesStatsMenuShared/FilesStatsMenuHealth.tsx +++ b/apps/renterd/components/Files/FilesStatsMenuShared/FilesStatsMenuHealth.tsx @@ -1,5 +1,5 @@ import { Separator, Text, Tooltip } from '@siafoundation/design-system' -import { useObjectStats } from '@siafoundation/react-renterd' +import { useObjectStats } from '@siafoundation/renterd-react' import { healthThresholds, useHealthLabel } from '../../../hooks/useHealthLabel' export function FilesStatsMenuHealth() { diff --git a/apps/renterd/components/Files/FilesStatsMenuShared/FilesStatsMenuSize.tsx b/apps/renterd/components/Files/FilesStatsMenuShared/FilesStatsMenuSize.tsx index c5ad23def..55c345719 100644 --- a/apps/renterd/components/Files/FilesStatsMenuShared/FilesStatsMenuSize.tsx +++ b/apps/renterd/components/Files/FilesStatsMenuShared/FilesStatsMenuSize.tsx @@ -4,7 +4,7 @@ import { Text, Tooltip, } from '@siafoundation/design-system' -import { useObjectStats } from '@siafoundation/react-renterd' +import { useObjectStats } from '@siafoundation/renterd-react' import { humanBytes } from '@siafoundation/units' export function FilesStatsMenuSize() { diff --git a/apps/renterd/components/Files/checks/useAutopilotNotConfigured.tsx b/apps/renterd/components/Files/checks/useAutopilotNotConfigured.tsx index 316c60ed6..1bfa61d12 100644 --- a/apps/renterd/components/Files/checks/useAutopilotNotConfigured.tsx +++ b/apps/renterd/components/Files/checks/useAutopilotNotConfigured.tsx @@ -1,4 +1,4 @@ -import { useAutopilotConfig } from '@siafoundation/react-renterd' +import { useAutopilotConfig } from '@siafoundation/renterd-react' import { useApp } from '../../../contexts/app' export function useAutopilotNotConfigured() { diff --git a/apps/renterd/components/Files/useDirectoryDelete.tsx b/apps/renterd/components/Files/useDirectoryDelete.tsx index e5ccb3f20..eee0e1081 100644 --- a/apps/renterd/components/Files/useDirectoryDelete.tsx +++ b/apps/renterd/components/Files/useDirectoryDelete.tsx @@ -6,7 +6,7 @@ import { import { Delete16 } from '@siafoundation/react-icons' import { useDialog } from '../../contexts/dialog' import { useCallback } from 'react' -import { useObjectDelete } from '@siafoundation/react-renterd' +import { useObjectDelete } from '@siafoundation/renterd-react' import { humanBytes } from '@siafoundation/units' import { bucketAndKeyParamsFromPath } from '../../lib/paths' diff --git a/apps/renterd/components/Files/useFileDelete.tsx b/apps/renterd/components/Files/useFileDelete.tsx index 7905b53a0..c758b7af7 100644 --- a/apps/renterd/components/Files/useFileDelete.tsx +++ b/apps/renterd/components/Files/useFileDelete.tsx @@ -6,7 +6,7 @@ import { import { Delete16 } from '@siafoundation/react-icons' import { useDialog } from '../../contexts/dialog' import { useCallback } from 'react' -import { useObjectDelete } from '@siafoundation/react-renterd' +import { useObjectDelete } from '@siafoundation/renterd-react' import { bucketAndKeyParamsFromPath } from '../../lib/paths' export function useFileDelete() { diff --git a/apps/renterd/components/Hosts/HostContextMenu.tsx b/apps/renterd/components/Hosts/HostContextMenu.tsx index 8cbd634d8..0be4db5b3 100644 --- a/apps/renterd/components/Hosts/HostContextMenu.tsx +++ b/apps/renterd/components/Hosts/HostContextMenu.tsx @@ -22,7 +22,7 @@ import { useHostsAllowlist, useHostsBlocklist, useRhpScan, -} from '@siafoundation/react-renterd' +} from '@siafoundation/renterd-react' import { routes } from '../../config/routes' import { useRouter } from 'next/router' import { useContracts } from '../../contexts/contracts' diff --git a/apps/renterd/components/Hosts/HostContextMenuFromKey.tsx b/apps/renterd/components/Hosts/HostContextMenuFromKey.tsx index ad9318ffc..250ee967d 100644 --- a/apps/renterd/components/Hosts/HostContextMenuFromKey.tsx +++ b/apps/renterd/components/Hosts/HostContextMenuFromKey.tsx @@ -1,6 +1,6 @@ import { Button, DropdownMenu } from '@siafoundation/design-system' import { CaretDown16 } from '@siafoundation/react-icons' -import { useHost } from '@siafoundation/react-renterd' +import { useHost } from '@siafoundation/renterd-react' import { HostContextMenuContent } from './HostContextMenu' type Props = { diff --git a/apps/renterd/components/Hosts/HostMap/Globe.tsx b/apps/renterd/components/Hosts/HostMap/Globe.tsx index 9982e39b7..738d86651 100644 --- a/apps/renterd/components/Hosts/HostMap/Globe.tsx +++ b/apps/renterd/components/Hosts/HostMap/Globe.tsx @@ -9,7 +9,7 @@ import { GlobeDyn } from './GlobeDyn' import { HostDataWithLocation } from '../../../contexts/hosts/types' import BigNumber from 'bignumber.js' import { getHostStatus } from '../../../contexts/hosts/status' -import { useSiaCentralExchangeRates } from '@siafoundation/react-sia-central' +import { useSiaCentralExchangeRates } from '@siafoundation/sia-central-react' export type Commands = { moveToLocation: ( diff --git a/apps/renterd/components/Hosts/HostsAllowBlockDialog/AllowlistForm.tsx b/apps/renterd/components/Hosts/HostsAllowBlockDialog/AllowlistForm.tsx index 94f5a9506..5fa45004d 100644 --- a/apps/renterd/components/Hosts/HostsAllowBlockDialog/AllowlistForm.tsx +++ b/apps/renterd/components/Hosts/HostsAllowBlockDialog/AllowlistForm.tsx @@ -10,7 +10,7 @@ import { FormSubmitButtonFormik, } from '@siafoundation/design-system' import { ListChecked32, Filter32, Warning16 } from '@siafoundation/react-icons' -import { useHostsAllowlist } from '@siafoundation/react-renterd' +import { useHostsAllowlist } from '@siafoundation/renterd-react' import { useAllowlistUpdate } from '../../../hooks/useAllowlistUpdate' import { useFormik } from 'formik' import * as Yup from 'yup' diff --git a/apps/renterd/components/Hosts/HostsAllowBlockDialog/BlocklistForm.tsx b/apps/renterd/components/Hosts/HostsAllowBlockDialog/BlocklistForm.tsx index fbdf51e46..782263f0b 100644 --- a/apps/renterd/components/Hosts/HostsAllowBlockDialog/BlocklistForm.tsx +++ b/apps/renterd/components/Hosts/HostsAllowBlockDialog/BlocklistForm.tsx @@ -11,7 +11,7 @@ import { FieldGroupFormik, } from '@siafoundation/design-system' import { ListChecked32, Filter32 } from '@siafoundation/react-icons' -import { useHostsBlocklist } from '@siafoundation/react-renterd' +import { useHostsBlocklist } from '@siafoundation/renterd-react' import { useContracts } from '../../../contexts/contracts' import { useFormik } from 'formik' import { useEffect, useMemo } from 'react' diff --git a/apps/renterd/components/Keys/KeyContextMenu.tsx b/apps/renterd/components/Keys/KeyContextMenu.tsx index ff2f8a52a..913781fea 100644 --- a/apps/renterd/components/Keys/KeyContextMenu.tsx +++ b/apps/renterd/components/Keys/KeyContextMenu.tsx @@ -11,7 +11,7 @@ import { truncate, } from '@siafoundation/design-system' import { CaretDown16, Delete16 } from '@siafoundation/react-icons' -import { useSettingUpdate } from '@siafoundation/react-renterd' +import { useSettingUpdate } from '@siafoundation/renterd-react' import { useS3AuthenticationSettings } from '../../hooks/useS3AuthenticationSettings' import { useCallback } from 'react' import { omit } from '@technically/lodash' diff --git a/apps/renterd/components/Keys/KeysCreateDialog.tsx b/apps/renterd/components/Keys/KeysCreateDialog.tsx index 2d268b98b..036ae79ac 100644 --- a/apps/renterd/components/Keys/KeysCreateDialog.tsx +++ b/apps/renterd/components/Keys/KeysCreateDialog.tsx @@ -13,7 +13,7 @@ import { useCallback, useMemo } from 'react' import { useForm } from 'react-hook-form' import { useDialog } from '../../contexts/dialog' import { useS3AuthenticationSettings } from '../../hooks/useS3AuthenticationSettings' -import { useSettingUpdate } from '@siafoundation/react-renterd' +import { useSettingUpdate } from '@siafoundation/renterd-react' import { Reset16 } from '@carbon/icons-react' type Props = { diff --git a/apps/renterd/components/Node/index.tsx b/apps/renterd/components/Node/index.tsx index f1cc5208a..c5cb79391 100644 --- a/apps/renterd/components/Node/index.tsx +++ b/apps/renterd/components/Node/index.tsx @@ -3,7 +3,7 @@ import { useConsensusState, useSyncerPeers, useTxPoolTransactions, -} from '@siafoundation/react-renterd' +} from '@siafoundation/renterd-react' import { routes } from '../../config/routes' import { useDialog } from '../../contexts/dialog' import { RenterdSidenav } from '../RenterdSidenav' diff --git a/apps/renterd/components/OnboardingBar.tsx b/apps/renterd/components/OnboardingBar.tsx index 07a979b5b..d948a2bd2 100644 --- a/apps/renterd/components/OnboardingBar.tsx +++ b/apps/renterd/components/OnboardingBar.tsx @@ -19,7 +19,7 @@ import { useSyncStatus } from '../hooks/useSyncStatus' import { routes } from '../config/routes' import { useDialog } from '../contexts/dialog' import { useNotEnoughContracts } from './Files/checks/useNotEnoughContracts' -import { useAutopilotConfig, useWallet } from '@siafoundation/react-renterd' +import { useAutopilotConfig, useWallet } from '@siafoundation/renterd-react' import BigNumber from 'bignumber.js' import { humanSiacoin } from '@siafoundation/units' import { useAppSettings } from '@siafoundation/react-core' diff --git a/apps/renterd/components/Profile/index.tsx b/apps/renterd/components/Profile/index.tsx index c539bcc97..c04eb451e 100644 --- a/apps/renterd/components/Profile/index.tsx +++ b/apps/renterd/components/Profile/index.tsx @@ -10,7 +10,7 @@ import { useBusState, useSyncerPeers, useWallet, -} from '@siafoundation/react-renterd' +} from '@siafoundation/renterd-react' import { useDialog } from '../../contexts/dialog' import { humanTime } from '@siafoundation/units' diff --git a/apps/renterd/components/RenterdAuthedLayout.tsx b/apps/renterd/components/RenterdAuthedLayout.tsx index 29625d592..cee1c748f 100644 --- a/apps/renterd/components/RenterdAuthedLayout.tsx +++ b/apps/renterd/components/RenterdAuthedLayout.tsx @@ -1,5 +1,5 @@ import { AppAuthedLayout } from '@siafoundation/design-system' -import { useWallet } from '@siafoundation/react-renterd' +import { useWallet } from '@siafoundation/renterd-react' import BigNumber from 'bignumber.js' import { connectivityRoute } from '../config/routes' import { useSyncStatus } from '../hooks/useSyncStatus' diff --git a/apps/renterd/components/RenterdTestnetWarningBanner.tsx b/apps/renterd/components/RenterdTestnetWarningBanner.tsx index c02b7db08..8b4c9aaf9 100644 --- a/apps/renterd/components/RenterdTestnetWarningBanner.tsx +++ b/apps/renterd/components/RenterdTestnetWarningBanner.tsx @@ -1,5 +1,5 @@ import { TestnetWarningBanner } from '@siafoundation/design-system' -import { useBusState } from '@siafoundation/react-renterd' +import { useBusState } from '@siafoundation/renterd-react' export function RenterdTestnetWarningBanner() { const state = useBusState({ diff --git a/apps/renterd/components/Wallet/index.tsx b/apps/renterd/components/Wallet/index.tsx index af74ed5fa..abbc2cf55 100644 --- a/apps/renterd/components/Wallet/index.tsx +++ b/apps/renterd/components/Wallet/index.tsx @@ -4,7 +4,7 @@ import { PaginatorUnknownTotal, WalletLayoutActions, } from '@siafoundation/design-system' -import { useWallet } from '@siafoundation/react-renterd' +import { useWallet } from '@siafoundation/renterd-react' import { useDialog } from '../../contexts/dialog' import { routes } from '../../config/routes' import BigNumber from 'bignumber.js' diff --git a/apps/renterd/config/routes.ts b/apps/renterd/config/routes.ts index 7cf27a19d..ca312b11f 100644 --- a/apps/renterd/config/routes.ts +++ b/apps/renterd/config/routes.ts @@ -1,4 +1,4 @@ -import { busStateKey } from '@siafoundation/react-renterd' +import { busStateKey } from '@siafoundation/renterd-react' export const routes = { home: '/', diff --git a/apps/renterd/contexts/alerts/data.tsx b/apps/renterd/contexts/alerts/data.tsx index 35be8d666..70ec4ecc9 100644 --- a/apps/renterd/contexts/alerts/data.tsx +++ b/apps/renterd/contexts/alerts/data.tsx @@ -7,7 +7,7 @@ import { ValueNum, ValueSc, } from '@siafoundation/design-system' -import { useHost, useSlabObjects } from '@siafoundation/react-renterd' +import { useHost, useSlabObjects } from '@siafoundation/renterd-react' import { HostContextMenu } from '../../components/Hosts/HostContextMenu' import { useFilesManager } from '../filesManager' import { useDialog } from '../dialog' diff --git a/apps/renterd/contexts/alerts/index.tsx b/apps/renterd/contexts/alerts/index.tsx index 5c35f5eb3..647e9a845 100644 --- a/apps/renterd/contexts/alerts/index.tsx +++ b/apps/renterd/contexts/alerts/index.tsx @@ -22,7 +22,7 @@ import { AlertsParams, useAlerts as useAlertsData, useAlertsDismiss, -} from '@siafoundation/react-renterd' +} from '@siafoundation/renterd-react' import { useCallback } from 'react' const defaultLimit = 50 diff --git a/apps/renterd/contexts/app/useAutopilot.tsx b/apps/renterd/contexts/app/useAutopilot.tsx index 29d4183d6..2e830f2cb 100644 --- a/apps/renterd/contexts/app/useAutopilot.tsx +++ b/apps/renterd/contexts/app/useAutopilot.tsx @@ -1,5 +1,5 @@ import { secondsInMilliseconds } from '@siafoundation/design-system' -import { useAutopilotState } from '@siafoundation/react-renterd' +import { useAutopilotState } from '@siafoundation/renterd-react' import { useEffect, useState } from 'react' export function useAutopilot() { diff --git a/apps/renterd/contexts/config/resources.ts b/apps/renterd/contexts/config/resources.ts index 15536ca4e..4f24d989b 100644 --- a/apps/renterd/contexts/config/resources.ts +++ b/apps/renterd/contexts/config/resources.ts @@ -6,7 +6,7 @@ import { GougingSettings, RedundancySettings, UploadPackingSettings, -} from '@siafoundation/react-renterd' +} from '@siafoundation/renterd-react' import { SiaCentralHostsNetworkAveragesResponse } from '@siafoundation/sia-central' import BigNumber from 'bignumber.js' import { TBToBytes } from '@siafoundation/units' diff --git a/apps/renterd/contexts/config/transform.ts b/apps/renterd/contexts/config/transform.ts index f3a080335..b10b63380 100644 --- a/apps/renterd/contexts/config/transform.ts +++ b/apps/renterd/contexts/config/transform.ts @@ -11,7 +11,7 @@ import { GougingSettings, RedundancySettings, UploadPackingSettings, -} from '@siafoundation/react-renterd' +} from '@siafoundation/renterd-react' import { toHastings, toSiacoins, diff --git a/apps/renterd/contexts/config/useAverages.tsx b/apps/renterd/contexts/config/useAverages.tsx index 0f0d6378b..2800e7c52 100644 --- a/apps/renterd/contexts/config/useAverages.tsx +++ b/apps/renterd/contexts/config/useAverages.tsx @@ -1,7 +1,7 @@ import BigNumber from 'bignumber.js' import { useMemo } from 'react' import { monthsToBlocks, TBToBytes, toSiacoins } from '@siafoundation/units' -import { useSiaCentralHostsNetworkAverages } from '@siafoundation/react-sia-central' +import { useSiaCentralHostsNetworkAverages } from '@siafoundation/sia-central-react' export function useAverages() { const averages = useSiaCentralHostsNetworkAverages({ diff --git a/apps/renterd/contexts/config/useForm.tsx b/apps/renterd/contexts/config/useForm.tsx index fdc998b1e..d3088aa6b 100644 --- a/apps/renterd/contexts/config/useForm.tsx +++ b/apps/renterd/contexts/config/useForm.tsx @@ -3,7 +3,7 @@ import { defaultValues, getAdvancedDefaults } from './types' import { getRedundancyMultiplier } from './transform' import { useForm as useHookForm } from 'react-hook-form' import { useAverages } from './useAverages' -import { useBusState } from '@siafoundation/react-renterd' +import { useBusState } from '@siafoundation/renterd-react' import { getFields } from './fields' import { useApp } from '../app' import useLocalStorageState from 'use-local-storage-state' diff --git a/apps/renterd/contexts/config/useOnValid.tsx b/apps/renterd/contexts/config/useOnValid.tsx index 0ce7a9a61..b3fc31b83 100644 --- a/apps/renterd/contexts/config/useOnValid.tsx +++ b/apps/renterd/contexts/config/useOnValid.tsx @@ -9,7 +9,7 @@ import { useAutopilotTrigger, useBusState, useSettingUpdate, -} from '@siafoundation/react-renterd' +} from '@siafoundation/renterd-react' import { SettingsData, defaultValues } from './types' import { transformUpAutopilot, diff --git a/apps/renterd/contexts/config/useResources.tsx b/apps/renterd/contexts/config/useResources.tsx index 4c2d1c175..179057b7e 100644 --- a/apps/renterd/contexts/config/useResources.tsx +++ b/apps/renterd/contexts/config/useResources.tsx @@ -1,12 +1,12 @@ import { minutesInMilliseconds } from '@siafoundation/design-system' -import { useAutopilotConfig } from '@siafoundation/react-renterd' +import { useAutopilotConfig } from '@siafoundation/renterd-react' import { useSyncContractSet } from './useSyncContractSet' import { useAppSettings } from '@siafoundation/react-core' import { useContractSetSettings } from '../../hooks/useContractSetSettings' import { useGougingSettings } from '../../hooks/useGougingSettings' import { useRedundancySettings } from '../../hooks/useRedundancySettings' import { useUploadPackingSettings } from '../../hooks/useUploadPackingSettings' -import { useSiaCentralHostsNetworkAverages } from '@siafoundation/react-sia-central' +import { useSiaCentralHostsNetworkAverages } from '@siafoundation/sia-central-react' import { useApp } from '../app' export function useResources() { diff --git a/apps/renterd/contexts/config/useSyncContractSet.tsx b/apps/renterd/contexts/config/useSyncContractSet.tsx index ecd52b9fd..28251e865 100644 --- a/apps/renterd/contexts/config/useSyncContractSet.tsx +++ b/apps/renterd/contexts/config/useSyncContractSet.tsx @@ -4,7 +4,7 @@ import { triggerSuccessToast, } from '@siafoundation/design-system' import { useCallback } from 'react' -import { useSettingUpdate } from '@siafoundation/react-renterd' +import { useSettingUpdate } from '@siafoundation/renterd-react' import useLocalStorageState from 'use-local-storage-state' import { transformUpContractSet } from '../../contexts/config/transform' import { useContractSetSettings } from '../../hooks/useContractSetSettings' diff --git a/apps/renterd/contexts/contracts/columns.tsx b/apps/renterd/contexts/contracts/columns.tsx index 761a9a758..14f899f24 100644 --- a/apps/renterd/contexts/contracts/columns.tsx +++ b/apps/renterd/contexts/contracts/columns.tsx @@ -15,7 +15,7 @@ import { ArrowUpLeft16, CheckmarkFilled16 } from '@siafoundation/react-icons' import { humanBytes, humanDate } from '@siafoundation/units' import { ContractData, TableColumnId } from './types' import { ContractContextMenu } from '../../components/Contracts/ContractContextMenu' -import { ContractState } from '@siafoundation/react-renterd' +import { ContractState } from '@siafoundation/renterd-react' import { cx } from 'class-variance-authority' type Context = { diff --git a/apps/renterd/contexts/contracts/index.tsx b/apps/renterd/contexts/contracts/index.tsx index e4c42d3b9..08de3f2ab 100644 --- a/apps/renterd/contexts/contracts/index.tsx +++ b/apps/renterd/contexts/contracts/index.tsx @@ -10,7 +10,7 @@ import { useRouter } from 'next/router' import { useContracts as useContractsData, useContractSets, -} from '@siafoundation/react-renterd' +} from '@siafoundation/renterd-react' import { createContext, useCallback, @@ -28,7 +28,7 @@ import { sortOptions, } from './types' import { columns } from './columns' -import { useSiaCentralHosts } from '@siafoundation/react-sia-central' +import { useSiaCentralHosts } from '@siafoundation/sia-central-react' import { useSyncStatus } from '../../hooks/useSyncStatus' import { useSiascanUrl } from '../../hooks/useSiascanUrl' import { blockHeightToTime } from '@siafoundation/units' diff --git a/apps/renterd/contexts/contracts/types.ts b/apps/renterd/contexts/contracts/types.ts index b56936507..f238d57b4 100644 --- a/apps/renterd/contexts/contracts/types.ts +++ b/apps/renterd/contexts/contracts/types.ts @@ -1,4 +1,4 @@ -import { ContractState } from '@siafoundation/react-renterd' +import { ContractState } from '@siafoundation/renterd-react' import BigNumber from 'bignumber.js' export type ContractData = { diff --git a/apps/renterd/contexts/contracts/useContractMetrics.tsx b/apps/renterd/contexts/contracts/useContractMetrics.tsx index a26f8c0b7..7643d56c3 100644 --- a/apps/renterd/contexts/contracts/useContractMetrics.tsx +++ b/apps/renterd/contexts/contracts/useContractMetrics.tsx @@ -10,7 +10,7 @@ import { import { ContractMetricsParams, useMetricsContract, -} from '@siafoundation/react-renterd' +} from '@siafoundation/renterd-react' import { useMemo } from 'react' import BigNumber from 'bignumber.js' import { ChartContractCategory, ChartContractKey } from './types' diff --git a/apps/renterd/contexts/contracts/useContractSetMetrics.tsx b/apps/renterd/contexts/contracts/useContractSetMetrics.tsx index a10638441..cc01dea00 100644 --- a/apps/renterd/contexts/contracts/useContractSetMetrics.tsx +++ b/apps/renterd/contexts/contracts/useContractSetMetrics.tsx @@ -9,7 +9,7 @@ import { import { useAutopilotConfig, useMetricsContractSet, -} from '@siafoundation/react-renterd' +} from '@siafoundation/renterd-react' import { useMemo } from 'react' import { ChartContractSetCategory, ChartContractSetKey } from './types' import { getTimeClampedToNearest5min } from './utils' diff --git a/apps/renterd/contexts/dialog.tsx b/apps/renterd/contexts/dialog.tsx index e16811839..b541b1c64 100644 --- a/apps/renterd/contexts/dialog.tsx +++ b/apps/renterd/contexts/dialog.tsx @@ -13,7 +13,7 @@ import { ContractsFilterAddressDialog } from '../components/Contracts/ContractsF import { ContractsFilterPublicKeyDialog } from '../components/Contracts/ContractsFilterPublicKeyDialog' import { ContractsFilterContractSetDialog } from '../components/Contracts/ContractsFilterContractSetDialog' import { FilesSearchDialog } from '../dialogs/FilesSearchDialog' -import { useSyncerConnect, useWallet } from '@siafoundation/react-renterd' +import { useSyncerConnect, useWallet } from '@siafoundation/renterd-react' import { RenterdSendSiacoinDialog } from '../dialogs/RenterdSendSiacoinDialog' import { RenterdTransactionDetailsDialog } from '../dialogs/RenterdTransactionDetailsDialog' import { HostsFilterPublicKeyDialog } from '../components/Hosts/HostsFilterPublicKeyDialog' diff --git a/apps/renterd/contexts/filesDirectory/dataset.tsx b/apps/renterd/contexts/filesDirectory/dataset.tsx index 6b73c8335..2a8b95759 100644 --- a/apps/renterd/contexts/filesDirectory/dataset.tsx +++ b/apps/renterd/contexts/filesDirectory/dataset.tsx @@ -1,7 +1,7 @@ import { ObjectDirectoryParams, useObjectDirectory, -} from '@siafoundation/react-renterd' +} from '@siafoundation/renterd-react' import { useDataset as useDatasetGeneric } from '../filesManager/dataset' import { bucketAndKeyParamsFromPath } from '../../lib/paths' import { useRouter } from 'next/router' diff --git a/apps/renterd/contexts/filesDirectory/move.tsx b/apps/renterd/contexts/filesDirectory/move.tsx index 100dbe4c4..b3cdca67e 100644 --- a/apps/renterd/contexts/filesDirectory/move.tsx +++ b/apps/renterd/contexts/filesDirectory/move.tsx @@ -8,7 +8,7 @@ import { DragCancelEvent, } from '@dnd-kit/core' import { FullPathSegments, getDirectorySegmentsFromPath } from '../../lib/paths' -import { useObjectRename } from '@siafoundation/react-renterd' +import { useObjectRename } from '@siafoundation/renterd-react' import { triggerErrorToast } from '@siafoundation/design-system' import { getMoveFileRenameParams } from '../../lib/rename' diff --git a/apps/renterd/contexts/filesFlat/dataset.tsx b/apps/renterd/contexts/filesFlat/dataset.tsx index 979b2ae38..e68166527 100644 --- a/apps/renterd/contexts/filesFlat/dataset.tsx +++ b/apps/renterd/contexts/filesFlat/dataset.tsx @@ -1,4 +1,4 @@ -import { ObjectListParams, useObjectList } from '@siafoundation/react-renterd' +import { ObjectListParams, useObjectList } from '@siafoundation/renterd-react' import { SortField } from '../filesManager/types' import { useDataset as useDatasetGeneric } from '../filesManager/dataset' import { useRouter } from 'next/router' diff --git a/apps/renterd/contexts/filesManager/dataset.tsx b/apps/renterd/contexts/filesManager/dataset.tsx index 7a6fa6dc1..07b33dbd1 100644 --- a/apps/renterd/contexts/filesManager/dataset.tsx +++ b/apps/renterd/contexts/filesManager/dataset.tsx @@ -1,4 +1,4 @@ -import { ObjEntry } from '@siafoundation/react-renterd' +import { ObjEntry } from '@siafoundation/renterd-react' import { sortBy, toPairs } from '@technically/lodash' import useSWR from 'swr' import { useContracts } from '../contracts' diff --git a/apps/renterd/contexts/filesManager/downloads.tsx b/apps/renterd/contexts/filesManager/downloads.tsx index f6457a7c9..78258362c 100644 --- a/apps/renterd/contexts/filesManager/downloads.tsx +++ b/apps/renterd/contexts/filesManager/downloads.tsx @@ -1,6 +1,6 @@ import { triggerErrorToast, triggerToast } from '@siafoundation/design-system' import { useAppSettings } from '@siafoundation/react-core' -import { useBuckets, useObjectDownloadFunc } from '@siafoundation/react-renterd' +import { useBuckets, useObjectDownloadFunc } from '@siafoundation/renterd-react' import { throttle } from '@technically/lodash' import { useCallback, useMemo, useState } from 'react' import { diff --git a/apps/renterd/contexts/filesManager/index.tsx b/apps/renterd/contexts/filesManager/index.tsx index a3c80dac8..8ad68ab1c 100644 --- a/apps/renterd/contexts/filesManager/index.tsx +++ b/apps/renterd/contexts/filesManager/index.tsx @@ -20,7 +20,7 @@ import { } from '../../lib/paths' import { useUploads } from './uploads' import { useDownloads } from './downloads' -import { useBuckets } from '@siafoundation/react-renterd' +import { useBuckets } from '@siafoundation/renterd-react' import { routes } from '../../config/routes' import useLocalStorageState from 'use-local-storage-state' diff --git a/apps/renterd/contexts/filesManager/types.ts b/apps/renterd/contexts/filesManager/types.ts index 360d3030e..cf7542bc4 100644 --- a/apps/renterd/contexts/filesManager/types.ts +++ b/apps/renterd/contexts/filesManager/types.ts @@ -1,4 +1,4 @@ -import { Bucket } from '@siafoundation/react-renterd' +import { Bucket } from '@siafoundation/renterd-react' import { FullPath } from '../../lib/paths' import { TableColumn } from '@siafoundation/design-system' import { MultipartUpload } from '../../lib/multipartUpload' diff --git a/apps/renterd/contexts/filesManager/uploads.tsx b/apps/renterd/contexts/filesManager/uploads.tsx index d15dbb30f..12ecdd942 100644 --- a/apps/renterd/contexts/filesManager/uploads.tsx +++ b/apps/renterd/contexts/filesManager/uploads.tsx @@ -9,7 +9,7 @@ import { useMultipartUploadPart, useMultipartUploadComplete, useMultipartUploadCreate, -} from '@siafoundation/react-renterd' +} from '@siafoundation/renterd-react' import { throttle } from '@technically/lodash' import { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { ObjectUploadData, UploadsMap } from './types' diff --git a/apps/renterd/contexts/hosts/columns.tsx b/apps/renterd/contexts/hosts/columns.tsx index 1650bb869..27509a81f 100644 --- a/apps/renterd/contexts/hosts/columns.tsx +++ b/apps/renterd/contexts/hosts/columns.tsx @@ -25,7 +25,7 @@ import { RhpScanRequest, useHostsAllowlist, workerRhpScanRoute, -} from '@siafoundation/react-renterd' +} from '@siafoundation/renterd-react' import BigNumber from 'bignumber.js' import React, { memo } from 'react' diff --git a/apps/renterd/contexts/hosts/dataset.ts b/apps/renterd/contexts/hosts/dataset.ts index 63c2987e5..ca0272d92 100644 --- a/apps/renterd/contexts/hosts/dataset.ts +++ b/apps/renterd/contexts/hosts/dataset.ts @@ -7,7 +7,7 @@ import { useHostsAllowlist, useHostsBlocklist, useHostsSearch, -} from '@siafoundation/react-renterd' +} from '@siafoundation/renterd-react' import { ContractData } from '../contracts/types' import { useApp } from '../app' import { SiaCentralHost } from '@siafoundation/sia-central' diff --git a/apps/renterd/contexts/hosts/index.tsx b/apps/renterd/contexts/hosts/index.tsx index e42e913c3..8438d8b3b 100644 --- a/apps/renterd/contexts/hosts/index.tsx +++ b/apps/renterd/contexts/hosts/index.tsx @@ -12,7 +12,7 @@ import { useHostsAllowlist, useHostsBlocklist, useHostsSearch, -} from '@siafoundation/react-renterd' +} from '@siafoundation/renterd-react' import { createContext, useCallback, @@ -35,7 +35,7 @@ import { useDataset } from './dataset' import { useApp } from '../app' import { useAppSettings } from '@siafoundation/react-core' import { Commands, emptyCommands } from '../../components/Hosts/HostMap/Globe' -import { useSiaCentralHosts } from '@siafoundation/react-sia-central' +import { useSiaCentralHosts } from '@siafoundation/sia-central-react' import { useSiascanUrl } from '../../hooks/useSiascanUrl' import { defaultDatasetRefreshInterval } from '../../config/swr' diff --git a/apps/renterd/contexts/hosts/types.tsx b/apps/renterd/contexts/hosts/types.tsx index b8204fca1..8e04972b8 100644 --- a/apps/renterd/contexts/hosts/types.tsx +++ b/apps/renterd/contexts/hosts/types.tsx @@ -1,4 +1,4 @@ -import { AutopilotHost } from '@siafoundation/react-renterd' +import { AutopilotHost } from '@siafoundation/renterd-react' import BigNumber from 'bignumber.js' import { ContractData } from '../contracts/types' diff --git a/apps/renterd/contexts/transactions/index.tsx b/apps/renterd/contexts/transactions/index.tsx index 046dd36f4..588bd3d04 100644 --- a/apps/renterd/contexts/transactions/index.tsx +++ b/apps/renterd/contexts/transactions/index.tsx @@ -9,7 +9,7 @@ import { useMetricsWallet, useWalletPending, useWalletTransactions, -} from '@siafoundation/react-renterd' +} from '@siafoundation/renterd-react' import { createContext, useContext, useMemo } from 'react' import { useDialog } from '../dialog' import BigNumber from 'bignumber.js' diff --git a/apps/renterd/contexts/uploads/index.tsx b/apps/renterd/contexts/uploads/index.tsx index 8b25748f5..0c2852896 100644 --- a/apps/renterd/contexts/uploads/index.tsx +++ b/apps/renterd/contexts/uploads/index.tsx @@ -7,7 +7,7 @@ import { useSearchParams } from '@siafoundation/next' import { useMultipartUploadAbort, useMultipartUploadListUploads, -} from '@siafoundation/react-renterd' +} from '@siafoundation/renterd-react' import { createContext, useCallback, useContext, useMemo } from 'react' import { columnsDefaultVisible, defaultSortField, sortOptions } from './types' import { columns } from './columns' diff --git a/apps/renterd/dialogs/FileRenameDialog.tsx b/apps/renterd/dialogs/FileRenameDialog.tsx index 9d55c33d4..2111c906f 100644 --- a/apps/renterd/dialogs/FileRenameDialog.tsx +++ b/apps/renterd/dialogs/FileRenameDialog.tsx @@ -10,7 +10,7 @@ import { import { useCallback, useEffect, useMemo } from 'react' import { useForm } from 'react-hook-form' import { useDialog } from '../contexts/dialog' -import { useObjectRename } from '@siafoundation/react-renterd' +import { useObjectRename } from '@siafoundation/renterd-react' import { getFilename, isDirectory } from '../lib/paths' import { getRenameFileRenameParams } from '../lib/rename' import { useFilesDirectory } from '../contexts/filesDirectory' diff --git a/apps/renterd/dialogs/FilesBucketCreateDialog.tsx b/apps/renterd/dialogs/FilesBucketCreateDialog.tsx index cede1f2a4..fd10907af 100644 --- a/apps/renterd/dialogs/FilesBucketCreateDialog.tsx +++ b/apps/renterd/dialogs/FilesBucketCreateDialog.tsx @@ -11,7 +11,7 @@ import { import { useCallback, useMemo } from 'react' import { useForm } from 'react-hook-form' import { useDialog } from '../contexts/dialog' -import { useBucketCreate } from '@siafoundation/react-renterd' +import { useBucketCreate } from '@siafoundation/renterd-react' const defaultValues = { name: '', diff --git a/apps/renterd/dialogs/FilesBucketDeleteDialog.tsx b/apps/renterd/dialogs/FilesBucketDeleteDialog.tsx index 4831f732a..3a106cb6b 100644 --- a/apps/renterd/dialogs/FilesBucketDeleteDialog.tsx +++ b/apps/renterd/dialogs/FilesBucketDeleteDialog.tsx @@ -12,7 +12,7 @@ import { import { useCallback, useMemo } from 'react' import { useForm } from 'react-hook-form' import { useDialog } from '../contexts/dialog' -import { useBucketDelete } from '@siafoundation/react-renterd' +import { useBucketDelete } from '@siafoundation/renterd-react' const defaultValues = { name: '', diff --git a/apps/renterd/dialogs/FilesBucketPolicyDialog.tsx b/apps/renterd/dialogs/FilesBucketPolicyDialog.tsx index 77c993b52..b48521dba 100644 --- a/apps/renterd/dialogs/FilesBucketPolicyDialog.tsx +++ b/apps/renterd/dialogs/FilesBucketPolicyDialog.tsx @@ -11,7 +11,7 @@ import { import { useCallback, useEffect, useMemo } from 'react' import { useForm } from 'react-hook-form' import { useDialog } from '../contexts/dialog' -import { useBucket, useBucketPolicyUpdate } from '@siafoundation/react-renterd' +import { useBucket, useBucketPolicyUpdate } from '@siafoundation/renterd-react' const defaultValues = { visibility: 'public', diff --git a/apps/renterd/dialogs/FilesCreateDirectoryDialog.tsx b/apps/renterd/dialogs/FilesCreateDirectoryDialog.tsx index 0b554bc22..76971f9b6 100644 --- a/apps/renterd/dialogs/FilesCreateDirectoryDialog.tsx +++ b/apps/renterd/dialogs/FilesCreateDirectoryDialog.tsx @@ -5,7 +5,7 @@ import { triggerErrorToast, triggerSuccessToast, } from '@siafoundation/design-system' -import { useObjectUpload } from '@siafoundation/react-renterd' +import { useObjectUpload } from '@siafoundation/renterd-react' import { useFilesManager } from '../contexts/filesManager' import { useFormik } from 'formik' import * as Yup from 'yup' diff --git a/apps/renterd/dialogs/RenterdSendSiacoinDialog.tsx b/apps/renterd/dialogs/RenterdSendSiacoinDialog.tsx index c1f6858dd..56c9ce7b8 100644 --- a/apps/renterd/dialogs/RenterdSendSiacoinDialog.tsx +++ b/apps/renterd/dialogs/RenterdSendSiacoinDialog.tsx @@ -6,7 +6,7 @@ import { useWalletDiscard, useWalletFund, useWalletSign, -} from '@siafoundation/react-renterd' +} from '@siafoundation/renterd-react' import { useDialog } from '../contexts/dialog' import BigNumber from 'bignumber.js' diff --git a/apps/renterd/hooks/useAllowlistUpdate.tsx b/apps/renterd/hooks/useAllowlistUpdate.tsx index 86e1fd85f..edc5c5c14 100644 --- a/apps/renterd/hooks/useAllowlistUpdate.tsx +++ b/apps/renterd/hooks/useAllowlistUpdate.tsx @@ -3,7 +3,7 @@ import { triggerSuccessToast, truncate, } from '@siafoundation/design-system' -import { useHostsAllowlistUpdate } from '@siafoundation/react-renterd' +import { useHostsAllowlistUpdate } from '@siafoundation/renterd-react' import { useCallback } from 'react' export function useAllowlistUpdate() { diff --git a/apps/renterd/hooks/useBlocklistUpdate.tsx b/apps/renterd/hooks/useBlocklistUpdate.tsx index 4c3802081..75b7e2b9e 100644 --- a/apps/renterd/hooks/useBlocklistUpdate.tsx +++ b/apps/renterd/hooks/useBlocklistUpdate.tsx @@ -3,7 +3,7 @@ import { triggerToast, truncate, } from '@siafoundation/design-system' -import { useHostsBlocklistUpdate } from '@siafoundation/react-renterd' +import { useHostsBlocklistUpdate } from '@siafoundation/renterd-react' import { useCallback } from 'react' export function useBlocklistUpdate() { diff --git a/apps/renterd/hooks/useContractSetSettings.tsx b/apps/renterd/hooks/useContractSetSettings.tsx index bf36cfbfd..67e9d5092 100644 --- a/apps/renterd/hooks/useContractSetSettings.tsx +++ b/apps/renterd/hooks/useContractSetSettings.tsx @@ -1,5 +1,5 @@ import { HookArgsSwr } from '@siafoundation/react-core' -import { ContractSetSettings, useSetting } from '@siafoundation/react-renterd' +import { ContractSetSettings, useSetting } from '@siafoundation/renterd-react' export function useContractSetSettings( args?: HookArgsSwr diff --git a/apps/renterd/hooks/useGougingSettings.tsx b/apps/renterd/hooks/useGougingSettings.tsx index 2a01816e6..79f3df0fe 100644 --- a/apps/renterd/hooks/useGougingSettings.tsx +++ b/apps/renterd/hooks/useGougingSettings.tsx @@ -1,5 +1,5 @@ import { HookArgsSwr } from '@siafoundation/react-core' -import { GougingSettings, useSetting } from '@siafoundation/react-renterd' +import { GougingSettings, useSetting } from '@siafoundation/renterd-react' export function useGougingSettings(args?: HookArgsSwr) { return useSetting({ diff --git a/apps/renterd/hooks/useIsApcsEqDcs.tsx b/apps/renterd/hooks/useIsApcsEqDcs.tsx index 558667df7..4c7166c69 100644 --- a/apps/renterd/hooks/useIsApcsEqDcs.tsx +++ b/apps/renterd/hooks/useIsApcsEqDcs.tsx @@ -1,4 +1,4 @@ -import { useAutopilotConfig } from '@siafoundation/react-renterd' +import { useAutopilotConfig } from '@siafoundation/renterd-react' import { useApp } from '../contexts/app' import { useContractSetSettings } from './useContractSetSettings' diff --git a/apps/renterd/hooks/useRedundancySettings.tsx b/apps/renterd/hooks/useRedundancySettings.tsx index 93102b9a9..79bd500c5 100644 --- a/apps/renterd/hooks/useRedundancySettings.tsx +++ b/apps/renterd/hooks/useRedundancySettings.tsx @@ -1,5 +1,5 @@ import { HookArgsSwr } from '@siafoundation/react-core' -import { RedundancySettings, useSetting } from '@siafoundation/react-renterd' +import { RedundancySettings, useSetting } from '@siafoundation/renterd-react' export function useRedundancySettings( args?: HookArgsSwr diff --git a/apps/renterd/hooks/useS3AuthenticationSettings.tsx b/apps/renterd/hooks/useS3AuthenticationSettings.tsx index 523b5b566..68ba9b822 100644 --- a/apps/renterd/hooks/useS3AuthenticationSettings.tsx +++ b/apps/renterd/hooks/useS3AuthenticationSettings.tsx @@ -2,7 +2,7 @@ import { HookArgsSwr } from '@siafoundation/react-core' import { S3AuthenticationSettings, useSetting, -} from '@siafoundation/react-renterd' +} from '@siafoundation/renterd-react' export function useS3AuthenticationSettings( args?: HookArgsSwr diff --git a/apps/renterd/hooks/useSiascanUrl.tsx b/apps/renterd/hooks/useSiascanUrl.tsx index 40d371f21..713a5c50c 100644 --- a/apps/renterd/hooks/useSiascanUrl.tsx +++ b/apps/renterd/hooks/useSiascanUrl.tsx @@ -1,5 +1,5 @@ import { webLinks } from '@siafoundation/design-system' -import { useBusState } from '@siafoundation/react-renterd' +import { useBusState } from '@siafoundation/renterd-react' export function useSiascanUrl() { const network = useBusState() diff --git a/apps/renterd/hooks/useSyncStatus.ts b/apps/renterd/hooks/useSyncStatus.ts index a7ca10b63..c2d896a28 100644 --- a/apps/renterd/hooks/useSyncStatus.ts +++ b/apps/renterd/hooks/useSyncStatus.ts @@ -4,7 +4,7 @@ import { useConsensusState, useEstimatedNetworkBlockHeight, useWallet, -} from '@siafoundation/react-renterd' +} from '@siafoundation/renterd-react' export function useSyncStatus() { const { isUnlockedAndAuthedRoute } = useAppSettings() diff --git a/apps/renterd/hooks/useUploadPackingSettings.tsx b/apps/renterd/hooks/useUploadPackingSettings.tsx index 0ed57eee0..b1dccd4f0 100644 --- a/apps/renterd/hooks/useUploadPackingSettings.tsx +++ b/apps/renterd/hooks/useUploadPackingSettings.tsx @@ -1,5 +1,5 @@ import { HookArgsSwr } from '@siafoundation/react-core' -import { UploadPackingSettings, useSetting } from '@siafoundation/react-renterd' +import { UploadPackingSettings, useSetting } from '@siafoundation/renterd-react' export function useUploadPackingSettings( args?: HookArgsSwr diff --git a/apps/renterd/lib/health.ts b/apps/renterd/lib/health.ts index a73b20ab4..d54bb7c68 100644 --- a/apps/renterd/lib/health.ts +++ b/apps/renterd/lib/health.ts @@ -1,4 +1,4 @@ -import { Obj, SlabSlice } from '@siafoundation/react-renterd' +import { Obj, SlabSlice } from '@siafoundation/renterd-react' import { min } from '@technically/lodash' import { ContractData } from '../contexts/contracts/types' diff --git a/apps/renterd/lib/multipartUpload.ts b/apps/renterd/lib/multipartUpload.ts index 424d9e9d7..c3b15884e 100644 --- a/apps/renterd/lib/multipartUpload.ts +++ b/apps/renterd/lib/multipartUpload.ts @@ -5,7 +5,7 @@ import { useMultipartUploadPart, useMultipartUploadComplete, useMultipartUploadCreate, -} from '@siafoundation/react-renterd' +} from '@siafoundation/renterd-react' type ApiWorkerUploadPart = ReturnType type ApiBusUploadComplete = ReturnType diff --git a/apps/renterd/mock/mock.tsx b/apps/renterd/mock/mock.tsx index c25334ded..4f9714cda 100644 --- a/apps/renterd/mock/mock.tsx +++ b/apps/renterd/mock/mock.tsx @@ -1,6 +1,6 @@ import { SetupServer } from 'msw/node' import { HttpResponse, http } from 'msw' -import { Bucket, RedundancySettings } from '@siafoundation/react-renterd' +import { Bucket, RedundancySettings } from '@siafoundation/renterd-react' export function mockApiBusBuckets(server: SetupServer) { server.use( diff --git a/apps/walletd-e2e/src/fixtures/createWallet.ts b/apps/walletd-e2e/src/fixtures/createWallet.ts index 2c33c143f..7c157b0d9 100644 --- a/apps/walletd-e2e/src/fixtures/createWallet.ts +++ b/apps/walletd-e2e/src/fixtures/createWallet.ts @@ -1,12 +1,12 @@ import { expect, Page } from '@playwright/test' -import { mockApiWallet, mockApiWallets } from '@siafoundation/mock-walletd' +import { mockApiWallet, mockApiWallets } from '@siafoundation/walletd-mock' import { Wallet, WalletAddressesResponse, WalletBalanceResponse, WalletFundResponse, WalletOutputsSiacoinResponse, -} from '@siafoundation/react-walletd' +} from '@siafoundation/walletd-react' export async function createWallet({ page, diff --git a/apps/walletd-e2e/src/fixtures/navigateToWallet.ts b/apps/walletd-e2e/src/fixtures/navigateToWallet.ts index 4fc6bef93..9baff3556 100644 --- a/apps/walletd-e2e/src/fixtures/navigateToWallet.ts +++ b/apps/walletd-e2e/src/fixtures/navigateToWallet.ts @@ -1,5 +1,5 @@ import { Page } from '@playwright/test' -import { Wallet } from '@siafoundation/react-walletd' +import { Wallet } from '@siafoundation/walletd-react' export async function navigateToWallet({ page, diff --git a/apps/walletd-e2e/src/specs/login.spec.ts b/apps/walletd-e2e/src/specs/login.spec.ts index 1ca30b52c..00ec0011e 100644 --- a/apps/walletd-e2e/src/specs/login.spec.ts +++ b/apps/walletd-e2e/src/specs/login.spec.ts @@ -1,5 +1,5 @@ import { test, expect } from '@playwright/test' -import { mockApiDefaults } from '@siafoundation/mock-walletd' +import { mockApiDefaults } from '@siafoundation/walletd-mock' import { login } from '../fixtures/login' test('login', async ({ page }) => { diff --git a/apps/walletd-e2e/src/specs/seedGenerateAddresses.spec.ts b/apps/walletd-e2e/src/specs/seedGenerateAddresses.spec.ts index b72f8ae7e..df7ad7207 100644 --- a/apps/walletd-e2e/src/specs/seedGenerateAddresses.spec.ts +++ b/apps/walletd-e2e/src/specs/seedGenerateAddresses.spec.ts @@ -6,8 +6,8 @@ import { getMockScenarioSeedWallet, mockApiDefaults, getMockRescanResponse, -} from '@siafoundation/mock-walletd' -import { WalletAddressesResponse } from '@siafoundation/react-walletd' +} from '@siafoundation/walletd-mock' +import { WalletAddressesResponse } from '@siafoundation/walletd-react' function getMockWalletAddressesResponse(): WalletAddressesResponse { return [] diff --git a/apps/walletd-e2e/src/specs/seedSendSiacoin.spec.ts b/apps/walletd-e2e/src/specs/seedSendSiacoin.spec.ts index c76368933..a89d309e3 100644 --- a/apps/walletd-e2e/src/specs/seedSendSiacoin.spec.ts +++ b/apps/walletd-e2e/src/specs/seedSendSiacoin.spec.ts @@ -6,7 +6,7 @@ import { fillComposeTransactionSiacoin } from '../fixtures/sendSiacoinDialog' import { getMockScenarioSeedWallet, mockApiDefaults, -} from '@siafoundation/mock-walletd' +} from '@siafoundation/walletd-mock' function getDefaultMockWalletResponses( mocks: ReturnType diff --git a/apps/walletd-e2e/src/specs/walletCreate.spec.ts b/apps/walletd-e2e/src/specs/walletCreate.spec.ts index b6cef9f0e..548132c2d 100644 --- a/apps/walletd-e2e/src/specs/walletCreate.spec.ts +++ b/apps/walletd-e2e/src/specs/walletCreate.spec.ts @@ -4,7 +4,7 @@ import { createWallet } from '../fixtures/createWallet' import { getMockScenarioSeedWallet, mockApiDefaults, -} from '@siafoundation/mock-walletd' +} from '@siafoundation/walletd-mock' test('wallet create', async ({ page }) => { const mocks = getMockScenarioSeedWallet() diff --git a/apps/walletd/components/Node/index.tsx b/apps/walletd/components/Node/index.tsx index 84e6018ac..9e023c96e 100644 --- a/apps/walletd/components/Node/index.tsx +++ b/apps/walletd/components/Node/index.tsx @@ -3,7 +3,7 @@ import { useConsensusTip, useSyncerPeers, useTxPoolTransactions, -} from '@siafoundation/react-walletd' +} from '@siafoundation/walletd-react' import { routes } from '../../config/routes' import { useDialog } from '../../contexts/dialog' import { WalletdSidenav } from '../WalletdSidenav' diff --git a/apps/walletd/components/Profile/index.tsx b/apps/walletd/components/Profile/index.tsx index 2821c7f7d..c79c21b20 100644 --- a/apps/walletd/components/Profile/index.tsx +++ b/apps/walletd/components/Profile/index.tsx @@ -4,7 +4,7 @@ import { useConsensusNetwork, useNodeState, useSyncerPeers, -} from '@siafoundation/react-walletd' +} from '@siafoundation/walletd-react' import { useDialog } from '../../contexts/dialog' import { humanTime } from '@siafoundation/units' diff --git a/apps/walletd/components/RescanStatus.tsx b/apps/walletd/components/RescanStatus.tsx index f84ecf5e7..14d674f0f 100644 --- a/apps/walletd/components/RescanStatus.tsx +++ b/apps/walletd/components/RescanStatus.tsx @@ -4,7 +4,7 @@ import { Separator, Text, } from '@siafoundation/design-system' -import { useRescanStatus } from '@siafoundation/react-walletd' +import { useRescanStatus } from '@siafoundation/walletd-react' import { useSyncStatus } from '../hooks/useSyncStatus' import { formatRelative } from 'date-fns' import { defaultDatasetRefreshInterval } from '../config/swr' diff --git a/apps/walletd/components/Wallet/WalletActionsMenu.tsx b/apps/walletd/components/Wallet/WalletActionsMenu.tsx index 21a1476b8..24eb62289 100644 --- a/apps/walletd/components/Wallet/WalletActionsMenu.tsx +++ b/apps/walletd/components/Wallet/WalletActionsMenu.tsx @@ -8,7 +8,7 @@ import { useSyncStatus } from '../../hooks/useSyncStatus' import BigNumber from 'bignumber.js' import { AddressesButton } from './AddressesButton' import { EventsViewDropdownMenu } from './EventsViewDropdownMenu' -import { useWalletBalance } from '@siafoundation/react-walletd' +import { useWalletBalance } from '@siafoundation/walletd-react' import { useRouter } from 'next/router' import { useWallets } from '../../contexts/wallets' import { useDialog } from '../../contexts/dialog' diff --git a/apps/walletd/components/WalletAddresses/AddressContextMenu.tsx b/apps/walletd/components/WalletAddresses/AddressContextMenu.tsx index 3c5e2a943..8d38389fd 100644 --- a/apps/walletd/components/WalletAddresses/AddressContextMenu.tsx +++ b/apps/walletd/components/WalletAddresses/AddressContextMenu.tsx @@ -9,7 +9,7 @@ import { stripPrefix, } from '@siafoundation/design-system' import { Delete16 } from '@siafoundation/react-icons' -import { useWalletAddressDelete } from '@siafoundation/react-walletd' +import { useWalletAddressDelete } from '@siafoundation/walletd-react' import { AddressData } from '../../contexts/addresses/types' import { useDialog } from '../../contexts/dialog' diff --git a/apps/walletd/components/WalletdTestnetWarningBanner.tsx b/apps/walletd/components/WalletdTestnetWarningBanner.tsx index 78e7e98db..fa6e7073c 100644 --- a/apps/walletd/components/WalletdTestnetWarningBanner.tsx +++ b/apps/walletd/components/WalletdTestnetWarningBanner.tsx @@ -1,5 +1,5 @@ import { TestnetWarningBanner } from '@siafoundation/design-system' -import { useConsensusNetwork } from '@siafoundation/react-walletd' +import { useConsensusNetwork } from '@siafoundation/walletd-react' export function WalletdTestnetWarningBanner() { const network = useConsensusNetwork({ diff --git a/apps/walletd/config/routes.ts b/apps/walletd/config/routes.ts index 9cbbbbd06..1ba0cf289 100644 --- a/apps/walletd/config/routes.ts +++ b/apps/walletd/config/routes.ts @@ -1,4 +1,4 @@ -import { syncerPeersKey } from '@siafoundation/react-walletd' +import { syncerPeersKey } from '@siafoundation/walletd-react' export const routes = { home: '/', diff --git a/apps/walletd/contexts/addresses/dataset.tsx b/apps/walletd/contexts/addresses/dataset.tsx index 430543a06..59727a9cc 100644 --- a/apps/walletd/contexts/addresses/dataset.tsx +++ b/apps/walletd/contexts/addresses/dataset.tsx @@ -6,7 +6,7 @@ import { WalletAddressMetadata, WalletAddressesResponse, useWalletAddresses, -} from '@siafoundation/react-walletd' +} from '@siafoundation/walletd-react' import { useMemo } from 'react' import { AddressData } from './types' import { OpenDialog, useDialog } from '../dialog' diff --git a/apps/walletd/contexts/addresses/index.tsx b/apps/walletd/contexts/addresses/index.tsx index bb943c2cc..13d776cc5 100644 --- a/apps/walletd/contexts/addresses/index.tsx +++ b/apps/walletd/contexts/addresses/index.tsx @@ -3,7 +3,7 @@ import { useClientFilters, useClientFilteredDataset, } from '@siafoundation/design-system' -import { useWalletAddresses } from '@siafoundation/react-walletd' +import { useWalletAddresses } from '@siafoundation/walletd-react' import { createContext, useContext, useMemo } from 'react' import { AddressData, diff --git a/apps/walletd/contexts/addresses/types.ts b/apps/walletd/contexts/addresses/types.ts index 5fa488856..584759329 100644 --- a/apps/walletd/contexts/addresses/types.ts +++ b/apps/walletd/contexts/addresses/types.ts @@ -1,7 +1,7 @@ import { WalletAddress, WalletAddressMetadata, -} from '@siafoundation/react-walletd' +} from '@siafoundation/walletd-react' export type CellContext = { siascanUrl: string diff --git a/apps/walletd/contexts/dialog.tsx b/apps/walletd/contexts/dialog.tsx index 5c4318259..62c2c869d 100644 --- a/apps/walletd/contexts/dialog.tsx +++ b/apps/walletd/contexts/dialog.tsx @@ -5,7 +5,7 @@ import { SyncerConnectPeerDialog, SyncerConnectPeerDialogParams, } from '@siafoundation/design-system' -import { useSyncerConnect } from '@siafoundation/react-walletd' +import { useSyncerConnect } from '@siafoundation/walletd-react' import { WalletAddTypeDialog, WalletAddTypeDialogParams, diff --git a/apps/walletd/contexts/events/index.tsx b/apps/walletd/contexts/events/index.tsx index ac85bf168..dc2a93a65 100644 --- a/apps/walletd/contexts/events/index.tsx +++ b/apps/walletd/contexts/events/index.tsx @@ -3,7 +3,7 @@ import { useDatasetEmptyState, useServerFilters, } from '@siafoundation/design-system' -import { useWalletEvents, useWalletTxPool } from '@siafoundation/react-walletd' +import { useWalletEvents, useWalletTxPool } from '@siafoundation/walletd-react' import { createContext, useContext, useMemo } from 'react' import { CellContext, diff --git a/apps/walletd/contexts/wallets/columns.tsx b/apps/walletd/contexts/wallets/columns.tsx index e6326862a..4c1e17c14 100644 --- a/apps/walletd/contexts/wallets/columns.tsx +++ b/apps/walletd/contexts/wallets/columns.tsx @@ -13,7 +13,7 @@ import { humanDate } from '@siafoundation/units' import { humanTimeAndUnits } from '../../lib/time' import { walletTypes } from '../../config/walletTypes' import { WalletData, TableColumnId } from './types' -import { useWalletBalance } from '@siafoundation/react-walletd' +import { useWalletBalance } from '@siafoundation/walletd-react' import BigNumber from 'bignumber.js' import { WalletContextMenu } from '../../components/WalletContextMenu' diff --git a/apps/walletd/contexts/wallets/index.tsx b/apps/walletd/contexts/wallets/index.tsx index b6ae556b6..59f697987 100644 --- a/apps/walletd/contexts/wallets/index.tsx +++ b/apps/walletd/contexts/wallets/index.tsx @@ -7,7 +7,7 @@ import { import { WalletMetadata, useWallets as useWalletsData, -} from '@siafoundation/react-walletd' +} from '@siafoundation/walletd-react' import { createContext, useContext, useEffect, useMemo } from 'react' import { WalletData, diff --git a/apps/walletd/contexts/wallets/types.ts b/apps/walletd/contexts/wallets/types.ts index 7afdc3782..f740cd9a4 100644 --- a/apps/walletd/contexts/wallets/types.ts +++ b/apps/walletd/contexts/wallets/types.ts @@ -1,4 +1,4 @@ -import { Wallet, WalletMetadata } from '@siafoundation/react-walletd' +import { Wallet, WalletMetadata } from '@siafoundation/walletd-react' export type WalletData = { id: string diff --git a/apps/walletd/dialogs/AddressRemoveDialog.tsx b/apps/walletd/dialogs/AddressRemoveDialog.tsx index 247215848..3e8ea3afb 100644 --- a/apps/walletd/dialogs/AddressRemoveDialog.tsx +++ b/apps/walletd/dialogs/AddressRemoveDialog.tsx @@ -10,7 +10,7 @@ import { triggerErrorToast, stripPrefix, } from '@siafoundation/design-system' -import { useWalletAddressDelete } from '@siafoundation/react-walletd' +import { useWalletAddressDelete } from '@siafoundation/walletd-react' import { useCallback, useMemo } from 'react' import { useForm } from 'react-hook-form' import { useDialog } from '../contexts/dialog' diff --git a/apps/walletd/dialogs/AddressUpdateDialog/index.tsx b/apps/walletd/dialogs/AddressUpdateDialog/index.tsx index 2258a86ba..2340fb934 100644 --- a/apps/walletd/dialogs/AddressUpdateDialog/index.tsx +++ b/apps/walletd/dialogs/AddressUpdateDialog/index.tsx @@ -11,7 +11,7 @@ import { } from '@siafoundation/design-system' import { useCallback } from 'react' import { useForm } from 'react-hook-form' -import { useWalletAddressAdd } from '@siafoundation/react-walletd' +import { useWalletAddressAdd } from '@siafoundation/walletd-react' import { useDialog } from '../../contexts/dialog' import { useWalletAddresses } from '../../hooks/useWalletAddresses' diff --git a/apps/walletd/dialogs/FieldRescan.tsx b/apps/walletd/dialogs/FieldRescan.tsx index 93a1f6712..d5ca760c9 100644 --- a/apps/walletd/dialogs/FieldRescan.tsx +++ b/apps/walletd/dialogs/FieldRescan.tsx @@ -10,7 +10,7 @@ import { } from '@siafoundation/design-system' import { Path, UseFormReturn } from 'react-hook-form' import BigNumber from 'bignumber.js' -import { useRescanStart } from '@siafoundation/react-walletd' +import { useRescanStart } from '@siafoundation/walletd-react' import { CalloutWarning } from './CalloutWarning' export function getRescanFields() { diff --git a/apps/walletd/dialogs/WalletAddLedgerDialog/index.tsx b/apps/walletd/dialogs/WalletAddLedgerDialog/index.tsx index ed405ead4..118867cb0 100644 --- a/apps/walletd/dialogs/WalletAddLedgerDialog/index.tsx +++ b/apps/walletd/dialogs/WalletAddLedgerDialog/index.tsx @@ -17,7 +17,7 @@ import { WalletMetadata, useWalletAdd, useWalletAddressAdd, -} from '@siafoundation/react-walletd' +} from '@siafoundation/walletd-react' import { useDialog } from '../../contexts/dialog' import { useWallets } from '../../contexts/wallets' import { walletAddTypes } from '../../config/walletTypes' diff --git a/apps/walletd/dialogs/WalletAddNewDialog/index.tsx b/apps/walletd/dialogs/WalletAddNewDialog/index.tsx index 94f8d9777..79793ad79 100644 --- a/apps/walletd/dialogs/WalletAddNewDialog/index.tsx +++ b/apps/walletd/dialogs/WalletAddNewDialog/index.tsx @@ -13,7 +13,7 @@ import { import { Redo16, Copy16 } from '@siafoundation/react-icons' import { MouseEvent, useCallback, useEffect } from 'react' import { useForm } from 'react-hook-form' -import { WalletMetadata, useWalletAdd } from '@siafoundation/react-walletd' +import { WalletMetadata, useWalletAdd } from '@siafoundation/walletd-react' import { useDialog } from '../../contexts/dialog' import { useWallets } from '../../contexts/wallets' import { walletAddTypes } from '../../config/walletTypes' diff --git a/apps/walletd/dialogs/WalletAddRecoverDialog/index.tsx b/apps/walletd/dialogs/WalletAddRecoverDialog/index.tsx index df65572a6..766bf41fa 100644 --- a/apps/walletd/dialogs/WalletAddRecoverDialog/index.tsx +++ b/apps/walletd/dialogs/WalletAddRecoverDialog/index.tsx @@ -12,7 +12,7 @@ import { useCallback } from 'react' import { useForm } from 'react-hook-form' import { useDialog } from '../../contexts/dialog' import { useWallets } from '../../contexts/wallets' -import { WalletMetadata, useWalletAdd } from '@siafoundation/react-walletd' +import { WalletMetadata, useWalletAdd } from '@siafoundation/walletd-react' import { blake2bHex } from 'blakejs' import { SeedLayout } from '../SeedLayout' import { SeedIcon } from '@siafoundation/react-icons' diff --git a/apps/walletd/dialogs/WalletAddWatchDialog/index.tsx b/apps/walletd/dialogs/WalletAddWatchDialog/index.tsx index 3d98a6c1a..25fb586b3 100644 --- a/apps/walletd/dialogs/WalletAddWatchDialog/index.tsx +++ b/apps/walletd/dialogs/WalletAddWatchDialog/index.tsx @@ -11,7 +11,7 @@ import { } from '@siafoundation/design-system' import { useCallback } from 'react' import { useForm } from 'react-hook-form' -import { WalletMetadata, useWalletAdd } from '@siafoundation/react-walletd' +import { WalletMetadata, useWalletAdd } from '@siafoundation/walletd-react' import { useDialog } from '../../contexts/dialog' import { useWallets } from '../../contexts/wallets' import { walletAddTypes } from '../../config/walletTypes' diff --git a/apps/walletd/dialogs/WalletAddressesAddDialog.tsx b/apps/walletd/dialogs/WalletAddressesAddDialog.tsx index f05db55ff..10ffc9913 100644 --- a/apps/walletd/dialogs/WalletAddressesAddDialog.tsx +++ b/apps/walletd/dialogs/WalletAddressesAddDialog.tsx @@ -12,7 +12,7 @@ import { import { WalletAddressMetadata, useWalletAddressAdd, -} from '@siafoundation/react-walletd' +} from '@siafoundation/walletd-react' import { useCallback } from 'react' import { useForm } from 'react-hook-form' import { useWallets } from '../contexts/wallets' diff --git a/apps/walletd/dialogs/WalletAddressesGenerateLedgerDialog/index.tsx b/apps/walletd/dialogs/WalletAddressesGenerateLedgerDialog/index.tsx index 657a308d3..9b1f90f6d 100644 --- a/apps/walletd/dialogs/WalletAddressesGenerateLedgerDialog/index.tsx +++ b/apps/walletd/dialogs/WalletAddressesGenerateLedgerDialog/index.tsx @@ -14,7 +14,7 @@ import { import { WalletAddressMetadata, useWalletAddressAdd, -} from '@siafoundation/react-walletd' +} from '@siafoundation/walletd-react' import { useCallback, useEffect, useMemo, useState } from 'react' import { useForm } from 'react-hook-form' import { useWallets } from '../../contexts/wallets' diff --git a/apps/walletd/dialogs/WalletAddressesGenerateSeedDialog/index.tsx b/apps/walletd/dialogs/WalletAddressesGenerateSeedDialog/index.tsx index 56182d081..7b5aae5cd 100644 --- a/apps/walletd/dialogs/WalletAddressesGenerateSeedDialog/index.tsx +++ b/apps/walletd/dialogs/WalletAddressesGenerateSeedDialog/index.tsx @@ -10,7 +10,7 @@ import { import { WalletAddressMetadata, useWalletAddressAdd, -} from '@siafoundation/react-walletd' +} from '@siafoundation/walletd-react' import { useCallback, useEffect, useState } from 'react' import { useForm } from 'react-hook-form' import { useWallets } from '../../contexts/wallets' diff --git a/apps/walletd/dialogs/WalletRemoveDialog.tsx b/apps/walletd/dialogs/WalletRemoveDialog.tsx index 7e66455f5..49d952961 100644 --- a/apps/walletd/dialogs/WalletRemoveDialog.tsx +++ b/apps/walletd/dialogs/WalletRemoveDialog.tsx @@ -9,7 +9,7 @@ import { Code, triggerErrorToast, } from '@siafoundation/design-system' -import { useWalletDelete } from '@siafoundation/react-walletd' +import { useWalletDelete } from '@siafoundation/walletd-react' import { useRouter } from 'next/router' import { useCallback, useMemo } from 'react' import { useForm } from 'react-hook-form' diff --git a/apps/walletd/dialogs/WalletSendLedgerDialog/index.tsx b/apps/walletd/dialogs/WalletSendLedgerDialog/index.tsx index 0544094cc..bab064fe8 100644 --- a/apps/walletd/dialogs/WalletSendLedgerDialog/index.tsx +++ b/apps/walletd/dialogs/WalletSendLedgerDialog/index.tsx @@ -1,6 +1,6 @@ import BigNumber from 'bignumber.js' import { useMemo, useState } from 'react' -import { useWalletBalance } from '@siafoundation/react-walletd' +import { useWalletBalance } from '@siafoundation/walletd-react' import { useComposeForm } from '../_sharedWalletSend/useComposeForm' import { useSendForm } from './useSendForm' import { diff --git a/apps/walletd/dialogs/WalletSendLedgerDialog/useSign.tsx b/apps/walletd/dialogs/WalletSendLedgerDialog/useSign.tsx index 4bf4a50a8..f3b24cb11 100644 --- a/apps/walletd/dialogs/WalletSendLedgerDialog/useSign.tsx +++ b/apps/walletd/dialogs/WalletSendLedgerDialog/useSign.tsx @@ -2,7 +2,7 @@ import { Transaction } from '@siafoundation/types' import { useWalletOutputsSiacoin, useWalletOutputsSiafund, -} from '@siafoundation/react-walletd' +} from '@siafoundation/walletd-react' import { useWallets } from '../../contexts/wallets' import { useCallback } from 'react' import { useWalletAddresses } from '../../hooks/useWalletAddresses' diff --git a/apps/walletd/dialogs/WalletSendSeedDialog/index.tsx b/apps/walletd/dialogs/WalletSendSeedDialog/index.tsx index d4adfdcc5..2df4f756b 100644 --- a/apps/walletd/dialogs/WalletSendSeedDialog/index.tsx +++ b/apps/walletd/dialogs/WalletSendSeedDialog/index.tsx @@ -2,7 +2,7 @@ import BigNumber from 'bignumber.js' import { useMemo, useState } from 'react' import { useComposeForm } from '../_sharedWalletSend/useComposeForm' import { useSendForm } from './useSendForm' -import { useWalletBalance } from '@siafoundation/react-walletd' +import { useWalletBalance } from '@siafoundation/walletd-react' import { SendFlowDialog } from '../_sharedWalletSend/SendFlowDialog' import { SendParams, diff --git a/apps/walletd/dialogs/WalletSendSeedDialog/useSignAndBroadcast.tsx b/apps/walletd/dialogs/WalletSendSeedDialog/useSignAndBroadcast.tsx index 012272ca6..f83351d76 100644 --- a/apps/walletd/dialogs/WalletSendSeedDialog/useSignAndBroadcast.tsx +++ b/apps/walletd/dialogs/WalletSendSeedDialog/useSignAndBroadcast.tsx @@ -3,7 +3,7 @@ import { useWalletOutputsSiacoin, useConsensusTipState, useWalletOutputsSiafund, -} from '@siafoundation/react-walletd' +} from '@siafoundation/walletd-react' import { useWallets } from '../../contexts/wallets' import { useCallback } from 'react' import { signTransactionSeed } from '../../lib/signSeed' diff --git a/apps/walletd/dialogs/WalletUpdateDialog/index.tsx b/apps/walletd/dialogs/WalletUpdateDialog/index.tsx index 65749f52b..5bf0952cd 100644 --- a/apps/walletd/dialogs/WalletUpdateDialog/index.tsx +++ b/apps/walletd/dialogs/WalletUpdateDialog/index.tsx @@ -11,7 +11,7 @@ import { } from '@siafoundation/design-system' import { useCallback, useMemo } from 'react' import { useForm } from 'react-hook-form' -import { useWalletUpdate } from '@siafoundation/react-walletd' +import { useWalletUpdate } from '@siafoundation/walletd-react' import { useWallets } from '../../contexts/wallets' import { WalletData } from '../../contexts/wallets/types' diff --git a/apps/walletd/dialogs/_sharedWalletSend/useBroadcast.tsx b/apps/walletd/dialogs/_sharedWalletSend/useBroadcast.tsx index 1af876046..6d2ba1cc3 100644 --- a/apps/walletd/dialogs/_sharedWalletSend/useBroadcast.tsx +++ b/apps/walletd/dialogs/_sharedWalletSend/useBroadcast.tsx @@ -1,5 +1,5 @@ import { Transaction } from '@siafoundation/types' -import { useTxPoolBroadcast } from '@siafoundation/react-walletd' +import { useTxPoolBroadcast } from '@siafoundation/walletd-react' import { useCallback } from 'react' export function useBroadcast({ cancel }: { cancel: (t: Transaction) => void }) { diff --git a/apps/walletd/dialogs/_sharedWalletSend/useCancel.tsx b/apps/walletd/dialogs/_sharedWalletSend/useCancel.tsx index 29e5c4f7e..404139575 100644 --- a/apps/walletd/dialogs/_sharedWalletSend/useCancel.tsx +++ b/apps/walletd/dialogs/_sharedWalletSend/useCancel.tsx @@ -1,5 +1,5 @@ import { Transaction } from '@siafoundation/types' -import { useWalletRelease } from '@siafoundation/react-walletd' +import { useWalletRelease } from '@siafoundation/walletd-react' import { useWallets } from '../../contexts/wallets' import { useCallback } from 'react' import { triggerErrorToast } from '@siafoundation/design-system' diff --git a/apps/walletd/dialogs/_sharedWalletSend/useFund.tsx b/apps/walletd/dialogs/_sharedWalletSend/useFund.tsx index 9784f5e01..4077756b2 100644 --- a/apps/walletd/dialogs/_sharedWalletSend/useFund.tsx +++ b/apps/walletd/dialogs/_sharedWalletSend/useFund.tsx @@ -1,7 +1,7 @@ import { useWalletFundSiacoin, useWalletFundSiafund, -} from '@siafoundation/react-walletd' +} from '@siafoundation/walletd-react' import { useWallets } from '../../contexts/wallets' import { useCallback } from 'react' import { SendParams } from './types' diff --git a/apps/walletd/hooks/useSiascanUrl.ts b/apps/walletd/hooks/useSiascanUrl.ts index 9abfb3ed4..766282acf 100644 --- a/apps/walletd/hooks/useSiascanUrl.ts +++ b/apps/walletd/hooks/useSiascanUrl.ts @@ -1,5 +1,5 @@ import { webLinks } from '@siafoundation/design-system' -import { useConsensusNetwork } from '@siafoundation/react-walletd' +import { useConsensusNetwork } from '@siafoundation/walletd-react' export function useSiascanUrl() { const network = useConsensusNetwork() diff --git a/apps/walletd/hooks/useSyncStatus.ts b/apps/walletd/hooks/useSyncStatus.ts index 586246a52..a142bf87c 100644 --- a/apps/walletd/hooks/useSyncStatus.ts +++ b/apps/walletd/hooks/useSyncStatus.ts @@ -5,7 +5,7 @@ import { useConsensusTip, useConsensusTipState, useEstimatedNetworkBlockHeight, -} from '@siafoundation/react-walletd' +} from '@siafoundation/walletd-react' export function useSyncStatus() { const { isUnlockedAndAuthedRoute } = useAppSettings() diff --git a/apps/walletd/hooks/useWalletAddresses.tsx b/apps/walletd/hooks/useWalletAddresses.tsx index 2c9f26787..bedb3693f 100644 --- a/apps/walletd/hooks/useWalletAddresses.tsx +++ b/apps/walletd/hooks/useWalletAddresses.tsx @@ -1,4 +1,4 @@ -import { useWalletAddresses as useWalletAddressData } from '@siafoundation/react-walletd' +import { useWalletAddresses as useWalletAddressData } from '@siafoundation/walletd-react' import { defaultDatasetRefreshInterval } from '../config/swr' import { useDataset } from '../contexts/addresses/dataset' diff --git a/apps/walletd/lib/signLedger.spec.ts b/apps/walletd/lib/signLedger.spec.ts index 756d389c3..06336b748 100644 --- a/apps/walletd/lib/signLedger.spec.ts +++ b/apps/walletd/lib/signLedger.spec.ts @@ -1,7 +1,7 @@ import { initSDK } from '@siafoundation/sdk' import { signTransactionLedger } from './signLedger' import { getMockAddresses, getMockDevice } from './testMocks' -import { getMockScenarioSeedWallet } from '@siafoundation/mock-walletd' +import { getMockScenarioSeedWallet } from '@siafoundation/walletd-mock' beforeEach(async () => { await initSDK() diff --git a/apps/walletd/lib/signSeed.spec.ts b/apps/walletd/lib/signSeed.spec.ts index 17d7a41d2..b6e05d5fa 100644 --- a/apps/walletd/lib/signSeed.spec.ts +++ b/apps/walletd/lib/signSeed.spec.ts @@ -1,6 +1,6 @@ import { signTransactionSeed } from './signSeed' import { initSDK } from '@siafoundation/sdk' -import { getMockScenarioSeedWallet } from '@siafoundation/mock-walletd' +import { getMockScenarioSeedWallet } from '@siafoundation/walletd-mock' import { getMockAddresses } from './testMocks' beforeEach(async () => { diff --git a/apps/walletd/lib/testMocks.ts b/apps/walletd/lib/testMocks.ts index 322f28639..791b46b29 100644 --- a/apps/walletd/lib/testMocks.ts +++ b/apps/walletd/lib/testMocks.ts @@ -1,7 +1,7 @@ import Sia from '@siacentral/ledgerjs-sia' import { LedgerDevice } from '../contexts/ledger/types' import { transformAddressesResponse } from '../contexts/addresses/dataset' -import { Wallet, WalletAddressesResponse } from '@siafoundation/react-walletd' +import { Wallet, WalletAddressesResponse } from '@siafoundation/walletd-react' export function getMockDevice() { return { diff --git a/apps/website/components/Map/Globe.tsx b/apps/website/components/Map/Globe.tsx index d28f896f9..f1a004162 100644 --- a/apps/website/components/Map/Globe.tsx +++ b/apps/website/components/Map/Globe.tsx @@ -7,7 +7,7 @@ import earthDarkContrast from '../../assets/earth-dark-contrast.png' import earthTopology from '../../assets/earth-topology.png' import nightSky from '../../assets/night-sky.png' import { GlobeDyn } from './GlobeDyn' -import { useSiaCentralExchangeRates } from '@siafoundation/react-sia-central' +import { useSiaCentralExchangeRates } from '@siafoundation/sia-central-react' import { useDecRoutes } from './useRoutes' import { SiaCentralPartialHost } from '../../content/geoHosts' diff --git a/libs/design-system/CHANGELOG.md b/libs/design-system/CHANGELOG.md index 0679fe56c..1a0baae19 100644 --- a/libs/design-system/CHANGELOG.md +++ b/libs/design-system/CHANGELOG.md @@ -35,7 +35,7 @@ - Updated dependencies [40e402ad] - @siafoundation/units@3.0.0 - @siafoundation/react-core@1.1.0 - - @siafoundation/react-sia-central@3.0.0 + - @siafoundation/sia-central-react@3.0.0 ## 2.2.0 @@ -50,7 +50,7 @@ - @siafoundation/next@0.1.3 - @siafoundation/react-core@1.0.3 - @siafoundation/react-icons@0.2.3 - - @siafoundation/react-sia-central@2.0.3 + - @siafoundation/sia-central-react@2.0.3 - @siafoundation/types@0.1.3 - @siafoundation/units@2.0.3 @@ -81,7 +81,7 @@ - @siafoundation/next@0.1.2 - @siafoundation/react-core@1.0.2 - @siafoundation/react-icons@0.2.2 - - @siafoundation/react-sia-central@2.0.2 + - @siafoundation/sia-central-react@2.0.2 - @siafoundation/types@0.1.2 - @siafoundation/units@2.0.2 @@ -94,7 +94,7 @@ - @siafoundation/next@0.1.1 - @siafoundation/react-core@1.0.1 - @siafoundation/react-icons@0.2.1 - - @siafoundation/react-sia-central@2.0.1 + - @siafoundation/sia-central-react@2.0.1 - @siafoundation/types@0.1.1 - @siafoundation/units@2.0.1 @@ -110,7 +110,7 @@ - @siafoundation/next@0.1.0 - @siafoundation/react-core@1.0.0 - @siafoundation/react-icons@0.2.0 - - @siafoundation/react-sia-central@2.0.0 + - @siafoundation/sia-central-react@2.0.0 - @siafoundation/types@0.1.0 - @siafoundation/units@2.0.0 @@ -129,7 +129,7 @@ - @siafoundation/next@0.0.6 - @siafoundation/react-core@0.16.11 - @siafoundation/react-icons@0.1.6 - - @siafoundation/react-sia-central@1.0.6 + - @siafoundation/sia-central-react@1.0.6 - @siafoundation/types@0.0.7 - @siafoundation/units@1.0.6 @@ -143,7 +143,7 @@ - Updated dependencies [d0c8a592] - @siafoundation/react-core@0.16.0 - - @siafoundation/react-sia-central@1.0.0 + - @siafoundation/sia-central-react@1.0.0 - @siafoundation/units@1.0.0 ## 0.63.0 @@ -193,7 +193,7 @@ - Updated dependencies [1c376d0e] - @siafoundation/react-icons@0.1.0 - @siafoundation/sia-js@0.11.0 - - @siafoundation/react-sia-central@0.0.3 + - @siafoundation/sia-central-react@0.0.3 ## 0.58.0 @@ -205,7 +205,7 @@ - Updated dependencies [21972d75] - @siafoundation/react-core@0.15.0 - - @siafoundation/react-sia-central@0.0.2 + - @siafoundation/sia-central-react@0.0.2 ## 0.57.0 diff --git a/libs/design-system/package.json b/libs/design-system/package.json index 72066f400..e8cfecc3e 100644 --- a/libs/design-system/package.json +++ b/libs/design-system/package.json @@ -9,7 +9,7 @@ "@siafoundation/units": "^3.0.0", "@siafoundation/types": "^0.2.0", "@siafoundation/next": "^0.1.3", - "@siafoundation/react-sia-central": "^3.0.0", + "@siafoundation/sia-central-react": "^3.0.0", "react": "^18.2.0", "swr": "^2.1.1", "class-variance-authority": "^0.7.0", diff --git a/libs/design-system/src/components/ValueFiat.tsx b/libs/design-system/src/components/ValueFiat.tsx index 640a5ae1d..82bb0857d 100644 --- a/libs/design-system/src/components/ValueFiat.tsx +++ b/libs/design-system/src/components/ValueFiat.tsx @@ -1,6 +1,6 @@ 'use client' -import { useSiaCentralExchangeRates } from '@siafoundation/react-sia-central' +import { useSiaCentralExchangeRates } from '@siafoundation/sia-central-react' import { Text } from '../core/Text' import { Tooltip } from '../core/Tooltip' import BigNumber from 'bignumber.js' diff --git a/libs/design-system/src/components/ValueScFiat.tsx b/libs/design-system/src/components/ValueScFiat.tsx index 78d57a186..402e4e244 100644 --- a/libs/design-system/src/components/ValueScFiat.tsx +++ b/libs/design-system/src/components/ValueScFiat.tsx @@ -5,7 +5,7 @@ import BigNumber from 'bignumber.js' import { ValueSc } from './ValueSc' import { ValueFiat } from './ValueFiat' import { useAppSettings } from '@siafoundation/react-core' -import { useSiaCentralExchangeRates } from '@siafoundation/react-sia-central' +import { useSiaCentralExchangeRates } from '@siafoundation/sia-central-react' import { useMemo } from 'react' type Props = { diff --git a/libs/design-system/src/core/SiacoinField.tsx b/libs/design-system/src/core/SiacoinField.tsx index 2dcfe1be2..11e446252 100644 --- a/libs/design-system/src/core/SiacoinField.tsx +++ b/libs/design-system/src/core/SiacoinField.tsx @@ -5,7 +5,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react' import BigNumber from 'bignumber.js' import { cx } from 'class-variance-authority' import { toFixedMax } from '../lib/numbers' -import { useSiaCentralExchangeRates } from '@siafoundation/react-sia-central' +import { useSiaCentralExchangeRates } from '@siafoundation/sia-central-react' import { BaseNumberField } from './BaseNumberField' type Props = Omit< diff --git a/libs/design-system/src/hooks/useSiacoinFiat.tsx b/libs/design-system/src/hooks/useSiacoinFiat.tsx index 3b0d9522a..72291f4d3 100644 --- a/libs/design-system/src/hooks/useSiacoinFiat.tsx +++ b/libs/design-system/src/hooks/useSiacoinFiat.tsx @@ -1,7 +1,7 @@ import { CurrencyOption, useAppSettings } from '@siafoundation/react-core' import { useMemo } from 'react' import BigNumber from 'bignumber.js' -import { useSiaCentralExchangeRates } from '@siafoundation/react-sia-central' +import { useSiaCentralExchangeRates } from '@siafoundation/sia-central-react' type Props = { sc: BigNumber diff --git a/libs/mock-sia-central/.babelrc b/libs/hostd-react/.babelrc similarity index 100% rename from libs/mock-sia-central/.babelrc rename to libs/hostd-react/.babelrc diff --git a/libs/react-hostd/.eslintrc.json b/libs/hostd-react/.eslintrc.json similarity index 84% rename from libs/react-hostd/.eslintrc.json rename to libs/hostd-react/.eslintrc.json index 2bd439f18..895b98b54 100644 --- a/libs/react-hostd/.eslintrc.json +++ b/libs/hostd-react/.eslintrc.json @@ -5,7 +5,7 @@ "@nx/dependency-checks": [ "error", { - "ignoredFiles": ["libs/react-hostd/rollup.config.js"] + "ignoredFiles": ["libs/hostd-react/rollup.config.js"] } ] }, diff --git a/libs/react-hostd/CHANGELOG.md b/libs/hostd-react/CHANGELOG.md similarity index 98% rename from libs/react-hostd/CHANGELOG.md rename to libs/hostd-react/CHANGELOG.md index 5850478fc..5ecabe8d6 100644 --- a/libs/react-hostd/CHANGELOG.md +++ b/libs/hostd-react/CHANGELOG.md @@ -1,4 +1,4 @@ -# @siafoundation/react-hostd +# @siafoundation/hostd-react ## 4.0.0 diff --git a/libs/react-hostd/README.md b/libs/hostd-react/README.md similarity index 52% rename from libs/react-hostd/README.md rename to libs/hostd-react/README.md index 509914056..b19f96556 100644 --- a/libs/react-hostd/README.md +++ b/libs/hostd-react/README.md @@ -1,7 +1,7 @@ -# react-hostd +# hostd-react React hooks for interacting with `hostd`. ## Running unit tests -Run `nx test react-hostd` to execute the unit tests via [Jest](https://jestjs.io). +Run `nx test hostd-react` to execute the unit tests via [Jest](https://jestjs.io). diff --git a/libs/react-hostd/jest.config.ts b/libs/hostd-react/jest.config.ts similarity index 81% rename from libs/react-hostd/jest.config.ts rename to libs/hostd-react/jest.config.ts index db9792974..051244c54 100644 --- a/libs/react-hostd/jest.config.ts +++ b/libs/hostd-react/jest.config.ts @@ -1,6 +1,6 @@ /* eslint-disable */ export default { - displayName: 'react-hostd', + displayName: 'hostd-react', preset: '../../jest.preset.js', transform: { '^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nx/react/plugins/jest', @@ -13,5 +13,5 @@ export default { ], }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], - coverageDirectory: '../../coverage/libs/react-hostd', + coverageDirectory: '../../coverage/libs/hostd-react', } diff --git a/libs/react-hostd/package.json b/libs/hostd-react/package.json similarity index 87% rename from libs/react-hostd/package.json rename to libs/hostd-react/package.json index 153fb0e7f..9b41bf7fc 100644 --- a/libs/react-hostd/package.json +++ b/libs/hostd-react/package.json @@ -1,5 +1,5 @@ { - "name": "@siafoundation/react-hostd", + "name": "@siafoundation/hostd-react", "description": " React hooks for interacting with `hostd`.", "version": "4.0.0", "license": "MIT", diff --git a/libs/react-hostd/project.json b/libs/hostd-react/project.json similarity index 57% rename from libs/react-hostd/project.json rename to libs/hostd-react/project.json index 21f78959a..f557ff961 100644 --- a/libs/react-hostd/project.json +++ b/libs/hostd-react/project.json @@ -1,7 +1,7 @@ { - "name": "react-hostd", + "name": "hostd-react", "$schema": "../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "libs/react-hostd/src", + "sourceRoot": "libs/hostd-react/src", "projectType": "library", "tags": [], "targets": { @@ -9,17 +9,17 @@ "executor": "@nx/rollup:rollup", "outputs": ["{options.outputPath}"], "options": { - "outputPath": "dist/libs/react-hostd", - "tsConfig": "libs/react-hostd/tsconfig.lib.json", - "project": "libs/react-hostd/package.json", - "entryFile": "libs/react-hostd/src/index.ts", + "outputPath": "dist/libs/hostd-react", + "tsConfig": "libs/hostd-react/tsconfig.lib.json", + "project": "libs/hostd-react/package.json", + "entryFile": "libs/hostd-react/src/index.ts", "external": ["react/jsx-runtime"], "compiler": "tsc", "outputFileName": "index.js", - "rollupConfig": "libs/react-hostd/rollup.config.js", + "rollupConfig": "libs/hostd-react/rollup.config.js", "assets": [ { - "glob": "libs/react-hostd/*.md", + "glob": "libs/hostd-react/*.md", "input": ".", "output": "." } @@ -33,9 +33,9 @@ }, "test": { "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/libs/react-hostd"], + "outputs": ["{workspaceRoot}/coverage/libs/hostd-react"], "options": { - "jestConfig": "libs/react-hostd/jest.config.ts" + "jestConfig": "libs/hostd-react/jest.config.ts" } } } diff --git a/libs/mock-sia-central/rollup.config.js b/libs/hostd-react/rollup.config.js similarity index 100% rename from libs/mock-sia-central/rollup.config.js rename to libs/hostd-react/rollup.config.js diff --git a/libs/react-hostd/src/api.ts b/libs/hostd-react/src/api.ts similarity index 100% rename from libs/react-hostd/src/api.ts rename to libs/hostd-react/src/api.ts diff --git a/libs/react-hostd/src/index.ts b/libs/hostd-react/src/index.ts similarity index 100% rename from libs/react-hostd/src/index.ts rename to libs/hostd-react/src/index.ts diff --git a/libs/react-hostd/src/siaTypes.ts b/libs/hostd-react/src/siaTypes.ts similarity index 100% rename from libs/react-hostd/src/siaTypes.ts rename to libs/hostd-react/src/siaTypes.ts diff --git a/libs/mock-sia-central/tsconfig.json b/libs/hostd-react/tsconfig.json similarity index 100% rename from libs/mock-sia-central/tsconfig.json rename to libs/hostd-react/tsconfig.json diff --git a/libs/mock-sia-central/tsconfig.lib.json b/libs/hostd-react/tsconfig.lib.json similarity index 100% rename from libs/mock-sia-central/tsconfig.lib.json rename to libs/hostd-react/tsconfig.lib.json diff --git a/libs/mock-sia-central/tsconfig.spec.json b/libs/hostd-react/tsconfig.spec.json similarity index 100% rename from libs/mock-sia-central/tsconfig.spec.json rename to libs/hostd-react/tsconfig.spec.json diff --git a/libs/react-core/CHANGELOG.md b/libs/react-core/CHANGELOG.md index 14ba7ad21..0a095f88e 100644 --- a/libs/react-core/CHANGELOG.md +++ b/libs/react-core/CHANGELOG.md @@ -102,7 +102,7 @@ - 30493f4: useSettingUpdate now automatically revalidates any corresponding useSetting hooks. - 2a0a714: The revalidation dependencies have been refactored into a more extensible after function. - 2a0a714: Add generic workflow tracking provider. -- 67d0113: The renterd React API now lives in react-renterd. +- 67d0113: The renterd React API now lives in renterd-react. ## 0.7.0 diff --git a/libs/react-sia-central/jest.config.ts b/libs/react-sia-central/jest.config.ts deleted file mode 100644 index 984ab214d..000000000 --- a/libs/react-sia-central/jest.config.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* eslint-disable */ -export default { - displayName: 'react-sia-central', - preset: '../../jest.preset.js', - transform: { - '^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nx/react/plugins/jest', - '^.+\\.[tj]sx?$': [ - 'babel-jest', - { - presets: ['@nx/next/babel'], - plugins: ['@babel/plugin-transform-private-methods'], - }, - ], - }, - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], - coverageDirectory: '../../coverage/libs/react-sia-central', -} diff --git a/libs/mock-walletd/.babelrc b/libs/renterd-react/.babelrc similarity index 100% rename from libs/mock-walletd/.babelrc rename to libs/renterd-react/.babelrc diff --git a/libs/react-walletd/.eslintrc.json b/libs/renterd-react/.eslintrc.json similarity index 84% rename from libs/react-walletd/.eslintrc.json rename to libs/renterd-react/.eslintrc.json index 70cfc6ad5..a6ffee006 100644 --- a/libs/react-walletd/.eslintrc.json +++ b/libs/renterd-react/.eslintrc.json @@ -5,7 +5,7 @@ "@nx/dependency-checks": [ "error", { - "ignoredFiles": ["libs/react-walletd/rollup.config.js"] + "ignoredFiles": ["libs/renterd-react/rollup.config.js"] } ] }, diff --git a/libs/react-renterd/CHANGELOG.md b/libs/renterd-react/CHANGELOG.md similarity index 97% rename from libs/react-renterd/CHANGELOG.md rename to libs/renterd-react/CHANGELOG.md index 07920e76b..3b38a25b1 100644 --- a/libs/react-renterd/CHANGELOG.md +++ b/libs/renterd-react/CHANGELOG.md @@ -1,4 +1,4 @@ -# @siafoundation/react-renterd +# @siafoundation/renterd-react ## 4.0.0 @@ -177,4 +177,4 @@ ### Minor Changes -- 67d0113: The renterd React API now lives in react-renterd. +- 67d0113: The renterd React API now lives in renterd-react. diff --git a/libs/react-renterd/README.md b/libs/renterd-react/README.md similarity index 52% rename from libs/react-renterd/README.md rename to libs/renterd-react/README.md index 91000a586..185f1e0bf 100644 --- a/libs/react-renterd/README.md +++ b/libs/renterd-react/README.md @@ -1,7 +1,7 @@ -# react-renterd +# renterd-react React hooks for interacting with `renterd`. ## Running unit tests -Run `nx test react-renterd` to execute the unit tests via [Jest](https://jestjs.io). +Run `nx test renterd-react` to execute the unit tests via [Jest](https://jestjs.io). diff --git a/libs/react-renterd/jest.config.ts b/libs/renterd-react/jest.config.ts similarity index 80% rename from libs/react-renterd/jest.config.ts rename to libs/renterd-react/jest.config.ts index b7bb28c47..24bc63f88 100644 --- a/libs/react-renterd/jest.config.ts +++ b/libs/renterd-react/jest.config.ts @@ -1,6 +1,6 @@ /* eslint-disable */ export default { - displayName: 'react-renterd', + displayName: 'renterd-react', preset: '../../jest.preset.js', transform: { '^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nx/react/plugins/jest', @@ -13,5 +13,5 @@ export default { ], }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], - coverageDirectory: '../../coverage/libs/react-renterd', + coverageDirectory: '../../coverage/libs/renterd-react', } diff --git a/libs/react-renterd/package.json b/libs/renterd-react/package.json similarity index 88% rename from libs/react-renterd/package.json rename to libs/renterd-react/package.json index d2bacd99b..17c297fd5 100644 --- a/libs/react-renterd/package.json +++ b/libs/renterd-react/package.json @@ -1,5 +1,5 @@ { - "name": "@siafoundation/react-renterd", + "name": "@siafoundation/renterd-react", "description": " React hooks for interacting with `renterd`.", "version": "4.0.0", "license": "MIT", diff --git a/libs/react-walletd/project.json b/libs/renterd-react/project.json similarity index 56% rename from libs/react-walletd/project.json rename to libs/renterd-react/project.json index 4c232af99..f4db6ae25 100644 --- a/libs/react-walletd/project.json +++ b/libs/renterd-react/project.json @@ -1,7 +1,7 @@ { - "name": "react-walletd", + "name": "renterd-react", "$schema": "../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "libs/react-walletd/src", + "sourceRoot": "libs/renterd-react/src", "projectType": "library", "tags": [], "targets": { @@ -9,17 +9,17 @@ "executor": "@nx/rollup:rollup", "outputs": ["{options.outputPath}"], "options": { - "outputPath": "dist/libs/react-walletd", - "tsConfig": "libs/react-walletd/tsconfig.lib.json", - "project": "libs/react-walletd/package.json", - "entryFile": "libs/react-walletd/src/index.ts", + "outputPath": "dist/libs/renterd-react", + "tsConfig": "libs/renterd-react/tsconfig.lib.json", + "project": "libs/renterd-react/package.json", + "entryFile": "libs/renterd-react/src/index.ts", "external": ["react/jsx-runtime"], "compiler": "tsc", "outputFileName": "index.js", - "rollupConfig": "libs/react-walletd/rollup.config.js", + "rollupConfig": "libs/renterd-react/rollup.config.js", "assets": [ { - "glob": "libs/react-walletd/*.md", + "glob": "libs/renterd-react/*.md", "input": ".", "output": "." } @@ -33,9 +33,9 @@ }, "test": { "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/libs/react-walletd"], + "outputs": ["{workspaceRoot}/coverage/libs/renterd-react"], "options": { - "jestConfig": "libs/react-walletd/jest.config.ts" + "jestConfig": "libs/renterd-react/jest.config.ts" } } } diff --git a/libs/mock-walletd/rollup.config.js b/libs/renterd-react/rollup.config.js similarity index 100% rename from libs/mock-walletd/rollup.config.js rename to libs/renterd-react/rollup.config.js diff --git a/libs/react-renterd/src/autopilot.ts b/libs/renterd-react/src/autopilot.ts similarity index 100% rename from libs/react-renterd/src/autopilot.ts rename to libs/renterd-react/src/autopilot.ts diff --git a/libs/react-renterd/src/bus.ts b/libs/renterd-react/src/bus.ts similarity index 100% rename from libs/react-renterd/src/bus.ts rename to libs/renterd-react/src/bus.ts diff --git a/libs/react-renterd/src/index.ts b/libs/renterd-react/src/index.ts similarity index 100% rename from libs/react-renterd/src/index.ts rename to libs/renterd-react/src/index.ts diff --git a/libs/react-renterd/src/siaTypes.ts b/libs/renterd-react/src/siaTypes.ts similarity index 100% rename from libs/react-renterd/src/siaTypes.ts rename to libs/renterd-react/src/siaTypes.ts diff --git a/libs/react-renterd/src/worker.ts b/libs/renterd-react/src/worker.ts similarity index 100% rename from libs/react-renterd/src/worker.ts rename to libs/renterd-react/src/worker.ts diff --git a/libs/mock-walletd/tsconfig.json b/libs/renterd-react/tsconfig.json similarity index 100% rename from libs/mock-walletd/tsconfig.json rename to libs/renterd-react/tsconfig.json diff --git a/libs/mock-walletd/tsconfig.lib.json b/libs/renterd-react/tsconfig.lib.json similarity index 100% rename from libs/mock-walletd/tsconfig.lib.json rename to libs/renterd-react/tsconfig.lib.json diff --git a/libs/mock-walletd/tsconfig.spec.json b/libs/renterd-react/tsconfig.spec.json similarity index 100% rename from libs/mock-walletd/tsconfig.spec.json rename to libs/renterd-react/tsconfig.spec.json diff --git a/libs/react-hostd/.babelrc b/libs/sia-central-mock/.babelrc similarity index 100% rename from libs/react-hostd/.babelrc rename to libs/sia-central-mock/.babelrc diff --git a/libs/mock-sia-central/.eslintrc.json b/libs/sia-central-mock/.eslintrc.json similarity index 84% rename from libs/mock-sia-central/.eslintrc.json rename to libs/sia-central-mock/.eslintrc.json index 7abad742e..59968999c 100644 --- a/libs/mock-sia-central/.eslintrc.json +++ b/libs/sia-central-mock/.eslintrc.json @@ -5,7 +5,7 @@ "@nx/dependency-checks": [ "error", { - "ignoredFiles": ["libs/mock-sia-central/rollup.config.js"] + "ignoredFiles": ["libs/sia-central-mock/rollup.config.js"] } ] }, diff --git a/libs/mock-sia-central/README.md b/libs/sia-central-mock/README.md similarity index 73% rename from libs/mock-sia-central/README.md rename to libs/sia-central-mock/README.md index c23a3af40..4bcfb7280 100644 --- a/libs/mock-sia-central/README.md +++ b/libs/sia-central-mock/README.md @@ -1,3 +1,3 @@ -# mock-sia-central +# sia-central-mock Sia Central data and API mock library for testing. diff --git a/libs/mock-sia-central/jest.config.ts b/libs/sia-central-mock/jest.config.ts similarity index 79% rename from libs/mock-sia-central/jest.config.ts rename to libs/sia-central-mock/jest.config.ts index e198a3e58..b639d7230 100644 --- a/libs/mock-sia-central/jest.config.ts +++ b/libs/sia-central-mock/jest.config.ts @@ -1,6 +1,6 @@ /* eslint-disable */ export default { - displayName: 'mock-sia-central', + displayName: 'sia-central-mock', preset: '../../jest.preset.js', transform: { '^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nx/react/plugins/jest', @@ -13,5 +13,5 @@ export default { ], }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], - coverageDirectory: '../../coverage/libs/mock-sia-central', + coverageDirectory: '../../coverage/libs/sia-central-mock', } diff --git a/libs/mock-sia-central/package.json b/libs/sia-central-mock/package.json similarity index 84% rename from libs/mock-sia-central/package.json rename to libs/sia-central-mock/package.json index 858e2f8ce..5e15aebbf 100644 --- a/libs/mock-sia-central/package.json +++ b/libs/sia-central-mock/package.json @@ -1,5 +1,5 @@ { - "name": "@siafoundation/mock-sia-central", + "name": "@siafoundation/sia-central-mock", "description": "Sia Central data and API mock library for testing.", "version": "0.0.0", "license": "MIT", diff --git a/libs/mock-sia-central/project.json b/libs/sia-central-mock/project.json similarity index 55% rename from libs/mock-sia-central/project.json rename to libs/sia-central-mock/project.json index 859097bb0..ae8ffd5fc 100644 --- a/libs/mock-sia-central/project.json +++ b/libs/sia-central-mock/project.json @@ -1,7 +1,7 @@ { - "name": "mock-sia-central", + "name": "sia-central-mock", "$schema": "../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "libs/mock-sia-central/src", + "sourceRoot": "libs/sia-central-mock/src", "projectType": "library", "tags": [], "targets": { @@ -9,17 +9,17 @@ "executor": "@nx/rollup:rollup", "outputs": ["{options.outputPath}"], "options": { - "outputPath": "dist/libs/mock-sia-central", - "tsConfig": "libs/mock-sia-central/tsconfig.lib.json", - "project": "libs/mock-sia-central/package.json", - "entryFile": "libs/mock-sia-central/src/index.ts", + "outputPath": "dist/libs/sia-central-mock", + "tsConfig": "libs/sia-central-mock/tsconfig.lib.json", + "project": "libs/sia-central-mock/package.json", + "entryFile": "libs/sia-central-mock/src/index.ts", "external": ["react/jsx-runtime"], "compiler": "tsc", "outputFileName": "index.js", - "rollupConfig": "libs/mock-sia-central/rollup.config.js", + "rollupConfig": "libs/sia-central-mock/rollup.config.js", "assets": [ { - "glob": "libs/mock-sia-central/*.md", + "glob": "libs/sia-central-mock/*.md", "input": ".", "output": "." } @@ -33,9 +33,9 @@ }, "test": { "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/libs/mock-sia-central"], + "outputs": ["{workspaceRoot}/coverage/libs/sia-central-mock"], "options": { - "jestConfig": "libs/mock-sia-central/jest.config.ts" + "jestConfig": "libs/sia-central-mock/jest.config.ts" } } } diff --git a/libs/react-hostd/rollup.config.js b/libs/sia-central-mock/rollup.config.js similarity index 100% rename from libs/react-hostd/rollup.config.js rename to libs/sia-central-mock/rollup.config.js diff --git a/libs/mock-sia-central/src/index.ts b/libs/sia-central-mock/src/index.ts similarity index 100% rename from libs/mock-sia-central/src/index.ts rename to libs/sia-central-mock/src/index.ts diff --git a/libs/mock-sia-central/src/siaCentralExchangeRates.ts b/libs/sia-central-mock/src/siaCentralExchangeRates.ts similarity index 100% rename from libs/mock-sia-central/src/siaCentralExchangeRates.ts rename to libs/sia-central-mock/src/siaCentralExchangeRates.ts diff --git a/libs/react-hostd/tsconfig.json b/libs/sia-central-mock/tsconfig.json similarity index 100% rename from libs/react-hostd/tsconfig.json rename to libs/sia-central-mock/tsconfig.json diff --git a/libs/react-hostd/tsconfig.lib.json b/libs/sia-central-mock/tsconfig.lib.json similarity index 100% rename from libs/react-hostd/tsconfig.lib.json rename to libs/sia-central-mock/tsconfig.lib.json diff --git a/libs/react-hostd/tsconfig.spec.json b/libs/sia-central-mock/tsconfig.spec.json similarity index 100% rename from libs/react-hostd/tsconfig.spec.json rename to libs/sia-central-mock/tsconfig.spec.json diff --git a/libs/react-renterd/.babelrc b/libs/sia-central-react/.babelrc similarity index 100% rename from libs/react-renterd/.babelrc rename to libs/sia-central-react/.babelrc diff --git a/libs/react-sia-central/.eslintrc.json b/libs/sia-central-react/.eslintrc.json similarity index 84% rename from libs/react-sia-central/.eslintrc.json rename to libs/sia-central-react/.eslintrc.json index 032635b94..43c89ab78 100644 --- a/libs/react-sia-central/.eslintrc.json +++ b/libs/sia-central-react/.eslintrc.json @@ -5,7 +5,7 @@ "@nx/dependency-checks": [ "error", { - "ignoredFiles": ["libs/react-sia-central/rollup.config.js"] + "ignoredFiles": ["libs/sia-central-react/rollup.config.js"] } ] }, diff --git a/libs/react-sia-central/CHANGELOG.md b/libs/sia-central-react/CHANGELOG.md similarity index 97% rename from libs/react-sia-central/CHANGELOG.md rename to libs/sia-central-react/CHANGELOG.md index 18032be9a..6aadb8635 100644 --- a/libs/react-sia-central/CHANGELOG.md +++ b/libs/sia-central-react/CHANGELOG.md @@ -1,4 +1,4 @@ -# @siafoundation/react-sia-central +# @siafoundation/sia-central-react ## 3.0.0 diff --git a/libs/react-sia-central/README.md b/libs/sia-central-react/README.md similarity index 55% rename from libs/react-sia-central/README.md rename to libs/sia-central-react/README.md index 53932450c..e44b75510 100644 --- a/libs/react-sia-central/README.md +++ b/libs/sia-central-react/README.md @@ -1,7 +1,7 @@ -# react-sia-central +# sia-central-react React hooks for interacting with the Sia Central API. ## Running unit tests -Run `nx test react-sia-central` to execute the unit tests via [Jest](https://jestjs.io). +Run `nx test sia-central-react` to execute the unit tests via [Jest](https://jestjs.io). diff --git a/libs/sia-central-react/jest.config.ts b/libs/sia-central-react/jest.config.ts new file mode 100644 index 000000000..fc4b92594 --- /dev/null +++ b/libs/sia-central-react/jest.config.ts @@ -0,0 +1,17 @@ +/* eslint-disable */ +export default { + displayName: 'sia-central-react', + preset: '../../jest.preset.js', + transform: { + '^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nx/react/plugins/jest', + '^.+\\.[tj]sx?$': [ + 'babel-jest', + { + presets: ['@nx/next/babel'], + plugins: ['@babel/plugin-transform-private-methods'], + }, + ], + }, + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], + coverageDirectory: '../../coverage/libs/sia-central-react', +} diff --git a/libs/react-sia-central/package.json b/libs/sia-central-react/package.json similarity index 85% rename from libs/react-sia-central/package.json rename to libs/sia-central-react/package.json index 93abef877..e296c3f9b 100644 --- a/libs/react-sia-central/package.json +++ b/libs/sia-central-react/package.json @@ -1,5 +1,5 @@ { - "name": "@siafoundation/react-sia-central", + "name": "@siafoundation/sia-central-react", "description": "React hooks for interacting with the Sia Central API.", "version": "3.0.0", "license": "MIT", diff --git a/libs/react-sia-central/project.json b/libs/sia-central-react/project.json similarity index 55% rename from libs/react-sia-central/project.json rename to libs/sia-central-react/project.json index f42fe4918..fcb49da56 100644 --- a/libs/react-sia-central/project.json +++ b/libs/sia-central-react/project.json @@ -1,7 +1,7 @@ { - "name": "react-sia-central", + "name": "sia-central-react", "$schema": "../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "libs/react-sia-central/src", + "sourceRoot": "libs/sia-central-react/src", "projectType": "library", "tags": [], "targets": { @@ -9,17 +9,17 @@ "executor": "@nx/rollup:rollup", "outputs": ["{options.outputPath}"], "options": { - "outputPath": "dist/libs/react-sia-central", - "tsConfig": "libs/react-sia-central/tsconfig.lib.json", - "project": "libs/react-sia-central/package.json", - "entryFile": "libs/react-sia-central/src/index.ts", + "outputPath": "dist/libs/sia-central-react", + "tsConfig": "libs/sia-central-react/tsconfig.lib.json", + "project": "libs/sia-central-react/package.json", + "entryFile": "libs/sia-central-react/src/index.ts", "external": ["react/jsx-runtime"], "compiler": "tsc", "outputFileName": "index.js", - "rollupConfig": "libs/react-sia-central/rollup.config.js", + "rollupConfig": "libs/sia-central-react/rollup.config.js", "assets": [ { - "glob": "libs/react-sia-central/*.md", + "glob": "libs/sia-central-react/*.md", "input": ".", "output": "." } @@ -33,9 +33,9 @@ }, "test": { "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/libs/react-sia-central"], + "outputs": ["{workspaceRoot}/coverage/libs/sia-central-react"], "options": { - "jestConfig": "libs/react-sia-central/jest.config.ts" + "jestConfig": "libs/sia-central-react/jest.config.ts" } } } diff --git a/libs/react-renterd/rollup.config.js b/libs/sia-central-react/rollup.config.js similarity index 100% rename from libs/react-renterd/rollup.config.js rename to libs/sia-central-react/rollup.config.js diff --git a/libs/react-sia-central/src/index.ts b/libs/sia-central-react/src/index.ts similarity index 100% rename from libs/react-sia-central/src/index.ts rename to libs/sia-central-react/src/index.ts diff --git a/libs/react-sia-central/src/useSiaCentralAddress.tsx b/libs/sia-central-react/src/useSiaCentralAddress.tsx similarity index 100% rename from libs/react-sia-central/src/useSiaCentralAddress.tsx rename to libs/sia-central-react/src/useSiaCentralAddress.tsx diff --git a/libs/react-sia-central/src/useSiaCentralBlock.tsx b/libs/sia-central-react/src/useSiaCentralBlock.tsx similarity index 100% rename from libs/react-sia-central/src/useSiaCentralBlock.tsx rename to libs/sia-central-react/src/useSiaCentralBlock.tsx diff --git a/libs/react-sia-central/src/useSiaCentralBlockLatest.tsx b/libs/sia-central-react/src/useSiaCentralBlockLatest.tsx similarity index 100% rename from libs/react-sia-central/src/useSiaCentralBlockLatest.tsx rename to libs/sia-central-react/src/useSiaCentralBlockLatest.tsx diff --git a/libs/react-sia-central/src/useSiaCentralBlocks.tsx b/libs/sia-central-react/src/useSiaCentralBlocks.tsx similarity index 100% rename from libs/react-sia-central/src/useSiaCentralBlocks.tsx rename to libs/sia-central-react/src/useSiaCentralBlocks.tsx diff --git a/libs/react-sia-central/src/useSiaCentralContract.tsx b/libs/sia-central-react/src/useSiaCentralContract.tsx similarity index 100% rename from libs/react-sia-central/src/useSiaCentralContract.tsx rename to libs/sia-central-react/src/useSiaCentralContract.tsx diff --git a/libs/react-sia-central/src/useSiaCentralExchangeRates.tsx b/libs/sia-central-react/src/useSiaCentralExchangeRates.tsx similarity index 100% rename from libs/react-sia-central/src/useSiaCentralExchangeRates.tsx rename to libs/sia-central-react/src/useSiaCentralExchangeRates.tsx diff --git a/libs/react-sia-central/src/useSiaCentralHost.tsx b/libs/sia-central-react/src/useSiaCentralHost.tsx similarity index 100% rename from libs/react-sia-central/src/useSiaCentralHost.tsx rename to libs/sia-central-react/src/useSiaCentralHost.tsx diff --git a/libs/react-sia-central/src/useSiaCentralHosts.tsx b/libs/sia-central-react/src/useSiaCentralHosts.tsx similarity index 100% rename from libs/react-sia-central/src/useSiaCentralHosts.tsx rename to libs/sia-central-react/src/useSiaCentralHosts.tsx diff --git a/libs/react-sia-central/src/useSiaCentralHostsNetworkAverages.tsx b/libs/sia-central-react/src/useSiaCentralHostsNetworkAverages.tsx similarity index 100% rename from libs/react-sia-central/src/useSiaCentralHostsNetworkAverages.tsx rename to libs/sia-central-react/src/useSiaCentralHostsNetworkAverages.tsx diff --git a/libs/react-sia-central/src/useSiaCentralHostsNetworkMetrics.tsx b/libs/sia-central-react/src/useSiaCentralHostsNetworkMetrics.tsx similarity index 100% rename from libs/react-sia-central/src/useSiaCentralHostsNetworkMetrics.tsx rename to libs/sia-central-react/src/useSiaCentralHostsNetworkMetrics.tsx diff --git a/libs/react-sia-central/src/useSiaCentralSearch.tsx b/libs/sia-central-react/src/useSiaCentralSearch.tsx similarity index 100% rename from libs/react-sia-central/src/useSiaCentralSearch.tsx rename to libs/sia-central-react/src/useSiaCentralSearch.tsx diff --git a/libs/react-sia-central/src/useSiaCentralTransaction.tsx b/libs/sia-central-react/src/useSiaCentralTransaction.tsx similarity index 100% rename from libs/react-sia-central/src/useSiaCentralTransaction.tsx rename to libs/sia-central-react/src/useSiaCentralTransaction.tsx diff --git a/libs/react-renterd/tsconfig.json b/libs/sia-central-react/tsconfig.json similarity index 100% rename from libs/react-renterd/tsconfig.json rename to libs/sia-central-react/tsconfig.json diff --git a/libs/react-renterd/tsconfig.lib.json b/libs/sia-central-react/tsconfig.lib.json similarity index 100% rename from libs/react-renterd/tsconfig.lib.json rename to libs/sia-central-react/tsconfig.lib.json diff --git a/libs/react-renterd/tsconfig.spec.json b/libs/sia-central-react/tsconfig.spec.json similarity index 100% rename from libs/react-renterd/tsconfig.spec.json rename to libs/sia-central-react/tsconfig.spec.json diff --git a/libs/react-sia-central/.babelrc b/libs/walletd-mock/.babelrc similarity index 100% rename from libs/react-sia-central/.babelrc rename to libs/walletd-mock/.babelrc diff --git a/libs/mock-walletd/.eslintrc.json b/libs/walletd-mock/.eslintrc.json similarity index 84% rename from libs/mock-walletd/.eslintrc.json rename to libs/walletd-mock/.eslintrc.json index 2bf694049..326c35b39 100644 --- a/libs/mock-walletd/.eslintrc.json +++ b/libs/walletd-mock/.eslintrc.json @@ -5,7 +5,7 @@ "@nx/dependency-checks": [ "error", { - "ignoredFiles": ["libs/mock-walletd/rollup.config.js"] + "ignoredFiles": ["libs/walletd-mock/rollup.config.js"] } ] }, diff --git a/libs/mock-walletd/CHANGELOG.md b/libs/walletd-mock/CHANGELOG.md similarity index 65% rename from libs/mock-walletd/CHANGELOG.md rename to libs/walletd-mock/CHANGELOG.md index cda5a1f18..dac2360d9 100644 --- a/libs/mock-walletd/CHANGELOG.md +++ b/libs/walletd-mock/CHANGELOG.md @@ -1,4 +1,4 @@ -# @siafoundation/mock-walletd +# @siafoundation/walletd-mock ## 0.0.1 @@ -7,4 +7,4 @@ - Updated dependencies [e2b8f950] - Updated dependencies [e2b8f950] - @siafoundation/types@0.2.0 - - @siafoundation/react-walletd@4.0.0 + - @siafoundation/walletd-react@4.0.0 diff --git a/libs/mock-walletd/README.md b/libs/walletd-mock/README.md similarity index 76% rename from libs/mock-walletd/README.md rename to libs/walletd-mock/README.md index 719997dae..0c5f14eee 100644 --- a/libs/mock-walletd/README.md +++ b/libs/walletd-mock/README.md @@ -1,3 +1,3 @@ -# mock-walletd +# walletd-mock `walletd` data and API mock library for testing. diff --git a/libs/mock-walletd/jest.config.ts b/libs/walletd-mock/jest.config.ts similarity index 81% rename from libs/mock-walletd/jest.config.ts rename to libs/walletd-mock/jest.config.ts index d5a773a50..9eddec3a8 100644 --- a/libs/mock-walletd/jest.config.ts +++ b/libs/walletd-mock/jest.config.ts @@ -1,6 +1,6 @@ /* eslint-disable */ export default { - displayName: 'mock-walletd', + displayName: 'walletd-mock', preset: '../../jest.preset.js', transform: { '^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nx/react/plugins/jest', @@ -13,5 +13,5 @@ export default { ], }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], - coverageDirectory: '../../coverage/libs/mock-walletd', + coverageDirectory: '../../coverage/libs/walletd-mock', } diff --git a/libs/mock-walletd/package.json b/libs/walletd-mock/package.json similarity index 66% rename from libs/mock-walletd/package.json rename to libs/walletd-mock/package.json index 87478b46c..379614414 100644 --- a/libs/mock-walletd/package.json +++ b/libs/walletd-mock/package.json @@ -1,13 +1,13 @@ { - "name": "@siafoundation/mock-walletd", + "name": "@siafoundation/walletd-mock", "description": "walletd data and API mock library for testing.", "version": "0.0.1", "license": "MIT", "dependencies": { "@siafoundation/types": "0.2.0", - "@siafoundation/react-walletd": "4.0.0", + "@siafoundation/walletd-react": "4.0.0", + "@siafoundation/sia-central-mock": "0.0.0", "@siafoundation/units": "3.0.0", - "@siafoundation/mock-sia-central": "0.0.0", "playwright": "^1.42.1" }, "types": "./src/index.d.ts" diff --git a/libs/mock-walletd/project.json b/libs/walletd-mock/project.json similarity index 57% rename from libs/mock-walletd/project.json rename to libs/walletd-mock/project.json index e42fe7f10..9e4eac655 100644 --- a/libs/mock-walletd/project.json +++ b/libs/walletd-mock/project.json @@ -1,7 +1,7 @@ { - "name": "mock-walletd", + "name": "walletd-mock", "$schema": "../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "libs/mock-walletd/src", + "sourceRoot": "libs/walletd-mock/src", "projectType": "library", "tags": [], "targets": { @@ -9,17 +9,17 @@ "executor": "@nx/rollup:rollup", "outputs": ["{options.outputPath}"], "options": { - "outputPath": "dist/libs/mock-walletd", - "tsConfig": "libs/mock-walletd/tsconfig.lib.json", - "project": "libs/mock-walletd/package.json", - "entryFile": "libs/mock-walletd/src/index.ts", + "outputPath": "dist/libs/walletd-mock", + "tsConfig": "libs/walletd-mock/tsconfig.lib.json", + "project": "libs/walletd-mock/package.json", + "entryFile": "libs/walletd-mock/src/index.ts", "external": ["react/jsx-runtime"], "compiler": "tsc", "outputFileName": "index.js", - "rollupConfig": "libs/mock-walletd/rollup.config.js", + "rollupConfig": "libs/walletd-mock/rollup.config.js", "assets": [ { - "glob": "libs/mock-walletd/*.md", + "glob": "libs/walletd-mock/*.md", "input": ".", "output": "." } @@ -33,9 +33,9 @@ }, "test": { "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/libs/mock-walletd"], + "outputs": ["{workspaceRoot}/coverage/libs/walletd-mock"], "options": { - "jestConfig": "libs/mock-walletd/jest.config.ts" + "jestConfig": "libs/walletd-mock/jest.config.ts" } } } diff --git a/libs/react-sia-central/rollup.config.js b/libs/walletd-mock/rollup.config.js similarity index 100% rename from libs/react-sia-central/rollup.config.js rename to libs/walletd-mock/rollup.config.js diff --git a/libs/mock-walletd/src/index.ts b/libs/walletd-mock/src/index.ts similarity index 100% rename from libs/mock-walletd/src/index.ts rename to libs/walletd-mock/src/index.ts diff --git a/libs/mock-walletd/src/mocks/consensusNetwork.ts b/libs/walletd-mock/src/mocks/consensusNetwork.ts similarity index 100% rename from libs/mock-walletd/src/mocks/consensusNetwork.ts rename to libs/walletd-mock/src/mocks/consensusNetwork.ts diff --git a/libs/mock-walletd/src/mocks/consensusTip.ts b/libs/walletd-mock/src/mocks/consensusTip.ts similarity index 86% rename from libs/mock-walletd/src/mocks/consensusTip.ts rename to libs/walletd-mock/src/mocks/consensusTip.ts index 3af9d06db..b67169761 100644 --- a/libs/mock-walletd/src/mocks/consensusTip.ts +++ b/libs/walletd-mock/src/mocks/consensusTip.ts @@ -1,4 +1,4 @@ -import { ConsensusTipResponse } from '@siafoundation/react-walletd' +import { ConsensusTipResponse } from '@siafoundation/walletd-react' import { Page } from 'playwright' export function getMockConsensusTipResponse(): ConsensusTipResponse { diff --git a/libs/mock-walletd/src/mocks/consensusTipState.ts b/libs/walletd-mock/src/mocks/consensusTipState.ts similarity index 100% rename from libs/mock-walletd/src/mocks/consensusTipState.ts rename to libs/walletd-mock/src/mocks/consensusTipState.ts diff --git a/libs/mock-walletd/src/mocks/defaults.ts b/libs/walletd-mock/src/mocks/defaults.ts similarity index 87% rename from libs/mock-walletd/src/mocks/defaults.ts rename to libs/walletd-mock/src/mocks/defaults.ts index 3b61ef70c..0b0f3ba0c 100644 --- a/libs/mock-walletd/src/mocks/defaults.ts +++ b/libs/walletd-mock/src/mocks/defaults.ts @@ -1,5 +1,5 @@ import { Page } from 'playwright' -import { mockApiSiaCentralExchangeRates } from '@siafoundation/mock-sia-central' +import { mockApiSiaCentralExchangeRates } from '@siafoundation/sia-central-mock' import { mockApiSyncerPeers } from './peers' import { mockApiConsensusTip } from './consensusTip' import { mockApiConsensusTipState } from './consensusTipState' @@ -8,7 +8,7 @@ import { mockApiWallets } from './wallets' import { mockApiTxPoolBroadcast } from './txPoolBroadcast' import { mockApiWallet } from './wallet' import { mockApiRescan } from './rescan' -import { RescanResponse } from '@siafoundation/react-walletd' +import { RescanResponse } from '@siafoundation/walletd-react' type Responses = { rescan?: RescanResponse diff --git a/libs/mock-walletd/src/mocks/peers.ts b/libs/walletd-mock/src/mocks/peers.ts similarity index 96% rename from libs/mock-walletd/src/mocks/peers.ts rename to libs/walletd-mock/src/mocks/peers.ts index f6a0511b9..0cba2a8e7 100644 --- a/libs/mock-walletd/src/mocks/peers.ts +++ b/libs/walletd-mock/src/mocks/peers.ts @@ -1,4 +1,4 @@ -import { SyncerPeersResponse } from '@siafoundation/react-walletd' +import { SyncerPeersResponse } from '@siafoundation/walletd-react' import { Page } from 'playwright' export function getMockPeersResponse(): SyncerPeersResponse { diff --git a/libs/mock-walletd/src/mocks/rescan.ts b/libs/walletd-mock/src/mocks/rescan.ts similarity index 92% rename from libs/mock-walletd/src/mocks/rescan.ts rename to libs/walletd-mock/src/mocks/rescan.ts index 9965a0459..5ef5f871c 100644 --- a/libs/mock-walletd/src/mocks/rescan.ts +++ b/libs/walletd-mock/src/mocks/rescan.ts @@ -1,4 +1,4 @@ -import { RescanResponse } from '@siafoundation/react-walletd' +import { RescanResponse } from '@siafoundation/walletd-react' import { Page } from 'playwright' export function getMockRescanResponse(): RescanResponse { diff --git a/libs/mock-walletd/src/mocks/txPoolBroadcast.ts b/libs/walletd-mock/src/mocks/txPoolBroadcast.ts similarity index 100% rename from libs/mock-walletd/src/mocks/txPoolBroadcast.ts rename to libs/walletd-mock/src/mocks/txPoolBroadcast.ts diff --git a/libs/mock-walletd/src/mocks/wallet.ts b/libs/walletd-mock/src/mocks/wallet.ts similarity index 98% rename from libs/mock-walletd/src/mocks/wallet.ts rename to libs/walletd-mock/src/mocks/wallet.ts index c001853d3..36d519ccf 100644 --- a/libs/mock-walletd/src/mocks/wallet.ts +++ b/libs/walletd-mock/src/mocks/wallet.ts @@ -5,7 +5,7 @@ import { WalletBalanceResponse, WalletFundResponse, WalletOutputsSiacoinResponse, -} from '@siafoundation/react-walletd' +} from '@siafoundation/walletd-react' import { mockApiWalletBalance } from './walletBalance' import { mockApiWalletAddresses } from './walletAddresses' import { mockApiWalletEvents } from './walletEvents' diff --git a/libs/mock-walletd/src/mocks/walletAddresses.ts b/libs/walletd-mock/src/mocks/walletAddresses.ts similarity index 98% rename from libs/mock-walletd/src/mocks/walletAddresses.ts rename to libs/walletd-mock/src/mocks/walletAddresses.ts index 7a3b246a2..6e4f43d30 100644 --- a/libs/mock-walletd/src/mocks/walletAddresses.ts +++ b/libs/walletd-mock/src/mocks/walletAddresses.ts @@ -1,7 +1,7 @@ import { WalletAddress, WalletAddressesResponse, -} from '@siafoundation/react-walletd' +} from '@siafoundation/walletd-react' import { Page } from 'playwright' export function getMockWalletAddressesResponse(): WalletAddressesResponse { diff --git a/libs/mock-walletd/src/mocks/walletBalance.ts b/libs/walletd-mock/src/mocks/walletBalance.ts similarity index 90% rename from libs/mock-walletd/src/mocks/walletBalance.ts rename to libs/walletd-mock/src/mocks/walletBalance.ts index 211502648..2a377bbf0 100644 --- a/libs/mock-walletd/src/mocks/walletBalance.ts +++ b/libs/walletd-mock/src/mocks/walletBalance.ts @@ -1,4 +1,4 @@ -import { WalletBalanceResponse } from '@siafoundation/react-walletd' +import { WalletBalanceResponse } from '@siafoundation/walletd-react' import { toHastings } from '@siafoundation/units' import { Page } from 'playwright' diff --git a/libs/mock-walletd/src/mocks/walletEvents.ts b/libs/walletd-mock/src/mocks/walletEvents.ts similarity index 85% rename from libs/mock-walletd/src/mocks/walletEvents.ts rename to libs/walletd-mock/src/mocks/walletEvents.ts index 8c2ea854b..19d9be345 100644 --- a/libs/mock-walletd/src/mocks/walletEvents.ts +++ b/libs/walletd-mock/src/mocks/walletEvents.ts @@ -1,4 +1,4 @@ -import { WalletEventsResponse } from '@siafoundation/react-walletd' +import { WalletEventsResponse } from '@siafoundation/walletd-react' import { Page } from 'playwright' export function getMockWalletEventsResponse(): WalletEventsResponse { diff --git a/libs/mock-walletd/src/mocks/walletFundSiacoin.ts b/libs/walletd-mock/src/mocks/walletFundSiacoin.ts similarity index 96% rename from libs/mock-walletd/src/mocks/walletFundSiacoin.ts rename to libs/walletd-mock/src/mocks/walletFundSiacoin.ts index acdd61e4c..6dce84c31 100644 --- a/libs/mock-walletd/src/mocks/walletFundSiacoin.ts +++ b/libs/walletd-mock/src/mocks/walletFundSiacoin.ts @@ -1,4 +1,4 @@ -import { WalletFundResponse } from '@siafoundation/react-walletd' +import { WalletFundResponse } from '@siafoundation/walletd-react' import { Page } from 'playwright' export function getMockWalletFundSiacoinResponse(): WalletFundResponse { diff --git a/libs/mock-walletd/src/mocks/walletFundSiafund.ts b/libs/walletd-mock/src/mocks/walletFundSiafund.ts similarity index 91% rename from libs/mock-walletd/src/mocks/walletFundSiafund.ts rename to libs/walletd-mock/src/mocks/walletFundSiafund.ts index 42c0c7866..221a6bee6 100644 --- a/libs/mock-walletd/src/mocks/walletFundSiafund.ts +++ b/libs/walletd-mock/src/mocks/walletFundSiafund.ts @@ -1,4 +1,4 @@ -import { WalletFundResponse } from '@siafoundation/react-walletd' +import { WalletFundResponse } from '@siafoundation/walletd-react' import { Page } from 'playwright' export function getMockWalletFundSiafundResponse(): WalletFundResponse { diff --git a/libs/mock-walletd/src/mocks/walletOutputsSiacoin.ts b/libs/walletd-mock/src/mocks/walletOutputsSiacoin.ts similarity index 97% rename from libs/mock-walletd/src/mocks/walletOutputsSiacoin.ts rename to libs/walletd-mock/src/mocks/walletOutputsSiacoin.ts index d00905147..b12257084 100644 --- a/libs/mock-walletd/src/mocks/walletOutputsSiacoin.ts +++ b/libs/walletd-mock/src/mocks/walletOutputsSiacoin.ts @@ -1,4 +1,4 @@ -import { WalletOutputsSiacoinResponse } from '@siafoundation/react-walletd' +import { WalletOutputsSiacoinResponse } from '@siafoundation/walletd-react' import { SiacoinElement } from '@siafoundation/types' import { Page } from 'playwright' diff --git a/libs/mock-walletd/src/mocks/walletOutputsSiafund.ts b/libs/walletd-mock/src/mocks/walletOutputsSiafund.ts similarity index 85% rename from libs/mock-walletd/src/mocks/walletOutputsSiafund.ts rename to libs/walletd-mock/src/mocks/walletOutputsSiafund.ts index 3b11c3e4b..0af2b802b 100644 --- a/libs/mock-walletd/src/mocks/walletOutputsSiafund.ts +++ b/libs/walletd-mock/src/mocks/walletOutputsSiafund.ts @@ -1,4 +1,4 @@ -import { WalletOutputsSiafundResponse } from '@siafoundation/react-walletd' +import { WalletOutputsSiafundResponse } from '@siafoundation/walletd-react' import { Page } from 'playwright' export function getMockWalletOutputsSiafundResponse(): WalletOutputsSiafundResponse { diff --git a/libs/mock-walletd/src/mocks/walletRelease.ts b/libs/walletd-mock/src/mocks/walletRelease.ts similarity index 81% rename from libs/mock-walletd/src/mocks/walletRelease.ts rename to libs/walletd-mock/src/mocks/walletRelease.ts index a47a12c1a..e281ac7df 100644 --- a/libs/mock-walletd/src/mocks/walletRelease.ts +++ b/libs/walletd-mock/src/mocks/walletRelease.ts @@ -1,4 +1,4 @@ -import { WalletFundResponse } from '@siafoundation/react-walletd' +import { WalletFundResponse } from '@siafoundation/walletd-react' import { Page } from 'playwright' export async function mockApiWalletRelease({ diff --git a/libs/mock-walletd/src/mocks/walletTxPool.ts b/libs/walletd-mock/src/mocks/walletTxPool.ts similarity index 85% rename from libs/mock-walletd/src/mocks/walletTxPool.ts rename to libs/walletd-mock/src/mocks/walletTxPool.ts index 1b019fe97..449cf6e11 100644 --- a/libs/mock-walletd/src/mocks/walletTxPool.ts +++ b/libs/walletd-mock/src/mocks/walletTxPool.ts @@ -1,4 +1,4 @@ -import { WalletTxPoolResponse } from '@siafoundation/react-walletd' +import { WalletTxPoolResponse } from '@siafoundation/walletd-react' import { Page } from 'playwright' export function getMockWalletTxPoolResponse(): WalletTxPoolResponse { diff --git a/libs/mock-walletd/src/mocks/wallets.ts b/libs/walletd-mock/src/mocks/wallets.ts similarity index 95% rename from libs/mock-walletd/src/mocks/wallets.ts rename to libs/walletd-mock/src/mocks/wallets.ts index 6b791d788..79a4ba705 100644 --- a/libs/mock-walletd/src/mocks/wallets.ts +++ b/libs/walletd-mock/src/mocks/wallets.ts @@ -1,4 +1,4 @@ -import { Wallet, WalletsResponse } from '@siafoundation/react-walletd' +import { Wallet, WalletsResponse } from '@siafoundation/walletd-react' import { Page } from 'playwright' export function getMockWalletsResponse(): WalletsResponse { diff --git a/libs/mock-walletd/src/scenarios/seedWallet.ts b/libs/walletd-mock/src/scenarios/seedWallet.ts similarity index 99% rename from libs/mock-walletd/src/scenarios/seedWallet.ts rename to libs/walletd-mock/src/scenarios/seedWallet.ts index 3c104e95f..3370d03b8 100644 --- a/libs/mock-walletd/src/scenarios/seedWallet.ts +++ b/libs/walletd-mock/src/scenarios/seedWallet.ts @@ -4,7 +4,7 @@ import { WalletAddress, WalletBalanceResponse, WalletFundResponse, -} from '@siafoundation/react-walletd' +} from '@siafoundation/walletd-react' import { toHastings } from '@siafoundation/units' import { getMockConsensusNetworkResponse } from '../mocks/consensusNetwork' import { getMockConsensusTipStateResponse } from '../mocks/consensusTipState' diff --git a/libs/react-sia-central/tsconfig.json b/libs/walletd-mock/tsconfig.json similarity index 100% rename from libs/react-sia-central/tsconfig.json rename to libs/walletd-mock/tsconfig.json diff --git a/libs/react-sia-central/tsconfig.lib.json b/libs/walletd-mock/tsconfig.lib.json similarity index 100% rename from libs/react-sia-central/tsconfig.lib.json rename to libs/walletd-mock/tsconfig.lib.json diff --git a/libs/react-sia-central/tsconfig.spec.json b/libs/walletd-mock/tsconfig.spec.json similarity index 100% rename from libs/react-sia-central/tsconfig.spec.json rename to libs/walletd-mock/tsconfig.spec.json diff --git a/libs/react-walletd/.babelrc b/libs/walletd-react/.babelrc similarity index 100% rename from libs/react-walletd/.babelrc rename to libs/walletd-react/.babelrc diff --git a/libs/react-renterd/.eslintrc.json b/libs/walletd-react/.eslintrc.json similarity index 84% rename from libs/react-renterd/.eslintrc.json rename to libs/walletd-react/.eslintrc.json index 2e6d4e017..b94187263 100644 --- a/libs/react-renterd/.eslintrc.json +++ b/libs/walletd-react/.eslintrc.json @@ -5,7 +5,7 @@ "@nx/dependency-checks": [ "error", { - "ignoredFiles": ["libs/react-renterd/rollup.config.js"] + "ignoredFiles": ["libs/walletd-react/rollup.config.js"] } ] }, diff --git a/libs/react-walletd/CHANGELOG.md b/libs/walletd-react/CHANGELOG.md similarity index 98% rename from libs/react-walletd/CHANGELOG.md rename to libs/walletd-react/CHANGELOG.md index 933fce194..a44f84c71 100644 --- a/libs/react-walletd/CHANGELOG.md +++ b/libs/walletd-react/CHANGELOG.md @@ -1,4 +1,4 @@ -# @siafoundation/react-walletd +# @siafoundation/walletd-react ## 4.0.0 diff --git a/libs/react-walletd/README.md b/libs/walletd-react/README.md similarity index 52% rename from libs/react-walletd/README.md rename to libs/walletd-react/README.md index 955423b7f..73ea40e4e 100644 --- a/libs/react-walletd/README.md +++ b/libs/walletd-react/README.md @@ -1,7 +1,7 @@ -# react-walletd +# walletd-react React hooks for interacting with `walletd`. ## Running unit tests -Run `nx test react-walletd` to execute the unit tests via [Jest](https://jestjs.io). +Run `nx test walletd-react` to execute the unit tests via [Jest](https://jestjs.io). diff --git a/libs/react-walletd/jest.config.ts b/libs/walletd-react/jest.config.ts similarity index 80% rename from libs/react-walletd/jest.config.ts rename to libs/walletd-react/jest.config.ts index 436d4797c..c8aecd814 100644 --- a/libs/react-walletd/jest.config.ts +++ b/libs/walletd-react/jest.config.ts @@ -1,6 +1,6 @@ /* eslint-disable */ export default { - displayName: 'react-walletd', + displayName: 'walletd-react', preset: '../../jest.preset.js', transform: { '^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nx/react/plugins/jest', @@ -13,5 +13,5 @@ export default { ], }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], - coverageDirectory: '../../coverage/libs/react-walletd', + coverageDirectory: '../../coverage/libs/walletd-react', } diff --git a/libs/react-walletd/package.json b/libs/walletd-react/package.json similarity index 86% rename from libs/react-walletd/package.json rename to libs/walletd-react/package.json index 718bc2ec7..bbb02a3f3 100644 --- a/libs/react-walletd/package.json +++ b/libs/walletd-react/package.json @@ -1,5 +1,5 @@ { - "name": "@siafoundation/react-walletd", + "name": "@siafoundation/walletd-react", "description": " React hooks for interacting with `walletd`.", "version": "4.0.0", "license": "MIT", diff --git a/libs/react-renterd/project.json b/libs/walletd-react/project.json similarity index 56% rename from libs/react-renterd/project.json rename to libs/walletd-react/project.json index 4941a49e4..e5203ea87 100644 --- a/libs/react-renterd/project.json +++ b/libs/walletd-react/project.json @@ -1,7 +1,7 @@ { - "name": "react-renterd", + "name": "walletd-react", "$schema": "../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "libs/react-renterd/src", + "sourceRoot": "libs/walletd-react/src", "projectType": "library", "tags": [], "targets": { @@ -9,17 +9,17 @@ "executor": "@nx/rollup:rollup", "outputs": ["{options.outputPath}"], "options": { - "outputPath": "dist/libs/react-renterd", - "tsConfig": "libs/react-renterd/tsconfig.lib.json", - "project": "libs/react-renterd/package.json", - "entryFile": "libs/react-renterd/src/index.ts", + "outputPath": "dist/libs/walletd-react", + "tsConfig": "libs/walletd-react/tsconfig.lib.json", + "project": "libs/walletd-react/package.json", + "entryFile": "libs/walletd-react/src/index.ts", "external": ["react/jsx-runtime"], "compiler": "tsc", "outputFileName": "index.js", - "rollupConfig": "libs/react-renterd/rollup.config.js", + "rollupConfig": "libs/walletd-react/rollup.config.js", "assets": [ { - "glob": "libs/react-renterd/*.md", + "glob": "libs/walletd-react/*.md", "input": ".", "output": "." } @@ -33,9 +33,9 @@ }, "test": { "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/libs/react-renterd"], + "outputs": ["{workspaceRoot}/coverage/libs/walletd-react"], "options": { - "jestConfig": "libs/react-renterd/jest.config.ts" + "jestConfig": "libs/walletd-react/jest.config.ts" } } } diff --git a/libs/react-walletd/rollup.config.js b/libs/walletd-react/rollup.config.js similarity index 100% rename from libs/react-walletd/rollup.config.js rename to libs/walletd-react/rollup.config.js diff --git a/libs/react-walletd/src/api.ts b/libs/walletd-react/src/api.ts similarity index 100% rename from libs/react-walletd/src/api.ts rename to libs/walletd-react/src/api.ts diff --git a/libs/react-walletd/src/index.ts b/libs/walletd-react/src/index.ts similarity index 100% rename from libs/react-walletd/src/index.ts rename to libs/walletd-react/src/index.ts diff --git a/libs/react-walletd/src/siaTypes.ts b/libs/walletd-react/src/siaTypes.ts similarity index 100% rename from libs/react-walletd/src/siaTypes.ts rename to libs/walletd-react/src/siaTypes.ts diff --git a/libs/react-walletd/tsconfig.json b/libs/walletd-react/tsconfig.json similarity index 100% rename from libs/react-walletd/tsconfig.json rename to libs/walletd-react/tsconfig.json diff --git a/libs/react-walletd/tsconfig.lib.json b/libs/walletd-react/tsconfig.lib.json similarity index 100% rename from libs/react-walletd/tsconfig.lib.json rename to libs/walletd-react/tsconfig.lib.json diff --git a/libs/react-walletd/tsconfig.spec.json b/libs/walletd-react/tsconfig.spec.json similarity index 100% rename from libs/react-walletd/tsconfig.spec.json rename to libs/walletd-react/tsconfig.spec.json diff --git a/scripts/replace-src-with-dists-for-publishing.sh b/scripts/replace-src-with-dists-for-publishing.sh index fc73098fd..b35b75b76 100755 --- a/scripts/replace-src-with-dists-for-publishing.sh +++ b/scripts/replace-src-with-dists-for-publishing.sh @@ -3,12 +3,12 @@ # from: # dist/apps/renterd/* # dist/apps/hostd/* -# dist/libs/react-renterd/* +# dist/libs/renterd-react/* # dist/libs/design-system/* # to: # apps/renterd/* # apps/hostd/* -# libs/react-renterd/* +# libs/renterd-react/* # libs/design-system/* for distDir in dist/apps/* dist/libs/*; do diff --git a/tsconfig.base.json b/tsconfig.base.json index a46b0b3eb..a62e0b172 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -20,21 +20,21 @@ "@siafoundation/fonts": ["libs/fonts/src/index.ts"], "@siafoundation/next": ["libs/next/src/index.ts"], "@siafoundation/react-core": ["libs/react-core/src/index.ts"], - "@siafoundation/react-hostd": ["libs/react-hostd/src/index.ts"], + "@siafoundation/hostd-react": ["libs/hostd-react/src/index.ts"], "@siafoundation/react-icons": ["libs/react-icons/src/index.ts"], - "@siafoundation/react-renterd": ["libs/react-renterd/src/index.ts"], - "@siafoundation/react-sia-central": [ - "libs/react-sia-central/src/index.ts" + "@siafoundation/renterd-react": ["libs/renterd-react/src/index.ts"], + "@siafoundation/sia-central-react": [ + "libs/sia-central-react/src/index.ts" ], - "@siafoundation/react-walletd": ["libs/react-walletd/src/index.ts"], + "@siafoundation/walletd-react": ["libs/walletd-react/src/index.ts"], // "buildLibsFromSource": false does not work with the next executor // this is a very annoying workaround "@siafoundation/sdk": ["dist/libs/sdk/index.esm.js"], "@siafoundation/sia-central": ["libs/sia-central/src/index.ts"], "@siafoundation/types": ["libs/types/src/index.ts"], "@siafoundation/units": ["libs/units/src/index.ts"], - "@siafoundation/mock-walletd": ["libs/mock-walletd/src/index.ts"], - "@siafoundation/mock-sia-central": ["libs/mock-sia-central/src/index.ts"] + "@siafoundation/walletd-mock": ["libs/walletd-mock/src/index.ts"], + "@siafoundation/sia-central-mock": ["libs/sia-central-mock/src/index.ts"] } }, "exclude": ["node_modules", "tmp"]