@typbase/codemirror 0.2.5 → 0.3.1

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.
Files changed (2) hide show
  1. package/dist/index.mjs +2 -11
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -1467,17 +1467,8 @@ function decorate({ fileId, spaceId, path, prelude, locked, update, updateInWidg
1467
1467
  rememberDiagnostics(path, text, compileResult.diagnostics);
1468
1468
  onCompile?.();
1469
1469
  if (compileResult.requests.length > 0 && onRequests) Promise.resolve(onRequests(compileResult.requests, spaceId)).then((wasUpdated) => {
1470
- if (wasUpdated) {
1471
- const doc = update.view.state.doc.toString();
1472
- update.view.dispatch({
1473
- changes: {
1474
- from: 0,
1475
- to: doc.length,
1476
- insert: doc
1477
- },
1478
- effects: typstRecompileEffect.of(null)
1479
- });
1480
- }
1470
+ if (!wasUpdated) return;
1471
+ update.view.dispatch({ effects: typstRecompileEffect.of(null) });
1481
1472
  });
1482
1473
  ({frames, tooltips} = compileResult);
1483
1474
  diagnostics = compileResult.diagnostics;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typbase/codemirror",
3
- "version": "0.2.5",
3
+ "version": "0.3.1",
4
4
  "description": "CodeMirror 6 editing experience for Typst: WYSIWYG inline preview, highlighting, hover, autocomplete.",
5
5
  "keywords": [
6
6
  "atproto",
@@ -40,7 +40,7 @@
40
40
  "typescript": "^5.9.3"
41
41
  },
42
42
  "peerDependencies": {
43
- "@typbase/engine": "^0.2.5"
43
+ "@typbase/engine": "^0.3.1"
44
44
  },
45
45
  "scripts": {
46
46
  "build": "tsdown",