@typbase/engine 0.4.2 → 0.4.3

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/engine.d.ts CHANGED
@@ -374,14 +374,14 @@ export class ThemeColors {
374
374
  free(): void;
375
375
  [Symbol.dispose](): void;
376
376
  constructor(surface: Rgb, surface2: Rgb, surface3: Rgb, border: Rgb, border_strong: Rgb, text: Rgb, text_secondary: Rgb, accent: Rgb, accent_soft: Rgb, on_accent: Rgb, ok: Rgb, ok_soft: Rgb, warning: Rgb, warning_soft: Rgb, danger: Rgb, danger_soft: Rgb, on_danger: Rgb, info: Rgb, info_soft: Rgb, red: Rgb, orange: Rgb, yellow: Rgb, green: Rgb, cyan: Rgb, blue: Rgb, violet: Rgb, code: Rgb);
377
- /**
378
- * Generated tmTheme text, for writing into exported project bundles.
379
- */
380
- tmTheme(): string;
381
377
  /**
382
378
  * Virtual path of `tmTheme`, with no leading slash.
383
379
  */
384
380
  tmThemePath(): string;
381
+ /**
382
+ * Generated tmTheme text, for writing into exported project bundles.
383
+ */
384
+ tmTheme(): string;
385
385
  }
386
386
 
387
387
  /**
@@ -426,18 +426,18 @@ export class TypstState {
426
426
  * render uses, without rendering frames and without publishing a document.
427
427
  */
428
428
  diagnosePaged(id: FileId, text: string, prelude: string): CheckResult;
429
- /**
430
- * Clears Typst's global memoization caches. They make repeated compiles
431
- * cheap but grow for the lifetime of the instance, so call this when
432
- * memory matters more than speed, such as on a workspace switch.
433
- */
434
- evictCaches(): void;
435
429
  /**
436
430
  * Evicts entries unused across two eviction rounds. The heap watchdog
437
431
  * uses this while typing: per-keystroke entries age out, shared entries
438
432
  * such as the library and fonts stay warm.
439
433
  */
440
434
  evictCachesAged(max_age: number): void;
435
+ /**
436
+ * Clears Typst's global memoization caches. They make repeated compiles
437
+ * cheap but grow for the lifetime of the instance, so call this when
438
+ * memory matters more than speed, such as on a workspace switch.
439
+ */
440
+ evictCaches(): void;
441
441
  /**
442
442
  * Extracts notebook cells as UTF-16 spans, ready for CodeMirror
443
443
  * positions. Shares the note's parse tree, like the other syntax passes.
package/engine.js CHANGED
@@ -172,15 +172,15 @@ export class ThemeColors {
172
172
  return this;
173
173
  }
174
174
  /**
175
- * Generated tmTheme text, for writing into exported project bundles.
175
+ * Virtual path of `tmTheme`, with no leading slash.
176
176
  * @returns {string}
177
177
  */
