a tool for shared writing and social publishing
1import { LexiconDoc } from "@atproto/lexicon";
2import { PubLeafletPagesLinearDocument } from "./pages/LinearDocument";
3import { PubLeafletPagesCanvasDocument } from "./pages";
4
5export const PubLeafletDocument: LexiconDoc = {
6 lexicon: 1,
7 id: "pub.leaflet.document",
8 revision: 1,
9 description: "A lexicon for long form rich media documents",
10 defs: {
11 main: {
12 type: "record",
13 key: "tid",
14 description: "Record containing a document",
15 record: {
16 type: "object",
17 required: ["pages", "author", "title"],
18 properties: {
19 title: { type: "string", maxLength: 5000, maxGraphemes: 500 },
20 postRef: { type: "ref", ref: "com.atproto.repo.strongRef" },
21 description: { type: "string", maxLength: 30000, maxGraphemes: 3000 },
22 publishedAt: { type: "string", format: "datetime" },
23 publication: { type: "string", format: "at-uri" },
24 author: { type: "string", format: "at-identifier" },
25 theme: { type: "ref", ref: "pub.leaflet.publication#theme" },
26 tags: { type: "array", items: { type: "string", maxLength: 50 } },
27 coverImage: {
28 type: "blob",
29 accept: ["image/png", "image/jpeg", "image/webp"],
30 maxSize: 1000000,
31 },
32 pages: {
33 type: "array",
34 items: {
35 type: "union",
36 refs: [
37 PubLeafletPagesLinearDocument.id,
38 PubLeafletPagesCanvasDocument.id,
39 ],
40 },
41 },
42 },
43 },
44 },
45 },
46};