I'm working on a settings API class which I'd like to be able to drop into a plugin, wpmu plugin, theme, or child theme directory, and have it just work. My issue is that I'm having trouble figuring out how to determine the URIs for including scripts and styles on the fly. I'd like this to work no matter how the site's WP install is set up, so it should work where ever the wp-content, plugins, mu-plugins, and themes directories are located.
I found this post which involves something similar, but it's not quite the same, since it's dealing with paths and not URIs. Also, (frankly), I'm finding it a little challenging to wrap my head around, and I'd like to avoid going down that rabbit hole if my carrot isn't going to be there.
Any advice on how to approach this?