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