Goal
I'd like to be able to
- use
<twisty-scrubber> and <twisty-button>'s outside of <twisty-player>
- tweak web components' styles to my needs, including
<twisty-scrubbler>
Each of the buttons just calls a controller method, so replicating them even without standalone components is pretty straightforward. <twisty-scrubbler> on the other hand is more sophisticated so manually replicating it's functionality is more error-prone (as the internal API and the original component might change in the future).
Possible solution
Including scrubble in exports shouldn't be an issue itself. While I'm fine with passing model and controller to the constructor in JS, we would also need to add attributeChangedCallback to make using it via a for attribute possible, like in TwistyAlgEditor and TwistyAlgViewer.
As for custom styling, here's a possible solution:

It is worth noting that passing custom css while leaving default styles enabled results in two <style> tags, tbh idk if it's a problem.
Alternatives
Alternatively we could abstract away the custom styling logic and the binding logic in a class like TwistyStandaloneElement which would extend from ManagedCustomElement. I would be happy to provide a pull request with these changes.
Goal
I'd like to be able to
<twisty-scrubber>and<twisty-button>'s outside of<twisty-player><twisty-scrubbler>Each of the buttons just calls a controller method, so replicating them even without standalone components is pretty straightforward.
<twisty-scrubbler>on the other hand is more sophisticated so manually replicating it's functionality is more error-prone (as the internal API and the original component might change in the future).Possible solution
Including
scrubblein exports shouldn't be an issue itself. While I'm fine with passing model and controller to the constructor in JS, we would also need to add attributeChangedCallback to make using it via aforattribute possible, like inTwistyAlgEditorandTwistyAlgViewer.As for custom styling, here's a possible solution:

It is worth noting that passing custom css while leaving default styles enabled results in two
<style>tags, tbh idk if it's a problem.Alternatives
Alternatively we could abstract away the custom styling logic and the binding logic in a class like
TwistyStandaloneElementwhich would extend from ManagedCustomElement. I would be happy to provide a pull request with these changes.