@prose-reader/core 1.298.0 → 1.299.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1697,11 +1697,11 @@ const Hi = (t, e) => {
1697
1697
  item: e,
1698
1698
  viewport: n
1699
1699
  }) => {
1700
- const i = t.ownerDocument.createElement("div");
1701
- i.classList.add(Kt), i.style.cssText = `
1700
+ const i = n.absoluteViewport.width, o = i > 0 ? `max-width: ${i}px;` : "", r = t.ownerDocument.createElement("div");
1701
+ r.classList.add(Kt), r.style.cssText = `
1702
1702
  height: 100%;
1703
1703
  width: 100%;
1704
- max-width: ${n.absoluteViewport.width}px;
1704
+ ${o}
1705
1705
  text-align: center;
1706
1706
  display: flex;
1707
1707
  justify-content: center;
@@ -1714,19 +1714,19 @@ const Hi = (t, e) => {
1714
1714
  background-color: white;
1715
1715
  z-index: 1;
1716
1716
  `;
1717
- const o = i.ownerDocument.createElement("div");
1718
- o.innerText = "prose", o.style.cssText = `
1717
+ const s = r.ownerDocument.createElement("div");
1718
+ s.innerText = "prose", s.style.cssText = `
1719
1719
  font-size: 4em;
1720
1720
  `;
1721
- const r = i.ownerDocument.createElement("div");
1722
- return r.setAttribute("data-details-element", "true"), r.innerText = `loading ${e.id}`, r.style.cssText = `
1721
+ const a = r.ownerDocument.createElement("div");
1722
+ return a.setAttribute("data-details-element", "true"), a.innerText = `loading ${e.id}`, a.style.cssText = `
1723
1723
  font-size: 1.2em;
1724
1724
  text-overflow: ellipsis;
1725
1725
  white-space: nowrap;
1726
1726
  overflow: hidden;
1727
1727
  max-width: 300px;
1728
1728
  width: 80%;
1729
- `, i.appendChild(o), i.appendChild(r), i;
1729
+ `, r.appendChild(s), r.appendChild(a), r;
1730
1730
  }, no = (t) => t.spineItemsManager.items$.pipe(
1731
1731
  G(
1732
1732
  (e) => T(
@@ -1765,7 +1765,7 @@ const Hi = (t, e) => {
1765
1765
  j([t.spine.layout$, t.theme.$.theme$]).pipe(
1766
1766
  z(([, r]) => {
1767
1767
  const s = t.viewport.absoluteViewport.width;
1768
- w(
1768
+ s > 0 && w(
1769
1769
  o.style,
1770
1770
  "max-width",
1771
1771
  `${s}px`