overtype 2.0.3 → 2.0.5

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/README.md CHANGED
@@ -740,7 +740,7 @@ Special thanks to:
740
740
  - [kbhomes](https://github.com/kbhomes) - Fixed text selection desynchronization during overscroll ([#17](https://github.com/panphora/overtype/pull/17))
741
741
  - [Kristián Kostecký](https://github.com/kristiankostecky) - Fixed toolbar option being ignored in reinit() ([#62](https://github.com/panphora/overtype/pull/62))
742
742
  - [Lyric Wai](https://github.com/lyricat) - Fixed double-escaping of links ([#64](https://github.com/panphora/overtype/pull/64)), reported code block alignment issues ([#65](https://github.com/panphora/overtype/issues/65))
743
- - [kozi](https://github.com/kozi) - Reported link tooltip issues in Firefox ([#68](https://github.com/panphora/overtype/issues/68)) and toolbar positioning ([#69](https://github.com/panphora/overtype/issues/69))
743
+ - [kozi](https://github.com/kozi) - Reported link tooltip issues in Firefox ([#68](https://github.com/panphora/overtype/issues/68)), toolbar positioning ([#69](https://github.com/panphora/overtype/issues/69)), theme synchronization issues ([#70](https://github.com/panphora/overtype/issues/70), [#71](https://github.com/panphora/overtype/issues/71))
744
744
 
745
745
  ### TypeScript & Framework Support
746
746
  - [merlinz01](https://github.com/merlinz01) - Initial TypeScript definitions implementation ([#20](https://github.com/panphora/overtype/pull/20))
@@ -1,5 +1,5 @@
1
1
  /**
2
- * OverType v2.0.3
2
+ * OverType v2.0.5
3
3
  * A lightweight markdown editor library with perfect WYSIWYG alignment
4
4
  * @license MIT
5
5
  * @author David Miranda
@@ -1660,16 +1660,22 @@ var solar = {
1660
1660
  // White - editor background
1661
1661
  text: "#0d3b66",
1662
1662
  // Yale Blue - main text
1663
+ textPrimary: "#0d3b66",
1664
+ // Yale Blue - primary text (same as text)
1665
+ textSecondary: "#5a7a9b",
1666
+ // Muted blue - secondary text
1663
1667
  h1: "#f95738",
1664
1668
  // Tomato - h1 headers
1665
1669
  h2: "#ee964b",
1666
- // Sandy Brown - h2 headers
1670
+ // Sandy Brown - h2 headers
1667
1671
  h3: "#3d8a51",
1668
1672
  // Forest green - h3 headers
1669
1673
  strong: "#ee964b",
1670
1674
  // Sandy Brown - bold text
1671
1675
  em: "#f95738",
1672
1676
  // Tomato - italic text
1677
+ del: "#ee964b",
1678
+ // Sandy Brown - deleted text (same as strong)
1673
1679
  link: "#0d3b66",
1674
1680
  // Yale Blue - links
1675
1681
  code: "#0d3b66",
@@ -1682,17 +1688,25 @@ var solar = {
1682
1688
  // Muted blue - horizontal rules
1683
1689
  syntaxMarker: "rgba(13, 59, 102, 0.52)",
1684
1690
  // Yale Blue with transparency
1691
+ syntax: "#999999",
1692
+ // Gray - syntax highlighting fallback
1685
1693
  cursor: "#f95738",
1686
1694
  // Tomato - cursor
1687
1695
  selection: "rgba(244, 211, 94, 0.4)",
1688
1696
  // Naples Yellow with transparency
1689
1697
  listMarker: "#ee964b",
1690
1698
  // Sandy Brown - list markers
1699
+ rawLine: "#5a7a9b",
1700
+ // Muted blue - raw line indicators
1701
+ border: "#e0e0e0",
1702
+ // Light gray - borders
1703
+ hoverBg: "#f0f0f0",
1704
+ // Very light gray - hover backgrounds
1705
+ primary: "#0d3b66",
1706
+ // Yale Blue - primary accent
1691
1707
  // Toolbar colors
1692
1708
  toolbarBg: "#ffffff",
1693
1709
  // White - toolbar background
1694
- toolbarBorder: "rgba(13, 59, 102, 0.15)",
1695
- // Yale Blue border
1696
1710
  toolbarIcon: "#0d3b66",
1697
1711
  // Yale Blue - icon color
1698
1712
  toolbarHover: "#f5f5f5",
@@ -1710,6 +1724,10 @@ var cave = {
1710
1724
  // Darker charcoal - editor background
1711
1725
  text: "#c5dde8",
1712
1726
  // Light blue-gray - main text
1727
+ textPrimary: "#c5dde8",
1728
+ // Light blue-gray - primary text (same as text)
1729
+ textSecondary: "#9fcfec",
1730
+ // Brighter blue - secondary text
1713
1731
  h1: "#d4a5ff",
1714
1732
  // Rich lavender - h1 headers
1715
1733
  h2: "#f6ae2d",
@@ -1720,6 +1738,8 @@ var cave = {
1720
1738
  // Hunyadi Yellow - bold text
1721
1739
  em: "#9fcfec",
1722
1740
  // Brighter blue - italic text
1741
+ del: "#f6ae2d",
1742
+ // Hunyadi Yellow - deleted text (same as strong)
1723
1743
  link: "#9fcfec",
1724
1744
  // Brighter blue - links
1725
1745
  code: "#c5dde8",
@@ -1732,17 +1752,25 @@ var cave = {
1732
1752
  // Light blue-gray - horizontal rules
1733
1753
  syntaxMarker: "rgba(159, 207, 236, 0.73)",
1734
1754
  // Brighter blue semi-transparent
1755
+ syntax: "#7a8c98",
1756
+ // Muted gray-blue - syntax highlighting fallback
1735
1757
  cursor: "#f26419",
1736
1758
  // Orange Pantone - cursor
1737
1759
  selection: "rgba(51, 101, 138, 0.4)",
1738
1760
  // Lapis Lazuli with transparency
1739
1761
  listMarker: "#f6ae2d",
1740
1762
  // Hunyadi Yellow - list markers
1763
+ rawLine: "#9fcfec",
1764
+ // Brighter blue - raw line indicators
1765
+ border: "#2a3f52",
1766
+ // Dark blue-gray - borders
1767
+ hoverBg: "#243546",
1768
+ // Slightly lighter charcoal - hover backgrounds
1769
+ primary: "#9fcfec",
1770
+ // Brighter blue - primary accent
1741
1771
  // Toolbar colors for dark theme
1742
1772
  toolbarBg: "#1D2D3E",
1743
1773
  // Darker charcoal - toolbar background
1744
- toolbarBorder: "rgba(197, 221, 232, 0.1)",
1745
- // Light blue-gray border
1746
1774
  toolbarIcon: "#c5dde8",
1747
1775
  // Light blue-gray - icon color
1748
1776
  toolbarHover: "#243546",
@@ -2223,6 +2251,8 @@ function generateStyles(options = {}) {
2223
2251
  font-size: 0.85rem !important;
2224
2252
  color: #666 !important;
2225
2253
  flex-shrink: 0 !important; /* Don't shrink */
2254
+ z-index: 10001 !important; /* Above link tooltip */
2255
+ position: relative !important; /* Enable z-index */
2226
2256
  }
2227
2257
 
2228
2258
  /* Dark theme stats bar */
@@ -2260,6 +2290,7 @@ function generateStyles(options = {}) {
2260
2290
  gap: 4px !important;
2261
2291
  padding: 8px !important; /* Override reset */
2262
2292
  background: var(--toolbar-bg, var(--bg-primary, #f8f9fa)) !important; /* Override reset */
2293
+ border-bottom: 1px solid var(--toolbar-border, transparent) !important; /* Override reset */
2263
2294
  overflow-x: auto !important; /* Allow horizontal scrolling */
2264
2295
  overflow-y: hidden !important; /* Hide vertical overflow */
2265
2296
  -webkit-overflow-scrolling: touch !important;
@@ -3333,6 +3364,12 @@ var _OverType = class _OverType {
3333
3364
  }
3334
3365
  this.shortcuts = new ShortcutsManager(this);
3335
3366
  this.linkTooltip = new LinkTooltip(this);
3367
+ requestAnimationFrame(() => {
3368
+ requestAnimationFrame(() => {
3369
+ this.textarea.scrollTop = this.preview.scrollTop;
3370
+ this.textarea.scrollLeft = this.preview.scrollLeft;
3371
+ });
3372
+ });
3336
3373
  this.initialized = true;
3337
3374
  if (this.options.onChange) {
3338
3375
  this.options.onChange(this.getValue(), this);
@@ -4503,6 +4540,9 @@ var OverTypeEditor = class extends HTMLElement {
4503
4540
  break;
4504
4541
  case "theme":
4505
4542
  this._reinjectStyles();
4543
+ if (this._editor && this._editor.setTheme) {
4544
+ this._editor.setTheme(value || "solar");
4545
+ }
4506
4546
  break;
4507
4547
  case "placeholder":
4508
4548
  if (this._editor.textarea) {