{"_id":"@bernierllc/content-flow-ui","_rev":"3-aca695fbd7fd68c8cc47861aafe460be","name":"@bernierllc/content-flow-ui","dist-tags":{"latest":"0.2.2"},"versions":{"0.0.0":{"name":"@bernierllc/content-flow-ui","version":"0.0.0","keywords":["oidc","trusted-publishing","setup"],"_id":"@bernierllc/content-flow-ui@0.0.0","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"87fa5874682b71971b5381bac696469949d8efbf","tarball":"https://registry.npmjs.org/@bernierllc/content-flow-ui/-/content-flow-ui-0.0.0.tgz","fileCount":2,"integrity":"sha512-x4MXkOvZA8krFncOcFZ0IfrQ+6HffjB9eqD77xqfdZ0U+I1VXthFuQc/qFCMqh+O1MyiEqfD6JCauunkgrlV5A==","signatures":[{"sig":"MEUCID5E1JDqq2YDsvSXJ5iOuqbZXHrZki+EAboqTMeiFkc/AiEAjoKwPTLrcNeZzQJcMZ5WuYzoRlvDmjF5DMvjeVPMj6Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2071},"_npmUser":{"name":"mkbernier","email":"mkbernier@gmail.com"},"_npmVersion":"11.19.0","description":"OIDC trusted publishing setup package for @bernierllc/content-flow-ui","directories":{},"_nodeVersion":"26.7.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/content-flow-ui_0.0.0_1787172232221_0.6250177600987719","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@bernierllc/content-flow-ui","version":"0.2.1","keywords":["content","kanban","flow-board","react","ui","bernierllc"],"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","_id":"@bernierllc/content-flow-ui@0.2.1","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"2ab4389bfef520ef83bbe6239749c236947031d0","tarball":"https://registry.npmjs.org/@bernierllc/content-flow-ui/-/content-flow-ui-0.2.1.tgz","fileCount":31,"integrity":"sha512-1n5tIh9dq707LYppEsPmGCNVuwzt2mJBbAfkBC9EEAgfNU9fHGby4Gtx+8jejIkdj38n2eFxOlwfcoNiBGXuAg==","signatures":[{"sig":"MEUCIBPr4oWAgDkL9hOiWao41KoBX+k+e42llxPkPcZJZ7xFAiEA4b8fzgkT7iU623EYJRHToXPWl+Y+1TuE7ta+adVttAA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":57414},"main":"dist/index.js","_from":"file:bernierllc-content-flow-ui-0.2.1.tgz","types":"dist/index.d.ts","engines":{"node":">=16"},"scripts":{"lint":"eslint src __tests__ --ext .ts,.tsx","test":"jest","build":"tsc","clean":"rimraf dist","prebuild":"npm run clean","test:run":"jest","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2f15a71d-0163-40a2-9a41-b92c955de971"}},"_resolved":"/home/runner/work/tools/tools/packages/ui/content-flow-ui/bernierllc-content-flow-ui-0.2.1.tgz","_integrity":"sha512-1n5tIh9dq707LYppEsPmGCNVuwzt2mJBbAfkBC9EEAgfNU9fHGby4Gtx+8jejIkdj38n2eFxOlwfcoNiBGXuAg==","bernierllc":{"integration":{"logger":false,"neverhub":false,"docsIntegration":true}},"_npmVersion":"12.0.2","description":"Drop-in flow-board (kanban) view of the content pipeline for content-management-suite-client consumers — composes flow-board-ui with content-aware mapping, headless hooks + default components","directories":{},"_nodeVersion":"24.19.0","dependencies":{"@bernierllc/flow-types":"0.4.0","@bernierllc/flow-board-ui":"0.5.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","react":"^18.0.0","eslint":"^8.0.0","rimraf":"^5.0.0","ts-jest":"^29.1.0","react-dom":"^18.0.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/react":"^18.0.0","@types/react-dom":"^18.0.0","eslint-plugin-react":"^7.33.0","@testing-library/react":"^14.0.0","jest-environment-jsdom":"^29.5.0","@testing-library/jest-dom":"^6.1.3","@typescript-eslint/parser":"^6.0.0","eslint-plugin-react-hooks":"^4.6.0","@testing-library/user-event":"^14.4.3","@typescript-eslint/eslint-plugin":"^6.0.0","@bernierllc/content-management-suite-client":"0.8.0"},"peerDependencies":{"react":">=17","react-dom":">=17","@bernierllc/content-management-suite-client":"0.8.0"},"peerDependenciesMeta":{"@bernierllc/content-management-suite-client":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/content-flow-ui_0.2.1_1787247062719_0.5910078353991468","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"_id":"@bernierllc/content-flow-ui@0.2.2","dist":{"shasum":"6b8cf2172d646e4285d204fb742cded105aa44fc","tarball":"https://registry.npmjs.org/@bernierllc/content-flow-ui/-/content-flow-ui-0.2.2.tgz","fileCount":31,"integrity":"sha512-qn6MBGg6xpx4n9OfqgJXeOjwEqISYtdxi5LD8r/Uuk3vR//X9hCmqRupETZGyEqWh0He8PBhQYIKOlfqGiFLiQ==","signatures":[{"sig":"MEUCIQCCIuMv9n2tj6m1j0KjuQKWnYQBmp/T02PTJ3oRgLs7MgIgLqguH88otzVKU5C/pFILlSfOhvTN/XdvJmHSZi8KPBg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDliEPHo/H5vvfKQI6y8UvHZck/jzSbCnqyIRTNQPoQ4gIgaDmKbFJfIs7Z+7B/zXkJKJmttUGmv5A1AURgKUh/aws="}],"unpackedSize":57417},"main":"dist/index.js","name":"@bernierllc/content-flow-ui","_from":"file:bernierllc-content-flow-ui-0.2.2.tgz","types":"dist/index.d.ts","author":{"name":"Bernier LLC"},"engines":{"node":">=16"},"license":"SEE LICENSE IN LICENSE","scripts":{"lint":"eslint src __tests__ --ext .ts,.tsx","test":"jest","build":"tsc","clean":"rimraf dist","prebuild":"npm run clean","test:run":"jest","test:coverage":"jest --coverage"},"version":"0.2.2","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"2f15a71d-0163-40a2-9a41-b92c955de971"}},"keywords":["content","kanban","flow-board","react","ui","bernierllc"],"_resolved":"/home/runner/work/tools/tools/packages/ui/content-flow-ui/bernierllc-content-flow-ui-0.2.2.tgz","_integrity":"sha512-qn6MBGg6xpx4n9OfqgJXeOjwEqISYtdxi5LD8r/Uuk3vR//X9hCmqRupETZGyEqWh0He8PBhQYIKOlfqGiFLiQ==","bernierllc":{"integration":{"logger":false,"neverhub":false,"docsIntegration":true}},"_npmVersion":"12.2.0","description":"Drop-in flow-board (kanban) view of the content pipeline for content-management-suite-client consumers — composes flow-board-ui with content-aware mapping, headless hooks + default components","directories":{},"maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"_nodeVersion":"24.21.0","dependencies":{"@bernierllc/flow-types":"^0.4.0","@bernierllc/flow-board-ui":"^0.5.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","react":"^18.0.0","eslint":"^8.0.0","rimraf":"^5.0.0","ts-jest":"^29.1.0","react-dom":"^18.0.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/react":"^18.0.0","@types/react-dom":"^18.0.0","eslint-plugin-react":"^7.33.0","@testing-library/react":"^14.0.0","jest-environment-jsdom":"^29.5.0","@testing-library/jest-dom":"^6.1.3","@typescript-eslint/parser":"^6.0.0","eslint-plugin-react-hooks":"^4.6.0","@testing-library/user-event":"^14.4.3","@typescript-eslint/eslint-plugin":"^6.0.0","@bernierllc/content-management-suite-client":"0.8.0"},"peerDependencies":{"react":">=17","react-dom":">=17","@bernierllc/content-management-suite-client":"^0.8.0"},"peerDependenciesMeta":{"@bernierllc/content-management-suite-client":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/content-flow-ui_0.2.2_1790797212337_0.08591519339718201"}}},"time":{"created":"2026-08-19T20:43:51.860Z","modified":"2026-09-30T19:40:12.630Z","0.0.0":"2026-08-19T20:43:52.368Z","0.2.1":"2026-08-20T17:31:02.848Z","0.2.2":"2026-09-30T19:40:12.427Z"},"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","keywords":["content","kanban","flow-board","react","ui","bernierllc"],"description":"Drop-in flow-board (kanban) view of the content pipeline for content-management-suite-client consumers — composes flow-board-ui with content-aware mapping, headless hooks + default components","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"readme":"# @bernierllc/content-flow-ui\n\n**Drop-in flow-board (kanban) view of your content pipeline** for consumers of `@bernierllc/content-management-suite-client`. Composes the generic [`@bernierllc/flow-board-ui`](../flow-board-ui) with content-aware mapping: content items become cards, workflow stages become columns, and card moves call back into your content API.\n\nHeadless hooks + default components — use the batteries-included `ContentFlowBoard`, or build your own UI on `useContentFlowBoard`.\n\n## Install\n\n```bash\nnpm install @bernierllc/content-flow-ui react react-dom\n```\n\n`@bernierllc/content-management-suite-client` is an **optional** peer — only client mode needs it (and any object with the same method shapes works).\n\n## Props mode — you already have the data\n\n```tsx\nimport { ContentFlowBoard } from '@bernierllc/content-flow-ui';\n\n<ContentFlowBoard\n  contents={contents}          // ContentLike[] (client Content[] satisfies it)\n  workflow={workflow}          // WorkflowLike (client Workflow satisfies it)\n  onStageChange={(contentId, stageId) => myApi.moveContent(contentId, stageId)}\n/>\n```\n\nNo `onStageChange` → the board is read-only. Works without the suite client installed.\n\n## Client mode — hand it a client\n\n```tsx\nimport { ContentManagementClient } from '@bernierllc/content-management-suite-client';\nimport { ContentFlowBoard } from '@bernierllc/content-flow-ui';\n\nconst client = new ContentManagementClient({ baseUrl: '/api/content' });\n\n<ContentFlowBoard client={client} workflowId=\"editorial\" pollIntervalMs={30000} />\n```\n\nThe hook fetches the workflow + content, optionally polls, and applies board moves through the client's API. **Note:** the REST API is advance/reject based — moving a card one stage forward calls `advanceWorkflowStage`, moving it backward calls `rejectWorkflowStage`; arbitrary multi-stage jumps raise `ADVANCE_FAILED`.\n\n## Headless\n\n```tsx\nimport { useContentFlowBoard } from '@bernierllc/content-flow-ui';\nimport { KanbanBoard } from '@bernierllc/flow-board-ui';\n\nconst board = useContentFlowBoard({ client, workflowId: 'editorial' });\n// board.boardProps → { flow, items, onTransition, onItemClick }\n// board.selectedContent / selectedItem / clearSelection\n// board.isLoading / error / refresh()\n<KanbanBoard {...board.boardProps} />\n```\n\nPure mapping utilities are exported too: `workflowToFlowDefinition`, `contentToFlowItems`, `resolveContentStage`, `itemIdToContentId`.\n\n## Theming\n\nConfig-object pattern (same as `content-workflow-ui`):\n\n```tsx\n<ContentFlowBoard\n  contents={contents}\n  workflow={workflow}\n  config={{\n    stageColors: { draft: '#94a3b8', review: '#f59e0b' },\n    showAssignee: true,\n    showContentType: true,\n  }}\n/>\n```\n\nStage colors flow through the synthesized `FlowDefinition` into `flow-board-ui` columns.\n\n## Stage resolution\n\nCards are placed by `content.workflowStage` first, then `content.status`, then `mapping.fallbackStageId`, then the first stage. The synthesized flow is a *view*: the board allows any move and your content API stays the authority on which moves are legal.\n\n## Error Handling\n\nAll errors are `ContentFlowUiError` with ES2022 `Error.cause` chains, surfaced on the hook's `error` state (client fetch failures never throw into render).\n\n| Class | Code | Description | Retryable |\n|-------|------|-------------|-----------|\n| ContentFlowUiError | `CONTENT_FLOW_UI_ERROR` | Generic | Depends on cause |\n| ContentFlowUiError | `FETCH_FAILED` | Workflow/content fetch failed | Yes — `refresh()` |\n| ContentFlowUiError | `ADVANCE_FAILED` | Board move rejected (API error or unsupported jump) | Sometimes — check cause |\n| ContentFlowUiError | `MAPPING_ERROR` | Workflow has no stages | No — fix workflow |\n| ContentFlowUiError | `INVALID_OPTIONS` | Neither props nor client mode satisfied | No |\n\n## Related\n\n- `@bernierllc/flow-board-ui` — the generic kanban this composes\n- `@bernierllc/content-flow-adapter` — server-side companion mirroring content into real flow-engine flows\n- `@bernierllc/content-workflow-ui` — editorial widgets (stepper, timeline)\n\n## License\n\nSEE LICENSE IN LICENSE — Copyright (c) 2025 Bernier LLC. Limited-use license.\n","readmeFilename":"README.md"}