Extending bpmn-js with custom elements: how to add connect action?

Dear bpmn-js developers and community!

I am extending bpmn-js with one element. Based on custom elements example, I took the custom-modeler and transfered it to the modeler example to build my app from this point.

First strange thing is that the custom elements are not rendered on the palette now, however there are no problems with rendering on the canvas.

Second problem is that I created a rule (with high priority) so that elements can connect to the custom element and the connection should be directed association (by returning type of connection in canConnect), but it still creates the default connection.

Third issue, is that I would like to make custom element be able to connect with other elements (have created customContextPadProvider for that) - but it is not working for the reason I haven’t found yet.

Here is the code of my app.
I would be really glad for any help for the issues above.