@ape.swap/bonds-sdk 1.0.433 → 1.0.435

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.
@@ -10,7 +10,7 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
13
- import { Flex } from '../../../components/uikit-sdk';
13
+ import { Flex } from '../../uikit-sdk';
14
14
  import { ChainId, MAINNET_CHAINS } from '../../../config/constants/chains';
15
15
  import BondRowsWithTitle from './BondRowsWithTitle';
16
16
  var BondRowsByChain = function (_a) {
@@ -0,0 +1,33 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
13
+ import { Flex } from "../../uikit-sdk";
14
+ import { AnimatePresence, motion } from "framer-motion";
15
+ import ChainTitle from "./ChainTitle";
16
+ import BondRow from "./BondRow";
17
+ import { useState } from "react";
18
+ var BondRowsWithTitle = function (_a) {
19
+ var chain = _a.chain, bonds = _a.bonds, hotBonds = _a.hotBonds, rowClick = _a.rowClick;
20
+ var billsFilteredByChain = bonds.filter(function (bill) { return bill.chainId === chain; });
21
+ var key = chain;
22
+ var _b = useState(false), isExpanded = _b[0], setIsExpanded = _b[1];
23
+ var toggleExpand = function () {
24
+ setIsExpanded(function (prev) { return !prev; });
25
+ };
26
+ return (_jsx(Flex, __assign({ sx: { width: '100%', flexDirection: 'column' } }, { children: _jsx(AnimatePresence, __assign({ initial: false }, { children: _jsxs(Flex, __assign({ onClick: toggleExpand }, { children: [_jsx(ChainTitle, { chain: chain, pt: '5px' }), billsFilteredByChain.length > 0 && (_jsx(motion.div, __assign({ initial: { height: 0, overflow: 'hidden' }, animate: { height: 'fit-content', overflow: 'hidden', transitionEnd: { overflow: 'visible' } }, exit: { height: 0, overflow: 'hidden' }, sx: {
27
+ position: 'relative',
28
+ overflow: 'hidden',
29
+ width: '100%',
30
+ marginTop: '0px',
31
+ } }, { children: billsFilteredByChain === null || billsFilteredByChain === void 0 ? void 0 : billsFilteredByChain.map(function (bill) { return (_jsx(BondRow, { bond: bill, hotBonds: hotBonds, rowClick: rowClick }, bill.billAddress)); }) }), key))] })) })) }), key));
32
+ };
33
+ export default BondRowsWithTitle;
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
13
13
  import { NETWORK_LABEL } from '../../../config/constants/chains';
14
- import { Flex, Svg } from '../../../components/uikit-sdk';
14
+ import { Flex, Svg } from '../../uikit-sdk';
15
15
  var ChainTitle = function (_a) {
16
16
  var chain = _a.chain, pt = _a.pt;
17
17
  return (_jsxs(Flex, __assign({ sx: {
@@ -72,7 +72,7 @@ import { TooltipText } from '../../enum/tooltips';
72
72
  import { TooltipBubble, Svg } from '../uikit-sdk';
73
73
  import { BLOCK_EXPLORER } from '../../config/constants/chains';
74
74
  import { Input } from '../uikit-sdk/Input';
75
- import BondRowsByChain from './BondRow/BondRowsByChain';
75
+ import BondRowsByChain from './BondRows/BondRowsByChain';
76
76
  var Bonds = function (_a) {
77
77
  var connectionString = _a.connectionString;
78
78
  var _b = useWeb3React(), account = _b.account, isActive = _b.isActive;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Ape Bond SDK",
4
4
  "author": "Ape Bond",
5
5
  "license": "MIT",
6
- "version": "1.0.433",
6
+ "version": "1.0.435",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.es.js",
9
9
  "types": "dist/index.d.ts",
@@ -1,28 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
13
- import { Flex } from "../../uikit-sdk";
14
- import { AnimatePresence, motion } from "framer-motion";
15
- import ChainTitle from "./ChainTitle";
16
- import BondRow from "./BondRow";
17
- var BondRowsWithTitle = function (_a) {
18
- var chain = _a.chain, bonds = _a.bonds, hotBonds = _a.hotBonds, rowClick = _a.rowClick;
19
- var billsFilteredByChain = bonds.filter(function (bill) { return bill.chainId === chain; });
20
- var key = chain;
21
- return (_jsx(Flex, __assign({ sx: { width: '100%', flexDirection: 'column' } }, { children: _jsxs(AnimatePresence, __assign({ initial: false }, { children: [_jsx(ChainTitle, { chain: chain, pt: '5px' }), billsFilteredByChain.length > 0 && (_jsx(motion.div, __assign({ initial: { height: 0, overflow: 'hidden' }, animate: { height: 'fit-content', overflow: 'hidden', transitionEnd: { overflow: 'visible' } }, exit: { height: 0, overflow: 'hidden' }, sx: {
22
- position: 'relative',
23
- overflow: 'hidden',
24
- width: '100%',
25
- marginTop: '0px',
26
- } }, { children: billsFilteredByChain === null || billsFilteredByChain === void 0 ? void 0 : billsFilteredByChain.map(function (bill) { return (_jsx(BondRow, { bond: bill, hotBonds: hotBonds, rowClick: rowClick }, bill.billAddress)); }) }), key))] })) }), key));
27
- };
28
- export default BondRowsWithTitle;