@rainlanguage/ui-components 0.0.1-alpha.24 → 0.0.1-alpha.240
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -6
- package/dist/__fixtures__/settings.yaml +123 -0
- package/dist/__mocks__/CodeMirrorRainlang.svelte +4 -0
- package/dist/__mocks__/CodeMirrorRainlang.svelte.d.ts +18 -0
- package/dist/__mocks__/MockCodeMirrorEditor.svelte +17 -0
- package/dist/__mocks__/MockCodeMirrorEditor.svelte.d.ts +21 -0
- package/dist/__mocks__/MockComponent.js +1 -1
- package/dist/__mocks__/MockComponent.svelte +10 -2
- package/dist/__mocks__/MockComponent.svelte.d.ts +4 -1
- package/dist/__mocks__/mockWeb3Config.d.ts +1 -1
- package/dist/__mocks__/mockWeb3Config.js +10 -7
- package/dist/__mocks__/queries.js +9 -9
- package/dist/__mocks__/stores.d.ts +55 -45
- package/dist/__mocks__/stores.js +85 -68
- package/dist/app.css +3 -3
- package/dist/components/ButtonDarkMode.svelte +7 -1
- package/dist/components/ButtonLoading.svelte +1 -1
- package/dist/components/ButtonScrub.svelte +22 -0
- package/dist/components/ButtonScrub.svelte.d.ts +25 -0
- package/dist/components/ButtonVaultLink.svelte +12 -11
- package/dist/components/ButtonVaultLink.svelte.d.ts +4 -3
- package/dist/components/CheckboxInactiveOrdersVault.svelte +20 -0
- package/dist/components/CheckboxInactiveOrdersVault.svelte.d.ts +19 -0
- package/dist/components/CheckboxZeroBalanceVault.svelte.d.ts +2 -2
- package/dist/components/CodeMirrorDotrain.svelte +4 -0
- package/dist/components/CodeMirrorDotrain.svelte.d.ts +1 -0
- package/dist/components/CodeMirrorRainlang.svelte +20 -12
- package/dist/components/CodeMirrorRainlang.svelte.d.ts +3 -2
- package/dist/components/EditableSpan.svelte +3 -14
- package/dist/components/EditableSpan.svelte.d.ts +0 -1
- package/dist/components/Hash.svelte +6 -5
- package/dist/components/License.svelte +5 -4
- package/dist/components/ListViewRaindexFilters.svelte +64 -0
- package/dist/components/ListViewRaindexFilters.svelte.d.ts +32 -0
- package/dist/components/LocalDbStatusBadge.svelte +27 -0
- package/dist/components/LocalDbStatusBadge.svelte.d.ts +19 -0
- package/dist/components/LocalDbStatusCard.svelte +43 -0
- package/dist/components/LocalDbStatusCard.svelte.d.ts +20 -0
- package/dist/components/LocalDbStatusModal.svelte +105 -0
- package/dist/components/LocalDbStatusModal.svelte.d.ts +21 -0
- package/dist/components/OrderOrVaultHash.svelte +12 -12
- package/dist/components/OrderOrVaultHash.svelte.d.ts +4 -4
- package/dist/components/PageHeader.svelte +1 -1
- package/dist/components/Sensitive.svelte +16 -0
- package/dist/components/Sensitive.svelte.d.ts +28 -0
- package/dist/components/TanstackAppTable.svelte +270 -60
- package/dist/components/TanstackAppTable.svelte.d.ts +15 -9
- package/dist/components/ToastDetail.svelte +42 -0
- package/dist/components/ToastDetail.svelte.d.ts +20 -0
- package/dist/components/Tooltip.svelte +8 -0
- package/dist/components/Tooltip.svelte.d.ts +21 -0
- package/dist/components/VaultBalanceChangeTypeFilter.svelte +23 -0
- package/dist/components/VaultBalanceChangeTypeFilter.svelte.d.ts +19 -0
- package/dist/components/VaultCard.svelte +18 -0
- package/dist/components/VaultCard.svelte.d.ts +19 -0
- package/dist/components/charts/LightweightChart.svelte +1 -1
- package/dist/components/charts/LightweightChart.svelte.d.ts +5 -5
- package/dist/components/charts/OrderTradesChart.svelte +319 -28
- package/dist/components/charts/OrderTradesChart.svelte.d.ts +4 -4
- package/dist/components/charts/TanstackLightweightChartLine.svelte +5 -9
- package/dist/components/charts/VaultBalanceChart.svelte +8 -26
- package/dist/components/charts/VaultBalanceChart.svelte.d.ts +1 -7
- package/dist/components/charts/transformAndSortData.d.ts +24 -0
- package/dist/components/charts/transformAndSortData.js +111 -0
- package/dist/components/checkbox/CheckboxActiveOrders.svelte +11 -0
- package/dist/components/checkbox/CheckboxActiveOrders.svelte.d.ts +19 -0
- package/dist/components/deployment/ButtonSelectOption.svelte +2 -0
- package/dist/components/deployment/ButtonSelectOption.svelte.d.ts +1 -0
- package/dist/components/deployment/ComposedRainlangModal.svelte +3 -2
- package/dist/components/deployment/ComposedRainlangModal.svelte.d.ts +1 -4
- package/dist/components/deployment/DeploymentSectionHeader.svelte +7 -4
- package/dist/components/deployment/DeploymentSteps.svelte +196 -221
- package/dist/components/deployment/DeploymentSteps.svelte.d.ts +6 -12
- package/dist/components/deployment/DeploymentTile.svelte +2 -2
- package/dist/components/deployment/DeploymentTile.svelte.d.ts +1 -1
- package/dist/components/deployment/DeploymentsSection.svelte +15 -22
- package/dist/components/deployment/DeploymentsSection.svelte.d.ts +3 -2
- package/dist/components/deployment/DepositInput.svelte +10 -11
- package/dist/components/deployment/DepositInput.svelte.d.ts +2 -3
- package/dist/components/deployment/DisclaimerModal.svelte +6 -7
- package/dist/components/deployment/FieldDefinitionInput.svelte +10 -14
- package/dist/components/deployment/FieldDefinitionInput.svelte.d.ts +2 -3
- package/dist/components/deployment/InvalidOrdersSection.svelte +17 -0
- package/dist/components/deployment/InvalidOrdersSection.svelte.d.ts +19 -0
- package/dist/components/deployment/{StrategyPage.svelte → OrderPage.svelte} +15 -24
- package/dist/components/deployment/OrderPage.svelte.d.ts +21 -0
- package/dist/components/deployment/SelectToken.svelte +127 -50
- package/dist/components/deployment/SelectToken.svelte.d.ts +5 -4
- package/dist/components/deployment/TokenBalance.svelte +19 -0
- package/dist/components/deployment/TokenBalance.svelte.d.ts +19 -0
- package/dist/components/deployment/TokenIOInput.svelte +27 -17
- package/dist/components/deployment/TokenIOInput.svelte.d.ts +3 -3
- package/dist/components/deployment/TokenSelectionModal.svelte +148 -0
- package/dist/components/deployment/TokenSelectionModal.svelte.d.ts +20 -0
- package/dist/components/deployment/{ValidStrategiesSection.svelte → ValidOrdersSection.svelte} +7 -7
- package/dist/components/deployment/ValidOrdersSection.svelte.d.ts +19 -0
- package/dist/components/deployment/VaultIdInformation.svelte +17 -0
- package/dist/components/deployment/VaultIdInformation.svelte.d.ts +21 -0
- package/dist/components/detail/OrderDetail.svelte +220 -82
- package/dist/components/detail/OrderDetail.svelte.d.ts +21 -15
- package/dist/components/detail/TanstackOrderQuote.svelte +114 -46
- package/dist/components/detail/TanstackOrderQuote.svelte.d.ts +14 -16
- package/dist/components/detail/VaultDetail.svelte +82 -79
- package/dist/components/detail/VaultDetail.svelte.d.ts +12 -18
- package/dist/components/dropdown/DropdownActiveNetworks.svelte +44 -0
- package/dist/components/dropdown/DropdownActiveNetworks.svelte.d.ts +19 -0
- package/dist/components/dropdown/DropdownCheckbox.svelte +4 -4
- package/dist/components/dropdown/DropdownRaindexesFilter.svelte +172 -0
- package/dist/components/dropdown/DropdownRaindexesFilter.svelte.d.ts +25 -0
- package/dist/components/dropdown/DropdownTokensFilter.svelte +152 -0
- package/dist/components/dropdown/DropdownTokensFilter.svelte.d.ts +28 -0
- package/dist/components/icon/Refresh.svelte +4 -2
- package/dist/components/icon/Refresh.svelte.d.ts +2 -0
- package/dist/components/input/InputOrderHash.svelte +1 -1
- package/dist/components/input/InputOrderHash.svelte.d.ts +3 -3
- package/dist/components/input/InputOwnerFilter.svelte +48 -0
- package/dist/components/input/InputOwnerFilter.svelte.d.ts +19 -0
- package/dist/components/input/InputRegistryUrl.svelte +36 -14
- package/dist/components/input/InputToken.svelte +2 -2
- package/dist/components/input/InputTokenAmount.svelte +30 -20
- package/dist/components/input/InputTokenAmount.svelte.d.ts +3 -3
- package/dist/components/tables/OrderAPY.svelte +6 -33
- package/dist/components/tables/OrderAPY.svelte.d.ts +1 -4
- package/dist/components/tables/OrderTradesListTable.svelte +132 -124
- package/dist/components/tables/OrderTradesListTable.svelte.d.ts +4 -4
- package/dist/components/tables/OrderVaultsVolTable.svelte +17 -22
- package/dist/components/tables/OrderVaultsVolTable.svelte.d.ts +2 -2
- package/dist/components/tables/OrdersListTable.svelte +206 -115
- package/dist/components/tables/OrdersListTable.svelte.d.ts +18 -23
- package/dist/components/tables/VaultBalanceChangesTable.svelte +83 -43
- package/dist/components/tables/VaultBalanceChangesTable.svelte.d.ts +13 -11
- package/dist/components/tables/VaultsListTable.svelte +275 -150
- package/dist/components/tables/VaultsListTable.svelte.d.ts +24 -33
- package/dist/components/transactions/FixedBottomTransaction.svelte +64 -0
- package/dist/components/transactions/FixedBottomTransaction.svelte.d.ts +16 -0
- package/dist/components/transactions/TransactionDetail.svelte +31 -0
- package/dist/components/transactions/TransactionDetail.svelte.d.ts +20 -0
- package/dist/components/transactions/TransactionList.svelte +17 -0
- package/dist/components/transactions/TransactionList.svelte.d.ts +16 -0
- package/dist/components/transactions/getStatusEmoji.d.ts +2 -0
- package/dist/components/transactions/getStatusEmoji.js +20 -0
- package/dist/components/wallet/WalletConnect.svelte +5 -4
- package/dist/components/wallet/WalletConnect.svelte.d.ts +0 -1
- package/dist/consts.d.ts +1 -0
- package/dist/consts.js +1 -0
- package/dist/errors/DeploymentStepsError.d.ts +11 -5
- package/dist/errors/DeploymentStepsError.js +13 -7
- package/dist/errors/index.d.ts +1 -1
- package/dist/errors/index.js +1 -1
- package/dist/hooks/useLocalDb.d.ts +3 -0
- package/dist/hooks/useLocalDb.js +10 -0
- package/dist/hooks/useRaindexClient.d.ts +3 -0
- package/dist/hooks/useRaindexClient.js +11 -0
- package/dist/hooks/useRaindexOrderBuilder.d.ts +3 -0
- package/dist/hooks/useRaindexOrderBuilder.js +11 -0
- package/dist/index.d.ts +122 -91
- package/dist/index.js +118 -87
- package/dist/models/Transaction.d.ts +75 -0
- package/dist/models/Transaction.js +100 -0
- package/dist/providers/LocalDbProvider.svelte +8 -0
- package/dist/providers/LocalDbProvider.svelte.d.ts +21 -0
- package/dist/providers/RaindexClientProvider.svelte +8 -0
- package/dist/providers/RaindexClientProvider.svelte.d.ts +21 -0
- package/dist/providers/RaindexOrderBuilderProvider.svelte +8 -0
- package/dist/providers/RaindexOrderBuilderProvider.svelte.d.ts +21 -0
- package/dist/providers/dotrainRegistry/DotrainRegistryProvider.svelte +8 -0
- package/dist/providers/dotrainRegistry/DotrainRegistryProvider.svelte.d.ts +24 -0
- package/dist/providers/dotrainRegistry/context.d.ts +9 -0
- package/dist/providers/dotrainRegistry/context.js +43 -0
- package/dist/providers/dotrainRegistry/useDotrainRegistry.d.ts +5 -0
- package/dist/providers/dotrainRegistry/useDotrainRegistry.js +35 -0
- package/dist/providers/registry/RegistryManager.d.ts +65 -0
- package/dist/providers/registry/RegistryManager.js +134 -0
- package/dist/providers/registry/RegistryProvider.svelte +6 -0
- package/dist/providers/registry/RegistryProvider.svelte.d.ts +21 -0
- package/dist/providers/registry/context.d.ts +10 -0
- package/dist/providers/registry/context.js +46 -0
- package/dist/providers/registry/useRegistry.d.ts +7 -0
- package/dist/providers/registry/useRegistry.js +29 -0
- package/dist/providers/toasts/ToastProvider.svelte +17 -0
- package/dist/providers/toasts/ToastProvider.svelte.d.ts +18 -0
- package/dist/providers/toasts/context.d.ts +14 -0
- package/dist/providers/toasts/context.js +22 -0
- package/dist/providers/toasts/useToasts.d.ts +16 -0
- package/dist/providers/toasts/useToasts.js +63 -0
- package/dist/providers/transactions/TransactionManager.d.ts +234 -0
- package/dist/providers/transactions/TransactionManager.js +509 -0
- package/dist/providers/transactions/TransactionProvider.svelte +11 -0
- package/dist/providers/transactions/TransactionProvider.svelte.d.ts +24 -0
- package/dist/providers/transactions/context.d.ts +19 -0
- package/dist/providers/transactions/context.js +28 -0
- package/dist/providers/transactions/useTransactions.d.ts +13 -0
- package/dist/providers/transactions/useTransactions.js +18 -0
- package/dist/providers/wallet/WalletProvider.svelte +7 -0
- package/dist/providers/wallet/WalletProvider.svelte.d.ts +21 -0
- package/dist/providers/wallet/context.d.ts +10 -0
- package/dist/providers/wallet/context.js +47 -0
- package/dist/providers/wallet/useAccount.d.ts +8 -0
- package/dist/providers/wallet/useAccount.js +148 -0
- package/dist/queries/keys.d.ts +1 -0
- package/dist/queries/keys.js +10 -9
- package/dist/queries/queryClient.d.ts +2 -2
- package/dist/queries/queryClient.js +16 -11
- package/dist/services/awaitTransactionIndexing.d.ts +107 -0
- package/dist/services/awaitTransactionIndexing.js +60 -0
- package/dist/services/getExplorerLink.d.ts +1 -1
- package/dist/services/getExplorerLink.js +3 -5
- package/dist/services/handleShareChoices.d.ts +2 -2
- package/dist/services/handleShareChoices.js +6 -5
- package/dist/services/historicalOrderCharts.d.ts +3 -3
- package/dist/services/historicalOrderCharts.js +364 -371
- package/dist/services/index.d.ts +5 -2
- package/dist/services/index.js +3 -1
- package/dist/services/loadRegistryUrl.d.ts +2 -0
- package/dist/services/loadRegistryUrl.js +22 -0
- package/dist/services/pairTradesChartData.d.ts +47 -0
- package/dist/services/pairTradesChartData.js +194 -0
- package/dist/services/registry.d.ts +5 -5
- package/dist/services/registry.js +17 -217
- package/dist/services/time.d.ts +12 -0
- package/dist/services/time.js +88 -6
- package/dist/services/validateAmount.d.ts +30 -0
- package/dist/services/validateAmount.js +53 -0
- package/dist/storesGeneric/cachedWritableStore.d.ts +57 -0
- package/dist/storesGeneric/cachedWritableStore.js +93 -0
- package/dist/storesGeneric/scrub.d.ts +14 -0
- package/dist/storesGeneric/scrub.js +22 -0
- package/dist/test/matchers.d.ts +2 -2
- package/dist/test/matchers.js +2 -2
- package/dist/types/account.d.ts +3 -0
- package/dist/types/appStores.d.ts +9 -16
- package/dist/types/modal.d.ts +26 -14
- package/dist/types/order.d.ts +10 -0
- package/dist/types/order.js +1 -0
- package/dist/types/toast.d.ts +11 -0
- package/dist/types/toast.js +1 -0
- package/dist/types/tokenBalance.d.ts +6 -0
- package/dist/types/tokenBalance.js +1 -0
- package/dist/types/transaction.d.ts +67 -22
- package/dist/types/transaction.js +31 -1
- package/dist/utils/breadcrumbs.js +2 -2
- package/dist/utils/codeMirrorThemes.js +80 -74
- package/dist/utils/configHelpers.d.ts +4 -0
- package/dist/utils/configHelpers.js +21 -0
- package/dist/utils/constructHashLink.d.ts +24 -0
- package/dist/utils/constructHashLink.js +117 -0
- package/dist/utils/getNetworkName.d.ts +1 -0
- package/dist/utils/getNetworkName.js +13 -0
- package/dist/utils/hex.js +1 -1
- package/dist/utils/lightweightChartsThemes.d.ts +1 -1
- package/dist/utils/lightweightChartsThemes.js +11 -11
- package/dist/utils/localDbStatus.d.ts +26 -0
- package/dist/utils/localDbStatus.js +22 -0
- package/dist/utils/number.d.ts +0 -7
- package/dist/utils/number.js +5 -30
- package/dist/utils/stripTrailingWhitespace.d.ts +16 -0
- package/dist/utils/stripTrailingWhitespace.js +22 -0
- package/dist/utils/tokens.d.ts +2 -0
- package/dist/utils/tokens.js +3 -0
- package/dist/utils/vaultBalanceChangeLabels.d.ts +4 -0
- package/dist/utils/vaultBalanceChangeLabels.js +18 -0
- package/package.json +89 -84
- package/dist/__fixtures__/orderDetail.d.ts +0 -99
- package/dist/__fixtures__/orderDetail.js +0 -204
- package/dist/__fixtures__/settings-12-11-24.json +0 -160
- package/dist/__mocks__/mockTransactionStore.d.ts +0 -22
- package/dist/__mocks__/mockTransactionStore.js +0 -56
- package/dist/__mocks__/settings.d.ts +0 -3
- package/dist/__mocks__/settings.js +0 -37
- package/dist/components/CheckboxMyItemsOnly.svelte +0 -23
- package/dist/components/CheckboxMyItemsOnly.svelte.d.ts +0 -21
- package/dist/components/ListViewOrderbookFilters.svelte +0 -58
- package/dist/components/ListViewOrderbookFilters.svelte.d.ts +0 -28
- package/dist/components/deployment/InvalidStrategiesSection.svelte +0 -19
- package/dist/components/deployment/InvalidStrategiesSection.svelte.d.ts +0 -19
- package/dist/components/deployment/StrategyPage.svelte.d.ts +0 -19
- package/dist/components/deployment/ValidStrategiesSection.svelte.d.ts +0 -19
- package/dist/components/deployment/getDeploymentTransactionArgs.d.ts +0 -17
- package/dist/components/deployment/getDeploymentTransactionArgs.js +0 -28
- package/dist/components/detail/DepositOrWithdrawButtons.svelte +0 -44
- package/dist/components/detail/DepositOrWithdrawButtons.svelte.d.ts +0 -26
- package/dist/components/dropdown/DropdownActiveSubgraphs.svelte +0 -38
- package/dist/components/dropdown/DropdownActiveSubgraphs.svelte.d.ts +0 -21
- package/dist/components/dropdown/DropdownOrderListAccounts.svelte +0 -15
- package/dist/components/dropdown/DropdownOrderListAccounts.svelte.d.ts +0 -20
- package/dist/components/dropdown/DropdownOrderStatus.svelte +0 -31
- package/dist/components/dropdown/DropdownOrderStatus.svelte.d.ts +0 -19
- package/dist/hooks/useGui.d.ts +0 -3
- package/dist/hooks/useGui.js +0 -11
- package/dist/providers/GuiProvider.svelte +0 -8
- package/dist/providers/GuiProvider.svelte.d.ts +0 -21
- package/dist/stores/transactionStore.d.ts +0 -98
- package/dist/stores/transactionStore.js +0 -303
- package/dist/types/strategy.d.ts +0 -10
- package/dist/utils/time.d.ts +0 -12
- package/dist/utils/time.js +0 -27
- package/dist/utils/vault.d.ts +0 -2
- package/dist/utils/vault.js +0 -29
- /package/dist/types/{strategy.js → account.js} +0 -0
package/README.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# create-svelte
|
|
2
2
|
|
|
3
|
-
Everything you need to build a Svelte library, powered by
|
|
3
|
+
Everything you need to build a Svelte library, powered by
|
|
4
|
+
[`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte).
|
|
4
5
|
|
|
5
|
-
Read more about creating a library
|
|
6
|
+
Read more about creating a library
|
|
7
|
+
[in the docs](https://svelte.dev/docs/kit/packaging).
|
|
6
8
|
|
|
7
9
|
## Creating a project
|
|
8
10
|
|
|
@@ -18,7 +20,8 @@ npx sv create my-app
|
|
|
18
20
|
|
|
19
21
|
## Developing
|
|
20
22
|
|
|
21
|
-
Once you've created a project and installed dependencies with `npm install` (or
|
|
23
|
+
Once you've created a project and installed dependencies with `npm install` (or
|
|
24
|
+
`pnpm install` or `yarn`), start a development server:
|
|
22
25
|
|
|
23
26
|
```bash
|
|
24
27
|
npm run dev
|
|
@@ -27,7 +30,8 @@ npm run dev
|
|
|
27
30
|
npm run dev -- --open
|
|
28
31
|
```
|
|
29
32
|
|
|
30
|
-
Everything inside `src/lib` is part of your library, everything inside
|
|
33
|
+
Everything inside `src/lib` is part of your library, everything inside
|
|
34
|
+
`src/routes` can be used as a showcase or preview app.
|
|
31
35
|
|
|
32
36
|
## Building
|
|
33
37
|
|
|
@@ -45,11 +49,15 @@ npm run build
|
|
|
45
49
|
|
|
46
50
|
You can preview the production build with `npm run preview`.
|
|
47
51
|
|
|
48
|
-
> To deploy your app, you may need to install an
|
|
52
|
+
> To deploy your app, you may need to install an
|
|
53
|
+
> [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
|
|
49
54
|
|
|
50
55
|
## Publishing
|
|
51
56
|
|
|
52
|
-
Go into the `package.json` and give your package the desired name through the
|
|
57
|
+
Go into the `package.json` and give your package the desired name through the
|
|
58
|
+
`"name"` option. Also consider adding a `"license"` field and point it to a
|
|
59
|
+
`LICENSE` file which you can create from a template (one popular option is the
|
|
60
|
+
[MIT license](https://opensource.org/license/mit/)).
|
|
53
61
|
|
|
54
62
|
To publish your library to [npm](https://www.npmjs.com):
|
|
55
63
|
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
version: 6
|
|
2
|
+
networks:
|
|
3
|
+
flare:
|
|
4
|
+
rpc: https://rpc.ankr.com/flare
|
|
5
|
+
chain-id: 14
|
|
6
|
+
currency: FLR
|
|
7
|
+
base:
|
|
8
|
+
rpc: https://mainnet.base.org
|
|
9
|
+
chain-id: 8453
|
|
10
|
+
currency: ETH
|
|
11
|
+
sepolia:
|
|
12
|
+
rpc: https://1rpc.io/sepolia
|
|
13
|
+
chain-id: 11155111
|
|
14
|
+
currency: ETH
|
|
15
|
+
polygon:
|
|
16
|
+
rpc: https://rpc.ankr.com/polygon
|
|
17
|
+
chain-id: 137
|
|
18
|
+
currency: POL
|
|
19
|
+
arbitrum:
|
|
20
|
+
rpc: https://rpc.ankr.com/arbitrum
|
|
21
|
+
chain-id: 42161
|
|
22
|
+
currency: ETH
|
|
23
|
+
matchain:
|
|
24
|
+
rpc: https://rpc.ankr.com/polygon
|
|
25
|
+
chain-id: 137
|
|
26
|
+
currency: POL
|
|
27
|
+
bsc:
|
|
28
|
+
rpc: https://rpc.ankr.com/bsc
|
|
29
|
+
chain-id: 56
|
|
30
|
+
currency: BNB
|
|
31
|
+
linea:
|
|
32
|
+
rpc: https://rpc.linea.build
|
|
33
|
+
chain-id: 59144
|
|
34
|
+
currency: ETH
|
|
35
|
+
ethereum:
|
|
36
|
+
rpc: https://rpc.ankr.com/eth
|
|
37
|
+
chain-id: 1
|
|
38
|
+
currency: ETH
|
|
39
|
+
subgraphs:
|
|
40
|
+
flare: https://example.com/subgraphs/flare/gn
|
|
41
|
+
base: https://example.com/subgraphs/base/gn
|
|
42
|
+
sepolia: https://example.com/subgraphs/sepolia/gn
|
|
43
|
+
polygon: https://example.com/subgraphs/polygon/gn
|
|
44
|
+
arbitrum: https://example.com/subgraphs/arbitrum/gn
|
|
45
|
+
matchain: https://example.com/subgraphs/matchain/gn
|
|
46
|
+
bsc: https://example.com/subgraphs/bsc/gn
|
|
47
|
+
linea: https://example.com/subgraphs/linea/gn
|
|
48
|
+
ethereum: https://example.com/subgraphs/ethereum/gn
|
|
49
|
+
metaboards:
|
|
50
|
+
flare: https://example.com/metaboards/flare/gn
|
|
51
|
+
base: https://example.com/metaboards/base/gn
|
|
52
|
+
sepolia: https://example.com/metaboards/sepolia/gn
|
|
53
|
+
arbitrum: https://example.com/metaboards/arbitrum/gn
|
|
54
|
+
bsc: https://example.com/metaboards/bsc/gn
|
|
55
|
+
linea: https://example.com/metaboards/linea/gn
|
|
56
|
+
ethereum: https://example.com/metaboards/ethereum/gn
|
|
57
|
+
raindexes:
|
|
58
|
+
flare:
|
|
59
|
+
address: 0xCEe8Cd002F151A536394E564b84076c41bBBcD4d
|
|
60
|
+
network: flare
|
|
61
|
+
subgraph: flare
|
|
62
|
+
base:
|
|
63
|
+
address: 0xd2938e7c9fe3597f78832ce780feb61945c377d7
|
|
64
|
+
network: base
|
|
65
|
+
subgraph: base
|
|
66
|
+
sepolia:
|
|
67
|
+
address: 0x0bB72B4C7c0d47b2CaED07c804D9243C1B8a0728
|
|
68
|
+
network: sepolia
|
|
69
|
+
subgraph: sepolia
|
|
70
|
+
polygon:
|
|
71
|
+
address: 0x7D2f700b1f6FD75734824EA4578960747bdF269A
|
|
72
|
+
network: polygon
|
|
73
|
+
subgraph: polygon
|
|
74
|
+
arbitrum:
|
|
75
|
+
address: 0x550878091b2B1506069F61ae59e3A5484Bca9166
|
|
76
|
+
network: arbitrum
|
|
77
|
+
subgraph: arbitrum
|
|
78
|
+
matchain:
|
|
79
|
+
address: 0x40312edab8fe65091354172ad79e9459f21094e2
|
|
80
|
+
network: matchain
|
|
81
|
+
subgraph: matchain
|
|
82
|
+
bsc:
|
|
83
|
+
address: 0xd2938E7c9fe3597F78832CE780Feb61945c377d7
|
|
84
|
+
network: bsc
|
|
85
|
+
subgraph: bsc
|
|
86
|
+
linea:
|
|
87
|
+
address: 0x22410e2a46261a1B1e3899a072f303022801C764
|
|
88
|
+
network: linea
|
|
89
|
+
subgraph: linea
|
|
90
|
+
ethereum:
|
|
91
|
+
address: 0x0eA6d458488d1cf51695e1D6e4744e6FB715d37C
|
|
92
|
+
network: ethereum
|
|
93
|
+
subgraph: ethereum
|
|
94
|
+
rainlangs:
|
|
95
|
+
flare:
|
|
96
|
+
address: 0xE3989Ea7486c0F418C764e6c511e86f6E8830FAb
|
|
97
|
+
network: flare
|
|
98
|
+
base:
|
|
99
|
+
address: 0xC1A14cE2fd58A3A2f99deCb8eDd866204eE07f8D
|
|
100
|
+
network: base
|
|
101
|
+
sepolia:
|
|
102
|
+
address: 0x7692BA8446Bb8B3140A2c02df073080BeD0a7F8E
|
|
103
|
+
network: sepolia
|
|
104
|
+
polygon:
|
|
105
|
+
address: 0xE7116BC05C8afe25e5B54b813A74F916B5D42aB1
|
|
106
|
+
network: polygon
|
|
107
|
+
arbitrum:
|
|
108
|
+
address: 0x9B0D254bd858208074De3d2DaF5af11b3D2F377F
|
|
109
|
+
network: arbitrum
|
|
110
|
+
matchain:
|
|
111
|
+
address: 0x582d9e838FE6cD9F8147C66A8f56A3FBE513a6A2
|
|
112
|
+
network: matchain
|
|
113
|
+
bsc:
|
|
114
|
+
address: 0xA2f56F8F74B7d04d61f281BE6576b6155581dcBA
|
|
115
|
+
network: bsc
|
|
116
|
+
linea:
|
|
117
|
+
address: 0xA2f56F8F74B7d04d61f281BE6576b6155581dcBA
|
|
118
|
+
network: linea
|
|
119
|
+
ethereum:
|
|
120
|
+
address: 0xd19581a021f4704ad4eBfF68258e7A0a9DB1CD77
|
|
121
|
+
accounts:
|
|
122
|
+
wallet1: 0xf08bCbce72f62c95Dcb7c07dCb5Ed26ACfCfBc11
|
|
123
|
+
wallet2: 0x6bc14a99ccf7f9037c98d75eec6c6d807f9d953f
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
rainlangText: string | undefined;
|
|
5
|
+
};
|
|
6
|
+
events: {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
};
|
|
9
|
+
slots: {};
|
|
10
|
+
exports?: {} | undefined;
|
|
11
|
+
bindings?: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
export type CodeMirrorRainlangProps = typeof __propDef.props;
|
|
14
|
+
export type CodeMirrorRainlangEvents = typeof __propDef.events;
|
|
15
|
+
export type CodeMirrorRainlangSlots = typeof __propDef.slots;
|
|
16
|
+
export default class CodeMirrorRainlang extends SvelteComponent<CodeMirrorRainlangProps, CodeMirrorRainlangEvents, CodeMirrorRainlangSlots> {
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script>import { createEventDispatcher } from "svelte";
|
|
2
|
+
export let value = void 0;
|
|
3
|
+
const dispatch = createEventDispatcher();
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<!-- Test double for `svelte-codemirror-editor`: renders all props as attributes
|
|
7
|
+
(like the shared MockComponent) and additionally forwards a native blur on the
|
|
8
|
+
element as the component-level `blur` event that CodeMirrorRainlang listens for. -->
|
|
9
|
+
<div
|
|
10
|
+
data-testid="mock-component"
|
|
11
|
+
{...$$props}
|
|
12
|
+
tabindex="0"
|
|
13
|
+
role="textbox"
|
|
14
|
+
on:blur={() => dispatch('blur')}
|
|
15
|
+
>
|
|
16
|
+
{value}
|
|
17
|
+
</div>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
value?: string | undefined;
|
|
6
|
+
};
|
|
7
|
+
events: {
|
|
8
|
+
blur: CustomEvent<any>;
|
|
9
|
+
} & {
|
|
10
|
+
[evt: string]: CustomEvent<any>;
|
|
11
|
+
};
|
|
12
|
+
slots: {};
|
|
13
|
+
exports?: undefined;
|
|
14
|
+
bindings?: undefined;
|
|
15
|
+
};
|
|
16
|
+
export type MockCodeMirrorEditorProps = typeof __propDef.props;
|
|
17
|
+
export type MockCodeMirrorEditorEvents = typeof __propDef.events;
|
|
18
|
+
export type MockCodeMirrorEditorSlots = typeof __propDef.slots;
|
|
19
|
+
export default class MockCodeMirrorEditor extends SvelteComponent<MockCodeMirrorEditorProps, MockCodeMirrorEditorEvents, MockCodeMirrorEditorSlots> {
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { writable } from
|
|
1
|
+
import { writable } from "svelte/store";
|
|
2
2
|
export const props = writable();
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
<script>import {
|
|
2
|
-
|
|
1
|
+
<script>import { afterUpdate } from "svelte";
|
|
2
|
+
import { props } from "./MockComponent";
|
|
3
|
+
export let testid = "mock-component";
|
|
4
|
+
afterUpdate(() => {
|
|
5
|
+
props.set($$restProps);
|
|
6
|
+
});
|
|
3
7
|
</script>
|
|
8
|
+
|
|
9
|
+
<div data-testid={testid} {...$$restProps}>
|
|
10
|
+
<slot />
|
|
11
|
+
</div>
|
|
@@ -2,11 +2,14 @@ import { SvelteComponent } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
[x: string]: any;
|
|
5
|
+
testid?: string | undefined;
|
|
5
6
|
};
|
|
6
7
|
events: {
|
|
7
8
|
[evt: string]: CustomEvent<any>;
|
|
8
9
|
};
|
|
9
|
-
slots: {
|
|
10
|
+
slots: {
|
|
11
|
+
default: {};
|
|
12
|
+
};
|
|
10
13
|
exports?: undefined;
|
|
11
14
|
bindings?: undefined;
|
|
12
15
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { type Config } from
|
|
1
|
+
import { type Config } from "@wagmi/core";
|
|
2
2
|
export declare const mockWeb3Config: Config;
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { createConfig, http, fallback } from
|
|
2
|
-
import { mock } from
|
|
3
|
-
import { polygonAmoy } from
|
|
1
|
+
import { createConfig, http, fallback } from "@wagmi/core";
|
|
2
|
+
import { mock } from "@wagmi/connectors";
|
|
3
|
+
import { polygonAmoy } from "@wagmi/core/chains";
|
|
4
4
|
export const mockWeb3Config = createConfig({
|
|
5
5
|
multiInjectedProviderDiscovery: true,
|
|
6
6
|
chains: [polygonAmoy],
|
|
7
7
|
connectors: [
|
|
8
8
|
mock({
|
|
9
|
-
accounts: [
|
|
10
|
-
})
|
|
9
|
+
accounts: ["0xf08bcbce72f62c95dcb7c07dcb5ed26acfcfbc11"],
|
|
10
|
+
}),
|
|
11
11
|
],
|
|
12
12
|
transports: {
|
|
13
|
-
[polygonAmoy.id]: fallback([
|
|
14
|
-
|
|
13
|
+
[polygonAmoy.id]: fallback([
|
|
14
|
+
http(),
|
|
15
|
+
http("https://rpc-amoy.polygon.technology"),
|
|
16
|
+
]),
|
|
17
|
+
},
|
|
15
18
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { QueryClient, createInfiniteQuery, createQuery } from
|
|
1
|
+
import { QueryClient, createInfiniteQuery, createQuery, } from "@tanstack/svelte-query";
|
|
2
2
|
// A helper function to create a resolvable mock query.
|
|
3
3
|
// This gives us more control over when each query resolves.
|
|
4
4
|
export const createResolvableMockQuery = (queryFn) => {
|
|
@@ -35,13 +35,13 @@ export const createResolvableInfiniteQuery = (_queryFn, getNextPageParam = (_las
|
|
|
35
35
|
return queryFn(pageParam);
|
|
36
36
|
},
|
|
37
37
|
initialPageParam: 0,
|
|
38
|
-
getNextPageParam
|
|
38
|
+
getNextPageParam,
|
|
39
39
|
}, new QueryClient({
|
|
40
40
|
defaultOptions: {
|
|
41
41
|
queries: {
|
|
42
|
-
staleTime: Infinity
|
|
43
|
-
}
|
|
44
|
-
}
|
|
42
|
+
staleTime: Infinity,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
45
|
}));
|
|
46
46
|
return { query, resolve, refetch };
|
|
47
47
|
};
|
|
@@ -52,13 +52,13 @@ export const createResolvableQuery = (_queryFn) => {
|
|
|
52
52
|
queryKey: [],
|
|
53
53
|
queryFn: () => {
|
|
54
54
|
return queryFn();
|
|
55
|
-
}
|
|
55
|
+
},
|
|
56
56
|
}, new QueryClient({
|
|
57
57
|
defaultOptions: {
|
|
58
58
|
queries: {
|
|
59
|
-
staleTime: Infinity
|
|
60
|
-
}
|
|
61
|
-
}
|
|
59
|
+
staleTime: Infinity,
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
62
|
}));
|
|
63
63
|
return { query, resolve };
|
|
64
64
|
};
|
|
@@ -1,33 +1,27 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import { type Config } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
mockSetSubscribeValue: (value: Record<string, string>) => void;
|
|
26
|
-
};
|
|
27
|
-
export declare const mockActiveOrderStatusStore: {
|
|
28
|
-
subscribe: (this: void, run: import("svelte/store").Subscriber<boolean | undefined>, invalidate?: import("svelte/store").Invalidator<boolean | undefined> | undefined) => import("svelte/store").Unsubscriber;
|
|
29
|
-
set: (this: void, value: boolean | undefined) => void;
|
|
30
|
-
mockSetSubscribeValue: (value: boolean | undefined) => void;
|
|
1
|
+
import type { Address } from "@rainlanguage/raindex";
|
|
2
|
+
import { type Config } from "@wagmi/core";
|
|
3
|
+
type MockDeployment = {
|
|
4
|
+
key: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
} | null;
|
|
8
|
+
type MockPageState = {
|
|
9
|
+
data: Record<string, unknown> & {
|
|
10
|
+
deployment: MockDeployment;
|
|
11
|
+
};
|
|
12
|
+
url: URL;
|
|
13
|
+
params: Record<string, unknown>;
|
|
14
|
+
form: Record<string, unknown>;
|
|
15
|
+
status: number;
|
|
16
|
+
error: unknown;
|
|
17
|
+
route: {
|
|
18
|
+
id: string | null;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export declare const mockShowInactiveOrdersStore: {
|
|
22
|
+
subscribe: (this: void, run: import("svelte/store").Subscriber<boolean>, invalidate?: import("svelte/store").Invalidator<boolean> | undefined) => import("svelte/store").Unsubscriber;
|
|
23
|
+
set: (this: void, value: boolean) => void;
|
|
24
|
+
mockSetSubscribeValue: (value: boolean) => void;
|
|
31
25
|
};
|
|
32
26
|
export declare const mockOrderHashStore: {
|
|
33
27
|
subscribe: (this: void, run: import("svelte/store").Subscriber<string>, invalidate?: import("svelte/store").Invalidator<string> | undefined) => import("svelte/store").Unsubscriber;
|
|
@@ -39,12 +33,17 @@ export declare const mockHideZeroBalanceVaultsStore: {
|
|
|
39
33
|
set: (this: void, value: boolean) => void;
|
|
40
34
|
mockSetSubscribeValue: (value: boolean) => void;
|
|
41
35
|
};
|
|
36
|
+
export declare const mockHideInactiveOrdersVaultsStore: {
|
|
37
|
+
subscribe: (this: void, run: import("svelte/store").Subscriber<boolean>, invalidate?: import("svelte/store").Invalidator<boolean> | undefined) => import("svelte/store").Unsubscriber;
|
|
38
|
+
set: (this: void, value: boolean) => void;
|
|
39
|
+
mockSetSubscribeValue: (value: boolean) => void;
|
|
40
|
+
};
|
|
42
41
|
export declare const mockActiveNetworkRefStore: {
|
|
43
42
|
subscribe: (this: void, run: import("svelte/store").Subscriber<string>, invalidate?: import("svelte/store").Invalidator<string> | undefined) => import("svelte/store").Unsubscriber;
|
|
44
43
|
set: (this: void, value: string) => void;
|
|
45
44
|
mockSetSubscribeValue: (value: string) => void;
|
|
46
45
|
};
|
|
47
|
-
export declare const
|
|
46
|
+
export declare const mockActiveRaindexRefStore: {
|
|
48
47
|
subscribe: (this: void, run: import("svelte/store").Subscriber<string>, invalidate?: import("svelte/store").Invalidator<string> | undefined) => import("svelte/store").Unsubscriber;
|
|
49
48
|
set: (this: void, value: string) => void;
|
|
50
49
|
mockSetSubscribeValue: (value: string) => void;
|
|
@@ -59,12 +58,6 @@ export declare const mockSubgraphUrlStore: {
|
|
|
59
58
|
set: (this: void, value: string) => void;
|
|
60
59
|
mockSetSubscribeValue: (value: string) => void;
|
|
61
60
|
};
|
|
62
|
-
export declare const mockSignerAddressStore: {
|
|
63
|
-
subscribe: (this: void, run: import("svelte/store").Subscriber<string>, invalidate?: import("svelte/store").Invalidator<string> | undefined) => import("svelte/store").Unsubscriber;
|
|
64
|
-
set: (this: void, value: string) => void;
|
|
65
|
-
mockSetSubscribeValue: (value: string) => void;
|
|
66
|
-
update: (this: void, updater: import("svelte/store").Updater<string>) => void;
|
|
67
|
-
};
|
|
68
61
|
export declare const mockChainIdStore: {
|
|
69
62
|
subscribe: (this: void, run: import("svelte/store").Subscriber<number>, invalidate?: import("svelte/store").Invalidator<number> | undefined) => import("svelte/store").Unsubscriber;
|
|
70
63
|
set: (this: void, value: number) => void;
|
|
@@ -82,13 +75,30 @@ export declare const mockWagmiConfigStore: {
|
|
|
82
75
|
update: (this: void, updater: import("svelte/store").Updater<Config>) => void;
|
|
83
76
|
mockSetSubscribeValue: (value: Config) => void;
|
|
84
77
|
};
|
|
85
|
-
export declare const
|
|
86
|
-
subscribe: (this: void, run: import("svelte/store").Subscriber<
|
|
87
|
-
set: (this: void, value:
|
|
88
|
-
mockSetSubscribeValue: (value:
|
|
78
|
+
export declare const mockSelectedChainIdsStore: {
|
|
79
|
+
subscribe: (this: void, run: import("svelte/store").Subscriber<number[]>, invalidate?: import("svelte/store").Invalidator<number[]> | undefined) => import("svelte/store").Unsubscriber;
|
|
80
|
+
set: (this: void, value: number[]) => void;
|
|
81
|
+
mockSetSubscribeValue: (value: number[]) => void;
|
|
89
82
|
};
|
|
90
83
|
export declare const mockPageStore: {
|
|
91
|
-
subscribe: (this: void, run: import("svelte/store").Subscriber<
|
|
92
|
-
set: (this: void, value:
|
|
93
|
-
mockSetSubscribeValue: (
|
|
94
|
-
|
|
84
|
+
subscribe: (this: void, run: import("svelte/store").Subscriber<MockPageState>, invalidate?: import("svelte/store").Invalidator<MockPageState> | undefined) => import("svelte/store").Unsubscriber;
|
|
85
|
+
set: (this: void, value: MockPageState) => void;
|
|
86
|
+
mockSetSubscribeValue: (newValue: Partial<MockPageState>) => void;
|
|
87
|
+
reset: () => void;
|
|
88
|
+
};
|
|
89
|
+
export declare const mockActiveTokensStore: {
|
|
90
|
+
subscribe: (this: void, run: import("svelte/store").Subscriber<string[]>, invalidate?: import("svelte/store").Invalidator<string[]> | undefined) => import("svelte/store").Unsubscriber;
|
|
91
|
+
set: (this: void, value: string[]) => void;
|
|
92
|
+
mockSetSubscribeValue: (value: string[]) => void;
|
|
93
|
+
};
|
|
94
|
+
export declare const mockActiveRaindexAddressesStore: {
|
|
95
|
+
subscribe: (this: void, run: import("svelte/store").Subscriber<string[]>, invalidate?: import("svelte/store").Invalidator<string[]> | undefined) => import("svelte/store").Unsubscriber;
|
|
96
|
+
set: (this: void, value: string[]) => void;
|
|
97
|
+
mockSetSubscribeValue: (value: string[]) => void;
|
|
98
|
+
};
|
|
99
|
+
export declare const mockOwnerFilterStore: {
|
|
100
|
+
subscribe: (this: void, run: import("svelte/store").Subscriber<`0x${string}`>, invalidate?: import("svelte/store").Invalidator<`0x${string}`> | undefined) => import("svelte/store").Unsubscriber;
|
|
101
|
+
set: (this: void, value: `0x${string}`) => void;
|
|
102
|
+
mockSetSubscribeValue: (value: Address) => void;
|
|
103
|
+
};
|
|
104
|
+
export {};
|