@ai-matrx/records-ui 0.116.6 → 0.116.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -86,6 +86,30 @@ declare const NO_RIGHTS: TableRights;
86
86
  */
87
87
  declare function tableRightsAt(level: PermissionLevel$1 | null): TableRights;
88
88
 
89
+ interface PresenceCell {
90
+ recordId: string;
91
+ fieldKey: string;
92
+ }
93
+ interface TablePresencePerson {
94
+ key: string;
95
+ name: string;
96
+ avatarUrl: string | null;
97
+ color: string;
98
+ cell: PresenceCell | null;
99
+ }
100
+ interface TablePresenceSession {
101
+ getSnapshot(): readonly TablePresencePerson[];
102
+ subscribe(listener: () => void): () => void;
103
+ selectCell(cell: PresenceCell | null): void;
104
+ close(): void;
105
+ }
106
+ /** The host's port - structurally what `createRecordsPresencePort` (`@ai-matrx/records/realtime`) returns. */
107
+ interface RecordsPresencePort {
108
+ join(args: {
109
+ tableId: string;
110
+ }): TablePresenceSession;
111
+ }
112
+
89
113
  interface MapPin {
90
114
  /** The record's id. */
91
115
  id: string;
@@ -935,6 +959,14 @@ interface RecordsUiHost {
935
959
  * Unbound, the item is ABSENT. The grid owns open/closed; the host owns the panel.
936
960
  */
937
961
  columnAccess?: (subject: ColumnAccessSubject) => ReactNode;
962
+ /**
963
+ * OPTIONAL. WHO ELSE IS LOOKING AT THIS TABLE (AIRTABLE-PARITY row 183). `join` opens the table's presence
964
+ * room and answers the other people in it (name, avatar, colour, the cell each has selected); the table's
965
+ * toolbar draws their avatars and the grid outlines each person's selected cell in their colour. The host
966
+ * owns the transport - matrx-frontend binds `createRecordsPresencePort` from `@ai-matrx/records/realtime` on its
967
+ * one realtime manager. Unbound, nothing is drawn (never a dead control).
968
+ */
969
+ presence?: RecordsPresencePort;
938
970
  /**
939
971
  * OPTIONAL. THE ARCHIVED-ORGANIZATION DOOR (lane ARCHIVED-ORG-RESTORE). When the store refuses because the
940
972
  * organization is archived, `RefusalNotice` says so and asks this port two things: `state` - may THIS person
package/dist/helpers.d.ts CHANGED
@@ -86,6 +86,30 @@ declare const NO_RIGHTS: TableRights;
86
86
  */
87
87
  declare function tableRightsAt(level: PermissionLevel$1 | null): TableRights;
88
88
 
89
+ interface PresenceCell {
90
+ recordId: string;
91
+ fieldKey: string;
92
+ }
93
+ interface TablePresencePerson {
94
+ key: string;
95
+ name: string;
96
+ avatarUrl: string | null;
97
+ color: string;
98
+ cell: PresenceCell | null;
99
+ }
100
+ interface TablePresenceSession {
101
+ getSnapshot(): readonly TablePresencePerson[];
102
+ subscribe(listener: () => void): () => void;
103
+ selectCell(cell: PresenceCell | null): void;
104
+ close(): void;
105
+ }
106
+ /** The host's port - structurally what `createRecordsPresencePort` (`@ai-matrx/records/realtime`) returns. */
107
+ interface RecordsPresencePort {
108
+ join(args: {
109
+ tableId: string;
110
+ }): TablePresenceSession;
111
+ }
112
+
89
113
  interface MapPin {
90
114
  /** The record's id. */
91
115
  id: string;
@@ -935,6 +959,14 @@ interface RecordsUiHost {
935
959
  * Unbound, the item is ABSENT. The grid owns open/closed; the host owns the panel.
936
960
  */
937
961
  columnAccess?: (subject: ColumnAccessSubject) => ReactNode;
962
+ /**
963
+ * OPTIONAL. WHO ELSE IS LOOKING AT THIS TABLE (AIRTABLE-PARITY row 183). `join` opens the table's presence
964
+ * room and answers the other people in it (name, avatar, colour, the cell each has selected); the table's
965
+ * toolbar draws their avatars and the grid outlines each person's selected cell in their colour. The host
966
+ * owns the transport - matrx-frontend binds `createRecordsPresencePort` from `@ai-matrx/records/realtime` on its
967
+ * one realtime manager. Unbound, nothing is drawn (never a dead control).
968
+ */
969
+ presence?: RecordsPresencePort;
938
970
  /**
939
971
  * OPTIONAL. THE ARCHIVED-ORGANIZATION DOOR (lane ARCHIVED-ORG-RESTORE). When the store refuses because the
940
972
  * organization is archived, `RefusalNotice` says so and asks this port two things: `state` - may THIS person