Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/board-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ The wrapper fills its container — **give the parent element a height.**
| `currentUser` | `string` | — | Current user's display name. Enables the personal **My cards** filter. |
| `live` | `boolean` | `true` | Try the live SSE feed; see *Live updates* below. |
| `pollIntervalMs` | `number` | `30000` | Polling cadence (min 5000). |
| `initialCardPath` | `string` | — | Opens the matching Card once after the initial snapshot loads. Closing it does not make polling reopen it. |
| `additionalCardRoots` | `readonly string[]` | — | Additional relative directories to scan for Cards. Matching `board` frontmatter is still required. |
| `onCardOpen` | `(card: BoardViewCard) => void` | — | Intercept card opens; replaces the built-in read-only detail panel. |
| `renderCardSupplement` | `(card: BoardViewCard) => ReactNode` | — | Add host-owned content after native Properties and Relations in the built-in editable Card detail. It is not rendered for `readOnly` or intercepted opens. |
| `renderCardSupplement` | `(card: BoardViewCard) => ReactNode` | — | Add host-owned content after native Card fields in the built-in editable or read-only detail. It is not rendered for intercepted opens. |
| `onConnectionChange` | `(s: 'live' \| 'polling' \| 'error') => void` | — | Observe transport state transitions. |
| `locale` | `'en' \| 'zh' \| 'ja' \| 'ko'` | `'en'` | Board chrome language. The lingui instance is bundle-wide, so multiple boards on one page share the last-set locale. |
| `className`, `style` | | — | Extra class/style for the wrapper element. |
Expand Down
11 changes: 9 additions & 2 deletions packages/board-react/dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export declare class JTypeApiError extends Error {
* `client`) plus `workspaceId`+`boardRef` and it renders the same shared
* BoardSurface the jtype desktop + web apps use, backed by the document API.
*/
export declare function JTypeBoard({ workspaceId, boardRef, baseUrl, token, client: injectedClient, readOnly, currentUser, live, pollIntervalMs, onCardOpen, renderCardSupplement, onConnectionChange, locale, className, style, }: JTypeBoardProps): ReactElement;
export declare function JTypeBoard({ workspaceId, boardRef, baseUrl, token, client: injectedClient, readOnly, currentUser, live, pollIntervalMs, initialCardPath, additionalCardRoots, onCardOpen, renderCardSupplement, onConnectionChange, locale, className, style, }: JTypeBoardProps): ReactElement;

export declare type JTypeBoardConnection = 'live' | 'polling' | 'error';

Expand Down Expand Up @@ -234,11 +234,18 @@ export declare type JTypeBoardProps = {
live?: boolean;
/** Polling cadence in ms (default 30000, min 5000). */
pollIntervalMs?: number;
/** Open this Card path once after the initial board snapshot resolves. */
initialCardPath?: string;
/**
* Additional relative directories to scan for Cards belonging to this board.
* The Card's `board` frontmatter must still match the resolved board id.
*/
additionalCardRoots?: readonly string[];
/** Intercept card opens (replaces the built-in editable/read-only detail). */
onCardOpen?: (card: BoardViewCard) => void;
/**
* Add host-owned content after native Properties and Relations without
* replacing jtype's editor. Not rendered for read-only or intercepted opens.
* replacing jtype's detail. Not rendered for intercepted opens.
*/
renderCardSupplement?: (card: BoardViewCard) => ReactNode;
/** Observe live/polling/error transitions. */
Expand Down
Loading
Loading