Mockup docs: what loads patterns into registry?

Folks, there is an example broken in the Mockup docs, I would like to help fix this, but need some better understanding: attempting to access modal examples, the modal with TinyMCE example fails if you have not clicked on the TinyMCE example first.

Intially, when loading just the modal pattern examples:

>>> require("pat-registry").patterns
Object {backdrop: function, plone-modal: function}

After loading the TInyMCE example:

>>> require("pat-registry").patterns
Object {backdrop: function, plone-modal: function, autotoc: function, tooltip: function, select2: function…}

And after clicking the latter example, then back to the modal, the docs "Modal with TinyMCE" example actually works.

Can anyone explain how the patterns are registered by the docs JS on click of the pattern title?

I have filed a bug for this: https://github.com/plone/mockup/issues/762