[Low] Export all components to versioned package

Rather than independently versioning components, and having one package.json dependency for each component (consider a situation where we have thousands of components and what that looks like at install-time), it makes more sense to publish all of the components in a Figma Page as a single package.

I may have Components and Layouts pages with different Figma components on them, and Uipkg’s publishing logic would ideally just bump @username/components and @username/layouts, publishing the new version of their respective components in aggregate.

This is not a major issue for early adoption and is mostly an easy upgrade, though it will require rewriting a lot of import statements.

Library shape

Currently library exports take the form:

import ComponentDefault from "@username/component"

with a corresponding export default ... in the upstream entry-point. For a library of multiple components, this is ideal for Intellisense discovery:

import { Component } from "@username/library"

And map each component like:

// dist/index.js

export * from "./Component1"
export * from "./Component2"

// dist/component1/index.js

export const Component1 = () => { /* ... */ }

The component can be imported either from the package entrypoint or the relevant submodule, but that requires a little configuration for conditional exports and stuff, which I can help with if needed. See tsmodule.

Comparison with Amplify Studio

Amplify Studio’s UI Library does version your components in aggregate.