@mercury-fx/cms
v3.0.0
Published
Mercury CMS compositions — the collection workspace (search, filter chips, saved views, bulk actions and their outcome summary) over a host-declared collection model. Presentational: state comes from @mercury-fx/effector models.
Readme
@mercury-fx/cms
Editorial compositions of the Mercury design system: screens an administrator works in,
composed from @mercury-fx/ui components and driven by state models such as those of
@mercury-fx/effector. A composition renders what it is given; it owns no storage server,
permission or approval policy. The first composition is the collection workspace of
mercury.16.
import { CollectionWorkspace } from "@mercury-fx/cms";
// collection = createCollection({ adapter, fields, getRowKey })
// bulk = createCollectionBulk({ collection, adapter })
<CollectionWorkspace label="Documents" collection={collection} bulk={bulk}
columns={[{ key: "title", label: "Title" }]} actions={[{ id: "publish", label: "Publish" }]} />The workspace reads its models through hooks (useCollection, useBulk) whose shapes it declares
itself (WorkspaceCollectionView, WorkspaceBulkView), so it imports no state library. Its
contract is src/collections/CollectionWorkspace.prompt.md.
