Skip to content

Commit 1c70b9b

Browse files
authored
Merge pull request #3573 from superdoc-dev/caio/sd-3313-hittest-docs
docs(ui): note content controls in entityAt hit types (SD-3313)
2 parents a6ceac5 + 6e865e4 commit 1c70b9b

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

packages/super-editor/src/ui/types.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1907,7 +1907,7 @@ export interface ViewportHandle {
19071907
* Look up entities painted under a viewport coordinate. Used by
19081908
* right-click menus and hover tooltips to ask "what's at this point?"
19091909
* without consumers reading `data-track-change-id` /
1910-
* `data-comment-ids` off the painted DOM themselves; the
1910+
* `data-comment-ids` / `data-sdt-id` off the painted DOM themselves; the
19111911
* data-attribute layout is an implementation detail of the painter
19121912
* that consumers shouldn't depend on.
19131913
*
@@ -1924,11 +1924,12 @@ export interface ViewportHandle {
19241924
* ids from the other's DOM, and post-destroy calls return `[]`
19251925
* rather than stale ids from cached painted nodes.
19261926
*
1927-
* Today the supported entity types are `comment` and `trackedChange`.
1928-
* `link`, `image`, and `tableCell` are reserved for follow-ups;
1929-
* adding them is purely additive (new union members), so callers can
1930-
* `switch` on `hit.type` and the default branch remains forward
1931-
* compatible.
1927+
* Today the supported entity types are `comment`, `trackedChange`, and
1928+
* `contentControl` (content controls / SDT fields, whose hit also carries
1929+
* `scope` and `tag`). `link`, `image`, and `tableCell` are reserved for
1930+
* follow-ups; adding them is purely additive (new union members), so
1931+
* callers can `switch` on `hit.type` and the default branch remains
1932+
* forward compatible.
19321933
*/
19331934
entityAt(input: ViewportEntityAtInput): ViewportEntityHit[];
19341935
/**

0 commit comments

Comments
 (0)