a tool for shared writing and social publishing
at feature/thread-viewer 67 lines 1.9 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 }, 31 }, 32 theme: { 33 type: "object", 34 properties: { 35 backgroundColor: ColorUnion, 36 backgroundImage: { 37 type: "ref", 38 ref: PubLeafletThemeBackgroundImage.id, 39 }, 40 primary: ColorUnion, 41 pageBackground: ColorUnion, 42 showPageBackground: { type: "boolean", default: false }, 43 accentBackground: ColorUnion, 44 accentText: ColorUnion, 45 }, 46 }, 47 }, 48}; 49 50export const PubLeafletPublicationSubscription: LexiconDoc = { 51 lexicon: 1, 52 id: "pub.leaflet.graph.subscription", 53 defs: { 54 main: { 55 type: "record", 56 key: "tid", 57 description: "Record declaring a subscription to a publication", 58 record: { 59 type: "object", 60 required: ["publication"], 61 properties: { 62 publication: { type: "string", format: "at-uri" }, 63 }, 64 }, 65 }, 66 }, 67};