@d-i-t-a/reader 2.3.9 → 2.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -52528,7 +52528,9 @@ var TextHighlighter = class {
52528
52528
  let drawUnderline = false;
52529
52529
  let drawStrikeThrough = false;
52530
52530
  let drawBackground = false;
52531
- const doNotMergeHorizontallyAlignedRects = drawUnderline || drawStrikeThrough || drawBackground;
52531
+ let doNotMergeHorizontallyAlignedRects = drawUnderline || drawStrikeThrough || drawBackground;
52532
+ import_loglevel5.default.debug(doNotMergeHorizontallyAlignedRects);
52533
+ doNotMergeHorizontallyAlignedRects = true;
52532
52534
  const clientRects = getClientRectsNoOverlap(range, doNotMergeHorizontallyAlignedRects);
52533
52535
  const roundedCorner = 3;
52534
52536
  const underlineThickness = 2;
@@ -59063,21 +59065,21 @@ var CitationModule = class {
59063
59065
  let mlaString = "";
59064
59066
  let apaString = "";
59065
59067
  if (self2.properties.publisher) {
59066
- mlaString = mlaString + self2.properties.publisher + ", ";
59067
- chicagoString = chicagoString + self2.properties.publisher + ", ";
59068
+ mlaString = mlaString + self2.properties.publisher;
59069
+ chicagoString = chicagoString + self2.properties.publisher;
59068
59070
  } else if (self2.publication.Metadata.Publisher && self2.publication.Metadata.Publisher[0].Name) {
59069
- mlaString = mlaString + self2.publication.Metadata.Publisher[0].Name + ", ";
59070
- chicagoString = chicagoString + self2.publication.Metadata.Publisher[0].Name + ", ";
59071
+ mlaString = mlaString + self2.publication.Metadata.Publisher[0].Name;
59072
+ chicagoString = chicagoString + self2.publication.Metadata.Publisher[0].Name;
59071
59073
  }
59072
59074
  if (self2.properties.published) {
59073
59075
  apaString = apaString + "(" + self2.properties.published + ")";
59074
- mlaString = mlaString + self2.properties.published;
59075
- chicagoString = chicagoString + self2.properties.published;
59076
+ mlaString = mlaString + ", " + self2.properties.published;
59077
+ chicagoString = chicagoString + ", " + self2.properties.published;
59076
59078
  } else if (self2.publication.Metadata.PublicationDate) {
59077
59079
  if (self2.publication.Metadata.PublicationDate.getFullYear() > 0) {
59078
59080
  apaString = apaString + "(" + self2.publication.Metadata.PublicationDate.getFullYear() + ")";
59079
- mlaString = mlaString + self2.publication.Metadata.PublicationDate.getFullYear();
59080
- chicagoString = chicagoString + self2.publication.Metadata.PublicationDate.getFullYear();
59081
+ mlaString = mlaString + ", " + self2.publication.Metadata.PublicationDate.getFullYear();
59082
+ chicagoString = chicagoString + ", " + self2.publication.Metadata.PublicationDate.getFullYear();
59081
59083
  }
59082
59084
  }
59083
59085
  if (apaString.length > 0 && mlaString.length > 0 && chicagoString.length > 0) {
@@ -59088,15 +59090,15 @@ var CitationModule = class {
59088
59090
  let bookTitleFormatted = function() {
59089
59091
  if (self2.properties.title) {
59090
59092
  return [
59091
- self2.properties.title + ". ",
59092
- self2.properties.title + ". ",
59093
- self2.properties.title + ". "
59093
+ "<em>" + self2.properties.title + "</em>. ",
59094
+ "<em>" + self2.properties.title + "</em>. ",
59095
+ "<em>" + self2.properties.title + "</em>. "
59094
59096
  ];
59095
59097
  } else if (self2.publication.Metadata.Title) {
59096
59098
  return [
59097
- self2.publication.Metadata.Title + ". ",
59098
- self2.publication.Metadata.Title + ". ",
59099
- self2.publication.Metadata.Title + ". "
59099
+ "<em>" + self2.publication.Metadata.Title + "</em>. ",
59100
+ "<em>" + self2.publication.Metadata.Title + "</em>. ",
59101
+ "<em>" + self2.publication.Metadata.Title + "</em>. "
59100
59102
  ];
59101
59103
  } else {
59102
59104
  return ["", "", ""];
@@ -59112,11 +59114,11 @@ var CitationModule = class {
59112
59114
  if (self2.properties.publisher) {
59113
59115
  mlaString = mlaString + self2.properties.publisher + ", ";
59114
59116
  chicagoString = chicagoString + self2.properties.publisher + ", ";
59115
- apaString = apaString + self2.properties.publisher + ", ";
59117
+ apaString = apaString + self2.properties.publisher;
59116
59118
  } else if (self2.publication.Metadata.Publisher && self2.publication.Metadata.Publisher[0].Name) {
59117
59119
  mlaString = mlaString + self2.publication.Metadata.Publisher[0].Name + ", ";
59118
59120
  chicagoString = chicagoString + self2.publication.Metadata.Publisher[0].Name + ", ";
59119
- apaString = apaString + self2.publication.Metadata.Publisher[0].Name + ", ";
59121
+ apaString = apaString + self2.publication.Metadata.Publisher[0].Name;
59120
59122
  }
59121
59123
  if (apaString.length > 0 && mlaString.length > 0 && chicagoString.length > 0) {
59122
59124
  return [chicagoString + ". ", mlaString + ". ", apaString + ". "];
@@ -59171,18 +59173,27 @@ var CitationModule = class {
59171
59173
  const chicago = authorsFormatted()[0] + bookTitleFormatted()[0] + contributorsFormatted()[0] + editionFormatted()[0] + locationFormatted()[0] + yearPublishedFormatted()[0] + eBookVersionFormatted()[0] + libraryFormatted()[0] + appNameFormatted()[0] + appLinkFormatted()[0];
59172
59174
  const apa = authorsFormatted()[2] + yearPublishedFormatted()[2] + bookTitleFormatted()[2] + editionFormatted()[2] + publisherFormatted()[2] + contributorsFormatted()[2] + eBookVersionFormatted()[2] + locationFormatted()[2] + libraryFormatted()[2] + appNameFormatted()[2] + appLinkFormatted()[2];
59173
59175
  const mla = authorsFormatted()[1] + bookTitleFormatted()[1] + contributorsFormatted()[1] + editionFormatted()[1] + locationFormatted()[1] + yearPublishedFormatted()[1] + seriesFormatted()[1] + libraryFormatted()[1] + appNameFormatted()[1] + appLinkFormatted()[1];
59174
- const citationChicago = "\u201C" + selectedText(selection, self2.properties.characters) + "\u201C<br><br><em>" + chicago + "</em>";
59175
- const citationApa = "\u201C" + selectedText(selection, self2.properties.characters) + "\u201C<br><br><em>" + apa + "</em>";
59176
- const citationMla = "\u201C" + selectedText(selection, self2.properties.characters) + "\u201C<br><br><em>" + mla + "</em>";
59176
+ const citationChicago = "\u201C" + selectedText(selection, self2.properties.characters) + "\u201C<br><br>" + chicago;
59177
+ const citationApa = "\u201C" + selectedText(selection, self2.properties.characters) + "\u201C<br><br>" + apa;
59178
+ const citationMla = "\u201C" + selectedText(selection, self2.properties.characters) + "\u201C<br><br>" + mla;
59177
59179
  let citation = "";
59178
59180
  if (self2.properties.styles?.includes(CitationStyle[0])) {
59179
- citation = citation + "Chicago: <br>" + citationChicago + "<br><br>";
59181
+ if (self2.properties.styles.length > 1) {
59182
+ citation = citation + "Chicago: <br>";
59183
+ }
59184
+ citation = citation + citationChicago + "<br><br>";
59180
59185
  }
59181
59186
  if (self2.properties.styles?.includes(CitationStyle[2])) {
59182
- citation = citation + "APA: <br>" + citationApa + "<br><br>";
59187
+ if (self2.properties.styles.length > 1) {
59188
+ citation = citation + "APA: <br>";
59189
+ }
59190
+ citation = citation + citationApa + "<br><br>";
59183
59191
  }
59184
59192
  if (self2.properties.styles?.includes(CitationStyle[1])) {
59185
- citation = citation + "MLA: <br>" + citationMla + "<br><br>";
59193
+ if (self2.properties.styles.length > 1) {
59194
+ citation = citation + "MLA: <br>";
59195
+ }
59196
+ citation = citation + citationMla + "<br><br>";
59186
59197
  }
59187
59198
  self2.copyToClipboard(citation);
59188
59199
  }