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 preferences: {
27 type: "ref",
28 ref: "pub.leaflet.publication#preferences",
29 },
30 tags: { type: "array", items: { type: "string", maxLength: 50 } },
31 coverImage: {
32 type: "blob",
33 accept: ["image/png", "image/jpeg", "image/webp"],
34 maxSize: 1000000,
35 },
36 pages: {
37 type: "array",
38 items: {
39 type: "union",
40 refs: [
41 PubLeafletPagesLinearDocument.id,
42 PubLeafletPagesCanvasDocument.id,
43 ],
44 },
45 },
46 },
47 },
48 },
49 },
50};