Skip to content

@graphty/graphty-element / index / PROJECT_FILE

Variable: PROJECT_FILE ​

const PROJECT_FILE: Readonly<{ extension: ".graphty.json"; mediaType: "application/vnd.graphty+json"; }>

Defined in: graphty-element/src/session/projectFile.ts:1204

How a project file is named and typed: what element.downloadProject() gives the file, and what to hand a save picker (showSaveFilePicker's suggestedName and accept) or a server.

Example ​

typescript
const handle = await showSaveFilePicker({
    suggestedName: projectFileName(session.project.name),
    types: [{ accept: { [PROJECT_FILE.mediaType]: [PROJECT_FILE.extension] } }],
});