@eightyfourthousand/lib-editing 2026.4.0 → 2026.4.2
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/fixtures/basic/json.d.ts +4 -0
- package/fixtures/basic/json.js +393 -0
- package/fixtures/basic/json.js.map +1 -0
- package/fixtures/toh251/json.d.ts +4 -0
- package/fixtures/toh251/json.js +4898 -0
- package/fixtures/toh251/json.js.map +1 -0
- package/fixtures/toh251/passages.d.ts +4 -0
- package/fixtures/toh251/passages.js +2764 -0
- package/fixtures/toh251/passages.js.map +1 -0
- package/fixtures/types.d.ts +6 -0
- package/fixtures/types.js +4 -0
- package/fixtures/types.js.map +1 -0
- package/index.js +5 -0
- package/index.js.map +1 -0
- package/lib/block.d.ts +3 -0
- package/lib/block.js +181 -0
- package/lib/block.js.map +1 -0
- package/lib/components/editor/BlockEditor.d.ts +7 -0
- package/lib/components/editor/BlockEditor.js +18 -0
- package/lib/components/editor/BlockEditor.js.map +1 -0
- package/lib/components/editor/EditorBackMatterPage.d.ts +1 -0
- package/lib/components/editor/EditorBackMatterPage.js +54 -0
- package/lib/components/editor/EditorBackMatterPage.js.map +1 -0
- package/lib/components/editor/EditorBodyPage.d.ts +1 -0
- package/lib/components/editor/EditorBodyPage.js +46 -0
- package/lib/components/editor/EditorBodyPage.js.map +1 -0
- package/lib/components/editor/EditorHeader.d.ts +1 -0
- package/lib/components/editor/EditorHeader.js +12 -0
- package/lib/components/editor/EditorHeader.js.map +1 -0
- package/lib/components/editor/EditorLayout.d.ts +9 -0
- package/lib/components/editor/EditorLayout.js +29 -0
- package/lib/components/editor/EditorLayout.js.map +1 -0
- package/lib/components/editor/EditorLeftPanelPage.d.ts +1 -0
- package/lib/components/editor/EditorLeftPanelPage.js +23 -0
- package/lib/components/editor/EditorLeftPanelPage.js.map +1 -0
- package/lib/components/editor/EditorProvider.d.ts +31 -0
- package/lib/components/editor/EditorProvider.js +350 -0
- package/lib/components/editor/EditorProvider.js.map +1 -0
- package/lib/components/editor/PaginationProvider.d.ts +27 -0
- package/lib/components/editor/PaginationProvider.js +307 -0
- package/lib/components/editor/PaginationProvider.js.map +1 -0
- package/lib/components/editor/TitlesBuilder.d.ts +5 -0
- package/lib/components/editor/TitlesBuilder.js +24 -0
- package/lib/components/editor/TitlesBuilder.js.map +1 -0
- package/lib/components/editor/TranslationBuilder.d.ts +2 -0
- package/lib/components/editor/TranslationBuilder.js +124 -0
- package/lib/components/editor/TranslationBuilder.js.map +1 -0
- package/lib/components/editor/TranslationEditor.d.ts +6 -0
- package/lib/components/editor/TranslationEditor.js +15 -0
- package/lib/components/editor/TranslationEditor.js.map +1 -0
- package/lib/components/editor/extensions/Abbreviation/Abbreviation.d.ts +16 -0
- package/lib/components/editor/extensions/Abbreviation/Abbreviation.js +106 -0
- package/lib/components/editor/extensions/Abbreviation/Abbreviation.js.map +1 -0
- package/lib/components/editor/extensions/Audio/Audio.d.ts +23 -0
- package/lib/components/editor/extensions/Audio/Audio.js +41 -0
- package/lib/components/editor/extensions/Audio/Audio.js.map +1 -0
- package/lib/components/editor/extensions/Bold.d.ts +1 -0
- package/lib/components/editor/extensions/Bold.js +43 -0
- package/lib/components/editor/extensions/Bold.js.map +1 -0
- package/lib/components/editor/extensions/Document.d.ts +2 -0
- package/lib/components/editor/extensions/Document.js +7 -0
- package/lib/components/editor/extensions/Document.js.map +1 -0
- package/lib/components/editor/extensions/DragHandle/DragHandle.d.ts +25 -0
- package/lib/components/editor/extensions/DragHandle/DragHandle.js +304 -0
- package/lib/components/editor/extensions/DragHandle/DragHandle.js.map +1 -0
- package/lib/components/editor/extensions/EndNoteLink/EndNoteLink.d.ts +6 -0
- package/lib/components/editor/extensions/EndNoteLink/EndNoteLink.js +20 -0
- package/lib/components/editor/extensions/EndNoteLink/EndNoteLink.js.map +1 -0
- package/lib/components/editor/extensions/EndNoteLink/EndNoteLinkHoverContent.d.ts +7 -0
- package/lib/components/editor/extensions/EndNoteLink/EndNoteLinkHoverContent.js +76 -0
- package/lib/components/editor/extensions/EndNoteLink/EndNoteLinkHoverContent.js.map +1 -0
- package/lib/components/editor/extensions/EndNoteLink/EndNoteLinkMark.d.ts +13 -0
- package/lib/components/editor/extensions/EndNoteLink/EndNoteLinkMark.js +176 -0
- package/lib/components/editor/extensions/EndNoteLink/EndNoteLinkMark.js.map +1 -0
- package/lib/components/editor/extensions/EndNoteLink/endnote-utils.d.ts +86 -0
- package/lib/components/editor/extensions/EndNoteLink/endnote-utils.js +314 -0
- package/lib/components/editor/extensions/EndNoteLink/endnote-utils.js.map +1 -0
- package/lib/components/editor/extensions/GlobalConfig.d.ts +23 -0
- package/lib/components/editor/extensions/GlobalConfig.js +23 -0
- package/lib/components/editor/extensions/GlobalConfig.js.map +1 -0
- package/lib/components/editor/extensions/GlossaryInstance/GlossaryInput.d.ts +4 -0
- package/lib/components/editor/extensions/GlossaryInstance/GlossaryInput.js +22 -0
- package/lib/components/editor/extensions/GlossaryInstance/GlossaryInput.js.map +1 -0
- package/lib/components/editor/extensions/GlossaryInstance/GlossaryInstance.d.ts +7 -0
- package/lib/components/editor/extensions/GlossaryInstance/GlossaryInstance.js +67 -0
- package/lib/components/editor/extensions/GlossaryInstance/GlossaryInstance.js.map +1 -0
- package/lib/components/editor/extensions/GlossaryInstance/GlossaryInstanceNode.d.ts +13 -0
- package/lib/components/editor/extensions/GlossaryInstance/GlossaryInstanceNode.js +118 -0
- package/lib/components/editor/extensions/GlossaryInstance/GlossaryInstanceNode.js.map +1 -0
- package/lib/components/editor/extensions/Heading/Heading.d.ts +2 -0
- package/lib/components/editor/extensions/Heading/Heading.js +54 -0
- package/lib/components/editor/extensions/Heading/Heading.js.map +1 -0
- package/lib/components/editor/extensions/HoverInputField.d.ts +7 -0
- package/lib/components/editor/extensions/HoverInputField.js +19 -0
- package/lib/components/editor/extensions/HoverInputField.js.map +1 -0
- package/lib/components/editor/extensions/Image.d.ts +2 -0
- package/lib/components/editor/extensions/Image.js +16 -0
- package/lib/components/editor/extensions/Image.js.map +1 -0
- package/lib/components/editor/extensions/Indent.d.ts +24 -0
- package/lib/components/editor/extensions/Indent.js +66 -0
- package/lib/components/editor/extensions/Indent.js.map +1 -0
- package/lib/components/editor/extensions/InternalLink/InternalLink.d.ts +13 -0
- package/lib/components/editor/extensions/InternalLink/InternalLink.js +145 -0
- package/lib/components/editor/extensions/InternalLink/InternalLink.js.map +1 -0
- package/lib/components/editor/extensions/InternalLink/InternalLinkHoverContent.d.ts +8 -0
- package/lib/components/editor/extensions/InternalLink/InternalLinkHoverContent.js +71 -0
- package/lib/components/editor/extensions/InternalLink/InternalLinkHoverContent.js.map +1 -0
- package/lib/components/editor/extensions/InternalLink/InternalLinkInput.d.ts +5 -0
- package/lib/components/editor/extensions/InternalLink/InternalLinkInput.js +31 -0
- package/lib/components/editor/extensions/InternalLink/InternalLinkInput.js.map +1 -0
- package/lib/components/editor/extensions/InternalLink/index.js +2 -0
- package/lib/components/editor/extensions/InternalLink/index.js.map +1 -0
- package/lib/components/editor/extensions/Italic.d.ts +1 -0
- package/lib/components/editor/extensions/Italic.js +50 -0
- package/lib/components/editor/extensions/Italic.js.map +1 -0
- package/lib/components/editor/extensions/LeadingSpace.d.ts +24 -0
- package/lib/components/editor/extensions/LeadingSpace.js +69 -0
- package/lib/components/editor/extensions/LeadingSpace.js.map +1 -0
- package/lib/components/editor/extensions/Line/LineNode.d.ts +2 -0
- package/lib/components/editor/extensions/Line/LineNode.js +32 -0
- package/lib/components/editor/extensions/Line/LineNode.js.map +1 -0
- package/lib/components/editor/extensions/LineGroup/LineGroupNode.d.ts +19 -0
- package/lib/components/editor/extensions/LineGroup/LineGroupNode.js +86 -0
- package/lib/components/editor/extensions/LineGroup/LineGroupNode.js.map +1 -0
- package/lib/components/editor/extensions/Link/Link.d.ts +1 -0
- package/lib/components/editor/extensions/Link/Link.js +61 -0
- package/lib/components/editor/extensions/Link/Link.js.map +1 -0
- package/lib/components/editor/extensions/Link/LinkHoverContent.d.ts +7 -0
- package/lib/components/editor/extensions/Link/LinkHoverContent.js +59 -0
- package/lib/components/editor/extensions/Link/LinkHoverContent.js.map +1 -0
- package/lib/components/editor/extensions/Link/index.js +2 -0
- package/lib/components/editor/extensions/Link/index.js.map +1 -0
- package/lib/components/editor/extensions/List.d.ts +3 -0
- package/lib/components/editor/extensions/List.js +68 -0
- package/lib/components/editor/extensions/List.js.map +1 -0
- package/lib/components/editor/extensions/Mantra/Mantra.d.ts +15 -0
- package/lib/components/editor/extensions/Mantra/Mantra.js +63 -0
- package/lib/components/editor/extensions/Mantra/Mantra.js.map +1 -0
- package/lib/components/editor/extensions/Mention/Mention.d.ts +22 -0
- package/lib/components/editor/extensions/Mention/Mention.js +142 -0
- package/lib/components/editor/extensions/Mention/Mention.js.map +1 -0
- package/lib/components/editor/extensions/Mention/MentionHoverContent.d.ts +8 -0
- package/lib/components/editor/extensions/Mention/MentionHoverContent.js +86 -0
- package/lib/components/editor/extensions/Mention/MentionHoverContent.js.map +1 -0
- package/lib/components/editor/extensions/NodeWrapper.d.ts +18 -0
- package/lib/components/editor/extensions/NodeWrapper.js +14 -0
- package/lib/components/editor/extensions/NodeWrapper.js.map +1 -0
- package/lib/components/editor/extensions/Paragraph/Paragraph.d.ts +2 -0
- package/lib/components/editor/extensions/Paragraph/Paragraph.js +23 -0
- package/lib/components/editor/extensions/Paragraph/Paragraph.js.map +1 -0
- package/lib/components/editor/extensions/ParagraphIndent.d.ts +24 -0
- package/lib/components/editor/extensions/ParagraphIndent.js +52 -0
- package/lib/components/editor/extensions/ParagraphIndent.js.map +1 -0
- package/lib/components/editor/extensions/Passage/EditLabel.d.ts +4 -0
- package/lib/components/editor/extensions/Passage/EditLabel.js +19 -0
- package/lib/components/editor/extensions/Passage/EditLabel.js.map +1 -0
- package/lib/components/editor/extensions/Passage/EditorOptions.d.ts +3 -0
- package/lib/components/editor/extensions/Passage/EditorOptions.js +8 -0
- package/lib/components/editor/extensions/Passage/EditorOptions.js.map +1 -0
- package/lib/components/editor/extensions/Passage/Passage.d.ts +3 -0
- package/lib/components/editor/extensions/Passage/Passage.js +74 -0
- package/lib/components/editor/extensions/Passage/Passage.js.map +1 -0
- package/lib/components/editor/extensions/Passage/PassageNode.d.ts +10 -0
- package/lib/components/editor/extensions/Passage/PassageNode.js +185 -0
- package/lib/components/editor/extensions/Passage/PassageNode.js.map +1 -0
- package/lib/components/editor/extensions/Passage/ReaderOptions.d.ts +8 -0
- package/lib/components/editor/extensions/Passage/ReaderOptions.js +24 -0
- package/lib/components/editor/extensions/Passage/ReaderOptions.js.map +1 -0
- package/lib/components/editor/extensions/Passage/ShowAnnotations.d.ts +2 -0
- package/lib/components/editor/extensions/Passage/ShowAnnotations.js +30 -0
- package/lib/components/editor/extensions/Passage/ShowAnnotations.js.map +1 -0
- package/lib/components/editor/extensions/Passage/index.js +2 -0
- package/lib/components/editor/extensions/Passage/index.js.map +1 -0
- package/lib/components/editor/extensions/Passage/label.d.ts +22 -0
- package/lib/components/editor/extensions/Passage/label.js +37 -0
- package/lib/components/editor/extensions/Passage/label.js.map +1 -0
- package/lib/components/editor/extensions/Placeholder.d.ts +2 -0
- package/lib/components/editor/extensions/Placeholder.js +9 -0
- package/lib/components/editor/extensions/Placeholder.js.map +1 -0
- package/lib/components/editor/extensions/SlashCommand/SlashCommand.d.ts +32 -0
- package/lib/components/editor/extensions/SlashCommand/SlashCommand.js +35 -0
- package/lib/components/editor/extensions/SlashCommand/SlashCommand.js.map +1 -0
- package/lib/components/editor/extensions/SlashCommand/SuggestionList.d.ts +12 -0
- package/lib/components/editor/extensions/SlashCommand/SuggestionList.js +49 -0
- package/lib/components/editor/extensions/SlashCommand/SuggestionList.js.map +1 -0
- package/lib/components/editor/extensions/SlashCommand/Suggestions.d.ts +13 -0
- package/lib/components/editor/extensions/SlashCommand/Suggestions.js +149 -0
- package/lib/components/editor/extensions/SlashCommand/Suggestions.js.map +1 -0
- package/lib/components/editor/extensions/SmallCaps.d.ts +34 -0
- package/lib/components/editor/extensions/SmallCaps.js +68 -0
- package/lib/components/editor/extensions/SmallCaps.js.map +1 -0
- package/lib/components/editor/extensions/StarterKit.d.ts +4 -0
- package/lib/components/editor/extensions/StarterKit.js +31 -0
- package/lib/components/editor/extensions/StarterKit.js.map +1 -0
- package/lib/components/editor/extensions/Subscript.d.ts +1 -0
- package/lib/components/editor/extensions/Subscript.js +43 -0
- package/lib/components/editor/extensions/Subscript.js.map +1 -0
- package/lib/components/editor/extensions/Superscript.d.ts +1 -0
- package/lib/components/editor/extensions/Superscript.js +43 -0
- package/lib/components/editor/extensions/Superscript.js.map +1 -0
- package/lib/components/editor/extensions/Table.d.ts +1 -0
- package/lib/components/editor/extensions/Table.js +27 -0
- package/lib/components/editor/extensions/Table.js.map +1 -0
- package/lib/components/editor/extensions/TextAlign.d.ts +2 -0
- package/lib/components/editor/extensions/TextAlign.js +5 -0
- package/lib/components/editor/extensions/TextAlign.js.map +1 -0
- package/lib/components/editor/extensions/TitleMetadata.d.ts +2 -0
- package/lib/components/editor/extensions/TitleMetadata.js +40 -0
- package/lib/components/editor/extensions/TitleMetadata.js.map +1 -0
- package/lib/components/editor/extensions/TitleNode.d.ts +8 -0
- package/lib/components/editor/extensions/TitleNode.js +118 -0
- package/lib/components/editor/extensions/TitleNode.js.map +1 -0
- package/lib/components/editor/extensions/TitlesNode.d.ts +7 -0
- package/lib/components/editor/extensions/TitlesNode.js +89 -0
- package/lib/components/editor/extensions/TitlesNode.js.map +1 -0
- package/lib/components/editor/extensions/Trailer.d.ts +16 -0
- package/lib/components/editor/extensions/Trailer.js +35 -0
- package/lib/components/editor/extensions/Trailer.js.map +1 -0
- package/lib/components/editor/extensions/TranslationDocument.d.ts +3 -0
- package/lib/components/editor/extensions/TranslationDocument.js +7 -0
- package/lib/components/editor/extensions/TranslationDocument.js.map +1 -0
- package/lib/components/editor/extensions/TranslationMetadata.d.ts +3 -0
- package/lib/components/editor/extensions/TranslationMetadata.js +56 -0
- package/lib/components/editor/extensions/TranslationMetadata.js.map +1 -0
- package/lib/components/editor/extensions/Underline.d.ts +1 -0
- package/lib/components/editor/extensions/Underline.js +43 -0
- package/lib/components/editor/extensions/Underline.js.map +1 -0
- package/lib/components/editor/hooks/index.js +5 -0
- package/lib/components/editor/hooks/index.js.map +1 -0
- package/lib/components/editor/hooks/useBlockEditor.d.ts +13 -0
- package/lib/components/editor/hooks/useBlockEditor.js +30 -0
- package/lib/components/editor/hooks/useBlockEditor.js.map +1 -0
- package/lib/components/editor/hooks/useDefaultExtensions.d.ts +3 -0
- package/lib/components/editor/hooks/useDefaultExtensions.js +38 -0
- package/lib/components/editor/hooks/useDefaultExtensions.js.map +1 -0
- package/lib/components/editor/hooks/useDirtyStore.d.ts +8 -0
- package/lib/components/editor/hooks/useDirtyStore.js +23 -0
- package/lib/components/editor/hooks/useDirtyStore.js.map +1 -0
- package/lib/components/editor/hooks/useTranslationExtensions.d.ts +6 -0
- package/lib/components/editor/hooks/useTranslationExtensions.js +120 -0
- package/lib/components/editor/hooks/useTranslationExtensions.js.map +1 -0
- package/lib/components/editor/index.js +11 -0
- package/lib/components/editor/index.js.map +1 -0
- package/lib/components/editor/menus/EmptyBubbleMenu.d.ts +4 -0
- package/lib/components/editor/menus/EmptyBubbleMenu.js +24 -0
- package/lib/components/editor/menus/EmptyBubbleMenu.js.map +1 -0
- package/lib/components/editor/menus/MainBubbleMenu.d.ts +4 -0
- package/lib/components/editor/menus/MainBubbleMenu.js +28 -0
- package/lib/components/editor/menus/MainBubbleMenu.js.map +1 -0
- package/lib/components/editor/menus/TranslationBubbleMenu.d.ts +4 -0
- package/lib/components/editor/menus/TranslationBubbleMenu.js +30 -0
- package/lib/components/editor/menus/TranslationBubbleMenu.js.map +1 -0
- package/lib/components/editor/menus/index.js +4 -0
- package/lib/components/editor/menus/index.js.map +1 -0
- package/lib/components/editor/menus/selectors/EndNoteSelector.d.ts +4 -0
- package/lib/components/editor/menus/selectors/EndNoteSelector.js +250 -0
- package/lib/components/editor/menus/selectors/EndNoteSelector.js.map +1 -0
- package/lib/components/editor/menus/selectors/GlossarySelector.d.ts +4 -0
- package/lib/components/editor/menus/selectors/GlossarySelector.js +26 -0
- package/lib/components/editor/menus/selectors/GlossarySelector.js.map +1 -0
- package/lib/components/editor/menus/selectors/LinkSelector.d.ts +4 -0
- package/lib/components/editor/menus/selectors/LinkSelector.js +31 -0
- package/lib/components/editor/menus/selectors/LinkSelector.js.map +1 -0
- package/lib/components/editor/menus/selectors/MantraSelector.d.ts +4 -0
- package/lib/components/editor/menus/selectors/MantraSelector.js +63 -0
- package/lib/components/editor/menus/selectors/MantraSelector.js.map +1 -0
- package/lib/components/editor/menus/selectors/NodeSelector.d.ts +4 -0
- package/lib/components/editor/menus/selectors/NodeSelector.js +74 -0
- package/lib/components/editor/menus/selectors/NodeSelector.js.map +1 -0
- package/lib/components/editor/menus/selectors/ParagraphButtons.d.ts +4 -0
- package/lib/components/editor/menus/selectors/ParagraphButtons.js +42 -0
- package/lib/components/editor/menus/selectors/ParagraphButtons.js.map +1 -0
- package/lib/components/editor/menus/selectors/SelectorInputField.d.ts +8 -0
- package/lib/components/editor/menus/selectors/SelectorInputField.js +28 -0
- package/lib/components/editor/menus/selectors/SelectorInputField.js.map +1 -0
- package/lib/components/editor/menus/selectors/TextAlignSelector.d.ts +4 -0
- package/lib/components/editor/menus/selectors/TextAlignSelector.js +42 -0
- package/lib/components/editor/menus/selectors/TextAlignSelector.js.map +1 -0
- package/lib/components/editor/menus/selectors/TextButtons.d.ts +4 -0
- package/lib/components/editor/menus/selectors/TextButtons.js +56 -0
- package/lib/components/editor/menus/selectors/TextButtons.js.map +1 -0
- package/lib/components/editor/menus/selectors/TranslationNodeSelector.d.ts +4 -0
- package/lib/components/editor/menus/selectors/TranslationNodeSelector.js +74 -0
- package/lib/components/editor/menus/selectors/TranslationNodeSelector.js.map +1 -0
- package/lib/components/editor/menus/selectors/TranslationTextButtons.d.ts +4 -0
- package/lib/components/editor/menus/selectors/TranslationTextButtons.js +75 -0
- package/lib/components/editor/menus/selectors/TranslationTextButtons.js.map +1 -0
- package/lib/components/editor/menus/selectors/index.js +6 -0
- package/lib/components/editor/menus/selectors/index.js.map +1 -0
- package/lib/components/editor/save-filter.d.ts +13 -0
- package/lib/components/editor/save-filter.js +15 -0
- package/lib/components/editor/save-filter.js.map +1 -0
- package/lib/components/editor/util.d.ts +98 -0
- package/lib/components/editor/util.js +189 -0
- package/lib/components/editor/util.js.map +1 -0
- package/lib/components/index.js +4 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/reader/ReaderBackMatterPage.d.ts +5 -0
- package/lib/components/reader/ReaderBackMatterPage.js +37 -0
- package/lib/components/reader/ReaderBackMatterPage.js.map +1 -0
- package/lib/components/reader/ReaderBackMatterPanel.d.ts +11 -0
- package/lib/components/reader/ReaderBackMatterPanel.js +15 -0
- package/lib/components/reader/ReaderBackMatterPanel.js.map +1 -0
- package/lib/components/reader/ReaderBodyPage.d.ts +5 -0
- package/lib/components/reader/ReaderBodyPage.js +28 -0
- package/lib/components/reader/ReaderBodyPage.js.map +1 -0
- package/lib/components/reader/ReaderBodyPanel.d.ts +8 -0
- package/lib/components/reader/ReaderBodyPanel.js +19 -0
- package/lib/components/reader/ReaderBodyPanel.js.map +1 -0
- package/lib/components/reader/ReaderLayout.d.ts +10 -0
- package/lib/components/reader/ReaderLayout.js +11 -0
- package/lib/components/reader/ReaderLayout.js.map +1 -0
- package/lib/components/reader/ReaderLeftPanel.d.ts +5 -0
- package/lib/components/reader/ReaderLeftPanel.js +7 -0
- package/lib/components/reader/ReaderLeftPanel.js.map +1 -0
- package/lib/components/reader/ReaderLeftPanelPage.d.ts +5 -0
- package/lib/components/reader/ReaderLeftPanelPage.js +19 -0
- package/lib/components/reader/ReaderLeftPanelPage.js.map +1 -0
- package/lib/components/reader/TranslationReader.d.ts +2 -0
- package/lib/components/reader/TranslationReader.js +10 -0
- package/lib/components/reader/TranslationReader.js.map +1 -0
- package/lib/components/reader/index.js +3 -0
- package/lib/components/reader/index.js.map +1 -0
- package/lib/components/reader/ssr.js +4 -0
- package/lib/components/reader/ssr.js.map +1 -0
- package/lib/components/shared/AiSummarizerPage.d.ts +1 -0
- package/lib/components/shared/AiSummarizerPage.js +11 -0
- package/lib/components/shared/AiSummarizerPage.js.map +1 -0
- package/lib/components/shared/BackMatterPanel.d.ts +15 -0
- package/lib/components/shared/BackMatterPanel.js +31 -0
- package/lib/components/shared/BackMatterPanel.js.map +1 -0
- package/lib/components/shared/BodyPanel.d.ts +12 -0
- package/lib/components/shared/BodyPanel.js +81 -0
- package/lib/components/shared/BodyPanel.js.map +1 -0
- package/lib/components/shared/HoverCardProvider.d.ts +23 -0
- package/lib/components/shared/HoverCardProvider.js +261 -0
- package/lib/components/shared/HoverCardProvider.js.map +1 -0
- package/lib/components/shared/Imprint.d.ts +4 -0
- package/lib/components/shared/Imprint.js +11 -0
- package/lib/components/shared/Imprint.js.map +1 -0
- package/lib/components/shared/LabeledElement.d.ts +9 -0
- package/lib/components/shared/LabeledElement.js +41 -0
- package/lib/components/shared/LabeledElement.js.map +1 -0
- package/lib/components/shared/LeftPanel.d.ts +6 -0
- package/lib/components/shared/LeftPanel.js +22 -0
- package/lib/components/shared/LeftPanel.js.map +1 -0
- package/lib/components/shared/NavigationContext.d.ts +25 -0
- package/lib/components/shared/NavigationContext.js +30 -0
- package/lib/components/shared/NavigationContext.js.map +1 -0
- package/lib/components/shared/NavigationProvider.d.ts +7 -0
- package/lib/components/shared/NavigationProvider.js +266 -0
- package/lib/components/shared/NavigationProvider.js.map +1 -0
- package/lib/components/shared/OpenGraphImage.d.ts +13 -0
- package/lib/components/shared/OpenGraphImage.js +46 -0
- package/lib/components/shared/OpenGraphImage.js.map +1 -0
- package/lib/components/shared/PassageSkeleton.d.ts +1 -0
- package/lib/components/shared/PassageSkeleton.js +6 -0
- package/lib/components/shared/PassageSkeleton.js.map +1 -0
- package/lib/components/shared/ReaderSearchButton.d.ts +1 -0
- package/lib/components/shared/ReaderSearchButton.js +71 -0
- package/lib/components/shared/ReaderSearchButton.js.map +1 -0
- package/lib/components/shared/RestrictionWarning.d.ts +13 -0
- package/lib/components/shared/RestrictionWarning.js +61 -0
- package/lib/components/shared/RestrictionWarning.js.map +1 -0
- package/lib/components/shared/SearchReplacePanel.d.ts +9 -0
- package/lib/components/shared/SearchReplacePanel.js +134 -0
- package/lib/components/shared/SearchReplacePanel.js.map +1 -0
- package/lib/components/shared/SourceReader.d.ts +1 -0
- package/lib/components/shared/SourceReader.js +48 -0
- package/lib/components/shared/SourceReader.js.map +1 -0
- package/lib/components/shared/SuggestRevisionForm.d.ts +6 -0
- package/lib/components/shared/SuggestRevisionForm.js +43 -0
- package/lib/components/shared/SuggestRevisionForm.js.map +1 -0
- package/lib/components/shared/TableOfContents.d.ts +13 -0
- package/lib/components/shared/TableOfContents.js +131 -0
- package/lib/components/shared/TableOfContents.js.map +1 -0
- package/lib/components/shared/ThreeColumnRenderer.d.ts +5 -0
- package/lib/components/shared/ThreeColumnRenderer.js +28 -0
- package/lib/components/shared/ThreeColumnRenderer.js.map +1 -0
- package/lib/components/shared/TranslationHeader.d.ts +3 -0
- package/lib/components/shared/TranslationHeader.js +10 -0
- package/lib/components/shared/TranslationHeader.js.map +1 -0
- package/lib/components/shared/TranslationHoverCard.d.ts +7 -0
- package/lib/components/shared/TranslationHoverCard.js +41 -0
- package/lib/components/shared/TranslationHoverCard.js.map +1 -0
- package/lib/components/shared/TranslationSkeleton.d.ts +3 -0
- package/lib/components/shared/TranslationSkeleton.js +7 -0
- package/lib/components/shared/TranslationSkeleton.js.map +1 -0
- package/lib/components/shared/TranslationTable.d.ts +4 -0
- package/lib/components/shared/TranslationTable.js +83 -0
- package/lib/components/shared/TranslationTable.js.map +1 -0
- package/lib/components/shared/bibliography/BibliographyBody.d.ts +5 -0
- package/lib/components/shared/bibliography/BibliographyBody.js +11 -0
- package/lib/components/shared/bibliography/BibliographyBody.js.map +1 -0
- package/lib/components/shared/bibliography/BibliographyList.d.ts +5 -0
- package/lib/components/shared/bibliography/BibliographyList.js +15 -0
- package/lib/components/shared/bibliography/BibliographyList.js.map +1 -0
- package/lib/components/shared/bibliography/index.js +2 -0
- package/lib/components/shared/bibliography/index.js.map +1 -0
- package/lib/components/shared/generate-metadata.d.ts +6 -0
- package/lib/components/shared/generate-metadata.js +29 -0
- package/lib/components/shared/generate-metadata.js.map +1 -0
- package/lib/components/shared/glossary/GlossaryInstanceBody.d.ts +6 -0
- package/lib/components/shared/glossary/GlossaryInstanceBody.js +48 -0
- package/lib/components/shared/glossary/GlossaryInstanceBody.js.map +1 -0
- package/lib/components/shared/glossary/GlossaryPaginationProvider.d.ts +19 -0
- package/lib/components/shared/glossary/GlossaryPaginationProvider.js +179 -0
- package/lib/components/shared/glossary/GlossaryPaginationProvider.js.map +1 -0
- package/lib/components/shared/glossary/GlossarySkeleton.d.ts +5 -0
- package/lib/components/shared/glossary/GlossarySkeleton.js +10 -0
- package/lib/components/shared/glossary/GlossarySkeleton.js.map +1 -0
- package/lib/components/shared/glossary/GlossaryTermList.d.ts +4 -0
- package/lib/components/shared/glossary/GlossaryTermList.js +17 -0
- package/lib/components/shared/glossary/GlossaryTermList.js.map +1 -0
- package/lib/components/shared/glossary/index.js +4 -0
- package/lib/components/shared/glossary/index.js.map +1 -0
- package/lib/components/shared/hooks/useGlossaryInstanceListener.d.ts +4 -0
- package/lib/components/shared/hooks/useGlossaryInstanceListener.js +30 -0
- package/lib/components/shared/hooks/useGlossaryInstanceListener.js.map +1 -0
- package/lib/components/shared/hooks/usePaginationLoadTriggers.d.ts +12 -0
- package/lib/components/shared/hooks/usePaginationLoadTriggers.js +94 -0
- package/lib/components/shared/hooks/usePaginationLoadTriggers.js.map +1 -0
- package/lib/components/shared/hooks/useScrollInTab.d.ts +7 -0
- package/lib/components/shared/hooks/useScrollInTab.js +30 -0
- package/lib/components/shared/hooks/useScrollInTab.js.map +1 -0
- package/lib/components/shared/hooks/useScrollPositionRestore.d.ts +44 -0
- package/lib/components/shared/hooks/useScrollPositionRestore.js +217 -0
- package/lib/components/shared/hooks/useScrollPositionRestore.js.map +1 -0
- package/lib/components/shared/hooks/useTohToggle.d.ts +5 -0
- package/lib/components/shared/hooks/useTohToggle.js +35 -0
- package/lib/components/shared/hooks/useTohToggle.js.map +1 -0
- package/lib/components/shared/index.js +12 -0
- package/lib/components/shared/index.js.map +1 -0
- package/lib/components/shared/ssr.js +3 -0
- package/lib/components/shared/ssr.js.map +1 -0
- package/lib/components/shared/titles/FramedCard.d.ts +7 -0
- package/lib/components/shared/titles/FramedCard.js +21 -0
- package/lib/components/shared/titles/FramedCard.js.map +1 -0
- package/lib/components/shared/titles/LongTitle.d.ts +5 -0
- package/lib/components/shared/titles/LongTitle.js +12 -0
- package/lib/components/shared/titles/LongTitle.js.map +1 -0
- package/lib/components/shared/titles/LongTitles.d.ts +4 -0
- package/lib/components/shared/titles/LongTitles.js +14 -0
- package/lib/components/shared/titles/LongTitles.js.map +1 -0
- package/lib/components/shared/titles/Title.d.ts +20 -0
- package/lib/components/shared/titles/Title.js +37 -0
- package/lib/components/shared/titles/Title.js.map +1 -0
- package/lib/components/shared/titles/TitleDetails.d.ts +4 -0
- package/lib/components/shared/titles/TitleDetails.js +16 -0
- package/lib/components/shared/titles/TitleDetails.js.map +1 -0
- package/lib/components/shared/titles/TitleForm.d.ts +5 -0
- package/lib/components/shared/titles/TitleForm.js +15 -0
- package/lib/components/shared/titles/TitleForm.js.map +1 -0
- package/lib/components/shared/titles/Titles.d.ts +8 -0
- package/lib/components/shared/titles/Titles.js +64 -0
- package/lib/components/shared/titles/Titles.js.map +1 -0
- package/lib/components/shared/titles/TitlesCard.d.ts +12 -0
- package/lib/components/shared/titles/TitlesCard.js +10 -0
- package/lib/components/shared/titles/TitlesCard.js.map +1 -0
- package/lib/components/shared/titles/index.js +9 -0
- package/lib/components/shared/titles/index.js.map +1 -0
- package/lib/components/shared/types.d.ts +30 -0
- package/lib/components/shared/types.js +34 -0
- package/lib/components/shared/types.js.map +1 -0
- package/lib/components/ssr.js +3 -0
- package/lib/components/ssr.js.map +1 -0
- package/lib/exporters/abbreviation.d.ts +3 -0
- package/lib/exporters/abbreviation.js +14 -0
- package/lib/exporters/abbreviation.js.map +1 -0
- package/lib/exporters/annotation.d.ts +5 -0
- package/lib/exporters/annotation.js +161 -0
- package/lib/exporters/annotation.js.map +1 -0
- package/lib/exporters/audio.d.ts +3 -0
- package/lib/exporters/audio.js +19 -0
- package/lib/exporters/audio.js.map +1 -0
- package/lib/exporters/blockquote.d.ts +3 -0
- package/lib/exporters/blockquote.js +16 -0
- package/lib/exporters/blockquote.js.map +1 -0
- package/lib/exporters/code.d.ts +3 -0
- package/lib/exporters/code.js +16 -0
- package/lib/exporters/code.js.map +1 -0
- package/lib/exporters/end-note-link.d.ts +3 -0
- package/lib/exporters/end-note-link.js +23 -0
- package/lib/exporters/end-note-link.js.map +1 -0
- package/lib/exporters/export.d.ts +10 -0
- package/lib/exporters/export.js +2 -0
- package/lib/exporters/export.js.map +1 -0
- package/lib/exporters/glossary-instance.d.ts +3 -0
- package/lib/exporters/glossary-instance.js +20 -0
- package/lib/exporters/glossary-instance.js.map +1 -0
- package/lib/exporters/has-abbreviation.d.ts +3 -0
- package/lib/exporters/has-abbreviation.js +14 -0
- package/lib/exporters/has-abbreviation.js.map +1 -0
- package/lib/exporters/heading.d.ts +3 -0
- package/lib/exporters/heading.js +20 -0
- package/lib/exporters/heading.js.map +1 -0
- package/lib/exporters/image.d.ts +3 -0
- package/lib/exporters/image.js +17 -0
- package/lib/exporters/image.js.map +1 -0
- package/lib/exporters/indent.d.ts +3 -0
- package/lib/exporters/indent.js +11 -0
- package/lib/exporters/indent.js.map +1 -0
- package/lib/exporters/index.js +2 -0
- package/lib/exporters/index.js.map +1 -0
- package/lib/exporters/internal-link.d.ts +3 -0
- package/lib/exporters/internal-link.js +24 -0
- package/lib/exporters/internal-link.js.map +1 -0
- package/lib/exporters/italic.d.ts +3 -0
- package/lib/exporters/italic.js +33 -0
- package/lib/exporters/italic.js.map +1 -0
- package/lib/exporters/leading-space.d.ts +3 -0
- package/lib/exporters/leading-space.js +10 -0
- package/lib/exporters/leading-space.js.map +1 -0
- package/lib/exporters/line-group.d.ts +3 -0
- package/lib/exporters/line-group.js +16 -0
- package/lib/exporters/line-group.js.map +1 -0
- package/lib/exporters/line.d.ts +3 -0
- package/lib/exporters/line.js +16 -0
- package/lib/exporters/line.js.map +1 -0
- package/lib/exporters/link.d.ts +4 -0
- package/lib/exporters/link.js +43 -0
- package/lib/exporters/link.js.map +1 -0
- package/lib/exporters/list-item.d.ts +3 -0
- package/lib/exporters/list-item.js +16 -0
- package/lib/exporters/list-item.js.map +1 -0
- package/lib/exporters/list.d.ts +3 -0
- package/lib/exporters/list.js +22 -0
- package/lib/exporters/list.js.map +1 -0
- package/lib/exporters/mantra.d.ts +3 -0
- package/lib/exporters/mantra.js +17 -0
- package/lib/exporters/mantra.js.map +1 -0
- package/lib/exporters/mention.d.ts +3 -0
- package/lib/exporters/mention.js +23 -0
- package/lib/exporters/mention.js.map +1 -0
- package/lib/exporters/paragraph.d.ts +3 -0
- package/lib/exporters/paragraph.js +22 -0
- package/lib/exporters/paragraph.js.map +1 -0
- package/lib/exporters/quote.d.ts +3 -0
- package/lib/exporters/quote.js +16 -0
- package/lib/exporters/quote.js.map +1 -0
- package/lib/exporters/span.d.ts +3 -0
- package/lib/exporters/span.js +29 -0
- package/lib/exporters/span.js.map +1 -0
- package/lib/exporters/table-body-data.d.ts +3 -0
- package/lib/exporters/table-body-data.js +16 -0
- package/lib/exporters/table-body-data.js.map +1 -0
- package/lib/exporters/table-body-header.d.ts +3 -0
- package/lib/exporters/table-body-header.js +16 -0
- package/lib/exporters/table-body-header.js.map +1 -0
- package/lib/exporters/table-body-row.d.ts +3 -0
- package/lib/exporters/table-body-row.js +16 -0
- package/lib/exporters/table-body-row.js.map +1 -0
- package/lib/exporters/table.d.ts +3 -0
- package/lib/exporters/table.js +16 -0
- package/lib/exporters/table.js.map +1 -0
- package/lib/exporters/trailer.d.ts +3 -0
- package/lib/exporters/trailer.js +16 -0
- package/lib/exporters/trailer.js.map +1 -0
- package/lib/exporters/util.d.ts +3 -0
- package/lib/exporters/util.js +48 -0
- package/lib/exporters/util.js.map +1 -0
- package/lib/passage.d.ts +10 -0
- package/lib/passage.js +153 -0
- package/lib/passage.js.map +1 -0
- package/lib/titles.d.ts +3 -0
- package/lib/titles.js +68 -0
- package/lib/titles.js.map +1 -0
- package/lib/transformers/abbreviation.d.ts +2 -0
- package/lib/transformers/abbreviation.js +27 -0
- package/lib/transformers/abbreviation.js.map +1 -0
- package/lib/transformers/annotate.d.ts +8 -0
- package/lib/transformers/annotate.js +98 -0
- package/lib/transformers/annotate.js.map +1 -0
- package/lib/transformers/audio.d.ts +2 -0
- package/lib/transformers/audio.js +27 -0
- package/lib/transformers/audio.js.map +1 -0
- package/lib/transformers/blockquote.d.ts +2 -0
- package/lib/transformers/blockquote.js +39 -0
- package/lib/transformers/blockquote.js.map +1 -0
- package/lib/transformers/code.d.ts +2 -0
- package/lib/transformers/code.js +20 -0
- package/lib/transformers/code.js.map +1 -0
- package/lib/transformers/deprecated.d.ts +2 -0
- package/lib/transformers/deprecated.js +4 -0
- package/lib/transformers/deprecated.js.map +1 -0
- package/lib/transformers/end-note-link.d.ts +2 -0
- package/lib/transformers/end-note-link.js +67 -0
- package/lib/transformers/end-note-link.js.map +1 -0
- package/lib/transformers/glossary-instance.d.ts +2 -0
- package/lib/transformers/glossary-instance.js +35 -0
- package/lib/transformers/glossary-instance.js.map +1 -0
- package/lib/transformers/has-abbreviation.d.ts +2 -0
- package/lib/transformers/has-abbreviation.js +32 -0
- package/lib/transformers/has-abbreviation.js.map +1 -0
- package/lib/transformers/heading.d.ts +2 -0
- package/lib/transformers/heading.js +26 -0
- package/lib/transformers/heading.js.map +1 -0
- package/lib/transformers/image.d.ts +2 -0
- package/lib/transformers/image.js +26 -0
- package/lib/transformers/image.js.map +1 -0
- package/lib/transformers/indent.d.ts +2 -0
- package/lib/transformers/indent.js +16 -0
- package/lib/transformers/indent.js.map +1 -0
- package/lib/transformers/index.js +34 -0
- package/lib/transformers/index.js.map +1 -0
- package/lib/transformers/inline-title.d.ts +2 -0
- package/lib/transformers/inline-title.js +28 -0
- package/lib/transformers/inline-title.js.map +1 -0
- package/lib/transformers/internal-link.d.ts +2 -0
- package/lib/transformers/internal-link.js +44 -0
- package/lib/transformers/internal-link.js.map +1 -0
- package/lib/transformers/italic.d.ts +2 -0
- package/lib/transformers/italic.js +20 -0
- package/lib/transformers/italic.js.map +1 -0
- package/lib/transformers/leading-space.d.ts +2 -0
- package/lib/transformers/leading-space.js +16 -0
- package/lib/transformers/leading-space.js.map +1 -0
- package/lib/transformers/line-group.d.ts +2 -0
- package/lib/transformers/line-group.js +34 -0
- package/lib/transformers/line-group.js.map +1 -0
- package/lib/transformers/line.d.ts +2 -0
- package/lib/transformers/line.js +25 -0
- package/lib/transformers/line.js.map +1 -0
- package/lib/transformers/link.d.ts +2 -0
- package/lib/transformers/link.js +23 -0
- package/lib/transformers/link.js.map +1 -0
- package/lib/transformers/list-item.d.ts +2 -0
- package/lib/transformers/list-item.js +34 -0
- package/lib/transformers/list-item.js.map +1 -0
- package/lib/transformers/list.d.ts +2 -0
- package/lib/transformers/list.js +37 -0
- package/lib/transformers/list.js.map +1 -0
- package/lib/transformers/mantra.d.ts +2 -0
- package/lib/transformers/mantra.js +23 -0
- package/lib/transformers/mantra.js.map +1 -0
- package/lib/transformers/mention.d.ts +2 -0
- package/lib/transformers/mention.js +48 -0
- package/lib/transformers/mention.js.map +1 -0
- package/lib/transformers/paragraph.d.ts +2 -0
- package/lib/transformers/paragraph.js +23 -0
- package/lib/transformers/paragraph.js.map +1 -0
- package/lib/transformers/quote.d.ts +1 -0
- package/lib/transformers/quote.js +3 -0
- package/lib/transformers/quote.js.map +1 -0
- package/lib/transformers/quoted.d.ts +1 -0
- package/lib/transformers/quoted.js +3 -0
- package/lib/transformers/quoted.js.map +1 -0
- package/lib/transformers/recurse.d.ts +13 -0
- package/lib/transformers/recurse.js +57 -0
- package/lib/transformers/recurse.js.map +1 -0
- package/lib/transformers/reference.d.ts +1 -0
- package/lib/transformers/reference.js +3 -0
- package/lib/transformers/reference.js.map +1 -0
- package/lib/transformers/span.d.ts +2 -0
- package/lib/transformers/span.js +67 -0
- package/lib/transformers/span.js.map +1 -0
- package/lib/transformers/split-at.d.ts +5 -0
- package/lib/transformers/split-at.js +40 -0
- package/lib/transformers/split-at.js.map +1 -0
- package/lib/transformers/split-block.d.ts +2 -0
- package/lib/transformers/split-block.js +80 -0
- package/lib/transformers/split-block.js.map +1 -0
- package/lib/transformers/split-content.d.ts +2 -0
- package/lib/transformers/split-content.js +48 -0
- package/lib/transformers/split-content.js.map +1 -0
- package/lib/transformers/split-insert.d.ts +5 -0
- package/lib/transformers/split-insert.js +56 -0
- package/lib/transformers/split-insert.js.map +1 -0
- package/lib/transformers/split-marks.d.ts +19 -0
- package/lib/transformers/split-marks.js +21 -0
- package/lib/transformers/split-marks.js.map +1 -0
- package/lib/transformers/split-node.d.ts +14 -0
- package/lib/transformers/split-node.js +104 -0
- package/lib/transformers/split-node.js.map +1 -0
- package/lib/transformers/table-body-data.d.ts +2 -0
- package/lib/transformers/table-body-data.js +27 -0
- package/lib/transformers/table-body-data.js.map +1 -0
- package/lib/transformers/table-body-header.d.ts +2 -0
- package/lib/transformers/table-body-header.js +27 -0
- package/lib/transformers/table-body-header.js.map +1 -0
- package/lib/transformers/table-body-row.d.ts +2 -0
- package/lib/transformers/table-body-row.js +27 -0
- package/lib/transformers/table-body-row.js.map +1 -0
- package/lib/transformers/table.d.ts +2 -0
- package/lib/transformers/table.js +27 -0
- package/lib/transformers/table.js.map +1 -0
- package/lib/transformers/trailer.d.ts +2 -0
- package/lib/transformers/trailer.js +23 -0
- package/lib/transformers/trailer.js.map +1 -0
- package/lib/transformers/transformer.d.ts +15 -0
- package/lib/transformers/transformer.js +4 -0
- package/lib/transformers/transformer.js.map +1 -0
- package/lib/transformers/unknown.d.ts +2 -0
- package/lib/transformers/unknown.js +5 -0
- package/lib/transformers/unknown.js.map +1 -0
- package/lib/transformers/util.d.ts +3 -0
- package/lib/transformers/util.js +17 -0
- package/lib/transformers/util.js.map +1 -0
- package/lib/types.d.ts +2 -0
- package/lib/types.js +9 -0
- package/lib/types.js.map +1 -0
- package/package.json +54 -8
- package/ssr.js +2 -0
- package/ssr.js.map +1 -0
- package/.babelrc +0 -12
- package/.eslintrc.json +0 -18
- package/README.md +0 -9
- package/jest.config.ts +0 -10
- package/postcss.config.mjs +0 -9
- package/project.json +0 -29
- package/src/fixtures/basic/json.ts +0 -396
- package/src/fixtures/toh251/json.ts +0 -4913
- package/src/fixtures/toh251/passages.ts +0 -2814
- package/src/fixtures/types.ts +0 -8
- package/src/lib/block.ts +0 -226
- package/src/lib/components/editor/BlockEditor.tsx +0 -38
- package/src/lib/components/editor/EditorBackMatterPage.tsx +0 -97
- package/src/lib/components/editor/EditorBodyPage.tsx +0 -87
- package/src/lib/components/editor/EditorHeader.tsx +0 -22
- package/src/lib/components/editor/EditorLayout.tsx +0 -62
- package/src/lib/components/editor/EditorLeftPanelPage.tsx +0 -27
- package/src/lib/components/editor/EditorProvider.tsx +0 -475
- package/src/lib/components/editor/PaginationProvider.tsx +0 -457
- package/src/lib/components/editor/TitlesBuilder.tsx +0 -40
- package/src/lib/components/editor/TranslationBuilder.tsx +0 -171
- package/src/lib/components/editor/TranslationEditor.tsx +0 -32
- package/src/lib/components/editor/extensions/Abbreviation/Abbreviation.ts +0 -133
- package/src/lib/components/editor/extensions/Audio/Audio.ts +0 -69
- package/src/lib/components/editor/extensions/Bold.ts +0 -43
- package/src/lib/components/editor/extensions/Document.ts +0 -8
- package/src/lib/components/editor/extensions/DragHandle/DragHandle.ts +0 -429
- package/src/lib/components/editor/extensions/EndNoteLink/EndNoteLink.tsx +0 -39
- package/src/lib/components/editor/extensions/EndNoteLink/EndNoteLinkHoverContent.tsx +0 -139
- package/src/lib/components/editor/extensions/EndNoteLink/EndNoteLinkMark.ts +0 -236
- package/src/lib/components/editor/extensions/EndNoteLink/endnote-utils.ts +0 -412
- package/src/lib/components/editor/extensions/GlobalConfig.ts +0 -52
- package/src/lib/components/editor/extensions/GlossaryInstance/GlossaryInput.tsx +0 -54
- package/src/lib/components/editor/extensions/GlossaryInstance/GlossaryInstance.tsx +0 -129
- package/src/lib/components/editor/extensions/GlossaryInstance/GlossaryInstanceNode.ts +0 -148
- package/src/lib/components/editor/extensions/Heading/Heading.ts +0 -72
- package/src/lib/components/editor/extensions/HoverInputField.tsx +0 -54
- package/src/lib/components/editor/extensions/Image.ts +0 -18
- package/src/lib/components/editor/extensions/Indent.ts +0 -103
- package/src/lib/components/editor/extensions/InternalLink/InternalLink.ts +0 -176
- package/src/lib/components/editor/extensions/InternalLink/InternalLinkHoverContent.tsx +0 -137
- package/src/lib/components/editor/extensions/InternalLink/InternalLinkInput.tsx +0 -71
- package/src/lib/components/editor/extensions/Italic.ts +0 -50
- package/src/lib/components/editor/extensions/LeadingSpace.ts +0 -106
- package/src/lib/components/editor/extensions/Line/LineNode.ts +0 -41
- package/src/lib/components/editor/extensions/LineGroup/LineGroupNode.ts +0 -124
- package/src/lib/components/editor/extensions/Link/Link.ts +0 -65
- package/src/lib/components/editor/extensions/Link/LinkHoverContent.tsx +0 -124
- package/src/lib/components/editor/extensions/List.ts +0 -74
- package/src/lib/components/editor/extensions/Mantra/Mantra.ts +0 -88
- package/src/lib/components/editor/extensions/Mention/Mention.ts +0 -187
- package/src/lib/components/editor/extensions/Mention/MentionHoverContent.tsx +0 -158
- package/src/lib/components/editor/extensions/NodeWrapper.tsx +0 -57
- package/src/lib/components/editor/extensions/Paragraph/Paragraph.ts +0 -25
- package/src/lib/components/editor/extensions/ParagraphIndent.ts +0 -87
- package/src/lib/components/editor/extensions/Passage/EditLabel.tsx +0 -57
- package/src/lib/components/editor/extensions/Passage/EditorOptions.tsx +0 -29
- package/src/lib/components/editor/extensions/Passage/Passage.tsx +0 -238
- package/src/lib/components/editor/extensions/Passage/PassageNode.ts +0 -223
- package/src/lib/components/editor/extensions/Passage/ReaderOptions.tsx +0 -55
- package/src/lib/components/editor/extensions/Passage/ShowAnnotations.tsx +0 -92
- package/src/lib/components/editor/extensions/Passage/label.spec.ts +0 -118
- package/src/lib/components/editor/extensions/Passage/label.ts +0 -39
- package/src/lib/components/editor/extensions/Placeholder.ts +0 -9
- package/src/lib/components/editor/extensions/SlashCommand/SlashCommand.ts +0 -65
- package/src/lib/components/editor/extensions/SlashCommand/SuggestionList.tsx +0 -109
- package/src/lib/components/editor/extensions/SlashCommand/Suggestions.ts +0 -185
- package/src/lib/components/editor/extensions/SmallCaps.ts +0 -110
- package/src/lib/components/editor/extensions/StarterKit.ts +0 -36
- package/src/lib/components/editor/extensions/Subscript.ts +0 -43
- package/src/lib/components/editor/extensions/Superscript.ts +0 -43
- package/src/lib/components/editor/extensions/Table.ts +0 -32
- package/src/lib/components/editor/extensions/TextAlign.ts +0 -5
- package/src/lib/components/editor/extensions/TitleMetadata.ts +0 -40
- package/src/lib/components/editor/extensions/TitleNode.ts +0 -133
- package/src/lib/components/editor/extensions/TitlesNode.ts +0 -102
- package/src/lib/components/editor/extensions/Trailer.ts +0 -57
- package/src/lib/components/editor/extensions/TranslationDocument.ts +0 -7
- package/src/lib/components/editor/extensions/TranslationMetadata.ts +0 -58
- package/src/lib/components/editor/extensions/Underline.ts +0 -43
- package/src/lib/components/editor/hooks/useBlockEditor.ts +0 -53
- package/src/lib/components/editor/hooks/useDefaultExtensions.ts +0 -39
- package/src/lib/components/editor/hooks/useDirtyStore.ts +0 -33
- package/src/lib/components/editor/hooks/useTranslationExtensions.ts +0 -148
- package/src/lib/components/editor/menus/EmptyBubbleMenu.tsx +0 -42
- package/src/lib/components/editor/menus/MainBubbleMenu.tsx +0 -51
- package/src/lib/components/editor/menus/TranslationBubbleMenu.tsx +0 -57
- package/src/lib/components/editor/menus/selectors/EndNoteSelector.tsx +0 -388
- package/src/lib/components/editor/menus/selectors/GlossarySelector.tsx +0 -63
- package/src/lib/components/editor/menus/selectors/LinkSelector.tsx +0 -68
- package/src/lib/components/editor/menus/selectors/MantraSelector.tsx +0 -119
- package/src/lib/components/editor/menus/selectors/NodeSelector.tsx +0 -144
- package/src/lib/components/editor/menus/selectors/ParagraphButtons.tsx +0 -68
- package/src/lib/components/editor/menus/selectors/SelectorInputField.tsx +0 -68
- package/src/lib/components/editor/menus/selectors/TextAlignSelector.tsx +0 -89
- package/src/lib/components/editor/menus/selectors/TextButtons.tsx +0 -89
- package/src/lib/components/editor/menus/selectors/TranslationNodeSelector.tsx +0 -143
- package/src/lib/components/editor/menus/selectors/TranslationTextButtons.tsx +0 -125
- package/src/lib/components/editor/save-filter.spec.ts +0 -94
- package/src/lib/components/editor/save-filter.ts +0 -27
- package/src/lib/components/editor/util.ts +0 -304
- package/src/lib/components/reader/ReaderBackMatterPage.tsx +0 -63
- package/src/lib/components/reader/ReaderBackMatterPanel.tsx +0 -56
- package/src/lib/components/reader/ReaderBodyPage.tsx +0 -46
- package/src/lib/components/reader/ReaderBodyPanel.tsx +0 -68
- package/src/lib/components/reader/ReaderLayout.tsx +0 -39
- package/src/lib/components/reader/ReaderLeftPanel.tsx +0 -8
- package/src/lib/components/reader/ReaderLeftPanelPage.tsx +0 -31
- package/src/lib/components/reader/TranslationReader.tsx +0 -28
- package/src/lib/components/shared/AiSummarizerPage.tsx +0 -12
- package/src/lib/components/shared/BackMatterPanel.tsx +0 -150
- package/src/lib/components/shared/BodyPanel.tsx +0 -214
- package/src/lib/components/shared/HoverCardProvider.tsx +0 -407
- package/src/lib/components/shared/Imprint.tsx +0 -24
- package/src/lib/components/shared/LabeledElement.tsx +0 -133
- package/src/lib/components/shared/LeftPanel.tsx +0 -65
- package/src/lib/components/shared/NavigationContext.ts +0 -64
- package/src/lib/components/shared/NavigationProvider.tsx +0 -400
- package/src/lib/components/shared/OpenGraphImage.tsx +0 -75
- package/src/lib/components/shared/PassageSkeleton.tsx +0 -10
- package/src/lib/components/shared/ReaderSearchButton.tsx +0 -110
- package/src/lib/components/shared/RestrictionWarning.tsx +0 -177
- package/src/lib/components/shared/SearchReplacePanel.tsx +0 -259
- package/src/lib/components/shared/SourceReader.tsx +0 -92
- package/src/lib/components/shared/SuggestRevisionForm.tsx +0 -99
- package/src/lib/components/shared/TableOfContents.tsx +0 -293
- package/src/lib/components/shared/ThreeColumnRenderer.tsx +0 -61
- package/src/lib/components/shared/TranslationHeader.tsx +0 -25
- package/src/lib/components/shared/TranslationHoverCard.tsx +0 -84
- package/src/lib/components/shared/TranslationSkeleton.tsx +0 -16
- package/src/lib/components/shared/TranslationTable.tsx +0 -155
- package/src/lib/components/shared/bibliography/BibliographyBody.tsx +0 -28
- package/src/lib/components/shared/bibliography/BibliographyList.tsx +0 -63
- package/src/lib/components/shared/generate-metadata.ts +0 -44
- package/src/lib/components/shared/glossary/GlossaryInstanceBody.tsx +0 -154
- package/src/lib/components/shared/glossary/GlossaryPaginationProvider.tsx +0 -278
- package/src/lib/components/shared/glossary/GlossarySkeleton.tsx +0 -19
- package/src/lib/components/shared/glossary/GlossaryTermList.tsx +0 -57
- package/src/lib/components/shared/hooks/useGlossaryInstanceListener.tsx +0 -42
- package/src/lib/components/shared/hooks/usePaginationLoadTriggers.spec.tsx +0 -158
- package/src/lib/components/shared/hooks/usePaginationLoadTriggers.ts +0 -129
- package/src/lib/components/shared/hooks/useScrollInTab.tsx +0 -43
- package/src/lib/components/shared/hooks/useScrollPositionRestore.ts +0 -274
- package/src/lib/components/shared/hooks/useTohToggle.tsx +0 -52
- package/src/lib/components/shared/titles/FramedCard.tsx +0 -132
- package/src/lib/components/shared/titles/LongTitle.tsx +0 -20
- package/src/lib/components/shared/titles/LongTitles.tsx +0 -28
- package/src/lib/components/shared/titles/Title.tsx +0 -54
- package/src/lib/components/shared/titles/TitleDetails.tsx +0 -47
- package/src/lib/components/shared/titles/TitleForm.tsx +0 -37
- package/src/lib/components/shared/titles/Titles.tsx +0 -125
- package/src/lib/components/shared/titles/TitlesCard.tsx +0 -113
- package/src/lib/components/shared/types.ts +0 -79
- package/src/lib/exporters/abbreviation.spec.ts +0 -31
- package/src/lib/exporters/abbreviation.ts +0 -22
- package/src/lib/exporters/annotation.ts +0 -193
- package/src/lib/exporters/audio.spec.ts +0 -77
- package/src/lib/exporters/audio.ts +0 -27
- package/src/lib/exporters/blockquote.spec.ts +0 -48
- package/src/lib/exporters/blockquote.ts +0 -24
- package/src/lib/exporters/code.spec.ts +0 -93
- package/src/lib/exporters/code.ts +0 -26
- package/src/lib/exporters/end-note-link.spec.ts +0 -104
- package/src/lib/exporters/end-note-link.ts +0 -35
- package/src/lib/exporters/export.ts +0 -12
- package/src/lib/exporters/glossary-instance.spec.ts +0 -85
- package/src/lib/exporters/glossary-instance.ts +0 -31
- package/src/lib/exporters/has-abbreviation.spec.ts +0 -31
- package/src/lib/exporters/has-abbreviation.ts +0 -21
- package/src/lib/exporters/heading.spec.ts +0 -80
- package/src/lib/exporters/heading.ts +0 -28
- package/src/lib/exporters/image.spec.ts +0 -48
- package/src/lib/exporters/image.ts +0 -25
- package/src/lib/exporters/indent.spec.ts +0 -58
- package/src/lib/exporters/indent.ts +0 -18
- package/src/lib/exporters/internal-link.spec.ts +0 -90
- package/src/lib/exporters/internal-link.ts +0 -35
- package/src/lib/exporters/italic.spec.ts +0 -84
- package/src/lib/exporters/italic.ts +0 -55
- package/src/lib/exporters/leading-space.spec.ts +0 -28
- package/src/lib/exporters/leading-space.ts +0 -16
- package/src/lib/exporters/line-group.spec.ts +0 -48
- package/src/lib/exporters/line-group.ts +0 -24
- package/src/lib/exporters/line.spec.ts +0 -48
- package/src/lib/exporters/line.ts +0 -24
- package/src/lib/exporters/link.spec.ts +0 -123
- package/src/lib/exporters/link.ts +0 -67
- package/src/lib/exporters/list-item.spec.ts +0 -48
- package/src/lib/exporters/list-item.ts +0 -24
- package/src/lib/exporters/list.spec.ts +0 -82
- package/src/lib/exporters/list.ts +0 -31
- package/src/lib/exporters/mantra.spec.ts +0 -51
- package/src/lib/exporters/mantra.ts +0 -25
- package/src/lib/exporters/mention.ts +0 -41
- package/src/lib/exporters/paragraph.spec.ts +0 -173
- package/src/lib/exporters/paragraph.ts +0 -32
- package/src/lib/exporters/quote.spec.ts +0 -56
- package/src/lib/exporters/quote.ts +0 -25
- package/src/lib/exporters/span.spec.ts +0 -118
- package/src/lib/exporters/span.ts +0 -44
- package/src/lib/exporters/table-body-data.spec.ts +0 -48
- package/src/lib/exporters/table-body-data.ts +0 -24
- package/src/lib/exporters/table-body-header.spec.ts +0 -48
- package/src/lib/exporters/table-body-header.ts +0 -24
- package/src/lib/exporters/table-body-row.spec.ts +0 -48
- package/src/lib/exporters/table-body-row.ts +0 -24
- package/src/lib/exporters/table.spec.ts +0 -48
- package/src/lib/exporters/table.ts +0 -24
- package/src/lib/exporters/trailer.spec.ts +0 -48
- package/src/lib/exporters/trailer.ts +0 -24
- package/src/lib/exporters/util.ts +0 -62
- package/src/lib/passage.ts +0 -182
- package/src/lib/titles.ts +0 -80
- package/src/lib/transformers/abbreviation.spec.ts +0 -87
- package/src/lib/transformers/abbreviation.ts +0 -30
- package/src/lib/transformers/annotate.ts +0 -146
- package/src/lib/transformers/audio.spec.ts +0 -55
- package/src/lib/transformers/audio.ts +0 -29
- package/src/lib/transformers/blockquote.spec.ts +0 -48
- package/src/lib/transformers/blockquote.ts +0 -41
- package/src/lib/transformers/code.spec.ts +0 -52
- package/src/lib/transformers/code.ts +0 -22
- package/src/lib/transformers/deprecated.ts +0 -7
- package/src/lib/transformers/end-note-link.spec.ts +0 -56
- package/src/lib/transformers/end-note-link.ts +0 -76
- package/src/lib/transformers/glossary-instance.spec.ts +0 -55
- package/src/lib/transformers/glossary-instance.ts +0 -40
- package/src/lib/transformers/has-abbreviation.spec.ts +0 -50
- package/src/lib/transformers/has-abbreviation.ts +0 -35
- package/src/lib/transformers/heading.spec.ts +0 -62
- package/src/lib/transformers/heading.ts +0 -30
- package/src/lib/transformers/image.spec.ts +0 -51
- package/src/lib/transformers/image.ts +0 -28
- package/src/lib/transformers/indent.spec.ts +0 -53
- package/src/lib/transformers/indent.ts +0 -17
- package/src/lib/transformers/inline-title.spec.ts +0 -59
- package/src/lib/transformers/inline-title.ts +0 -34
- package/src/lib/transformers/internal-link.spec.ts +0 -67
- package/src/lib/transformers/internal-link.ts +0 -65
- package/src/lib/transformers/italic.ts +0 -22
- package/src/lib/transformers/leading-space.spec.ts +0 -55
- package/src/lib/transformers/leading-space.ts +0 -17
- package/src/lib/transformers/line-group.spec.ts +0 -48
- package/src/lib/transformers/line-group.ts +0 -37
- package/src/lib/transformers/line.spec.ts +0 -54
- package/src/lib/transformers/line.ts +0 -27
- package/src/lib/transformers/link.spec.ts +0 -61
- package/src/lib/transformers/link.ts +0 -27
- package/src/lib/transformers/list-item.spec.ts +0 -48
- package/src/lib/transformers/list-item.ts +0 -37
- package/src/lib/transformers/list.spec.ts +0 -58
- package/src/lib/transformers/list.ts +0 -42
- package/src/lib/transformers/mantra.spec.ts +0 -58
- package/src/lib/transformers/mantra.ts +0 -28
- package/src/lib/transformers/mention.ts +0 -70
- package/src/lib/transformers/paragraph.spec.ts +0 -46
- package/src/lib/transformers/paragraph.ts +0 -26
- package/src/lib/transformers/quote.spec.ts +0 -42
- package/src/lib/transformers/quote.ts +0 -3
- package/src/lib/transformers/quoted.ts +0 -3
- package/src/lib/transformers/recurse.ts +0 -76
- package/src/lib/transformers/reference.ts +0 -3
- package/src/lib/transformers/span.spec.ts +0 -68
- package/src/lib/transformers/span.ts +0 -78
- package/src/lib/transformers/split-at.ts +0 -58
- package/src/lib/transformers/split-block.ts +0 -110
- package/src/lib/transformers/split-content.ts +0 -67
- package/src/lib/transformers/split-insert.ts +0 -76
- package/src/lib/transformers/split-marks.ts +0 -42
- package/src/lib/transformers/split-node.ts +0 -138
- package/src/lib/transformers/table-body-data.spec.ts +0 -44
- package/src/lib/transformers/table-body-data.ts +0 -29
- package/src/lib/transformers/table-body-header.spec.ts +0 -44
- package/src/lib/transformers/table-body-header.ts +0 -29
- package/src/lib/transformers/table-body-row.spec.ts +0 -44
- package/src/lib/transformers/table-body-row.ts +0 -29
- package/src/lib/transformers/table.spec.ts +0 -47
- package/src/lib/transformers/table.ts +0 -29
- package/src/lib/transformers/trailer.spec.ts +0 -43
- package/src/lib/transformers/trailer.ts +0 -26
- package/src/lib/transformers/transformer.ts +0 -25
- package/src/lib/transformers/unknown.ts +0 -8
- package/src/lib/transformers/util.ts +0 -20
- package/src/lib/types.ts +0 -10
- package/tsconfig.json +0 -20
- package/tsconfig.lib.json +0 -29
- package/tsconfig.spec.json +0 -22
- /package/{src/index.ts → index.d.ts} +0 -0
- /package/{src/lib/components/editor/extensions/InternalLink/index.ts → lib/components/editor/extensions/InternalLink/index.d.ts} +0 -0
- /package/{src/lib/components/editor/extensions/Link/index.ts → lib/components/editor/extensions/Link/index.d.ts} +0 -0
- /package/{src/lib/components/editor/extensions/Passage/index.ts → lib/components/editor/extensions/Passage/index.d.ts} +0 -0
- /package/{src/lib/components/editor/hooks/index.ts → lib/components/editor/hooks/index.d.ts} +0 -0
- /package/{src/lib/components/editor/index.ts → lib/components/editor/index.d.ts} +0 -0
- /package/{src/lib/components/editor/menus/index.ts → lib/components/editor/menus/index.d.ts} +0 -0
- /package/{src/lib/components/editor/menus/selectors/index.ts → lib/components/editor/menus/selectors/index.d.ts} +0 -0
- /package/{src/lib/components/index.ts → lib/components/index.d.ts} +0 -0
- /package/{src/lib/components/reader/index.ts → lib/components/reader/index.d.ts} +0 -0
- /package/{src/lib/components/reader/ssr.ts → lib/components/reader/ssr.d.ts} +0 -0
- /package/{src/lib/components/shared/bibliography/index.ts → lib/components/shared/bibliography/index.d.ts} +0 -0
- /package/{src/lib/components/shared/glossary/index.ts → lib/components/shared/glossary/index.d.ts} +0 -0
- /package/{src/lib/components/shared/index.ts → lib/components/shared/index.d.ts} +0 -0
- /package/{src/lib/components/shared/ssr.ts → lib/components/shared/ssr.d.ts} +0 -0
- /package/{src/lib/components/shared/titles/index.ts → lib/components/shared/titles/index.d.ts} +0 -0
- /package/{src/lib/components/ssr.ts → lib/components/ssr.d.ts} +0 -0
- /package/{src/lib/exporters/index.ts → lib/exporters/index.d.ts} +0 -0
- /package/{src/lib/transformers/index.ts → lib/transformers/index.d.ts} +0 -0
- /package/{src/ssr.ts → ssr.d.ts} +0 -0
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import { ReactNode, SVGProps } from 'react';
|
|
2
|
-
import { cn } from '@eightyfourthousand/lib-utils';
|
|
3
|
-
|
|
4
|
-
export const OrnamentBG = ({ className }: SVGProps<SVGElement>) => {
|
|
5
|
-
return (
|
|
6
|
-
<svg
|
|
7
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
-
width="38"
|
|
9
|
-
height="20"
|
|
10
|
-
viewBox="0 0 38 20"
|
|
11
|
-
fill="none"
|
|
12
|
-
className={className}
|
|
13
|
-
>
|
|
14
|
-
<path d="M0 0C0 11.04 8.512 20 19 20C29.488 20 38 11.04 38 0H0Z" />
|
|
15
|
-
</svg>
|
|
16
|
-
);
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export const Ornament = ({ className }: SVGProps<SVGElement>) => {
|
|
20
|
-
return (
|
|
21
|
-
<svg
|
|
22
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
23
|
-
width="36"
|
|
24
|
-
height="19"
|
|
25
|
-
viewBox="0 0 36 19"
|
|
26
|
-
className={className}
|
|
27
|
-
>
|
|
28
|
-
<path d="M21.8 11.28C22.332 11.12 22.864 10.88 23.32 10.56V8H24.84V6.4H23.32V4.8H30.084C28.488 9.2 24.84 12.48 20.28 13.36V1.6H33.884C33.124 10.16 26.284 16.8 18 16.8C9.71602 16.8 2.87602 10.16 2.11602 1.6H15.72V13.36C11.236 12.48 7.51202 9.2 5.91602 4.8H12.68V6.4H11.16V8H12.68V10.64C13.136 10.88 13.668 11.12 14.2 11.36V3.2H3.86402C5.23202 9.76 10.628 14.8 17.24 15.12V0H0.52002C0.52002 10.16 8.34802 18.4 18 18.4C27.652 18.4 35.48 10.16 35.48 0H18.76V15.12C25.372 14.72 30.768 9.76 32.136 3.2H21.8V11.28Z" />
|
|
29
|
-
</svg>
|
|
30
|
-
);
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export const FramedCard = ({
|
|
34
|
-
children,
|
|
35
|
-
className,
|
|
36
|
-
}: {
|
|
37
|
-
children: ReactNode;
|
|
38
|
-
className?: string;
|
|
39
|
-
}) => {
|
|
40
|
-
const borderColor = `border-navy/50`;
|
|
41
|
-
const bgColor = `bg-navy/10`;
|
|
42
|
-
const ornamentTint = `fill-navy/20`;
|
|
43
|
-
const ornamentBgTint = `fill-white/75`;
|
|
44
|
-
|
|
45
|
-
const cornerSize = 2;
|
|
46
|
-
const size = `size-${cornerSize}`;
|
|
47
|
-
const height = `height-${cornerSize}`;
|
|
48
|
-
const width = `width-${cornerSize}`;
|
|
49
|
-
const border = `border border-5 ${borderColor} border-double`;
|
|
50
|
-
|
|
51
|
-
return (
|
|
52
|
-
<div
|
|
53
|
-
className={cn(
|
|
54
|
-
'grid grid-cols-[auto_minmax(0,1fr)_auto] gap-0',
|
|
55
|
-
className,
|
|
56
|
-
)}
|
|
57
|
-
>
|
|
58
|
-
<div className={cn(size, 'relative')}>
|
|
59
|
-
<div
|
|
60
|
-
className={cn(
|
|
61
|
-
border,
|
|
62
|
-
'absolute top-1.25 start-1.25 z-2 border-t-transparent border-s-transparent',
|
|
63
|
-
)}
|
|
64
|
-
/>
|
|
65
|
-
</div>
|
|
66
|
-
<div
|
|
67
|
-
className={cn(
|
|
68
|
-
height,
|
|
69
|
-
border,
|
|
70
|
-
bgColor,
|
|
71
|
-
'relative rounded-t-md border-b-transparent',
|
|
72
|
-
)}
|
|
73
|
-
>
|
|
74
|
-
<div className="absolute -top-1.25 h-0 w-full overflow-visible">
|
|
75
|
-
<OrnamentBG className={cn('mx-auto', ornamentBgTint)} />
|
|
76
|
-
</div>
|
|
77
|
-
<div className="absolute -top-1.25 h-0 w-full overflow-visible">
|
|
78
|
-
<Ornament className={cn('mx-auto', ornamentTint)} />
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
<div className={cn(size, 'relative')}>
|
|
82
|
-
<div
|
|
83
|
-
className={cn(
|
|
84
|
-
border,
|
|
85
|
-
'absolute top-1.25 end-0.75 z-2 border-t-transparent border-e-transparent',
|
|
86
|
-
)}
|
|
87
|
-
/>
|
|
88
|
-
</div>
|
|
89
|
-
<div
|
|
90
|
-
className={cn(
|
|
91
|
-
width,
|
|
92
|
-
border,
|
|
93
|
-
bgColor,
|
|
94
|
-
'rounded-s-md border-e-transparent border-double',
|
|
95
|
-
)}
|
|
96
|
-
/>
|
|
97
|
-
<div className={cn('fit-content', bgColor)}>{children}</div>
|
|
98
|
-
<div
|
|
99
|
-
className={cn(
|
|
100
|
-
width,
|
|
101
|
-
border,
|
|
102
|
-
bgColor,
|
|
103
|
-
'rounded-e-md border-s-transparent',
|
|
104
|
-
)}
|
|
105
|
-
/>
|
|
106
|
-
<div className={cn(size, 'relative')}>
|
|
107
|
-
<div
|
|
108
|
-
className={cn(
|
|
109
|
-
border,
|
|
110
|
-
'absolute bottom-0.75 start-1.25 z-2 border-b-transparent border-s-transparent',
|
|
111
|
-
)}
|
|
112
|
-
/>
|
|
113
|
-
</div>
|
|
114
|
-
<div
|
|
115
|
-
className={cn(
|
|
116
|
-
height,
|
|
117
|
-
border,
|
|
118
|
-
bgColor,
|
|
119
|
-
'rounded-b-md border-t-transparent',
|
|
120
|
-
)}
|
|
121
|
-
/>
|
|
122
|
-
<div className={cn(size, 'relative')}>
|
|
123
|
-
<div
|
|
124
|
-
className={cn(
|
|
125
|
-
border,
|
|
126
|
-
'absolute right-0.75 bottom-0.75 z-2 border-b-transparent border-e-transparent',
|
|
127
|
-
)}
|
|
128
|
-
/>
|
|
129
|
-
</div>
|
|
130
|
-
</div>
|
|
131
|
-
);
|
|
132
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { TranslationLanguage } from '@eightyfourthousand/data-access';
|
|
2
|
-
import { cn } from '@eightyfourthousand/lib-utils';
|
|
3
|
-
|
|
4
|
-
export const LongTitle = ({
|
|
5
|
-
title,
|
|
6
|
-
language,
|
|
7
|
-
}: {
|
|
8
|
-
title: string;
|
|
9
|
-
language: TranslationLanguage;
|
|
10
|
-
}) => {
|
|
11
|
-
const languageStyles: { [key in TranslationLanguage]?: string } = {
|
|
12
|
-
'Sa-Ltn': 'italic long-term',
|
|
13
|
-
'Bo-Ltn': 'italic',
|
|
14
|
-
bo: 'font-tibetan',
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
const textStyle = languageStyles[language] || '';
|
|
18
|
-
|
|
19
|
-
return <div className={cn('py-1.5', textStyle)}>{title}</div>;
|
|
20
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { Imprint } from '@eightyfourthousand/data-access';
|
|
4
|
-
import { Skeleton } from '@eightyfourthousand/design-system';
|
|
5
|
-
import { TitleDetails } from './TitleDetails';
|
|
6
|
-
import { TitlesCard } from './TitlesCard';
|
|
7
|
-
|
|
8
|
-
export const LongTitles = ({ imprint }: { imprint?: Imprint }) => {
|
|
9
|
-
if (!imprint) {
|
|
10
|
-
return <Skeleton className="h-48 w-full" />;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const { mainTitles } = imprint;
|
|
14
|
-
const mainEnTitle = mainTitles?.en || '';
|
|
15
|
-
|
|
16
|
-
return (
|
|
17
|
-
<div className="mx-auto flex w-full flex-col gap-1 px-4 pt-8">
|
|
18
|
-
<TitlesCard
|
|
19
|
-
header={imprint.section}
|
|
20
|
-
main={mainEnTitle}
|
|
21
|
-
footer={imprint.toh}
|
|
22
|
-
canEdit={false}
|
|
23
|
-
/>
|
|
24
|
-
<div className="h-8" />
|
|
25
|
-
<TitleDetails imprint={imprint} />
|
|
26
|
-
</div>
|
|
27
|
-
);
|
|
28
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { ExtendedTranslationLanguage } from '@eightyfourthousand/data-access';
|
|
3
|
-
import { H2, H3, H4 } from '@eightyfourthousand/design-system';
|
|
4
|
-
import { cva, type VariantProps } from 'class-variance-authority';
|
|
5
|
-
import { cn } from '@eightyfourthousand/lib-utils';
|
|
6
|
-
|
|
7
|
-
export const TITLE_VARIANT_STYLES = {
|
|
8
|
-
en: '',
|
|
9
|
-
bo: 'my-1',
|
|
10
|
-
ja: 'my-1 italic font-light text-muted-foreground',
|
|
11
|
-
zh: 'my-1 italic font-light text-muted-foreground',
|
|
12
|
-
'Bo-Ltn': 'my-1 italic font-light text-muted-foreground',
|
|
13
|
-
'Mt-Ltn': 'my-1 italic font-light text-muted-foreground',
|
|
14
|
-
'Pi-Ltn': 'my-1 italic font-light text-muted-foreground',
|
|
15
|
-
'Sa-Ltn': 'my-1 italic font-light text-muted-foreground',
|
|
16
|
-
'Zh-Ltn': 'my-1 italic font-light text-muted-foreground',
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const titleVariants = cva('', {
|
|
20
|
-
variants: {
|
|
21
|
-
language: TITLE_VARIANT_STYLES,
|
|
22
|
-
},
|
|
23
|
-
defaultVariants: { language: 'en' },
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
export const Title = ({
|
|
27
|
-
children,
|
|
28
|
-
language,
|
|
29
|
-
...props
|
|
30
|
-
}: {
|
|
31
|
-
children: ReactNode;
|
|
32
|
-
} & VariantProps<typeof titleVariants>) => {
|
|
33
|
-
const components: {
|
|
34
|
-
[key in ExtendedTranslationLanguage]: typeof H2 | typeof H4;
|
|
35
|
-
} = {
|
|
36
|
-
en: H2,
|
|
37
|
-
bo: H3,
|
|
38
|
-
ja: H4,
|
|
39
|
-
zh: H4,
|
|
40
|
-
'Bo-Ltn': H2,
|
|
41
|
-
'Mt-Ltn': H2,
|
|
42
|
-
'Pi-Ltn': H2,
|
|
43
|
-
'Sa-Ltn': H2,
|
|
44
|
-
'Zh-Ltn': H2,
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
const Component = (language && components[language]) || H4;
|
|
48
|
-
|
|
49
|
-
return (
|
|
50
|
-
<Component className={cn(titleVariants({ language }))} {...props}>
|
|
51
|
-
{children}
|
|
52
|
-
</Component>
|
|
53
|
-
);
|
|
54
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { Imprint } from '@eightyfourthousand/data-access';
|
|
2
|
-
import { LongTitle } from './LongTitle';
|
|
3
|
-
|
|
4
|
-
const DOT = `·` as const;
|
|
5
|
-
|
|
6
|
-
export const TitleDetails = ({ imprint }: { imprint: Imprint }) => {
|
|
7
|
-
const { mainTitles, longTitles, toh } = imprint;
|
|
8
|
-
|
|
9
|
-
const longBoTitle = longTitles?.bo || mainTitles?.bo;
|
|
10
|
-
const longBoLtnTitle = longTitles?.['Bo-Ltn'] || mainTitles?.['Bo-Ltn'];
|
|
11
|
-
const longEnTitle = longTitles?.en || mainTitles?.en;
|
|
12
|
-
const longSaLtnTitle = longTitles?.['Sa-Ltn'] || mainTitles?.['Sa-Ltn'];
|
|
13
|
-
|
|
14
|
-
const translators =
|
|
15
|
-
imprint?.tibetanTranslators
|
|
16
|
-
?.split(',')
|
|
17
|
-
?.map((t) => t.trim())
|
|
18
|
-
.filter((t) => !!t) || [];
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<div className="pb-4 mx-auto max-2-2xl items-center text-center text-xs font-serif text-foreground/75">
|
|
22
|
-
{longBoTitle && <LongTitle title={longBoTitle} language="bo" />}
|
|
23
|
-
{longBoLtnTitle && <LongTitle title={longBoLtnTitle} language="Bo-Ltn" />}
|
|
24
|
-
{longEnTitle && <LongTitle title={longEnTitle} language="en" />}
|
|
25
|
-
{longSaLtnTitle && <LongTitle title={longSaLtnTitle} language="Sa-Ltn" />}
|
|
26
|
-
{toh && <div className="pt-8">{`${DOT} ${toh} ${DOT}`}</div>}
|
|
27
|
-
{imprint.sourceDescription && <div>{imprint.sourceDescription}</div>}
|
|
28
|
-
{translators.length > 0 && (
|
|
29
|
-
<>
|
|
30
|
-
<div className="pb-1 pt-5 text-xs uppercase">
|
|
31
|
-
Translated into Tibetan by
|
|
32
|
-
</div>
|
|
33
|
-
|
|
34
|
-
<div className="mx-auto flex flex-wrap justify-center gap-x-2">
|
|
35
|
-
<span>{DOT}</span>
|
|
36
|
-
{translators.map((translator, idx) => (
|
|
37
|
-
<div key={`translator-wrapper-${idx}`} className="flex gap-x-2">
|
|
38
|
-
<span key={`${translator}-${idx}`}>{translator}</span>
|
|
39
|
-
<span key={`dot-${idx}`}>{DOT}</span>
|
|
40
|
-
</div>
|
|
41
|
-
))}
|
|
42
|
-
</div>
|
|
43
|
-
</>
|
|
44
|
-
)}
|
|
45
|
-
</div>
|
|
46
|
-
);
|
|
47
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { LANGUAGES, Title, Titles } from '@eightyfourthousand/data-access';
|
|
2
|
-
import { Input, Label } from '@eightyfourthousand/design-system';
|
|
3
|
-
|
|
4
|
-
export const TitleForm = ({
|
|
5
|
-
titles = [],
|
|
6
|
-
onChange,
|
|
7
|
-
}: {
|
|
8
|
-
titles?: Titles;
|
|
9
|
-
onChange: (title: Title) => void;
|
|
10
|
-
}) => {
|
|
11
|
-
const titlesByLanguage: { [key: string]: Title } = {};
|
|
12
|
-
titles.forEach((title) => {
|
|
13
|
-
titlesByLanguage[title.language] = title;
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
return (
|
|
17
|
-
<div className="flex flex-col gap-4">
|
|
18
|
-
{LANGUAGES.map((language) => (
|
|
19
|
-
<div key={language} className="flex flex-col gap-2">
|
|
20
|
-
<Label className="uppercase">{language}</Label>
|
|
21
|
-
<Input
|
|
22
|
-
type="text"
|
|
23
|
-
placeholder={`Enter ${language} title`}
|
|
24
|
-
value={titlesByLanguage[language]?.title}
|
|
25
|
-
onChange={(e) =>
|
|
26
|
-
onChange({
|
|
27
|
-
...titlesByLanguage[language],
|
|
28
|
-
title: e.target.value,
|
|
29
|
-
language,
|
|
30
|
-
})
|
|
31
|
-
}
|
|
32
|
-
/>
|
|
33
|
-
</div>
|
|
34
|
-
))}
|
|
35
|
-
</div>
|
|
36
|
-
);
|
|
37
|
-
};
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
import {
|
|
5
|
-
BO_TITLE_PREFIX,
|
|
6
|
-
Imprint,
|
|
7
|
-
Titles as TitlesData,
|
|
8
|
-
TitleType,
|
|
9
|
-
} from '@eightyfourthousand/data-access';
|
|
10
|
-
import {
|
|
11
|
-
Dialog,
|
|
12
|
-
DialogContent,
|
|
13
|
-
DialogDescription,
|
|
14
|
-
DialogTitle,
|
|
15
|
-
} from '@eightyfourthousand/design-system';
|
|
16
|
-
import { TitlesCard } from './TitlesCard';
|
|
17
|
-
import { TitleForm } from './TitleForm';
|
|
18
|
-
|
|
19
|
-
export type TitlesVariant = 'english' | 'tibetan' | 'comparison' | 'front' | 'other';
|
|
20
|
-
|
|
21
|
-
export const Titles = ({
|
|
22
|
-
titles,
|
|
23
|
-
variant = 'english',
|
|
24
|
-
imprint,
|
|
25
|
-
canEdit = false,
|
|
26
|
-
}: {
|
|
27
|
-
titles: TitlesData;
|
|
28
|
-
imprint?: Imprint;
|
|
29
|
-
variant?: TitlesVariant;
|
|
30
|
-
canEdit?: boolean;
|
|
31
|
-
}) => {
|
|
32
|
-
const [isEditOpen, setIsEditOpen] = useState(false);
|
|
33
|
-
|
|
34
|
-
const titlesByType = titles.reduce(
|
|
35
|
-
(acc, title) => {
|
|
36
|
-
if (!acc[title.type]) {
|
|
37
|
-
acc[title.type] = [];
|
|
38
|
-
}
|
|
39
|
-
acc[title.type].push(title);
|
|
40
|
-
return acc;
|
|
41
|
-
},
|
|
42
|
-
{} as Record<TitleType, TitlesData>,
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
const mainTitles = titlesByType['mainTitle'] || [];
|
|
46
|
-
|
|
47
|
-
let header = '';
|
|
48
|
-
let main = '';
|
|
49
|
-
const authors = imprint?.tibetanAuthors || [];
|
|
50
|
-
|
|
51
|
-
const footer =
|
|
52
|
-
imprint?.mainTitles?.['Sa-Ltn'] ||
|
|
53
|
-
mainTitles.find((t) => t.language === 'Sa-Ltn')?.title;
|
|
54
|
-
|
|
55
|
-
switch (variant) {
|
|
56
|
-
case 'tibetan': {
|
|
57
|
-
const boMain =
|
|
58
|
-
imprint?.mainTitles?.bo ||
|
|
59
|
-
mainTitles.find((t) => t.language === 'bo')?.title;
|
|
60
|
-
header = boMain ? `${BO_TITLE_PREFIX}${boMain || ''}` : '';
|
|
61
|
-
break;
|
|
62
|
-
}
|
|
63
|
-
case 'comparison': {
|
|
64
|
-
const boMain =
|
|
65
|
-
imprint?.mainTitles?.bo ||
|
|
66
|
-
mainTitles.find((t) => t.language === 'bo')?.title;
|
|
67
|
-
const enMain =
|
|
68
|
-
imprint?.mainTitles?.en ||
|
|
69
|
-
mainTitles.find((t) => t.language === 'en')?.title ||
|
|
70
|
-
'';
|
|
71
|
-
header = boMain ? `${BO_TITLE_PREFIX}${boMain || ''}` : '';
|
|
72
|
-
main = enMain;
|
|
73
|
-
break;
|
|
74
|
-
}
|
|
75
|
-
case 'front': {
|
|
76
|
-
const boMain =
|
|
77
|
-
imprint?.mainTitles?.bo ||
|
|
78
|
-
mainTitles.find((t) => t.language === 'bo')?.title;
|
|
79
|
-
header = boMain ? `${BO_TITLE_PREFIX}${boMain || ''}` : '';
|
|
80
|
-
main =
|
|
81
|
-
imprint?.mainTitles?.en ||
|
|
82
|
-
mainTitles.find((t) => t.language === 'en')?.title ||
|
|
83
|
-
mainTitles[0]?.title ||
|
|
84
|
-
'';
|
|
85
|
-
break;
|
|
86
|
-
}
|
|
87
|
-
case 'english':
|
|
88
|
-
default:
|
|
89
|
-
main =
|
|
90
|
-
imprint?.mainTitles?.en ||
|
|
91
|
-
mainTitles.find((t) => t.language === 'en')?.title ||
|
|
92
|
-
mainTitles[0]?.title ||
|
|
93
|
-
'';
|
|
94
|
-
break;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
return (
|
|
98
|
-
<>
|
|
99
|
-
<TitlesCard
|
|
100
|
-
header={header}
|
|
101
|
-
main={main}
|
|
102
|
-
footer={footer}
|
|
103
|
-
toh={imprint?.toh}
|
|
104
|
-
section={imprint?.section}
|
|
105
|
-
authors={authors}
|
|
106
|
-
attribution={imprint?.isAuthorContested ? 'attributed to' : 'by'}
|
|
107
|
-
authorsJoiner={imprint?.isAuthorContested ? ' or' : ','}
|
|
108
|
-
canEdit={canEdit}
|
|
109
|
-
onEdit={() => setIsEditOpen(true)}
|
|
110
|
-
/>
|
|
111
|
-
<Dialog open={isEditOpen} onOpenChange={setIsEditOpen}>
|
|
112
|
-
<DialogContent className="max-w-4xl" showCloseButton={false}>
|
|
113
|
-
<DialogTitle className="hidden">Edit Titles</DialogTitle>
|
|
114
|
-
<DialogDescription className="hidden">Edit Titles</DialogDescription>
|
|
115
|
-
<TitleForm
|
|
116
|
-
titles={titles}
|
|
117
|
-
onChange={(title) => {
|
|
118
|
-
console.log('TODO: save title', title);
|
|
119
|
-
}}
|
|
120
|
-
/>
|
|
121
|
-
</DialogContent>
|
|
122
|
-
</Dialog>
|
|
123
|
-
</>
|
|
124
|
-
);
|
|
125
|
-
};
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { PencilIcon } from 'lucide-react';
|
|
4
|
-
import { Button, Vajrasattva } from '@eightyfourthousand/design-system';
|
|
5
|
-
import { cn } from '@eightyfourthousand/lib-utils';
|
|
6
|
-
|
|
7
|
-
export const TitlesCard = ({
|
|
8
|
-
header = '',
|
|
9
|
-
main = '',
|
|
10
|
-
footer = '',
|
|
11
|
-
toh = '',
|
|
12
|
-
section = '',
|
|
13
|
-
authors = [],
|
|
14
|
-
attribution = 'by',
|
|
15
|
-
authorsJoiner = ',',
|
|
16
|
-
canEdit = false,
|
|
17
|
-
onEdit,
|
|
18
|
-
}: {
|
|
19
|
-
header?: string;
|
|
20
|
-
main?: string;
|
|
21
|
-
footer?: string;
|
|
22
|
-
toh?: string;
|
|
23
|
-
section?: string;
|
|
24
|
-
authors?: string[];
|
|
25
|
-
attribution?: string;
|
|
26
|
-
authorsJoiner?: string;
|
|
27
|
-
canEdit?: boolean;
|
|
28
|
-
onEdit?(): void;
|
|
29
|
-
}) => {
|
|
30
|
-
const radial =
|
|
31
|
-
'bg-radial-[at_50%_50%] from-ochre/10 from-35% to-navy/10';
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<div className="mx-auto flex w-full max-w-7xl gap-1.5 rounded-lg border bg-[#fff] p-1.5">
|
|
35
|
-
{(toh || section) && (
|
|
36
|
-
<div
|
|
37
|
-
className={cn(
|
|
38
|
-
'hidden w-32 flex-col justify-center gap-4 rounded-s-lg border p-2 text-center md:flex',
|
|
39
|
-
radial,
|
|
40
|
-
)}
|
|
41
|
-
>
|
|
42
|
-
<span className="text-sm leading-4 font-light text-primary">
|
|
43
|
-
{section}
|
|
44
|
-
</span>
|
|
45
|
-
<span className="text-xs uppercase text-muted-foreground">{toh}</span>
|
|
46
|
-
</div>
|
|
47
|
-
)}
|
|
48
|
-
<div className="bg-[#fff] grow min-w-0 flex flex-col justify-center gap-3 rounded-lg border px-2 py-4 text-center md:rounded-s-none md:rounded-e-lg lg:rounded-none">
|
|
49
|
-
{header && (
|
|
50
|
-
<div
|
|
51
|
-
className={cn(
|
|
52
|
-
'font-tibetan text-primary px-2',
|
|
53
|
-
main ? 'text-2xl' : 'text-3xl',
|
|
54
|
-
'leading-relaxed break-all xs:break-normal',
|
|
55
|
-
)}
|
|
56
|
-
>
|
|
57
|
-
{header}
|
|
58
|
-
</div>
|
|
59
|
-
)}
|
|
60
|
-
{main && (
|
|
61
|
-
<div className="title-main break-all px-2 font-serif text-3xl text-primary xs:break-normal">
|
|
62
|
-
{main}
|
|
63
|
-
</div>
|
|
64
|
-
)}
|
|
65
|
-
<div className="flex justify-between gap-2 px-2">
|
|
66
|
-
{canEdit && <div className="w-1/8" />}
|
|
67
|
-
{footer && (
|
|
68
|
-
<span className="title-sub long-term flex-grow font-serif text-2xl font-light italic text-muted-foreground">
|
|
69
|
-
{footer}
|
|
70
|
-
</span>
|
|
71
|
-
)}
|
|
72
|
-
{canEdit && (
|
|
73
|
-
<div className="w-1/8 flex justify-end gap-1">
|
|
74
|
-
<Button
|
|
75
|
-
className="size-7 rounded-lg text-muted-foreground"
|
|
76
|
-
size="icon"
|
|
77
|
-
variant="outline"
|
|
78
|
-
aria-label="Edit titles"
|
|
79
|
-
onClick={onEdit}
|
|
80
|
-
>
|
|
81
|
-
<PencilIcon />
|
|
82
|
-
</Button>
|
|
83
|
-
</div>
|
|
84
|
-
)}
|
|
85
|
-
</div>
|
|
86
|
-
{authors.length > 0 && (
|
|
87
|
-
<div className="title-sub font-serif">
|
|
88
|
-
<div className="py-2 text-xs uppercase text-muted-foreground">
|
|
89
|
-
{attribution}
|
|
90
|
-
</div>
|
|
91
|
-
<div className="-mt-2 mx-auto flex flex-wrap justify-center gap-x-2 text-xl text-secondary">
|
|
92
|
-
{authors.map((author, idx) => (
|
|
93
|
-
<div key={`author-wrapper-${idx}`} className="flex">
|
|
94
|
-
<span key={`${author}-${idx}`} className="italic">
|
|
95
|
-
{author}
|
|
96
|
-
</span>
|
|
97
|
-
{idx < authors.length - 1 && (
|
|
98
|
-
<span key={`comma-${idx}`} className="whitespace-pre">
|
|
99
|
-
{authorsJoiner}
|
|
100
|
-
</span>
|
|
101
|
-
)}
|
|
102
|
-
</div>
|
|
103
|
-
))}
|
|
104
|
-
</div>
|
|
105
|
-
</div>
|
|
106
|
-
)}
|
|
107
|
-
</div>
|
|
108
|
-
<div className={cn('hidden w-32 rounded-e-lg border lg:flex', radial)}>
|
|
109
|
-
<Vajrasattva className="size-full object-contain opacity-40 mix-blend-multiply" />
|
|
110
|
-
</div>
|
|
111
|
-
</div>
|
|
112
|
-
);
|
|
113
|
-
};
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { BodyItemType, Imprint, PanelFilter, Titles } from '@eightyfourthousand/data-access';
|
|
2
|
-
import { TranslationEditorContent } from '../editor';
|
|
3
|
-
|
|
4
|
-
export type EditorBuilderType = BodyItemType | 'titles';
|
|
5
|
-
|
|
6
|
-
export type EditorToolsType = 'summarizer' | 'bibliography' | 'glossary';
|
|
7
|
-
|
|
8
|
-
export type EditorMenuItemType = EditorBuilderType | EditorToolsType;
|
|
9
|
-
|
|
10
|
-
export const PANEL_NAMES = ['left', 'right', 'main'] as const;
|
|
11
|
-
export type PanelName = (typeof PANEL_NAMES)[number];
|
|
12
|
-
export type TabName =
|
|
13
|
-
| 'toc'
|
|
14
|
-
| 'front'
|
|
15
|
-
| 'translation'
|
|
16
|
-
| 'source'
|
|
17
|
-
| 'compare'
|
|
18
|
-
| 'endnotes'
|
|
19
|
-
| 'bibliography'
|
|
20
|
-
| 'glossary'
|
|
21
|
-
| 'abbreviations';
|
|
22
|
-
|
|
23
|
-
export interface TitlesRenderer {
|
|
24
|
-
titles: Titles;
|
|
25
|
-
imprint?: Imprint;
|
|
26
|
-
name: string;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface TranslationRenderer {
|
|
30
|
-
content: TranslationEditorContent;
|
|
31
|
-
name: TabName;
|
|
32
|
-
className?: string;
|
|
33
|
-
filter?: PanelFilter;
|
|
34
|
-
panel: PanelName;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export const TAB_FOR_SECTION: Record<string, TabName> = {
|
|
38
|
-
abbreviations: 'abbreviations',
|
|
39
|
-
acknowledgment: 'front',
|
|
40
|
-
appendix: 'translation',
|
|
41
|
-
bibliography: 'bibliography',
|
|
42
|
-
colophon: 'translation',
|
|
43
|
-
endnotes: 'endnotes',
|
|
44
|
-
glossary: 'glossary',
|
|
45
|
-
homage: 'translation',
|
|
46
|
-
imprint: 'front',
|
|
47
|
-
introduction: 'front',
|
|
48
|
-
prelude: 'translation',
|
|
49
|
-
prologue: 'translation',
|
|
50
|
-
summary: 'front',
|
|
51
|
-
translation: 'translation',
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export const PANEL_FOR_SECTION: Record<string, PanelName> = {
|
|
55
|
-
abbreviations: 'right',
|
|
56
|
-
acknowledgment: 'main',
|
|
57
|
-
appendix: 'main',
|
|
58
|
-
bibliography: 'right',
|
|
59
|
-
colophon: 'main',
|
|
60
|
-
endnotes: 'right',
|
|
61
|
-
glossary: 'right',
|
|
62
|
-
homage: 'main',
|
|
63
|
-
imprint: 'main',
|
|
64
|
-
introduction: 'main',
|
|
65
|
-
prelude: 'main',
|
|
66
|
-
prologue: 'main',
|
|
67
|
-
summary: 'main',
|
|
68
|
-
translation: 'main',
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export type PanelState = {
|
|
72
|
-
open: boolean;
|
|
73
|
-
tab?: TabName;
|
|
74
|
-
hash?: string;
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
export type PanelsState = {
|
|
78
|
-
[key in PanelName]: PanelState;
|
|
79
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { Node } from '@tiptap/pm/model';
|
|
2
|
-
import { abbreviation } from './abbreviation';
|
|
3
|
-
|
|
4
|
-
describe('abbreviation exporter', () => {
|
|
5
|
-
it('should export abbreviation annotation correctly', () => {
|
|
6
|
-
const node = {
|
|
7
|
-
attrs: {
|
|
8
|
-
uuid: '49c41c6d-0e04-412e-81ad-22f3af377470',
|
|
9
|
-
abbreviation: 'e350ec6c-a40c-46bf-8182-acba5a50e4fe',
|
|
10
|
-
},
|
|
11
|
-
textContent: 'C',
|
|
12
|
-
} as unknown as Node;
|
|
13
|
-
|
|
14
|
-
const result = abbreviation({
|
|
15
|
-
node,
|
|
16
|
-
parent: node,
|
|
17
|
-
root: node,
|
|
18
|
-
start: 0,
|
|
19
|
-
passageUuid: 'e350ec6c-a40c-46bf-8182-acba5a50e4fe',
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
expect(result).toEqual({
|
|
23
|
-
uuid: '49c41c6d-0e04-412e-81ad-22f3af377470',
|
|
24
|
-
passageUuid: 'e350ec6c-a40c-46bf-8182-acba5a50e4fe',
|
|
25
|
-
type: 'abbreviation',
|
|
26
|
-
start: 0,
|
|
27
|
-
end: 1,
|
|
28
|
-
abbreviation: 'e350ec6c-a40c-46bf-8182-acba5a50e4fe',
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
});
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { AbbreviationAnnotation } from '@eightyfourthousand/data-access';
|
|
2
|
-
import { Exporter } from './export';
|
|
3
|
-
|
|
4
|
-
export const abbreviation: Exporter<AbbreviationAnnotation> = ({
|
|
5
|
-
node,
|
|
6
|
-
parent,
|
|
7
|
-
start,
|
|
8
|
-
passageUuid,
|
|
9
|
-
}): AbbreviationAnnotation => {
|
|
10
|
-
const textContent = node.textContent || parent.textContent || '';
|
|
11
|
-
const abbreviation = node.attrs.abbreviation;
|
|
12
|
-
const uuid = node.attrs.uuid;
|
|
13
|
-
|
|
14
|
-
return {
|
|
15
|
-
uuid,
|
|
16
|
-
passageUuid,
|
|
17
|
-
type: 'abbreviation',
|
|
18
|
-
start,
|
|
19
|
-
end: start + textContent.length,
|
|
20
|
-
abbreviation,
|
|
21
|
-
};
|
|
22
|
-
};
|