Skip to content

Commit

Permalink
deploy: 7b19c4e
Browse files Browse the repository at this point in the history
  • Loading branch information
antmicrobot committed Sep 18, 2024
1 parent 82c6512 commit b86512f
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 28 deletions.
40 changes: 20 additions & 20 deletions MystEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -48139,11 +48139,11 @@ const b_t = (t, e) => {
},
scroll: (s, a) => {
!n || r || (window.requestAnimationFrame(() => {
const o = a.state.doc.lineAt(a.state.selection.main.head).number, l = a.dom.parentElement.getBoundingClientRect(), u = a.lineBlockAtHeight(l.top - a.documentTop), h = a.state.doc.lineAt(u.from).number + 1, f = Math.max(o, h), [d, p] = mT(f, t, e.current);
d && Gce({
const o = a.state.doc.lineAt(a.state.selection.main.head).number, l = a.dom.parentElement.getBoundingClientRect(), u = a.lineBlockAtHeight(l.top - a.documentTop), h = a.state.doc.lineAt(u.from).number + 1, f = a.lineBlockAtHeight(l.bottom - a.documentTop), d = a.state.doc.lineAt(f.from).number, p = o < h || o > d ? h : o, [g, m] = mT(p, t, e.current);
g && Gce({
view: a,
matchingLine: p,
matchingElem: d,
matchingLine: m,
matchingElem: g,
preview: e.current
}), r = !1;
}), r = !0);
Expand All @@ -48158,31 +48158,31 @@ function x_t(t, e, r) {
}, 200);
}, t.onscroll = () => {
!i || n || (window.requestAnimationFrame(() => {
const a = r.state.doc.lineAt(r.state.selection.main.head).number, o = r.dom.parentElement.getBoundingClientRect(), l = r.lineBlockAtHeight(o.top - r.documentTop), u = r.state.doc.lineAt(l.from).number + 1;
if (a >= u) {
const [h, f] = mT(a, e, t);
if (h) {
const d = t.getBoundingClientRect(), p = r.lineBlockAt(r.state.doc.line(f).from), m = h.getBoundingClientRect().top, v = p.top - m + d.top + pL;
const a = r.state.doc.lineAt(r.state.selection.main.head).number, o = r.dom.parentElement.getBoundingClientRect(), l = r.lineBlockAtHeight(o.top - r.documentTop), u = r.state.doc.lineAt(l.from).number + 1, h = r.lineBlockAtHeight(o.bottom - o.top + r.dom.parentElement.scrollTop), f = r.state.doc.lineAt(h.from).number - 2;
if (a >= u && a <= f) {
const [d, p] = mT(a, e, t);
if (d) {
const g = t.getBoundingClientRect(), m = r.lineBlockAt(r.state.doc.line(p).from), y = d.getBoundingClientRect().top, b = m.top - y + g.top + pL;
r.dom.parentElement.scrollTo({
top: v,
top: b,
behavior: "auto"
});
}
} else {
let h;
const f = t.getElementsByTagName("*");
for (const g of f) {
if (g.classList.contains("cm-previewFocus") || !g.hasAttribute("data-line-id"))
let d;
const p = t.getElementsByTagName("*");
for (const v of p) {
if (v.classList.contains("cm-previewFocus") || !v.hasAttribute("data-line-id"))
continue;
if (g.getBoundingClientRect().top - t.getBoundingClientRect().top >= 0) {
h = g;
if (v.getBoundingClientRect().top - t.getBoundingClientRect().top >= 0) {
d = v;
break;
}
}
const d = h.getAttribute("data-line-id");
let p = rie(e.current, d);
p && r.dom.parentElement.scrollTo({
top: r.lineBlockAt(r.state.doc.line(p).from).top + pL,
const g = d.getAttribute("data-line-id");
let m = rie(e.current, g);
m && r.dom.parentElement.scrollTo({
top: r.lineBlockAt(r.state.doc.line(m).from).top + pL,
behavior: "auto"
});
}
Expand Down
2 changes: 1 addition & 1 deletion docs/collaboration.html
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ <h2 id="other-collaborative-features">Other Collaborative Features<a class="head

</div>

<a href="https://github.com/antmicro/myst-editor/tree/cee9e4a3847df56467f5d6db5167f74ee34aacc7">cee9e4a3</a>
<a href="https://github.com/antmicro/myst-editor/tree/7b19c4e9528f410d7aac03587dce1508011f31e5">7b19c4e9</a>
@ <a href="https://github.com/antmicro/myst-editor/tree/main">main</a>

</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/comments.html
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ <h2 id="suggestions">Suggestions<a class="headerlink" href="#suggestions" title=

</div>

<a href="https://github.com/antmicro/myst-editor/tree/cee9e4a3847df56467f5d6db5167f74ee34aacc7">cee9e4a3</a>
<a href="https://github.com/antmicro/myst-editor/tree/7b19c4e9528f410d7aac03587dce1508011f31e5">7b19c4e9</a>
@ <a href="https://github.com/antmicro/myst-editor/tree/main">main</a>

</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@

</div>

<a href="https://github.com/antmicro/myst-editor/tree/cee9e4a3847df56467f5d6db5167f74ee34aacc7">cee9e4a3</a>
<a href="https://github.com/antmicro/myst-editor/tree/7b19c4e9528f410d7aac03587dce1508011f31e5">7b19c4e9</a>
@ <a href="https://github.com/antmicro/myst-editor/tree/main">main</a>

</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ <h1 id="myst-editor-user-manual">MyST Editor - User Manual<a class="headerlink"

</div>

<a href="https://github.com/antmicro/myst-editor/tree/cee9e4a3847df56467f5d6db5167f74ee34aacc7">cee9e4a3</a>
<a href="https://github.com/antmicro/myst-editor/tree/7b19c4e9528f410d7aac03587dce1508011f31e5">7b19c4e9</a>
@ <a href="https://github.com/antmicro/myst-editor/tree/main">main</a>

</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/introduction.html
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ <h1 id="introduction">Introduction<a class="headerlink" href="#introduction" tit

</div>

<a href="https://github.com/antmicro/myst-editor/tree/cee9e4a3847df56467f5d6db5167f74ee34aacc7">cee9e4a3</a>
<a href="https://github.com/antmicro/myst-editor/tree/7b19c4e9528f410d7aac03587dce1508011f31e5">7b19c4e9</a>
@ <a href="https://github.com/antmicro/myst-editor/tree/main">main</a>

</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/mermaid.html
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ <h1 id="mermaid-diagrams">Mermaid Diagrams<a class="headerlink" href="#mermaid-d

</div>

<a href="https://github.com/antmicro/myst-editor/tree/cee9e4a3847df56467f5d6db5167f74ee34aacc7">cee9e4a3</a>
<a href="https://github.com/antmicro/myst-editor/tree/7b19c4e9528f410d7aac03587dce1508011f31e5">7b19c4e9</a>
@ <a href="https://github.com/antmicro/myst-editor/tree/main">main</a>

</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/rich-links.html
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ <h2 id="refreshing-links">Refreshing Links<a class="headerlink" href="#refreshin

</div>

<a href="https://github.com/antmicro/myst-editor/tree/cee9e4a3847df56467f5d6db5167f74ee34aacc7">cee9e4a3</a>
<a href="https://github.com/antmicro/myst-editor/tree/7b19c4e9528f410d7aac03587dce1508011f31e5">7b19c4e9</a>
@ <a href="https://github.com/antmicro/myst-editor/tree/main">main</a>

</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/topbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ <h2 id="view-mode-buttons">View Mode Buttons<a class="headerlink" href="#view-mo

</div>

<a href="https://github.com/antmicro/myst-editor/tree/cee9e4a3847df56467f5d6db5167f74ee34aacc7">cee9e4a3</a>
<a href="https://github.com/antmicro/myst-editor/tree/7b19c4e9528f410d7aac03587dce1508011f31e5">7b19c4e9</a>
@ <a href="https://github.com/antmicro/myst-editor/tree/main">main</a>

</div>
Expand Down

0 comments on commit b86512f

Please sign in to comment.