atproto blogging
1{
2 "lexicon": 1,
3 "id": "sh.weaver.notebook.theme",
4 "defs": {
5 "main": {
6 "type": "record",
7 "description": "Theme for a notebook",
8 "key": "tid",
9 "record": {
10 "type": "object",
11 "required": ["darkScheme", "lightScheme", "fonts", "spacing", "darkCodeTheme", "lightCodeTheme"],
12 "properties": {
13 "defaultTheme": {
14 "type": "string",
15 "enum": ["light", "dark", "auto"],
16 "default": "auto"
17 },
18 "darkScheme": {
19 "type": "ref",
20 "ref": "com.atproto.repo.strongRef",
21 "description": "Reference to a dark colour scheme"
22 },
23 "lightScheme": {
24 "type": "ref",
25 "ref": "com.atproto.repo.strongRef",
26 "description": "Reference to a light colour scheme"
27 },
28 "fonts": {
29 "type": "object",
30 "required": ["body", "heading", "monospace"],
31 "description": "Fonts to be used in the notebook. Can specify a name or list of names (will load if available) or a file or list of files for each. Empty lists will use site defaults.",
32 "properties": {
33 "body": {
34 "type": "array",
35 "items": {
36 "type": "ref",
37 "ref": "#font"
38 }
39 },
40 "heading": {
41 "type": "array",
42 "items": {
43 "type": "ref",
44 "ref": "#font"
45 }
46 },
47 "monospace": {
48 "type": "array",
49 "items": {
50 "type": "ref",
51 "ref": "#font"
52 }
53 }
54 }
55 },
56 "spacing": {
57 "type": "object",
58 "required": ["baseSize", "lineHeight", "scale"],
59 "properties": {
60 "baseSize": {
61 "type": "string"
62 },
63 "lineHeight": {
64 "type": "string"
65 },
66 "scale": {
67 "type": "string"
68 }
69 }
70 },
71 "darkCodeTheme": {
72 "type": "union",
73 "refs": ["#codeThemeName", "#codeThemeFile"],
74 "description": "Syntax highlighting theme for dark mode"
75 },
76 "lightCodeTheme": {
77 "type": "union",
78 "refs": ["#codeThemeName", "#codeThemeFile"],
79 "description": "Syntax highlighting theme for light mode"
80 }
81 }
82 }
83 },
84 "codeThemeName": {
85 "type": "string"
86 },
87 "codeThemeFile": {
88 "type": "object",
89 "required": ["name", "did", "content"],
90 "description": "Custom syntax highlighting theme file (sublime text/textmate theme format)",
91 "properties": {
92 "name": {
93 "type": "string"
94 },
95 "did": {
96 "type": "string",
97 "format": "did"
98 },
99 "content": {
100 "type": "blob",
101 "accept": ["*/*"],
102 "maxSize": 20000
103 }
104 }
105 },
106 "font": {
107 "type": "object",
108 "required": ["value"],
109 "properties": {
110 "value": {
111 "type": "union",
112 "refs": ["#fontName", "#fontFile"],
113 "description": "Font for a notebook"
114 }
115 }
116 },
117 "fontName": {
118 "type": "string"
119 },
120 "fontFile": {
121 "type": "object",
122 "required": ["name", "did", "content"],
123 "description": "Custom woff(2) or ttf font file",
124 "properties": {
125 "name": {
126 "type": "string"
127 },
128 "did": {
129 "type": "string",
130 "format": "did"
131 },
132 "content": {
133 "type": "blob",
134 "accept": ["*/*"],
135 "maxSize": 20000
136 }
137 }
138 }
139 }
140}