@rainlanguage/ui-components 0.0.1-alpha.21 → 0.0.1-alpha.210

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.
Files changed (260) hide show
  1. package/dist/__fixtures__/settings.yaml +125 -0
  2. package/dist/__mocks__/CodeMirrorRainlang.svelte +4 -0
  3. package/dist/__mocks__/CodeMirrorRainlang.svelte.d.ts +18 -0
  4. package/dist/__mocks__/MockComponent.svelte +4 -0
  5. package/dist/__mocks__/MockComponent.svelte.d.ts +3 -1
  6. package/dist/__mocks__/stores.d.ts +47 -33
  7. package/dist/__mocks__/stores.js +61 -38
  8. package/dist/components/ButtonLoading.svelte +1 -1
  9. package/dist/components/ButtonVaultLink.svelte +11 -11
  10. package/dist/components/ButtonVaultLink.svelte.d.ts +4 -3
  11. package/dist/components/CheckboxInactiveOrdersVault.svelte +20 -0
  12. package/dist/components/CheckboxInactiveOrdersVault.svelte.d.ts +19 -0
  13. package/dist/components/CheckboxMyItemsOnly.svelte +3 -2
  14. package/dist/components/CheckboxMyItemsOnly.svelte.d.ts +2 -3
  15. package/dist/components/CheckboxZeroBalanceVault.svelte.d.ts +2 -2
  16. package/dist/components/CodeMirrorDotrain.svelte +4 -0
  17. package/dist/components/CodeMirrorDotrain.svelte.d.ts +1 -0
  18. package/dist/components/CodeMirrorRainlang.svelte +3 -12
  19. package/dist/components/CodeMirrorRainlang.svelte.d.ts +2 -2
  20. package/dist/components/EditableSpan.svelte +3 -14
  21. package/dist/components/EditableSpan.svelte.d.ts +0 -1
  22. package/dist/components/Hash.svelte +3 -3
  23. package/dist/components/License.svelte +5 -4
  24. package/dist/components/ListViewOrderbookFilters.svelte +45 -23
  25. package/dist/components/ListViewOrderbookFilters.svelte.d.ts +27 -22
  26. package/dist/components/LocalDbStatusBadge.svelte +27 -0
  27. package/dist/components/LocalDbStatusBadge.svelte.d.ts +19 -0
  28. package/dist/components/LocalDbStatusCard.svelte +40 -0
  29. package/dist/components/LocalDbStatusCard.svelte.d.ts +20 -0
  30. package/dist/components/LocalDbStatusModal.svelte +103 -0
  31. package/dist/components/LocalDbStatusModal.svelte.d.ts +21 -0
  32. package/dist/components/OrderOrVaultHash.svelte +12 -12
  33. package/dist/components/OrderOrVaultHash.svelte.d.ts +4 -4
  34. package/dist/components/PageHeader.svelte +1 -1
  35. package/dist/components/TanstackAppTable.svelte +179 -28
  36. package/dist/components/TanstackAppTable.svelte.d.ts +14 -8
  37. package/dist/components/ToastDetail.svelte +42 -0
  38. package/dist/components/ToastDetail.svelte.d.ts +20 -0
  39. package/dist/components/Tooltip.svelte +8 -0
  40. package/dist/components/Tooltip.svelte.d.ts +21 -0
  41. package/dist/components/VaultBalanceChangeTypeFilter.svelte +23 -0
  42. package/dist/components/VaultBalanceChangeTypeFilter.svelte.d.ts +19 -0
  43. package/dist/components/VaultCard.svelte +18 -0
  44. package/dist/components/VaultCard.svelte.d.ts +19 -0
  45. package/dist/components/charts/LightweightChart.svelte +1 -1
  46. package/dist/components/charts/LightweightChart.svelte.d.ts +5 -5
  47. package/dist/components/charts/OrderTradesChart.svelte +300 -28
  48. package/dist/components/charts/OrderTradesChart.svelte.d.ts +4 -4
  49. package/dist/components/charts/TanstackLightweightChartLine.svelte +5 -9
  50. package/dist/components/charts/VaultBalanceChart.svelte +8 -26
  51. package/dist/components/charts/VaultBalanceChart.svelte.d.ts +1 -7
  52. package/dist/components/charts/transformAndSortData.d.ts +24 -0
  53. package/dist/components/charts/transformAndSortData.js +111 -0
  54. package/dist/components/checkbox/CheckboxActiveOrders.svelte +11 -0
  55. package/dist/components/checkbox/CheckboxActiveOrders.svelte.d.ts +19 -0
  56. package/dist/components/deployment/ButtonSelectOption.svelte +2 -0
  57. package/dist/components/deployment/ButtonSelectOption.svelte.d.ts +1 -0
  58. package/dist/components/deployment/ComposedRainlangModal.svelte +2 -1
  59. package/dist/components/deployment/ComposedRainlangModal.svelte.d.ts +1 -4
  60. package/dist/components/deployment/DeploymentSectionHeader.svelte +7 -4
  61. package/dist/components/deployment/DeploymentSteps.svelte +209 -216
  62. package/dist/components/deployment/DeploymentSteps.svelte.d.ts +6 -12
  63. package/dist/components/deployment/DeploymentTile.svelte +2 -2
  64. package/dist/components/deployment/DeploymentTile.svelte.d.ts +1 -1
  65. package/dist/components/deployment/DeploymentsSection.svelte +15 -22
  66. package/dist/components/deployment/DeploymentsSection.svelte.d.ts +3 -2
  67. package/dist/components/deployment/DepositInput.svelte +8 -10
  68. package/dist/components/deployment/DepositInput.svelte.d.ts +1 -2
  69. package/dist/components/deployment/DisclaimerModal.svelte +6 -7
  70. package/dist/components/deployment/FieldDefinitionInput.svelte +7 -11
  71. package/dist/components/deployment/FieldDefinitionInput.svelte.d.ts +1 -2
  72. package/dist/components/deployment/InvalidOrdersSection.svelte +17 -0
  73. package/dist/components/deployment/InvalidOrdersSection.svelte.d.ts +19 -0
  74. package/dist/components/deployment/{StrategyPage.svelte → OrderPage.svelte} +15 -24
  75. package/dist/components/deployment/OrderPage.svelte.d.ts +21 -0
  76. package/dist/components/deployment/SelectToken.svelte +125 -48
  77. package/dist/components/deployment/SelectToken.svelte.d.ts +4 -3
  78. package/dist/components/deployment/TokenBalance.svelte +19 -0
  79. package/dist/components/deployment/TokenBalance.svelte.d.ts +19 -0
  80. package/dist/components/deployment/TokenIOInput.svelte +25 -15
  81. package/dist/components/deployment/TokenIOInput.svelte.d.ts +3 -3
  82. package/dist/components/deployment/TokenSelectionModal.svelte +148 -0
  83. package/dist/components/deployment/TokenSelectionModal.svelte.d.ts +20 -0
  84. package/dist/components/deployment/{ValidStrategiesSection.svelte → ValidOrdersSection.svelte} +7 -7
  85. package/dist/components/deployment/ValidOrdersSection.svelte.d.ts +19 -0
  86. package/dist/components/deployment/VaultIdInformation.svelte +17 -0
  87. package/dist/components/deployment/VaultIdInformation.svelte.d.ts +21 -0
  88. package/dist/components/detail/OrderDetail.svelte +184 -80
  89. package/dist/components/detail/OrderDetail.svelte.d.ts +21 -15
  90. package/dist/components/detail/TanstackOrderQuote.svelte +92 -46
  91. package/dist/components/detail/TanstackOrderQuote.svelte.d.ts +14 -16
  92. package/dist/components/detail/VaultDetail.svelte +78 -77
  93. package/dist/components/detail/VaultDetail.svelte.d.ts +12 -18
  94. package/dist/components/dropdown/DropdownActiveNetworks.svelte +44 -0
  95. package/dist/components/dropdown/DropdownActiveNetworks.svelte.d.ts +19 -0
  96. package/dist/components/dropdown/DropdownCheckbox.svelte +4 -4
  97. package/dist/components/dropdown/DropdownOrderListAccounts.svelte +5 -2
  98. package/dist/components/dropdown/DropdownOrderListAccounts.svelte.d.ts +2 -3
  99. package/dist/components/dropdown/DropdownOrderbooksFilter.svelte +172 -0
  100. package/dist/components/dropdown/DropdownOrderbooksFilter.svelte.d.ts +25 -0
  101. package/dist/components/dropdown/DropdownTokensFilter.svelte +152 -0
  102. package/dist/components/dropdown/DropdownTokensFilter.svelte.d.ts +28 -0
  103. package/dist/components/icon/Refresh.svelte +2 -1
  104. package/dist/components/icon/Refresh.svelte.d.ts +1 -0
  105. package/dist/components/input/InputOrderHash.svelte +1 -1
  106. package/dist/components/input/InputOrderHash.svelte.d.ts +3 -3
  107. package/dist/components/input/InputRegistryUrl.svelte +36 -14
  108. package/dist/components/input/InputToken.svelte +2 -2
  109. package/dist/components/input/InputTokenAmount.svelte +16 -21
  110. package/dist/components/input/InputTokenAmount.svelte.d.ts +3 -3
  111. package/dist/components/tables/OrderAPY.svelte +6 -33
  112. package/dist/components/tables/OrderAPY.svelte.d.ts +1 -4
  113. package/dist/components/tables/OrderTradesListTable.svelte +84 -81
  114. package/dist/components/tables/OrderTradesListTable.svelte.d.ts +4 -4
  115. package/dist/components/tables/OrderVaultsVolTable.svelte +17 -22
  116. package/dist/components/tables/OrderVaultsVolTable.svelte.d.ts +2 -2
  117. package/dist/components/tables/OrdersListTable.svelte +200 -108
  118. package/dist/components/tables/OrdersListTable.svelte.d.ts +17 -21
  119. package/dist/components/tables/VaultBalanceChangesTable.svelte +83 -43
  120. package/dist/components/tables/VaultBalanceChangesTable.svelte.d.ts +13 -11
  121. package/dist/components/tables/VaultsListTable.svelte +268 -145
  122. package/dist/components/tables/VaultsListTable.svelte.d.ts +24 -32
  123. package/dist/components/transactions/FixedBottomTransaction.svelte +63 -0
  124. package/dist/components/transactions/FixedBottomTransaction.svelte.d.ts +16 -0
  125. package/dist/components/transactions/TransactionDetail.svelte +31 -0
  126. package/dist/components/transactions/TransactionDetail.svelte.d.ts +20 -0
  127. package/dist/components/transactions/TransactionList.svelte +17 -0
  128. package/dist/components/transactions/TransactionList.svelte.d.ts +16 -0
  129. package/dist/components/transactions/getStatusEmoji.d.ts +2 -0
  130. package/dist/components/transactions/getStatusEmoji.js +20 -0
  131. package/dist/components/wallet/WalletConnect.svelte +5 -4
  132. package/dist/components/wallet/WalletConnect.svelte.d.ts +0 -1
  133. package/dist/consts.d.ts +1 -0
  134. package/dist/consts.js +1 -0
  135. package/dist/errors/DeploymentStepsError.d.ts +8 -2
  136. package/dist/errors/DeploymentStepsError.js +7 -1
  137. package/dist/hooks/useGui.d.ts +1 -1
  138. package/dist/hooks/useGui.js +1 -1
  139. package/dist/hooks/useLocalDb.d.ts +3 -0
  140. package/dist/hooks/useLocalDb.js +10 -0
  141. package/dist/hooks/useRaindexClient.d.ts +3 -0
  142. package/dist/hooks/useRaindexClient.js +11 -0
  143. package/dist/index.d.ts +42 -19
  144. package/dist/index.js +41 -16
  145. package/dist/models/Transaction.d.ts +75 -0
  146. package/dist/models/Transaction.js +100 -0
  147. package/dist/providers/GuiProvider.svelte +1 -1
  148. package/dist/providers/GuiProvider.svelte.d.ts +1 -1
  149. package/dist/providers/LocalDbProvider.svelte +8 -0
  150. package/dist/providers/LocalDbProvider.svelte.d.ts +21 -0
  151. package/dist/providers/RaindexClientProvider.svelte +8 -0
  152. package/dist/providers/RaindexClientProvider.svelte.d.ts +21 -0
  153. package/dist/providers/dotrainRegistry/DotrainRegistryProvider.svelte +8 -0
  154. package/dist/providers/dotrainRegistry/DotrainRegistryProvider.svelte.d.ts +24 -0
  155. package/dist/providers/dotrainRegistry/context.d.ts +9 -0
  156. package/dist/providers/dotrainRegistry/context.js +40 -0
  157. package/dist/providers/dotrainRegistry/useDotrainRegistry.d.ts +5 -0
  158. package/dist/providers/dotrainRegistry/useDotrainRegistry.js +35 -0
  159. package/dist/providers/registry/RegistryManager.d.ts +65 -0
  160. package/dist/providers/registry/RegistryManager.js +133 -0
  161. package/dist/providers/registry/RegistryProvider.svelte +6 -0
  162. package/dist/providers/registry/RegistryProvider.svelte.d.ts +21 -0
  163. package/dist/providers/registry/context.d.ts +10 -0
  164. package/dist/providers/registry/context.js +46 -0
  165. package/dist/providers/registry/useRegistry.d.ts +7 -0
  166. package/dist/providers/registry/useRegistry.js +29 -0
  167. package/dist/providers/toasts/ToastProvider.svelte +17 -0
  168. package/dist/providers/toasts/ToastProvider.svelte.d.ts +18 -0
  169. package/dist/providers/toasts/context.d.ts +14 -0
  170. package/dist/providers/toasts/context.js +22 -0
  171. package/dist/providers/toasts/useToasts.d.ts +16 -0
  172. package/dist/providers/toasts/useToasts.js +63 -0
  173. package/dist/providers/transactions/TransactionManager.d.ts +235 -0
  174. package/dist/providers/transactions/TransactionManager.js +509 -0
  175. package/dist/providers/transactions/TransactionProvider.svelte +11 -0
  176. package/dist/providers/transactions/TransactionProvider.svelte.d.ts +24 -0
  177. package/dist/providers/transactions/context.d.ts +19 -0
  178. package/dist/providers/transactions/context.js +28 -0
  179. package/dist/providers/transactions/useTransactions.d.ts +13 -0
  180. package/dist/providers/transactions/useTransactions.js +18 -0
  181. package/dist/providers/wallet/WalletProvider.svelte +7 -0
  182. package/dist/providers/wallet/WalletProvider.svelte.d.ts +21 -0
  183. package/dist/providers/wallet/context.d.ts +10 -0
  184. package/dist/providers/wallet/context.js +47 -0
  185. package/dist/providers/wallet/useAccount.d.ts +8 -0
  186. package/dist/providers/wallet/useAccount.js +148 -0
  187. package/dist/queries/keys.d.ts +1 -0
  188. package/dist/queries/keys.js +1 -0
  189. package/dist/queries/queryClient.d.ts +1 -1
  190. package/dist/queries/queryClient.js +11 -6
  191. package/dist/services/awaitTransactionIndexing.d.ts +107 -0
  192. package/dist/services/awaitTransactionIndexing.js +58 -0
  193. package/dist/services/getExplorerLink.d.ts +1 -1
  194. package/dist/services/getExplorerLink.js +2 -4
  195. package/dist/services/handleShareChoices.d.ts +2 -2
  196. package/dist/services/handleShareChoices.js +7 -2
  197. package/dist/services/historicalOrderCharts.d.ts +2 -2
  198. package/dist/services/historicalOrderCharts.js +267 -333
  199. package/dist/services/index.d.ts +2 -1
  200. package/dist/services/index.js +2 -1
  201. package/dist/services/loadRegistryUrl.d.ts +2 -0
  202. package/dist/services/loadRegistryUrl.js +22 -0
  203. package/dist/services/pairTradesChartData.d.ts +47 -0
  204. package/dist/services/pairTradesChartData.js +190 -0
  205. package/dist/services/registry.d.ts +5 -5
  206. package/dist/services/registry.js +8 -208
  207. package/dist/services/time.d.ts +12 -0
  208. package/dist/services/time.js +88 -6
  209. package/dist/storesGeneric/cachedWritableStore.d.ts +57 -0
  210. package/dist/storesGeneric/cachedWritableStore.js +93 -0
  211. package/dist/types/account.d.ts +3 -0
  212. package/dist/types/appStores.d.ts +9 -14
  213. package/dist/types/modal.d.ts +26 -14
  214. package/dist/types/{strategy.d.ts → order.d.ts} +3 -3
  215. package/dist/types/order.js +1 -0
  216. package/dist/types/toast.d.ts +11 -0
  217. package/dist/types/toast.js +1 -0
  218. package/dist/types/tokenBalance.d.ts +6 -0
  219. package/dist/types/tokenBalance.js +1 -0
  220. package/dist/types/transaction.d.ts +66 -21
  221. package/dist/types/transaction.js +31 -1
  222. package/dist/utils/configHelpers.d.ts +4 -0
  223. package/dist/utils/configHelpers.js +21 -0
  224. package/dist/utils/constructHashLink.d.ts +24 -0
  225. package/dist/utils/constructHashLink.js +115 -0
  226. package/dist/utils/getNetworkName.d.ts +1 -0
  227. package/dist/utils/getNetworkName.js +13 -0
  228. package/dist/utils/number.d.ts +0 -7
  229. package/dist/utils/number.js +0 -27
  230. package/dist/utils/tokens.d.ts +2 -0
  231. package/dist/utils/tokens.js +3 -0
  232. package/dist/utils/vaultBalanceChangeLabels.d.ts +4 -0
  233. package/dist/utils/vaultBalanceChangeLabels.js +18 -0
  234. package/package.json +39 -34
  235. package/dist/__fixtures__/orderDetail.d.ts +0 -99
  236. package/dist/__fixtures__/orderDetail.js +0 -204
  237. package/dist/__fixtures__/settings-12-11-24.json +0 -160
  238. package/dist/__mocks__/mockTransactionStore.d.ts +0 -22
  239. package/dist/__mocks__/mockTransactionStore.js +0 -56
  240. package/dist/__mocks__/settings.d.ts +0 -3
  241. package/dist/__mocks__/settings.js +0 -37
  242. package/dist/components/deployment/InvalidStrategiesSection.svelte +0 -19
  243. package/dist/components/deployment/InvalidStrategiesSection.svelte.d.ts +0 -19
  244. package/dist/components/deployment/StrategyPage.svelte.d.ts +0 -19
  245. package/dist/components/deployment/ValidStrategiesSection.svelte.d.ts +0 -19
  246. package/dist/components/deployment/getDeploymentTransactionArgs.d.ts +0 -17
  247. package/dist/components/deployment/getDeploymentTransactionArgs.js +0 -28
  248. package/dist/components/detail/DepositOrWithdrawButtons.svelte +0 -44
  249. package/dist/components/detail/DepositOrWithdrawButtons.svelte.d.ts +0 -26
  250. package/dist/components/dropdown/DropdownActiveSubgraphs.svelte +0 -38
  251. package/dist/components/dropdown/DropdownActiveSubgraphs.svelte.d.ts +0 -21
  252. package/dist/components/dropdown/DropdownOrderStatus.svelte +0 -31
  253. package/dist/components/dropdown/DropdownOrderStatus.svelte.d.ts +0 -19
  254. package/dist/stores/transactionStore.d.ts +0 -98
  255. package/dist/stores/transactionStore.js +0 -303
  256. package/dist/utils/time.d.ts +0 -12
  257. package/dist/utils/time.js +0 -27
  258. package/dist/utils/vault.d.ts +0 -2
  259. package/dist/utils/vault.js +0 -29
  260. /package/dist/types/{strategy.js → account.js} +0 -0
