a tool for shared writing and social publishing
1import { LexiconDoc } from "@atproto/lexicon";
2import { BlockUnion } from "../blocks";
3
4export const PubLeafletPagesLinearDocument: LexiconDoc = {
5 lexicon: 1,
6 id: "pub.leaflet.pages.linearDocument",
7 defs: {
8 main: {
9 type: "object",
10 properties: {
11 blocks: { type: "array", items: { type: "ref", ref: "#block" } },
12 },
13 },
14 block: {
15 type: "object",
16 required: ["block"],
17 properties: {
18 block: BlockUnion,
19 alignment: {
20 type: "string",
21 knownValues: [
22 "#textAlignLeft",
23 "#textAlignCenter",
24 "#textAlignRight",
25 "#textAlignJustify",
26 ],
27 },
28 },
29 },
30 textAlignLeft: { type: "token" },
31 textAlignCenter: { type: "token" },
32 textAlignRight: { type: "token" },
33 quote: {
34 type: "object",
35 required: ["start", "end"],
36 properties: {
37 start: { type: "ref", ref: "#position" },
38 end: { type: "ref", ref: "#position" },
39 },
40 },
41 position: {
42 type: "object",
43 required: ["block", "offset"],
44 properties: {
45 block: { type: "array", items: { type: "integer" } },
46 offset: { type: "integer" },
47 },
48 },
49 },
50};