bookish-press 0.4.1 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (403) hide show
  1. package/README.md +3 -1
  2. package/components/Auth.svelte +27 -24
  3. package/components/Auth.svelte.d.ts +4 -4
  4. package/components/Authentication.d.ts +2 -2
  5. package/components/BookPreview.svelte +75 -59
  6. package/components/BookPreview.svelte.d.ts +5 -5
  7. package/components/External.svelte +1 -1
  8. package/components/External.svelte.d.ts +3 -3
  9. package/components/Link.svelte +49 -3
  10. package/components/Link.svelte.d.ts +3 -4
  11. package/components/app/BookList.svelte +19 -0
  12. package/components/app/BookList.svelte.d.ts +18 -0
  13. package/components/app/Button.svelte +49 -0
  14. package/components/app/Button.svelte.d.ts +22 -0
  15. package/components/app/Feedback.svelte +47 -0
  16. package/components/app/Feedback.svelte.d.ts +18 -0
  17. package/components/app/Head.svelte +15 -0
  18. package/components/app/Head.svelte.d.ts +18 -0
  19. package/components/app/Large.svelte +8 -0
  20. package/components/app/Large.svelte.d.ts +27 -0
  21. package/components/app/Lead.svelte +12 -0
  22. package/components/app/Lead.svelte.d.ts +27 -0
  23. package/components/app/Link.svelte +24 -0
  24. package/components/app/Link.svelte.d.ts +20 -0
  25. package/components/app/Options.svelte +24 -0
  26. package/components/app/Options.svelte.d.ts +19 -0
  27. package/components/app/Paragraph.svelte +20 -0
  28. package/components/app/Paragraph.svelte.d.ts +18 -0
  29. package/components/app/Section.svelte +12 -0
  30. package/components/app/Section.svelte.d.ts +27 -0
  31. package/components/app/Table.svelte +32 -0
  32. package/components/app/Table.svelte.d.ts +27 -0
  33. package/components/app/TextInput.svelte +38 -0
  34. package/components/app/TextInput.svelte.d.ts +22 -0
  35. package/components/chapter/Atom.svelte +20 -6
  36. package/components/chapter/Atom.svelte.d.ts +3 -3
  37. package/components/chapter/Block.svelte +26 -21
  38. package/components/chapter/Block.svelte.d.ts +4 -4
  39. package/components/chapter/Callout.svelte +38 -7
  40. package/components/chapter/Callout.svelte.d.ts +4 -4
  41. package/components/chapter/CaptionedCode.svelte +67 -24
  42. package/components/chapter/CaptionedCode.svelte.d.ts +4 -4
  43. package/components/chapter/ChapterBody.svelte +62 -9
  44. package/components/chapter/ChapterBody.svelte.d.ts +5 -4
  45. package/components/chapter/Citations.svelte +86 -20
  46. package/components/chapter/Citations.svelte.d.ts +4 -4
  47. package/components/chapter/Code.svelte +152 -21
  48. package/components/chapter/Code.svelte.d.ts +3 -3
  49. package/components/chapter/Comment.svelte +39 -17
  50. package/components/chapter/Comment.svelte.d.ts +3 -3
  51. package/components/chapter/Definition.svelte +52 -18
  52. package/components/chapter/Definition.svelte.d.ts +5 -8
  53. package/components/chapter/Embed.svelte +155 -67
  54. package/components/chapter/Embed.svelte.d.ts +6 -4
  55. package/components/chapter/ErrorMessage.svelte +7 -2
  56. package/components/chapter/ErrorMessage.svelte.d.ts +4 -4
  57. package/components/chapter/ExtendedPrism.d.ts +2 -0
  58. package/components/chapter/ExtendedPrism.js +69 -0
  59. package/components/chapter/Figure.svelte +90 -0
  60. package/components/chapter/Figure.svelte.d.ts +24 -0
  61. package/components/chapter/Footnote.svelte +75 -12
  62. package/components/chapter/Footnote.svelte.d.ts +4 -4
  63. package/components/chapter/Format.svelte +63 -38
  64. package/components/chapter/Format.svelte.d.ts +5 -4
  65. package/components/chapter/InlineCode.svelte +16 -6
  66. package/components/chapter/InlineCode.svelte.d.ts +4 -4
  67. package/components/chapter/Label.svelte +38 -9
  68. package/components/chapter/Label.svelte.d.ts +4 -4
  69. package/components/chapter/Link.svelte +24 -19
  70. package/components/chapter/Link.svelte.d.ts +4 -4
  71. package/components/chapter/List.svelte +75 -8
  72. package/components/chapter/List.svelte.d.ts +4 -4
  73. package/components/chapter/Marginal.svelte +169 -27
  74. package/components/chapter/Marginal.svelte.d.ts +6 -3
  75. package/components/chapter/Paragraph.svelte +79 -6
  76. package/components/chapter/Paragraph.svelte.d.ts +4 -4
  77. package/components/chapter/Positioned.svelte +33 -0
  78. package/components/chapter/Positioned.svelte.d.ts +19 -0
  79. package/components/chapter/Problem.svelte +15 -0
  80. package/components/chapter/Problem.svelte.d.ts +27 -0
  81. package/components/chapter/Python.svelte +68 -21
  82. package/components/chapter/Python.svelte.d.ts +4 -4
  83. package/components/chapter/Quote.svelte +64 -11
  84. package/components/chapter/Quote.svelte.d.ts +4 -4
  85. package/components/chapter/Rule.svelte +12 -1
  86. package/components/chapter/Rule.svelte.d.ts +4 -4
  87. package/components/chapter/Table.svelte +36 -25
  88. package/components/chapter/Table.svelte.d.ts +4 -4
  89. package/components/chapter/Text.svelte +61 -36
  90. package/components/chapter/Text.svelte.d.ts +5 -4
  91. package/components/editor/BookishEditor.svelte +373 -244
  92. package/components/editor/BookishEditor.svelte.d.ts +9 -6
  93. package/components/editor/CalloutEditor.svelte +5 -5
  94. package/components/editor/CalloutEditor.svelte.d.ts +4 -4
  95. package/components/editor/CaptionedCodeEditor.svelte +16 -12
  96. package/components/editor/CaptionedCodeEditor.svelte.d.ts +4 -4
  97. package/components/editor/CaretContext.d.ts +48 -16
  98. package/components/editor/CaretState.d.ts +16 -44
  99. package/components/editor/CaretUtilities.d.ts +2 -2
  100. package/components/editor/CaretView.svelte +82 -0
  101. package/components/editor/CaretView.svelte.d.ts +25 -0
  102. package/components/editor/CitationsEditor.svelte +36 -25
  103. package/components/editor/CitationsEditor.svelte.d.ts +4 -4
  104. package/components/editor/Clipboard.d.ts +2 -2
  105. package/components/editor/Command.d.ts +13 -12
  106. package/components/editor/Commands.d.ts +1 -1
  107. package/components/editor/Commands.js +1114 -571
  108. package/components/editor/ConfirmButton.svelte +18 -12
  109. package/components/editor/ConfirmButton.svelte.d.ts +5 -4
  110. package/components/editor/DefinitionEditor.svelte +29 -21
  111. package/components/editor/DefinitionEditor.svelte.d.ts +4 -4
  112. package/components/editor/EmbedEditor.svelte +93 -43
  113. package/components/editor/EmbedEditor.svelte.d.ts +3 -3
  114. package/components/editor/Icon.svelte +17 -0
  115. package/components/editor/Icon.svelte.d.ts +16 -0
  116. package/components/editor/ImageChooser.svelte +53 -34
  117. package/components/editor/ImageChooser.svelte.d.ts +3 -3
  118. package/components/editor/InlineCodeEditor.svelte +7 -4
  119. package/components/editor/InlineCodeEditor.svelte.d.ts +4 -4
  120. package/components/editor/LabelEditor.svelte +20 -11
  121. package/components/editor/LabelEditor.svelte.d.ts +4 -4
  122. package/components/editor/LanguageEditor.svelte +10 -7
  123. package/components/editor/LanguageEditor.svelte.d.ts +3 -3
  124. package/components/editor/LinkEditor.svelte +64 -39
  125. package/components/editor/LinkEditor.svelte.d.ts +4 -4
  126. package/components/editor/Note.svelte +4 -3
  127. package/components/editor/Note.svelte.d.ts +6 -2
  128. package/components/editor/Permissions.svelte +95 -0
  129. package/components/editor/Permissions.svelte.d.ts +20 -0
  130. package/components/editor/PositionEditor.svelte +9 -6
  131. package/components/editor/PositionEditor.svelte.d.ts +4 -4
  132. package/components/editor/QuoteEditor.svelte +7 -2
  133. package/components/editor/QuoteEditor.svelte.d.ts +4 -4
  134. package/components/editor/Switch.svelte +55 -28
  135. package/components/editor/Switch.svelte.d.ts +4 -4
  136. package/components/editor/TableEditor.svelte +10 -0
  137. package/components/editor/TableEditor.svelte.d.ts +17 -0
  138. package/components/editor/TextEditor.svelte +83 -45
  139. package/components/editor/TextEditor.svelte.d.ts +5 -4
  140. package/components/editor/Toggle.svelte +11 -8
  141. package/components/editor/Toggle.svelte.d.ts +4 -4
  142. package/components/editor/Toolbar.svelte +191 -144
  143. package/components/editor/Toolbar.svelte.d.ts +5 -8
  144. package/components/editor/ToolbarGroup.svelte +17 -23
  145. package/components/editor/ToolbarGroup.svelte.d.ts +3 -4
  146. package/components/editor/ToolbarSpacer.svelte +8 -1
  147. package/components/editor/ToolbarSpacer.svelte.d.ts +6 -2
  148. package/components/editor/URLEditor.svelte +6 -8
  149. package/components/editor/URLEditor.svelte.d.ts +3 -3
  150. package/components/editor/UndoState.d.ts +3 -3
  151. package/components/editor/icons/annotate.svg +1 -0
  152. package/components/editor/icons/block.svg +1 -0
  153. package/components/editor/icons/bold.svg +1 -0
  154. package/components/editor/icons/bullets.svg +1 -0
  155. package/components/editor/icons/callout.svg +1 -0
  156. package/components/editor/icons/citation.svg +8 -0
  157. package/components/editor/icons/clear.svg +1 -0
  158. package/components/editor/icons/clipboard.svg +1 -0
  159. package/components/editor/icons/code.svg +1 -0
  160. package/components/editor/icons/columnafter.svg +1 -0
  161. package/components/editor/icons/columnbefore.svg +1 -0
  162. package/components/editor/icons/comment.svg +1 -0
  163. package/components/editor/icons/copy.svg +1 -0
  164. package/components/editor/icons/cut.svg +1 -0
  165. package/components/editor/icons/define.svg +7 -0
  166. package/components/editor/icons/deletecolumn.svg +1 -0
  167. package/components/editor/icons/deleterow.svg +1 -0
  168. package/components/editor/icons/footnote.svg +8 -0
  169. package/components/editor/icons/header1.svg +7 -0
  170. package/components/editor/icons/header2.svg +7 -0
  171. package/components/editor/icons/header3.svg +7 -0
  172. package/components/editor/icons/home.svg +1 -0
  173. package/components/editor/icons/indent.svg +1 -0
  174. package/components/editor/icons/italic.svg +1 -0
  175. package/components/editor/icons/label.svg +1 -0
  176. package/components/editor/icons/left.svg +1 -0
  177. package/components/editor/icons/level.svg +1 -0
  178. package/components/editor/icons/link.svg +1 -0
  179. package/components/editor/icons/list.svg +1 -0
  180. package/components/editor/icons/media.svg +1 -0
  181. package/components/editor/icons/middle.svg +1 -0
  182. package/components/editor/icons/numbers.svg +10 -0
  183. package/components/editor/icons/paragraph.svg +1 -0
  184. package/components/editor/icons/paste.svg +10 -0
  185. package/components/editor/icons/quote.svg +1 -0
  186. package/components/editor/icons/redo.svg +1 -0
  187. package/components/editor/icons/right.svg +1 -0
  188. package/components/editor/icons/rowabove.svg +1 -0
  189. package/components/editor/icons/rowbelow.svg +1 -0
  190. package/components/editor/icons/rule.svg +1 -0
  191. package/components/editor/icons/sub.svg +1 -0
  192. package/components/editor/icons/super.svg +1 -0
  193. package/components/editor/icons/table.svg +1 -0
  194. package/components/editor/icons/text.svg +1 -0
  195. package/components/editor/icons/time.svg +1 -0
  196. package/components/editor/icons/undo.svg +1 -0
  197. package/components/editor/icons/unindent.svg +1 -0
  198. package/components/editor/icons/unlink.svg +1 -0
  199. package/components/page/Acknowledgements.svelte +35 -24
  200. package/components/page/Acknowledgements.svelte.d.ts +4 -4
  201. package/components/page/Authors.svelte +34 -17
  202. package/components/page/Authors.svelte.d.ts +7 -6
  203. package/components/page/BookLoader.svelte +59 -0
  204. package/components/page/BookLoader.svelte.d.ts +16 -0
  205. package/components/page/BulkReferenceEditor.svelte +54 -23
  206. package/components/page/BulkReferenceEditor.svelte.d.ts +4 -4
  207. package/components/page/Chapter.svelte +234 -143
  208. package/components/page/Chapter.svelte.d.ts +3 -3
  209. package/components/page/ChapterContext.d.ts +4 -4
  210. package/components/page/ChapterNumber.svelte +9 -0
  211. package/components/page/ChapterNumber.svelte.d.ts +27 -0
  212. package/components/page/ChapterTitle.svelte +16 -0
  213. package/components/page/ChapterTitle.svelte.d.ts +18 -0
  214. package/components/page/Contexts.d.ts +42 -22
  215. package/components/page/Contexts.js +129 -17
  216. package/components/page/DefinitionView.svelte +129 -90
  217. package/components/page/DefinitionView.svelte.d.ts +3 -3
  218. package/components/page/Description.svelte +31 -19
  219. package/components/page/Description.svelte.d.ts +4 -4
  220. package/components/page/Edition.svelte +135 -81
  221. package/components/page/Edition.svelte.d.ts +5 -6
  222. package/components/page/EditionLoader.svelte +99 -0
  223. package/components/page/EditionLoader.svelte.d.ts +18 -0
  224. package/components/page/Editions.svelte +106 -0
  225. package/components/page/Editions.svelte.d.ts +14 -0
  226. package/components/page/Glossary.svelte +65 -49
  227. package/components/page/Glossary.svelte.d.ts +4 -4
  228. package/components/page/Header.svelte +143 -56
  229. package/components/page/Header.svelte.d.ts +8 -6
  230. package/components/page/Index.svelte +116 -80
  231. package/components/page/Index.svelte.d.ts +4 -4
  232. package/components/page/Instructions.svelte +18 -17
  233. package/components/page/Instructions.svelte.d.ts +6 -4
  234. package/components/page/License.svelte +39 -23
  235. package/components/page/License.svelte.d.ts +4 -4
  236. package/components/page/Loading.svelte +102 -12
  237. package/components/page/Loading.svelte.d.ts +6 -2
  238. package/components/page/Media.svelte +81 -53
  239. package/components/page/Media.svelte.d.ts +4 -4
  240. package/components/page/MediaPreview.svelte +26 -8
  241. package/components/page/MediaPreview.svelte.d.ts +3 -3
  242. package/components/page/Muted.svelte +10 -0
  243. package/components/page/Muted.svelte.d.ts +27 -0
  244. package/components/page/Outline.svelte +279 -59
  245. package/components/page/Outline.svelte.d.ts +3 -3
  246. package/components/page/Page.svelte +40 -9
  247. package/components/page/Page.svelte.d.ts +3 -3
  248. package/components/page/PageHeader.svelte +14 -0
  249. package/components/page/PageHeader.svelte.d.ts +18 -0
  250. package/components/page/PageParagraph.svelte +18 -0
  251. package/components/page/PageParagraph.svelte.d.ts +27 -0
  252. package/components/page/PossibleChapter.svelte +7 -7
  253. package/components/page/PossibleChapter.svelte.d.ts +4 -4
  254. package/components/page/PossibleReference.svelte +6 -11
  255. package/components/page/PossibleReference.svelte.d.ts +6 -7
  256. package/components/page/Print.svelte +27 -3
  257. package/components/page/Print.svelte.d.ts +4 -4
  258. package/components/page/Publish.svelte +134 -0
  259. package/components/page/Publish.svelte.d.ts +14 -0
  260. package/components/page/Reference.svelte +259 -117
  261. package/components/page/Reference.svelte.d.ts +5 -5
  262. package/components/page/References.svelte +45 -48
  263. package/components/page/References.svelte.d.ts +4 -4
  264. package/components/page/Rows.svelte +54 -0
  265. package/components/page/Rows.svelte.d.ts +27 -0
  266. package/components/page/Search.svelte +88 -63
  267. package/components/page/Search.svelte.d.ts +4 -4
  268. package/components/page/Status.svelte +46 -39
  269. package/components/page/Status.svelte.d.ts +4 -9
  270. package/components/page/SubdomainEditor.svelte +41 -27
  271. package/components/page/SubdomainEditor.svelte.d.ts +4 -4
  272. package/components/page/TableOfContents.svelte +264 -191
  273. package/components/page/TableOfContents.svelte.d.ts +4 -4
  274. package/components/page/TableOfContentsImage.svelte +8 -8
  275. package/components/page/TableOfContentsImage.svelte.d.ts +3 -3
  276. package/components/page/TableOfContentsRow.svelte +97 -34
  277. package/components/page/TableOfContentsRow.svelte.d.ts +4 -4
  278. package/components/page/ThemeEditor.svelte +177 -39
  279. package/components/page/ThemeEditor.svelte.d.ts +4 -4
  280. package/components/page/ThemeEditorPreview.svelte +35 -23
  281. package/components/page/ThemeEditorPreview.svelte.d.ts +5 -5
  282. package/components/page/ThemeSetEditor.svelte +15 -13
  283. package/components/page/ThemeSetEditor.svelte.d.ts +4 -4
  284. package/components/page/ThemeVariableEditor.svelte +24 -15
  285. package/components/page/ThemeVariableEditor.svelte.d.ts +3 -3
  286. package/components/page/Title.svelte +12 -0
  287. package/components/page/Title.svelte.d.ts +27 -0
  288. package/components/page/Unknown.svelte +28 -21
  289. package/components/page/Unknown.svelte.d.ts +4 -4
  290. package/components/page/margins.js +50 -33
  291. package/index.d.ts +13 -0
  292. package/index.js +14 -0
  293. package/models/CRUD.d.ts +27 -0
  294. package/models/CRUD.js +262 -0
  295. package/models/Firebase.d.ts +1 -0
  296. package/models/Firebase.js +26 -16
  297. package/models/book/Book.d.ts +40 -39
  298. package/models/book/Book.js +121 -121
  299. package/models/book/BookMedia.d.ts +3 -3
  300. package/models/book/BookMedia.js +22 -16
  301. package/models/book/BookSaveStatus.d.ts +7 -0
  302. package/models/book/BookSaveStatus.js +8 -0
  303. package/models/book/Chapter.d.ts +50 -39
  304. package/models/book/Chapter.js +189 -198
  305. package/models/book/ChapterID.js +7 -7
  306. package/models/book/Definition.d.ts +1 -1
  307. package/models/book/Edition.d.ts +87 -61
  308. package/models/book/Edition.js +460 -309
  309. package/models/book/Reference.d.ts +24 -0
  310. package/models/book/Reference.js +78 -0
  311. package/models/book/Schema.d.ts +168 -0
  312. package/models/book/Schema.js +115 -0
  313. package/models/book/Theme.d.ts +44 -37
  314. package/models/book/Theme.js +452 -52
  315. package/models/book/ThemeColors.d.ts +1 -1
  316. package/models/book/Words.d.ts +2 -0
  317. package/models/book/Words.js +110 -0
  318. package/models/chapter/AtomNode.d.ts +4 -4
  319. package/models/chapter/AtomNode.js +20 -13
  320. package/models/chapter/BlockNode.d.ts +9 -10
  321. package/models/chapter/BlockNode.js +32 -13
  322. package/models/chapter/BlocksNode.d.ts +10 -10
  323. package/models/chapter/BlocksNode.js +315 -120
  324. package/models/chapter/BlocksNode.test.js +494 -228
  325. package/models/chapter/Bookkeeping.d.ts +1 -1
  326. package/models/chapter/CalloutNode.d.ts +3 -3
  327. package/models/chapter/CalloutNode.js +34 -12
  328. package/models/chapter/Caret.d.ts +9 -7
  329. package/models/chapter/Caret.js +11 -6
  330. package/models/chapter/ChapterNode.d.ts +11 -11
  331. package/models/chapter/ChapterNode.js +70 -33
  332. package/models/chapter/CitationsNode.d.ts +3 -3
  333. package/models/chapter/CitationsNode.js +31 -12
  334. package/models/chapter/CodeNode.d.ts +11 -6
  335. package/models/chapter/CodeNode.js +143 -34
  336. package/models/chapter/CommentNode.d.ts +5 -5
  337. package/models/chapter/CommentNode.js +29 -13
  338. package/models/chapter/DefinitionNode.d.ts +2 -2
  339. package/models/chapter/DefinitionNode.js +15 -7
  340. package/models/chapter/Edit.d.ts +3 -3
  341. package/models/chapter/EmbedNode.d.ts +9 -5
  342. package/models/chapter/EmbedNode.js +108 -35
  343. package/models/chapter/ErrorNode.d.ts +2 -2
  344. package/models/chapter/ErrorNode.js +34 -12
  345. package/models/chapter/FootnoteNode.d.ts +5 -5
  346. package/models/chapter/FootnoteNode.js +34 -16
  347. package/models/chapter/FormatNode.d.ts +10 -10
  348. package/models/chapter/FormatNode.js +237 -106
  349. package/models/chapter/FormatNode.test.js +87 -45
  350. package/models/chapter/InlineCodeNode.d.ts +2 -2
  351. package/models/chapter/InlineCodeNode.js +22 -9
  352. package/models/chapter/LabelNode.d.ts +4 -4
  353. package/models/chapter/LabelNode.js +31 -13
  354. package/models/chapter/LinkNode.d.ts +2 -2
  355. package/models/chapter/LinkNode.js +21 -9
  356. package/models/chapter/ListNode.d.ts +8 -8
  357. package/models/chapter/ListNode.js +99 -38
  358. package/models/chapter/ListNode.test.js +29 -24
  359. package/models/chapter/MetadataNode.d.ts +3 -3
  360. package/models/chapter/MetadataNode.js +13 -5
  361. package/models/chapter/Node.d.ts +5 -3
  362. package/models/chapter/Node.js +76 -29
  363. package/models/chapter/Node.test.js +20 -18
  364. package/models/chapter/ParagraphNode.d.ts +6 -6
  365. package/models/chapter/ParagraphNode.js +84 -29
  366. package/models/chapter/ParagraphNode.test.js +22 -13
  367. package/models/chapter/Parser.d.ts +27 -27
  368. package/models/chapter/Parser.js +220 -206
  369. package/models/chapter/Parser.test.js +16 -16
  370. package/models/chapter/Position.d.ts +1 -1
  371. package/models/chapter/QuoteNode.d.ts +6 -6
  372. package/models/chapter/QuoteNode.js +61 -23
  373. package/models/chapter/RootNode.d.ts +4 -4
  374. package/models/chapter/RuleNode.d.ts +2 -2
  375. package/models/chapter/RuleNode.js +31 -11
  376. package/models/chapter/TableNode.d.ts +8 -6
  377. package/models/chapter/TableNode.js +89 -34
  378. package/models/chapter/TableNode.test.js +22 -24
  379. package/models/chapter/TextNode.d.ts +6 -6
  380. package/models/chapter/TextNode.js +72 -32
  381. package/models/chapter/TextNode.test.js +4 -4
  382. package/package.json +108 -26
  383. package/util/getSubdomain.js +8 -6
  384. package/util/isMobile.js +1 -1
  385. package/util/mineReference.d.ts +3 -2
  386. package/util/mineReference.js +67 -29
  387. package/util/scrollToEyeLevel.js +6 -1
  388. package/components/chapter/renderPosition.d.ts +0 -3
  389. package/components/chapter/renderPosition.js +0 -4
  390. package/components/editor/ToolbarIcon.svelte +0 -22
  391. package/components/editor/ToolbarIcon.svelte.d.ts +0 -16
  392. package/components/page/Alert.svelte +0 -11
  393. package/components/page/Alert.svelte.d.ts +0 -23
  394. package/components/page/Revisions.svelte +0 -124
  395. package/components/page/Revisions.svelte.d.ts +0 -14
  396. package/models/BookLoader.d.ts +0 -2
  397. package/models/BookLoader.js +0 -67
  398. package/models/Firestore.d.ts +0 -22
  399. package/models/Firestore.js +0 -194
  400. package/models/chapter/ReferenceNode.d.ts +0 -29
  401. package/models/chapter/ReferenceNode.js +0 -48
  402. package/models/loadEdition.d.ts +0 -5
  403. package/models/loadEdition.js +0 -16