@@ -0,0 +1,125 @@
1
+ version: 2
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://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/ob4-flare/0.8/gn
41
+ base: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/ob4-base/0.9/gn
42
+ sepolia: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/ob4-sepolia/0.1/gn
43
+ polygon: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/ob4-polygon/0.1/gn
44
+ arbitrum: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/ob4-arbitrum/0.2/gn
45
+ matchain: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/ob4-polygon/0.1/gn
46
+ bsc: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/ob4-bsc/2024-10-14-63f4/gn
47
+ linea: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/ob4-linea/2024-10-14-12fc/gn
48
+ ethereum: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/metadata-mainnet/2024-10-25-2857/gn
49
+ metaboards:
50
+ flare: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/mb-flare-0x893BBFB7/0.1/gn
51
+ base: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/mb-base-0x59401C93/0.1/gn
52
+ sepolia: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/mb-sepolia-0x77991674/0.1/gn
53
+ polygon: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/mb-polygon/0.1/gn
54
+ arbitrum: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/mb-arbitrum/0.1/gn
55
+ matchain: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/mb-polygon/0.1/gn
56
+ bsc: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/mb-bsc/0.1/gn
57
+ linea: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/mb-linea-0xed7d6156/1.0.0/gn
58
+ ethereum: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/metadata-mainnet/2024-10-25-2857/gn
59
+ orderbooks:
60
+ flare:
61
+ address: 0xCEe8Cd002F151A536394E564b84076c41bBBcD4d
62
+ network: flare
63
+ subgraph: flare
64
+ base:
65
+ address: 0xd2938e7c9fe3597f78832ce780feb61945c377d7
66
+ network: base
67
+ subgraph: base
68
+ sepolia:
69
+ address: 0x0bB72B4C7c0d47b2CaED07c804D9243C1B8a0728
70
+ network: sepolia
71
+ subgraph: sepolia
72
+ polygon:
73
+ address: 0x7D2f700b1f6FD75734824EA4578960747bdF269A
74
+ network: polygon
75
+ subgraph: polygon
76
+ arbitrum:
77
+ address: 0x550878091b2B1506069F61ae59e3A5484Bca9166
78
+ network: arbitrum
79
+ subgraph: arbitrum
80
+ matchain:
81
+ address: 0x40312edab8fe65091354172ad79e9459f21094e2
82
+ network: matchain
83
+ subgraph: matchain
84
+ bsc:
85
+ address: 0xd2938E7c9fe3597F78832CE780Feb61945c377d7
86
+ network: bsc
87
+ subgraph: bsc
88
+ linea:
89
+ address: 0x22410e2a46261a1B1e3899a072f303022801C764
90
+ network: linea
91
+ subgraph: linea
92
+ ethereum:
93
+ address: 0x0eA6d458488d1cf51695e1D6e4744e6FB715d37C
94
+ network: ethereum
95
+ subgraph: ethereum
96
+ deployers:
97
+ flare:
98
+ address: 0xE3989Ea7486c0F418C764e6c511e86f6E8830FAb
99
+ network: flare
100
+ base:
101
+ address: 0xC1A14cE2fd58A3A2f99deCb8eDd866204eE07f8D
102
+ network: base
103
+ sepolia:
104
+ address: 0x7692BA8446Bb8B3140A2c02df073080BeD0a7F8E
105
+ network: sepolia
106
+ polygon:
107
+ address: 0xE7116BC05C8afe25e5B54b813A74F916B5D42aB1
108
+ network: polygon
109
+ arbitrum:
110
+ address: 0x9B0D254bd858208074De3d2DaF5af11b3D2F377F
111
+ network: arbitrum
112
+ matchain:
113
+ address: 0x582d9e838FE6cD9F8147C66A8f56A3FBE513a6A2
114
+ network: matchain
115
+ bsc:
116
+ address: 0xA2f56F8F74B7d04d61f281BE6576b6155581dcBA
117
+ network: bsc
118
+ linea:
119
+ address: 0xA2f56F8F74B7d04d61f281BE6576b6155581dcBA
120
+ network: linea
121
+ ethereum:
122
+ address: 0xd19581a021f4704ad4eBfF68258e7A0a9DB1CD77
123
+ accounts:
124
+ wallet1: 0xf08bCbce72f62c95Dcb7c07dCb5Ed26ACfCfBc11
125
+ wallet2: 0x6bc14a99ccf7f9037c98d75eec6c6d807f9d953f
@@ -0,0 +1,4 @@
1
+ <script>export let rainlangText;
2
+ </script>
3
+
4
+ <div data-testid="codemirror-rainlang">{rainlangText}</div>
@@ -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 {};
@@ -1,3 +1,7 @@
1
1
  <script>import { props } from "./MockComponent";
