@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.
Files changed (299) hide show
  1. package/README.md +14 -6
  2. package/dist/__fixtures__/settings.yaml +123 -0
  3. package/dist/__mocks__/CodeMirrorRainlang.svelte +4 -0
  4. package/dist/__mocks__/CodeMirrorRainlang.svelte.d.ts +18 -0
  5. package/dist/__mocks__/MockCodeMirrorEditor.svelte +17 -0
  6. package/dist/__mocks__/MockCodeMirrorEditor.svelte.d.ts +21 -0
  7. package/dist/__mocks__/MockComponent.js +1 -1
  8. package/dist/__mocks__/MockComponent.svelte +10 -2
  9. package/dist/__mocks__/MockComponent.svelte.d.ts +4 -1
  10. package/dist/__mocks__/mockWeb3Config.d.ts +1 -1
  11. package/dist/__mocks__/mockWeb3Config.js +10 -7
  12. package/dist/__mocks__/queries.js +9 -9
  13. package/dist/__mocks__/stores.d.ts +55 -45
  14. package/dist/__mocks__/stores.js +85 -68
  15. package/dist/app.css +3 -3
  16. package/dist/components/ButtonDarkMode.svelte +7 -1
  17. package/dist/components/ButtonLoading.svelte +1 -1
  18. package/dist/components/ButtonScrub.svelte +22 -0
  19. package/dist/components/ButtonScrub.svelte.d.ts +25 -0
  20. package/dist/components/ButtonVaultLink.svelte +12 -11
  21. package/dist/components/ButtonVaultLink.svelte.d.ts +4 -3
  22. package/dist/components/CheckboxInactiveOrdersVault.svelte +20 -0
  23. package/dist/components/CheckboxInactiveOrdersVault.svelte.d.ts +19 -0
  24. package/dist/components/CheckboxZeroBalanceVault.svelte.d.ts +2 -2
  25. package/dist/components/CodeMirrorDotrain.svelte +4 -0
  26. package/dist/components/CodeMirrorDotrain.svelte.d.ts +1 -0
  27. package/dist/components/CodeMirrorRainlang.svelte +20 -12
  28. package/dist/components/CodeMirrorRainlang.svelte.d.ts +3 -2
  29. package/dist/components/EditableSpan.svelte +3 -14
  30. package/dist/components/EditableSpan.svelte.d.ts +0 -1
  31. package/dist/components/Hash.svelte +6 -5
  32. package/dist/components/License.svelte +5 -4
  33. package/dist/components/ListViewRaindexFilters.svelte +64 -0
  34. package/dist/components/ListViewRaindexFilters.svelte.d.ts +32 -0
  35. package/dist/components/LocalDbStatusBadge.svelte +27 -0
  36. package/dist/components/LocalDbStatusBadge.svelte.d.ts +19 -0
  37. package/dist/components/LocalDbStatusCard.svelte +43 -0
  38. package/dist/components/LocalDbStatusCard.svelte.d.ts +20 -0
  39. package/dist/components/LocalDbStatusModal.svelte +105 -0
  40. package/dist/components/LocalDbStatusModal.svelte.d.ts +21 -0
  41. package/dist/components/OrderOrVaultHash.svelte +12 -12
  42. package/dist/components/OrderOrVaultHash.svelte.d.ts +4 -4
  43. package/dist/components/PageHeader.svelte +1 -1
  44. package/dist/components/Sensitive.svelte +16 -0
  45. package/dist/components/Sensitive.svelte.d.ts +28 -0
  46. package/dist/components/TanstackAppTable.svelte +270 -60
  47. package/dist/components/TanstackAppTable.svelte.d.ts +15 -9
  48. package/dist/components/ToastDetail.svelte +42 -0
  49. package/dist/components/ToastDetail.svelte.d.ts +20 -0
  50. package/dist/components/Tooltip.svelte +8 -0
  51. package/dist/components/Tooltip.svelte.d.ts +21 -0
  52. package/dist/components/VaultBalanceChangeTypeFilter.svelte +23 -0
  53. package/dist/components/VaultBalanceChangeTypeFilter.svelte.d.ts +19 -0
  54. package/dist/components/VaultCard.svelte +18 -0
  55. package/dist/components/VaultCard.svelte.d.ts +19 -0
  56. package/dist/components/charts/LightweightChart.svelte +1 -1
  57. package/dist/components/charts/LightweightChart.svelte.d.ts +5 -5
  58. package/dist/components/charts/OrderTradesChart.svelte +319 -28
  59. package/dist/components/charts/OrderTradesChart.svelte.d.ts +4 -4
  60. package/dist/components/charts/TanstackLightweightChartLine.svelte +5 -9
  61. package/dist/components/charts/VaultBalanceChart.svelte +8 -26
  62. package/dist/components/charts/VaultBalanceChart.svelte.d.ts +1 -7
  63. package/dist/components/charts/transformAndSortData.d.ts +24 -0
  64. package/dist/components/charts/transformAndSortData.js +111 -0
  65. package/dist/components/checkbox/CheckboxActiveOrders.svelte +11 -0
  66. package/dist/components/checkbox/CheckboxActiveOrders.svelte.d.ts +19 -0
  67. package/dist/components/deployment/ButtonSelectOption.svelte +2 -0
  68. package/dist/components/deployment/ButtonSelectOption.svelte.d.ts +1 -0
  69. package/dist/components/deployment/ComposedRainlangModal.svelte +3 -2
  70. package/dist/components/deployment/ComposedRainlangModal.svelte.d.ts +1 -4
  71. package/dist/components/deployment/DeploymentSectionHeader.svelte +7 -4
  72. package/dist/components/deployment/DeploymentSteps.svelte +196 -221
  73. package/dist/components/deployment/DeploymentSteps.svelte.d.ts +6 -12
  74. package/dist/components/deployment/DeploymentTile.svelte +2 -2
  75. package/dist/components/deployment/DeploymentTile.svelte.d.ts +1 -1
  76. package/dist/components/deployment/DeploymentsSection.svelte +15 -22
  77. package/dist/components/deployment/DeploymentsSection.svelte.d.ts +3 -2
  78. package/dist/components/deployment/DepositInput.svelte +10 -11
  79. package/dist/components/deployment/DepositInput.svelte.d.ts +2 -3
  80. package/dist/components/deployment/DisclaimerModal.svelte +6 -7
  81. package/dist/components/deployment/FieldDefinitionInput.svelte +10 -14
  82. package/dist/components/deployment/FieldDefinitionInput.svelte.d.ts +2 -3
  83. package/dist/components/deployment/InvalidOrdersSection.svelte +17 -0
  84. package/dist/components/deployment/InvalidOrdersSection.svelte.d.ts +19 -0
  85. package/dist/components/deployment/{StrategyPage.svelte → OrderPage.svelte} +15 -24
  86. package/dist/components/deployment/OrderPage.svelte.d.ts +21 -0
  87. package/dist/components/deployment/SelectToken.svelte +127 -50
  88. package/dist/components/deployment/SelectToken.svelte.d.ts +5 -4
  89. package/dist/components/deployment/TokenBalance.svelte +19 -0
  90. package/dist/components/deployment/TokenBalance.svelte.d.ts +19 -0
  91. package/dist/components/deployment/TokenIOInput.svelte +27 -17
  92. package/dist/components/deployment/TokenIOInput.svelte.d.ts +3 -3
  93. package/dist/components/deployment/TokenSelectionModal.svelte +148 -0
  94. package/dist/components/deployment/TokenSelectionModal.svelte.d.ts +20 -0
  95. package/dist/components/deployment/{ValidStrategiesSection.svelte → ValidOrdersSection.svelte} +7 -7
  96. package/dist/components/deployment/ValidOrdersSection.svelte.d.ts +19 -0
  97. package/dist/components/deployment/VaultIdInformation.svelte +17 -0
  98. package/dist/components/deployment/VaultIdInformation.svelte.d.ts +21 -0
  99. package/dist/components/detail/OrderDetail.svelte +220 -82
  100. package/dist/components/detail/OrderDetail.svelte.d.ts +21 -15
  101. package/dist/components/detail/TanstackOrderQuote.svelte +114 -46
  102. package/dist/components/detail/TanstackOrderQuote.svelte.d.ts +14 -16
  103. package/dist/components/detail/VaultDetail.svelte +82 -79
  104. package/dist/components/detail/VaultDetail.svelte.d.ts +12 -18
  105. package/dist/components/dropdown/DropdownActiveNetworks.svelte +44 -0
  106. package/dist/components/dropdown/DropdownActiveNetworks.svelte.d.ts +19 -0
  107. package/dist/components/dropdown/DropdownCheckbox.svelte +4 -4
  108. package/dist/components/dropdown/DropdownRaindexesFilter.svelte +172 -0
  109. package/dist/components/dropdown/DropdownRaindexesFilter.svelte.d.ts +25 -0
  110. package/dist/components/dropdown/DropdownTokensFilter.svelte +152 -0
  111. package/dist/components/dropdown/DropdownTokensFilter.svelte.d.ts +28 -0
  112. package/dist/components/icon/Refresh.svelte +4 -2
  113. package/dist/components/icon/Refresh.svelte.d.ts +2 -0
  114. package/dist/components/input/InputOrderHash.svelte +1 -1
  115. package/dist/components/input/InputOrderHash.svelte.d.ts +3 -3
  116. package/dist/components/input/InputOwnerFilter.svelte +48 -0
  117. package/dist/components/input/InputOwnerFilter.svelte.d.ts +19 -0
  118. package/dist/components/input/InputRegistryUrl.svelte +36 -14
  119. package/dist/components/input/InputToken.svelte +2 -2
  120. package/dist/components/input/InputTokenAmount.svelte +30 -20
  121. package/dist/components/input/InputTokenAmount.svelte.d.ts +3 -3
  122. package/dist/components/tables/OrderAPY.svelte +6 -33
  123. package/dist/components/tables/OrderAPY.svelte.d.ts +1 -4
  124. package/dist/components/tables/OrderTradesListTable.svelte +132 -124
  125. package/dist/components/tables/OrderTradesListTable.svelte.d.ts +4 -4
  126. package/dist/components/tables/OrderVaultsVolTable.svelte +17 -22
  127. package/dist/components/tables/OrderVaultsVolTable.svelte.d.ts +2 -2
  128. package/dist/components/tables/OrdersListTable.svelte +206 -115
  129. package/dist/components/tables/OrdersListTable.svelte.d.ts +18 -23
  130. package/dist/components/tables/VaultBalanceChangesTable.svelte +83 -43
  131. package/dist/components/tables/VaultBalanceChangesTable.svelte.d.ts +13 -11
  132. package/dist/components/tables/VaultsListTable.svelte +275 -150
  133. package/dist/components/tables/VaultsListTable.svelte.d.ts +24 -33
  134. package/dist/components/transactions/FixedBottomTransaction.svelte +64 -0
  135. package/dist/components/transactions/FixedBottomTransaction.svelte.d.ts +16 -0
  136. package/dist/components/transactions/TransactionDetail.svelte +31 -0
  137. package/dist/components/transactions/TransactionDetail.svelte.d.ts +20 -0
  138. package/dist/components/transactions/TransactionList.svelte +17 -0
  139. package/dist/components/transactions/TransactionList.svelte.d.ts +16 -0
  140. package/dist/components/transactions/getStatusEmoji.d.ts +2 -0
  141. package/dist/components/transactions/getStatusEmoji.js +20 -0
  142. package/dist/components/wallet/WalletConnect.svelte +5 -4
  143. package/dist/components/wallet/WalletConnect.svelte.d.ts +0 -1
  144. package/dist/consts.d.ts +1 -0
  145. package/dist/consts.js +1 -0
  146. package/dist/errors/DeploymentStepsError.d.ts +11 -5
  147. package/dist/errors/DeploymentStepsError.js +13 -7
  148. package/dist/errors/index.d.ts +1 -1
  149. package/dist/errors/index.js +1 -1
  150. package/dist/hooks/useLocalDb.d.ts +3 -0
  151. package/dist/hooks/useLocalDb.js +10 -0
  152. package/dist/hooks/useRaindexClient.d.ts +3 -0
  153. package/dist/hooks/useRaindexClient.js +11 -0
  154. package/dist/hooks/useRaindexOrderBuilder.d.ts +3 -0
  155. package/dist/hooks/useRaindexOrderBuilder.js +11 -0
  156. package/dist/index.d.ts +122 -91
  157. package/dist/index.js +118 -87
  158. package/dist/models/Transaction.d.ts +75 -0
  159. package/dist/models/Transaction.js +100 -0
  160. package/dist/providers/LocalDbProvider.svelte +8 -0
  161. package/dist/providers/LocalDbProvider.svelte.d.ts +21 -0
  162. package/dist/providers/RaindexClientProvider.svelte +8 -0
  163. package/dist/providers/RaindexClientProvider.svelte.d.ts +21 -0
  164. package/dist/providers/RaindexOrderBuilderProvider.svelte +8 -0
  165. package/dist/providers/RaindexOrderBuilderProvider.svelte.d.ts +21 -0
  166. package/dist/providers/dotrainRegistry/DotrainRegistryProvider.svelte +8 -0
  167. package/dist/providers/dotrainRegistry/DotrainRegistryProvider.svelte.d.ts +24 -0
  168. package/dist/providers/dotrainRegistry/context.d.ts +9 -0
  169. package/dist/providers/dotrainRegistry/context.js +43 -0
  170. package/dist/providers/dotrainRegistry/useDotrainRegistry.d.ts +5 -0
  171. package/dist/providers/dotrainRegistry/useDotrainRegistry.js +35 -0
  172. package/dist/providers/registry/RegistryManager.d.ts +65 -0
  173. package/dist/providers/registry/RegistryManager.js +134 -0
  174. package/dist/providers/registry/RegistryProvider.svelte +6 -0
  175. package/dist/providers/registry/RegistryProvider.svelte.d.ts +21 -0
  176. package/dist/providers/registry/context.d.ts +10 -0
  177. package/dist/providers/registry/context.js +46 -0
  178. package/dist/providers/registry/useRegistry.d.ts +7 -0
  179. package/dist/providers/registry/useRegistry.js +29 -0
  180. package/dist/providers/toasts/ToastProvider.svelte +17 -0
  181. package/dist/providers/toasts/ToastProvider.svelte.d.ts +18 -0
  182. package/dist/providers/toasts/context.d.ts +14 -0
  183. package/dist/providers/toasts/context.js +22 -0
  184. package/dist/providers/toasts/useToasts.d.ts +16 -0
  185. package/dist/providers/toasts/useToasts.js +63 -0
  186. package/dist/providers/transactions/TransactionManager.d.ts +234 -0
  187. package/dist/providers/transactions/TransactionManager.js +509 -0
  188. package/dist/providers/transactions/TransactionProvider.svelte +11 -0
  189. package/dist/providers/transactions/TransactionProvider.svelte.d.ts +24 -0
  190. package/dist/providers/transactions/context.d.ts +19 -0
  191. package/dist/providers/transactions/context.js +28 -0
  192. package/dist/providers/transactions/useTransactions.d.ts +13 -0
  193. package/dist/providers/transactions/useTransactions.js +18 -0
  194. package/dist/providers/wallet/WalletProvider.svelte +7 -0
  195. package/dist/providers/wallet/WalletProvider.svelte.d.ts +21 -0
  196. package/dist/providers/wallet/context.d.ts +10 -0
  197. package/dist/providers/wallet/context.js +47 -0
  198. package/dist/providers/wallet/useAccount.d.ts +8 -0
  199. package/dist/providers/wallet/useAccount.js +148 -0
  200. package/dist/queries/keys.d.ts +1 -0
  201. package/dist/queries/keys.js +10 -9
  202. package/dist/queries/queryClient.d.ts +2 -2
  203. package/dist/queries/queryClient.js +16 -11
  204. package/dist/services/awaitTransactionIndexing.d.ts +107 -0
  205. package/dist/services/awaitTransactionIndexing.js +60 -0
  206. package/dist/services/getExplorerLink.d.ts +1 -1
  207. package/dist/services/getExplorerLink.js +3 -5
  208. package/dist/services/handleShareChoices.d.ts +2 -2
  209. package/dist/services/handleShareChoices.js +6 -5
  210. package/dist/services/historicalOrderCharts.d.ts +3 -3
  211. package/dist/services/historicalOrderCharts.js +364 -371
  212. package/dist/services/index.d.ts +5 -2
  213. package/dist/services/index.js +3 -1
  214. package/dist/services/loadRegistryUrl.d.ts +2 -0
  215. package/dist/services/loadRegistryUrl.js +22 -0
  216. package/dist/services/pairTradesChartData.d.ts +47 -0
  217. package/dist/services/pairTradesChartData.js +194 -0
  218. package/dist/services/registry.d.ts +5 -5
  219. package/dist/services/registry.js +17 -217
  220. package/dist/services/time.d.ts +12 -0
  221. package/dist/services/time.js +88 -6
  222. package/dist/services/validateAmount.d.ts +30 -0
  223. package/dist/services/validateAmount.js +53 -0
  224. package/dist/storesGeneric/cachedWritableStore.d.ts +57 -0
  225. package/dist/storesGeneric/cachedWritableStore.js +93 -0
  226. package/dist/storesGeneric/scrub.d.ts +14 -0
  227. package/dist/storesGeneric/scrub.js +22 -0
  228. package/dist/test/matchers.d.ts +2 -2
  229. package/dist/test/matchers.js +2 -2
  230. package/dist/types/account.d.ts +3 -0
  231. package/dist/types/appStores.d.ts +9 -16
  232. package/dist/types/modal.d.ts +26 -14
  233. package/dist/types/order.d.ts +10 -0
  234. package/dist/types/order.js +1 -0
  235. package/dist/types/toast.d.ts +11 -0
  236. package/dist/types/toast.js +1 -0
  237. package/dist/types/tokenBalance.d.ts +6 -0
  238. package/dist/types/tokenBalance.js +1 -0
  239. package/dist/types/transaction.d.ts +67 -22
  240. package/dist/types/transaction.js +31 -1
  241. package/dist/utils/breadcrumbs.js +2 -2
  242. package/dist/utils/codeMirrorThemes.js +80 -74
  243. package/dist/utils/configHelpers.d.ts +4 -0
  244. package/dist/utils/configHelpers.js +21 -0
  245. package/dist/utils/constructHashLink.d.ts +24 -0
  246. package/dist/utils/constructHashLink.js +117 -0
  247. package/dist/utils/getNetworkName.d.ts +1 -0
  248. package/dist/utils/getNetworkName.js +13 -0
  249. package/dist/utils/hex.js +1 -1
  250. package/dist/utils/lightweightChartsThemes.d.ts +1 -1
  251. package/dist/utils/lightweightChartsThemes.js +11 -11
  252. package/dist/utils/localDbStatus.d.ts +26 -0
  253. package/dist/utils/localDbStatus.js +22 -0
  254. package/dist/utils/number.d.ts +0 -7
  255. package/dist/utils/number.js +5 -30
  256. package/dist/utils/stripTrailingWhitespace.d.ts +16 -0
  257. package/dist/utils/stripTrailingWhitespace.js +22 -0
  258. package/dist/utils/tokens.d.ts +2 -0
  259. package/dist/utils/tokens.js +3 -0
  260. package/dist/utils/vaultBalanceChangeLabels.d.ts +4 -0
  261. package/dist/utils/vaultBalanceChangeLabels.js +18 -0
  262. package/package.json +89 -84
  263. package/dist/__fixtures__/orderDetail.d.ts +0 -99
  264. package/dist/__fixtures__/orderDetail.js +0 -204
  265. package/dist/__fixtures__/settings-12-11-24.json +0 -160
  266. package/dist/__mocks__/mockTransactionStore.d.ts +0 -22
  267. package/dist/__mocks__/mockTransactionStore.js +0 -56
  268. package/dist/__mocks__/settings.d.ts +0 -3
  269. package/dist/__mocks__/settings.js +0 -37
  270. package/dist/components/CheckboxMyItemsOnly.svelte +0 -23
  271. package/dist/components/CheckboxMyItemsOnly.svelte.d.ts +0 -21
  272. package/dist/components/ListViewOrderbookFilters.svelte +0 -58
  273. package/dist/components/ListViewOrderbookFilters.svelte.d.ts +0 -28
  274. package/dist/components/deployment/InvalidStrategiesSection.svelte +0 -19
  275. package/dist/components/deployment/InvalidStrategiesSection.svelte.d.ts +0 -19
  276. package/dist/components/deployment/StrategyPage.svelte.d.ts +0 -19
  277. package/dist/components/deployment/ValidStrategiesSection.svelte.d.ts +0 -19
  278. package/dist/components/deployment/getDeploymentTransactionArgs.d.ts +0 -17
  279. package/dist/components/deployment/getDeploymentTransactionArgs.js +0 -28
  280. package/dist/components/detail/DepositOrWithdrawButtons.svelte +0 -44
  281. package/dist/components/detail/DepositOrWithdrawButtons.svelte.d.ts +0 -26
  282. package/dist/components/dropdown/DropdownActiveSubgraphs.svelte +0 -38
  283. package/dist/components/dropdown/DropdownActiveSubgraphs.svelte.d.ts +0 -21
  284. package/dist/components/dropdown/DropdownOrderListAccounts.svelte +0 -15
  285. package/dist/components/dropdown/DropdownOrderListAccounts.svelte.d.ts +0 -20
  286. package/dist/components/dropdown/DropdownOrderStatus.svelte +0 -31
  287. package/dist/components/dropdown/DropdownOrderStatus.svelte.d.ts +0 -19
  288. package/dist/hooks/useGui.d.ts +0 -3
  289. package/dist/hooks/useGui.js +0 -11
  290. package/dist/providers/GuiProvider.svelte +0 -8
  291. package/dist/providers/GuiProvider.svelte.d.ts +0 -21
  292. package/dist/stores/transactionStore.d.ts +0 -98
  293. package/dist/stores/transactionStore.js +0 -303
  294. package/dist/types/strategy.d.ts +0 -10
  295. package/dist/utils/time.d.ts +0 -12
  296. package/dist/utils/time.js +0 -27
  297. package/dist/utils/vault.d.ts +0 -2
  298. package/dist/utils/vault.js +0 -29
  299. /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 [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte).
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 [in the docs](https://svelte.dev/docs/kit/packaging).
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 `pnpm install` or `yarn`), start a development server:
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 `src/routes` can be used as a showcase or preview app.
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 [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
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 `"name"` option. Also consider adding a `"license"` field and point it to a `LICENSE` file which you can create from a template (one popular option is the [MIT license](https://opensource.org/license/mit/)).
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,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 {};
@@ -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 'svelte/store';
1
+ import { writable } from "svelte/store";
2
2
  export const props = writable();
@@ -1,3 +1,11 @@
1
- <script>import { props } from "./MockComponent";
2
- $: $props = $$props;
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 '@wagmi/core';
1
+ import { type Config } from "@wagmi/core";
2
2
  export declare const mockWeb3Config: Config;
@@ -1,15 +1,18 @@
1
- import { createConfig, http, fallback } from '@wagmi/core';
2
- import { mock } from '@wagmi/connectors';
3
- import { polygonAmoy } from '@wagmi/core/chains';
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: ['0xf08bcbce72f62c95dcb7c07dcb5ed26acfcfbc11']
10
- })
9
+ accounts: ["0xf08bcbce72f62c95dcb7c07dcb5ed26acfcfbc11"],
10
+ }),
11
11
  ],
12
12
  transports: {
13
- [polygonAmoy.id]: fallback([http(), http('https://rpc-amoy.polygon.technology')])
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 '@tanstack/svelte-query';
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 { ConfigSource } from '@rainlanguage/orderbook/js_api';
2
- 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;
21
- };
22
- export declare const mockActiveAccountsItemsStore: {
23
- 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
- set: (this: void, value: Record<string, string>) => void;
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 mockActiveOrderbookRefStore: {
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 mockShowMyItemsOnlyStore: {
86
- subscribe: (this: void, run: import("svelte/store").Subscriber<boolean>, invalidate?: import("svelte/store").Invalidator<boolean> | undefined) => import("svelte/store").Unsubscriber;
87
- set: (this: void, value: boolean) => void;
88
- mockSetSubscribeValue: (value: boolean) => void;
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<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;
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 {};