@@ -0,0 +1,24 @@
1
+ export default class Reference {
2
+ readonly citationID: string;
3
+ readonly authors: string;
4
+ readonly year: string;
5
+ readonly title: string;
6
+ readonly source: string;
7
+ readonly url: string;
8
+ readonly summary: string;
9
+ readonly short: boolean;
10
+ constructor(citationID: string, authors?: string, year?: string, title?: string, source?: string, url?: string, summary?: string, short?: boolean);
11
+ toText(): string;
12
+ toList(): string[];
13
+ copy(): this;
14
+ withChildReplaced(): undefined;
15
+ withContentInRange(): this | undefined;
16
+ withCitationID(id: string): Reference;
17
+ withAuthors(authors: string): Reference;
18
+ withYear(year: string): Reference;
19
+ withTitle(title: string): Reference;
20
+ withSource(source: string): Reference;
21
+ withURL(url: string): Reference;
22
+ withSummary(summary: string): Reference;
23
+ equals(ref: Reference): boolean;
24
+ }
@@ -0,0 +1,78 @@
1
+ export default class Reference {
2
+ citationID;
3
+ authors;
4
+ year;
5
+ title;
6
+ source;
7
+ url;
8
+ summary;
9
+ short;
10
+ constructor(citationID, authors = '', year = '', title = '', source = '', url = '', summary = '', short = false) {
11
+ this.citationID = citationID;
12
+ this.authors = authors;
13
+ this.year = year;
14
+ this.title = title;
15
+ this.source = source;
16
+ this.url = url;
17
+ this.summary = summary;
18
+ this.short = short;
19
+ }
20
+ toText() {
21
+ return (this.authors +
22
+ ' ' +
23
+ this.year +
24
+ ' ' +
25
+ this.title +
26
+ ' ' +
27
+ this.source +
28
+ (this.summary ? this.summary : ''));
29
+ }
30
+ toList() {
31
+ return [
32
+ this.authors,
33
+ this.year,
34
+ this.title,
35
+ this.source,
36
+ this.url,
37
+ this.summary,
38
+ ];
39
+ }
40
+ copy() {
41
+ return new Reference(this.citationID, this.authors, this.year, this.title, this.source, this.url, this.summary, this.short);
42
+ }
43
+ withChildReplaced() {
44
+ return undefined;
45
+ }
46
+ withContentInRange() {
47
+ return this.copy();
48
+ }
49
+ withCitationID(id) {
50
+ return new Reference(id, this.authors, this.year, this.title, this.source, this.url, this.summary, this.short);
51
+ }
52
+ withAuthors(authors) {
53
+ return new Reference(this.citationID, authors, this.year, this.title, this.source, this.url, this.summary, this.short);
54
+ }
55
+ withYear(year) {
56
+ return new Reference(this.citationID, this.authors, year, this.title, this.source, this.url, this.summary, this.short);
57
+ }
58
+ withTitle(title) {
59
+ return new Reference(this.citationID, this.authors, this.year, title, this.source, this.url, this.summary, this.short);
60
+ }
61
+ withSource(source) {
62
+ return new Reference(this.citationID, this.authors, this.year, this.title, source, this.url, this.summary, this.short);
63
+ }
64
+ withURL(url) {
65
+ return new Reference(this.citationID, this.authors, this.year, this.title, this.source, url, this.summary, this.short);
66
+ }
67
+ withSummary(summary) {
68
+ return new Reference(this.citationID, this.authors, this.year, this.title, this.source, this.url, summary, this.short);
69
+ }
70
+ equals(ref) {
71
+ return (this.authors === ref.authors &&
72
+ this.year === ref.year &&
73
+ this.title === ref.title &&
74
+ this.source === ref.source &&
75
+ this.summary == ref.summary &&
76
+ this.short === ref.short);
77
+ }
78
+ }
@@ -0,0 +1,168 @@
1
+ declare const Schema: {
2
+ $schema: string;
3
+ title: string;
4
+ type: string;
5
+ definitions: {
6
+ embed: {
7
+ type: string[];
8
+ pattern: string;
9
+ };
10
+ };
11
+ required: string[];
12
+ additionalProperties: boolean;
13
+ properties: {
14
+ title: {
15
+ type: string;
16
+ };
17
+ number: {
18
+ type: string;
19
+ };
20
+ summary: {
21
+ type: string;
22
+ };
23
+ published: {
24
+ type: string[];
25
+ };
26
+ authors: {
27
+ type: string;
28
+ items: {
29
+ type: string;
30
+ };
31
+ };
32
+ images: {
33
+ type: string;
34
+ properties: {
35
+ cover: {
36
+ $ref: string;
37
+ };
38
+ unknown: {
39
+ $ref: string;
40
+ };
41
+ index: {
42
+ $ref: string;
43
+ };
44
+ references: {
45
+ $ref: string;
46
+ };
47
+ glossary: {
48
+ $ref: string;
49
+ };
50
+ search: {
51
+ $ref: string;
52
+ };
53
+ };
54
+ };
55
+ description: {
56
+ type: string;
57
+ };
58
+ acknowledgements: {
59
+ type: string;
60
+ };
61
+ chapters: {
62
+ type: string;
63
+ items: {
64
+ type: string;
65
+ required: string[];
66
+ properties: {
67
+ id: {
68
+ type: string;
69
+ pattern: string;
70
+ };
71
+ title: {
72
+ type: string;
73
+ };
74
+ image: {
75
+ $ref: string;
76
+ };
77
+ numbered: {
78
+ type: string;
79
+ default: string;
80
+ };
81
+ section: {
82
+ type: string;
83
+ };
84
+ authors: {
85
+ type: string;
86
+ items: {
87
+ type: string;
88
+ };
89
+ };
90
+ forthcoming: {
91
+ type: string;
92
+ };
93
+ };
94
+ };
95
+ };
96
+ tags: {
97
+ type: string;
98
+ items: {
99
+ type: string;
100
+ };
101
+ };
102
+ license: {
103
+ type: string;
104
+ };
105
+ sources: {
106
+ type: string;
107
+ additionalProperties: {
108
+ type: string;
109
+ };
110
+ };
111
+ references: {
112
+ type: string;
113
+ additionalProperties: {
114
+ oneOf: ({
115
+ type: string;
116
+ minItems?: undefined;
117
+ items?: undefined;
118
+ additionalItems?: undefined;
119
+ } | {
120
+ type: string;
121
+ minItems: number;
122
+ items: ({
123
+ type: string;
124
+ format?: undefined;
125
+ } | {
126
+ type: string[];
127
+ format: string;
128
+ })[];
129
+ additionalItems: {
130
+ type: string;
131
+ };
132
+ })[];
133
+ };
134
+ };
135
+ symbols: {
136
+ type: string;
137
+ additionalProperties: {
138
+ type: string;
139
+ };
140
+ };
141
+ glossary: {
142
+ type: string;
143
+ additionalProperties: {
144
+ type: string;
145
+ properties: {
146
+ phrase: {
147
+ type: string;
148
+ };
149
+ definition: {
150
+ type: string;
151
+ };
152
+ synonyms: {
153
+ type: string;
154
+ items: {
155
+ type: string;
156
+ };
157
+ };
158
+ };
159
+ additionalProperties: boolean;
160
+ required: string[];
161
+ };
162
+ };
163
+ theme: {
164
+ type: string[];
165
+ };
166
+ };
167
+ };
168
+ export default Schema;
@@ -0,0 +1,115 @@
1
+ const Schema = {
2
+ $schema: 'http://json-schema.org/draft-07/schema#',
3
+ title: 'Bookish book schema',
4
+ type: 'object',
5
+ definitions: {
6
+ embed: {
7
+ type: ['string', 'null'],
8
+ pattern: '^\\|.+\\|.+\\|.+\\|.+\\|$',
9
+ },
10
+ },
11
+ required: [
12
+ 'title',
13
+ 'number',
14
+ 'summary',
15
+ 'published',
16
+ 'authors',
17
+ 'images',
18
+ 'description',
19
+ 'license',
20
+ 'acknowledgements',
21
+ 'tags',
22
+ 'sources',
23
+ 'references',
24
+ 'chapters',
25
+ 'symbols',
26
+ 'theme',
27
+ ],
28
+ additionalProperties: false,
29
+ properties: {
30
+ title: { type: 'string' },
31
+ number: { type: 'number' },
32
+ summary: { type: 'string' },
33
+ published: { type: ['number', 'null'] },
34
+ authors: {
35
+ type: 'array',
36
+ items: { type: 'string' },
37
+ },
38
+ images: {
39
+ type: 'object',
40
+ properties: {
41
+ cover: { $ref: '#/definitions/embed' },
42
+ unknown: { $ref: '#/definitions/embed' },
43
+ index: { $ref: '#/definitions/embed' },
44
+ references: { $ref: '#/definitions/embed' },
45
+ glossary: { $ref: '#/definitions/embed' },
46
+ search: { $ref: '#/definitions/embed' },
47
+ },
48
+ },
49
+ description: { type: 'string' },
50
+ acknowledgements: { type: 'string' },
51
+ chapters: {
52
+ type: 'array',
53
+ items: {
54
+ type: 'object',
55
+ required: ['id', 'title', 'image'],
56
+ properties: {
57
+ id: { type: 'string', pattern: '^[a-zA-Z0-9]+$' },
58
+ title: { type: 'string' },
59
+ image: { $ref: '#/definitions/embed' },
60
+ numbered: { type: 'boolean', default: 'True by default' },
61
+ section: { type: 'string' },
62
+ authors: { type: 'array', items: { type: 'string' } },
63
+ forthcoming: { type: 'boolean' },
64
+ },
65
+ },
66
+ },
67
+ tags: {
68
+ type: 'array',
69
+ items: { type: 'string' },
70
+ },
71
+ license: { type: 'string' },
72
+ sources: { type: 'object', additionalProperties: { type: 'string' } },
73
+ references: {
74
+ type: 'object',
75
+ additionalProperties: {
76
+ oneOf: [
77
+ { type: 'string' },
78
+ {
79
+ type: 'array',
80
+ minItems: 5,
81
+ items: [
82
+ { type: 'string' },
83
+ { type: 'integer' },
84
+ { type: 'string' },
85
+ { type: 'string' },
86
+ { type: ['string', 'null'], format: 'uri' },
87
+ ],
88
+ additionalItems: { type: 'string' },
89
+ },
90
+ ],
91
+ },
92
+ },
93
+ symbols: {
94
+ type: 'object',
95
+ additionalProperties: { type: 'string' },
96
+ },
97
+ glossary: {
98
+ type: 'object',
99
+ additionalProperties: {
100
+ type: 'object',
101
+ properties: {
102
+ phrase: { type: 'string' },
103
+ definition: { type: 'string' },
104
+ synonyms: { type: 'array', items: { type: 'string' } },
105
+ },
106
+ additionalProperties: false,
107
+ required: ['phrase', 'definition'],
108
+ },
109
+ },
110
+ theme: {
111
+ type: ['object', 'null'],
112
+ },
113
+ },
114
+ };
115
+ export default Schema;
@@ -1,44 +1,47 @@
1
- import type ThemeColors from "./ThemeColors";
2
- declare type Theme = {
3
- light: ThemeColors;
4
- dark: ThemeColors;
5
- fonts: {
6
- paragraphFontFamily: string;
7
- headerFontFamily: string;
8
- codeFontFamily: string;
9
- bulletFontFamily: string;
1
+ import type ThemeColors from './ThemeColors';
2
+ type Theme = {
3
+ imports?: string[];
4
+ light?: ThemeColors;
5
+ dark?: ThemeColors;
6
+ fonts?: {
7
+ paragraphFontFamily?: string;
8
+ headerFontFamily?: string;
9
+ codeFontFamily?: string;
10
+ bulletFontFamily?: string;
10
11
  };
11
- sizes: {
12
- paragraphFontSize: string;
13
- blockFontSize: string;
14
- smallFontSize: string;
15
- titleFontSize: string;
16
- header1FontSize: string;
17
- header2FontSize: string;
18
- header3FontSize: string;
19
- codeFontSize: string;
12
+ sizes?: {
13
+ paragraphFontSize?: string;
14
+ blockFontSize?: string;
15
+ smallFontSize?: string;
16
+ titleFontSize?: string;
17
+ header1FontSize?: string;
18
+ header2FontSize?: string;
19
+ header3FontSize?: string;
20
+ codeFontSize?: string;
20
21
  };
21
- weights: {
22
- headerFontWeight: string;
23
- paragraphFontWeight: string;
24
- boldFontWeight: string;
25
- linkFontWeight: string;
26
- codeFontWeight: string;
27
- bulletFontWeight: string;
22
+ weights?: {
23
+ headerFontWeight?: string;
24
+ paragraphFontWeight?: string;
25
+ boldFontWeight?: string;
26
+ linkFontWeight?: string;
27
+ codeFontWeight?: string;
28
+ bulletFontWeight?: string;
28
29
  };
29
- spacing: {
30
- paragraphLineHeight: string;
31
- paragraphLineHeightTight: string;
32
- headerLineHeight: string;
33
- paragraphSpacing: string;
34
- headerSpacing: string;
35
- indent: string;
36
- inlinePadding: string;
37
- blockPadding: string;
38
- roundedness: string;
30
+ spacing?: {
31
+ paragraphLineHeight?: string;
32
+ paragraphLineHeightTight?: string;
33
+ headerLineHeight?: string;
34
+ paragraphSpacing?: string;
35
+ headerSpacing?: string;
36
+ indent?: string;
37
+ inlinePadding?: string;
38
+ blockPadding?: string;
39
+ roundedness?: string;
39
40
  };
40
41
  };
41
- export declare const defaultTheme: {
42
+ export default Theme;
43
+ export declare const BookishTheme: {
44
+ imports: string[];
42
45
  light: {
43
46
  backgroundColor: string;
44
47
  blockBackgroundColor: string;
@@ -103,4 +106,8 @@ export declare const defaultTheme: {
103
106
  roundedness: string;
104
107
  };
105
108
  };
106
- export default Theme;
109
+ export declare const SeriousTheme: Theme;
110
+ export declare const TechTheme: Theme;
111
+ export declare const HumanTheme: Theme;
112
+ export declare const SketchyTheme: Theme;
113
+ export declare const CriticalTheme: Theme;