a tool for shared writing and social publishing
at feature/analytics 77 lines 2.2 kB view raw
1import { LexiconDoc } from "@atproto/lexicon"; 2import { ColorUnion, PubLeafletThemeBackgroundImage } from "./theme"; 3 4export const PubLeafletPublication: LexiconDoc = { 5 lexicon: 1, 6 id: "pub.leaflet.publication", 7 defs: { 8 main: { 9 type: "record", 10 key: "tid", 11 description: "Record declaring a publication", 12 record: { 13 type: "object", 14 required: ["name"], 15 properties: { 16 name: { type: "string", maxLength: 2000 }, 17 base_path: { type: "string" }, 18 description: { type: "string", maxLength: 2000 }, 19 icon: { type: "blob", accept: ["image/*"], maxSize: 1000000 }, 20 theme: { type: "ref", ref: "#theme" }, 21 preferences: { type: "ref", ref: "#preferences" }, 22 }, 23 }, 24 }, 25 preferences: { 26 type: "object", 27 properties: { 28 showInDiscover: { type: "boolean", default: true }, 29 showComments: { type: "boolean", default: true }, 30 showMentions: { type: "boolean", default: true }, 31 showPrevNext: { type: "boolean", default: true }, 32 showRecommends: { type: "boolean", default: true }, 33 }, 34 }, 35 theme: { 36 type: "object", 37 properties: { 38 backgroundColor: ColorUnion, 39 backgroundImage: { 40 type: "ref", 41 ref: PubLeafletThemeBackgroundImage.id, 42 }, 43 pageWidth: { 44 type: "integer", 45 minimum: 0, 46 maximum: 1600, 47 }, 48 primary: ColorUnion, 49 pageBackground: ColorUnion, 50 showPageBackground: { type: "boolean", default: false }, 51 accentBackground: ColorUnion, 52 accentText: ColorUnion, 53 headingFont: { type: "string", maxLength: 100 }, 54 bodyFont: { type: "string", maxLength: 100 }, 55 }, 56 }, 57 }, 58}; 59 60export const PubLeafletPublicationSubscription: LexiconDoc = { 61 lexicon: 1, 62 id: "pub.leaflet.graph.subscription", 63 defs: { 64 main: { 65 type: "record", 66 key: "tid", 67 description: "Record declaring a subscription to a publication", 68 record: { 69 type: "object", 70 required: ["publication"], 71 properties: { 72 publication: { type: "string", format: "at-uri" }, 73 }, 74 }, 75 }, 76 }, 77};