@eightyfourthousand/lib-editing 2026.3.1 → 2026.4.0
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/package.json +1 -1
- package/src/lib/components/editor/EditorBackMatterPage.tsx +3 -1
- package/src/lib/components/editor/EditorHeader.tsx +1 -1
- package/src/lib/components/editor/EditorProvider.tsx +76 -0
- package/src/lib/components/editor/PaginationProvider.tsx +30 -45
- package/src/lib/components/editor/extensions/Heading/Heading.ts +4 -3
- package/src/lib/components/editor/extensions/InternalLink/InternalLink.ts +4 -1
- package/src/lib/components/editor/extensions/Mention/Mention.ts +4 -1
- package/src/lib/components/editor/extensions/Passage/EditorOptions.tsx +2 -2
- package/src/lib/components/editor/extensions/Passage/Passage.tsx +3 -3
- package/src/lib/components/editor/extensions/Passage/ReaderOptions.tsx +3 -3
- package/src/lib/components/editor/extensions/Passage/ShowAnnotations.tsx +3 -3
- package/src/lib/components/editor/extensions/TitlesNode.ts +1 -1
- package/src/lib/components/reader/ReaderBackMatterPage.tsx +1 -0
- package/src/lib/components/reader/ReaderBackMatterPanel.tsx +3 -0
- package/src/lib/components/reader/ReaderBodyPanel.tsx +1 -1
- package/src/lib/components/shared/BackMatterPanel.tsx +17 -10
- package/src/lib/components/shared/BodyPanel.tsx +6 -6
- package/src/lib/components/shared/LabeledElement.tsx +3 -3
- package/src/lib/components/shared/LeftPanel.tsx +3 -3
- package/src/lib/components/shared/NavigationContext.ts +1 -1
- package/src/lib/components/shared/NavigationProvider.tsx +33 -1
- package/src/lib/components/shared/ReaderSearchButton.tsx +110 -0
- package/src/lib/components/shared/SearchReplacePanel.tsx +259 -0
- package/src/lib/components/shared/SourceReader.tsx +13 -4
- package/src/lib/components/shared/SuggestRevisionForm.tsx +1 -1
- package/src/lib/components/shared/TableOfContents.tsx +40 -27
- package/src/lib/components/shared/ThreeColumnRenderer.tsx +16 -9
- package/src/lib/components/shared/TranslationHeader.tsx +2 -63
- package/src/lib/components/shared/bibliography/BibliographyList.tsx +2 -2
- package/src/lib/components/shared/glossary/GlossaryInstanceBody.tsx +15 -5
- package/src/lib/components/shared/glossary/GlossaryPaginationProvider.tsx +17 -56
- package/src/lib/components/shared/glossary/GlossaryTermList.tsx +4 -5
- package/src/lib/components/shared/hooks/usePaginationLoadTriggers.spec.tsx +158 -0
- package/src/lib/components/shared/hooks/usePaginationLoadTriggers.ts +129 -0
- package/src/lib/components/shared/titles/FramedCard.tsx +3 -3
- package/src/lib/components/shared/titles/Titles.tsx +17 -6
- package/src/lib/components/shared/titles/TitlesCard.tsx +6 -6
- package/src/lib/transformers/has-abbreviation.ts +7 -2
|
@@ -28,10 +28,10 @@ export const TitlesCard = ({
|
|
|
28
28
|
onEdit?(): void;
|
|
29
29
|
}) => {
|
|
30
30
|
const radial =
|
|
31
|
-
'bg-radial-[at_50%_50%] from-ochre
|
|
31
|
+
'bg-radial-[at_50%_50%] from-ochre/10 from-35% to-navy/10';
|
|
32
32
|
|
|
33
33
|
return (
|
|
34
|
-
<div className="mx-auto flex w-full max-w-7xl gap-1.5 rounded-lg border bg-
|
|
34
|
+
<div className="mx-auto flex w-full max-w-7xl gap-1.5 rounded-lg border bg-[#fff] p-1.5">
|
|
35
35
|
{(toh || section) && (
|
|
36
36
|
<div
|
|
37
37
|
className={cn(
|
|
@@ -39,17 +39,17 @@ export const TitlesCard = ({
|
|
|
39
39
|
radial,
|
|
40
40
|
)}
|
|
41
41
|
>
|
|
42
|
-
<span className="text-sm leading-4 font-light text-
|
|
42
|
+
<span className="text-sm leading-4 font-light text-primary">
|
|
43
43
|
{section}
|
|
44
44
|
</span>
|
|
45
45
|
<span className="text-xs uppercase text-muted-foreground">{toh}</span>
|
|
46
46
|
</div>
|
|
47
47
|
)}
|
|
48
|
-
<div className="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">
|
|
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
49
|
{header && (
|
|
50
50
|
<div
|
|
51
51
|
className={cn(
|
|
52
|
-
'font-tibetan text-
|
|
52
|
+
'font-tibetan text-primary px-2',
|
|
53
53
|
main ? 'text-2xl' : 'text-3xl',
|
|
54
54
|
'leading-relaxed break-all xs:break-normal',
|
|
55
55
|
)}
|
|
@@ -58,7 +58,7 @@ export const TitlesCard = ({
|
|
|
58
58
|
</div>
|
|
59
59
|
)}
|
|
60
60
|
{main && (
|
|
61
|
-
<div className="title-main break-all px-2 font-serif text-3xl text-
|
|
61
|
+
<div className="title-main break-all px-2 font-serif text-3xl text-primary xs:break-normal">
|
|
62
62
|
{main}
|
|
63
63
|
</div>
|
|
64
64
|
)}
|
|
@@ -5,7 +5,7 @@ import { Transformer } from './transformer';
|
|
|
5
5
|
|
|
6
6
|
export const hasAbbreviation: Transformer = (ctx) => {
|
|
7
7
|
const { annotation } = ctx;
|
|
8
|
-
const { abbreviation, uuid } = annotation as HasAbbreviationAnnotation;
|
|
8
|
+
const { abbreviation, uuid, start, end } = annotation as HasAbbreviationAnnotation;
|
|
9
9
|
|
|
10
10
|
recurse({
|
|
11
11
|
until: ['text'],
|
|
@@ -21,7 +21,12 @@ export const hasAbbreviation: Transformer = (ctx) => {
|
|
|
21
21
|
uuid,
|
|
22
22
|
};
|
|
23
23
|
block.content = [
|
|
24
|
-
{
|
|
24
|
+
{
|
|
25
|
+
type: 'text',
|
|
26
|
+
text: block.text,
|
|
27
|
+
marks: block.marks,
|
|
28
|
+
attrs: { start, end }
|
|
29
|
+
},
|
|
25
30
|
];
|
|
26
31
|
},
|
|
27
32
|
});
|