@shikijs/engine-oniguruma 1.17.7 → 1.19.0

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/dist/index.d.mts CHANGED
@@ -2,6 +2,15 @@ import { L as LoadWasmOptions, R as RegexEngine } from './chunk-index.d.mjs';
2
2
 
3
3
  declare function loadWasm(options: LoadWasmOptions): Promise<void>;
4
4
 
5
+ /**
6
+ * Set the default wasm loader for `loadWasm`.
7
+ * @internal
8
+ */
9
+ declare function setDefaultWasmLoader(_loader: LoadWasmOptions): void;
10
+ /**
11
+ * @internal
12
+ */
13
+ declare function getDefaultWasmLoader(): LoadWasmOptions | undefined;
5
14
  declare function createWasmOnigEngine(options?: LoadWasmOptions | null): Promise<RegexEngine>;
6
15
 
7
- export { createWasmOnigEngine, loadWasm };
16
+ export { createWasmOnigEngine, getDefaultWasmLoader, loadWasm, setDefaultWasmLoader };
package/dist/index.mjs CHANGED
@@ -469,6 +469,20 @@ function _makeResponseNonStreamingLoader(data) {
469
469
  // defaultDebugCall = _defaultDebugCall
470
470
  // }
471
471
 
472
+ let _defaultWasmLoader;
473
+ /**
474
+ * Set the default wasm loader for `loadWasm`.
475
+ * @internal
476
+ */
477
+ function setDefaultWasmLoader(_loader) {
478
+ _defaultWasmLoader = _loader;
479
+ }
480
+ /**
481
+ * @internal
482
+ */
483
+ function getDefaultWasmLoader() {
484
+ return _defaultWasmLoader;
485
+ }
472
486
  async function createWasmOnigEngine(options) {
473
487
  if (options)
474
488
  await loadWasm(options);
@@ -482,4 +496,4 @@ async function createWasmOnigEngine(options) {
482
496
  };
483
497
  }
484
498
 
485
- export { createWasmOnigEngine, loadWasm };
499
+ export { createWasmOnigEngine, getDefaultWasmLoader, loadWasm, setDefaultWasmLoader };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shikijs/engine-oniguruma",
3
3
  "type": "module",
4
- "version": "1.17.7",
4
+ "version": "1.19.0",
5
5
  "description": "Engine for Shiki using Oniguruma RegExp engine in WebAssembly",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -47,7 +47,7 @@
47
47
  ],
48
48
  "dependencies": {
49
49
  "@shikijs/vscode-textmate": "^9.2.2",
50
- "@shikijs/types": "1.17.7"
50
+ "@shikijs/types": "1.19.0"
51
51
  },
52
52
  "devDependencies": {
53
53
  "vscode-oniguruma": "^1.7.0"