bookish-press 0.5.193 → 0.5.195
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.
- package/dist/components/Auth.svelte +55 -0
- package/dist/components/Authentication.js +1 -0
- package/dist/components/BookPreview.svelte +101 -0
- package/dist/components/Link.svelte +52 -0
- package/dist/components/app/BookList.svelte +19 -0
- package/dist/components/app/Button.svelte +52 -0
- package/dist/components/app/Feedback.svelte +40 -0
- package/dist/components/app/Head.svelte +15 -0
- package/dist/components/app/Large.svelte +8 -0
- package/dist/components/app/Lead.svelte +12 -0
- package/dist/components/app/Link.svelte +36 -0
- package/dist/components/app/Options.svelte +24 -0
- package/dist/components/app/Paragraph.svelte +20 -0
- package/dist/components/app/Section.svelte +12 -0
- package/dist/components/app/Table.svelte +32 -0
- package/dist/components/app/TextInput.svelte +39 -0
- package/dist/components/chapter/Atom.svelte +43 -0
- package/dist/components/chapter/Block.svelte +37 -0
- package/dist/components/chapter/Callout.svelte +41 -0
- package/dist/components/chapter/CaptionedCode.svelte +77 -0
- package/dist/components/chapter/ChapterBody.svelte +68 -0
- package/dist/components/chapter/Citations.svelte +133 -0
- package/dist/components/chapter/Code.svelte +167 -0
- package/dist/components/chapter/Comment.svelte +62 -0
- package/dist/components/chapter/Definition.svelte +77 -0
- package/dist/components/chapter/Embed.svelte +211 -0
- package/dist/components/chapter/ErrorMessage.svelte +9 -0
- package/dist/components/chapter/ExtendedPrism.js +69 -0
- package/dist/components/chapter/Figure.svelte +90 -0
- package/dist/components/chapter/Footnote.svelte +89 -0
- package/dist/components/chapter/Format.svelte +81 -0
- package/dist/components/chapter/InlineCode.svelte +22 -0
- package/dist/components/chapter/Label.svelte +47 -0
- package/dist/components/chapter/Link.svelte +58 -0
- package/dist/components/chapter/List.svelte +86 -0
- package/dist/components/chapter/Marginal.svelte +208 -0
- package/dist/components/chapter/Paragraph.svelte +96 -0
- package/dist/components/chapter/Positioned.svelte +33 -0
- package/dist/components/chapter/Problem.svelte +15 -0
- package/dist/components/chapter/Python.svelte +128 -0
- package/dist/components/chapter/Quote.svelte +79 -0
- package/dist/components/chapter/Rule.svelte +15 -0
- package/dist/components/chapter/Table.svelte +40 -0
- package/dist/components/chapter/Text.svelte +87 -0
- package/dist/components/editor/BookishEditor.svelte +886 -0
- package/dist/components/editor/CalloutEditor.svelte +10 -0
- package/dist/components/editor/CaptionedCodeEditor.svelte +26 -0
- package/dist/components/editor/CaretContext.js +1 -0
- package/dist/components/editor/CaretState.js +1 -0
- package/dist/components/editor/CaretUtilities.js +1 -0
- package/dist/components/editor/CaretView.svelte +82 -0
- package/dist/components/editor/CitationsEditor.svelte +53 -0
- package/dist/components/editor/Clipboard.js +1 -0
- package/dist/components/editor/Command.js +1 -0
- package/dist/components/editor/Commands.js +1494 -0
- package/dist/components/editor/ConfirmButton.svelte +23 -0
- package/dist/components/editor/DefinitionEditor.svelte +36 -0
- package/dist/components/editor/EmbedEditor.svelte +137 -0
- package/dist/components/editor/Icon.svelte +17 -0
- package/dist/components/editor/ImageChooser.svelte +89 -0
- package/dist/components/editor/InlineCodeEditor.svelte +12 -0
- package/dist/components/editor/LabelEditor.svelte +32 -0
- package/dist/components/editor/LanguageEditor.svelte +14 -0
- package/dist/components/editor/LinkEditor.svelte +101 -0
- package/dist/components/editor/Note.svelte +10 -0
- package/dist/components/editor/Permissions.svelte +93 -0
- package/dist/components/editor/PositionEditor.svelte +17 -0
- package/dist/components/editor/QuoteEditor.svelte +10 -0
- package/dist/components/editor/Switch.svelte +83 -0
- package/dist/components/editor/TableEditor.svelte +10 -0
- package/dist/components/editor/TextEditor.svelte +230 -0
- package/dist/components/editor/Toggle.svelte +41 -0
- package/dist/components/editor/Toolbar.svelte +255 -0
- package/dist/components/editor/ToolbarGroup.svelte +35 -0
- package/dist/components/editor/ToolbarSpacer.svelte +8 -0
- package/dist/components/editor/URLEditor.svelte +15 -0
- package/dist/components/editor/UndoState.js +1 -0
- package/dist/components/editor/icons/annotate.svg +1 -0
- package/dist/components/editor/icons/block.svg +1 -0
- package/dist/components/editor/icons/bold.svg +1 -0
- package/dist/components/editor/icons/bullets.svg +1 -0
- package/dist/components/editor/icons/callout.svg +1 -0
- package/dist/components/editor/icons/citation.svg +8 -0
- package/dist/components/editor/icons/clear.svg +1 -0
- package/dist/components/editor/icons/clipboard.svg +1 -0
- package/dist/components/editor/icons/code.svg +1 -0
- package/dist/components/editor/icons/columnafter.svg +1 -0
- package/dist/components/editor/icons/columnbefore.svg +1 -0
- package/dist/components/editor/icons/comment.svg +1 -0
- package/dist/components/editor/icons/copy.svg +1 -0
- package/dist/components/editor/icons/cut.svg +1 -0
- package/dist/components/editor/icons/define.svg +7 -0
- package/dist/components/editor/icons/deletecolumn.svg +1 -0
- package/dist/components/editor/icons/deleterow.svg +1 -0
- package/dist/components/editor/icons/footnote.svg +8 -0
- package/dist/components/editor/icons/header1.svg +7 -0
- package/dist/components/editor/icons/header2.svg +7 -0
- package/dist/components/editor/icons/header3.svg +7 -0
- package/dist/components/editor/icons/home.svg +1 -0
- package/dist/components/editor/icons/indent.svg +1 -0
- package/dist/components/editor/icons/italic.svg +1 -0
- package/dist/components/editor/icons/label.svg +1 -0
- package/dist/components/editor/icons/left.svg +1 -0
- package/dist/components/editor/icons/level.svg +1 -0
- package/dist/components/editor/icons/link.svg +1 -0
- package/dist/components/editor/icons/list.svg +1 -0
- package/dist/components/editor/icons/media.svg +1 -0
- package/dist/components/editor/icons/middle.svg +1 -0
- package/dist/components/editor/icons/numbers.svg +10 -0
- package/dist/components/editor/icons/paragraph.svg +1 -0
- package/dist/components/editor/icons/paste.svg +10 -0
- package/dist/components/editor/icons/quote.svg +1 -0
- package/dist/components/editor/icons/redo.svg +1 -0
- package/dist/components/editor/icons/right.svg +1 -0
- package/dist/components/editor/icons/rowabove.svg +1 -0
- package/dist/components/editor/icons/rowbelow.svg +1 -0
- package/dist/components/editor/icons/rule.svg +1 -0
- package/dist/components/editor/icons/sub.svg +1 -0
- package/dist/components/editor/icons/super.svg +1 -0
- package/dist/components/editor/icons/table.svg +1 -0
- package/dist/components/editor/icons/text.svg +1 -0
- package/dist/components/editor/icons/time.svg +1 -0
- package/dist/components/editor/icons/undo.svg +1 -0
- package/dist/components/editor/icons/unindent.svg +1 -0
- package/dist/components/editor/icons/unlink.svg +1 -0
- package/dist/components/page/Acknowledgements.svelte +40 -0
- package/dist/components/page/Authors.svelte +86 -0
- package/dist/components/page/BookLoader.svelte +59 -0
- package/dist/components/page/BulkReferenceEditor.svelte +63 -0
- package/dist/components/page/Chapter.svelte +395 -0
- package/dist/components/page/ChapterContext.js +1 -0
- package/dist/components/page/ChapterNumber.svelte +9 -0
- package/dist/components/page/ChapterTitle.svelte +16 -0
- package/dist/components/page/Contexts.js +144 -0
- package/dist/components/page/DefinitionView.svelte +167 -0
- package/dist/components/page/Description.svelte +34 -0
- package/dist/components/page/Edition.svelte +154 -0
- package/dist/components/page/EditionLoader.svelte +99 -0
- package/dist/components/page/Editions.svelte +109 -0
- package/dist/components/page/Glossary.svelte +77 -0
- package/dist/components/page/Header.svelte +195 -0
- package/dist/components/page/Index.svelte +157 -0
- package/dist/components/page/Instructions.svelte +31 -0
- package/dist/components/page/License.svelte +45 -0
- package/dist/components/page/Loading.svelte +103 -0
- package/dist/components/page/Media.svelte +106 -0
- package/dist/components/page/MediaPreview.svelte +55 -0
- package/dist/components/page/Muted.svelte +10 -0
- package/dist/components/page/Outline.svelte +366 -0
- package/dist/components/page/Page.svelte +84 -0
- package/dist/components/page/PageHeader.svelte +19 -0
- package/dist/components/page/PageParagraph.svelte +18 -0
- package/dist/components/page/PossibleChapter.svelte +14 -0
- package/dist/components/page/PossibleReference.svelte +12 -0
- package/dist/components/page/Print.svelte +32 -0
- package/dist/components/page/Publish.svelte +135 -0
- package/dist/components/page/Reference.svelte +291 -0
- package/dist/components/page/References.svelte +55 -0
- package/dist/components/page/Rows.svelte +54 -0
- package/dist/components/page/Search.svelte +148 -0
- package/dist/components/page/Status.svelte +58 -0
- package/dist/components/page/SubdomainEditor.svelte +45 -0
- package/dist/components/page/TableOfContents.svelte +315 -0
- package/dist/components/page/TableOfContentsImage.svelte +27 -0
- package/dist/components/page/TableOfContentsRow.svelte +119 -0
- package/dist/components/page/ThemeEditor.svelte +189 -0
- package/dist/components/page/ThemeEditorPreview.svelte +49 -0
- package/dist/components/page/ThemeSetEditor.svelte +19 -0
- package/dist/components/page/ThemeVariableEditor.svelte +37 -0
- package/dist/components/page/Title.svelte +12 -0
- package/dist/components/page/Unknown.svelte +36 -0
- package/dist/components/page/margins.js +149 -0
- package/dist/index.js +16 -0
- package/dist/models/CRUD.js +263 -0
- package/dist/models/Firebase.js +36 -0
- package/dist/models/book/Book.js +135 -0
- package/dist/models/book/BookMedia.js +107 -0
- package/dist/models/book/BookSaveStatus.js +8 -0
- package/dist/models/book/Chapter.js +212 -0
- package/dist/models/book/ChapterID.js +10 -0
- package/dist/models/book/Definition.js +1 -0
- package/dist/models/book/Edition.js +620 -0
- package/dist/models/book/Reference.js +78 -0
- package/dist/models/book/Schema.js +115 -0
- package/dist/models/book/Theme.js +477 -0
- package/dist/models/book/ThemeColors.js +1 -0
- package/dist/models/book/Words.js +110 -0
- package/dist/models/chapter/AtomNode.js +38 -0
- package/dist/models/chapter/BlockNode.js +136 -0
- package/dist/models/chapter/BlocksNode.js +904 -0
- package/dist/models/chapter/BlocksNode.test.js +568 -0
- package/dist/models/chapter/Bookkeeping.js +1 -0
- package/dist/models/chapter/CalloutNode.js +58 -0
- package/dist/models/chapter/Caret.js +74 -0
- package/dist/models/chapter/ChapterNode.js +117 -0
- package/dist/models/chapter/CitationsNode.js +36 -0
- package/dist/models/chapter/CodeNode.js +173 -0
- package/dist/models/chapter/CommentNode.js +58 -0
- package/dist/models/chapter/DefinitionNode.js +28 -0
- package/dist/models/chapter/Edit.js +1 -0
- package/dist/models/chapter/EmbedNode.js +168 -0
- package/dist/models/chapter/ErrorNode.js +43 -0
- package/dist/models/chapter/FootnoteNode.js +47 -0
- package/dist/models/chapter/FormatNode.js +740 -0
- package/dist/models/chapter/FormatNode.test.js +96 -0
- package/dist/models/chapter/InlineCodeNode.js +31 -0
- package/dist/models/chapter/LabelNode.js +40 -0
- package/dist/models/chapter/LinkNode.js +28 -0
- package/dist/models/chapter/ListNode.js +431 -0
- package/dist/models/chapter/ListNode.test.js +54 -0
- package/dist/models/chapter/MetadataNode.js +32 -0
- package/dist/models/chapter/Node.js +220 -0
- package/dist/models/chapter/Node.test.js +29 -0
- package/dist/models/chapter/ParagraphNode.js +148 -0
- package/dist/models/chapter/ParagraphNode.test.js +30 -0
- package/dist/models/chapter/Parser.js +838 -0
- package/dist/models/chapter/Parser.test.js +25 -0
- package/dist/models/chapter/Position.js +1 -0
- package/dist/models/chapter/QuoteNode.js +99 -0
- package/dist/models/chapter/RootNode.js +1 -0
- package/dist/models/chapter/RuleNode.js +36 -0
- package/dist/models/chapter/TableNode.js +231 -0
- package/dist/models/chapter/TableNode.test.js +29 -0
- package/dist/models/chapter/TextNode.js +176 -0
- package/dist/models/chapter/TextNode.test.js +6 -0
- package/dist/util/dark.js +16 -0
- package/dist/util/getSubdomain.js +24 -0
- package/dist/util/isMobile.js +6 -0
- package/dist/util/mineReference.js +100 -0
- package/dist/util/scrollToEyeLevel.js +10 -0
- package/package.json +1 -1
- package/dist/_app/immutable/assets/Authors-0d526c21.css +0 -1
- package/dist/_app/immutable/assets/Authors-d1ca6aa3.css +0 -1
- package/dist/_app/immutable/assets/BookList-1e316155.css +0 -1
- package/dist/_app/immutable/assets/BookList-f982329c.css +0 -1
- package/dist/_app/immutable/assets/Button-683f94f5.css +0 -2
- package/dist/_app/immutable/assets/Button-e37c3ab4.css +0 -1
- package/dist/_app/immutable/assets/Chapter-d3458d18.css +0 -1
- package/dist/_app/immutable/assets/Chapter-fd98eb93.css +0 -1
- package/dist/_app/immutable/assets/ChapterBody-9179f500.css +0 -1
- package/dist/_app/immutable/assets/ChapterBody-a7ddad8c.css +0 -1
- package/dist/_app/immutable/assets/ChapterNumber-c590ef3b.css +0 -1
- package/dist/_app/immutable/assets/ChapterNumber-f1d0088b.css +0 -1
- package/dist/_app/immutable/assets/ChapterTitle-132a58c6.css +0 -1
- package/dist/_app/immutable/assets/ChapterTitle-a375ea84.css +0 -1
- package/dist/_app/immutable/assets/DarkToggle-324aa5f1.css +0 -1
- package/dist/_app/immutable/assets/DarkToggle-a1126472.css +0 -1
- package/dist/_app/immutable/assets/Edition-8b27cade.css +0 -1
- package/dist/_app/immutable/assets/Edition-c91ce507.css +0 -1
- package/dist/_app/immutable/assets/Embed-0db9be84.css +0 -1
- package/dist/_app/immutable/assets/Embed-e297693d.css +0 -1
- package/dist/_app/immutable/assets/Feedback-6226b606.css +0 -1
- package/dist/_app/immutable/assets/Feedback-ee2d9de1.css +0 -1
- package/dist/_app/immutable/assets/Format-30ea15fb.css +0 -1
- package/dist/_app/immutable/assets/Format-4a255f60.css +0 -21
- package/dist/_app/immutable/assets/Glossary-696d7060.css +0 -1
- package/dist/_app/immutable/assets/Glossary-e0ebf939.css +0 -1
- package/dist/_app/immutable/assets/Head-11348233.css +0 -1
- package/dist/_app/immutable/assets/Head-aba1befc.css +0 -1
- package/dist/_app/immutable/assets/Icon-cd9f602a.css +0 -1
- package/dist/_app/immutable/assets/Icon-fbbba6cc.css +0 -3
- package/dist/_app/immutable/assets/Index-27b49740.css +0 -1
- package/dist/_app/immutable/assets/Index-f6666510.css +0 -1
- package/dist/_app/immutable/assets/Instructions-396b701a.css +0 -1
- package/dist/_app/immutable/assets/Instructions-c156b7f7.css +0 -1
- package/dist/_app/immutable/assets/Large-7248ed66.css +0 -1
- package/dist/_app/immutable/assets/Large-e8510437.css +0 -1
- package/dist/_app/immutable/assets/Lead-0005aeac.css +0 -1
- package/dist/_app/immutable/assets/Lead-5877073a.css +0 -1
- package/dist/_app/immutable/assets/Link-43d195b8.css +0 -1
- package/dist/_app/immutable/assets/Link-a29a626e.css +0 -1
- package/dist/_app/immutable/assets/Link-cbc3ccfd.css +0 -1
- package/dist/_app/immutable/assets/Link-ea313bbf.css +0 -1
- package/dist/_app/immutable/assets/Loading-3ac6d51d.css +0 -1
- package/dist/_app/immutable/assets/Loading-6ee67a4a.css +0 -1
- package/dist/_app/immutable/assets/Media-a5397681.css +0 -1
- package/dist/_app/immutable/assets/Media-eb62dad2.css +0 -1
- package/dist/_app/immutable/assets/Muted-2d8ec279.css +0 -1
- package/dist/_app/immutable/assets/Muted-57703595.css +0 -1
- package/dist/_app/immutable/assets/Outline-848693bd.css +0 -1
- package/dist/_app/immutable/assets/Outline-f6bd015e.css +0 -5
- package/dist/_app/immutable/assets/PageHeader-2b6c7ada.css +0 -1
- package/dist/_app/immutable/assets/PageHeader-da9d418b.css +0 -1
- package/dist/_app/immutable/assets/Paragraph-01e3aad7.css +0 -1
- package/dist/_app/immutable/assets/Paragraph-7f19cc8e.css +0 -1
- package/dist/_app/immutable/assets/Permissions-8af5ea43.css +0 -1
- package/dist/_app/immutable/assets/Permissions-fd4b44f3.css +0 -1
- package/dist/_app/immutable/assets/Print-59605fef.css +0 -1
- package/dist/_app/immutable/assets/Print-e64e14ab.css +0 -1
- package/dist/_app/immutable/assets/References-0b18fc46.css +0 -2
- package/dist/_app/immutable/assets/References-d70cb1bf.css +0 -1
- package/dist/_app/immutable/assets/Rows-07fb2a04.css +0 -1
- package/dist/_app/immutable/assets/Rows-4ced10e6.css +0 -1
- package/dist/_app/immutable/assets/Search-3f0933c0.css +0 -1
- package/dist/_app/immutable/assets/Search-c6d55600.css +0 -1
- package/dist/_app/immutable/assets/Section-2b198a5b.css +0 -1
- package/dist/_app/immutable/assets/Section-e2c611bc.css +0 -1
- package/dist/_app/immutable/assets/Switch-5ae826ed.css +0 -1
- package/dist/_app/immutable/assets/Switch-5f61ca79.css +0 -1
- package/dist/_app/immutable/assets/TableOfContents-1eb14800.css +0 -1
- package/dist/_app/immutable/assets/TableOfContents-e208c385.css +0 -1
- package/dist/_app/immutable/assets/TextInput-1594694e.css +0 -1
- package/dist/_app/immutable/assets/TextInput-70a0c716.css +0 -2
- package/dist/_app/immutable/assets/_error-1d5c4e5a.css +0 -3
- package/dist/_app/immutable/assets/_error-2a1b730c.css +0 -1
- package/dist/_app/immutable/assets/_layout-2a89a5bc.css +0 -10
- package/dist/_app/immutable/assets/_layout-b89c5db4.css +0 -1
- package/dist/_app/immutable/assets/_page-b4364e7c.css +0 -1
- package/dist/_app/immutable/assets/_page-d554b167.css +0 -1
- package/dist/_app/immutable/chunks/0-391221a6.js +0 -1
- package/dist/_app/immutable/chunks/1-6f456e31.js +0 -1
- package/dist/_app/immutable/chunks/10-2e7bb350.js +0 -1
- package/dist/_app/immutable/chunks/11-bd8f6140.js +0 -1
- package/dist/_app/immutable/chunks/12-7da99a0d.js +0 -1
- package/dist/_app/immutable/chunks/13-c3b259cf.js +0 -1
- package/dist/_app/immutable/chunks/14-638f36e2.js +0 -1
- package/dist/_app/immutable/chunks/15-eccea1da.js +0 -1
- package/dist/_app/immutable/chunks/16-f212cc13.js +0 -1
- package/dist/_app/immutable/chunks/17-f7645981.js +0 -1
- package/dist/_app/immutable/chunks/18-80899467.js +0 -1
- package/dist/_app/immutable/chunks/19-a24387d5.js +0 -1
- package/dist/_app/immutable/chunks/2-46f8e5ff.js +0 -1
- package/dist/_app/immutable/chunks/20-6034c472.js +0 -1
- package/dist/_app/immutable/chunks/21-f1ee95d7.js +0 -1
- package/dist/_app/immutable/chunks/22-09b27807.js +0 -1
- package/dist/_app/immutable/chunks/23-4b5a8a3a.js +0 -1
- package/dist/_app/immutable/chunks/24-3c4a016e.js +0 -1
- package/dist/_app/immutable/chunks/25-da39d143.js +0 -1
- package/dist/_app/immutable/chunks/26-3f6c485e.js +0 -1
- package/dist/_app/immutable/chunks/27-1c8ed342.js +0 -1
- package/dist/_app/immutable/chunks/28-e41167eb.js +0 -1
- package/dist/_app/immutable/chunks/29-7756650f.js +0 -1
- package/dist/_app/immutable/chunks/3-fca44a2c.js +0 -1
- package/dist/_app/immutable/chunks/30-3cdf8a0b.js +0 -1
- package/dist/_app/immutable/chunks/31-2a0cc201.js +0 -1
- package/dist/_app/immutable/chunks/32-482d396e.js +0 -1
- package/dist/_app/immutable/chunks/33-1214b085.js +0 -1
- package/dist/_app/immutable/chunks/34-47c6e06f.js +0 -1
- package/dist/_app/immutable/chunks/4-446921f7.js +0 -1
- package/dist/_app/immutable/chunks/5-e3572995.js +0 -1
- package/dist/_app/immutable/chunks/6-e7a2f2f5.js +0 -1
- package/dist/_app/immutable/chunks/7-3815480a.js +0 -1
- package/dist/_app/immutable/chunks/8-a5f2d72a.js +0 -1
- package/dist/_app/immutable/chunks/9-4d225c18.js +0 -1
- package/dist/_app/immutable/chunks/Authors-34afa7d2.js +0 -1
- package/dist/_app/immutable/chunks/BookList-136bbb7d.js +0 -1
- package/dist/_app/immutable/chunks/Button-b59ec206.js +0 -1
- package/dist/_app/immutable/chunks/Chapter-4b09b8df.js +0 -13
- package/dist/_app/immutable/chunks/ChapterBody-e3121609.js +0 -2
- package/dist/_app/immutable/chunks/ChapterNumber-efbfa4d5.js +0 -1
- package/dist/_app/immutable/chunks/ChapterTitle-2ef94d38.js +0 -1
- package/dist/_app/immutable/chunks/Contexts-9f2cc2fa.js +0 -35
- package/dist/_app/immutable/chunks/DarkToggle-6b16bf9c.js +0 -58
- package/dist/_app/immutable/chunks/Edition-0196ace9.js +0 -15
- package/dist/_app/immutable/chunks/Editions-75264e71.js +0 -17
- package/dist/_app/immutable/chunks/Embed-8f6c7b1e.js +0 -1
- package/dist/_app/immutable/chunks/Feedback-02155d4f.js +0 -1
- package/dist/_app/immutable/chunks/Firebase-c97744dc.js +0 -3340
- package/dist/_app/immutable/chunks/Format-4d4050b8.js +0 -16
- package/dist/_app/immutable/chunks/Glossary-994211ff.js +0 -5
- package/dist/_app/immutable/chunks/Head-8b87dcf9.js +0 -1
- package/dist/_app/immutable/chunks/Icon-6d10b010.js +0 -1
- package/dist/_app/immutable/chunks/Index-a477a5e9.js +0 -3
- package/dist/_app/immutable/chunks/Instructions-289ea859.js +0 -1
- package/dist/_app/immutable/chunks/Large-d20a134b.js +0 -1
- package/dist/_app/immutable/chunks/Lead-2e56c23a.js +0 -1
- package/dist/_app/immutable/chunks/Link-9ed8813f.js +0 -1
- package/dist/_app/immutable/chunks/Link-bf3cfc4a.js +0 -1
- package/dist/_app/immutable/chunks/Loading-960c572a.js +0 -1
- package/dist/_app/immutable/chunks/Media-395a62c0.js +0 -11
- package/dist/_app/immutable/chunks/Muted-6c007c27.js +0 -1
- package/dist/_app/immutable/chunks/Outline-8482e267.js +0 -10
- package/dist/_app/immutable/chunks/PageHeader-ae302247.js +0 -1
- package/dist/_app/immutable/chunks/Paragraph-86b48564.js +0 -1
- package/dist/_app/immutable/chunks/Permissions-2fd12288.js +0 -1
- package/dist/_app/immutable/chunks/PossibleChapter-149a86eb.js +0 -1
- package/dist/_app/immutable/chunks/Print-3fa5354a.js +0 -1
- package/dist/_app/immutable/chunks/References-db6c4c00.js +0 -7
- package/dist/_app/immutable/chunks/Rows-2e420ce9.js +0 -1
- package/dist/_app/immutable/chunks/Search-a4a69c2c.js +0 -3
- package/dist/_app/immutable/chunks/Section-e4f40e8b.js +0 -1
- package/dist/_app/immutable/chunks/Switch-2beb5fed.js +0 -1
- package/dist/_app/immutable/chunks/TableOfContents-b4c8911f.js +0 -25
- package/dist/_app/immutable/chunks/TextInput-9a2845d7.js +0 -1
- package/dist/_app/immutable/chunks/Theme-40b1ca02.js +0 -1
- package/dist/_app/immutable/chunks/Unknown-b8b5c2c9.js +0 -3
- package/dist/_app/immutable/chunks/_layout-744122fc.js +0 -1
- package/dist/_app/immutable/chunks/control-e7f5239e.js +0 -1
- package/dist/_app/immutable/chunks/dark-86e1a6f5.js +0 -1
- package/dist/_app/immutable/chunks/index-437f4d21.js +0 -4
- package/dist/_app/immutable/chunks/navigation-e50a9b06.js +0 -1
- package/dist/_app/immutable/chunks/singletons-3041590b.js +0 -1
- package/dist/_app/immutable/chunks/stores-63c51a3f.js +0 -1
- package/dist/_app/immutable/components/error.svelte-8032a6bb.js +0 -1
- package/dist/_app/immutable/components/layout.svelte-ec4f57bc.js +0 -1
- package/dist/_app/immutable/components/pages/(app)/_layout.svelte-fb2c53ee.js +0 -3
- package/dist/_app/immutable/components/pages/(app)/_page.svelte-f762e334.js +0 -17
- package/dist/_app/immutable/components/pages/(app)/about/_page.svelte-0abc2e61.js +0 -59
- package/dist/_app/immutable/components/pages/(app)/confirm/_page.svelte-b93010ab.js +0 -1
- package/dist/_app/immutable/components/pages/(app)/email/_page.svelte-0dbfae76.js +0 -1
- package/dist/_app/immutable/components/pages/(app)/login/_page.svelte-3936d831.js +0 -3
- package/dist/_app/immutable/components/pages/(app)/read/_page.svelte-a7177144.js +0 -1
- package/dist/_app/immutable/components/pages/(app)/write/_bookid_/__editionid_edition__/_chapterid_/_page.svelte-09312bf2.js +0 -1
- package/dist/_app/immutable/components/pages/(app)/write/_bookid_/__editionid_edition__/_layout.svelte-dbf0531e.js +0 -1
- package/dist/_app/immutable/components/pages/(app)/write/_bookid_/__editionid_edition__/_page.svelte-624e897f.js +0 -1
- package/dist/_app/immutable/components/pages/(app)/write/_bookid_/__editionid_edition__/glossary/_page.svelte-40fd954c.js +0 -1
- package/dist/_app/immutable/components/pages/(app)/write/_bookid_/__editionid_edition__/index/__letter__/_page.svelte-b516c009.js +0 -1
- package/dist/_app/immutable/components/pages/(app)/write/_bookid_/__editionid_edition__/media/_page.svelte-3074c96c.js +0 -1
- package/dist/_app/immutable/components/pages/(app)/write/_bookid_/__editionid_edition__/print/_page.svelte-388ee9e3.js +0 -1
- package/dist/_app/immutable/components/pages/(app)/write/_bookid_/__editionid_edition__/references/_page.svelte-41167df1.js +0 -1
- package/dist/_app/immutable/components/pages/(app)/write/_bookid_/__editionid_edition__/search/_page.svelte-03a6f0de.js +0 -1
- package/dist/_app/immutable/components/pages/(app)/write/_bookid_/__editionid_edition__/theme/_page.svelte-314b9acb.js +0 -15
- package/dist/_app/immutable/components/pages/(app)/write/_bookid_/__editionid_edition__/unknown/_page.svelte-5a6c3272.js +0 -1
- package/dist/_app/immutable/components/pages/(app)/write/_bookid_/_layout.svelte-8bc62b8c.js +0 -1
- package/dist/_app/immutable/components/pages/(app)/write/_bookid_/editions/_page.svelte-ba2ac9d6.js +0 -1
- package/dist/_app/immutable/components/pages/(app)/write/_error.svelte-45a36b1c.js +0 -1
- package/dist/_app/immutable/components/pages/(app)/write/_layout.svelte-f292be56.js +0 -1
- package/dist/_app/immutable/components/pages/(app)/write/_page.svelte-6b12e63c.js +0 -1
- package/dist/_app/immutable/components/pages/(reader)/_bookid_/__editionid_edition__/_chapterid_/_page.svelte-39cc7ab8.js +0 -1
- package/dist/_app/immutable/components/pages/(reader)/_bookid_/__editionid_edition__/_page.svelte-47d6142c.js +0 -1
- package/dist/_app/immutable/components/pages/(reader)/_bookid_/__editionid_edition__/glossary/_page.svelte-da39265b.js +0 -1
- package/dist/_app/immutable/components/pages/(reader)/_bookid_/__editionid_edition__/index/__letter__/_page.svelte-bf1f4c4a.js +0 -1
- package/dist/_app/immutable/components/pages/(reader)/_bookid_/__editionid_edition__/media/_page.svelte-d8ddb855.js +0 -1
- package/dist/_app/immutable/components/pages/(reader)/_bookid_/__editionid_edition__/print/_page.svelte-cd6495d9.js +0 -1
- package/dist/_app/immutable/components/pages/(reader)/_bookid_/__editionid_edition__/references/_page.svelte-32bc454f.js +0 -1
- package/dist/_app/immutable/components/pages/(reader)/_bookid_/__editionid_edition__/search/_page.svelte-97bc25f7.js +0 -1
- package/dist/_app/immutable/components/pages/(reader)/_bookid_/_layout.svelte-6e9ac5df.js +0 -1
- package/dist/_app/immutable/components/pages/(reader)/_error.svelte-be0856b0.js +0 -1
- package/dist/_app/immutable/modules/pages/(reader)/_bookid_/_layout.ts-f423fff7.js +0 -1
- package/dist/_app/immutable/start-0f124364.js +0 -1
- package/dist/_app/version.json +0 -1
- package/dist/icons/favicon.png +0 -0
- package/dist/icons/icon.png +0 -0
- package/dist/icons/ios-icon.png +0 -0
- package/dist/index.html +0 -38
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script>import { sendSignInLinkToEmail } from 'firebase/auth';
|
|
2
|
+
import { onDestroy, setContext } from 'svelte';
|
|
3
|
+
import { writable } from 'svelte/store';
|
|
4
|
+
import { auth } from '../models/Firebase';
|
|
5
|
+
import { USER } from './page/Contexts';
|
|
6
|
+
// Track the user and user loading status in state
|
|
7
|
+
let loading = true;
|
|
8
|
+
// The store that tracks the auth context.
|
|
9
|
+
const authentication = writable({
|
|
10
|
+
user: null,
|
|
11
|
+
loading: loading,
|
|
12
|
+
login,
|
|
13
|
+
logout,
|
|
14
|
+
});
|
|
15
|
+
// Login using Firebase's password-less email verification
|
|
16
|
+
async function login(email) {
|
|
17
|
+
// If connected to firebase...
|
|
18
|
+
if (auth) {
|
|
19
|
+
const actionCodeSettings = {
|
|
20
|
+
url: location.origin + '/confirm',
|
|
21
|
+
handleCodeInApp: true,
|
|
22
|
+
};
|
|
23
|
+
// Ask Firebase to log in with the given email
|
|
24
|
+
await sendSignInLinkToEmail(auth, email, actionCodeSettings);
|
|
25
|
+
// Remember the email in local storage so we don't have to ask for it again
|
|
26
|
+
// after returning to the link above.
|
|
27
|
+
window.localStorage.setItem('email', email);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function updateAuth(user) {
|
|
31
|
+
authentication.set({ user, loading: loading, login, logout });
|
|
32
|
+
}
|
|
33
|
+
// Logout using Firebase's authentication framework.
|
|
34
|
+
function logout() {
|
|
35
|
+
if (auth) {
|
|
36
|
+
return auth.signOut().then(() => updateAuth(null));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
// On mount, subscribe to authentication changes.
|
|
40
|
+
if (auth) {
|
|
41
|
+
const unsubscribe = auth.onAuthStateChanged((user) => {
|
|
42
|
+
loading = false;
|
|
43
|
+
updateAuth(user);
|
|
44
|
+
});
|
|
45
|
+
// On unmount, stop subscribing.
|
|
46
|
+
onDestroy(unsubscribe);
|
|
47
|
+
}
|
|
48
|
+
// Expose the state and the login/logout functionality.
|
|
49
|
+
setContext(USER, authentication);
|
|
50
|
+
</script>
|
|
51
|
+
|
|
52
|
+
<!-- Wrap whatever children are given in this context. -->
|
|
53
|
+
{#if loading === false}
|
|
54
|
+
<slot />
|
|
55
|
+
{/if}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<script>import EmbedNode from '../models/chapter/EmbedNode';
|
|
2
|
+
import Parser from '../models/chapter/Parser';
|
|
3
|
+
import ChapterBody from './chapter/ChapterBody.svelte';
|
|
4
|
+
import Embed from './chapter/Embed.svelte';
|
|
5
|
+
import Link from './app/Link.svelte';
|
|
6
|
+
export let book;
|
|
7
|
+
export let write = false;
|
|
8
|
+
$: refID = book.getID();
|
|
9
|
+
$: cover = book.getCover();
|
|
10
|
+
$: authors = book.getAuthors();
|
|
11
|
+
$: description = book.getDescription();
|
|
12
|
+
$: subdomain = book.getSubdomain();
|
|
13
|
+
$: title = book.getTitle();
|
|
14
|
+
$: embed = cover === null ? null : Parser.parseEmbed(undefined, cover);
|
|
15
|
+
$: url =
|
|
16
|
+
subdomain === null || write
|
|
17
|
+
? refID === undefined
|
|
18
|
+
? ''
|
|
19
|
+
: (write ? '/write/' : '/') + refID
|
|
20
|
+
: `/${subdomain}`;
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<article class="book-preview">
|
|
24
|
+
<div class="cover" class:empty={embed === null}>
|
|
25
|
+
{#if embed instanceof EmbedNode}
|
|
26
|
+
<Embed node={embed} imageOnly editable={false} />
|
|
27
|
+
{/if}
|
|
28
|
+
</div>
|
|
29
|
+
<div class="content">
|
|
30
|
+
<Link to={url}><h2 class="title">{title}</h2></Link>
|
|
31
|
+
<p class="authors">
|
|
32
|
+
{#each authors as author, index}
|
|
33
|
+
<span
|
|
34
|
+
>{author}{#if index !== authors.length - 1}, {/if}</span
|
|
35
|
+
>
|
|
36
|
+
{:else}
|
|
37
|
+
<em>No authors</em>
|
|
38
|
+
{/each}
|
|
39
|
+
</p>
|
|
40
|
+
<div class="description">
|
|
41
|
+
{#if description.length === 0}
|
|
42
|
+
<em>No description</em>
|
|
43
|
+
{:else}
|
|
44
|
+
<ChapterBody
|
|
45
|
+
node={Parser.parseChapter(undefined, description)}
|
|
46
|
+
/>
|
|
47
|
+
{/if}
|
|
48
|
+
</div>
|
|
49
|
+
<Link to={`${url}/editions`}>Editions</Link>
|
|
50
|
+
</div>
|
|
51
|
+
</article>
|
|
52
|
+
|
|
53
|
+
<style>
|
|
54
|
+
.book-preview {
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: row;
|
|
57
|
+
align-content: start;
|
|
58
|
+
margin: var(--app-chrome-padding);
|
|
59
|
+
padding: var(--app-chrome-padding);
|
|
60
|
+
text-align: left;
|
|
61
|
+
flex-wrap: wrap;
|
|
62
|
+
height: 12em;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.cover {
|
|
66
|
+
flex: 1;
|
|
67
|
+
width: 10em;
|
|
68
|
+
height: 100%;
|
|
69
|
+
margin-right: var(--app-chrome-padding);
|
|
70
|
+
padding: var(--app-chrome-padding);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.cover.empty {
|
|
74
|
+
background-color: var(--app-chrome-background);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.content {
|
|
78
|
+
flex: 4;
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-direction: column;
|
|
81
|
+
gap: var(--app-chrome-padding);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.title {
|
|
85
|
+
font-size: 20pt;
|
|
86
|
+
margin-top: 0;
|
|
87
|
+
margin-bottom: var(--app-chrome-padding);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.authors {
|
|
91
|
+
margin-top: 0;
|
|
92
|
+
margin-bottom: var(--app-chrome-padding);
|
|
93
|
+
font-style: italic;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.description {
|
|
97
|
+
margin-top: 0;
|
|
98
|
+
overflow: hidden;
|
|
99
|
+
text-overflow: ellipsis;
|
|
100
|
+
}
|
|
101
|
+
</style>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<script>import { page } from '$app/stores';
|
|
2
|
+
export let to;
|
|
3
|
+
export let linked = true;
|
|
4
|
+
let link;
|
|
5
|
+
function scroll(event) {
|
|
6
|
+
// No element? Bail.
|
|
7
|
+
if (link === undefined)
|
|
8
|
+
return;
|
|
9
|
+
// No hash? No scroll.
|
|
10
|
+
const hash = new URL(link.href).hash;
|
|
11
|
+
if (hash === '')
|
|
12
|
+
return;
|
|
13
|
+
// Prevent the browser from scrolling.
|
|
14
|
+
event.preventDefault();
|
|
15
|
+
// Get the anchor
|
|
16
|
+
const anchorId = new URL(link.href).hash.replace('#', '');
|
|
17
|
+
const anchor = document.getElementById(anchorId);
|
|
18
|
+
// No anchor? Bail.
|
|
19
|
+
if (anchor === null)
|
|
20
|
+
return;
|
|
21
|
+
// Scroll to the anchor.
|
|
22
|
+
window.scrollTo({
|
|
23
|
+
top: anchor.offsetTop,
|
|
24
|
+
behavior: 'smooth',
|
|
25
|
+
});
|
|
26
|
+
// Update the hash (without scrolling)
|
|
27
|
+
history.pushState({}, '', hash);
|
|
28
|
+
}
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
{#if !linked || $page.url.pathname === (to.charAt(to.length - 1) === '/' ? to.substring(0, to.length - 1) : to)}
|
|
32
|
+
<slot />
|
|
33
|
+
{:else}
|
|
34
|
+
<a
|
|
35
|
+
href={to}
|
|
36
|
+
bind:this={link}
|
|
37
|
+
on:click={(event) => scroll(event)}
|
|
38
|
+
target={to.startsWith('http') ? '_blank' : null}><slot /></a
|
|
39
|
+
>
|
|
40
|
+
{/if}
|
|
41
|
+
|
|
42
|
+
<style>
|
|
43
|
+
a {
|
|
44
|
+
color: var(--bookish-link-color);
|
|
45
|
+
font-weight: var(--bookish-link-font-weight);
|
|
46
|
+
text-decoration: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
a:hover {
|
|
50
|
+
text-decoration: underline;
|
|
51
|
+
}
|
|
52
|
+
</style>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script>import BookPreview from '../BookPreview.svelte';
|
|
2
|
+
export let books;
|
|
3
|
+
export let write;
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<section class="previews">
|
|
7
|
+
{#each books as book}
|
|
8
|
+
<BookPreview {book} {write} />
|
|
9
|
+
{/each}
|
|
10
|
+
</section>
|
|
11
|
+
|
|
12
|
+
<style>
|
|
13
|
+
.previews {
|
|
14
|
+
margin-top: var(--app-text-spacing);
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
width: 100%;
|
|
18
|
+
}
|
|
19
|
+
</style>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<script>export let type = null;
|
|
2
|
+
export let tooltip;
|
|
3
|
+
export let disabled = false;
|
|
4
|
+
export let command;
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<button
|
|
8
|
+
class={$$props.class}
|
|
9
|
+
title={tooltip}
|
|
10
|
+
aria-label={tooltip}
|
|
11
|
+
{type}
|
|
12
|
+
{disabled}
|
|
13
|
+
on:mousedown={command}
|
|
14
|
+
on:keypress={(event) =>
|
|
15
|
+
event.key === ' ' || event.key === 'Enter' ? command() : undefined}
|
|
16
|
+
>
|
|
17
|
+
<slot />
|
|
18
|
+
</button>
|
|
19
|
+
|
|
20
|
+
<style>
|
|
21
|
+
button {
|
|
22
|
+
display: inline-block;
|
|
23
|
+
font-family: var(--app-font);
|
|
24
|
+
font-size: var(--app-chrome-font-size);
|
|
25
|
+
color: var(--app-font-color);
|
|
26
|
+
background-color: var(--app-chrome-background);
|
|
27
|
+
padding-left: var(--app-chrome-padding);
|
|
28
|
+
padding-right: var(--app-chrome-padding);
|
|
29
|
+
padding-top: calc(var(--app-chrome-padding) / 2);
|
|
30
|
+
padding-bottom: calc(var(--app-chrome-padding) / 2);
|
|
31
|
+
border-radius: var(--app-chrome-roundedness);
|
|
32
|
+
border: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
button:hover:enabled {
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
background-color: var(--app-interactive-color);
|
|
38
|
+
color: var(--app-font-color-inverted);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
button:disabled {
|
|
42
|
+
opacity: 0.5;
|
|
43
|
+
cursor: auto;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
button:focus {
|
|
47
|
+
position: relative;
|
|
48
|
+
z-index: 2;
|
|
49
|
+
outline: var(--app-chrome-border-size) solid
|
|
50
|
+
var(--app-interactive-color);
|
|
51
|
+
}
|
|
52
|
+
</style>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script>import Large from './Large.svelte';
|
|
2
|
+
export let error = false;
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
{#if error}
|
|
6
|
+
<p role="alert"><slot /></p>
|
|
7
|
+
{:else}
|
|
8
|
+
<p role="status" aria-live="polite"><Large><slot /></Large></p>
|
|
9
|
+
{/if}
|
|
10
|
+
|
|
11
|
+
<style>
|
|
12
|
+
p {
|
|
13
|
+
font-family: var(--app-font);
|
|
14
|
+
margin-top: var(--app-text-spacing);
|
|
15
|
+
margin-bottom: var(--app-text-spacing);
|
|
16
|
+
padding: var(--app-chrome-padding);
|
|
17
|
+
--bounce-height: 1em;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
p[role='alert'] {
|
|
21
|
+
color: var(--app-error-color);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
p[role='status'] {
|
|
25
|
+
color: var(--app-font-color);
|
|
26
|
+
/* animation: waiting 1s 1; */
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@keyframes waiting {
|
|
30
|
+
0% {
|
|
31
|
+
transform: rotate(1deg);
|
|
32
|
+
}
|
|
33
|
+
50% {
|
|
34
|
+
transform: rotate(-1deg);
|
|
35
|
+
}
|
|
36
|
+
100% {
|
|
37
|
+
transform: rotate(1deg);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
</style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script>export let id = null;
|
|
2
|
+
</script>
|
|
3
|
+
|
|
4
|
+
<h2 {id}><slot /></h2>
|
|
5
|
+
|
|
6
|
+
<style>
|
|
7
|
+
h2 {
|
|
8
|
+
font-size: 150%;
|
|
9
|
+
font-weight: bold;
|
|
10
|
+
font-family: var(--app-font);
|
|
11
|
+
margin-top: var(--app-text-spacing);
|
|
12
|
+
margin-bottom: 0;
|
|
13
|
+
margin-left: -1rem;
|
|
14
|
+
}
|
|
15
|
+
</style>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script>import { page } from '$app/stores';
|
|
2
|
+
export let to;
|
|
3
|
+
export let before = undefined;
|
|
4
|
+
export let title = undefined;
|
|
5
|
+
export let external = false;
|
|
6
|
+
$: at = to === $page.url.pathname;
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
{#if at}
|
|
10
|
+
<span class="link"> <slot /></span>
|
|
11
|
+
{:else}
|
|
12
|
+
<a
|
|
13
|
+
class="link"
|
|
14
|
+
href={to}
|
|
15
|
+
{title}
|
|
16
|
+
on:click={() => (before ? before() : undefined)}
|
|
17
|
+
target={to.startsWith('http') || external ? '_blank' : null}
|
|
18
|
+
rel={external ? 'noreferrer' : null}><slot /></a
|
|
19
|
+
>
|
|
20
|
+
{/if}
|
|
21
|
+
|
|
22
|
+
<style>
|
|
23
|
+
.link {
|
|
24
|
+
font-family: var(--app-font);
|
|
25
|
+
font-weight: 400;
|
|
26
|
+
text-decoration: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
a {
|
|
30
|
+
color: var(--app-interactive-color);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
a:hover {
|
|
34
|
+
text-decoration: underline;
|
|
35
|
+
}
|
|
36
|
+
</style>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script>export let options;
|
|
2
|
+
export let changed;
|
|
3
|
+
export let value;
|
|
4
|
+
export let label;
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<select bind:value on:change={() => changed(value)} aria-label={label}>
|
|
8
|
+
<option value="" selected={value === ''} />
|
|
9
|
+
{#each options as option}
|
|
10
|
+
<option value={option[1]} selected={value === option[1]}
|
|
11
|
+
>{option[0]}</option
|
|
12
|
+
>
|
|
13
|
+
{/each}
|
|
14
|
+
</select>
|
|
15
|
+
|
|
16
|
+
<style>
|
|
17
|
+
select {
|
|
18
|
+
border: none;
|
|
19
|
+
background-color: var(--app-chrome-background);
|
|
20
|
+
padding: var(--app-chrome-padding);
|
|
21
|
+
font-family: var(--app-font);
|
|
22
|
+
font-size: var(--app-chrome-font-size);
|
|
23
|
+
}
|
|
24
|
+
</style>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script>export let aside = false;
|
|
2
|
+
</script>
|
|
3
|
+
|
|
4
|
+
<p class={aside ? 'aside' : ''}><slot /></p>
|
|
5
|
+
|
|
6
|
+
<style>
|
|
7
|
+
p {
|
|
8
|
+
font-family: var(--app-font);
|
|
9
|
+
font-size: var(--app-font-size);
|
|
10
|
+
font-weight: 300;
|
|
11
|
+
line-height: var(--app-line-height);
|
|
12
|
+
margin-top: 0;
|
|
13
|
+
margin-bottom: var(--app-text-spacing);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.aside {
|
|
17
|
+
font-style: italic;
|
|
18
|
+
font-size: 90%;
|
|
19
|
+
}
|
|
20
|
+
</style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<section>
|
|
2
|
+
<table>
|
|
3
|
+
<slot />
|
|
4
|
+
</table>
|
|
5
|
+
</section>
|
|
6
|
+
|
|
7
|
+
<style>
|
|
8
|
+
section {
|
|
9
|
+
width: 100%;
|
|
10
|
+
overflow-x: auto;
|
|
11
|
+
margin-top: var(--app-text-spacing);
|
|
12
|
+
margin-bottom: var(--app-text-spacing);
|
|
13
|
+
border-top: var(--app-chrome-border-size) solid var(--app-border-color);
|
|
14
|
+
border-bottom: var(--app-chrome-border-size) solid
|
|
15
|
+
var(--app-border-color);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
table {
|
|
19
|
+
width: 100%;
|
|
20
|
+
border-collapse: collapse;
|
|
21
|
+
clear: both;
|
|
22
|
+
border-collapse: separate;
|
|
23
|
+
border-spacing: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
table :global(td:not(:first-of-type)) {
|
|
27
|
+
padding: var(--app-chrome-padding);
|
|
28
|
+
vertical-align: top;
|
|
29
|
+
font-family: var(--app-font);
|
|
30
|
+
font-weight: 300;
|
|
31
|
+
}
|
|
32
|
+
</style>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<script>export let text = '';
|
|
2
|
+
export let autocomplete = null;
|
|
3
|
+
export let type;
|
|
4
|
+
export let placeholder;
|
|
5
|
+
export let disabled;
|
|
6
|
+
let input;
|
|
7
|
+
export function value() {
|
|
8
|
+
return text;
|
|
9
|
+
}
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<input
|
|
13
|
+
{autocomplete}
|
|
14
|
+
{type}
|
|
15
|
+
{placeholder}
|
|
16
|
+
{disabled}
|
|
17
|
+
value={text}
|
|
18
|
+
bind:this={input}
|
|
19
|
+
on:input={() => (text = input.value)}
|
|
20
|
+
/>
|
|
21
|
+
|
|
22
|
+
<style>
|
|
23
|
+
input {
|
|
24
|
+
font-family: var(--app-font);
|
|
25
|
+
font-size: var(--app-chrome-font-size);
|
|
26
|
+
background: var(--app-background-color);
|
|
27
|
+
color: var(--app-font-color);
|
|
28
|
+
padding: var(--app-chrome-padding);
|
|
29
|
+
font-size: var(--app-chrome-font-size);
|
|
30
|
+
border: none;
|
|
31
|
+
border-bottom: var(--app-chrome-border-size) solid
|
|
32
|
+
var(--app-border-color);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
input:focus {
|
|
36
|
+
border-bottom-color: var(--app-interactive-color);
|
|
37
|
+
outline: none;
|
|
38
|
+
}
|
|
39
|
+
</style>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<svelte:options immutable={true} />
|
|
2
|
+
|
|
3
|
+
<script>import { getCaret } from '../page/Contexts';
|
|
4
|
+
export let node;
|
|
5
|
+
let caret = getCaret();
|
|
6
|
+
// Is the caret on this link?
|
|
7
|
+
$: selected = $caret && $caret.range && $caret.range.start.node === node;
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<!-- Prevent the editor from receiving the click. -->
|
|
11
|
+
<span
|
|
12
|
+
class={`bookish-editor-atom ${
|
|
13
|
+
selected ? 'bookish-editor-atom-selected' : ''
|
|
14
|
+
} ${$caret?.focused ? 'bookish-editor-atom-selected-focused' : ''}`}
|
|
15
|
+
><slot /></span
|
|
16
|
+
>
|
|
17
|
+
|
|
18
|
+
<style>
|
|
19
|
+
.bookish-editor-atom {
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.bookish-editor-atom-selected {
|
|
24
|
+
border-radius: 2px;
|
|
25
|
+
outline-style: solid;
|
|
26
|
+
outline-color: var(--bookish-paragraph-color);
|
|
27
|
+
outline-offset: 2px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.bookish-editor-atom-selected-focused {
|
|
31
|
+
animation: 1s atom-selected infinite;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@keyframes atom-selected {
|
|
35
|
+
from,
|
|
36
|
+
to {
|
|
37
|
+
outline-width: 2px;
|
|
38
|
+
}
|
|
39
|
+
50% {
|
|
40
|
+
outline-width: 4px;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
</style>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<svelte:options immutable={true} />
|
|
2
|
+
|
|
3
|
+
<script>import CalloutNode from '../../models/chapter/CalloutNode';
|
|
4
|
+
import CodeNode from '../../models/chapter/CodeNode';
|
|
5
|
+
import EmbedNode from '../../models/chapter/EmbedNode';
|
|
6
|
+
import ErrorNode from '../../models/chapter/ErrorNode';
|
|
7
|
+
import ListNode from '../../models/chapter/ListNode';
|
|
8
|
+
import ParagraphNode from '../../models/chapter/ParagraphNode';
|
|
9
|
+
import QuoteNode from '../../models/chapter/QuoteNode';
|
|
10
|
+
import RuleNode from '../../models/chapter/RuleNode';
|
|
11
|
+
import TableNode from '../../models/chapter/TableNode';
|
|
12
|
+
import Callout from './Callout.svelte';
|
|
13
|
+
import CaptionedCode from './CaptionedCode.svelte';
|
|
14
|
+
import Embed from './Embed.svelte';
|
|
15
|
+
import ErrorMessage from './ErrorMessage.svelte';
|
|
16
|
+
import List from './List.svelte';
|
|
17
|
+
import Paragraph from './Paragraph.svelte';
|
|
18
|
+
import Quote from './Quote.svelte';
|
|
19
|
+
import Rule from './Rule.svelte';
|
|
20
|
+
import Table from './Table.svelte';
|
|
21
|
+
import Problem from './Problem.svelte';
|
|
22
|
+
import { isChapterEditable } from '../page/Contexts';
|
|
23
|
+
export let node;
|
|
24
|
+
let editable = isChapterEditable();
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
{#if node instanceof ParagraphNode}<Paragraph {node} />
|
|
28
|
+
{:else if node instanceof ListNode}<List {node} />
|
|
29
|
+
{:else if node instanceof EmbedNode}<Embed {node} {editable} />
|
|
30
|
+
{:else if node instanceof CalloutNode}<Callout {node} />
|
|
31
|
+
{:else if node instanceof QuoteNode}<Quote {node} />
|
|
32
|
+
{:else if node instanceof CodeNode}<CaptionedCode {node} />
|
|
33
|
+
{:else if node instanceof ErrorNode}<ErrorMessage {node} />
|
|
34
|
+
{:else if node instanceof RuleNode}<Rule {node} />
|
|
35
|
+
{:else if node instanceof TableNode}<Table {node} />
|
|
36
|
+
{:else}<p><Problem>Unknown node type</Problem></p>
|
|
37
|
+
{/if}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<svelte:options immutable={true} />
|
|
2
|
+
|
|
3
|
+
<script>import Block from './Block.svelte';
|
|
4
|
+
import Positioned from './Positioned.svelte';
|
|
5
|
+
export let node;
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<Positioned position={node.getPosition()}>
|
|
9
|
+
<section class={'bookish-callout'} data-nodeid={node.nodeID}>
|
|
10
|
+
{#each node.getBlocks() as element (element.nodeID)}
|
|
11
|
+
<Block node={element} />
|
|
12
|
+
{/each}
|
|
13
|
+
</section>
|
|
14
|
+
</Positioned>
|
|
15
|
+
|
|
16
|
+
<style>
|
|
17
|
+
.bookish-callout {
|
|
18
|
+
border: none;
|
|
19
|
+
border-top: 2px solid var(--bookish-border-color-bold);
|
|
20
|
+
border-bottom: 2px solid var(--bookish-border-color-bold);
|
|
21
|
+
margin: var(--bookish-paragraph-spacing);
|
|
22
|
+
padding-left: 0;
|
|
23
|
+
padding-right: 0;
|
|
24
|
+
padding-top: var(--bookish-paragraph-spacing);
|
|
25
|
+
padding-bottom: var(--bookish-paragraph-spacing);
|
|
26
|
+
line-height: var(--bookish-paragraph-line-height-tight);
|
|
27
|
+
clear: both;
|
|
28
|
+
position: relative;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.bookish-callout :global(h2),
|
|
32
|
+
.bookish-callout :global(h3),
|
|
33
|
+
.bookish-callout :global(h4) {
|
|
34
|
+
margin-top: 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.bookish-callout :global(ol),
|
|
38
|
+
.bookish-callout :global(ul) {
|
|
39
|
+
padding-left: 1rem;
|
|
40
|
+
}
|
|
41
|
+
</style>
|