Problem
A host that serves a framework's components behind the app's own cannot say so with stx's public options.
componentsDir takes one directory and fallbackComponentsDir takes one directory searched last, after plugin component directories. The Stacks dashboard needs three roots in this order:
- the app's
resources/components/Dashboard(the app's own copy wins) - the framework's
defaults/resources/components/Dashboard @stacksjs/components(fallback, for<Sidebar>, stacksjs/stacks#2641)
Today it passes the framework directory as componentsDir, so an app copy of a dashboard component is never read. Reproduced on a Stacks 0.75.261 app: a marked resources/components/Dashboard/Commerce/CommerceOrdersTable.stx leaves /commerce/orders byte-identical (954,477 bytes, marker absent).
Moving the framework directory to fallbackComponentsDir does not work: plugin directories rank above the fallback, and @stacksjs/components shares 16 names with the dashboard's own components (Button, Badge, Card, Table, Select, Pagination, ...), so the library's would replace the dashboard's.
Proposal
additionalComponentsDirs?: string[]: roots searched in order right after componentsDir, before the convention directories, plugin directories and fallbackComponentsDir, and walked recursively like componentsDir. Both resolution paths in utils.ts (userComponentFileExists and the renderer's search list) and the serve() plumbing take it.
Needed by stacksjs/stacks#3032.