VexDocumentState
VexDocumentState =
object
Defined in: packages/react/src/documents/VexDocumentContext.tsx:11
The S5 document-context shape every edit-view slot contribution reads via
useVexDocument(). Deliberately excludes live, per-keystroke form values —
those come from useVexForm so a contribution that only needs isDirty or
canEdit doesn’t re-render on every field change.
Properties
Section titled “Properties”canEdit
Section titled “canEdit”canEdit:
boolean
Defined in: packages/react/src/documents/VexDocumentContext.tsx:32
Whether the current user can edit this document (useVexPermissions().hasPermission).
optionalid?:string
Defined in: packages/react/src/documents/VexDocumentContext.tsx:17
The document id. Absent on a collection’s “create new” route.
isDirty
Section titled “isDirty”isDirty:
boolean
Defined in: packages/react/src/documents/VexDocumentContext.tsx:24
Whether the mounted form currently differs from saved.
kind:
"collection"|"global"
Defined in: packages/react/src/documents/VexDocumentContext.tsx:13
Whether the document belongs to a collection or a global.
saved:
Record<string,unknown> |undefined
Defined in: packages/react/src/documents/VexDocumentContext.tsx:22
The last-saved document, as returned by the server. undefined before
the initial load resolves (or on a collection’s “create new” route).
slug:
string
Defined in: packages/react/src/documents/VexDocumentContext.tsx:15
The collection or global slug.
status?
Section titled “status?”
optionalstatus?:"draft"|"published"
Defined in: packages/react/src/documents/VexDocumentContext.tsx:30
The document’s publish status, for a versioned collection or global.
Mirrors core’s VERSION_STATUSES keys (packages/core/src/versions/constants.ts).
Absent when the collection/global isn’t versioned.