From 376ea46f15256a9db3e089d330060cc76ffdf295 Mon Sep 17 00:00:00 2001 From: Ira Hopkinson Date: Fri, 29 Mar 2024 11:45:59 +1300 Subject: [PATCH 1/2] editor: handle changed Scripture data - uncontrolled editor - BREAKING CHANGE - reorganize USJ node CSS - BREAKING CHANGE --- extensions/src/resource-viewer/package.json | 2 +- .../src/resource-viewer/src/_editor.scss | 95 +- .../src/{_styles.scss => _usj-nodes.scss} | 2044 ++++++++++++----- .../src/resource-viewer.web-view.scss | 3 +- .../src/resource-viewer.web-view.tsx | 37 +- package-lock.json | 621 ++++- 6 files changed, 2122 insertions(+), 680 deletions(-) rename extensions/src/resource-viewer/src/{_styles.scss => _usj-nodes.scss} (54%) diff --git a/extensions/src/resource-viewer/package.json b/extensions/src/resource-viewer/package.json index 9515ece762..b9d6d34322 100644 --- a/extensions/src/resource-viewer/package.json +++ b/extensions/src/resource-viewer/package.json @@ -35,7 +35,7 @@ "platform-bible-utils": "file:../../../lib/platform-bible-utils" }, "devDependencies": { - "@biblionexus-foundation/platform-editor": "^0.0.5", + "@biblionexus-foundation/platform-editor": "^0.1.0", "@swc/core": "^1.4.2", "@types/node": "^20.11.19", "@types/react": "^18.2.57", diff --git a/extensions/src/resource-viewer/src/_editor.scss b/extensions/src/resource-viewer/src/_editor.scss index ae675c705e..97c014b9d4 100644 --- a/extensions/src/resource-viewer/src/_editor.scss +++ b/extensions/src/resource-viewer/src/_editor.scss @@ -1,44 +1,5 @@ /* stylelint-disable selector-no-qualifying-type */ -/* USJ Nodes */ - -.book[data-code]::before { - content: attr(data-code) ' '; -} - -.immutable-note-caller { - vertical-align: super; - font-size: 80%; -} - -.immutable-note-caller > button { - cursor: pointer; - color: #00f; - text-decoration: none; - border: 0; - padding: 0; - background-color: inherit; -} - -.verse { - vertical-align: super; -} - -.no-indent { - text-indent: 0; - text-align: start; - margin-left: 0; -} - -.plain-font { - font-weight: normal; - font-style: normal; - font-size: 100%; - color: inherit; - background-color: inherit; - vertical-align: inherit; -} - /* Lexical */ .editor-container { @@ -390,7 +351,7 @@ pre::-webkit-scrollbar-thumb { max-width: 250px; } -.dropdown .item.block-type { +.dropdown .item.block-marker { min-width: 420px; } @@ -466,10 +427,10 @@ i.redo { background-image: url('/assets/images/icons/text-paragraph.svg'); } -.icon.para-m, -.icon.para-nb, -.icon.para-p, -.icon.para-pi, +.icon.m, +.icon.nb, +.icon.p, +.icon.pi, .icon.paragraph { @extend %paragraph; } @@ -478,10 +439,10 @@ i.redo { background-image: url('/assets/images/icons/type-h1.svg'); } -.icon.para-ms, -.icon.para-ms1, -.icon.para-r, -.icon.para-s, +.icon.ms, +.icon.ms1, +.icon.r, +.icon.s, .icon.large-heading, .icon.h1 { @extend %h-one; @@ -491,7 +452,7 @@ i.redo { background-image: url('/assets/images/icons/type-h2.svg'); } -.icon.para-ms2, +.icon.ms2, .icon.small-heading, .icon.h2 { @extend %h-two; @@ -501,7 +462,7 @@ i.redo { background-image: url('/assets/images/icons/type-h3.svg'); } -.icon.para-ms3, +.icon.ms3, .icon.h3 { @extend %h-three; } @@ -511,8 +472,8 @@ i.redo { background-image: url("/assets/images/icons/1-square.svg"); } -.icon.para-mt, -.icon.para-mt1, +.icon.mt, +.icon.mt1, .icon.square-1 { @extend %square-one; } @@ -521,7 +482,7 @@ i.redo { background-image: url("/assets/images/icons/2-square.svg"); } -.icon.para-mt2, +.icon.mt2, .icon.square-2 { @extend %square-two; } @@ -530,7 +491,7 @@ i.redo { background-image: url("/assets/images/icons/3-square.svg"); } -.icon.para-mt3, +.icon.mt3, .icon.square-3 { @extend %square-three; } @@ -539,7 +500,7 @@ i.redo { background-image: url("/assets/images/icons/4-square.svg"); } -.icon.para-mt4, +.icon.mt4, .icon.square-4 { @extend %square-four; } @@ -548,7 +509,7 @@ i.redo { background-image: url("/assets/images/icons/bookmark.svg"); } -.icon.para-cl, +.icon.cl, .icon.bookmark { @extend %bookmark; } @@ -557,14 +518,14 @@ i.redo { background-image: url("/assets/images/icons/file-earmark.svg"); } -.icon.para-ide, -.icon.para-h, -.icon.para-h1, -.icon.para-h2, -.icon.para-h3, -.icon.para-toc1, -.icon.para-toc2, -.icon.para-toc3, +.icon.ide, +.icon.h, +.icon.h1, +.icon.h2, +.icon.h3, +.icon.toc1, +.icon.toc2, +.icon.toc3, .icon.file-earmark { @extend %file-earmark; } @@ -583,9 +544,9 @@ i.redo { background-image: url('/assets/images/icons/chat-square-quote.svg'); } -.icon.para-b, -.icon.para-q1, -.icon.para-q2, +.icon.b, +.icon.q1, +.icon.q2, .icon.quote { @extend %quote; } diff --git a/extensions/src/resource-viewer/src/_styles.scss b/extensions/src/resource-viewer/src/_usj-nodes.scss similarity index 54% rename from extensions/src/resource-viewer/src/_styles.scss rename to extensions/src/resource-viewer/src/_usj-nodes.scss index d40880b48d..4a62043988 100644 --- a/extensions/src/resource-viewer/src/_styles.scss +++ b/extensions/src/resource-viewer/src/_usj-nodes.scss @@ -1,6 +1,7 @@ /* stylelint-disable */ -body { -} + +/* Sample styles for USJ Nodes */ + .leadingFloat { float: left; } @@ -8,1769 +9,2623 @@ body { clear: both; } .align_start { - text-align: left; + text-align: start; } .align_center { text-align: center; } .align_end { - text-align: right; + text-align: end; } @font-face { - font-family: 'Charis SIL'; - src: local('Charis SIL'), local('Charis SIL Bold'), local('Charis SIL Bold Italic'), - local('Charis SIL Italic'), url('file:///C:/Windows/Fonts/CharisSIL-B.ttf'); + font-family: "Charis SIL"; + src: local("Charis SIL"), local("Charis SIL Bold"), local("Charis SIL Bold Italic"), + local("Charis SIL Italic"), url("file:///C:/Windows/Fonts/CharisSIL-B.ttf"); font-weight: normal; } @font-face { - font-family: 'Charis SIL'; - src: local('Charis SIL Bold'); + font-family: "Charis SIL"; + src: local("Charis SIL Bold"); font-weight: bold; } @font-face { - font-family: 'Charis SIL'; - src: local('Charis SIL Italic'); + font-family: "Charis SIL"; + src: local("Charis SIL Italic"); font-style: italic; } @font-face { - font-family: 'Charis SIL'; - src: local('Charis SIL Bold Italic'); + font-family: "Charis SIL"; + src: local("Charis SIL Bold Italic"); font-weight: bold; font-style: italic; } -.usfm { - font-family: 'Charis SIL'; +.formatted-font.usfm { + font-family: "Charis SIL"; font-size: 12pt; } + +/* BookNode */ + .usfm_id { + text-align: start; +} +.formatted-font.usfm_id { + font-size: 100%; +} + +.book[data-code]::before { + content: attr(data-code) " "; +} + +/* ChapterNode, ImmutableChapterNode */ + +.usfm_c { + text-align: start; +} +.formatted-font.usfm_c { + font-weight: bold; + font-size: 150%; +} +.text-spacing.usfm_c { + margin-bottom: 4pt; + margin-top: 8pt; +} + +.usfm_ca { + text-align: start; +} +.formatted-font.usfm_ca { + color: #007306; + font-size: 133%; + font-style: italic; +} + +.usfm_cp { + text-align: start; +} +.formatted-font.usfm_cp { + font-weight: bold; + color: #003380; + font-size: 150%; +} +.text-spacing.usfm_cp { + margin-bottom: 4pt; + margin-top: 8pt; +} + +/* VerseNode, ImmutableVerseNode */ + +.usfm_v { + text-align: start; +} +.formatted-font .usfm_v { + font-size: 100%; + vertical-align: text-top; + font-size: 66%; +} +.text-spacing .usfm_v { + white-space: nowrap; + unicode-bidi: embed; +} + +.usfm_va { + text-align: start; +} +.formatted-font .usfm_va { + color: #007306; + font-size: 100%; + vertical-align: text-top; + font-size: 66%; +} + +.usfm_vp { + text-align: start; +} +.formatted-font .usfm_vp { + color: #003380; font-size: 100%; - text-align: left; + vertical-align: text-top; + font-size: 66%; } +/* ParaNode */ + .usfm_usfm { + text-align: start; +} +.formatted-font.usfm_usfm { font-size: 100%; - text-align: left; } .usfm_ide { + text-align: start; +} +.formatted-font.usfm_ide { font-size: 100%; - text-align: left; } .usfm_h { + text-align: start; +} +.formatted-font.usfm_h { font-size: 100%; - text-align: left; } +/* check if deprecated */ .usfm_h1 { + text-align: start; +} +.formatted-font.usfm_h1 { font-size: 100%; - text-align: left; } +/* check if deprecated */ .usfm_h2 { + text-align: start; +} +.formatted-font.usfm_h2 { font-size: 100%; - text-align: left; } +/* check if deprecated */ .usfm_h3 { + text-align: start; +} +.formatted-font.usfm_h3 { font-size: 100%; - text-align: left; } .usfm_toc1 { + text-align: start; +} +.formatted-font.usfm_toc1 { font-weight: bold; color: #004c00; font-size: 100%; font-style: italic; - text-align: left; } .usfm_toc2 { + text-align: start; +} +.formatted-font.usfm_toc2 { color: #004c00; font-size: 100%; font-style: italic; - text-align: left; } .usfm_toc3 { + text-align: start; +} +.formatted-font.usfm_toc3 { font-weight: bold; color: #e05858; font-size: 100%; font-style: italic; - text-align: left; } .usfm_toca1 { + text-align: start; +} +.formatted-font.usfm_toca1 { color: #8c8c8c; font-size: 83%; font-style: italic; - text-align: left; } .usfm_toca2 { + text-align: start; +} +.formatted-font.usfm_toca2 { color: #8c8c8c; font-size: 83%; font-style: italic; - text-align: left; } .usfm_toca3 { + text-align: start; +} +.formatted-font.usfm_toca3 { color: #8c8c8c; font-size: 83%; font-style: italic; - text-align: left; } .usfm_rem { + text-align: start; +} +.formatted-font.usfm_rem { color: #003380; font-size: 100%; - text-align: left; } .usfm_sts { + text-align: start; +} +.formatted-font.usfm_sts { color: #003380; font-size: 100%; - text-align: left; } +/* check if deprecated */ .usfm_restore { + text-align: start; +} +.formatted-font.usfm_restore { color: #003380; font-size: 100%; - text-align: left; } .usfm_imt { + text-align: start; +} +.formatted-font.usfm_imt { font-weight: bold; font-size: 116%; +} +.text-spacing.usfm_imt { text-align: center; margin-bottom: 4pt; margin-top: 8pt; } .usfm_imt1 { + text-align: start; +} +.formatted-font.usfm_imt1 { font-weight: bold; font-size: 116%; +} +.text-spacing.usfm_imt1 { text-align: center; margin-bottom: 4pt; margin-top: 8pt; } .usfm_imt2 { + text-align: start; +} +.formatted-font.usfm_imt2 { font-size: 108%; font-style: italic; +} +.text-spacing.usfm_imt2 { text-align: center; margin-bottom: 3pt; margin-top: 6pt; } .usfm_imt3 { + text-align: start; +} +.formatted-font.usfm_imt3 { font-weight: bold; font-size: 100%; +} +.text-spacing.usfm_imt3 { text-align: center; margin-bottom: 2pt; margin-top: 2pt; } .usfm_imt4 { + text-align: start; +} +.formatted-font.usfm_imt4 { font-size: 100%; font-style: italic; +} +.text-spacing.usfm_imt4 { text-align: center; margin-bottom: 2pt; margin-top: 2pt; } .usfm_imte { + text-align: start; +} +.formatted-font.usfm_imte { font-weight: bold; font-size: 166%; +} +.text-spacing.usfm_imte { text-align: center; margin-bottom: 4pt; margin-top: 8pt; } +/* check if deprecated */ .usfm_imte1 { + text-align: start; +} +.formatted-font.usfm_imte1 { font-weight: bold; font-size: 166%; +} +.text-spacing.usfm_imte1 { text-align: center; margin-bottom: 4pt; margin-top: 8pt; } +/* check if deprecated */ .usfm_imte2 { + text-align: start; +} +.formatted-font.usfm_imte2 { font-size: 133%; font-style: italic; +} +.text-spacing.usfm_imte2 { text-align: center; margin-bottom: 2pt; } .usfm_is { + text-align: start; +} +.formatted-font.usfm_is { font-weight: bold; font-size: 116%; +} +.text-spacing.usfm_is { text-align: center; margin-bottom: 4pt; margin-top: 8pt; } .usfm_is1 { + text-align: start; +} +.formatted-font.usfm_is1 { font-weight: bold; font-size: 116%; +} +.text-spacing.usfm_is1 { text-align: center; margin-bottom: 4pt; margin-top: 8pt; } .usfm_is2 { + text-align: start; +} +.formatted-font.usfm_is2 { font-weight: bold; font-size: 100%; +} +.text-spacing.usfm_is2 { text-align: center; margin-bottom: 4pt; margin-top: 8pt; } .usfm_iot { + text-align: start; +} +.formatted-font.usfm_iot { font-weight: bold; font-size: 100%; +} +.text-spacing.usfm_iot { text-align: center; margin-bottom: 4pt; margin-top: 8pt; } .usfm_io { + text-align: start; +} +.formatted-font.usfm_io { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_io { margin-left: 10vw; } .usfm_io1 { + text-align: start; +} +.formatted-font.usfm_io { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_io1 { margin-left: 10vw; } .usfm_io2 { + text-align: start; +} +.formatted-font.usfm_io2 { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_io2 { margin-left: 15vw; } .usfm_io3 { + text-align: start; +} +.formatted-font.usfm_io3 { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_io3 { margin-left: 20vw; } .usfm_io4 { + text-align: start; +} +.formatted-font.usfm_io4 { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_i04 { margin-left: 25vw; } .usfm_ior { + text-align: start; +} +.formatted-font .usfm_ior { font-size: 100%; - text-align: left; } .usfm_ip { - text-indent: 2.5vw; + text-align: start; +} +.formatted-font.usfm_ip { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_ip { + text-indent: 2.5vw; } +/* check if deprecated */ .usfm_im { + text-align: start; +} +.formatted-font.usfm_im { font-size: 100%; - text-align: left; } .usfm_ipi { - text-indent: 2.5vw; + text-align: start; +} +.formatted-font.usfm_ipi { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_ipi { + text-indent: 2.5vw; margin-left: 5vw; margin-right: 5vw; } +/* check if deprecated */ .usfm_imi { + text-align: start; +} +.formatted-font.usfm_imi { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_imi { margin-left: 5vw; margin-right: 5vw; } .usfm_ili { - text-indent: -7.5vw; + text-align: start; +} +.formatted-font.usfm_ili { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_ili { + text-indent: -7.5vw; margin-left: 10vw; } .usfm_ili1 { - text-indent: -7.5vw; + text-align: start; +} +.formatted-font.usfm_ili1 { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_ili1 { + text-indent: -7.5vw; margin-left: 10vw; } .usfm_ili2 { - text-indent: -7.5vw; + text-align: start; +} +.formatted-font.usfm_ili2 { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_ili2 { + text-indent: -7.5vw; margin-left: 15vw; } .usfm_ipq { - text-indent: 2.5vw; + text-align: start; +} +.formatted-font.usfm_ipq { font-size: 100%; font-style: italic; - text-align: left; +} +.text-spacing.usfm_ipq { + text-indent: 2.5vw; margin-left: 5vw; margin-right: 5vw; } .usfm_imq { + text-align: start; +} +.formatted-font.usfm_imq { font-size: 100%; font-style: italic; - text-align: left; +} +.text-spacing.usfm_imq { margin-left: 5vw; margin-right: 5vw; } .usfm_ipr { + text-align: end; +} +.formatted-font.usfm_ipr { font-size: 100%; font-style: italic; - text-align: right; +} +.text-spacing.usfm_ipr { margin-left: 5vw; margin-right: 5vw; } .usfm_ib { + text-align: start; +} +.formatted-font.usfm_ib { font-size: 83%; - text-align: left; } +/* check if deprecated */ .usfm_iq { - text-indent: -15vw; + text-align: start; +} +.formatted-font.usfm_iq { font-size: 100%; font-style: italic; - text-align: left; +} +.text-spacing.usfm_iq { + text-indent: -15vw; margin-left: 20vw; } +/* check if deprecated */ .usfm_iq1 { - text-indent: -15vw; + text-align: start; +} +.formatted-font.usfm_iq1 { font-size: 100%; font-style: italic; - text-align: left; +} +.text-spacing.usfm_iq1 { + text-indent: -15vw; margin-left: 20vw; } +/* check if deprecated */ .usfm_iq2 { - text-indent: -10vw; + text-align: start; +} +.formatted-font.usfm_iq2 { font-size: 100%; font-style: italic; - text-align: left; +} +.text-spacing.usfm_iq2 { + text-indent: -10vw; margin-left: 20vw; } +/* check if deprecated */ .usfm_iq3 { - text-indent: -5vw; + text-align: start; +} +.formatted-font.usfm_iq3 { font-size: 100%; font-style: italic; - text-align: left; +} +.text-spacing.usfm_iq3 { + text-indent: -5vw; margin-left: 20vw; } .usfm_iex { - text-indent: 2.5vw; + text-align: start; +} +.formatted-font.usfm_iex { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_iex { + text-indent: 2.5vw; margin-bottom: 4pt; margin-top: 4pt; } +/* check if deprecated */ .usfm_iqt { + text-align: start; +} +.formatted-font .usfm_iqt { font-size: 100%; font-style: italic; - text-align: left; } .usfm_ie { - font-size: 83%; - text-align: left; + text-align: start; } - -.usfm_c { - font-weight: bold; - font-size: 150%; - text-align: left; - margin-bottom: 4pt; - margin-top: 8pt; +.formatted-font.usfm_ie { + font-size: 83%; } -.usfm_ca { - color: #007306; - font-size: 133%; - font-style: italic; - text-align: left; +.usfm_cl { + text-align: start; } - -.usfm_cp { +.formatted-font.usfm_cl { font-weight: bold; - color: #003380; font-size: 150%; - text-align: left; - margin-bottom: 4pt; - margin-top: 8pt; } - -.usfm_cl { - font-weight: bold; - font-size: 150%; +.text-spacing.usfm_cl { text-align: center; margin-bottom: 4pt; margin-top: 8pt; } .usfm_cd { + text-align: start; +} +.formatted-font.usfm_cd { font-size: 91%; - text-align: left; +} +.text-spacing.usfm_cd { margin-bottom: 4pt; margin-top: 8pt; } -.usfm_v { - font-size: 100%; - text-align: left; - vertical-align: text-top; - font-size: 66%; - white-space: nowrap; - unicode-bidi: embed; -} - -.usfm_va { - color: #007306; - font-size: 100%; - text-align: left; - vertical-align: text-top; - font-size: 66%; +.usfm_p { + text-align: start; } - -.usfm_vp { - color: #003380; +.formatted-font.usfm_p { font-size: 100%; - text-align: left; - vertical-align: text-top; - font-size: 66%; } - -.usfm_p { +.text-spacing.usfm_p { text-indent: 2.5vw; - font-size: 100%; - text-align: left; } .usfm_m { + text-align: start; +} +.formatted-font.usfm_m { font-size: 100%; - text-align: left; } .usfm_po { - text-indent: 2.5vw; + text-align: start; +} +.formatted-font.usfm_po { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_po { + text-indent: 2.5vw; margin-bottom: 4pt; margin-top: 4pt; } .usfm_pr { + text-align: end; +} +.formatted-font.usfm_pr { font-size: 100%; - text-align: right; } .usfm_cls { + text-align: end; +} +.formatted-font.usfm_cls { font-size: 100%; - text-align: right; } .usfm_pmo { + text-align: start; +} +.formatted-font.usfm_pmo { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_pmo { margin-left: 5vw; margin-right: 5vw; } .usfm_pm { - text-indent: 2.5vw; + text-align: start; +} +.formatted-font.usfm_pm { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_pm { + text-indent: 2.5vw; margin-left: 5vw; margin-right: 5vw; } .usfm_pmc { + text-align: start; +} +.formatted-font.usfm_pmc { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_pmc { margin-left: 5vw; margin-right: 5vw; } .usfm_pmr { + text-align: end; +} +.formatted-font.usfm_pmr { font-size: 100%; - text-align: right; +} +.text-spacing.usfm_pmr { margin-left: 5vw; margin-right: 5vw; } .usfm_pi { - text-indent: 2.5vw; + text-align: start; +} +.formatted-font.usfm_pi { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_pi { + text-indent: 2.5vw; margin-left: 5vw; margin-right: 5vw; } .usfm_pi1 { - text-indent: 2.5vw; + text-align: start; +} +.formatted-font.usfm_pi1 { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_pi1 { + text-indent: 2.5vw; margin-left: 5vw; margin-right: 5vw; } .usfm_pi2 { - text-indent: 2.5vw; + text-align: start; +} +.formatted-font.usfm_pi2 { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_pi2 { + text-indent: 2.5vw; margin-left: 10vw; margin-right: 5vw; } .usfm_pi3 { - text-indent: 2.5vw; + text-align: start; +} +.formatted-font.usfm_pi3 { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_pi3 { + text-indent: 2.5vw; margin-left: 15vw; margin-right: 5vw; } .usfm_pc { + text-align: start; +} +.formatted-font.usfm_pc { font-size: 100%; +} +.text-spacing.usfm_pc { text-align: center; } .usfm_mi { + text-align: start; +} +.formatted-font.usfm_mi { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_mi { margin-left: 5vw; margin-right: 5vw; } +/* check if deprecated */ .usfm_nb { + text-align: start; +} +.formatted-font.usfm_nb { font-size: 100%; - text-align: left; } .usfm_q { - text-indent: -10vw; + text-align: start; +} +.formatted-font.usfm_q { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_q { + text-indent: -10vw; margin-left: 15vw; } .usfm_q1 { - text-indent: -10vw; + text-align: start; +} +.formatted-font.usfm_q1 { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_q1 { + text-indent: -10vw; margin-left: 15vw; } .usfm_q2 { - text-indent: -7.5vw; + text-align: start; +} +.formatted-font.usfm_q2 { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_q2 { + text-indent: -7.5vw; margin-left: 15vw; } .usfm_q3 { - text-indent: -5vw; + text-align: start; +} +.formatted-font.usfm_q3 { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_q3 { + text-indent: -5vw; margin-left: 15vw; } .usfm_q4 { - text-indent: -2.5vw; + text-align: start; +} +.formatted-font.usfm_q4 { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_q4 { + text-indent: -2.5vw; margin-left: 15vw; } .usfm_qc { + text-align: start; +} +.formatted-font.usfm_qc { font-size: 100%; +} +.text-spacing.usfm_qc { text-align: center; } .usfm_qr { - font-size: 100%; - text-align: right; + text-align: end; } - -.usfm_qs { +.formatted-font.usfm_qr { font-size: 100%; - font-style: italic; - text-align: left; } .usfm_qa { - font-size: 100%; - font-style: italic; - text-align: left; + text-align: start; } - -.usfm_qac { +.formatted-font.usfm_qa { font-size: 100%; font-style: italic; - text-align: left; } .usfm_qm { - text-indent: -15vw; + text-align: start; +} +.formatted-font.usfm_qm { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_qm { + text-indent: -15vw; margin-left: 20vw; } .usfm_qm1 { - text-indent: -15vw; + text-align: start; +} +.formatted-font.usfm_qm1 { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_qm1 { + text-indent: -15vw; margin-left: 20vw; } .usfm_qm2 { - text-indent: -10vw; + text-align: start; +} +.formatted-font.usfm_qm2 { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_qm2 { + text-indent: -10vw; margin-left: 20vw; } .usfm_qm3 { - text-indent: -5vw; + text-align: start; +} +.formatted-font.usfm_qm3 { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_qm3 { + text-indent: -5vw; margin-left: 20vw; } .usfm_qd { + text-align: start; +} +.formatted-font.usfm_qd { font-size: 100%; font-style: italic; - text-align: left; +} +.text-spacing.usfm_qd { + text-align: start; margin-left: 5vw; } .usfm_b { + text-align: start; +} +.formatted-font.usfm_b { font-size: 83%; - text-align: left; } .usfm_mt { + text-align: start; +} +.formatted-font.usfm_mt { font-weight: bold; font-size: 166%; +} +.text-spacing.usfm_mt { text-align: center; margin-bottom: 4pt; margin-top: 8pt; } .usfm_mt1 { + text-align: start; +} +.formatted-font.usfm_mt1 { font-weight: bold; font-size: 166%; +} +.text-spacing.usfm_mt1 { text-align: center; margin-bottom: 4pt; margin-top: 2pt; } .usfm_mt2 { + text-align: start; +} +.formatted-font.usfm_mt2 { font-size: 133%; font-style: italic; +} +.text-spacing.usfm_mt2 { text-align: center; margin-bottom: 2pt; } .usfm_mt3 { + text-align: start; +} +.formatted-font.usfm_mt3 { font-weight: bold; font-size: 133%; +} +.text-spacing.usfm_mt3 { text-align: center; margin-bottom: 2pt; margin-top: 2pt; } .usfm_mt4 { + text-align: start; +} +.formatted-font.usfm_mt4 { font-size: 100%; +} +.text-spacing.usfm_mt4 { text-align: center; margin-bottom: 2pt; margin-top: 2pt; } .usfm_mte { + text-align: start; +} +.formatted-font.usfm_mte { font-weight: bold; font-size: 166%; +} +.text-spacing.usfm_mte { text-align: center; margin-bottom: 4pt; margin-top: 8pt; } .usfm_mte1 { + text-align: start; +} +.formatted-font.usfm_mte1 { font-weight: bold; font-size: 166%; +} +.text-spacing.usfm_mte1 { text-align: center; margin-bottom: 4pt; margin-top: 8pt; } .usfm_mte2 { + text-align: start; +} +.formatted-font.usfm_mte2 { font-size: 133%; font-style: italic; +} +.text-spacing.usfm_mte2 { text-align: center; margin-bottom: 2pt; } .usfm_ms { + text-align: start; +} +.formatted-font.usfm_ms { font-weight: bold; font-size: 116%; +} +.text-spacing.usfm_ms { text-align: center; margin-bottom: 4pt; margin-top: 16pt; } .usfm_ms1 { + text-align: start; +} +.formatted-font.usfm_ms1 { font-weight: bold; font-size: 116%; +} +.text-spacing.usfm_ms1 { text-align: center; margin-bottom: 4pt; margin-top: 16pt; } .usfm_ms2 { + text-align: start; +} +.formatted-font.usfm_ms2 { font-weight: bold; font-size: 116%; +} +.text-spacing.usfm_ms2 { text-align: center; margin-bottom: 4pt; margin-top: 16pt; } .usfm_ms3 { + text-align: start; +} +.formatted-font.usfm_ms3 { font-size: 116%; font-style: italic; +} +.text-spacing.usfm_ms3 { text-align: center; margin-bottom: 4pt; margin-top: 16pt; } .usfm_mr { + text-align: start; +} +.formatted-font.usfm_mr { font-size: 100%; font-style: italic; +} +.text-spacing.usfm_mr { text-align: center; margin-bottom: 4pt; } .usfm_s { + text-align: start; +} +.formatted-font.usfm_s { font-weight: bold; font-size: 100%; +} +.text-spacing.usfm_s { text-align: center; margin-bottom: 4pt; margin-top: 8pt; } .usfm_s1 { + text-align: start; +} +.formatted-font.usfm_s1 { font-weight: bold; font-size: 100%; +} +.text-spacing.usfm_s1 { text-align: center; margin-bottom: 4pt; margin-top: 8pt; } .usfm_s2 { + text-align: start; +} +.formatted-font.usfm_s2 { font-size: 100%; font-style: italic; +} +.text-spacing.usfm_s2 { text-align: center; margin-bottom: 4pt; margin-top: 8pt; } .usfm_s3 { + text-align: start; +} +.formatted-font.usfm_s3 { font-size: 100%; font-style: italic; - text-align: left; +} +.text-spacing.usfm_s3 { margin-bottom: 3pt; margin-top: 6pt; } .usfm_s4 { + text-align: start; +} +.formatted-font.usfm_s4 { font-size: 100%; font-style: italic; - text-align: left; +} +.text-spacing.usfm_s4 { margin-bottom: 3pt; margin-top: 6pt; } .usfm_sr { + text-align: start; +} +.formatted-font.usfm_sr { font-weight: bold; font-size: 100%; +} +.text-spacing.usfm_sr { text-align: center; margin-bottom: 4pt; } .usfm_r { + text-align: start; +} +.formatted-font.usfm_r { font-size: 100%; font-style: italic; +} +.text-spacing.usfm_r { text-align: center; margin-bottom: 4pt; } .usfm_sp { + text-align: start; +} +.formatted-font.usfm_sp { font-size: 100%; font-style: italic; - text-align: left; +} +.text-spacing.usfm_sp { margin-bottom: 4pt; margin-top: 8pt; } .usfm_d { + text-align: start; +} +.formatted-font.usfm_d { font-size: 100%; font-style: italic; +} +.text-spacing.usfm_d { text-align: center; margin-bottom: 4pt; margin-top: 4pt; } .usfm_sd { - text-align: left; + text-align: start; +} +.text-spacing.usfm_sd { margin-bottom: 24pt; margin-top: 24pt; } .usfm_sd1 { - text-align: left; + text-align: start; +} +.text-spacing.usfm_sd1 { margin-bottom: 24pt; margin-top: 24pt; } .usfm_sd2 { - text-align: left; + text-align: start; +} +.text-spacing.usfm_sd2 { margin-bottom: 18pt; margin-top: 18pt; } .usfm_sd3 { - text-align: left; + text-align: start; +} +.text-spacing.usfm_sd3 { margin-bottom: 12pt; margin-top: 12pt; } .usfm_sd4 { - text-align: left; + text-align: start; +} +.text-spacing.usfm_sd4 { margin-bottom: 8pt; margin-top: 8pt; } -.usfm_tr { - text-indent: -5vw; - font-size: 100%; - text-align: left; - margin-left: 10vw; +.usfm_lh { + text-align: start; } - -.usfm_th1 { +.formatted-font.usfm_lh { font-size: 100%; - font-style: italic; - text-align: left; } - -.usfm_th2 { - font-size: 100%; - font-style: italic; - text-align: left; +.text-spacing.usfm_lh { + text-indent: 2.5vw; } -.usfm_th3 { - font-size: 100%; - font-style: italic; - text-align: left; +.usfm_li { + text-align: start; } - -.usfm_th4 { +.formatted-font.usfm_li { font-size: 100%; - font-style: italic; - text-align: left; +} +.text-spacing.usfm_li { + text-indent: -7.5vw; + margin-left: 10vw; } -.usfm_th5 { +.usfm_li1 { + text-align: start; +} +.formatted-font.usfm_li1 { font-size: 100%; - font-style: italic; - text-align: left; +} +.text-spacing.usfm_li1 { + text-indent: -7.5vw; + margin-left: 10vw; } -.usfm_tc1 { +.usfm_li2 { + text-align: start; +} +.formatted-font.usfm_li2 { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_li2 { + text-indent: -7.5vw; + margin-left: 15vw; } -.usfm_tc2 { +.usfm_li3 { + text-align: start; +} +.formatted-font.usfm_li3 { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_li3 { + text-indent: -7.5vw; + margin-left: 20vw; } -.usfm_tc3 { +.usfm_li4 { + text-align: start; +} +.formatted-font.usfm_li4 { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_li4 { + text-indent: -7.5vw; + margin-left: 25vw; } -.usfm_tc4 { +.usfm_lf { + text-align: start; +} +.formatted-font.usfm_lf { font-size: 100%; - text-align: left; } -.usfm_tc5 { +.usfm_lim { + text-align: start; +} +.formatted-font.usfm_lim { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_lim { + text-indent: -7.5vw; + margin-left: 15vw; + margin-right: 5vw; } -.usfm_thc1 { +.usfm_lim1 { + text-align: start; +} +.formatted-font.usfm_lim1 { font-size: 100%; - font-style: italic; - text-align: center; +} +.text-spacing.usfm_lim1 { + text-indent: -7.5vw; + margin-left: 15vw; + margin-right: 5vw; } -.usfm_thc2 { +.usfm_lim2 { + text-align: start; +} +.formatted-font.usfm_lim2 { font-size: 100%; - font-style: italic; - text-align: center; +} +.text-spacing.usfm_lim2 { + text-indent: -7.5vw; + margin-left: 20vw; } -.usfm_thc3 { +.usfm_lim3 { + text-align: start; +} +.formatted-font.usfm_lim3 { font-size: 100%; - font-style: italic; - text-align: center; +} +.text-spacing.usfm_lim3 { + text-indent: -7.5vw; + margin-left: 25vw; } -.usfm_thc4 { +.usfm_lim4 { + text-align: start; +} +.formatted-font.usfm_lim4 { font-size: 100%; - font-style: italic; - text-align: center; +} +.text-spacing.usfm_lim4 { + text-indent: -7.5vw; + margin-left: 30vw; } -.usfm_thc5 { +.usfm_lit { + text-align: end; +} +.formatted-font.usfm_lit { + font-weight: bold; font-size: 100%; - font-style: italic; - text-align: center; } -.usfm_tcc1 { +.usfm_ph { + text-align: start; +} +.formatted-font.usfm_ph { font-size: 100%; - text-align: center; +} +.text-spacing.usfm_ph { + text-indent: -5vw; + margin-left: 10vw; } -.usfm_tcc2 { +.usfm_ph1 { + text-align: start; +} +.formatted-font.usfm_ph1 { font-size: 100%; - text-align: center; +} +.text-spacing.usfm_ph1 { + text-indent: -5vw; + margin-left: 10vw; } -.usfm_tcc3 { +.usfm_ph2 { + text-align: start; +} +.formatted-font.usfm_ph2 { font-size: 100%; - text-align: center; +} +.text-spacing.usfm_ph2 { + text-indent: -5vw; + margin-left: 15vw; } -.usfm_tcc4 { +.usfm_ph3 { + text-align: start; +} +.formatted-font.usfm_ph3 { font-size: 100%; - text-align: center; +} +.text-spacing.usfm_ph3 { + text-indent: -5vw; + margin-left: 20vw; } -.usfm_tcc5 { - font-size: 100%; - text-align: center; +/* check if deprecated */ +.usfm_phi { + text-align: start; +} +.text-spacing.usfm_phi { + margin-left: 20vw; } -.usfm_thr1 { +/* CharNode */ + +.usfm_qs { + text-align: start; +} +.formatted-font .usfm_qs { font-size: 100%; font-style: italic; - text-align: right; } -.usfm_thr2 { +.usfm_qac { + text-align: start; +} +.formatted-font .usfm_qac { font-size: 100%; font-style: italic; - text-align: right; } -.usfm_thr3 { +.usfm_litl { + text-align: start; +} +.formatted-font .usfm_litl { font-size: 100%; font-style: italic; - text-align: right; } -.usfm_thr4 { +.usfm_lik { + text-align: start; +} +.formatted-font .usfm_lik { font-size: 100%; font-style: italic; - text-align: right; } -.usfm_thr5 { +.usfm_liv { + text-align: start; +} +.formatted-font .usfm_liv { font-size: 100%; - font-style: italic; - text-align: right; } -.usfm_tcr1 { +.usfm_liv1 { + text-align: start; +} +.formatted-font .usfm_liv1 { font-size: 100%; - text-align: right; } -.usfm_tcr2 { +.usfm_liv2 { + text-align: start; +} +.formatted-font .usfm_liv2 { font-size: 100%; - text-align: right; } -.usfm_tcr3 { +.usfm_liv3 { + text-align: start; +} +.formatted-font .usfm_liv3 { font-size: 100%; - text-align: right; } -.usfm_tcr4 { +.usfm_liv4 { + text-align: start; +} +.formatted-font .usfm_liv4 { font-size: 100%; - text-align: right; } -.usfm_tcr5 { +.usfm_liv5 { + text-align: start; +} +.formatted-font .usfm_liv5 { font-size: 100%; - text-align: right; } -.usfm_lh { - text-indent: 2.5vw; +.usfm_rq { + text-align: start; +} +.formatted-font .usfm_rq { + font-size: 83%; + font-style: italic; +} + +.usfm_qt { + text-align: start; +} +.formatted-font .usfm_qt { + font-weight: bold; font-size: 100%; - text-align: left; } -.usfm_li { - text-indent: -7.5vw; +.usfm_nd { + text-align: start; +} +.formatted-font .usfm_nd { font-size: 100%; - text-align: left; - margin-left: 10vw; + text-decoration: underline; } -.usfm_li1 { - text-indent: -7.5vw; +.usfm_tl { + text-align: start; +} +.formatted-font .usfm_tl { font-size: 100%; - text-align: left; - margin-left: 10vw; + font-style: italic; } -.usfm_li2 { - text-indent: -7.5vw; +.usfm_dc { + text-align: start; +} +.formatted-font .usfm_dc { + font-style: italic; +} + +.usfm_bk { + text-align: start; +} +.formatted-font .usfm_bk { font-size: 100%; - text-align: left; - margin-left: 15vw; + font-style: italic; } -.usfm_li3 { - text-indent: -7.5vw; +.usfm_sig { + text-align: start; +} +.formatted-font .usfm_sig { font-size: 100%; - text-align: left; - margin-left: 20vw; + font-style: italic; } -.usfm_li4 { - text-indent: -7.5vw; +.usfm_pn { + text-align: start; +} +.formatted-font .usfm_pn { + font-weight: bold; font-size: 100%; - text-align: left; - margin-left: 25vw; + text-decoration: underline; } -.usfm_lf { +.usfm_png { + text-align: start; +} +.formatted-font .usfm_png { font-size: 100%; - text-align: left; + text-decoration: underline; } -.usfm_lim { - text-indent: -7.5vw; +/* check if deprecated */ +.usfm_addpn { + text-align: start; +} +.formatted-font .usfm_addpn { + font-weight: bold; font-size: 100%; - text-align: left; - margin-left: 15vw; - margin-right: 5vw; + font-style: italic; + text-decoration: underline; } -.usfm_lim1 { - text-indent: -7.5vw; +.usfm_wj { + text-align: start; +} +.formatted-font .usfm_wj { + color: #d43128; font-size: 100%; - text-align: left; - margin-left: 15vw; - margin-right: 5vw; } -.usfm_lim2 { - text-indent: -7.5vw; +.usfm_k { + text-align: start; +} +.formatted-font .usfm_k { + font-weight: bold; font-size: 100%; - text-align: left; - margin-left: 20vw; + font-style: italic; } -.usfm_lim3 { - text-indent: -7.5vw; +.usfm_sls { + text-align: start; +} +.formatted-font .usfm_sls { font-size: 100%; - text-align: left; - margin-left: 25vw; + font-style: italic; } -.usfm_lim4 { - text-indent: -7.5vw; +.usfm_ord { + text-align: start; +} +.formatted-font .usfm_ord { + vertical-align: text-top; + font-size: 66%; +} + +.usfm_add { + text-align: start; +} +.formatted-font .usfm_add { + font-weight: bold; + font-style: italic; +} + +.usfm_no { + text-align: start; +} +.formatted-font .usfm_no { font-size: 100%; - text-align: left; - margin-left: 30vw; } -.usfm_litl { +.usfm_it { + text-align: start; +} +.formatted-font .usfm_it { font-size: 100%; font-style: italic; - text-align: left; } -.usfm_lik { +.usfm_bd { + text-align: start; +} +.formatted-font .usfm_bd { + font-weight: bold; + font-size: 100%; +} + +.usfm_bdit { + text-align: start; +} +.formatted-font .usfm_bdit { + font-weight: bold; font-size: 100%; font-style: italic; - text-align: left; } -.usfm_liv { +.usfm_em { + text-align: start; +} +.formatted-font .usfm_em { font-size: 100%; - text-align: left; + font-style: italic; } -.usfm_liv1 { +.usfm_sc { + text-align: start; +} +.formatted-font .usfm_sc { font-size: 100%; - text-align: left; + font-variant: small-caps; } -.usfm_liv2 { +.usfm_sup { + text-align: start; +} +.formatted-font .usfm_sup { + vertical-align: text-top; + font-size: 66%; +} + +/* check if deprecated */ +.usfm_pb { + text-align: start; +} +.formatted-font .usfm_pb { font-size: 100%; - text-align: left; } -.usfm_liv3 { +/* check if deprecated */ +.usfm_fig { + text-align: start; +} +.formatted-font .usfm_fig { font-size: 100%; - text-align: left; } -.usfm_liv4 { +.usfm_jmp { + text-align: start; +} +.formatted-font .usfm_jmp { + color: #003380; + text-decoration: underline; +} + +.usfm_pro { + text-align: start; +} +.formatted-font .usfm_pro { + font-size: 83%; +} + +.usfm_rb { + text-align: start; +} + +.usfm_w { + text-align: start; +} +.formatted-font .usfm_w { font-size: 100%; - text-align: left; } -.usfm_liv5 { +.usfm_wh { + text-align: start; +} +.formatted-font .usfm_wh { + font-size: 100%; +} + +.usfm_wg { + text-align: start; +} +.formatted-font .usfm_wg { + font-size: 100%; +} + +.usfm_wa { + text-align: start; +} +.formatted-font .usfm_wa { + font-size: 100%; +} + +/* check if deprecated */ +.usfm_ndx { + text-align: start; +} +.formatted-font .usfm_ndx { font-size: 100%; - text-align: left; } +/* NoteNode */ + .usfm_f { + text-align: start; +} +.formatted-font .usfm_f { font-size: 100%; - text-align: left; } .usfm_fe { + text-align: start; +} +.formatted-font .usfm_fe { font-size: 100%; - text-align: left; } +/* CharNode */ + .usfm_fr { + text-align: start; +} +.formatted-font .usfm_fr { font-weight: bold; font-size: 100%; - text-align: left; } .usfm_ft { + text-align: start; +} +.formatted-font .usfm_ft { font-size: 100%; - text-align: left; } .usfm_fk { + text-align: start; +} +.formatted-font .usfm_fk { font-weight: bold; font-size: 100%; font-style: italic; - text-align: left; } .usfm_fq { + text-align: start; +} +.formatted-font .usfm_fq { font-size: 100%; font-style: italic; - text-align: left; } .usfm_fqa { + text-align: start; +} +.formatted-font .usfm_fqa { font-size: 100%; font-style: italic; - text-align: left; } .usfm_fl { + text-align: start; +} +.formatted-font .usfm_fl { font-weight: bold; font-size: 100%; font-style: italic; - text-align: left; } .usfm_fw { + text-align: start; +} +.formatted-font .usfm_fw { font-size: 100%; - text-align: left; } .usfm_fp { + text-align: start; +} +.formatted-font .usfm_fp { font-size: 100%; - text-align: left; } .usfm_fv { - font-size: 100%; - text-align: left; + text-align: start; +} +.formatted-font .usfm_fv { vertical-align: text-top; font-size: 66%; } .usfm_fdc { + text-align: start; +} +.formatted-font .usfm_fdc { font-size: 100%; - text-align: left; } .usfm_fm { - font-size: 100%; - text-align: left; + text-align: start; +} +.formatted-font .usfm_fm { vertical-align: text-top; font-size: 66%; } +/* NoteNode */ + .usfm_x { + text-align: start; +} +.formatted-font .usfm_x { font-size: 100%; - text-align: left; } +/* CharNode */ + .usfm_xo { + text-align: start; +} +.formatted-font .usfm_xo { font-weight: bold; font-size: 100%; - text-align: left; } .usfm_xop { + text-align: start; +} +.formatted-font .usfm_xop { font-size: 100%; - text-align: left; } .usfm_xt { + text-align: start; +} +.formatted-font .usfm_xt { font-size: 100%; - text-align: left; + unicode-bidi: embed; } .usfm_xta { + text-align: start; +} +.formatted-font .usfm_xta { font-size: 100%; - text-align: left; } .usfm_xk { + text-align: start; +} +.formatted-font .usfm_xk { font-size: 100%; font-style: italic; - text-align: left; } .usfm_xq { + text-align: start; +} +.formatted-font .usfm_xq { font-size: 100%; font-style: italic; - text-align: left; } .usfm_xot { + text-align: start; +} +.formatted-font .usfm_xot { font-size: 100%; - text-align: left; } .usfm_xnt { + text-align: start; +} +.formatted-font .usfm_xnt { font-size: 100%; - text-align: left; } .usfm_xdc { + text-align: start; +} +.formatted-font .usfm_xdc { font-size: 100%; - text-align: left; } -.usfm_rq { - font-size: 83%; - font-style: italic; - text-align: left; -} +/* periph */ -.usfm_qt { +.usfm_periph { + text-align: start; +} +.formatted-font.usfm_periph { font-weight: bold; + color: #e87217; + font-size: 116%; +} +.text-spacing.usfm_periph { + margin-bottom: 4pt; + margin-top: 16pt; +} + +.usfm_p1 { + text-align: start; +} +.formatted-font.usfm_p1 { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_p1 { + text-indent: 2.5vw; } -.usfm_nd { +.usfm_p2 { + text-align: start; +} +.formatted-font.usfm_p2 { font-size: 100%; - text-align: left; - text-decoration: underline; +} +.text-spacing.usfm_p2 { + text-indent: 2.5vw; + margin-left: 2.5vw; } -.usfm_tl { +.usfm_k1 { + text-align: start; +} +.formatted-font.usfm_k1 { font-size: 100%; - font-style: italic; - text-align: left; } -.usfm_dc { - font-style: italic; - text-align: left; +.usfm_k2 { + text-align: start; +} +.formatted-font.usfm_k2 { + font-size: 100%; } -.usfm_bk { +.usfm_xtSee { + text-align: start; +} +.formatted-font.usfm_xtSee { + color: #003380; font-size: 100%; font-style: italic; - text-align: left; } -.usfm_sig { +.usfm_xtSeeAlso { + text-align: start; +} +.formatted-font.usfm_xtSeeAlso { + color: #003380; font-size: 100%; font-style: italic; - text-align: left; } -.usfm_pn { - font-weight: bold; - font-size: 100%; - text-align: left; - text-decoration: underline; +/* MilestoneNode */ + +.usfm_qt-s { + text-align: start; } -.usfm_png { - font-size: 100%; - text-align: left; - text-decoration: underline; +.usfm_qt-e { + text-align: start; } -.usfm_addpn { - font-weight: bold; - font-size: 100%; - font-style: italic; - text-align: left; - text-decoration: underline; +.usfm_qt1-s { + text-align: start; } -.usfm_wj { - color: #d43128; - font-size: 100%; - text-align: left; +.usfm_qt1-e { + text-align: start; } -.usfm_k { - font-weight: bold; - font-size: 100%; - font-style: italic; - text-align: left; +.usfm_qt2-s { + text-align: start; } -.usfm_sls { - font-size: 100%; - font-style: italic; - text-align: left; +.usfm_qt2-e { + text-align: start; } -.usfm_ord { - font-size: 100%; - text-align: left; - vertical-align: text-top; - font-size: 66%; +.usfm_qt3-s { + text-align: start; } -.usfm_add { - font-weight: bold; - font-style: italic; - text-align: left; +.usfm_qt3-e { + text-align: start; +} + +.usfm_qt4-s { + text-align: start; +} + +.usfm_qt4-e { + text-align: start; +} + +.usfm_qt5-s { + text-align: start; +} + +.usfm_qt5-e { + text-align: start; +} + +.usfm_ts-s { + text-align: start; +} + +.usfm_ts-e { + text-align: start; } -.usfm_lit { - font-weight: bold; +/* table */ + +.usfm_tr { + text-align: start; +} +.formatted-font .usfm_tr { font-size: 100%; - text-align: right; +} +.text-spacing .usfm_tr { + text-indent: -5vw; + margin-left: 10vw; } -.usfm_no { +.usfm_th1 { + text-align: start; +} +.formatted-font .usfm_th1 { font-size: 100%; - text-align: left; + font-style: italic; } -.usfm_it { +.usfm_th2 { + text-align: start; +} +.formatted-font .usfm_th2 { font-size: 100%; font-style: italic; - text-align: left; } -.usfm_bd { - font-weight: bold; +.usfm_th3 { + text-align: start; +} +.formatted-font .usfm_th3 { font-size: 100%; - text-align: left; + font-style: italic; } -.usfm_bdit { - font-weight: bold; +.usfm_th4 { + text-align: start; +} +.formatted-font .usfm_th4 { font-size: 100%; font-style: italic; - text-align: left; } -.usfm_em { +.usfm_th5 { + text-align: start; +} +.formatted-font .usfm_th5 { font-size: 100%; font-style: italic; - text-align: left; } -.usfm_sc { +.usfm_tc1 { + text-align: start; +} +.formatted-font .usfm_tc1 { font-size: 100%; - font-variant: small-caps; - text-align: left; } -.usfm_sup { +.usfm_tc2 { + text-align: start; +} +.formatted-font .usfm_tc2 { font-size: 100%; - text-align: left; - vertical-align: text-top; - font-size: 66%; } -.usfm_pb { +.usfm_tc3 { + text-align: start; +} +.formatted-font .usfm_tc3 { font-size: 100%; - text-align: left; } -.usfm_fig { +.usfm_tc4 { + text-align: start; +} +.formatted-font .usfm_tc4 { font-size: 100%; - text-align: left; } -.usfm_jmp { - color: #003380; - text-align: left; - text-decoration: underline; +.usfm_tc5 { + text-align: start; } - -.usfm_pro { - font-size: 83%; - text-align: left; +.formatted-font .usfm_tc5 { + font-size: 100%; } -.usfm_rb { - text-align: left; +.usfm_thc1 { + text-align: start; } - -.usfm_w { +.formatted-font .usfm_thc1 { font-size: 100%; - text-align: left; + font-style: italic; +} +.text-spacing .usfm_thc1 { + text-align: center; } -.usfm_wh { +.usfm_thc2 { + text-align: start; +} +.formatted-font .usfm_thc2 { font-size: 100%; - text-align: left; + font-style: italic; +} +.text-spacing .usfm_thc2 { + text-align: center; } -.usfm_wg { +.usfm_thc3 { + text-align: start; +} +.formatted-font .usfm_thc3 { font-size: 100%; - text-align: left; + font-style: italic; +} +.text-spacing .usfm_thc3 { + text-align: center; } -.usfm_wa { +.usfm_thc4 { + text-align: start; +} +.formatted-font .usfm_thc4 { font-size: 100%; - text-align: left; + font-style: italic; +} +.text-spacing .usfm_thc4 { + text-align: center; } -.usfm_ndx { +.usfm_thc5 { + text-align: start; +} +.formatted-font .usfm_thc5 { font-size: 100%; - text-align: left; + font-style: italic; +} +.text-spacing .usfm_thc5 { + text-align: center; } -.usfm_periph { - font-weight: bold; - color: #e87217; - font-size: 116%; - text-align: left; - margin-bottom: 4pt; - margin-top: 16pt; +.usfm_tcc1 { + text-align: start; +} +.formatted-font .usfm_tcc { + font-size: 100%; +} +.text-spacing .usfm_tcc { + text-align: center; } -.usfm_p1 { - text-indent: 2.5vw; +.usfm_tcc2 { + text-align: start; +} +.formatted-font .usfm_tcc2 { font-size: 100%; - text-align: left; +} +.text-spacing .usfm_tcc2 { + text-align: center; } -.usfm_p2 { - text-indent: 2.5vw; +.usfm_tcc3 { + text-align: start; +} +.formatted-font .usfm_tcc3 { font-size: 100%; - text-align: left; - margin-left: 2.5vw; +} +.text-spacing .usfm_tcc3 { + text-align: center; } -.usfm_k1 { +.usfm_tcc4 { + text-align: start; +} +.formatted-font .usfm_tcc4 { font-size: 100%; - text-align: left; +} +.text-spacing .usfm_tcc4 { + text-align: center; } -.usfm_k2 { +.usfm_tcc5 { + text-align: start; +} +.formatted-font .usfm_tcc5 { font-size: 100%; - text-align: left; +} +.text-spacing .usfm_tcc5 { + text-align: center; } -.usfm_xtSee { - color: #003380; +.usfm_thr1 { + text-align: start; +} +.formatted-font .usfm_thr1 { font-size: 100%; font-style: italic; - text-align: left; +} +.text-spacing .usfm_thr1 { + text-align: end; } -.usfm_xtSeeAlso { - color: #003380; +.usfm_thr2 { + text-align: start; +} +.formatted-font .usfm_thr2 { font-size: 100%; font-style: italic; - text-align: left; } - -.usfm_qt-s { - text-align: left; +.text-spacing .usfm_thr2 { + text-align: end; } -.usfm_qt-e { - text-align: left; +.usfm_thr3 { + text-align: start; } - -.usfm_qt1-s { - text-align: left; +.formatted-font .usfm_thr3 { + font-size: 100%; + font-style: italic; } - -.usfm_qt1-e { - text-align: left; +.text-spacing .usfm_thr3 { + text-align: end; } -.usfm_qt2-s { - text-align: left; +.usfm_thr4 { + text-align: start; } - -.usfm_qt2-e { - text-align: left; +.formatted-font .usfm_thr4 { + font-size: 100%; + font-style: italic; } - -.usfm_qt3-s { - text-align: left; +.text-spacing .usfm_thr4 { + text-align: end; } -.usfm_qt3-e { - text-align: left; +.usfm_thr5 { + text-align: start; } - -.usfm_qt4-s { - text-align: left; +.formatted-font .usfm_thr5 { + font-size: 100%; + font-style: italic; } - -.usfm_qt4-e { - text-align: left; +.text-spacing .usfm_thr5 { + text-align: end; } -.usfm_qt5-s { - text-align: left; +.usfm_tcr1 { + text-align: start; } - -.usfm_qt5-e { - text-align: left; +.formatted-font .usfm_tcr1 { + font-size: 100%; } - -.usfm_ts-s { - text-align: left; +.text-spacing .usfm_tcr1 { + text-align: end; } -.usfm_ts-e { - text-align: left; +.usfm_tcr2 { + text-align: start; } - -.usfm_ph { - text-indent: -5vw; +.formatted-font .usfm_tcr2 { font-size: 100%; - text-align: left; - margin-left: 10vw; +} +.text-spacing .usfm_tcr2 { + text-align: end; } -.usfm_ph1 { - text-indent: -5vw; +.usfm_tcr3 { + text-align: start; +} +.formatted-font .usfm_tcr3 { font-size: 100%; - text-align: left; - margin-left: 10vw; +} +.text-spacing .usfm_tcr3 { + text-align: end; } -.usfm_ph2 { - text-indent: -5vw; +.usfm_tcr4 { + text-align: start; +} +.formatted-font .usfm_tcr4 { font-size: 100%; - text-align: left; - margin-left: 15vw; +} +.text-spacing .usfm_tcr4 { + text-align: end; } -.usfm_ph3 { - text-indent: -5vw; +.usfm_tcr5 { + text-align: start; +} +.formatted-font .usfm_tcr5 { font-size: 100%; - text-align: left; - margin-left: 20vw; } - -.usfm_phi { - text-align: left; - margin-left: 20vw; +.text-spacing .usfm_tcr5 { + text-align: end; } +/* table/unknown */ + .usfm_tr1 { - text-indent: -5vw; + text-align: start; +} +.formatted-font .usfm_tr1 { font-size: 100%; - text-align: left; +} +.text-spacing .usfm_tr1 { + text-indent: -5vw; margin-left: 10vw; } .usfm_tr2 { - text-indent: -5vw; + text-align: start; +} +.formatted-font .usfm_tr2 { font-size: 100%; - text-align: left; +} +.text-spacing .usfm_tr2 { + text-indent: -5vw; margin-left: 15vw; } .usfm_ps { - text-indent: 2.5vw; + text-align: start; +} +.formatted-font.usfm_ps { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_ps { + text-indent: 2.5vw; } .usfm_psi { - text-indent: 2.5vw; + text-align: start; +} +.formatted-font.usfm_psi { font-size: 100%; - text-align: left; +} +.text-spacing.usfm_psi { + text-indent: 2.5vw; margin-left: 5vw; margin-right: 5vw; } .usfm_fs { + text-align: start; +} +.formatted-font.usfm_ps { font-size: 100%; font-style: italic; - text-align: left; } .usfm_wr { + text-align: start; +} +.formatted-font.usfm_wr { font-size: 100%; font-style: italic; - text-align: left; } .usfm_pub { + text-align: start; +} +.formatted-font.usfm_pub { font-size: 83%; - text-align: left; } .usfm_toc { + text-align: start; +} +.formatted-font.usfm_toc { font-size: 83%; - text-align: left; } .usfm_pref { + text-align: start; +} +.formatted-font.usfm_pref { font-size: 83%; - text-align: left; } .usfm_intro { + text-align: start; +} +.formatted-font.usfm_intro { font-size: 83%; - text-align: left; } .usfm_conc { + text-align: start; +} +.formatted-font.usfm_conc { font-size: 83%; - text-align: left; } .usfm_glo { + text-align: start; +} +.formatted-font.usfm_glo { font-size: 83%; - text-align: left; } .usfm_idx { + text-align: start; +} +.formatted-font.usfm_idx { font-size: 83%; - text-align: left; } .usfm_maps { + text-align: start; +} +.formatted-font.usfm_maps { font-size: 83%; - text-align: left; } .usfm_cov { + text-align: start; +} +.formatted-font.usfm_cov { font-size: 83%; - text-align: left; } .usfm_spine { + text-align: start; +} +.formatted-font.usfm_spine { font-size: 83%; - text-align: left; } .usfm_pubinfo { + text-align: start; +} +.formatted-font.usfm_pubinfo { color: #003380; font-size: 100%; - text-align: left; } .usfm_zpa-xb { + text-align: start; +} +.formatted-font.usfm_zpa-xb { font-size: 100%; - text-align: left; } .usfm_zpa-xc { + text-align: start; +} +.formatted-font.usfm_zpa-xc { font-weight: bold; font-size: 100%; - text-align: left; } .usfm_zpa-xv { + text-align: start; +} +.formatted-font.usfm_zpa-xv { font-size: 100%; - text-align: left; } .usfm_zpa-d { + text-align: start; +} +.formatted-font.usfm_zpa-d { font-size: 100%; - text-align: left; } -/* body::before { - background-image: linear-gradient(to top, rgba(252,252,252,0.4) 0%, rgba(252,252,252,1)); - content: ''; - position: fixed; - top: 0px; - width: 100%; - height: 4px; -} */ - body { background-color: rgba(252, 252, 252, 1); color: rgba(25, 25, 25, 1); } .marker { + unicode-bidi: isolate; +} +.formatted-font .marker { color: rgba(140, 140, 140, 1); font-size: 0.7em; - unicode-bidi: isolate; } .notetext { unicode-bidi: embed; } -/* Used for unformatted displays */ -.markerplain { - unicode-bidi: isolate; -} - .attribute { color: rgba(170, 170, 170, 1); } @@ -1784,10 +2639,29 @@ body { font-weight: bold; } -/* added for FB24898 */ -/* Updated for FB34868 */ -.usfm_xt { - unicode-bidi: embed; +/* NoteNode, ImmutableNoteCallerNode */ + +.immutable-note-caller, +/* Styles for Preview (and Ruby) views */ +.caller_preview, +.previewcallee { + color: rgba(18, 82, 179, 1); + font-weight: bold; + line-height: 1; + vertical-align: super; + font-size: 0.66em; +} + +.immutable-note-caller > button { + cursor: pointer; + text-decoration: none; + border: 0; + padding: 0; + background-color: inherit; +} + +.immutable-note-caller[data-caller="-"] { + display: none; } .caller_big { @@ -1849,16 +2723,6 @@ rt { color: rgba(204, 30, 20, 1); } -/* Styles for Preview (and Ruby) views */ -.caller_preview, -.previewcallee { - color: rgba(18, 82, 179, 1); - font-weight: bold; - line-height: 1; - vertical-align: text-top; - font-size: 0.66em; -} - .caption { text-align: center; font-style: italic; @@ -1874,13 +2738,17 @@ rt { margin-left: 10px; } -.verse { +/* VerseNode, ImmutableVerseNode */ + +.formatted-font .verse { background-color: rgba(222, 222, 222, 1); + vertical-align: super; + font-size: 0.66em; +} +.text-spacing .verse { margin: 0px 2px 0px 2px; padding: 0px 1px 0px 1px; text-indent: 0in; - vertical-align: text-top; - font-size: 0.66em; white-space: nowrap; } diff --git a/extensions/src/resource-viewer/src/resource-viewer.web-view.scss b/extensions/src/resource-viewer/src/resource-viewer.web-view.scss index 35fd443d2e..51fa97c439 100644 --- a/extensions/src/resource-viewer/src/resource-viewer.web-view.scss +++ b/extensions/src/resource-viewer/src/resource-viewer.web-view.scss @@ -1,5 +1,4 @@ -// TODO: replace this `styles` file with one from each Scripture project. -@import './styles'; +@import './usj-nodes'; @import './editor'; @import './editor-overrides'; diff --git a/extensions/src/resource-viewer/src/resource-viewer.web-view.tsx b/extensions/src/resource-viewer/src/resource-viewer.web-view.tsx index fc7bdd7368..8d4148448c 100644 --- a/extensions/src/resource-viewer/src/resource-viewer.web-view.tsx +++ b/extensions/src/resource-viewer/src/resource-viewer.web-view.tsx @@ -2,9 +2,15 @@ import { VerseRef } from '@sillsdev/scripture'; import { logger } from '@papi/frontend'; import { useProjectData, useSetting } from '@papi/frontend/react'; import { ScriptureReference } from 'platform-bible-utils'; -import { JSX, useEffect, useMemo, useState } from 'react'; +import { JSX, useCallback, useEffect, useMemo, useRef } from 'react'; import type { WebViewProps } from '@papi/core'; -import { Editor, Usj, usxStringToJson } from '@biblionexus-foundation/platform-editor'; +import { + Editor, + EditorRef, + Usj, + usjToUsxString, + usxStringToUsj, +} from '@biblionexus-foundation/platform-editor'; const defaultScrRef: ScriptureReference = { bookNum: 1, @@ -16,26 +22,31 @@ globalThis.webViewComponent = function ResourceViewer({ useWebViewState, }: WebViewProps): JSX.Element { const [projectId] = useWebViewState('projectId', ''); - logger.debug(`Resource Viewer project ID: ${projectId}`); + // This ref becomes defined when passed to the editor. + // eslint-disable-next-line no-type-assertion/no-type-assertion, no-null/no-null + const editorRef = useRef(null!); const [scrRef, setScrRef] = useSetting('platform.verseRef', defaultScrRef); - const [usx] = useProjectData('ParatextStandard', projectId).ChapterUSX( + const [usx, setUsx] = useProjectData('ParatextStandard', projectId).ChapterUSX( useMemo(() => new VerseRef(scrRef.bookNum, scrRef.chapterNum, scrRef.verseNum), [scrRef]), '', ); - const [usj, setUsj] = useState(); + const onChange = useCallback((usj: Usj) => setUsx?.(usjToUsxString(usj)), [setUsx]); + useEffect(() => { - if (usx) { - try { - setUsj(usxStringToJson(usx)); - } catch (e) { - logger.warn(`ResourceViewer convert error: ${e}`); - } - } + if (usx) editorRef.current?.setUsj(usxStringToUsj(usx)); }, [usx]); - return ; + return ( + + ); }; diff --git a/package-lock.json b/package-lock.json index 9daef36290..e46ac341ab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -475,7 +475,7 @@ "platform-bible-utils": "file:../../../lib/platform-bible-utils" }, "devDependencies": { - "@biblionexus-foundation/platform-editor": "^0.0.5", + "@biblionexus-foundation/platform-editor": "^0.1.0", "@swc/core": "^1.4.2", "@types/node": "^20.11.19", "@types/react": "^18.2.57", @@ -3000,10 +3000,21 @@ "dev": true }, "node_modules/@biblionexus-foundation/platform-editor": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/@biblionexus-foundation/platform-editor/-/platform-editor-0.0.5.tgz", - "integrity": "sha512-bgWfR5jHvAGDucmU674CcWabpc5TM2Ydwgavahw+gcPPHBveYlU/nTsoOKZp3TDjMD9dMCQ1GpNzte5uR002VA==", + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@biblionexus-foundation/platform-editor/-/platform-editor-0.1.0.tgz", + "integrity": "sha512-Kqdorkm3+OAogEtYcTs4dH9qgMpL32tgyT5mYiZn4aaR/W0upIDNzG6QHcodx0/5edzSOc2+YOdBLt5II+jNUw==", "dev": true, + "dependencies": { + "@lexical/code": "^0.13.1", + "@lexical/link": "^0.13.1", + "@lexical/list": "^0.13.1", + "@lexical/react": "^0.13.1", + "@lexical/rich-text": "^0.13.1", + "@lexical/selection": "^0.13.1", + "@lexical/utils": "^0.13.1", + "fast-equals": "^5.0.1", + "lexical": "^0.13.1" + }, "peerDependencies": { "react": ">=18.2.0", "react-dom": ">=18.2.0" @@ -4864,6 +4875,263 @@ "dev": true, "license": "MIT" }, + "node_modules/@lexical/clipboard": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/clipboard/-/clipboard-0.13.1.tgz", + "integrity": "sha512-gMSbVeqb7S+XAi/EMMlwl+FCurLPugN2jAXcp5k5ZaUd7be8B+iupbYdoKkjt4qBhxmvmfe9k46GoC0QOPl/nw==", + "dev": true, + "dependencies": { + "@lexical/html": "0.13.1", + "@lexical/list": "0.13.1", + "@lexical/selection": "0.13.1", + "@lexical/utils": "0.13.1" + }, + "peerDependencies": { + "lexical": "0.13.1" + } + }, + "node_modules/@lexical/code": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/code/-/code-0.13.1.tgz", + "integrity": "sha512-QK77r3QgEtJy96ahYXNgpve8EY64BQgBSnPDOuqVrLdl92nPzjqzlsko2OZldlrt7gjXcfl9nqfhZ/CAhStfOg==", + "dev": true, + "dependencies": { + "@lexical/utils": "0.13.1", + "prismjs": "^1.27.0" + }, + "peerDependencies": { + "lexical": "0.13.1" + } + }, + "node_modules/@lexical/dragon": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/dragon/-/dragon-0.13.1.tgz", + "integrity": "sha512-aNlqfif4//jW7gOxbBgdrbDovU6m3EwQrUw+Y/vqRkY+sWmloyAUeNwCPH1QP3Q5cvfolzOeN5igfBljsFr+1g==", + "dev": true, + "peerDependencies": { + "lexical": "0.13.1" + } + }, + "node_modules/@lexical/hashtag": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/hashtag/-/hashtag-0.13.1.tgz", + "integrity": "sha512-Dl0dUG4ZXNjYYuAUR0GMGpLGsA+cps2/ln3xEmy28bZR0sKkjXugsu2QOIxZjYIPBewDrXzPcvK8md45cMYoSg==", + "dev": true, + "dependencies": { + "@lexical/utils": "0.13.1" + }, + "peerDependencies": { + "lexical": "0.13.1" + } + }, + "node_modules/@lexical/history": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/history/-/history-0.13.1.tgz", + "integrity": "sha512-cZXt30MalEEiRaflE9tHeGYnwT1xSDjXLsf9M409DSU9POJyZ1fsULJrG1tWv2uFQOhwal33rve9+MatUlITrg==", + "dev": true, + "dependencies": { + "@lexical/utils": "0.13.1" + }, + "peerDependencies": { + "lexical": "0.13.1" + } + }, + "node_modules/@lexical/html": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/html/-/html-0.13.1.tgz", + "integrity": "sha512-XkZrnCSHIUavtpMol6aG8YsJ5KqC9hMxEhAENf3HTGi3ocysCByyXOyt1EhEYpjJvgDG4wRqt25xGDbLjj1/sA==", + "dev": true, + "dependencies": { + "@lexical/selection": "0.13.1", + "@lexical/utils": "0.13.1" + }, + "peerDependencies": { + "lexical": "0.13.1" + } + }, + "node_modules/@lexical/link": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/link/-/link-0.13.1.tgz", + "integrity": "sha512-7E3B2juL2UoMj2n+CiyFZ7tlpsdViAoIE7MpegXwfe/VQ66wFwk/VxGTa/69ng2EoF7E0kh+SldvGQDrWAWb1g==", + "dev": true, + "dependencies": { + "@lexical/utils": "0.13.1" + }, + "peerDependencies": { + "lexical": "0.13.1" + } + }, + "node_modules/@lexical/list": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/list/-/list-0.13.1.tgz", + "integrity": "sha512-6U1pmNZcKLuOWiWRML8Raf9zSEuUCMlsOye82niyF6I0rpPgYo5UFghAAbGISDsyqzM1B2L4BgJ6XrCk/dJptg==", + "dev": true, + "dependencies": { + "@lexical/utils": "0.13.1" + }, + "peerDependencies": { + "lexical": "0.13.1" + } + }, + "node_modules/@lexical/mark": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/mark/-/mark-0.13.1.tgz", + "integrity": "sha512-dW27PW8wWDOKFqXTBUuUfV+umU0KfwvXGkPUAxRJrvwUWk5RKaS48LhgbNlQ5BfT84Q8dSiQzvbaa6T40t9a3A==", + "dev": true, + "dependencies": { + "@lexical/utils": "0.13.1" + }, + "peerDependencies": { + "lexical": "0.13.1" + } + }, + "node_modules/@lexical/markdown": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/markdown/-/markdown-0.13.1.tgz", + "integrity": "sha512-6tbdme2h5Zy/M88loVQVH5G0Nt7VMR9UUkyiSaicyBRDOU2OHacaXEp+KSS/XuF+d7TA+v/SzyDq8HS77cO1wA==", + "dev": true, + "dependencies": { + "@lexical/code": "0.13.1", + "@lexical/link": "0.13.1", + "@lexical/list": "0.13.1", + "@lexical/rich-text": "0.13.1", + "@lexical/text": "0.13.1", + "@lexical/utils": "0.13.1" + }, + "peerDependencies": { + "lexical": "0.13.1" + } + }, + "node_modules/@lexical/offset": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/offset/-/offset-0.13.1.tgz", + "integrity": "sha512-j/RZcztJ7dyTrfA2+C3yXDzWDXV+XmMpD5BYeQCEApaHvlo20PHt1BISk7RcrnQW8PdzGvpKblRWf//c08LS9w==", + "dev": true, + "peerDependencies": { + "lexical": "0.13.1" + } + }, + "node_modules/@lexical/overflow": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/overflow/-/overflow-0.13.1.tgz", + "integrity": "sha512-Uw34j+qG2UJRCIR+bykfFMduFk7Pc4r/kNt8N1rjxGuGXAsreTVch1iOhu7Ev6tJgkURsduKuaJCAi7iHnKl7g==", + "dev": true, + "peerDependencies": { + "lexical": "0.13.1" + } + }, + "node_modules/@lexical/plain-text": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/plain-text/-/plain-text-0.13.1.tgz", + "integrity": "sha512-4j5KAsMKUvJ8LhVDSS4zczbYXzdfmgYSAVhmqpSnJtud425Nk0TAfpUBLFoivxZB7KMoT1LGWQZvd47IvJPvtA==", + "dev": true, + "peerDependencies": { + "@lexical/clipboard": "0.13.1", + "@lexical/selection": "0.13.1", + "@lexical/utils": "0.13.1", + "lexical": "0.13.1" + } + }, + "node_modules/@lexical/react": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/react/-/react-0.13.1.tgz", + "integrity": "sha512-Sy6EL230KAb0RZsZf1dZrRrc3+rvCDQWltcd8C/cqBUYlxsLYCW9s4f3RB2werngD/PtLYbBB48SYXNkIALITA==", + "dev": true, + "dependencies": { + "@lexical/clipboard": "0.13.1", + "@lexical/code": "0.13.1", + "@lexical/dragon": "0.13.1", + "@lexical/hashtag": "0.13.1", + "@lexical/history": "0.13.1", + "@lexical/link": "0.13.1", + "@lexical/list": "0.13.1", + "@lexical/mark": "0.13.1", + "@lexical/markdown": "0.13.1", + "@lexical/overflow": "0.13.1", + "@lexical/plain-text": "0.13.1", + "@lexical/rich-text": "0.13.1", + "@lexical/selection": "0.13.1", + "@lexical/table": "0.13.1", + "@lexical/text": "0.13.1", + "@lexical/utils": "0.13.1", + "@lexical/yjs": "0.13.1", + "react-error-boundary": "^3.1.4" + }, + "peerDependencies": { + "lexical": "0.13.1", + "react": ">=17.x", + "react-dom": ">=17.x" + } + }, + "node_modules/@lexical/rich-text": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/rich-text/-/rich-text-0.13.1.tgz", + "integrity": "sha512-HliB9Ync06mv9DBg/5j0lIsTJp+exLHlaLJe+n8Zq1QNTzZzu2LsIT/Crquk50In7K/cjtlaQ/d5RB0LkjMHYg==", + "dev": true, + "peerDependencies": { + "@lexical/clipboard": "0.13.1", + "@lexical/selection": "0.13.1", + "@lexical/utils": "0.13.1", + "lexical": "0.13.1" + } + }, + "node_modules/@lexical/selection": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/selection/-/selection-0.13.1.tgz", + "integrity": "sha512-Kt9eSwjxPznj7yzIYipu9yYEgmRJhHiq3DNxHRxInYcZJWWNNHum2xKyxwwcN8QYBBzgfPegfM/geqQEJSV1lQ==", + "dev": true, + "peerDependencies": { + "lexical": "0.13.1" + } + }, + "node_modules/@lexical/table": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/table/-/table-0.13.1.tgz", + "integrity": "sha512-VQzgkfkEmnvn6C64O/kvl0HI3bFoBh3WA/U67ALw+DS11Mb5CKjbt0Gzm/258/reIxNMpshjjicpWMv9Miwauw==", + "dev": true, + "dependencies": { + "@lexical/utils": "0.13.1" + }, + "peerDependencies": { + "lexical": "0.13.1" + } + }, + "node_modules/@lexical/text": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/text/-/text-0.13.1.tgz", + "integrity": "sha512-NYy3TZKt3qzReDwN2Rr5RxyFlg84JjXP2JQGMrXSSN7wYe73ysQIU6PqdVrz4iZkP+w34F3pl55dJ24ei3An9w==", + "dev": true, + "peerDependencies": { + "lexical": "0.13.1" + } + }, + "node_modules/@lexical/utils": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/utils/-/utils-0.13.1.tgz", + "integrity": "sha512-AtQQKzYymkbOaQxaBXjRBS8IPxF9zWQnqwHTUTrJqJ4hX71aIQd/thqZbfQETAFJfC8pNBZw5zpxN6yPHk23dQ==", + "dev": true, + "dependencies": { + "@lexical/list": "0.13.1", + "@lexical/selection": "0.13.1", + "@lexical/table": "0.13.1" + }, + "peerDependencies": { + "lexical": "0.13.1" + } + }, + "node_modules/@lexical/yjs": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/yjs/-/yjs-0.13.1.tgz", + "integrity": "sha512-4GbqQM+PwNTV59AZoNrfTe/0rLjs+cX6Y6yAdZSRPBwr5L3JzYeU1TTcFCVQTtsE7KF8ddVP8sD7w9pi8rOWLA==", + "dev": true, + "dependencies": { + "@lexical/offset": "0.13.1" + }, + "peerDependencies": { + "lexical": "0.13.1", + "yjs": ">=13.5.22" + } + }, "node_modules/@malept/cross-spawn-promise": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@malept/cross-spawn-promise/-/cross-spawn-promise-1.1.1.tgz", @@ -18274,6 +18542,17 @@ "node": ">=0.10.0" } }, + "node_modules/isomorphic.js": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/isomorphic.js/-/isomorphic.js-0.2.5.tgz", + "integrity": "sha512-PIeMbHqMt4DnUP3MA/Flc0HElYjMXArsw1qwJZcm9sqR8mq3l8NYizFMty0pWwE/tzIGH3EKK5+jes5mAr85yw==", + "dev": true, + "peer": true, + "funding": { + "type": "GitHub Sponsors ❤", + "url": "https://github.com/sponsors/dmonad" + } + }, "node_modules/istanbul-lib-coverage": { "version": "3.2.0", "dev": true, @@ -19743,6 +20022,34 @@ "node": ">= 0.8.0" } }, + "node_modules/lexical": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/lexical/-/lexical-0.13.1.tgz", + "integrity": "sha512-jaqRYzVEfBKbX4FwYpd/g+MyOjRaraAel0iQsTrwvx3hyN0bswUZuzb6H6nGlFSjcdrc77wKpyKwoWj4aUd+Bw==", + "dev": true + }, + "node_modules/lib0": { + "version": "0.2.93", + "resolved": "https://registry.npmjs.org/lib0/-/lib0-0.2.93.tgz", + "integrity": "sha512-M5IKsiFJYulS+8Eal8f+zAqf5ckm1vffW0fFDxfgxJ+uiVopvDdd3PxJmz0GsVi3YNO7QCFSq0nAsiDmNhLj9Q==", + "dev": true, + "peer": true, + "dependencies": { + "isomorphic.js": "^0.2.4" + }, + "bin": { + "0ecdsa-generate-keypair": "bin/0ecdsa-generate-keypair.js", + "0gentesthtml": "bin/gentesthtml.js", + "0serve": "bin/0serve.js" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "type": "GitHub Sponsors ❤", + "url": "https://github.com/sponsors/dmonad" + } + }, "node_modules/lie": { "version": "3.3.0", "license": "MIT", @@ -23375,6 +23682,15 @@ "node": ">= 0.8" } }, + "node_modules/prismjs": { + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz", + "integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -24067,6 +24383,22 @@ "dev": true, "license": "MIT" }, + "node_modules/react-error-boundary": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/react-error-boundary/-/react-error-boundary-3.1.4.tgz", + "integrity": "sha512-uM9uPzZJTF6wRQORmSrvOIgt4lJ9MC1sNgEOj2XGsDTRE4kmpWxg7ENK9EWNKJRMAOY9z0MuF4yIfl6gp4sotA==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.12.5" + }, + "engines": { + "node": ">=10", + "npm": ">=6" + }, + "peerDependencies": { + "react": ">=16.13.1" + } + }, "node_modules/react-inspector": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/react-inspector/-/react-inspector-6.0.2.tgz", @@ -29435,6 +29767,24 @@ "fd-slicer": "~1.1.0" } }, + "node_modules/yjs": { + "version": "13.6.14", + "resolved": "https://registry.npmjs.org/yjs/-/yjs-13.6.14.tgz", + "integrity": "sha512-D+7KcUr0j+vBCUSKXXEWfA+bG4UQBviAwP3gYBhkstkgwy5+8diOPMx0iqLIOxNo/HxaREUimZRxqHGAHCL2BQ==", + "dev": true, + "peer": true, + "dependencies": { + "lib0": "^0.2.86" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=8.0.0" + }, + "funding": { + "type": "GitHub Sponsors ❤", + "url": "https://github.com/sponsors/dmonad" + } + }, "node_modules/yn": { "version": "3.1.1", "dev": true, @@ -31155,11 +31505,21 @@ "dev": true }, "@biblionexus-foundation/platform-editor": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/@biblionexus-foundation/platform-editor/-/platform-editor-0.0.5.tgz", - "integrity": "sha512-bgWfR5jHvAGDucmU674CcWabpc5TM2Ydwgavahw+gcPPHBveYlU/nTsoOKZp3TDjMD9dMCQ1GpNzte5uR002VA==", + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@biblionexus-foundation/platform-editor/-/platform-editor-0.1.0.tgz", + "integrity": "sha512-Kqdorkm3+OAogEtYcTs4dH9qgMpL32tgyT5mYiZn4aaR/W0upIDNzG6QHcodx0/5edzSOc2+YOdBLt5II+jNUw==", "dev": true, - "requires": {} + "requires": { + "@lexical/code": "^0.13.1", + "@lexical/link": "^0.13.1", + "@lexical/list": "^0.13.1", + "@lexical/react": "^0.13.1", + "@lexical/rich-text": "^0.13.1", + "@lexical/selection": "^0.13.1", + "@lexical/utils": "^0.13.1", + "fast-equals": "^5.0.1", + "lexical": "^0.13.1" + } }, "@colors/colors": { "version": "1.5.0", @@ -32407,6 +32767,201 @@ "version": "2.0.3", "dev": true }, + "@lexical/clipboard": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/clipboard/-/clipboard-0.13.1.tgz", + "integrity": "sha512-gMSbVeqb7S+XAi/EMMlwl+FCurLPugN2jAXcp5k5ZaUd7be8B+iupbYdoKkjt4qBhxmvmfe9k46GoC0QOPl/nw==", + "dev": true, + "requires": { + "@lexical/html": "0.13.1", + "@lexical/list": "0.13.1", + "@lexical/selection": "0.13.1", + "@lexical/utils": "0.13.1" + } + }, + "@lexical/code": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/code/-/code-0.13.1.tgz", + "integrity": "sha512-QK77r3QgEtJy96ahYXNgpve8EY64BQgBSnPDOuqVrLdl92nPzjqzlsko2OZldlrt7gjXcfl9nqfhZ/CAhStfOg==", + "dev": true, + "requires": { + "@lexical/utils": "0.13.1", + "prismjs": "^1.27.0" + } + }, + "@lexical/dragon": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/dragon/-/dragon-0.13.1.tgz", + "integrity": "sha512-aNlqfif4//jW7gOxbBgdrbDovU6m3EwQrUw+Y/vqRkY+sWmloyAUeNwCPH1QP3Q5cvfolzOeN5igfBljsFr+1g==", + "dev": true, + "requires": {} + }, + "@lexical/hashtag": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/hashtag/-/hashtag-0.13.1.tgz", + "integrity": "sha512-Dl0dUG4ZXNjYYuAUR0GMGpLGsA+cps2/ln3xEmy28bZR0sKkjXugsu2QOIxZjYIPBewDrXzPcvK8md45cMYoSg==", + "dev": true, + "requires": { + "@lexical/utils": "0.13.1" + } + }, + "@lexical/history": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/history/-/history-0.13.1.tgz", + "integrity": "sha512-cZXt30MalEEiRaflE9tHeGYnwT1xSDjXLsf9M409DSU9POJyZ1fsULJrG1tWv2uFQOhwal33rve9+MatUlITrg==", + "dev": true, + "requires": { + "@lexical/utils": "0.13.1" + } + }, + "@lexical/html": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/html/-/html-0.13.1.tgz", + "integrity": "sha512-XkZrnCSHIUavtpMol6aG8YsJ5KqC9hMxEhAENf3HTGi3ocysCByyXOyt1EhEYpjJvgDG4wRqt25xGDbLjj1/sA==", + "dev": true, + "requires": { + "@lexical/selection": "0.13.1", + "@lexical/utils": "0.13.1" + } + }, + "@lexical/link": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/link/-/link-0.13.1.tgz", + "integrity": "sha512-7E3B2juL2UoMj2n+CiyFZ7tlpsdViAoIE7MpegXwfe/VQ66wFwk/VxGTa/69ng2EoF7E0kh+SldvGQDrWAWb1g==", + "dev": true, + "requires": { + "@lexical/utils": "0.13.1" + } + }, + "@lexical/list": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/list/-/list-0.13.1.tgz", + "integrity": "sha512-6U1pmNZcKLuOWiWRML8Raf9zSEuUCMlsOye82niyF6I0rpPgYo5UFghAAbGISDsyqzM1B2L4BgJ6XrCk/dJptg==", + "dev": true, + "requires": { + "@lexical/utils": "0.13.1" + } + }, + "@lexical/mark": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/mark/-/mark-0.13.1.tgz", + "integrity": "sha512-dW27PW8wWDOKFqXTBUuUfV+umU0KfwvXGkPUAxRJrvwUWk5RKaS48LhgbNlQ5BfT84Q8dSiQzvbaa6T40t9a3A==", + "dev": true, + "requires": { + "@lexical/utils": "0.13.1" + } + }, + "@lexical/markdown": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/markdown/-/markdown-0.13.1.tgz", + "integrity": "sha512-6tbdme2h5Zy/M88loVQVH5G0Nt7VMR9UUkyiSaicyBRDOU2OHacaXEp+KSS/XuF+d7TA+v/SzyDq8HS77cO1wA==", + "dev": true, + "requires": { + "@lexical/code": "0.13.1", + "@lexical/link": "0.13.1", + "@lexical/list": "0.13.1", + "@lexical/rich-text": "0.13.1", + "@lexical/text": "0.13.1", + "@lexical/utils": "0.13.1" + } + }, + "@lexical/offset": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/offset/-/offset-0.13.1.tgz", + "integrity": "sha512-j/RZcztJ7dyTrfA2+C3yXDzWDXV+XmMpD5BYeQCEApaHvlo20PHt1BISk7RcrnQW8PdzGvpKblRWf//c08LS9w==", + "dev": true, + "requires": {} + }, + "@lexical/overflow": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/overflow/-/overflow-0.13.1.tgz", + "integrity": "sha512-Uw34j+qG2UJRCIR+bykfFMduFk7Pc4r/kNt8N1rjxGuGXAsreTVch1iOhu7Ev6tJgkURsduKuaJCAi7iHnKl7g==", + "dev": true, + "requires": {} + }, + "@lexical/plain-text": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/plain-text/-/plain-text-0.13.1.tgz", + "integrity": "sha512-4j5KAsMKUvJ8LhVDSS4zczbYXzdfmgYSAVhmqpSnJtud425Nk0TAfpUBLFoivxZB7KMoT1LGWQZvd47IvJPvtA==", + "dev": true, + "requires": {} + }, + "@lexical/react": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/react/-/react-0.13.1.tgz", + "integrity": "sha512-Sy6EL230KAb0RZsZf1dZrRrc3+rvCDQWltcd8C/cqBUYlxsLYCW9s4f3RB2werngD/PtLYbBB48SYXNkIALITA==", + "dev": true, + "requires": { + "@lexical/clipboard": "0.13.1", + "@lexical/code": "0.13.1", + "@lexical/dragon": "0.13.1", + "@lexical/hashtag": "0.13.1", + "@lexical/history": "0.13.1", + "@lexical/link": "0.13.1", + "@lexical/list": "0.13.1", + "@lexical/mark": "0.13.1", + "@lexical/markdown": "0.13.1", + "@lexical/overflow": "0.13.1", + "@lexical/plain-text": "0.13.1", + "@lexical/rich-text": "0.13.1", + "@lexical/selection": "0.13.1", + "@lexical/table": "0.13.1", + "@lexical/text": "0.13.1", + "@lexical/utils": "0.13.1", + "@lexical/yjs": "0.13.1", + "react-error-boundary": "^3.1.4" + } + }, + "@lexical/rich-text": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/rich-text/-/rich-text-0.13.1.tgz", + "integrity": "sha512-HliB9Ync06mv9DBg/5j0lIsTJp+exLHlaLJe+n8Zq1QNTzZzu2LsIT/Crquk50In7K/cjtlaQ/d5RB0LkjMHYg==", + "dev": true, + "requires": {} + }, + "@lexical/selection": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/selection/-/selection-0.13.1.tgz", + "integrity": "sha512-Kt9eSwjxPznj7yzIYipu9yYEgmRJhHiq3DNxHRxInYcZJWWNNHum2xKyxwwcN8QYBBzgfPegfM/geqQEJSV1lQ==", + "dev": true, + "requires": {} + }, + "@lexical/table": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/table/-/table-0.13.1.tgz", + "integrity": "sha512-VQzgkfkEmnvn6C64O/kvl0HI3bFoBh3WA/U67ALw+DS11Mb5CKjbt0Gzm/258/reIxNMpshjjicpWMv9Miwauw==", + "dev": true, + "requires": { + "@lexical/utils": "0.13.1" + } + }, + "@lexical/text": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/text/-/text-0.13.1.tgz", + "integrity": "sha512-NYy3TZKt3qzReDwN2Rr5RxyFlg84JjXP2JQGMrXSSN7wYe73ysQIU6PqdVrz4iZkP+w34F3pl55dJ24ei3An9w==", + "dev": true, + "requires": {} + }, + "@lexical/utils": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/utils/-/utils-0.13.1.tgz", + "integrity": "sha512-AtQQKzYymkbOaQxaBXjRBS8IPxF9zWQnqwHTUTrJqJ4hX71aIQd/thqZbfQETAFJfC8pNBZw5zpxN6yPHk23dQ==", + "dev": true, + "requires": { + "@lexical/list": "0.13.1", + "@lexical/selection": "0.13.1", + "@lexical/table": "0.13.1" + } + }, + "@lexical/yjs": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@lexical/yjs/-/yjs-0.13.1.tgz", + "integrity": "sha512-4GbqQM+PwNTV59AZoNrfTe/0rLjs+cX6Y6yAdZSRPBwr5L3JzYeU1TTcFCVQTtsE7KF8ddVP8sD7w9pi8rOWLA==", + "dev": true, + "requires": { + "@lexical/offset": "0.13.1" + } + }, "@malept/cross-spawn-promise": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@malept/cross-spawn-promise/-/cross-spawn-promise-1.1.1.tgz", @@ -41697,6 +42252,13 @@ "version": "3.0.1", "dev": true }, + "isomorphic.js": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/isomorphic.js/-/isomorphic.js-0.2.5.tgz", + "integrity": "sha512-PIeMbHqMt4DnUP3MA/Flc0HElYjMXArsw1qwJZcm9sqR8mq3l8NYizFMty0pWwE/tzIGH3EKK5+jes5mAr85yw==", + "dev": true, + "peer": true + }, "istanbul-lib-coverage": { "version": "3.2.0", "dev": true @@ -42815,6 +43377,22 @@ "type-check": "~0.4.0" } }, + "lexical": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/lexical/-/lexical-0.13.1.tgz", + "integrity": "sha512-jaqRYzVEfBKbX4FwYpd/g+MyOjRaraAel0iQsTrwvx3hyN0bswUZuzb6H6nGlFSjcdrc77wKpyKwoWj4aUd+Bw==", + "dev": true + }, + "lib0": { + "version": "0.2.93", + "resolved": "https://registry.npmjs.org/lib0/-/lib0-0.2.93.tgz", + "integrity": "sha512-M5IKsiFJYulS+8Eal8f+zAqf5ckm1vffW0fFDxfgxJ+uiVopvDdd3PxJmz0GsVi3YNO7QCFSq0nAsiDmNhLj9Q==", + "dev": true, + "peer": true, + "requires": { + "isomorphic.js": "^0.2.4" + } + }, "lie": { "version": "3.3.0", "requires": { @@ -45316,6 +45894,12 @@ "integrity": "sha512-66hKPCr+72mlfiSjlEB1+45IjXSqvVAIy6mocupoww4tBFE9R9IhwwUGoI4G++Tc9Aq+2rxOt0RFU6gPcrte0A==", "dev": true }, + "prismjs": { + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz", + "integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==", + "dev": true + }, "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -45849,6 +46433,15 @@ } } }, + "react-error-boundary": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/react-error-boundary/-/react-error-boundary-3.1.4.tgz", + "integrity": "sha512-uM9uPzZJTF6wRQORmSrvOIgt4lJ9MC1sNgEOj2XGsDTRE4kmpWxg7ENK9EWNKJRMAOY9z0MuF4yIfl6gp4sotA==", + "dev": true, + "requires": { + "@babel/runtime": "^7.12.5" + } + }, "react-inspector": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/react-inspector/-/react-inspector-6.0.2.tgz", @@ -46376,7 +46969,7 @@ "resource-viewer": { "version": "file:extensions/src/resource-viewer", "requires": { - "@biblionexus-foundation/platform-editor": "^0.0.5", + "@biblionexus-foundation/platform-editor": "^0.1.0", "@sillsdev/scripture": "^1.4.3", "@swc/core": "^1.4.2", "@types/node": "^20.11.19", @@ -49495,6 +50088,16 @@ "fd-slicer": "~1.1.0" } }, + "yjs": { + "version": "13.6.14", + "resolved": "https://registry.npmjs.org/yjs/-/yjs-13.6.14.tgz", + "integrity": "sha512-D+7KcUr0j+vBCUSKXXEWfA+bG4UQBviAwP3gYBhkstkgwy5+8diOPMx0iqLIOxNo/HxaREUimZRxqHGAHCL2BQ==", + "dev": true, + "peer": true, + "requires": { + "lib0": "^0.2.86" + } + }, "yn": { "version": "3.1.1", "dev": true From a6d102074abfc5aa146bd4291715b5149dddb280 Mon Sep 17 00:00:00 2001 From: Ira Hopkinson Date: Tue, 2 Apr 2024 12:10:14 +1300 Subject: [PATCH 2/2] - temporary workaround for issue #826 --- .../resource-viewer/src/resource-viewer.web-view.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/extensions/src/resource-viewer/src/resource-viewer.web-view.tsx b/extensions/src/resource-viewer/src/resource-viewer.web-view.tsx index 8d4148448c..b611bed621 100644 --- a/extensions/src/resource-viewer/src/resource-viewer.web-view.tsx +++ b/extensions/src/resource-viewer/src/resource-viewer.web-view.tsx @@ -1,7 +1,7 @@ import { VerseRef } from '@sillsdev/scripture'; import { logger } from '@papi/frontend'; import { useProjectData, useSetting } from '@papi/frontend/react'; -import { ScriptureReference } from 'platform-bible-utils'; +import { ScriptureReference, debounce } from 'platform-bible-utils'; import { JSX, useCallback, useEffect, useMemo, useRef } from 'react'; import type { WebViewProps } from '@papi/core'; import { @@ -34,7 +34,13 @@ globalThis.webViewComponent = function ResourceViewer({ '', ); - const onChange = useCallback((usj: Usj) => setUsx?.(usjToUsxString(usj)), [setUsx]); + const debouncedSetUsx = useMemo( + () => debounce((usj: Usj) => setUsx?.(usjToUsxString(usj)), 300), + [setUsx], + ); + + // TODO: remove debounce when issue #826 is done. + const onChange = useCallback(debouncedSetUsx, [debouncedSetUsx]); useEffect(() => { if (usx) editorRef.current?.setUsj(usxStringToUsj(usx));