ydoc-status.ts 613 B

123456789101112131415
  1. /**
  2. * NEW: The document is newly created and not yet synced with the latest revision.
  3. * SYNCED: The document is synced with the latest revision.
  4. * DRAFT: The document advances as a draft compared to the latest revision
  5. * OUTDATED: The document is outdated and needs to be synced with the latest revision.
  6. * ISOLATED: The latest revision does not exist and the document is isolated from the page.
  7. */
  8. export const YDocStatus = {
  9. NEW: 'new',
  10. SYNCED: 'synced',
  11. DRAFT: 'draft',
  12. OUTDATED: 'outdated',
  13. ISOLATED: 'isolated',
  14. } as const;
  15. export type YDocStatus = typeof YDocStatus[keyof typeof YDocStatus]