@retorquere/bibtex-parser 12.1.2 → 12.1.4

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.
@@ -1,4 +1,6 @@
1
1
  /* @ts-self-types="./bibtex_parser.d.ts" */
2
+ import * as import1 from "./snippets/rq-bibtex-parser-a708c588fcf0dba5/inline0.js"
3
+
2
4
 
3
5
  /**
4
6
  * Parse a BibTeX string and return the initial typed result as a JavaScript object.
@@ -6,16 +8,28 @@
6
8
  * @param {any | null} [options]
7
9
  * @returns {any}
8
10
  */
9
- export function parseNormalized(input, options) {
11
+ export function parse(input, options) {
10
12
  const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
11
13
  const len0 = WASM_VECTOR_LEN;
12
- const ret = wasm.parseNormalized(ptr0, len0, isLikeNone(options) ? 0 : addToExternrefTable0(options));
14
+ const ret = wasm.parse(ptr0, len0, isLikeNone(options) ? 0 : addToExternrefTable0(options));
13
15
  if (ret[2]) {
14
16
  throw takeFromExternrefTable0(ret[1]);
15
17
  }
16
18
  return takeFromExternrefTable0(ret[0]);
17
19
  }
18
20
 
21
+ /**
22
+ * @param {string} input
23
+ * @param {any | null} [options]
24
+ * @returns {Promise<any>}
25
+ */
26
+ export function parseAsync(input, options) {
27
+ const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
28
+ const len0 = WASM_VECTOR_LEN;
29
+ const ret = wasm.parseAsync(ptr0, len0, isLikeNone(options) ? 0 : addToExternrefTable0(options));
30
+ return ret;
31
+ }
32
+
19
33
  /**
20
34
  * Parse a BibTeX string and return the verbatim result as a JavaScript object.
21
35
  * @param {string} input
@@ -32,6 +46,18 @@ export function parseVerbatim(input, options) {
32
46
  return takeFromExternrefTable0(ret[0]);
33
47
  }
34
48
 
49
+ /**
50
+ * @param {string} input
51
+ * @param {any | null} [options]
52
+ * @returns {Promise<any>}
53
+ */
54
+ export function parseVerbatimAsync(input, options) {
55
+ const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
56
+ const len0 = WASM_VECTOR_LEN;
57
+ const ret = wasm.parseVerbatimAsync(ptr0, len0, isLikeNone(options) ? 0 : addToExternrefTable0(options));
58
+ return ret;
59
+ }
60
+
35
61
  /**
36
62
  * Apply sentence casing with the standalone TypeScript API's defaulted option object.
37
63
  * @param {string} input
@@ -159,6 +185,13 @@ function __wbg_get_imports() {
159
185
  __wbg___wbindgen_throw_41e9ee4f547fc59a: function(arg0, arg1) {
160
186
  throw new Error(getStringFromWasm0(arg0, arg1));
161
187
  },
188
+ __wbg__wbg_cb_unref_dcc1a90847f04c41: function(arg0) {
189
+ arg0._wbg_cb_unref();
190
+ },
191
+ __wbg_call_187d372bd5fdd4aa: function() { return handleError(function (arg0, arg1, arg2) {
192
+ const ret = arg0.call(arg1, arg2);
193
+ return ret;
194
+ }, arguments); },
162
195
  __wbg_call_6137034ef55c9d0f: function() { return handleError(function (arg0, arg1) {
163
196
  const ret = arg0.call(arg1);
164
197
  return ret;
@@ -197,6 +230,16 @@ function __wbg_get_imports() {
197
230
  const ret = result;
198
231
  return ret;
199
232
  },
233
+ __wbg_instanceof_Map_b2611749102d7ba3: function(arg0) {
234
+ let result;
235
+ try {
236
+ result = arg0 instanceof Map;
237
+ } catch (_) {
238
+ result = false;
239
+ }
240
+ const ret = result;
241
+ return ret;
242
+ },
200
243
  __wbg_instanceof_Uint8Array_828cef2aaacafc31: function(arg0) {
201
244
  let result;
202
245
  try {
@@ -243,6 +286,24 @@ function __wbg_get_imports() {
243
286
  const ret = new Array();
244
287
  return ret;
245
288
  },
289
+ __wbg_new_typed_b01cb72a8af741a3: function(arg0, arg1) {
290
+ try {
291
+ var state0 = {a: arg0, b: arg1};
292
+ var cb0 = (arg0, arg1) => {
293
+ const a = state0.a;
294
+ state0.a = 0;
295
+ try {
296
+ return wasm_bindgen_d8d66d04887dc00f___convert__closures_____invoke___js_sys_a6b0604181071ff___Function_fn_wasm_bindgen_d8d66d04887dc00f___JsValue_____wasm_bindgen_d8d66d04887dc00f___sys__Undefined___js_sys_a6b0604181071ff___Function_fn_wasm_bindgen_d8d66d04887dc00f___JsValue_____wasm_bindgen_d8d66d04887dc00f___sys__Undefined_______true_(a, state0.b, arg0, arg1);
297
+ } finally {
298
+ state0.a = a;
299
+ }
300
+ };
301
+ const ret = new Promise(cb0);
302
+ return ret;
303
+ } finally {
304
+ state0.a = 0;
305
+ }
306
+ },
246
307
  __wbg_next_33784799010f1bbe: function(arg0) {
247
308
  const ret = arg0.next;
248
309
  return ret;
@@ -254,6 +315,17 @@ function __wbg_get_imports() {
254
315
  __wbg_prototypesetcall_bc27214492979395: function(arg0, arg1, arg2) {
255
316
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
256
317
  },
318
+ __wbg_queueMicrotask_9833f9a49df95a49: function(arg0) {
319
+ const ret = arg0.queueMicrotask;
320
+ return ret;
321
+ },
322
+ __wbg_queueMicrotask_a72f977e97f23c5f: function(arg0) {
323
+ queueMicrotask(arg0);
324
+ },
325
+ __wbg_resolve_0076e10020304ede: function(arg0) {
326
+ const ret = Promise.resolve(arg0);
327
+ return ret;
328
+ },
257
329
  __wbg_set_6ae97e73113c4f0b: function(arg0, arg1, arg2) {
258
330
  const ret = arg0.set(arg1, arg2);
259
331
  return ret;
@@ -264,26 +336,55 @@ function __wbg_get_imports() {
264
336
  __wbg_set_bea140a88be9b277: function(arg0, arg1, arg2) {
265
337
  arg0[arg1 >>> 0] = arg2;
266
338
  },
339
+ __wbg_static_accessor_GLOBAL_266715b9d96ba635: function() {
340
+ const ret = typeof global === 'undefined' ? null : global;
341
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
342
+ },
343
+ __wbg_static_accessor_GLOBAL_THIS_10fb7dc1ae063179: function() {
344
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
345
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
346
+ },
347
+ __wbg_static_accessor_SELF_0b583911f537483a: function() {
348
+ const ret = typeof self === 'undefined' ? null : self;
349
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
350
+ },
351
+ __wbg_static_accessor_WINDOW_d7f903d1508cbdc4: function() {
352
+ const ret = typeof window === 'undefined' ? null : window;
353
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
354
+ },
355
+ __wbg_then_c949d5a25a4e78f8: function(arg0, arg1, arg2) {
356
+ const ret = arg0.then(arg1, arg2);
357
+ return ret;
358
+ },
359
+ __wbg_then_e71170d78fcf8954: function(arg0, arg1) {
360
+ const ret = arg0.then(arg1);
361
+ return ret;
362
+ },
267
363
  __wbg_value_f3c585ee8f5ba40c: function(arg0) {
268
364
  const ret = arg0.value;
269
365
  return ret;
270
366
  },
271
- __wbindgen_generic_0000000000000001: function(arg0) {
367
+ __wbindgen_generic_0000000000000001: function(arg0, arg1) {
368
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 78, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
369
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d8d66d04887dc00f___convert__closures_____invoke___wasm_bindgen_d8d66d04887dc00f___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_d8d66d04887dc00f___JsError___true_);
370
+ return ret;
371
+ },
372
+ __wbindgen_generic_0000000000000002: function(arg0) {
272
373
  // Cast intrinsic for `F64 -> Externref`.
273
374
  const ret = arg0;
274
375
  return ret;
275
376
  },
276
- __wbindgen_generic_0000000000000002: function(arg0) {
377
+ __wbindgen_generic_0000000000000003: function(arg0) {
277
378
  // Cast intrinsic for `I64 -> Externref`.
278
379
  const ret = arg0;
279
380
  return ret;
280
381
  },
281
- __wbindgen_generic_0000000000000003: function(arg0, arg1) {
382
+ __wbindgen_generic_0000000000000004: function(arg0, arg1) {
282
383
  // Cast intrinsic for `Ref(String) -> Externref`.
283
384
  const ret = getStringFromWasm0(arg0, arg1);
284
385
  return ret;
285
386
  },
286
- __wbindgen_generic_0000000000000004: function(arg0) {
387
+ __wbindgen_generic_0000000000000005: function(arg0) {
287
388
  // Cast intrinsic for `U64 -> Externref`.
288
389
  const ret = BigInt.asUintN(64, arg0);
289
390
  return ret;
@@ -301,15 +402,31 @@ function __wbg_get_imports() {
301
402
  return {
302
403
  __proto__: null,
303
404
  "./bibtex_parser_bg.js": import0,
405
+ "./snippets/rq-bibtex-parser-a708c588fcf0dba5/inline0.js": import1,
304
406
  };
305
407
  }
306
408
 
409
+ function wasm_bindgen_d8d66d04887dc00f___convert__closures_____invoke___wasm_bindgen_d8d66d04887dc00f___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_d8d66d04887dc00f___JsError___true_(arg0, arg1, arg2) {
410
+ const ret = wasm.wasm_bindgen_d8d66d04887dc00f___convert__closures_____invoke___wasm_bindgen_d8d66d04887dc00f___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_d8d66d04887dc00f___JsError___true_(arg0, arg1, arg2);
411
+ if (ret[1]) {
412
+ throw takeFromExternrefTable0(ret[0]);
413
+ }
414
+ }
415
+
416
+ function wasm_bindgen_d8d66d04887dc00f___convert__closures_____invoke___js_sys_a6b0604181071ff___Function_fn_wasm_bindgen_d8d66d04887dc00f___JsValue_____wasm_bindgen_d8d66d04887dc00f___sys__Undefined___js_sys_a6b0604181071ff___Function_fn_wasm_bindgen_d8d66d04887dc00f___JsValue_____wasm_bindgen_d8d66d04887dc00f___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
417
+ wasm.wasm_bindgen_d8d66d04887dc00f___convert__closures_____invoke___js_sys_a6b0604181071ff___Function_fn_wasm_bindgen_d8d66d04887dc00f___JsValue_____wasm_bindgen_d8d66d04887dc00f___sys__Undefined___js_sys_a6b0604181071ff___Function_fn_wasm_bindgen_d8d66d04887dc00f___JsValue_____wasm_bindgen_d8d66d04887dc00f___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
418
+ }
419
+
307
420
  function addToExternrefTable0(obj) {
308
421
  const idx = wasm.__externref_table_alloc();
309
422
  wasm.__wbindgen_externrefs.set(idx, obj);
310
423
  return idx;
311
424
  }
312
425
 
426
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
427
+ ? { register: () => {}, unregister: () => {} }
428
+ : new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));
429
+
313
430
  function debugString(val) {
314
431
  // primitive types
315
432
  const type = typeof val;
@@ -413,6 +530,34 @@ function isLikeNone(x) {
413
530
  return x === undefined || x === null;
414
531
  }
415
532
 
533
+ function makeMutClosure(arg0, arg1, f) {
534
+ const state = { a: arg0, b: arg1, cnt: 1 };
535
+ const real = (...args) => {
536
+
537
+ // First up with a closure we increment the internal reference
538
+ // count. This ensures that the Rust closure environment won't
539
+ // be deallocated while we're invoking it.
540
+ state.cnt++;
541
+ const a = state.a;
542
+ state.a = 0;
543
+ try {
544
+ return f(a, state.b, ...args);
545
+ } finally {
546
+ state.a = a;
547
+ real._wbg_cb_unref();
548
+ }
549
+ };
550
+ real._wbg_cb_unref = () => {
551
+ if (--state.cnt === 0) {
552
+ wasm.__wbindgen_destroy_closure(state.a, state.b);
553
+ state.a = 0;
554
+ CLOSURE_DTORS.unregister(state);
555
+ }
556
+ };
557
+ CLOSURE_DTORS.register(real, state, state);
558
+ return real;
559
+ }
560
+
416
561
  function passStringToWasm0(arg, malloc, realloc) {
417
562
  if (realloc === undefined) {
418
563
  const buf = cachedTextEncoder.encode(arg);
Binary file
@@ -1,15 +1,20 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export const parseNormalized: (a: number, b: number, c: number) => [number, number, number];
4
+ export const parse: (a: number, b: number, c: number) => [number, number, number];
5
+ export const parseAsync: (a: number, b: number, c: number) => any;
5
6
  export const parseVerbatim: (a: number, b: number, c: number) => [number, number, number];
7
+ export const parseVerbatimAsync: (a: number, b: number, c: number) => any;
6
8
  export const toSentenceCase: (a: number, b: number, c: number) => [number, number, number, number];
7
9
  export const tokenize: (a: number, b: number) => [number, number, number];
10
+ export const wasm_bindgen_d8d66d04887dc00f___convert__closures_____invoke___js_sys_a6b0604181071ff___Function_fn_wasm_bindgen_d8d66d04887dc00f___JsValue_____wasm_bindgen_d8d66d04887dc00f___sys__Undefined___js_sys_a6b0604181071ff___Function_fn_wasm_bindgen_d8d66d04887dc00f___JsValue_____wasm_bindgen_d8d66d04887dc00f___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
11
+ export const wasm_bindgen_d8d66d04887dc00f___convert__closures_____invoke___wasm_bindgen_d8d66d04887dc00f___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_d8d66d04887dc00f___JsError___true_: (a: number, b: number, c: any) => [number, number];
8
12
  export const __wbindgen_malloc: (a: number, b: number) => number;
9
13
  export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
10
14
  export const __wbindgen_exn_store: (a: number) => void;
11
15
  export const __externref_table_alloc: () => number;
12
16
  export const __wbindgen_externrefs: WebAssembly.Table;
17
+ export const __wbindgen_destroy_closure: (a: number, b: number) => void;
13
18
  export const __externref_table_dealloc: (a: number) => void;
14
19
  export const __wbindgen_free: (a: number, b: number, c: number) => void;
15
20
  export const __wbindgen_start: () => void;
@@ -1,122 +1,142 @@
1
- import type { InitInput, InitOutput, SyncInitInput } from './bibtex_parser.js'
2
-
3
- export type { InitInput, InitOutput, SyncInitInput }
4
- export { initSync } from './bibtex_parser.js'
5
- export { default as init } from './bibtex_parser.js'
6
- export { default } from './bibtex_parser.js'
7
-
8
- export type ParseMode = 'creatorlist' | 'title' | 'verbatim' | 'richtext' | 'literallist' | 'literal' | 'verbatimlist'
9
-
1
+ /** @module wasm */
2
+ import init, { initSync } from './bibtex_parser.js';
3
+ export type { InitInput, InitOutput, SyncInitInput } from './bibtex_parser.js';
4
+ /** Initializes the WebAssembly parser; await this before using its exports. */
5
+ export { init, initSync };
6
+ export default init;
7
+ /** Describes how a BibTeX field is interpreted. */
8
+ export type ParseMode = 'creatorlist' | 'title' | 'verbatim' | 'richtext' | 'literallist' | 'literal' | 'verbatimlist';
9
+ /** A parsed personal or organizational name. */
10
10
  export interface Creator {
11
- name?: string
12
- lastName?: string
13
- firstName?: string
14
- prefix?: string
15
- suffix?: string
16
- initial?: string
17
- useprefix?: boolean
18
- juniorcomma?: boolean
11
+ name?: string;
12
+ lastName?: string;
13
+ firstName?: string;
14
+ prefix?: string;
15
+ suffix?: string;
16
+ initial?: string;
17
+ useprefix?: boolean;
18
+ juniorcomma?: boolean;
19
19
  }
20
-
21
- export type FieldValue = string | string[] | Creator[]
22
-
20
+ export type FieldValue = string | string[] | Creator[];
21
+ /** A normalized BibTeX entry returned by the parser. */
23
22
  export interface Entry {
24
- type: string
25
- key: string
26
- fields: Record<string, FieldValue>
27
- mode: Record<string, ParseMode>
28
- crossref?: Record<string, { parent: string; field: string }>
29
- input: string
23
+ type: string;
24
+ key: string;
25
+ fields: Record<string, FieldValue>;
26
+ mode: Record<string, ParseMode>;
27
+ crossref?: Record<string, {
28
+ parent: string;
29
+ field: string;
30
+ }>;
31
+ input: string;
30
32
  }
31
-
33
+ /** A parsing diagnostic. */
32
34
  export interface ParseError {
33
- error: string
34
- input?: string
35
+ error: string;
36
+ input?: string;
35
37
  }
36
-
38
+ /** A group in JabRef's nested group hierarchy. */
37
39
  export interface JabRefGroup {
38
- name: string
39
- entries: string[]
40
- groups: JabRefGroup[]
40
+ name: string;
41
+ entries: string[];
42
+ groups: JabRefGroup[];
41
43
  }
42
-
44
+ /** JabRef metadata extracted from a BibTeX library. */
43
45
  export interface JabRefMetadata {
44
- root: JabRefGroup[]
45
- groups: Record<string, JabRefGroup>
46
- fileDirectory?: string
47
- groupsversion?: number
48
- databaseType?: string
46
+ root: JabRefGroup[];
47
+ groups: Record<string, JabRefGroup>;
48
+ fileDirectory?: string;
49
+ groupsversion?: number;
50
+ databaseType?: string;
49
51
  }
50
-
52
+ /** The parsed contents of a BibTeX library. */
51
53
  export interface Library {
52
- errors: ParseError[]
53
- entries: Entry[]
54
- comments: string[]
55
- strings: Record<string, string>
56
- preamble: string[]
57
- jabref: JabRefMetadata
54
+ errors: ParseError[];
55
+ entries: Entry[];
56
+ comments: string[];
57
+ strings: Record<string, string>;
58
+ preambles: string[];
59
+ jabref: JabRefMetadata;
58
60
  }
59
-
61
+ /** Options controlling title sentence casing. */
60
62
  export interface SentenceCaseOptions {
61
- guess?: boolean
62
- subSentence?: boolean
63
- preserveQuoted?: boolean
63
+ guess?: boolean;
64
+ subSentence?: boolean;
65
+ preserveQuoted?: boolean;
64
66
  }
65
-
67
+ /** A classified text token returned by {@link tokenize}. */
66
68
  export interface Token {
67
- type: 'word' | 'domain' | 'whitespace' | 'number' | 'email' | 'handle' | 'website' | 'markup' | 'other' | 'punctuation'
68
- subtype: '' | 'preposition' | 'acronym' | 'contraction' | 'ordinal' | 'word' | 'end' | 'colon' | 'ellipsis'
69
- text: string
70
- start: number
71
- end: number
72
- shape: string
73
- sentenceStart: boolean
74
- subSentenceStart: boolean
75
- hyphenated?: Token[]
69
+ type: 'word' | 'domain' | 'whitespace' | 'number' | 'email' | 'handle' | 'website' | 'markup' | 'other' | 'punctuation';
70
+ subtype: '' | 'preposition' | 'acronym' | 'contraction' | 'ordinal' | 'word' | 'end' | 'colon' | 'ellipsis';
71
+ text: string;
72
+ start: number;
73
+ end: number;
74
+ shape: string;
75
+ sentenceStart: boolean;
76
+ subSentenceStart: boolean;
77
+ hyphenated?: Token[];
76
78
  }
77
-
78
- export interface Options {
79
- english?: string[] | boolean
80
- languageAsLangid?: boolean
81
- sentenceCase?: false | SentenceCaseOptions
82
- caseProtection?: 'as-needed' | 'strict' | boolean
83
- unsupported?: 'ignore' | 'keep' | 'throw'
84
- verbatimFields?: (string | RegExp)[]
85
- removeOuterBraces?: string[]
86
- fieldMode?: Record<string, ParseMode>
87
- raw?: boolean
88
- strings?: Record<string, string> | string
89
- applyCrossRef?: boolean
79
+ /** Options for normalized BibTeX parsing. */
80
+ export interface Options extends ParserOptions {
81
+ /** Language identifiers treated as English for title casing. */
82
+ english?: string[];
83
+ /** Use the `language` field as a fallback language identifier. */
84
+ languageAsLangid?: boolean;
85
+ /** Configure sentence-casing behavior. */
86
+ sentenceCase?: SentenceCaseOptions;
87
+ /** Control preservation of capitalization inside braces. */
88
+ caseProtection?: 'off' | 'as-needed' | 'strict';
89
+ /** Policy for unsupported TeX commands and environments. */
90
+ unsupported?: 'ignore' | 'keep' | 'throw';
91
+ /** Fields parsed as verbatim text rather than TeX. */
92
+ verbatimFields?: (string | RegExp)[];
93
+ /** Fields for which a redundant outer brace pair is removed. */
94
+ removeOuterBraces?: string[];
95
+ /** Override the default parsing mode for individual fields. */
96
+ fieldMode?: Record<string, ParseMode>;
97
+ /** Return field text without LaTeX-to-Unicode conversion. */
98
+ raw?: boolean;
99
+ /** Inherit missing fields from cross-referenced entries. */
100
+ applyCrossRef?: boolean;
90
101
  }
91
-
102
+ /** Options shared by the normalized and verbatim parsers. */
92
103
  export interface ParserOptions {
93
- maxEntries?: number
94
- strings?: Record<string, string> | string
95
- stringsSource?: string
104
+ /** Stop after this many entries have been parsed. */
105
+ maxEntries?: number;
106
+ /** Preload string definitions as a dictionary or BibTeX source. */
107
+ strings?: Record<string, string> | string;
96
108
  }
97
-
109
+ /** An entry whose field values retain their original BibTeX text. */
98
110
  export interface VerbatimEntry {
99
- input: string
100
- type: string
101
- key: string
102
- fields: Record<string, string>
111
+ input: string;
112
+ type: string;
113
+ key: string;
114
+ fields: Record<string, string>;
103
115
  }
104
-
116
+ /** The library returned by the verbatim parser. */
105
117
  export interface VerbatimLibrary {
106
- entries: VerbatimEntry[]
107
- strings: Record<string, string>
108
- comments: string[]
109
- errors: ParseError[]
110
- preambles: string[]
118
+ entries: VerbatimEntry[];
119
+ strings: Record<string, string>;
120
+ comments: string[];
121
+ errors: ParseError[];
122
+ preambles: string[];
123
+ jabref: JabRefMetadata;
111
124
  }
112
-
113
- export function parseVerbatim(input: string, options?: ParserOptions): VerbatimLibrary
114
- export function parseNormalized(input: string, options?: Options): Library
115
- export function parse(input: string, options?: Options): Library
116
- export function parseAsync(input: string, options?: Options): Promise<Library>
117
- export function toSentenceCase(input: string, options?: {
118
- preserveQuoted?: boolean
119
- subSentenceCapitalization?: boolean
120
- guess?: boolean
121
- }): string
122
- export function tokenize(input: string, markup?: RegExp): Token[]
125
+ /** Default language identifiers treated as English. */
126
+ export declare const english: string[];
127
+ /** Parses BibTeX while leaving field contents uninterpreted. */
128
+ export declare function parseVerbatim(input: string, options?: ParserOptions): VerbatimLibrary;
129
+ /** Asynchronous variant of {@link parseVerbatim}. */
130
+ export declare function parseVerbatimAsync(input: string, options?: ParserOptions): Promise<VerbatimLibrary>;
131
+ /** Parses BibTeX or BibLaTeX source into a normalized library. */
132
+ export declare function parse(input: string, options?: Options): Library;
133
+ /** Asynchronous variant of {@link parse}, yielding during large parses. */
134
+ export declare function parseAsync(input: string, options?: Options): Promise<Library>;
135
+ /** Converts a title to sentence case using heuristic token classification. */
136
+ export declare function toSentenceCase(input: string, options?: {
137
+ preserveQuoted?: boolean;
138
+ subSentenceCapitalization?: boolean;
139
+ guess?: boolean;
140
+ }): string;
141
+ /** Splits text into classified tokens with source offsets. */
142
+ export declare function tokenize(input: string, markup?: RegExp): Token[];