@sheetwrite/reactclass
Projects canonical document transactions into host-owned row changes.
The bridge only owns compact data-space identity arrays. It never writes to
defaultRows, never renders, and never creates a second document store.
- Package
@sheetwrite/react- Source
packages/core/dist/row-bridge.d.ts#L143
Members 5
constructor
constructor<Id extends RowBridgeIdtype RowBridgeId = string | number;type RowBridgeId = string | number;type RowBridgeId =
string | number;A stable host identity for one data-space row.API reference → = RowBridgeIdtype RowBridgeId = string | number;type RowBridgeId = string | number;type RowBridgeId =
string | number;A stable host identity for one data-space row.API reference →, Row extends Record<string, CellScalartype CellScalar = string | number | boolean | null;type CellScalar = string | number | boolean | null;type CellScalar =
| string
| number
| boolean
| null;A scalar that can be displayed directly.API reference →> = Record<string, CellScalartype CellScalar = string | number | boolean | null;type CellScalar = string | number | boolean | null;type CellScalar =
| string
| number
| boolean
| null;A scalar that can be displayed directly.API reference →>>(options: RowBridgeOptionsinterface RowBridgeOptions<
Row extends Record<string, CellScalar>,
Id extends RowBridgeId = RowBridgeId,
> {
readonly columns: readonly RowBridgeColumn<Row>[];
readonly defaultRows: readonly Row[];
readonly getRowId: (row: Row, index: number) => Id;
readonly sheet?: SheetId;
readonly createRowId?: (context: RowBridgeInsertContext) => Id;
}interface RowBridgeOptions<
Row extends Record<string, CellScalar>,
Id extends RowBridgeId = RowBridgeId,
> {
readonly columns: readonly RowBridgeColumn<Row>[];
readonly defaultRows: readonly Row[];
readonly getRowId: (row: Row, index: number) => Id;
readonly sheet?: SheetId;
readonly createRowId?: (context: RowBridgeInsertContext) => Id;
}interface RowBridgeOptions<
Row extends Record<
string,
CellScalar
>,
Id extends RowBridgeId =
RowBridgeId,
> {
readonly columns: readonly RowBridgeColumn<Row>[];
readonly defaultRows: readonly Row[];
readonly getRowId: (
row: Row,
index: number,
) => Id;
readonly sheet?: SheetId;
readonly createRowId?: (
context: RowBridgeInsertContext,
) => Id;
}Options for the framework-neutral, opt-in row bridge.API reference →<Row, Id>);columnKeys Current semantic column keys in canonical column order.
columnKeys: (sheet?: SheetIdtype SheetId = string;type SheetId = string;type SheetId = string;Stable identifier used to address a workbook sheet.API reference →) => readonly string[];project Project an applied Grid change as an accepted, transformed, or remote result.
project: (event: ChangeEventinterface ChangeEvent {
transaction: Transaction;
changes: CellChange[];
commitReason: CommitReason;
source: OperationSource;
epoch?: number;
}interface ChangeEvent {
transaction: Transaction;
changes: CellChange[];
commitReason: CommitReason;
source: OperationSource;
epoch?: number;
}interface ChangeEvent {
transaction: Transaction;
changes: CellChange[];
commitReason: CommitReason;
source: OperationSource;
epoch?: number;
}Payload of the change event; flows OUT for API submission/reconcile.API reference →, requestedOperations?: readonly DocumentOptype DocumentOp =
| {
op: "set";
addr: CellAddress;
value: CellValue;
style?: CellStyle;
}
| { op: "setRange"; range: Range; cells: SnapshotCell[] }
| { op: "setBlock"; range: Range; block: PackedCellBlock }
| {
op: "setRangeStyle";
range: Range;
style: Partial<CellStyle> | null;
}
| {
// … 93 more lines — see the API reference
}type DocumentOp =
| {
op: "set";
addr: CellAddress;
value: CellValue;
style?: CellStyle;
}
| { op: "setRange"; range: Range; cells: SnapshotCell[] }
| { op: "setBlock"; range: Range; block: PackedCellBlock }
| {
op: "setRangeStyle";
range: Range;
style: Partial<CellStyle> | null;
}
| {
// … 93 more lines — see the API reference
}type DocumentOp =
| {
op: "set";
addr: CellAddress;
value: CellValue;
style?: CellStyle;
}
| {
op: "setRange";
range: Range;
cells: SnapshotCell[];
}
| {
op: "setBlock";
range: Range;
block: PackedCellBlock;
}
| {
op: "setRangeStyle";
// … 168 more lines — see the API reference
}Exhaustive serializable operation union for workbook mutations.API reference →[], transactionId?: string) => RowBridgeProjectioninterface RowBridgeProjection<
Id extends RowBridgeId = RowBridgeId,
> {
readonly status: RowBridgeReconciliationStatus;
readonly transaction: RowBridgeTransaction;
readonly deltas: readonly RowBridgeDelta<Id>[];
}interface RowBridgeProjection<
Id extends RowBridgeId = RowBridgeId,
> {
readonly status: RowBridgeReconciliationStatus;
readonly transaction: RowBridgeTransaction;
readonly deltas: readonly RowBridgeDelta<Id>[];
}interface RowBridgeProjection<
Id extends RowBridgeId =
RowBridgeId,
> {
readonly status: RowBridgeReconciliationStatus;
readonly transaction: RowBridgeTransaction;
readonly deltas: readonly RowBridgeDelta<Id>[];
}Result of projection or reconciliation.API reference →<Id>;reconcile Reconcile a canonical transaction response without synchronizing host rows implicitly.
reconcile: (input: RowBridgeReconciliationInputinterface RowBridgeReconciliationInput<
Id extends RowBridgeId = RowBridgeId,
> {
readonly status: RowBridgeReconciliationStatus;
readonly transactionId?: string;
readonly source?: OperationSource;
readonly version?: number;
readonly operations?: readonly DocumentOp[];
readonly requestedOperations?: readonly DocumentOp[];
readonly event?: ChangeEvent;
readonly commitReason?: CommitReason;
readonly _type?: Id;
}interface RowBridgeReconciliationInput<
Id extends RowBridgeId = RowBridgeId,
> {
readonly status: RowBridgeReconciliationStatus;
readonly transactionId?: string;
readonly source?: OperationSource;
readonly version?: number;
readonly operations?: readonly DocumentOp[];
readonly requestedOperations?: readonly DocumentOp[];
readonly event?: ChangeEvent;
readonly commitReason?: CommitReason;
readonly _type?: Id;
}interface RowBridgeReconciliationInput<
Id extends RowBridgeId =
RowBridgeId,
> {
readonly status: RowBridgeReconciliationStatus;
readonly transactionId?: string;
readonly source?: OperationSource;
readonly version?: number;
readonly operations?: readonly DocumentOp[];
readonly requestedOperations?: readonly DocumentOp[];
readonly event?: ChangeEvent;
readonly commitReason?: CommitReason;
readonly _type?: Id;
}Input to RowBridge.reconcile.API reference →<Id>) => RowBridgeProjectioninterface RowBridgeProjection<
Id extends RowBridgeId = RowBridgeId,
> {
readonly status: RowBridgeReconciliationStatus;
readonly transaction: RowBridgeTransaction;
readonly deltas: readonly RowBridgeDelta<Id>[];
}interface RowBridgeProjection<
Id extends RowBridgeId = RowBridgeId,
> {
readonly status: RowBridgeReconciliationStatus;
readonly transaction: RowBridgeTransaction;
readonly deltas: readonly RowBridgeDelta<Id>[];
}interface RowBridgeProjection<
Id extends RowBridgeId =
RowBridgeId,
> {
readonly status: RowBridgeReconciliationStatus;
readonly transaction: RowBridgeTransaction;
readonly deltas: readonly RowBridgeDelta<Id>[];
}Result of projection or reconciliation.API reference →<Id>;rowIds Current data-space row identities; visual sort and filters do not affect this order.
rowIds: (sheet?: SheetIdtype SheetId = string;type SheetId = string;type SheetId = string;Stable identifier used to address a workbook sheet.API reference →) => readonly (Id | null)[]Declaration
View full TypeScript declaration
class RowBridge { constructor< Id extends RowBridgeIdtype RowBridgeId = string | number;type RowBridgeId = string | number;type RowBridgeId =
string | number;A stable host identity for one data-space row.API reference → = RowBridgeIdtype RowBridgeId = string | number;type RowBridgeId = string | number;type RowBridgeId =
string | number;A stable host identity for one data-space row.API reference →, Row extends Record<string, CellScalartype CellScalar = string | number | boolean | null;type CellScalar = string | number | boolean | null;type CellScalar =
| string
| number
| boolean
| null;A scalar that can be displayed directly.API reference →> = Record<string, CellScalartype CellScalar = string | number | boolean | null;type CellScalar = string | number | boolean | null;type CellScalar =
| string
| number
| boolean
| null;A scalar that can be displayed directly.API reference →>, >(options: RowBridgeOptionsinterface RowBridgeOptions<
Row extends Record<string, CellScalar>,
Id extends RowBridgeId = RowBridgeId,
> {
readonly columns: readonly RowBridgeColumn<Row>[];
readonly defaultRows: readonly Row[];
readonly getRowId: (row: Row, index: number) => Id;
readonly sheet?: SheetId;
readonly createRowId?: (context: RowBridgeInsertContext) => Id;
}interface RowBridgeOptions<
Row extends Record<string, CellScalar>,
Id extends RowBridgeId = RowBridgeId,
> {
readonly columns: readonly RowBridgeColumn<Row>[];
readonly defaultRows: readonly Row[];
readonly getRowId: (row: Row, index: number) => Id;
readonly sheet?: SheetId;
readonly createRowId?: (context: RowBridgeInsertContext) => Id;
}interface RowBridgeOptions<
Row extends Record<
string,
CellScalar
>,
Id extends RowBridgeId =
RowBridgeId,
> {
readonly columns: readonly RowBridgeColumn<Row>[];
readonly defaultRows: readonly Row[];
readonly getRowId: (
row: Row,
index: number,
) => Id;
readonly sheet?: SheetId;
readonly createRowId?: (
context: RowBridgeInsertContext,
) => Id;
}Options for the framework-neutral, opt-in row bridge.API reference →<Row, Id>); columnKeys: (sheet?: SheetIdtype SheetId = string;type SheetId = string;type SheetId = string;Stable identifier used to address a workbook sheet.API reference →) => readonly string[]; project: ( event: ChangeEventinterface ChangeEvent {
transaction: Transaction;
changes: CellChange[];
commitReason: CommitReason;
source: OperationSource;
epoch?: number;
}interface ChangeEvent {
transaction: Transaction;
changes: CellChange[];
commitReason: CommitReason;
source: OperationSource;
epoch?: number;
}interface ChangeEvent {
transaction: Transaction;
changes: CellChange[];
commitReason: CommitReason;
source: OperationSource;
epoch?: number;
}Payload of the change event; flows OUT for API submission/reconcile.API reference →, requestedOperations?: readonly DocumentOptype DocumentOp =
| {
op: "set";
addr: CellAddress;
value: CellValue;
style?: CellStyle;
}
| { op: "setRange"; range: Range; cells: SnapshotCell[] }
| { op: "setBlock"; range: Range; block: PackedCellBlock }
| {
op: "setRangeStyle";
range: Range;
style: Partial<CellStyle> | null;
}
| {
// … 93 more lines — see the API reference
}type DocumentOp =
| {
op: "set";
addr: CellAddress;
value: CellValue;
style?: CellStyle;
}
| { op: "setRange"; range: Range; cells: SnapshotCell[] }
| { op: "setBlock"; range: Range; block: PackedCellBlock }
| {
op: "setRangeStyle";
range: Range;
style: Partial<CellStyle> | null;
}
| {
// … 93 more lines — see the API reference
}type DocumentOp =
| {
op: "set";
addr: CellAddress;
value: CellValue;
style?: CellStyle;
}
| {
op: "setRange";
range: Range;
cells: SnapshotCell[];
}
| {
op: "setBlock";
range: Range;
block: PackedCellBlock;
}
| {
op: "setRangeStyle";
// … 168 more lines — see the API reference
}Exhaustive serializable operation union for workbook mutations.API reference →[], transactionId?: string, ) => RowBridgeProjectioninterface RowBridgeProjection<
Id extends RowBridgeId = RowBridgeId,
> {
readonly status: RowBridgeReconciliationStatus;
readonly transaction: RowBridgeTransaction;
readonly deltas: readonly RowBridgeDelta<Id>[];
}interface RowBridgeProjection<
Id extends RowBridgeId = RowBridgeId,
> {
readonly status: RowBridgeReconciliationStatus;
readonly transaction: RowBridgeTransaction;
readonly deltas: readonly RowBridgeDelta<Id>[];
}interface RowBridgeProjection<
Id extends RowBridgeId =
RowBridgeId,
> {
readonly status: RowBridgeReconciliationStatus;
readonly transaction: RowBridgeTransaction;
readonly deltas: readonly RowBridgeDelta<Id>[];
}Result of projection or reconciliation.API reference →<Id>; reconcile: ( input: RowBridgeReconciliationInputinterface RowBridgeReconciliationInput<
Id extends RowBridgeId = RowBridgeId,
> {
readonly status: RowBridgeReconciliationStatus;
readonly transactionId?: string;
readonly source?: OperationSource;
readonly version?: number;
readonly operations?: readonly DocumentOp[];
readonly requestedOperations?: readonly DocumentOp[];
readonly event?: ChangeEvent;
readonly commitReason?: CommitReason;
readonly _type?: Id;
}interface RowBridgeReconciliationInput<
Id extends RowBridgeId = RowBridgeId,
> {
readonly status: RowBridgeReconciliationStatus;
readonly transactionId?: string;
readonly source?: OperationSource;
readonly version?: number;
readonly operations?: readonly DocumentOp[];
readonly requestedOperations?: readonly DocumentOp[];
readonly event?: ChangeEvent;
readonly commitReason?: CommitReason;
readonly _type?: Id;
}interface RowBridgeReconciliationInput<
Id extends RowBridgeId =
RowBridgeId,
> {
readonly status: RowBridgeReconciliationStatus;
readonly transactionId?: string;
readonly source?: OperationSource;
readonly version?: number;
readonly operations?: readonly DocumentOp[];
readonly requestedOperations?: readonly DocumentOp[];
readonly event?: ChangeEvent;
readonly commitReason?: CommitReason;
readonly _type?: Id;
}Input to RowBridge.reconcile.API reference →<Id>, ) => RowBridgeProjectioninterface RowBridgeProjection<
Id extends RowBridgeId = RowBridgeId,
> {
readonly status: RowBridgeReconciliationStatus;
readonly transaction: RowBridgeTransaction;
readonly deltas: readonly RowBridgeDelta<Id>[];
}interface RowBridgeProjection<
Id extends RowBridgeId = RowBridgeId,
> {
readonly status: RowBridgeReconciliationStatus;
readonly transaction: RowBridgeTransaction;
readonly deltas: readonly RowBridgeDelta<Id>[];
}interface RowBridgeProjection<
Id extends RowBridgeId =
RowBridgeId,
> {
readonly status: RowBridgeReconciliationStatus;
readonly transaction: RowBridgeTransaction;
readonly deltas: readonly RowBridgeDelta<Id>[];
}Result of projection or reconciliation.API reference →<Id>; rowIds: (sheet?: SheetIdtype SheetId = string;type SheetId = string;type SheetId = string;Stable identifier used to address a workbook sheet.API reference →) => readonly (Id | null)[];}