fullstacked 0.12.1-1355 → 0.12.1-1357

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.
@@ -143038,6 +143038,8 @@ function createCodeMirrorView(opts) {
143038
143038
  lintersCompartment.of([...loadedLinters])
143039
143039
  ]
143040
143040
  });
143041
+ editorView.dom.style.height = "100%";
143042
+ editorView.dom.style.width = "100%";
143041
143043
  const reloadExtensions = () => {
143042
143044
  const effects = compartment.reconfigure([...loadedExtensions]);
143043
143045
  editorView.dispatch({ effects });
@@ -143142,12 +143144,32 @@ function createCodeMirrorView(opts) {
143142
143144
  scrollIntoView: true
143143
143145
  });
143144
143146
  };
143147
+ const getVisibleLines = () => {
143148
+ const height = editorView.dom.getBoundingClientRect().height;
143149
+ const scrollTop = editorView.scrollDOM.scrollTop;
143150
+ const visibleLines = [
143151
+ editorView.lineBlockAtHeight(scrollTop),
143152
+ editorView.lineBlockAtHeight(height + scrollTop)
143153
+ ];
143154
+ const firstVisibleLine = editorView.state.doc.lineAt(
143155
+ visibleLines.at(0).from
143156
+ ).number;
143157
+ const lastVisibleLine = editorView.state.doc.lineAt(
143158
+ visibleLines.at(-1).from
143159
+ ).number;
143160
+ return [firstVisibleLine, lastVisibleLine];
143161
+ };
143145
143162
  const goTo = (pos) => {
143146
143163
  const position = typeof pos === "number" ? pos : editorView.state.doc.line(pos.line)?.from + pos.character;
143147
143164
  editorView.dispatch({
143148
143165
  selection: { anchor: position, head: position }
143149
143166
  });
143150
143167
  setTimeout(() => {
143168
+ const line = editorView.state.doc.lineAt(position).number;
143169
+ const [firstLine, lastLine] = getVisibleLines();
143170
+ if (line > firstLine && line < lastLine) {
143171
+ return;
143172
+ }
143151
143173
  const { top: top2 } = editorView.lineBlockAt(position);
143152
143174
  editorView.scrollDOM.scrollTo({ top: top2 });
143153
143175
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fullstacked",
3
- "version": "0.12.1-1355",
3
+ "version": "0.12.1-1357",
4
4
  "scripts": {
5
5
  "build": "node build.js",
6
6
  "postbuild": "node build.js --binding",