178
- tmTheme() {
178
+ tmThemePath() {
179
179
  let deferred1_0;
180
180
  let deferred1_1;
181
181
  try {
182
182
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
183
- wasm.themecolors_tmTheme(retptr, this.__wbg_ptr);
183
+ wasm.themecolors_tmThemePath(retptr, this.__wbg_ptr);
184
184
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
185
185
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
186
186
  deferred1_0 = r0;
@@ -192,15 +192,15 @@ export class ThemeColors {
192
192
  }
193
193
  }
194
194
  /**
195
- * Virtual path of `tmTheme`, with no leading slash.
195
+ * Generated tmTheme text, for writing into exported project bundles.
196
196
  * @returns {string}
197
197
  */
198
- tmThemePath() {
198
+ tmTheme() {
199
199
  let deferred1_0;
200
200
  let deferred1_1;
201
201
  try {
202
202
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
203
- wasm.themecolors_tmThemePath(retptr, this.__wbg_ptr);
203
+ wasm.themecolors_tmTheme(retptr, this.__wbg_ptr);
204
204
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
205
205
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
206
206
  deferred1_0 = r0;
@@ -445,14 +445,6 @@ export class TypstState {
445
445
  wasm.__wbindgen_add_to_stack_pointer(16);
446
446
  }
447
447
  }
448
- /**
449
- * Clears Typst's global memoization caches. They make repeated compiles
450
- * cheap but grow for the lifetime of the instance, so call this when
451
- * memory matters more than speed, such as on a workspace switch.
452
- */
453
- evictCaches() {
454
- wasm.typststate_evictCaches(this.__wbg_ptr);
455
- }
456
448
  /**
457
449
  * Evicts entries unused across two eviction rounds. The heap watchdog
458
450
  * uses this while typing: per-keystroke entries age out, shared entries
@@ -462,6 +454,14 @@ export class TypstState {
462
454
  evictCachesAged(max_age) {
463
455
  wasm.typststate_evictCachesAged(this.__wbg_ptr, max_age);
464
456
  }
457
+ /**
458
+ * Clears Typst's global memoization caches. They make repeated compiles
459
+ * cheap but grow for the lifetime of the instance, so call this when
460
+ * memory matters more than speed, such as on a workspace switch.
461
+ */
462
+ evictCaches() {
463
+ wasm.typststate_evictCaches(this.__wbg_ptr);
464
+ }
465
465
  /**
466
466
  * Extracts notebook cells as UTF-16 spans, ready for CodeMirror
467
467
  * positions. Shares the note's parse tree, like the other syntax passes.
@@ -1201,7 +1201,7 @@ export function takePanicGlobal() {
1201
1201
  function __wbg_get_imports() {
1202
1202
  const import0 = {
1203
1203
  __proto__: null,
1204
- __wbg_Error_408e67f47ca7b58b: function(arg0, arg1) {
1204
+ __wbg_Error_30c8987f7c2ed4e2: function(arg0, arg1) {
1205
1205
  const ret = Error(getStringFromWasm0(arg0, arg1));
1206
1206
  return addHeapObject(ret);
1207
1207
  },
@@ -1212,62 +1212,62 @@ function __wbg_get_imports() {
1212
1212
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1213
1213
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1214
1214
  },
1215
- __wbg___wbindgen_memory_5dc2a138835b0f8e: function() {
1215
+ __wbg___wbindgen_memory_caa4a6165639c8b5: function() {
1216
1216
  const ret = wasm.memory;
1217
1217
  return addHeapObject(ret);
1218
1218
  },
1219
- __wbg___wbindgen_number_get_136b9679cab35cfb: function(arg0, arg1) {
1219
+ __wbg___wbindgen_number_get_2e0e7dee9f701a71: function(arg0, arg1) {
1220
1220
  const obj = getObject(arg1);
1221
1221
  const ret = typeof(obj) === 'number' ? obj : undefined;
1222
1222
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1223
1223
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1224
1224
  },
1225
- __wbg___wbindgen_throw_bb96b2010945f0bc: function(arg0, arg1) {
1225
+ __wbg___wbindgen_throw_41e9ee4f547fc59a: function(arg0, arg1) {
1226
1226
  throw new Error(getStringFromWasm0(arg0, arg1));
1227
1227
  },
1228
- __wbg_debug_ae65d086f59ab2b9: function(arg0, arg1) {
1228
+ __wbg_debug_fd64500dfca02936: function(arg0, arg1) {
1229
1229
  console.debug(getStringFromWasm0(arg0, arg1));
1230
1230
  },
1231
- __wbg_error_712632c960c118c6: function(arg0, arg1) {
1231
+ __wbg_error_be3f20dbd51c0263: function(arg0, arg1) {
1232
1232
  console.error(getStringFromWasm0(arg0, arg1));
1233
1233
  },
1234
- __wbg_getTime_63fb0332e6c4ec17: function(arg0) {
1234
+ __wbg_getTime_f5a55efff2585d5d: function(arg0) {
1235
1235
  const ret = getObject(arg0).getTime();
1236
1236
  return ret;
1237
1237
  },
1238
- __wbg_get_971a0c45d172643f: function() { return handleError(function (arg0, arg1) {
1238
+ __wbg_get_31af05bd4842a84f: function() { return handleError(function (arg0, arg1) {
1239
1239
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
1240
1240
  return addHeapObject(ret);
1241
1241
  }, arguments); },
1242
- __wbg_new_0_f117d868b403dc07: function() {
1242
+ __wbg_new_0_72d020f0c63443d4: function() {
1243
1243
  const ret = new Date();
1244
1244
  return addHeapObject(ret);
1245
1245
  },
1246
- __wbg_new_116be93542d39019: function() {
1247
- const ret = new Array();
1246
+ __wbg_new_617a8cdb8bb1130e: function() {
1247
+ const ret = new Object();
1248
1248
  return addHeapObject(ret);
1249
1249
  },
1250
- __wbg_new_ebe3e0f6837f0879: function() {
1251
- const ret = new Object();
1250
+ __wbg_new_ee2291f50781bf1d: function() {
1251
+ const ret = new Array();
1252
1252
  return addHeapObject(ret);
1253
1253
  },
1254
1254
  __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
1255
1255
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
1256
1256
  },
1257
- __wbg_set_a80955eb93b145c6: function(arg0, arg1, arg2) {
1257
+ __wbg_set_bea140a88be9b277: function(arg0, arg1, arg2) {
1258
1258
  getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
1259
1259
  },
1260
- __wbindgen_cast_0000000000000001: function(arg0) {
1260
+ __wbindgen_generic_0000000000000001: function(arg0) {
1261
1261
  // Cast intrinsic for `F64 -> Externref`.
1262
1262
  const ret = arg0;
1263
1263
  return addHeapObject(ret);
1264
1264
  },
1265
- __wbindgen_cast_0000000000000002: function(arg0, arg1) {
1265
+ __wbindgen_generic_0000000000000002: function(arg0, arg1) {
1266
1266
  // Cast intrinsic for `Ref(String) -> Externref`.
1267
1267
  const ret = getStringFromWasm0(arg0, arg1);
1268
1268
  return addHeapObject(ret);
1269
1269
  },
1270
- __wbindgen_cast_0000000000000003: function(arg0) {
1270
+ __wbindgen_generic_0000000000000003: function(arg0) {
1271
1271
  // Cast intrinsic for `U64 -> Externref`.
1272
1272
  const ret = BigInt.asUintN(64, arg0);
1273
1273
  return addHeapObject(ret);
package/engine_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@typbase/engine",
3
3
  "type": "module",
4
4
  "description": "Local-first knowledge base made for Typst and the Atmosphere.",
5
- "version": "0.4.2",
5
+ "version": "0.4.3",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
8
8
  "type": "git",