overtype 2.3.0 → 2.3.2

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/overtype.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * OverType v2.3.0
2
+ * OverType v2.3.2
3
3
  * A lightweight markdown editor library with perfect WYSIWYG alignment
4
4
  * @license MIT
5
5
  * @author David Miranda
@@ -884,17 +884,17 @@ var OverType = (() => {
884
884
  // Gray - placeholder text
885
885
  },
886
886
  previewColors: {
887
- text: "#1a1a1a",
888
- h1: "#1a1a1a",
889
- h2: "#2a2a2a",
890
- h3: "#3a3a3a",
887
+ text: "#0d3b66",
888
+ h1: "inherit",
889
+ h2: "inherit",
890
+ h3: "inherit",
891
891
  strong: "inherit",
892
892
  em: "inherit",
893
- link: "#0066cc",
894
- code: "#1a1a1a",
895
- codeBg: "rgba(135, 131, 120, 0.15)",
896
- blockquote: "#555",
897
- hr: "#ddd",
893
+ link: "#0d3b66",
894
+ code: "#0d3b66",
895
+ codeBg: "rgba(244, 211, 94, 0.4)",
896
+ blockquote: "#5a7a9b",
897
+ hr: "#5a7a9b",
898
898
  bg: "transparent"
899
899
  }
900
900
  };
@@ -965,16 +965,16 @@ var OverType = (() => {
965
965
  },
966
966
  previewColors: {
967
967
  text: "#c5dde8",
968
- h1: "#e0e0e0",
969
- h2: "#d0d0d0",
970
- h3: "#c0c0c0",
968
+ h1: "inherit",
969
+ h2: "inherit",
970
+ h3: "inherit",
971
971
  strong: "inherit",
972
972
  em: "inherit",
973
- link: "#6cb6e0",
973
+ link: "#9fcfec",
974
974
  code: "#c5dde8",
975
- codeBg: "rgba(255, 255, 255, 0.08)",
976
- blockquote: "#9aa8b4",
977
- hr: "rgba(255, 255, 255, 0.15)",
975
+ codeBg: "#1a232b",
976
+ blockquote: "#9fcfec",
977
+ hr: "#c5dde8",
978
978
  bg: "transparent"
979
979
  }
980
980
  };
