Skip to content

Commit 56632f5

Browse files
authored
docs(types): refresh SuperDocUI.document JSDoc to reflect dirty (SD-2667) (#3043)
The JSDoc on SuperDocUI.document still claimed unsaved-changes was intentionally not on the slice. That landed in #3040 as DocumentSlice.dirty. The stale JSDoc misled at least one external reviewer into flagging the docs as documenting a non-existent field; update the JSDoc so the source is accurate.
1 parent 3ab9cc1 commit 56632f5

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -451,14 +451,14 @@ export interface SuperDocUI {
451451

452452
/**
453453
* Document domain. Session-level operations a custom toolbar
454-
* needs (Export DOCX, document-mode toggle, ready state). Sugar
455-
* over `state.document` plus passthroughs to the host SuperDoc
456-
* instance's `setDocumentMode` / `export`. Lifts the operations
457-
* that previously forced consumers to wire a separate "host" hook
458-
* through their React context just so a toolbar button could call
459-
* `superdoc.export(...)`. Dirty / unsaved-changes is intentionally
460-
* not on this slice today: SuperDoc has no host-side dirty primitive,
461-
* and adding one is a separate ticket.
454+
* needs (Export DOCX, document-mode toggle, ready state, unsaved-
455+
* changes indicator). Sugar over `state.document` plus passthroughs
456+
* to the host SuperDoc instance's `setDocumentMode` / `export` /
457+
* `replaceFile`. Lifts the operations that previously forced
458+
* consumers to wire a separate "host" hook through their React
459+
* context just so a toolbar button could call `superdoc.export(...)`.
460+
* The slice's `dirty` flag is transaction-driven and cleared on a
461+
* successful `export` or `replaceFile`; see {@link DocumentSlice}.
462462
*/
463463
document: DocumentHandle;
464464

0 commit comments

Comments
 (0)