@d-i-t-a/reader 2.3.10 → 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
@@ -12262,7 +12262,7 @@ var require_parse = __commonJS({
12262
12262
  try {
12263
12263
  parser.parse();
12264
12264
  } catch (e) {
12265
- if (true) {
12265
+ if (false) {
12266
12266
  if (e.name === "CssSyntaxError" && opts && opts.from) {
12267
12267
  if (/\.scss$/i.test(opts.from)) {
12268
12268
  e.message += "\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser";
@@ -12456,7 +12456,7 @@ var require_lazy_result = __commonJS({
12456
12456
  return this.css;
12457
12457
  }
12458
12458
  then(onFulfilled, onRejected) {
12459
- if (true) {
12459
+ if (false) {
12460
12460
  if (!("from" in this.opts)) {
12461
12461
  warnOnce("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.");
12462
12462
  }
@@ -12603,7 +12603,7 @@ var require_lazy_result = __commonJS({
12603
12603
  error.plugin = plugin.postcssPlugin;
12604
12604
  error.setMessage();
12605
12605
  } else if (plugin.postcssVersion) {
12606
- if (true) {
12606
+ if (false) {
12607
12607
  let pluginName = plugin.postcssPlugin;
12608
12608
  let pluginVer = plugin.postcssVersion;
12609
12609
  let runtimeVer = this.result.processor.version;
@@ -12849,7 +12849,7 @@ var require_no_work_result = __commonJS({
12849
12849
  return this._css;
12850
12850
  }
12851
12851
  then(onFulfilled, onRejected) {
12852
- if (true) {
12852
+ if (false) {
12853
12853
  if (!("from" in this._opts)) {
12854
12854
  warnOnce("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.");
12855
12855
  }
@@ -12918,7 +12918,7 @@ var require_processor = __commonJS({
12918
12918
  } else if (typeof i === "function") {
12919
12919
  normalized.push(i);
12920
12920
  } else if (typeof i === "object" && (i.parse || i.stringify)) {
12921
- if (true) {
12921
+ if (false) {
12922
12922
  throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.");
12923
12923
  }
12924
12924
  } else {
@@ -55230,7 +55230,7 @@ function delay(t, v) {
55230
55230
  setTimeout(resolve.bind(null, v), t);
55231
55231
  });
55232
55232
  }
55233
- var IS_DEV = true;
55233
+ var IS_DEV = false;
55234
55234
  import_loglevel13.default.setLevel(IS_DEV ? "trace" : "warn", true);
55235
55235
 
55236
55236
  // src/modules/protection/ContentProtectionModule.ts
@@ -59065,21 +59065,21 @@ var CitationModule = class {
59065
59065
  let mlaString = "";
59066
59066
  let apaString = "";
59067
59067
  if (self2.properties.publisher) {
59068
- mlaString = mlaString + self2.properties.publisher + ", ";
59069
- chicagoString = chicagoString + self2.properties.publisher + ", ";
59068
+ mlaString = mlaString + self2.properties.publisher;
59069
+ chicagoString = chicagoString + self2.properties.publisher;
59070
59070
  } else if (self2.publication.Metadata.Publisher && 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
+ mlaString = mlaString + self2.publication.Metadata.Publisher[0].Name;
59072
+ chicagoString = chicagoString + self2.publication.Metadata.Publisher[0].Name;
59073
59073
  }
59074
59074
  if (self2.properties.published) {
59075
59075
  apaString = apaString + "(" + self2.properties.published + ")";
59076
- mlaString = mlaString + self2.properties.published;
59077
- chicagoString = chicagoString + self2.properties.published;
59076
+ mlaString = mlaString + ", " + self2.properties.published;
59077
+ chicagoString = chicagoString + ", " + self2.properties.published;
59078
59078
  } else if (self2.publication.Metadata.PublicationDate) {
59079
59079
  if (self2.publication.Metadata.PublicationDate.getFullYear() > 0) {
59080
59080
  apaString = apaString + "(" + self2.publication.Metadata.PublicationDate.getFullYear() + ")";
59081
- mlaString = mlaString + self2.publication.Metadata.PublicationDate.getFullYear();
59082
- chicagoString = chicagoString + self2.publication.Metadata.PublicationDate.getFullYear();
59081
+ mlaString = mlaString + ", " + self2.publication.Metadata.PublicationDate.getFullYear();
59082
+ chicagoString = chicagoString + ", " + self2.publication.Metadata.PublicationDate.getFullYear();
59083
59083
  }
59084
59084
  }
59085
59085
  if (apaString.length > 0 && mlaString.length > 0 && chicagoString.length > 0) {
@@ -59090,15 +59090,15 @@ var CitationModule = class {
59090
59090
  let bookTitleFormatted = function() {
59091
59091
  if (self2.properties.title) {
59092
59092
  return [
59093
- self2.properties.title + ". ",
59094
- self2.properties.title + ". ",
59095
- self2.properties.title + ". "
59093
+ "<em>" + self2.properties.title + "</em>. ",
59094
+ "<em>" + self2.properties.title + "</em>. ",
59095
+ "<em>" + self2.properties.title + "</em>. "
59096
59096
  ];
59097
59097
  } else if (self2.publication.Metadata.Title) {
59098
59098
  return [
59099
- self2.publication.Metadata.Title + ". ",
59100
- self2.publication.Metadata.Title + ". ",
59101
- 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>. "
59102
59102
  ];
59103
59103
  } else {
59104
59104
  return ["", "", ""];
@@ -59114,11 +59114,11 @@ var CitationModule = class {
59114
59114
  if (self2.properties.publisher) {
59115
59115
  mlaString = mlaString + self2.properties.publisher + ", ";
59116
59116
  chicagoString = chicagoString + self2.properties.publisher + ", ";
59117
- apaString = apaString + self2.properties.publisher + ", ";
59117
+ apaString = apaString + self2.properties.publisher;
59118
59118
  } else if (self2.publication.Metadata.Publisher && self2.publication.Metadata.Publisher[0].Name) {
59119
59119
  mlaString = mlaString + self2.publication.Metadata.Publisher[0].Name + ", ";
59120
59120
  chicagoString = chicagoString + self2.publication.Metadata.Publisher[0].Name + ", ";
59121
- apaString = apaString + self2.publication.Metadata.Publisher[0].Name + ", ";
59121
+ apaString = apaString + self2.publication.Metadata.Publisher[0].Name;
59122
59122
  }
59123
59123
  if (apaString.length > 0 && mlaString.length > 0 && chicagoString.length > 0) {
59124
59124
  return [chicagoString + ". ", mlaString + ". ", apaString + ". "];
@@ -59173,18 +59173,27 @@ var CitationModule = class {
59173
59173
  const chicago = authorsFormatted()[0] + bookTitleFormatted()[0] + contributorsFormatted()[0] + editionFormatted()[0] + locationFormatted()[0] + yearPublishedFormatted()[0] + eBookVersionFormatted()[0] + libraryFormatted()[0] + appNameFormatted()[0] + appLinkFormatted()[0];
59174
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];
59175
59175
  const mla = authorsFormatted()[1] + bookTitleFormatted()[1] + contributorsFormatted()[1] + editionFormatted()[1] + locationFormatted()[1] + yearPublishedFormatted()[1] + seriesFormatted()[1] + libraryFormatted()[1] + appNameFormatted()[1] + appLinkFormatted()[1];
59176
- const citationChicago = "\u201C" + selectedText(selection, self2.properties.characters) + "\u201C<br><br><em>" + chicago + "</em>";
59177
- const citationApa = "\u201C" + selectedText(selection, self2.properties.characters) + "\u201C<br><br><em>" + apa + "</em>";
59178
- 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;
59179
59179
  let citation = "";
59180
59180
  if (self2.properties.styles?.includes(CitationStyle[0])) {
59181
- 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>";
59182
59185
  }
59183
59186
  if (self2.properties.styles?.includes(CitationStyle[2])) {
59184
- 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>";
59185
59191
  }
59186
59192
  if (self2.properties.styles?.includes(CitationStyle[1])) {
59187
- 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>";
59188
59197
  }
59189
59198
  self2.copyToClipboard(citation);
59190
59199
  }