@@ -1008,7 +1008,7 @@ var OverType = (() => {
1008
1008
  if (previewColors) {
1009
1009
  for (const [key, value] of Object.entries(previewColors)) {
1010
1010
  const varName = key.replace(/([A-Z])/g, "-$1").toLowerCase();
1011
- vars.push(`--preview-${varName}: ${value};`);
1011
+ vars.push(`--preview-${varName}-default: ${value};`);
1012
1012
  }
1013
1013
  }
1014
1014
  return vars.join("\n");
@@ -1733,17 +1733,17 @@ var OverType = (() => {
1733
1733
 
1734
1734
  .overtype-container[data-mode="preview"] .overtype-wrapper .overtype-preview h1 {
1735
1735
  font-size: 2em !important;
1736
- color: var(--preview-h1, #222) !important;
1736
+ color: var(--preview-h1, var(--preview-h1-default)) !important;
1737
1737
  }
1738
1738
 
1739
1739
  .overtype-container[data-mode="preview"] .overtype-wrapper .overtype-preview h2 {
1740
1740
  font-size: 1.5em !important;
1741
- color: var(--preview-h2, #333) !important;
1741
+ color: var(--preview-h2, var(--preview-h2-default)) !important;
1742
1742
  }
1743
1743
 
1744
1744
  .overtype-container[data-mode="preview"] .overtype-wrapper .overtype-preview h3 {
1745
1745
  font-size: 1.17em !important;
1746
- color: var(--preview-h3, #444) !important;
1746
+ color: var(--preview-h3, var(--preview-h3-default)) !important;
1747
1747
  }
1748
1748
 
1749
1749
  /* Lists - restore list styling in preview mode */
@@ -1793,14 +1793,14 @@ var OverType = (() => {
1793
1793
  .overtype-container[data-mode="preview"] .overtype-wrapper .overtype-preview a {
1794
1794
  pointer-events: auto !important;
1795
1795
  cursor: pointer !important;
1796
- color: var(--preview-link, #0066cc) !important;
1796
+ color: var(--preview-link, var(--preview-link-default)) !important;
1797
1797
  text-decoration: underline !important;
1798
1798
  }
1799
1799
 
1800
1800
  /* Code blocks - proper pre/code styling in preview mode */
1801
1801
  .overtype-container[data-mode="preview"] .overtype-wrapper .overtype-preview pre.code-block {
1802
- background: var(--preview-code-bg, rgba(135, 131, 120, 0.15)) !important;
1803
- color: var(--preview-code, #333) !important;
1802
+ background: var(--preview-code-bg, var(--preview-code-bg-default)) !important;
1803
+ color: var(--preview-code, var(--preview-code-default)) !important;
1804
1804
  padding: 1.2em !important;
1805
1805
  border-radius: 3px !important;
1806
1806
  overflow-x: auto !important;
@@ -1829,8 +1829,8 @@ var OverType = (() => {
1829
1829
  /* Blockquotes - enhanced styling in preview mode */
1830
1830
  .overtype-container[data-mode="preview"] .overtype-wrapper .overtype-preview .blockquote {
1831
1831
  display: block !important;
1832
- border-left: 4px solid var(--preview-blockquote, #666) !important;
1833
- color: var(--preview-blockquote, #666) !important;
1832
+ border-left: 4px solid var(--preview-blockquote, var(--preview-blockquote-default)) !important;
1833
+ color: var(--preview-blockquote, var(--preview-blockquote-default)) !important;
1834
1834
  padding-left: 1em !important;
1835
1835
  margin: 1em 0 !important;
1836
1836
  font-style: italic !important;
@@ -1841,16 +1841,16 @@ var OverType = (() => {
1841
1841
  font-family: Georgia, 'Times New Roman', serif !important;
1842
1842
  font-size: 16px !important;
1843
1843
  line-height: 1.8 !important;
1844
- color: var(--preview-text, #333) !important;
1845
- background: var(--preview-bg, transparent) !important;
1844
+ color: var(--preview-text, var(--preview-text-default)) !important;
1845
+ background: var(--preview-bg, var(--preview-bg-default)) !important;
1846
1846
  }
1847
1847
 
1848
1848
  /* Inline code in preview mode - keep monospace */
1849
1849
  .overtype-container[data-mode="preview"] .overtype-wrapper .overtype-preview code {
1850
1850
  font-family: ${fontFamily} !important;
1851
1851
  font-size: 0.9em !important;
1852
- background: var(--preview-code-bg, rgba(135, 131, 120, 0.15)) !important;
1853
- color: var(--preview-code, #333) !important;
1852
+ background: var(--preview-code-bg, var(--preview-code-bg-default)) !important;
1853
+ color: var(--preview-code, var(--preview-code-default)) !important;
1854
1854
  padding: 0.2em 0.4em !important;
1855
1855
  border-radius: 3px !important;
1856
1856
  }
@@ -1858,18 +1858,18 @@ var OverType = (() => {
1858
1858
  /* Strong and em elements in preview mode */
1859
1859
  .overtype-container[data-mode="preview"] .overtype-wrapper .overtype-preview strong {
1860
1860
  font-weight: 700 !important;
1861
- color: var(--preview-strong, inherit) !important;
1861
+ color: var(--preview-strong, var(--preview-strong-default)) !important;
1862
1862
  }
1863
1863
 
1864
1864
  .overtype-container[data-mode="preview"] .overtype-wrapper .overtype-preview em {
1865
1865
  font-style: italic !important;
1866
- color: var(--preview-em, inherit) !important;
1866
+ color: var(--preview-em, var(--preview-em-default)) !important;
1867
1867
  }
1868
1868
 
1869
1869
  /* HR in preview mode */
1870
1870
  .overtype-container[data-mode="preview"] .overtype-wrapper .overtype-preview .hr-marker {
1871
1871
  display: block !important;
1872
- border-top: 2px solid var(--preview-hr, #ddd) !important;
1872
+ border-top: 2px solid var(--preview-hr, var(--preview-hr-default)) !important;
1873
1873
  text-indent: -9999px !important;
1874
1874
  height: 2px !important;
1875
1875
  }
@@ -5614,6 +5614,7 @@ ${blockSuffix}` : suffix;
5614
5614
  const paddingTop = parseFloat(computed.paddingTop);
5615
5615
  const paddingBottom = parseFloat(computed.paddingBottom);
5616
5616
  const scrollTop = textarea.scrollTop;
5617
+ wrapper.style.setProperty("height", "auto", "important");
5617
5618
  textarea.style.setProperty("height", "auto", "important");
5618
5619
  let newHeight = textarea.scrollHeight;
5619
5620
  if (this.options.minHeight) {