2
2
  $: $props = $$props;
3
3
  </script>
4
+
5
+ <div data-testid="mock-component" {...$$props}>
6
+ <slot />
7
+ </div>
@@ -6,7 +6,9 @@ declare const __propDef: {
6
6
  events: {
7
7
  [evt: string]: CustomEvent<any>;
8
8
  };
9
- slots: {};
9
+ slots: {
10
+ default: {};
11
+ };
10
12
  exports?: undefined;
11
13
  bindings?: undefined;
12
14
  };
@@ -1,33 +1,31 @@
1
- import type { ConfigSource } from '@rainlanguage/orderbook/js_api';
2
1
  import { type Config } from '@wagmi/core';
3
- import type { Page } from '@sveltejs/kit';
4
- export declare const mockWalletAddressMatchesOrBlankStore: {
5
- subscribe: (this: void, run: import("svelte/store").Subscriber<() => boolean>, invalidate?: import("svelte/store").Invalidator<() => boolean> | undefined) => import("svelte/store").Unsubscriber;
6
- set: (this: void, value: () => boolean) => void;
7
- mockSetSubscribeValue: (value: () => boolean) => void;
8
- };
9
- export declare const mockSettingsStore: {
10
- subscribe: (this: void, run: import("svelte/store").Subscriber<ConfigSource | undefined>, invalidate?: import("svelte/store").Invalidator<ConfigSource | undefined> | undefined) => import("svelte/store").Unsubscriber;
11
- set: (this: void, value: ConfigSource | undefined) => void;
12
- mockSetSubscribeValue: (value: ConfigSource | undefined) => void;
13
- };
14
- export declare const mockActiveSubgraphsStore: {
15
- subscribe: (this: void, run: import("svelte/store").Subscriber<Record<string, string>>, invalidate?: import("svelte/store").Invalidator<Record<string, string>> | undefined) => import("svelte/store").Unsubscriber;
16
- set: (this: void, value: Record<string, string>) => void;
17
- mockSetSubscribeValue: (value: Record<string, string>) => void;
18
- };
19
- export declare const mockAccountsStore: {
20
- subscribe: (this: void, run: import("svelte/store").Subscriber<Record<string, string>>, invalidate?: import("svelte/store").Invalidator<Record<string, string>> | undefined) => import("svelte/store").Unsubscriber;
2
+ type MockDeployment = {
3
+ key: string;
4
+ name?: string;
5
+ description?: string;
6
+ } | null;
7
+ type MockPageState = {
8
+ data: Record<string, unknown> & {
9
+ deployment: MockDeployment;
10
+ };
11
+ url: URL;
12
+ params: Record<string, unknown>;
13
+ form: Record<string, unknown>;
14
+ status: number;
15
+ error: unknown;
16
+ route: {
17
+ id: string | null;
18
+ };
21
19
  };
22
20
  export declare const mockActiveAccountsItemsStore: {
23
21
  subscribe: (this: void, run: import("svelte/store").Subscriber<Record<string, string>>, invalidate?: import("svelte/store").Invalidator<Record<string, string>> | undefined) => import("svelte/store").Unsubscriber;
24
22
  set: (this: void, value: Record<string, string>) => void;
25
23
  mockSetSubscribeValue: (value: Record<string, string>) => void;
26
24
  };
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;
25
+ export declare const mockShowInactiveOrdersStore: {
26
+ subscribe: (this: void, run: import("svelte/store").Subscriber<boolean>, invalidate?: import("svelte/store").Invalidator<boolean> | undefined) => import("svelte/store").Unsubscriber;
27
+ set: (this: void, value: boolean) => void;
28
+ mockSetSubscribeValue: (value: boolean) => void;
31
29
  };
32
30
  export declare const mockOrderHashStore: {
33
31
  subscribe: (this: void, run: import("svelte/store").Subscriber<string>, invalidate?: import("svelte/store").Invalidator<string> | undefined) => import("svelte/store").Unsubscriber;
@@ -39,6 +37,11 @@ export declare const mockHideZeroBalanceVaultsStore: {
39
37
  set: (this: void, value: boolean) => void;
40
38
  mockSetSubscribeValue: (value: boolean) => void;
41
39
  };
40
+ export declare const mockHideInactiveOrdersVaultsStore: {
41
+ subscribe: (this: void, run: import("svelte/store").Subscriber<boolean>, invalidate?: import("svelte/store").Invalidator<boolean> | undefined) => import("svelte/store").Unsubscriber;
42
+ set: (this: void, value: boolean) => void;
43
+ mockSetSubscribeValue: (value: boolean) => void;
44
+ };
42
45
  export declare const mockActiveNetworkRefStore: {
43
46
  subscribe: (this: void, run: import("svelte/store").Subscriber<string>, invalidate?: import("svelte/store").Invalidator<string> | undefined) => import("svelte/store").Unsubscriber;
44
47
  set: (this: void, value: string) => void;
@@ -59,12 +62,6 @@ export declare const mockSubgraphUrlStore: {
59
62
  set: (this: void, value: string) => void;
60
63
  mockSetSubscribeValue: (value: string) => void;
61
64
  };
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
65
  export declare const mockChainIdStore: {
69
66
  subscribe: (this: void, run: import("svelte/store").Subscriber<number>, invalidate?: import("svelte/store").Invalidator<number> | undefined) => import("svelte/store").Unsubscriber;
70
67
  set: (this: void, value: number) => void;
@@ -87,8 +84,25 @@ export declare const mockShowMyItemsOnlyStore: {
87
84
  set: (this: void, value: boolean) => void;
88
85
  mockSetSubscribeValue: (value: boolean) => void;
89
86
  };
90
- export declare const mockPageStore: {
91
- subscribe: (this: void, run: import("svelte/store").Subscriber<Page<Record<string, string>, string | null>>, invalidate?: import("svelte/store").Invalidator<Page<Record<string, string>, string | null>> | undefined) => import("svelte/store").Unsubscriber;
92
- set: (this: void, value: Page<Record<string, string>, string | null>) => void;
93
- mockSetSubscribeValue: (value: Page) => void;
87
+ export declare const mockSelectedChainIdsStore: {
88
+ subscribe: (this: void, run: import("svelte/store").Subscriber<number[]>, invalidate?: import("svelte/store").Invalidator<number[]> | undefined) => import("svelte/store").Unsubscriber;
89
+ set: (this: void, value: number[]) => void;
90
+ mockSetSubscribeValue: (value: number[]) => void;
94
91
  };
92
+ export declare const mockPageStore: {
93
+ subscribe: (this: void, run: import("svelte/store").Subscriber<MockPageState>, invalidate?: import("svelte/store").Invalidator<MockPageState> | undefined) => import("svelte/store").Unsubscriber;
94
+ set: (this: void, value: MockPageState) => void;
95
+ mockSetSubscribeValue: (newValue: Partial<MockPageState>) => void;
96
+ reset: () => void;
97
+ };
98
+ export declare const mockActiveTokensStore: {
99
+ subscribe: (this: void, run: import("svelte/store").Subscriber<string[]>, invalidate?: import("svelte/store").Invalidator<string[]> | undefined) => import("svelte/store").Unsubscriber;
100
+ set: (this: void, value: string[]) => void;
101
+ mockSetSubscribeValue: (value: string[]) => void;
102
+ };
103
+ export declare const mockActiveOrderbookAddressesStore: {
104
+ subscribe: (this: void, run: import("svelte/store").Subscriber<string[]>, invalidate?: import("svelte/store").Invalidator<string[]> | undefined) => import("svelte/store").Unsubscriber;
105
+ set: (this: void, value: string[]) => void;
106
+ mockSetSubscribeValue: (value: string[]) => void;
107
+ };
108
+ export {};
@@ -1,52 +1,55 @@
1
1
  import { writable } from 'svelte/store';
2
- import settingsFixture from '../__fixtures__/settings-12-11-24.json';
3
2
  import {} from '@wagmi/core';
4
3
  import { mockWeb3Config } from './mockWeb3Config';
5
- const mockSettingsWritable = writable(settingsFixture);
6
- const mockActiveSubgraphsWritable = writable({});
7
- const mockAccountsWritable = writable({});
4
+ if (import.meta.vitest) {
5
+ vi.mock(import('@rainlanguage/orderbook'), async (importOriginal) => {
6
+ const actual = await importOriginal();
7
+ return {
8
+ ...actual
9
+ };
10
+ });
11
+ }
12
+ const initialPageState = {
13
+ data: {
14
+ dotrain: 'some dotrain content',
15
+ deployment: { key: 'deploy-key', name: '', description: '' },
16
+ orderDetail: {}
17
+ },
18
+ url: new URL('http://localhost:3000/deploy'),
19
+ params: {},
20
+ form: {},
21
+ status: 200,
22
+ error: null,
23
+ route: {
24
+ id: null
25
+ }
26
+ };
27
+ const mockPageWritable = writable(initialPageState);
8
28
  const mockActiveAccountsItemsWritable = writable({});
9
- const mockActiveOrderStatusWritable = writable(undefined);
29
+ const mockShowInactiveOrdersWritable = writable(true);
10
30
  const mockOrderHashWritable = writable('');
11
31
  const mockHideZeroBalanceVaultsWritable = writable(false);
32
+ const mockHideInactiveOrdersVaultsWritable = writable(false);
12
33
  const mockActiveNetworkRefWritable = writable('');
13
34
  const mockActiveOrderbookRefWritable = writable('');
14
35
  const mockActiveAccountsWritable = writable({});
15
36
  const mockSubgraphUrlWritable = writable('');
16
- const mockWalletAddressMatchesOrBlankWritable = writable(() => false);
17
- const mockSignerAddressWritable = writable('');
18
37
  const mockChainIdWritable = writable(0);
19
- const mockConnectedWritable = writable(false);
38
+ const mockConnectedWritable = writable(true);
20
39
  const mockWagmiConfigWritable = writable(mockWeb3Config);
21
40
  const mockShowMyItemsOnlyWritable = writable(false);
22
- const mockPageWritable = writable();
23
- export const mockWalletAddressMatchesOrBlankStore = {
24
- subscribe: mockWalletAddressMatchesOrBlankWritable.subscribe,
25
- set: mockWalletAddressMatchesOrBlankWritable.set,
26
- mockSetSubscribeValue: (value) => mockWalletAddressMatchesOrBlankWritable.set(value)
27
- };
28
- export const mockSettingsStore = {
29
- subscribe: mockSettingsWritable.subscribe,
30
- set: mockSettingsWritable.set,
31
- mockSetSubscribeValue: (value) => mockSettingsWritable.set(value)
32
- };
33
- export const mockActiveSubgraphsStore = {
34
- subscribe: mockActiveSubgraphsWritable.subscribe,
35
- set: mockActiveSubgraphsWritable.set,
36
- mockSetSubscribeValue: (value) => mockActiveSubgraphsWritable.set(value)
37
- };
38
- export const mockAccountsStore = {
39
- subscribe: mockAccountsWritable.subscribe
40
- };
41
+ const mockSelectedChainIdsWritable = writable([]);
42
+ const mockActiveTokensWritable = writable([]);
43
+ const mockActiveOrderbookAddressesWritable = writable([]);
41
44
  export const mockActiveAccountsItemsStore = {
42
45
  subscribe: mockActiveAccountsItemsWritable.subscribe,
43
46
  set: mockActiveAccountsItemsWritable.set,
44
47
  mockSetSubscribeValue: (value) => mockActiveAccountsItemsWritable.set(value)
45
48
  };
46
- export const mockActiveOrderStatusStore = {
47
- subscribe: mockActiveOrderStatusWritable.subscribe,
48
- set: mockActiveOrderStatusWritable.set,
49
- mockSetSubscribeValue: (value) => mockActiveOrderStatusWritable.set(value)
49
+ export const mockShowInactiveOrdersStore = {
50
+ subscribe: mockShowInactiveOrdersWritable.subscribe,
51
+ set: mockShowInactiveOrdersWritable.set,
52
+ mockSetSubscribeValue: (value) => mockShowInactiveOrdersWritable.set(value)
50
53
  };
51
54
  export const mockOrderHashStore = {
52
55
  subscribe: mockOrderHashWritable.subscribe,
@@ -58,6 +61,11 @@ export const mockHideZeroBalanceVaultsStore = {
58
61
  set: mockHideZeroBalanceVaultsWritable.set,
59
62
  mockSetSubscribeValue: (value) => mockHideZeroBalanceVaultsWritable.set(value)
60
63
  };
64
+ export const mockHideInactiveOrdersVaultsStore = {
65
+ subscribe: mockHideInactiveOrdersVaultsWritable.subscribe,
66
+ set: mockHideInactiveOrdersVaultsWritable.set,
67
+ mockSetSubscribeValue: (value) => mockHideInactiveOrdersVaultsWritable.set(value)
68
+ };
61
69
  export const mockActiveNetworkRefStore = {
62
70
  subscribe: mockActiveNetworkRefWritable.subscribe,
63
71
  set: mockActiveNetworkRefWritable.set,
@@ -78,12 +86,6 @@ export const mockSubgraphUrlStore = {
78
86
  set: mockSubgraphUrlWritable.set,
79
87
  mockSetSubscribeValue: (value) => mockSubgraphUrlWritable.set(value)
80
88
  };
81
- export const mockSignerAddressStore = {
82
- subscribe: mockSignerAddressWritable.subscribe,
83
- set: mockSignerAddressWritable.set,
84
- mockSetSubscribeValue: (value) => mockSignerAddressWritable.set(value),
85
- update: mockSignerAddressWritable.update
86
- };
87
89
  export const mockChainIdStore = {
88
90
  subscribe: mockChainIdWritable.subscribe,
89
91
  set: mockChainIdWritable.set,
@@ -106,8 +108,29 @@ export const mockShowMyItemsOnlyStore = {
106
108
  set: mockShowMyItemsOnlyWritable.set,
107
109
  mockSetSubscribeValue: (value) => mockShowMyItemsOnlyWritable.set(value)
108
110
  };
111
+ export const mockSelectedChainIdsStore = {
112
+ subscribe: mockSelectedChainIdsWritable.subscribe,
113
+ set: mockSelectedChainIdsWritable.set,
114
+ mockSetSubscribeValue: (value) => mockSelectedChainIdsWritable.set(value)
115
+ };
109
116
  export const mockPageStore = {
110
117
  subscribe: mockPageWritable.subscribe,
111
118
  set: mockPageWritable.set,
112
- mockSetSubscribeValue: (value) => mockPageWritable.set(value)
119
+ mockSetSubscribeValue: (newValue) => {
120
+ mockPageWritable.update((currentValue) => ({
121
+ ...currentValue,
122
+ ...newValue
123
+ }));
124
+ },
125
+ reset: () => mockPageWritable.set(initialPageState)
126
+ };
127
+ export const mockActiveTokensStore = {
128
+ subscribe: mockActiveTokensWritable.subscribe,
129
+ set: mockActiveTokensWritable.set,
130
+ mockSetSubscribeValue: (value) => mockActiveTokensWritable.set(value)
131
+ };
132
+ export const mockActiveOrderbookAddressesStore = {
133
+ subscribe: mockActiveOrderbookAddressesWritable.subscribe,
134
+ set: mockActiveOrderbookAddressesWritable.set,
135
+ mockSetSubscribeValue: (value) => mockActiveOrderbookAddressesWritable.set(value)
113
136
  };
@@ -5,7 +5,7 @@ export let disabled = false;
5
5
 
6
6
  <Button disabled={loading || disabled} {...$$props} on:click>
7
7
  {#if loading}
8
- <Spinner class="mr-2 h-4 w-4" color="white" />
8
+ <Spinner data-testid="spinner" class="mr-2 h-4 w-4" color="white" />
9
9
  {/if}
10
10
  <slot />
11
11
  </Button>
@@ -1,8 +1,8 @@
1
- <script>import { bigintStringToHex } from "../utils/hex";
2
- import { Tooltip } from "flowbite-svelte";
3
- import { formatUnits } from "viem";
1
+ <script>import { toHex } from "viem";
2
+ import Tooltip from "./Tooltip.svelte";
4
3
  export let tokenVault;
5
- export let subgraphName;
4
+ export let chainId;
5
+ export let orderbookAddress;
6
6
  </script>
7
7
 
8
8
  <div
@@ -10,17 +10,17 @@ export let subgraphName;
10
10
  data-testid="vault-link"
11
11
  >
12
12
  <div class="flex flex-col items-start gap-y-2">
13
- <Tooltip triggeredBy="#token-info" class="z-[99] w-96">
14
- ID: <span class="font-mono">{bigintStringToHex(tokenVault.vaultId)}</span>
13
+ <Tooltip triggeredBy={`#token-info-${tokenVault.vaultId}`}>
14
+ ID: <span class="font-mono">{toHex(tokenVault.vaultId)}</span>
15
15
  </Tooltip>
16
- <a href={`/vaults/${subgraphName}-${tokenVault.id}`} id="token-info">
16
+ <a
17
+ href={`/vaults/${chainId}-${orderbookAddress}-${tokenVault.id}`}
18
+ id={`token-info-${tokenVault.vaultId}`}
19
+ >
17
20
  {tokenVault.token.name} ({tokenVault.token.symbol})
18
21
  </a>
19
22
  <span class="text-sm text-gray-500 dark:text-gray-400">
20
- Balance: {formatUnits(
21
- BigInt(tokenVault.balance),
22
- parseInt(tokenVault.token.decimals || '18')
23
- )}
23
+ Balance: {tokenVault.formattedBalance}
24
24
  </span>
25
25
  </div>
26
26
  <div>
@@ -1,9 +1,10 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import type { SgVault } from '@rainlanguage/orderbook/js_api';
2
+ import type { Address, RaindexVault } from '@rainlanguage/orderbook';
3
3
  declare const __propDef: {
4
4
  props: {
5
- tokenVault: SgVault;
6
- subgraphName: string;
5
+ tokenVault: RaindexVault;
6
+ chainId: number;
7
+ orderbookAddress: Address;
7
8
  };
8
9
  events: {
9
10
  [evt: string]: CustomEvent<any>;
@@ -0,0 +1,20 @@
1
+ <script>import { Checkbox, Label } from "flowbite-svelte";
2
+ export let hideInactiveOrdersVaults;
3
+ function handleHideInactiveOrdersVaultsChange() {
4
+ $hideInactiveOrdersVaults = !$hideInactiveOrdersVaults;
5
+ }
6
+ </script>
7
+
8
+ <div data-testid="inactive-orders-vault-checkbox" class="flex items-center gap-x-2">
9
+ <Label
10
+ for="hide-inactive-orders-vaults"
11
+ class="cursor-pointer whitespace-nowrap text-sm font-medium text-gray-900 dark:text-gray-300"
12
+ >
13
+ Hide vaults without active orders
14
+ </Label>
15
+ <Checkbox
16
+ id="hide-inactive-orders-vaults"
17
+ checked={$hideInactiveOrdersVaults}
18
+ on:change={handleHideInactiveOrdersVaultsChange}
19
+ />
20
+ </div>
@@ -0,0 +1,19 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import type { AppStoresInterface } from '../types/appStores';
3
+ declare const __propDef: {
4
+ props: {
5
+ hideInactiveOrdersVaults: AppStoresInterface["hideInactiveOrdersVaults"];
6
+ };
7
+ events: {
8
+ [evt: string]: CustomEvent<any>;
9
+ };
10
+ slots: {};
11
+ exports?: {} | undefined;
12
+ bindings?: string | undefined;
13
+ };
14
+ export type CheckboxInactiveOrdersVaultProps = typeof __propDef.props;
15
+ export type CheckboxInactiveOrdersVaultEvents = typeof __propDef.events;
16
+ export type CheckboxInactiveOrdersVaultSlots = typeof __propDef.slots;
17
+ export default class CheckboxInactiveOrdersVault extends SvelteComponent<CheckboxInactiveOrdersVaultProps, CheckboxInactiveOrdersVaultEvents, CheckboxInactiveOrdersVaultSlots> {
18
+ }
19
+ export {};
@@ -1,7 +1,8 @@
1
1
  <script>import { Checkbox, Label } from "flowbite-svelte";
2
+ import { useAccount } from "../providers/wallet/useAccount";
2
3
  export let showMyItemsOnly;
3
4
  export let context;
4
- export let signerAddress;
5
+ const { account } = useAccount();
5
6
  function handleShowMyItemsChange() {
6
7
  $showMyItemsOnly = !$showMyItemsOnly;
7
8
  }
@@ -18,6 +19,6 @@ function handleShowMyItemsChange() {
18
19
  id="show-my-items"
19
20
  checked={$showMyItemsOnly}
20
21
  on:change={handleShowMyItemsChange}
21
- disabled={!$signerAddress}
22
+ disabled={!$account}
22
23
  />
23
24
  </div>
@@ -1,10 +1,9 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import type { Writable } from 'svelte/store';
2
+ import type { AppStoresInterface } from '../types/appStores';
3
3
  declare const __propDef: {
4
4
  props: {
5
- showMyItemsOnly: Writable<boolean>;
5
+ showMyItemsOnly: AppStoresInterface["showMyItemsOnly"];
6
6
  context: "orders" | "vaults";
7
- signerAddress: Writable<string | null> | undefined;
8
7
  };
9
8
  events: {
10
9
  [evt: string]: CustomEvent<any>;
@@ -1,8 +1,8 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import type { Writable } from 'svelte/store';
2
+ import type { AppStoresInterface } from '../types/appStores';
3
3
  declare const __propDef: {
4
4
  props: {
5
- hideZeroBalanceVaults: Writable<boolean>;
5
+ hideZeroBalanceVaults: AppStoresInterface["hideZeroBalanceVaults"];
6
6
  };
7
7
  events: {
8
8
  [evt: string]: CustomEvent<any>;
@@ -6,6 +6,7 @@ export let disabled = false;
6
6
  export let styles = {};
7
7
  export let rainlangExtension;
8
8
  export let codeMirrorTheme;
9
+ export let onTextChange;
9
10
  </script>
10
11
 
11
12
  <div data-testid="codemirror-dotrain">
@@ -22,6 +23,9 @@ export let codeMirrorTheme;
22
23
  },
23
24
  ...styles
24
25
  }}
26
+ on:change={(e) => {
27
+ onTextChange(e.detail);
28
+ }}
25
29
  on:ready={(e) => {
26
30
  openLintPanel(e.detail);
27
31
  }}
@@ -7,6 +7,7 @@ declare const __propDef: {
7
7
  styles?: {};
8
8
  rainlangExtension: RawRainlangExtension;
9
9
  codeMirrorTheme: any;
10
+ onTextChange: (text: string) => void;
10
11
  };
11
12
  events: {
12
13
  [evt: string]: CustomEvent<any>;
@@ -1,17 +1,15 @@
1
- <script>import { extendOrder } from "@rainlanguage/orderbook/js_api";
2
- import CodeMirror from "svelte-codemirror-editor";
1
+ <script>import CodeMirror from "svelte-codemirror-editor";
3
2
  import { RainlangLR } from "codemirror-rainlang";
4
3
  export let order = void 0;
5
4
  export let rainlangText = void 0;
6
5
  export let codeMirrorTheme;
7
6
  export let codeMirrorDisabled = true;
8
7
  export let codeMirrorStyles = {};
9
- $: extendedOrder = order ? extendOrder(order) : void 0;
10
8
  </script>
11
9
 
12
- {#if rainlangText || extendedOrder?.rainlang}
10
+ {#if rainlangText || order?.rainlang}
13
11
  <CodeMirror
14
- value={rainlangText || extendedOrder.rainlang}
12
+ value={rainlangText || order?.rainlang}
15
13
  extensions={[RainlangLR]}
16
14
  theme={codeMirrorTheme}
17
15
  readonly={codeMirrorDisabled}
@@ -24,11 +22,4 @@ $: extendedOrder = order ? extendOrder(order) : void 0;
24
22
  ...codeMirrorStyles
25
23
  }}
26
24
  />
27
- {:else if !extendedOrder?.rainlang && !rainlangText}
28
- <div
29
- class="w-full tracking-tight text-gray-900 dark:text-white"
30
- data-testid="rainlang-not-included"
31
- >
32
- Rain source not included in order meta
33
- </div>
34
25
  {/if}
@@ -1,8 +1,8 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import type { SgOrder } from '@rainlanguage/orderbook/js_api';
2
+ import type { RaindexOrder } from '@rainlanguage/orderbook';
3
3
  declare const __propDef: {
4
4
  props: {
5
- order?: SgOrder | undefined;
5
+ order?: RaindexOrder | undefined;
6
6
  rainlangText?: string | undefined;
7
7
  codeMirrorTheme: any;
8
8
  codeMirrorDisabled?: boolean;