@gmb/bitmark-parser 6.1.2 → 6.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.
- package/README.md +63 -17
- package/bin/bitmark +55 -0
- package/bin/bitmark.cmd +16 -0
- package/dist/browser/bitmark-parser.min.js +4 -2
- package/dist/browser/bitmark-parser.min.js.map +1 -1
- package/dist/browser/bitmark_wasm_bg.wasm +0 -0
- package/dist/browser/cjs/bitmark_wasm_bg.wasm +0 -0
- package/dist/browser/cjs/index.cjs +1122 -25
- package/dist/browser/cjs/index.cjs.map +1 -1
- package/dist/browser/cjs/index.d.cts +1784 -9
- package/dist/browser/esm/bitmark_wasm_bg.wasm +0 -0
- package/dist/browser/esm/index.d.ts +1784 -9
- package/dist/browser/esm/index.js +1121 -25
- package/dist/browser/esm/index.js.map +1 -1
- package/dist/browser/esm/worker-entry.js.map +1 -1
- package/dist/index.cjs +1103 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +213 -8
- package/dist/index.d.ts +213 -8
- package/dist/index.js +1095 -5
- package/dist/index.js.map +1 -1
- package/dist/legacy.cjs +1170 -0
- package/dist/legacy.cjs.map +1 -0
- package/dist/legacy.d.cts +1568 -0
- package/dist/legacy.d.ts +1568 -0
- package/dist/legacy.js +1095 -0
- package/dist/legacy.js.map +1 -0
- package/package.json +14 -9
- package/wasm/bitmark_wasm.d.ts +22 -3
- package/wasm/bitmark_wasm.js +79 -22
- package/wasm/bitmark_wasm_bg.wasm +0 -0
- package/wasm/bitmark_wasm_bg.wasm.d.ts +4 -3
- package/wasm/package.json +1 -1
- package/bin/bitmark-parser.js +0 -25
- package/lib/binary.js +0 -61
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
interface InitOutput {
|
|
2
2
|
readonly memory: WebAssembly.Memory;
|
|
3
3
|
readonly breakscape_text: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
4
|
-
readonly canonicalize: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
4
|
+
readonly canonicalize: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
|
|
5
5
|
readonly convert: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
|
|
6
|
+
readonly convert_text: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
6
7
|
readonly count_bits: (a: number, b: number, c: number) => void;
|
|
7
|
-
readonly fullize: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
8
|
+
readonly fullize: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
8
9
|
readonly info: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
9
10
|
readonly is_bitmark: (a: number, b: number) => number;
|
|
10
11
|
readonly lex: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
11
|
-
readonly optimize: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
12
|
+
readonly optimize: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
12
13
|
readonly parse: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
13
14
|
readonly prettify: (a: number, b: number, c: number, d: number) => void;
|
|
14
15
|
readonly split_bits: (a: number, b: number, c: number) => void;
|
|
@@ -32,6 +33,1765 @@ type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
|
32
33
|
*/
|
|
33
34
|
declare function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
34
35
|
|
|
36
|
+
type EnumType<T> = T[keyof T];
|
|
37
|
+
/** Input type enumeration */
|
|
38
|
+
declare const Input: {
|
|
39
|
+
/** Input is as a string */
|
|
40
|
+
readonly string: "string";
|
|
41
|
+
/** Input is as a file path */
|
|
42
|
+
readonly file: "file";
|
|
43
|
+
};
|
|
44
|
+
type InputType = EnumType<typeof Input>;
|
|
45
|
+
/** Output type enumeration */
|
|
46
|
+
declare const Output: {
|
|
47
|
+
/** Output bitmark string */
|
|
48
|
+
readonly bitmark: "bitmark";
|
|
49
|
+
/** Output JSON as a plain JS object, or a file */
|
|
50
|
+
readonly json: "json";
|
|
51
|
+
/** Output AST as a plain JS object, or a file */
|
|
52
|
+
readonly ast: "ast";
|
|
53
|
+
/** Output plain text as a string, or a file */
|
|
54
|
+
readonly text: "text";
|
|
55
|
+
};
|
|
56
|
+
type OutputType = EnumType<typeof Output>;
|
|
57
|
+
/** Input format enumeration */
|
|
58
|
+
declare const InputFormat$1: {
|
|
59
|
+
readonly bitmark: "bitmark";
|
|
60
|
+
readonly bitmarkText: "bitmarkText";
|
|
61
|
+
readonly plainText: "plainText";
|
|
62
|
+
readonly html: "html";
|
|
63
|
+
};
|
|
64
|
+
type InputFormatType = EnumType<typeof InputFormat$1>;
|
|
65
|
+
declare const BitmarkVersion: {
|
|
66
|
+
readonly v2: 2;
|
|
67
|
+
readonly v3: 3;
|
|
68
|
+
};
|
|
69
|
+
type BitmarkVersionType = EnumType<typeof BitmarkVersion>;
|
|
70
|
+
declare const CardSetVersion: {
|
|
71
|
+
readonly v1: 1;
|
|
72
|
+
readonly v2: 2;
|
|
73
|
+
};
|
|
74
|
+
type CardSetVersionType = EnumType<typeof CardSetVersion>;
|
|
75
|
+
declare const BitmarkParserType: {
|
|
76
|
+
readonly peggy: "peggy";
|
|
77
|
+
};
|
|
78
|
+
type BitmarkParserTypeType = EnumType<typeof BitmarkParserType>;
|
|
79
|
+
declare const InfoType$1: {
|
|
80
|
+
readonly list: "list";
|
|
81
|
+
readonly deprecated: "deprecated";
|
|
82
|
+
readonly all: "all";
|
|
83
|
+
readonly bit: "bit";
|
|
84
|
+
};
|
|
85
|
+
type InfoTypeType = EnumType<typeof InfoType$1>;
|
|
86
|
+
declare const InfoFormat$1: {
|
|
87
|
+
readonly text: "text";
|
|
88
|
+
readonly json: "json";
|
|
89
|
+
readonly pojo: "pojo";
|
|
90
|
+
};
|
|
91
|
+
type InfoFormatType = EnumType<typeof InfoFormat$1>;
|
|
92
|
+
declare const BodyTextFormat: {
|
|
93
|
+
readonly plainText: "text";
|
|
94
|
+
readonly latex: "latex";
|
|
95
|
+
readonly json: "json";
|
|
96
|
+
readonly xml: "xml";
|
|
97
|
+
readonly bitmarkPlusPlus: "bitmark++";
|
|
98
|
+
};
|
|
99
|
+
type BodyTextFormatType = EnumType<typeof BodyTextFormat>;
|
|
100
|
+
declare const TextLocation$1: {
|
|
101
|
+
readonly tag: "tag";
|
|
102
|
+
readonly body: "body";
|
|
103
|
+
};
|
|
104
|
+
type TextLocationType = EnumType<typeof TextLocation$1>;
|
|
105
|
+
/** Options for the output file (Node only) */
|
|
106
|
+
interface FileOptions {
|
|
107
|
+
/** Append to a file if true, otherwise overwrite */
|
|
108
|
+
append?: boolean;
|
|
109
|
+
/** Character encoding, defaults to 'utf8' */
|
|
110
|
+
encoding?: string;
|
|
111
|
+
}
|
|
112
|
+
/** Options for bitmark generation */
|
|
113
|
+
interface BitmarkOptions {
|
|
114
|
+
explicitTextFormat?: boolean;
|
|
115
|
+
prettifyJson?: boolean | number;
|
|
116
|
+
cardSetVersion?: CardSetVersionType;
|
|
117
|
+
spacesAroundValues?: number | boolean;
|
|
118
|
+
debugGenerationInline?: boolean;
|
|
119
|
+
noBreakscaping?: boolean;
|
|
120
|
+
}
|
|
121
|
+
/** Options for JSON generation */
|
|
122
|
+
interface JsonOptions {
|
|
123
|
+
enableWarnings?: boolean | number;
|
|
124
|
+
prettify?: boolean | number;
|
|
125
|
+
stringify?: boolean;
|
|
126
|
+
textAsPlainText?: boolean;
|
|
127
|
+
excludeUnknownProperties?: boolean;
|
|
128
|
+
debugGenerationInline?: boolean;
|
|
129
|
+
}
|
|
130
|
+
/** Options for bitmark text JSON generation */
|
|
131
|
+
interface TextJsonOptions {
|
|
132
|
+
prettify?: boolean | number;
|
|
133
|
+
}
|
|
134
|
+
/** Info options for the parser */
|
|
135
|
+
interface InfoOptions$1 {
|
|
136
|
+
type?: InfoTypeType;
|
|
137
|
+
bit?: string;
|
|
138
|
+
outputFormat?: InfoFormatType;
|
|
139
|
+
prettify?: boolean | number;
|
|
140
|
+
}
|
|
141
|
+
/** Conversion options for bitmark / JSON conversion */
|
|
142
|
+
interface ConvertOptions$1 {
|
|
143
|
+
bitmarkVersion?: BitmarkVersionType;
|
|
144
|
+
bitmarkParserType?: BitmarkParserTypeType;
|
|
145
|
+
inputFormat?: InputType;
|
|
146
|
+
outputFormat?: OutputType;
|
|
147
|
+
outputFile?: string;
|
|
148
|
+
fileOptions?: FileOptions;
|
|
149
|
+
bitmarkOptions?: BitmarkOptions;
|
|
150
|
+
jsonOptions?: JsonOptions;
|
|
151
|
+
}
|
|
152
|
+
/** Prettify options for bitmark / JSON prettify / validate */
|
|
153
|
+
interface UpgradeOptions {
|
|
154
|
+
bitmarkVersion?: BitmarkVersionType;
|
|
155
|
+
bitmarkParserType?: BitmarkParserTypeType;
|
|
156
|
+
inputFormat?: InputType;
|
|
157
|
+
outputFile?: string;
|
|
158
|
+
fileOptions?: FileOptions;
|
|
159
|
+
bitmarkOptions?: BitmarkOptions;
|
|
160
|
+
jsonOptions?: JsonOptions;
|
|
161
|
+
}
|
|
162
|
+
/** Conversion options for bitmark text / JSON conversion */
|
|
163
|
+
interface ConvertTextOptions {
|
|
164
|
+
textFormat?: BodyTextFormatType;
|
|
165
|
+
textLocation?: TextLocationType;
|
|
166
|
+
inputFormat?: InputType;
|
|
167
|
+
outputFile?: string;
|
|
168
|
+
fileOptions?: FileOptions;
|
|
169
|
+
jsonOptions?: TextJsonOptions;
|
|
170
|
+
}
|
|
171
|
+
/** Create AST options */
|
|
172
|
+
interface CreateAstOptions {
|
|
173
|
+
inputFormat?: InputType;
|
|
174
|
+
}
|
|
175
|
+
interface ExtractPlainTextOptions {
|
|
176
|
+
inputFormat?: InputFormatType;
|
|
177
|
+
}
|
|
178
|
+
/** Options for convertHtmlTable */
|
|
179
|
+
interface ConvertHtmlTableOptions {
|
|
180
|
+
inputFormat?: InputFormatType;
|
|
181
|
+
outputFormat?: OutputType | "html";
|
|
182
|
+
tableFormat?: string;
|
|
183
|
+
keepUnknownTags?: boolean;
|
|
184
|
+
noBreakscaping?: boolean;
|
|
185
|
+
outputFile?: string;
|
|
186
|
+
fileOptions?: FileOptions;
|
|
187
|
+
bitmarkOptions?: BitmarkOptions;
|
|
188
|
+
jsonOptions?: JsonOptions;
|
|
189
|
+
}
|
|
190
|
+
/** Breakscape options */
|
|
191
|
+
interface BreakscapeOptions$1 {
|
|
192
|
+
inputFormat?: InputType;
|
|
193
|
+
outputFile?: string;
|
|
194
|
+
fileOptions?: FileOptions;
|
|
195
|
+
textFormat?: BodyTextFormatType;
|
|
196
|
+
textLocation?: TextLocationType;
|
|
197
|
+
}
|
|
198
|
+
/** Unbreakscape options */
|
|
199
|
+
interface UnbreakscapeOptions {
|
|
200
|
+
inputFormat?: InputType;
|
|
201
|
+
outputFile?: string;
|
|
202
|
+
fileOptions?: FileOptions;
|
|
203
|
+
textFormat?: BodyTextFormatType;
|
|
204
|
+
textLocation?: TextLocationType;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
interface LegacyPseudoAst {
|
|
208
|
+
bits: unknown[];
|
|
209
|
+
}
|
|
210
|
+
declare function isPseudoAst(v: unknown): v is LegacyPseudoAst;
|
|
211
|
+
|
|
212
|
+
/** Classified input for the convert/upgrade pipeline (PLAN-126 F-10). */
|
|
213
|
+
interface ResolvedInput {
|
|
214
|
+
/** JSON-wrapper-array string (json/ast input) or bitmark source (bitmark input). */
|
|
215
|
+
source: string;
|
|
216
|
+
isBitmark: boolean;
|
|
217
|
+
}
|
|
218
|
+
declare class BitmarkParserGenerator {
|
|
219
|
+
/**
|
|
220
|
+
* Get the version of the library.
|
|
221
|
+
*
|
|
222
|
+
* Reports the @gmb/bitmark-parser version (not a bpg version string).
|
|
223
|
+
*/
|
|
224
|
+
version(): string;
|
|
225
|
+
/**
|
|
226
|
+
* Convert bitmark from bitmark to JSON, or JSON to bitmark (bpg-compatible).
|
|
227
|
+
*
|
|
228
|
+
* Input detection order matches bpg: AST → JSON → assume bitmark.
|
|
229
|
+
* Default output: bitmark input → json; json/ast input → bitmark.
|
|
230
|
+
*/
|
|
231
|
+
convert(input: string | unknown, options?: ConvertOptions$1): string | unknown | void;
|
|
232
|
+
/**
|
|
233
|
+
* Upgrade (prettify / canonicalize) bitmark or JSON to the latest version
|
|
234
|
+
* of itself (bpg-compatible `upgrade`).
|
|
235
|
+
*/
|
|
236
|
+
upgrade(input: string | unknown, options?: UpgradeOptions): string | unknown | void;
|
|
237
|
+
/**
|
|
238
|
+
* Get information about the bitmark language (bpg-compatible `info`).
|
|
239
|
+
*/
|
|
240
|
+
info(options?: InfoOptions$1): unknown;
|
|
241
|
+
/** Not supported: bpg-internal development tool. */
|
|
242
|
+
generateConfig(_options?: unknown): void;
|
|
243
|
+
/**
|
|
244
|
+
* Convert between HTML tables and bitmark tables (bpg-compatible
|
|
245
|
+
* `convertHtmlTable`).
|
|
246
|
+
*
|
|
247
|
+
* Backed by the core's schema-driven html mapping: HTML input has each
|
|
248
|
+
* `<table>` wrapped in the core's `<bitmark-bit>` envelope and parsed;
|
|
249
|
+
* bits input is emitted as html and the `<table>` fragments extracted
|
|
250
|
+
* (the envelope stripped). The markup *inside* `<table>` follows this
|
|
251
|
+
* parser's html mapping, which may differ from bpg's in detail.
|
|
252
|
+
*/
|
|
253
|
+
convertHtmlTable(input: string | unknown, options?: ConvertHtmlTableOptions): string | unknown | void;
|
|
254
|
+
/**
|
|
255
|
+
* Create a bit-JSON pseudo-AST from bitmark or JSON input (PLAN-126 §3.1).
|
|
256
|
+
*
|
|
257
|
+
* NOTE: the returned structure is the bit JSON (wrapper entries), not
|
|
258
|
+
* bpg's internal TS AST node model. It round-trips through `convert` but
|
|
259
|
+
* is not walkable with bpg's `Ast`/`NodeType`.
|
|
260
|
+
*/
|
|
261
|
+
createAst(input: unknown, options?: CreateAstOptions): LegacyPseudoAst;
|
|
262
|
+
/**
|
|
263
|
+
* Breakscape text (bpg-compatible `breakscapeText`).
|
|
264
|
+
*/
|
|
265
|
+
breakscapeText(input: string, options?: BreakscapeOptions$1): string | void;
|
|
266
|
+
/**
|
|
267
|
+
* Unbreakscape text (bpg-compatible `unbreakscapeText`).
|
|
268
|
+
*/
|
|
269
|
+
unbreakscapeText(input: string, options?: UnbreakscapeOptions): string | void;
|
|
270
|
+
/**
|
|
271
|
+
* Convert bitmark text ↔ text AST (bpg-compatible `convertText`).
|
|
272
|
+
*
|
|
273
|
+
* Direction is auto-detected: TextAst (JSON) input generates bitmark
|
|
274
|
+
* text; anything else parses as bitmark text and returns the TextAst
|
|
275
|
+
* (plain JS object; a string when `jsonOptions.prettify` is set).
|
|
276
|
+
*/
|
|
277
|
+
convertText(input: string | unknown, options?: ConvertTextOptions): string | unknown | void;
|
|
278
|
+
/**
|
|
279
|
+
* Convert a text AST to plain text (bpg-compatible `textAstToPlainText`).
|
|
280
|
+
*/
|
|
281
|
+
textAstToPlainText(textAst: unknown, _options?: ExtractPlainTextOptions): string;
|
|
282
|
+
/**
|
|
283
|
+
* Extract plain text from bitmark or bitmark JSON (bpg-compatible).
|
|
284
|
+
*/
|
|
285
|
+
extractPlainText(input: string | unknown, options?: ExtractPlainTextOptions): string;
|
|
286
|
+
/** If `s` parses as a TextAst JSON array, return it. */
|
|
287
|
+
private parseTextAstString;
|
|
288
|
+
/**
|
|
289
|
+
* Resolve bpg input (string | file path | JSON value | pseudo-AST) to a
|
|
290
|
+
* source string for the WASM core, classified per bpg's detection order:
|
|
291
|
+
* AST → JSON → assume bitmark (PLAN-126 F-10).
|
|
292
|
+
*/
|
|
293
|
+
protected resolveInput(input: unknown, inputFormat: string | undefined): ResolvedInput;
|
|
294
|
+
/**
|
|
295
|
+
* Normalise the JSON shapes bpg accepts to a bits/entries array:
|
|
296
|
+
* wrapper array, `{ bits: [...] }` AST envelope, single `{ bit: ... }`
|
|
297
|
+
* wrapper, or a bare bit object (`{ type: ... }`).
|
|
298
|
+
*/
|
|
299
|
+
private jsonEntries;
|
|
300
|
+
/**
|
|
301
|
+
* Normalise a pseudo-AST bits entry to a `{ bit, parser? }` wrapper.
|
|
302
|
+
* `Builder.buildBit` returns bare bit JSON (with any parser metadata
|
|
303
|
+
* attached under a non-enumerable symbol); parsed forward output is
|
|
304
|
+
* already wrapper-shaped.
|
|
305
|
+
*/
|
|
306
|
+
private toWrapperEntry;
|
|
307
|
+
/** bpg parity: read `input` as a file when it names one (Node only). */
|
|
308
|
+
protected maybeReadFile(input: string, inputFormat: string | undefined): string;
|
|
309
|
+
/** bpg parity: writing a file is impossible in the browser. */
|
|
310
|
+
protected checkBrowserFileWrite(outputFile: string | undefined): void;
|
|
311
|
+
/** Return `data`, or write it to `outputFile` (returning void), as bpg does. */
|
|
312
|
+
protected deliver(data: string, outputFile?: string, fileOptions?: FileOptions): string | void;
|
|
313
|
+
/** The core reports failures as `error:`-prefixed strings; bpg throws. */
|
|
314
|
+
protected throwOnError(out: string): void;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Direct bitmark text parser (bpg-compatible `bitmarkTextParse`):
|
|
318
|
+
* bitmark text → TextAst array.
|
|
319
|
+
*/
|
|
320
|
+
declare function bitmarkTextParse(text: string): unknown[];
|
|
321
|
+
|
|
322
|
+
type BitTypeType = string;
|
|
323
|
+
type TextFormatType = string;
|
|
324
|
+
type ResourceTypeType = string;
|
|
325
|
+
type TextMarkTypeType = string;
|
|
326
|
+
type TextNodeTypeType = string;
|
|
327
|
+
type ConfigKeyType = string;
|
|
328
|
+
interface ParserLocation {
|
|
329
|
+
offset: number;
|
|
330
|
+
line: number;
|
|
331
|
+
column: number;
|
|
332
|
+
}
|
|
333
|
+
interface ParserError {
|
|
334
|
+
message: string;
|
|
335
|
+
text?: string;
|
|
336
|
+
location?: {
|
|
337
|
+
start: ParserLocation;
|
|
338
|
+
end: ParserLocation;
|
|
339
|
+
};
|
|
340
|
+
original?: {
|
|
341
|
+
text?: string;
|
|
342
|
+
location?: {
|
|
343
|
+
start: ParserLocation;
|
|
344
|
+
end: ParserLocation;
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
interface ParserInfo {
|
|
349
|
+
version?: string;
|
|
350
|
+
bitmarkVersion?: string;
|
|
351
|
+
textParserVersion?: string;
|
|
352
|
+
warnings?: ParserError[];
|
|
353
|
+
errors?: ParserError[];
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
interface BuildBitOptions {
|
|
357
|
+
cardSet?: {
|
|
358
|
+
sideNo: number;
|
|
359
|
+
variantNo: number;
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
declare class Builder {
|
|
363
|
+
/**
|
|
364
|
+
* Build bitmark AST envelope (bpg-compatible `buildBitmark`).
|
|
365
|
+
*/
|
|
366
|
+
buildBitmark(data: {
|
|
367
|
+
bits?: unknown[];
|
|
368
|
+
errors?: ParserError[];
|
|
369
|
+
}): LegacyPseudoAst;
|
|
370
|
+
/**
|
|
371
|
+
* Build a bit (bpg-compatible `buildBit`).
|
|
372
|
+
*
|
|
373
|
+
* Accepts the full bpg data shape (flat, ~250 optional fields, values in
|
|
374
|
+
* the JSON model types). Returns the normalized bit JSON. Throws
|
|
375
|
+
* `No config found for bit: X` for unknown bit types, as bpg does.
|
|
376
|
+
*
|
|
377
|
+
* NOTE (documented divergences from bpg):
|
|
378
|
+
* - the return value is bit JSON, not bpg's internal AST node model;
|
|
379
|
+
* - `resourceType` (an inference hint in bpg) is not carried into the
|
|
380
|
+
* JSON — the attached `resource` object is authoritative;
|
|
381
|
+
* - more than one entry in `resources` passes through under a
|
|
382
|
+
* `resources` key (kept visible, not silently dropped) — the canonical
|
|
383
|
+
* single attachment is `resource`.
|
|
384
|
+
*/
|
|
385
|
+
buildBit(data: Record<string, unknown>, _options?: BuildBitOptions): Record<string, unknown>;
|
|
386
|
+
/**
|
|
387
|
+
* Build a highlight body bit (bpg-compatible `buildHighlight`).
|
|
388
|
+
* Shapes the HighlightJson body-bit; unset optionals are omitted.
|
|
389
|
+
*/
|
|
390
|
+
buildHighlight(_context: unknown, data: Record<string, unknown> | undefined): Record<string, unknown> | undefined;
|
|
391
|
+
/**
|
|
392
|
+
* bpg's builder parses string-valued JsonText fields as bitmark text
|
|
393
|
+
* (inline marks become TextAst marks); the composer would otherwise treat
|
|
394
|
+
* them as literal text. Converts top-level JsonText fields in place.
|
|
395
|
+
* Nested (card-content) strings are left literal — documented divergence.
|
|
396
|
+
*/
|
|
397
|
+
private parseStringTexts;
|
|
398
|
+
/** Throw bpg's exact unknown-bit-type error (`Config.getBitConfig` parity). */
|
|
399
|
+
private assertKnownBitType;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
type ResourceMethod = (context: unknown, data: Record<string, unknown> | undefined, __typeAlias?: string) => Record<string, unknown> | undefined;
|
|
403
|
+
/** bpg-compatible ResourceBuilder: 17 `<family>Resource(context, data)` methods
|
|
404
|
+
* plus the generic `resourceFromResourceJson` / `resourceFromResourceDataJson`. */
|
|
405
|
+
declare class ResourceBuilder {
|
|
406
|
+
/**
|
|
407
|
+
* Normalise existing ResourceJson wrapper(s) (bpg-compatible).
|
|
408
|
+
* Unknown resource types are dropped (bpg parity: it skips invalid types).
|
|
409
|
+
*/
|
|
410
|
+
resourceFromResourceJson(_context: unknown, resource?: Record<string, unknown> | Record<string, unknown>[]): unknown;
|
|
411
|
+
/**
|
|
412
|
+
* Build a resource wrapper from a bare ResourceDataJson (bpg-compatible).
|
|
413
|
+
* `data` may also be a plain string (used as the url/src/body value).
|
|
414
|
+
*/
|
|
415
|
+
resourceFromResourceDataJson(context: unknown, type: string, data?: Record<string, unknown> | string): Record<string, unknown> | undefined;
|
|
416
|
+
imageResource: ResourceMethod;
|
|
417
|
+
imageLinkResource: ResourceMethod;
|
|
418
|
+
audioResource: ResourceMethod;
|
|
419
|
+
audioEmbedResource: ResourceMethod;
|
|
420
|
+
audioLinkResource: ResourceMethod;
|
|
421
|
+
videoResource: ResourceMethod;
|
|
422
|
+
videoEmbedResource: ResourceMethod;
|
|
423
|
+
videoLinkResource: ResourceMethod;
|
|
424
|
+
stillImageFilmEmbedResource: ResourceMethod;
|
|
425
|
+
stillImageFilmLinkResource: ResourceMethod;
|
|
426
|
+
articleResource: ResourceMethod;
|
|
427
|
+
documentResource: ResourceMethod;
|
|
428
|
+
documentEmbedResource: ResourceMethod;
|
|
429
|
+
documentLinkResource: ResourceMethod;
|
|
430
|
+
documentDownloadResource: ResourceMethod;
|
|
431
|
+
appLinkResource: ResourceMethod;
|
|
432
|
+
websiteLinkResource: ResourceMethod;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
/** Error thrown for bpg API members / options the legacy facade does not support. */
|
|
436
|
+
declare class LegacyUnsupportedError extends Error {
|
|
437
|
+
constructor(message: string);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/** Vendored from bpg v5.31.1 model/enum/TextMarkType.ts. */
|
|
441
|
+
declare const TextMarkType: {
|
|
442
|
+
readonly bold: "bold";
|
|
443
|
+
readonly light: "light";
|
|
444
|
+
readonly italic: "italic";
|
|
445
|
+
readonly highlight: "highlight";
|
|
446
|
+
readonly highlightOrange: "highlightOrange";
|
|
447
|
+
readonly highlightYellow: "highlightYellow";
|
|
448
|
+
readonly highlightGreen: "highlightGreen";
|
|
449
|
+
readonly highlightBlue: "highlightBlue";
|
|
450
|
+
readonly highlightPurple: "highlightPurple";
|
|
451
|
+
readonly highlightPink: "highlightPink";
|
|
452
|
+
readonly highlightBrown: "highlightBrown";
|
|
453
|
+
readonly highlightBlack: "highlightBlack";
|
|
454
|
+
readonly highlightWhite: "highlightWhite";
|
|
455
|
+
readonly highlightGray: "highlightGray";
|
|
456
|
+
readonly strike: "strike";
|
|
457
|
+
readonly subscript: "subscript";
|
|
458
|
+
readonly superscript: "superscript";
|
|
459
|
+
readonly ins: "ins";
|
|
460
|
+
readonly del: "del";
|
|
461
|
+
readonly underline: "underline";
|
|
462
|
+
readonly doubleUnderline: "doubleUnderline";
|
|
463
|
+
readonly circle: "circle";
|
|
464
|
+
readonly languageEmRed: "languageEmRed";
|
|
465
|
+
readonly languageEmOrange: "languageEmOrange";
|
|
466
|
+
readonly languageEmYellow: "languageEmYellow";
|
|
467
|
+
readonly languageEmGreen: "languageEmGreen";
|
|
468
|
+
readonly languageEmBlue: "languageEmBlue";
|
|
469
|
+
readonly languageEmPurple: "languageEmPurple";
|
|
470
|
+
readonly languageEmPink: "languageEmPink";
|
|
471
|
+
readonly languageEmBrown: "languageEmBrown";
|
|
472
|
+
readonly languageEmBlack: "languageEmBlack";
|
|
473
|
+
readonly languageEmWhite: "languageEmWhite";
|
|
474
|
+
readonly languageEmGray: "languageEmGray";
|
|
475
|
+
readonly languageEm: "languageEm";
|
|
476
|
+
readonly userUnderline: "userUnderline";
|
|
477
|
+
readonly userDoubleUnderline: "userDoubleUnderline";
|
|
478
|
+
readonly userStrike: "userStrike";
|
|
479
|
+
readonly userCircle: "userCircle";
|
|
480
|
+
readonly userHighlight: "userHighlight";
|
|
481
|
+
readonly notranslate: "notranslate";
|
|
482
|
+
readonly link: "link";
|
|
483
|
+
readonly ref: "ref";
|
|
484
|
+
readonly xref: "xref";
|
|
485
|
+
readonly extref: "extref";
|
|
486
|
+
readonly footnote: "footnote";
|
|
487
|
+
readonly footnoteStar: "footnote*";
|
|
488
|
+
readonly symbol: "symbol";
|
|
489
|
+
readonly var: "var";
|
|
490
|
+
readonly code: "code";
|
|
491
|
+
readonly timer: "timer";
|
|
492
|
+
readonly duration: "duration";
|
|
493
|
+
readonly color: "color";
|
|
494
|
+
readonly colorPicker: "colorPicker";
|
|
495
|
+
readonly comment: "comment";
|
|
496
|
+
};
|
|
497
|
+
/** Vendored from bpg v5.31.1 model/enum/TextNodeType.ts. */
|
|
498
|
+
declare const TextNodeType: {
|
|
499
|
+
readonly text: "text";
|
|
500
|
+
readonly hardBreak: "hardBreak";
|
|
501
|
+
readonly paragraph: "paragraph";
|
|
502
|
+
readonly heading: "heading";
|
|
503
|
+
readonly section: "section";
|
|
504
|
+
readonly noBulletList: "noBulletList";
|
|
505
|
+
readonly bulletList: "bulletList";
|
|
506
|
+
readonly orderedList: "orderedList";
|
|
507
|
+
readonly orderedListRoman: "orderedListRoman";
|
|
508
|
+
readonly orderedListRomanLower: "orderedListRomanLower";
|
|
509
|
+
readonly letteredList: "letteredList";
|
|
510
|
+
readonly letteredListLower: "letteredListLower";
|
|
511
|
+
readonly taskList: "taskList";
|
|
512
|
+
readonly listItem: "listItem";
|
|
513
|
+
readonly taskItem: "taskItem";
|
|
514
|
+
readonly image: "image";
|
|
515
|
+
readonly imageInline: "imageInline";
|
|
516
|
+
readonly codeBlock: "codeBlock";
|
|
517
|
+
readonly latex: "latex";
|
|
518
|
+
readonly gap: "gap";
|
|
519
|
+
readonly select: "select";
|
|
520
|
+
readonly highlight: "highlight";
|
|
521
|
+
readonly mark: "mark";
|
|
522
|
+
};
|
|
523
|
+
/**
|
|
524
|
+
* bpg-compatible `BitType` enum object, built lazily from the core's
|
|
525
|
+
* config (`info`) rather than a hardcoded list. Keys are the camelCase of
|
|
526
|
+
* the bit names, exactly as bpg derives them.
|
|
527
|
+
*/
|
|
528
|
+
declare const BitType: Record<string, string>;
|
|
529
|
+
/** bpg `NodeType` — names bpg's internal AST nodes; the legacy AST is bit JSON. */
|
|
530
|
+
declare const NodeType: Record<string, string>;
|
|
531
|
+
/** bpg `BoundingBoxIndex` — bpg-internal utility. */
|
|
532
|
+
declare const BoundingBoxIndex: Record<string, string>;
|
|
533
|
+
|
|
534
|
+
/** bpg `Ast` walker — unsupported (PLAN-126 decision Q-7). */
|
|
535
|
+
declare const Ast: new (...args: unknown[]) => never;
|
|
536
|
+
declare const BitmarkGenerator: new (...args: unknown[]) => never;
|
|
537
|
+
declare const BitmarkStringGenerator: new (...args: unknown[]) => never;
|
|
538
|
+
declare const BitmarkFileGenerator: new (...args: unknown[]) => never;
|
|
539
|
+
declare const JsonGenerator: new (...args: unknown[]) => never;
|
|
540
|
+
declare const JsonStringGenerator: new (...args: unknown[]) => never;
|
|
541
|
+
declare const JsonFileGenerator: new (...args: unknown[]) => never;
|
|
542
|
+
declare const HtmlTableGenerator: new (...args: unknown[]) => never;
|
|
543
|
+
declare const HtmlTableParser: new (...args: unknown[]) => never;
|
|
544
|
+
declare const BitmarkParser: new (...args: unknown[]) => never;
|
|
545
|
+
declare const JsonParser: new (...args: unknown[]) => never;
|
|
546
|
+
declare const StringWriter: new (...args: unknown[]) => never;
|
|
547
|
+
declare const FileWriter: new (...args: unknown[]) => never;
|
|
548
|
+
declare const StreamWriter: new (...args: unknown[]) => never;
|
|
549
|
+
|
|
550
|
+
type JsonText = string | TextAst;
|
|
551
|
+
type TextAst = TextNode[];
|
|
552
|
+
interface TextNode {
|
|
553
|
+
type: TextNodeTypeType;
|
|
554
|
+
marks?: TextMark[];
|
|
555
|
+
text?: string;
|
|
556
|
+
content?: TextNode[];
|
|
557
|
+
parent?: TextNodeTypeType;
|
|
558
|
+
attrs?: TextNodeAttibutes;
|
|
559
|
+
}
|
|
560
|
+
interface TextMark {
|
|
561
|
+
type: TextMarkTypeType;
|
|
562
|
+
attrs?: TextMarkAttibutes;
|
|
563
|
+
}
|
|
564
|
+
interface LinkMark {
|
|
565
|
+
type: 'link';
|
|
566
|
+
attrs?: LinkMarkAttibutes;
|
|
567
|
+
}
|
|
568
|
+
interface CommentMark {
|
|
569
|
+
type: 'comment';
|
|
570
|
+
comment: string;
|
|
571
|
+
}
|
|
572
|
+
interface RefMark {
|
|
573
|
+
type: 'ref';
|
|
574
|
+
attrs?: RefMarkAttibutes;
|
|
575
|
+
}
|
|
576
|
+
interface XRefMark {
|
|
577
|
+
type: 'xref';
|
|
578
|
+
attrs?: XRefMarkAttibutes;
|
|
579
|
+
}
|
|
580
|
+
interface ExtRefMark {
|
|
581
|
+
type: 'extref';
|
|
582
|
+
attrs?: ExtRefMarkAttibutes;
|
|
583
|
+
}
|
|
584
|
+
interface FootnoteMark {
|
|
585
|
+
type: 'footnote';
|
|
586
|
+
attrs?: FootnoteAttibutes;
|
|
587
|
+
}
|
|
588
|
+
interface SymbolMark {
|
|
589
|
+
type: 'symbol';
|
|
590
|
+
attrs?: SymbolMarkAttibutes;
|
|
591
|
+
}
|
|
592
|
+
interface HeadingTextNode extends TextNode {
|
|
593
|
+
type: 'heading';
|
|
594
|
+
attrs?: HeadingTextNodeAttributes;
|
|
595
|
+
}
|
|
596
|
+
interface SectionTextNode extends TextNode {
|
|
597
|
+
type: 'heading';
|
|
598
|
+
section: string;
|
|
599
|
+
}
|
|
600
|
+
interface TaskItemTextNode extends TextNode {
|
|
601
|
+
type: 'taskItem';
|
|
602
|
+
attrs?: TaskItemTextNodeAttributes;
|
|
603
|
+
}
|
|
604
|
+
interface ImageTextNode extends TextNode {
|
|
605
|
+
type: 'image';
|
|
606
|
+
attrs?: ImageTextNodeAttributes;
|
|
607
|
+
}
|
|
608
|
+
interface ImageInlineTextNode extends TextNode {
|
|
609
|
+
type: 'imageInline';
|
|
610
|
+
attrs?: ImageTextNodeAttributes;
|
|
611
|
+
}
|
|
612
|
+
interface CodeBlockTextNode extends TextNode {
|
|
613
|
+
type: 'codeBlock';
|
|
614
|
+
attrs?: CodeBlockTextNodeAttributes;
|
|
615
|
+
}
|
|
616
|
+
interface LatexTextNode extends TextNode {
|
|
617
|
+
type: 'latex';
|
|
618
|
+
attrs?: LatexTextNodeAttributes;
|
|
619
|
+
}
|
|
620
|
+
interface ListTextNode extends TextNode {
|
|
621
|
+
type: 'noBulletList' | 'bulletList' | 'orderedList' | 'orderedListRoman' | 'orderedListRomanLower' | 'letteredList' | 'letteredListLower';
|
|
622
|
+
attrs?: ListTextNodeAttributes;
|
|
623
|
+
}
|
|
624
|
+
interface TextNodeAttibutes {
|
|
625
|
+
section: string;
|
|
626
|
+
}
|
|
627
|
+
interface HeadingTextNodeAttributes extends TextNodeAttibutes {
|
|
628
|
+
level: number;
|
|
629
|
+
}
|
|
630
|
+
interface TaskItemTextNodeAttributes extends TextNodeAttibutes {
|
|
631
|
+
checked: boolean;
|
|
632
|
+
}
|
|
633
|
+
interface ImageTextNodeAttributes extends TextNodeAttibutes, MediaAttributes {
|
|
634
|
+
}
|
|
635
|
+
interface CodeBlockTextNodeAttributes extends TextNodeAttibutes {
|
|
636
|
+
language: string;
|
|
637
|
+
}
|
|
638
|
+
interface LatexTextNodeAttributes extends TextNodeAttibutes {
|
|
639
|
+
formula: string;
|
|
640
|
+
}
|
|
641
|
+
interface ListTextNodeAttributes extends TextNodeAttibutes {
|
|
642
|
+
start: number;
|
|
643
|
+
}
|
|
644
|
+
interface TextMarkAttibutes {
|
|
645
|
+
}
|
|
646
|
+
interface LinkMarkAttibutes extends TextMarkAttibutes {
|
|
647
|
+
href: string;
|
|
648
|
+
target: string;
|
|
649
|
+
}
|
|
650
|
+
interface RefMarkAttibutes extends TextMarkAttibutes {
|
|
651
|
+
reference: string;
|
|
652
|
+
}
|
|
653
|
+
interface XRefMarkAttibutes extends TextMarkAttibutes {
|
|
654
|
+
xref: string;
|
|
655
|
+
reference: string;
|
|
656
|
+
}
|
|
657
|
+
interface ExtRefMarkAttibutes extends TextMarkAttibutes, MediaAttributes {
|
|
658
|
+
extref: string;
|
|
659
|
+
references: string[];
|
|
660
|
+
provider: string;
|
|
661
|
+
}
|
|
662
|
+
interface FootnoteAttibutes extends TextMarkAttibutes {
|
|
663
|
+
content: TextNode[];
|
|
664
|
+
}
|
|
665
|
+
interface SymbolMarkAttibutes extends TextMarkAttibutes, MediaAttributes {
|
|
666
|
+
}
|
|
667
|
+
interface MediaAttributes {
|
|
668
|
+
src: string;
|
|
669
|
+
alt: string | null;
|
|
670
|
+
title: string | null;
|
|
671
|
+
textAlign: string;
|
|
672
|
+
width: string | number | null;
|
|
673
|
+
height: string | number | null;
|
|
674
|
+
class: string;
|
|
675
|
+
comment: string;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
interface BodyBitsJson {
|
|
679
|
+
[key: string]: BodyBitJson;
|
|
680
|
+
}
|
|
681
|
+
type BodyBitJson = TextNode | GapJson | MarkJson | SelectJson | HighlightJson;
|
|
682
|
+
interface BaseBodyBitJson {
|
|
683
|
+
type: string;
|
|
684
|
+
item: JsonText;
|
|
685
|
+
lead: JsonText;
|
|
686
|
+
hint: JsonText;
|
|
687
|
+
instruction: JsonText;
|
|
688
|
+
isExample: boolean;
|
|
689
|
+
example: ExampleJson;
|
|
690
|
+
__defaultExample?: ExampleJson;
|
|
691
|
+
attrs: Record<string, unknown>;
|
|
692
|
+
}
|
|
693
|
+
interface GapJson extends BaseBodyBitJson {
|
|
694
|
+
type: 'gap';
|
|
695
|
+
solutions: string[];
|
|
696
|
+
item: JsonText;
|
|
697
|
+
lead: JsonText;
|
|
698
|
+
hint: JsonText;
|
|
699
|
+
instruction: JsonText;
|
|
700
|
+
isCaseSensitive: boolean;
|
|
701
|
+
isExample: boolean;
|
|
702
|
+
example: ExampleJson;
|
|
703
|
+
__solutionsAst?: TextAst[];
|
|
704
|
+
__isDefaultExample?: boolean;
|
|
705
|
+
__defaultExample?: ExampleJson;
|
|
706
|
+
}
|
|
707
|
+
interface MarkJson extends BaseBodyBitJson {
|
|
708
|
+
type: 'mark';
|
|
709
|
+
solution: string;
|
|
710
|
+
mark: string;
|
|
711
|
+
isExample: boolean;
|
|
712
|
+
example: ExampleJson;
|
|
713
|
+
__isDefaultExample?: boolean;
|
|
714
|
+
__defaultExample?: ExampleJson;
|
|
715
|
+
}
|
|
716
|
+
interface SelectJson extends BaseBodyBitJson {
|
|
717
|
+
type: 'select';
|
|
718
|
+
options: SelectOptionJson[];
|
|
719
|
+
prefix: string;
|
|
720
|
+
postfix: string;
|
|
721
|
+
isExample: boolean;
|
|
722
|
+
__hintString?: string;
|
|
723
|
+
__instructionString?: string;
|
|
724
|
+
}
|
|
725
|
+
interface SelectOptionJson {
|
|
726
|
+
text: string;
|
|
727
|
+
isCorrect: boolean;
|
|
728
|
+
item: JsonText;
|
|
729
|
+
lead: JsonText;
|
|
730
|
+
hint: JsonText;
|
|
731
|
+
instruction: JsonText;
|
|
732
|
+
isExample: boolean;
|
|
733
|
+
example: ExampleJson;
|
|
734
|
+
__isDefaultExample?: boolean;
|
|
735
|
+
__defaultExample?: ExampleJson;
|
|
736
|
+
}
|
|
737
|
+
interface HighlightJson extends BaseBodyBitJson {
|
|
738
|
+
type: 'highlight';
|
|
739
|
+
texts: HighlightTextJson[];
|
|
740
|
+
prefix: string;
|
|
741
|
+
postfix: string;
|
|
742
|
+
}
|
|
743
|
+
interface HighlightTextJson {
|
|
744
|
+
text: string;
|
|
745
|
+
isHighlighted: boolean;
|
|
746
|
+
isCorrect: boolean;
|
|
747
|
+
item: JsonText;
|
|
748
|
+
lead: JsonText;
|
|
749
|
+
hint: JsonText;
|
|
750
|
+
instruction: JsonText;
|
|
751
|
+
isExample: boolean;
|
|
752
|
+
example: ExampleJson;
|
|
753
|
+
__isDefaultExample?: boolean;
|
|
754
|
+
__defaultExample?: ExampleJson;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
type ResourceDataJson = ImageResourceJson & ImageResponsiveResourceJson & ImageLinkResourceJson & AudioResourceJson & AudioEmbedResourceJson & AudioLinkResourceJson & VideoResourceJson & VideoEmbedResourceJson & VideoLinkResourceJson & StillImageFilmResourceJson & StillImageFilmEmbedResourceJson & StillImageFilmLinkResourceJson & ArticleResourceJson & DocumentResourceJson & DocumentEmbedResourceJson & DocumentLinkResourceJson & DocumentDownloadResourceJson & AppLinkResourceJson & WebsiteLinkResourceJson;
|
|
758
|
+
type ResourceJson = ImageResourceWrapperJson | ImageResponsiveResourceWrapperJson | ImageLinkResourceWrapperJson | AudioResourceWrapperJson | AudioEmbedResourceWrapperJson | AudioLinkResourceWrapperJson | VideoResourceWrapperJson | VideoEmbedResourceWrapperJson | VideoLinkResourceWrapperJson | StillImageFilmResourceWrapperJson | StillImageFilmEmbedResourceWrapperJson | StillImageFilmLinkResourceWrapperJson | ArticleResourceWrapperJson | DocumentResourceWrapperJson | DocumentEmbedResourceWrapperJson | DocumentLinkResourceWrapperJson | DocumentDownloadResourceWrapperJson | AppLinkResourceWrapperJson | WebsiteLinkResourceWrapperJson;
|
|
759
|
+
interface ResourceWrapperJson {
|
|
760
|
+
type: ResourceTypeType;
|
|
761
|
+
__typeAlias: ResourceTypeType;
|
|
762
|
+
__configKey: ConfigKeyType;
|
|
763
|
+
__invalid?: boolean;
|
|
764
|
+
__excessResource?: boolean;
|
|
765
|
+
}
|
|
766
|
+
interface ImageResourceWrapperJson extends ResourceWrapperJson {
|
|
767
|
+
type: 'image';
|
|
768
|
+
image: ImageResourceJson;
|
|
769
|
+
}
|
|
770
|
+
interface ImageResponsiveResourceWrapperJson extends ResourceWrapperJson {
|
|
771
|
+
type: 'image-responsive';
|
|
772
|
+
imagePortrait: ImageResourceJson;
|
|
773
|
+
imageLandscape: ImageResourceJson;
|
|
774
|
+
}
|
|
775
|
+
interface ImageLinkResourceWrapperJson extends ResourceWrapperJson {
|
|
776
|
+
type: 'image-link';
|
|
777
|
+
imageLink: ImageLinkResourceJson;
|
|
778
|
+
}
|
|
779
|
+
interface AudioResourceWrapperJson extends ResourceWrapperJson {
|
|
780
|
+
type: 'audio';
|
|
781
|
+
audio: AudioResourceJson;
|
|
782
|
+
}
|
|
783
|
+
interface AudioEmbedResourceWrapperJson extends ResourceWrapperJson {
|
|
784
|
+
type: 'audio-embed';
|
|
785
|
+
audioEmbed: AudioEmbedResourceJson;
|
|
786
|
+
}
|
|
787
|
+
interface AudioLinkResourceWrapperJson extends ResourceWrapperJson {
|
|
788
|
+
type: 'audio-link';
|
|
789
|
+
audioLink: AudioLinkResourceJson;
|
|
790
|
+
}
|
|
791
|
+
interface VideoResourceWrapperJson extends ResourceWrapperJson {
|
|
792
|
+
type: 'video';
|
|
793
|
+
video: VideoResourceJson;
|
|
794
|
+
}
|
|
795
|
+
interface VideoEmbedResourceWrapperJson extends ResourceWrapperJson {
|
|
796
|
+
type: 'video-embed';
|
|
797
|
+
videoEmbed: VideoEmbedResourceJson;
|
|
798
|
+
}
|
|
799
|
+
interface VideoLinkResourceWrapperJson extends ResourceWrapperJson {
|
|
800
|
+
type: 'video-link';
|
|
801
|
+
videoLink: VideoLinkResourceJson;
|
|
802
|
+
}
|
|
803
|
+
interface StillImageFilmResourceWrapperJson extends ResourceWrapperJson {
|
|
804
|
+
type: 'still-image-film';
|
|
805
|
+
image: ImageResourceJson;
|
|
806
|
+
audio: AudioResourceJson;
|
|
807
|
+
}
|
|
808
|
+
interface StillImageFilmEmbedResourceWrapperJson extends ResourceWrapperJson {
|
|
809
|
+
type: 'still-image-film-embed';
|
|
810
|
+
stillImageFilmEmbed: StillImageFilmEmbedResourceJson;
|
|
811
|
+
}
|
|
812
|
+
interface StillImageFilmLinkResourceWrapperJson extends ResourceWrapperJson {
|
|
813
|
+
type: 'still-image-film-link';
|
|
814
|
+
stillImageFilmLink: StillImageFilmLinkResourceJson;
|
|
815
|
+
}
|
|
816
|
+
interface ArticleResourceWrapperJson extends ResourceWrapperJson {
|
|
817
|
+
type: 'article';
|
|
818
|
+
article: ArticleResourceJson;
|
|
819
|
+
}
|
|
820
|
+
interface DocumentResourceWrapperJson extends ResourceWrapperJson {
|
|
821
|
+
type: 'document';
|
|
822
|
+
document: DocumentResourceJson;
|
|
823
|
+
}
|
|
824
|
+
interface DocumentEmbedResourceWrapperJson extends ResourceWrapperJson {
|
|
825
|
+
type: 'document-embed';
|
|
826
|
+
documentEmbed: DocumentEmbedResourceJson;
|
|
827
|
+
}
|
|
828
|
+
interface DocumentLinkResourceWrapperJson extends ResourceWrapperJson {
|
|
829
|
+
type: 'document-link';
|
|
830
|
+
documentLink: DocumentLinkResourceJson;
|
|
831
|
+
}
|
|
832
|
+
interface DocumentDownloadResourceWrapperJson extends ResourceWrapperJson {
|
|
833
|
+
type: 'document-download';
|
|
834
|
+
documentDownload: DocumentDownloadResourceJson;
|
|
835
|
+
}
|
|
836
|
+
interface AppLinkResourceWrapperJson extends ResourceWrapperJson {
|
|
837
|
+
type: 'app-link';
|
|
838
|
+
appLink: AppLinkResourceJson;
|
|
839
|
+
}
|
|
840
|
+
interface WebsiteLinkResourceWrapperJson extends ResourceWrapperJson {
|
|
841
|
+
type: 'website-link';
|
|
842
|
+
websiteLink: WebsiteLinkResourceJson;
|
|
843
|
+
}
|
|
844
|
+
interface BaseResourceJson {
|
|
845
|
+
license: string;
|
|
846
|
+
copyright: string;
|
|
847
|
+
provider: string;
|
|
848
|
+
showInIndex: boolean;
|
|
849
|
+
caption: JsonText;
|
|
850
|
+
search: string;
|
|
851
|
+
srcAlt: string[];
|
|
852
|
+
selected: boolean;
|
|
853
|
+
}
|
|
854
|
+
interface ImageResourceJson extends BaseResourceJson {
|
|
855
|
+
format: string;
|
|
856
|
+
src: string;
|
|
857
|
+
src1x: string;
|
|
858
|
+
src2x: string;
|
|
859
|
+
src3x: string;
|
|
860
|
+
src4x: string;
|
|
861
|
+
width: string | null;
|
|
862
|
+
height: string | null;
|
|
863
|
+
alt: string;
|
|
864
|
+
zoomDisabled: boolean;
|
|
865
|
+
}
|
|
866
|
+
interface ImageLinkResourceJson extends BaseResourceJson {
|
|
867
|
+
format: string;
|
|
868
|
+
url: string;
|
|
869
|
+
src1x: string;
|
|
870
|
+
src2x: string;
|
|
871
|
+
src3x: string;
|
|
872
|
+
src4x: string;
|
|
873
|
+
width: string | null;
|
|
874
|
+
height: string | null;
|
|
875
|
+
alt: string;
|
|
876
|
+
zoomDisabled: boolean;
|
|
877
|
+
}
|
|
878
|
+
interface ImageResponsiveResourceJson extends BaseResourceJson {
|
|
879
|
+
imagePortrait: ImageResourceJson;
|
|
880
|
+
imageLandscape: ImageResourceJson;
|
|
881
|
+
}
|
|
882
|
+
interface AudioResourceJson extends BaseResourceJson {
|
|
883
|
+
format: string;
|
|
884
|
+
src: string;
|
|
885
|
+
duration: number;
|
|
886
|
+
mute: boolean;
|
|
887
|
+
autoplay: boolean;
|
|
888
|
+
}
|
|
889
|
+
interface AudioEmbedResourceJson extends BaseResourceJson {
|
|
890
|
+
format: string;
|
|
891
|
+
src: string;
|
|
892
|
+
duration: number;
|
|
893
|
+
mute: boolean;
|
|
894
|
+
autoplay: boolean;
|
|
895
|
+
}
|
|
896
|
+
interface AudioLinkResourceJson extends BaseResourceJson {
|
|
897
|
+
format: string;
|
|
898
|
+
url: string;
|
|
899
|
+
duration: number;
|
|
900
|
+
mute: boolean;
|
|
901
|
+
autoplay: boolean;
|
|
902
|
+
}
|
|
903
|
+
interface VideoResourceJson extends BaseResourceJson {
|
|
904
|
+
format: string;
|
|
905
|
+
src: string;
|
|
906
|
+
width: string | null;
|
|
907
|
+
height: string | null;
|
|
908
|
+
duration: number;
|
|
909
|
+
mute: boolean;
|
|
910
|
+
autoplay: boolean;
|
|
911
|
+
allowSubtitles: boolean;
|
|
912
|
+
showSubtitles: boolean;
|
|
913
|
+
alt: string;
|
|
914
|
+
posterImage: ImageResourceJson;
|
|
915
|
+
thumbnails: ImageResourceJson[];
|
|
916
|
+
}
|
|
917
|
+
interface VideoEmbedResourceJson extends BaseResourceJson {
|
|
918
|
+
format: string;
|
|
919
|
+
url: string;
|
|
920
|
+
width: string | null;
|
|
921
|
+
height: string | null;
|
|
922
|
+
duration: number;
|
|
923
|
+
mute: boolean;
|
|
924
|
+
autoplay: boolean;
|
|
925
|
+
allowSubtitles: boolean;
|
|
926
|
+
showSubtitles: boolean;
|
|
927
|
+
alt: string;
|
|
928
|
+
posterImage: ImageResourceJson;
|
|
929
|
+
thumbnails: ImageResourceJson[];
|
|
930
|
+
}
|
|
931
|
+
interface VideoLinkResourceJson extends BaseResourceJson {
|
|
932
|
+
format: string;
|
|
933
|
+
url: string;
|
|
934
|
+
width: string | null;
|
|
935
|
+
height: string | null;
|
|
936
|
+
duration: number;
|
|
937
|
+
mute: boolean;
|
|
938
|
+
autoplay: boolean;
|
|
939
|
+
allowSubtitles: boolean;
|
|
940
|
+
showSubtitles: boolean;
|
|
941
|
+
alt: string;
|
|
942
|
+
posterImage: ImageResourceJson;
|
|
943
|
+
thumbnails: ImageResourceJson[];
|
|
944
|
+
}
|
|
945
|
+
interface StillImageFilmResourceJson extends BaseResourceJson {
|
|
946
|
+
image: ImageResourceJson;
|
|
947
|
+
audio: AudioResourceJson;
|
|
948
|
+
}
|
|
949
|
+
interface StillImageFilmEmbedResourceJson extends BaseResourceJson {
|
|
950
|
+
format: string;
|
|
951
|
+
url: string;
|
|
952
|
+
width: string | null;
|
|
953
|
+
height: string | null;
|
|
954
|
+
duration: number;
|
|
955
|
+
mute: boolean;
|
|
956
|
+
autoplay: boolean;
|
|
957
|
+
allowSubtitles: boolean;
|
|
958
|
+
showSubtitles: boolean;
|
|
959
|
+
alt: string;
|
|
960
|
+
posterImage: ImageResourceJson;
|
|
961
|
+
thumbnails: ImageResourceJson[];
|
|
962
|
+
}
|
|
963
|
+
interface StillImageFilmLinkResourceJson extends BaseResourceJson {
|
|
964
|
+
format: string;
|
|
965
|
+
url: string;
|
|
966
|
+
width: string | null;
|
|
967
|
+
height: string | null;
|
|
968
|
+
duration: number;
|
|
969
|
+
mute: boolean;
|
|
970
|
+
autoplay: boolean;
|
|
971
|
+
allowSubtitles: boolean;
|
|
972
|
+
showSubtitles: boolean;
|
|
973
|
+
alt: string;
|
|
974
|
+
posterImage: ImageResourceJson;
|
|
975
|
+
thumbnails: ImageResourceJson[];
|
|
976
|
+
}
|
|
977
|
+
interface ArticleResourceJson extends BaseResourceJson {
|
|
978
|
+
format: string;
|
|
979
|
+
body: string;
|
|
980
|
+
}
|
|
981
|
+
interface DocumentResourceJson extends BaseResourceJson {
|
|
982
|
+
format: string;
|
|
983
|
+
url: string;
|
|
984
|
+
}
|
|
985
|
+
interface DocumentEmbedResourceJson extends BaseResourceJson {
|
|
986
|
+
format: string;
|
|
987
|
+
url: string;
|
|
988
|
+
}
|
|
989
|
+
interface DocumentLinkResourceJson extends BaseResourceJson {
|
|
990
|
+
format: string;
|
|
991
|
+
url: string;
|
|
992
|
+
}
|
|
993
|
+
interface DocumentDownloadResourceJson extends BaseResourceJson {
|
|
994
|
+
format: string;
|
|
995
|
+
url: string;
|
|
996
|
+
}
|
|
997
|
+
interface AppLinkResourceJson extends BaseResourceJson {
|
|
998
|
+
url: string;
|
|
999
|
+
}
|
|
1000
|
+
interface WebsiteLinkResourceJson extends BaseResourceJson {
|
|
1001
|
+
url: string;
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
interface BitJson {
|
|
1005
|
+
type: string;
|
|
1006
|
+
originalType: string;
|
|
1007
|
+
bitLevel: number;
|
|
1008
|
+
format: string;
|
|
1009
|
+
id: string | string[];
|
|
1010
|
+
gUri: string;
|
|
1011
|
+
internalComment: string | string[];
|
|
1012
|
+
customerId: string;
|
|
1013
|
+
customerExternalId: string | string[];
|
|
1014
|
+
externalId: string | string[];
|
|
1015
|
+
spaceId: string | string[];
|
|
1016
|
+
padletId: string;
|
|
1017
|
+
jupyterId: string;
|
|
1018
|
+
jupyterExecutionCount: number;
|
|
1019
|
+
sourceRL: string;
|
|
1020
|
+
isPublic: boolean;
|
|
1021
|
+
isTemplate: boolean;
|
|
1022
|
+
isTemplateStripTheme: boolean;
|
|
1023
|
+
isEditable: boolean;
|
|
1024
|
+
needsValidation: boolean;
|
|
1025
|
+
validationDate: string;
|
|
1026
|
+
aiGenerated: boolean;
|
|
1027
|
+
machineTranslated: string;
|
|
1028
|
+
translationOf: string;
|
|
1029
|
+
spansPageBreak: boolean;
|
|
1030
|
+
searchIndex: string | string[];
|
|
1031
|
+
analyticsTag: string | string[];
|
|
1032
|
+
categoryTag: string | string[];
|
|
1033
|
+
topicTag: string | string[];
|
|
1034
|
+
reportTag: string | string[];
|
|
1035
|
+
altLangTag: string;
|
|
1036
|
+
feedbackEngine: string;
|
|
1037
|
+
feedbackType: string;
|
|
1038
|
+
disableFeedback: boolean;
|
|
1039
|
+
diffOp: string;
|
|
1040
|
+
diffRef: string;
|
|
1041
|
+
diffContext: string;
|
|
1042
|
+
diffTime: number;
|
|
1043
|
+
path: string;
|
|
1044
|
+
releaseVersion: string;
|
|
1045
|
+
releaseKind: string;
|
|
1046
|
+
releaseDate: string;
|
|
1047
|
+
iframeSrc: string;
|
|
1048
|
+
iframeName: string;
|
|
1049
|
+
ageRange: number | number[];
|
|
1050
|
+
lang: string;
|
|
1051
|
+
language: string | string[];
|
|
1052
|
+
computerLanguage: string;
|
|
1053
|
+
target: string | string[];
|
|
1054
|
+
slug: string;
|
|
1055
|
+
tag: string | string[];
|
|
1056
|
+
groupTag: GroupTagJson[];
|
|
1057
|
+
reductionTag: string | string[];
|
|
1058
|
+
bubbleTag: string | string[];
|
|
1059
|
+
extractorTag: string | string[];
|
|
1060
|
+
extractorInternal: string | string[];
|
|
1061
|
+
sourceBB?: number[] | number[][];
|
|
1062
|
+
bitFingerprint: string | string[];
|
|
1063
|
+
levelCEFRp: string;
|
|
1064
|
+
levelCEFR: string;
|
|
1065
|
+
levelILR: string;
|
|
1066
|
+
levelACTFL: string;
|
|
1067
|
+
icon: string;
|
|
1068
|
+
iconTag: string;
|
|
1069
|
+
colorTag: string | string[];
|
|
1070
|
+
flashcardSet: string | string[];
|
|
1071
|
+
subtype: string;
|
|
1072
|
+
bookAlias: string | string[];
|
|
1073
|
+
bookDiff: string;
|
|
1074
|
+
coverImage: string | string[];
|
|
1075
|
+
coverColor: string;
|
|
1076
|
+
backgroundImage: string | string[];
|
|
1077
|
+
publisher: string | string[];
|
|
1078
|
+
publisherName: string;
|
|
1079
|
+
publications: string | string[];
|
|
1080
|
+
relatedBook: string | string[];
|
|
1081
|
+
userFeedbackTranslationUrl: string;
|
|
1082
|
+
userFeedbackContentUrl: string;
|
|
1083
|
+
author: string | string[];
|
|
1084
|
+
subject: string | string[];
|
|
1085
|
+
date: string;
|
|
1086
|
+
dateEnd: string;
|
|
1087
|
+
location: string;
|
|
1088
|
+
theme: string | string[];
|
|
1089
|
+
kind: string;
|
|
1090
|
+
hasMarkAsDone: boolean;
|
|
1091
|
+
processHandIn: boolean;
|
|
1092
|
+
processHandInLocation: string;
|
|
1093
|
+
chatWithBook: boolean;
|
|
1094
|
+
chatWithBookBrainKey: string;
|
|
1095
|
+
currency: string;
|
|
1096
|
+
bookIsbn: string;
|
|
1097
|
+
bookAuthor: string;
|
|
1098
|
+
bookType: string;
|
|
1099
|
+
bookBindingType: string;
|
|
1100
|
+
bookNumberOfPages: string;
|
|
1101
|
+
bookRating: string;
|
|
1102
|
+
bookSeriesTitle: string;
|
|
1103
|
+
bookSeriesId: string;
|
|
1104
|
+
bookSeriesNumber: string;
|
|
1105
|
+
bookLanguage: string;
|
|
1106
|
+
bookPublishingDate: string;
|
|
1107
|
+
bookPublisher: string;
|
|
1108
|
+
bookTranslator: string;
|
|
1109
|
+
bookOriginalTitle: string;
|
|
1110
|
+
gmbExternalShop: string;
|
|
1111
|
+
gmbExternalShopItems: string | string[];
|
|
1112
|
+
action: string;
|
|
1113
|
+
showInIndex: boolean;
|
|
1114
|
+
refAuthor: string | string[];
|
|
1115
|
+
refBookTitle: string;
|
|
1116
|
+
refPublisher: string | string[];
|
|
1117
|
+
refPublicationYear: string;
|
|
1118
|
+
citationStyle: string;
|
|
1119
|
+
blockId: string;
|
|
1120
|
+
pageNo: number;
|
|
1121
|
+
x: number;
|
|
1122
|
+
y: number;
|
|
1123
|
+
width: string;
|
|
1124
|
+
height: string;
|
|
1125
|
+
index: number;
|
|
1126
|
+
classification: string;
|
|
1127
|
+
availableClassifications: string | string[];
|
|
1128
|
+
allowedBit: string | string[];
|
|
1129
|
+
authorFullName: string;
|
|
1130
|
+
authorPseudonym: string;
|
|
1131
|
+
authorTitle: string;
|
|
1132
|
+
authorJobTitle: string;
|
|
1133
|
+
tableFixedHeader: boolean;
|
|
1134
|
+
tableHeaderWhitespaceNoWrap: boolean;
|
|
1135
|
+
tableSearch: boolean;
|
|
1136
|
+
tableSort: boolean;
|
|
1137
|
+
tablePagination: boolean;
|
|
1138
|
+
tablePaginationLimit: number;
|
|
1139
|
+
tableHeight: number;
|
|
1140
|
+
tableWhitespaceNoWrap: boolean;
|
|
1141
|
+
tableAutoWidth: boolean;
|
|
1142
|
+
tableResizableColumns: boolean;
|
|
1143
|
+
tableColumnMinWidth: number;
|
|
1144
|
+
quizCountItems: boolean;
|
|
1145
|
+
quizStrikethroughSolutions: boolean;
|
|
1146
|
+
codeLineNumbers: boolean;
|
|
1147
|
+
codeMinimap: boolean;
|
|
1148
|
+
stripePricingTableId: string;
|
|
1149
|
+
stripePricingTableDescriptiveName: string;
|
|
1150
|
+
stripePublishableKey: string;
|
|
1151
|
+
thumbImage: string;
|
|
1152
|
+
scormSource: string;
|
|
1153
|
+
posterImage: string;
|
|
1154
|
+
focusX: number;
|
|
1155
|
+
focusY: number;
|
|
1156
|
+
pointerLeft: string;
|
|
1157
|
+
pointerTop: string;
|
|
1158
|
+
listItemIndent: number;
|
|
1159
|
+
backgroundWallpaper: ImageResourceWrapperJson;
|
|
1160
|
+
hasBookNavigation: boolean;
|
|
1161
|
+
duration: string;
|
|
1162
|
+
deeplink: string | string[];
|
|
1163
|
+
externalLink: string;
|
|
1164
|
+
externalLinkText: string;
|
|
1165
|
+
videoCallLink: string;
|
|
1166
|
+
vendorDashboardId: string;
|
|
1167
|
+
vendorSurveyId: string;
|
|
1168
|
+
vendorUrl: string;
|
|
1169
|
+
search: string;
|
|
1170
|
+
bot: string | string[];
|
|
1171
|
+
list: string | string[];
|
|
1172
|
+
layer: string | string[];
|
|
1173
|
+
layerRole: string | string[];
|
|
1174
|
+
textReference: string;
|
|
1175
|
+
isTracked: boolean;
|
|
1176
|
+
isInfoOnly: boolean;
|
|
1177
|
+
imageFirst: boolean;
|
|
1178
|
+
activityType: string;
|
|
1179
|
+
labelTrue: string;
|
|
1180
|
+
labelFalse: string;
|
|
1181
|
+
content2Buy: string;
|
|
1182
|
+
listPrice: string;
|
|
1183
|
+
customerProductId: string;
|
|
1184
|
+
customerProductShopLink: string;
|
|
1185
|
+
mailingList: string;
|
|
1186
|
+
buttonCaption: string;
|
|
1187
|
+
callToActionUrl: string;
|
|
1188
|
+
advertisingClickUrl: string;
|
|
1189
|
+
brandColor: string;
|
|
1190
|
+
brandColorName: string;
|
|
1191
|
+
caption: JsonText;
|
|
1192
|
+
quotedPerson: string;
|
|
1193
|
+
reasonableNumOfChars: number;
|
|
1194
|
+
resolved: boolean;
|
|
1195
|
+
resolvedDate: string;
|
|
1196
|
+
resolvedBy: string;
|
|
1197
|
+
handInAcceptFileType: string | string[];
|
|
1198
|
+
handInRequirement: string | string[];
|
|
1199
|
+
handInInstruction: string;
|
|
1200
|
+
maxCreatedBits: number;
|
|
1201
|
+
maxDisplayLevel: number;
|
|
1202
|
+
maxTocChapterLevel: number;
|
|
1203
|
+
allowPrint: string;
|
|
1204
|
+
printParentChapterLevel: number;
|
|
1205
|
+
printOnRequestCustomerId: string;
|
|
1206
|
+
printOnRequestProductId: string;
|
|
1207
|
+
sourceDocument: string;
|
|
1208
|
+
internalPrintPdf: string;
|
|
1209
|
+
hasPrintRestriction: boolean;
|
|
1210
|
+
enforceUpdateOverUserInput: boolean;
|
|
1211
|
+
extractorExtractionTimestamp: string[];
|
|
1212
|
+
tocResource: string | string[];
|
|
1213
|
+
tocContent: string | string[];
|
|
1214
|
+
page: string;
|
|
1215
|
+
platformBrandTarget: string;
|
|
1216
|
+
platformName: string;
|
|
1217
|
+
platformIcon: ImageResourceWrapperJson;
|
|
1218
|
+
platformLogo: ImageResourceWrapperJson;
|
|
1219
|
+
platformLogoMaxHeight: number;
|
|
1220
|
+
platformPrimaryColor: string;
|
|
1221
|
+
platformSecondaryColor: string;
|
|
1222
|
+
platformBackgroundColor: string;
|
|
1223
|
+
platformScrollbarColor: string;
|
|
1224
|
+
platformSelectionColor: string;
|
|
1225
|
+
platformSeparatorColor: string;
|
|
1226
|
+
platformPlaceholderColor: string;
|
|
1227
|
+
platformTextSelectionColor: string;
|
|
1228
|
+
platformButtonPrimaryColor: string;
|
|
1229
|
+
platformButtonBackgroundColor: string;
|
|
1230
|
+
platformMessageBackgroundColor: string;
|
|
1231
|
+
platformBackgroundImage: ImageResourceWrapperJson;
|
|
1232
|
+
platformBorderColor: string;
|
|
1233
|
+
platformSelectionTextColor: string;
|
|
1234
|
+
platformBaseLayerColor: string;
|
|
1235
|
+
platformMargin: number;
|
|
1236
|
+
platformBorderRadius: number;
|
|
1237
|
+
platformSelectionBorderRadius: number;
|
|
1238
|
+
platformNeedsShadow: boolean;
|
|
1239
|
+
productId: string | string[];
|
|
1240
|
+
product: string;
|
|
1241
|
+
productVideo: string;
|
|
1242
|
+
productFolder: string;
|
|
1243
|
+
technicalTerm: TechnicalTermJson;
|
|
1244
|
+
servings: ServingsJson;
|
|
1245
|
+
ratingLevelStart: RatingLevelStartEndJson;
|
|
1246
|
+
ratingLevelEnd: RatingLevelStartEndJson;
|
|
1247
|
+
ratingLevelSelected: number;
|
|
1248
|
+
book: string | BookJson[];
|
|
1249
|
+
title: JsonText;
|
|
1250
|
+
subtitle: JsonText;
|
|
1251
|
+
level: number;
|
|
1252
|
+
toc: boolean;
|
|
1253
|
+
progress: boolean;
|
|
1254
|
+
isCollapsible: boolean;
|
|
1255
|
+
anchor: string;
|
|
1256
|
+
reference: string | string[];
|
|
1257
|
+
referenceEnd: string;
|
|
1258
|
+
revealSolutions: boolean;
|
|
1259
|
+
item: JsonText;
|
|
1260
|
+
lead: JsonText;
|
|
1261
|
+
pageNumber: JsonText;
|
|
1262
|
+
marginNumber: JsonText;
|
|
1263
|
+
hint: JsonText;
|
|
1264
|
+
instruction: JsonText;
|
|
1265
|
+
isExample: boolean;
|
|
1266
|
+
example: ExampleJson;
|
|
1267
|
+
imageSource: ImageSourceJson;
|
|
1268
|
+
person: PersonJson;
|
|
1269
|
+
partner: PersonJson;
|
|
1270
|
+
marks: MarkConfigJson[];
|
|
1271
|
+
extraProperties: {
|
|
1272
|
+
[key: string]: unknown | unknown[];
|
|
1273
|
+
};
|
|
1274
|
+
imagePlaceholder: ImageResourceWrapperJson;
|
|
1275
|
+
previewImage: ImageResourceWrapperJson[];
|
|
1276
|
+
previewVideo: VideoResourceWrapperJson[];
|
|
1277
|
+
resource: ResourceJson;
|
|
1278
|
+
logos: ImageResourceWrapperJson[];
|
|
1279
|
+
images: ImageResourceWrapperJson[];
|
|
1280
|
+
body: JsonText | unknown;
|
|
1281
|
+
sampleSolution: string;
|
|
1282
|
+
additionalSolutions: string[];
|
|
1283
|
+
partialAnswer: string;
|
|
1284
|
+
elements: string[];
|
|
1285
|
+
statement: JsonText;
|
|
1286
|
+
isCorrect: boolean;
|
|
1287
|
+
cards: FlashcardJson[];
|
|
1288
|
+
definitions: DefinitionListItemJson[];
|
|
1289
|
+
descriptions: DefinitionListItemJson[];
|
|
1290
|
+
statements: StatementJson[];
|
|
1291
|
+
responses: ResponseJson[] | BotResponseJson[];
|
|
1292
|
+
feedbacks: FeedbackJson[];
|
|
1293
|
+
quizzes: QuizJson[];
|
|
1294
|
+
heading: HeadingJson;
|
|
1295
|
+
pairs: PairJson[];
|
|
1296
|
+
matrix: MatrixJson[];
|
|
1297
|
+
table: TableJson;
|
|
1298
|
+
tableExtended: TableExtendedJson;
|
|
1299
|
+
choices: ChoiceJson[];
|
|
1300
|
+
questions: QuestionJson[];
|
|
1301
|
+
ingredients: IngredientJson[];
|
|
1302
|
+
listItems: ListItemJson[];
|
|
1303
|
+
sections: ListItemJson[];
|
|
1304
|
+
bookReferences: BookReferenceJson[];
|
|
1305
|
+
footer: JsonText;
|
|
1306
|
+
placeholders: BodyBitsJson;
|
|
1307
|
+
}
|
|
1308
|
+
interface BookJson {
|
|
1309
|
+
book: string;
|
|
1310
|
+
reference: string;
|
|
1311
|
+
referenceEnd: string;
|
|
1312
|
+
}
|
|
1313
|
+
interface GroupTagJson {
|
|
1314
|
+
name: string;
|
|
1315
|
+
tags: string[];
|
|
1316
|
+
}
|
|
1317
|
+
interface ImageSourceJson {
|
|
1318
|
+
url: string;
|
|
1319
|
+
mockupId: string;
|
|
1320
|
+
size?: number;
|
|
1321
|
+
format?: string;
|
|
1322
|
+
trim?: boolean;
|
|
1323
|
+
}
|
|
1324
|
+
interface PersonJson {
|
|
1325
|
+
name: string;
|
|
1326
|
+
title: string;
|
|
1327
|
+
avatarImage: ImageResourceWrapperJson;
|
|
1328
|
+
}
|
|
1329
|
+
interface MarkConfigJson {
|
|
1330
|
+
mark: string;
|
|
1331
|
+
color: string;
|
|
1332
|
+
emphasis: string;
|
|
1333
|
+
}
|
|
1334
|
+
interface FlashcardJson {
|
|
1335
|
+
question: TextAndIconJson;
|
|
1336
|
+
answer: TextAndIconJson;
|
|
1337
|
+
alternativeAnswers: TextAndIconJson[];
|
|
1338
|
+
item: JsonText;
|
|
1339
|
+
lead: JsonText;
|
|
1340
|
+
hint: JsonText;
|
|
1341
|
+
instruction: JsonText;
|
|
1342
|
+
isExample: boolean;
|
|
1343
|
+
example: ExampleJson;
|
|
1344
|
+
__isDefaultExample?: boolean;
|
|
1345
|
+
__defaultExample?: ExampleJson;
|
|
1346
|
+
}
|
|
1347
|
+
interface DefinitionListItemJson {
|
|
1348
|
+
term: TextAndIconJson;
|
|
1349
|
+
definition: TextAndIconJson;
|
|
1350
|
+
alternativeDefinitions: TextAndIconJson[];
|
|
1351
|
+
item: JsonText;
|
|
1352
|
+
lead: JsonText;
|
|
1353
|
+
hint: JsonText;
|
|
1354
|
+
instruction: JsonText;
|
|
1355
|
+
isExample: boolean;
|
|
1356
|
+
example: ExampleJson;
|
|
1357
|
+
__isDefaultExample?: boolean;
|
|
1358
|
+
__defaultExample?: ExampleJson;
|
|
1359
|
+
}
|
|
1360
|
+
interface TextAndIconJson {
|
|
1361
|
+
text: JsonText;
|
|
1362
|
+
icon: ImageResourceWrapperJson;
|
|
1363
|
+
}
|
|
1364
|
+
interface StatementJson {
|
|
1365
|
+
statement: JsonText;
|
|
1366
|
+
isCorrect: boolean;
|
|
1367
|
+
item: JsonText;
|
|
1368
|
+
lead: JsonText;
|
|
1369
|
+
hint: JsonText;
|
|
1370
|
+
instruction: JsonText;
|
|
1371
|
+
isExample: boolean;
|
|
1372
|
+
example: ExampleJson;
|
|
1373
|
+
__isDefaultExample?: boolean;
|
|
1374
|
+
__defaultExample?: ExampleJson;
|
|
1375
|
+
}
|
|
1376
|
+
interface FeedbackChoiceJson {
|
|
1377
|
+
choice: string;
|
|
1378
|
+
requireReason: boolean;
|
|
1379
|
+
item: JsonText;
|
|
1380
|
+
lead: JsonText;
|
|
1381
|
+
hint: JsonText;
|
|
1382
|
+
instruction: JsonText;
|
|
1383
|
+
isExample: boolean;
|
|
1384
|
+
example: ExampleJson;
|
|
1385
|
+
__isDefaultExample?: boolean;
|
|
1386
|
+
__defaultExample?: ExampleJson;
|
|
1387
|
+
}
|
|
1388
|
+
interface FeedbackReasonJson {
|
|
1389
|
+
item: JsonText;
|
|
1390
|
+
lead: JsonText;
|
|
1391
|
+
hint: JsonText;
|
|
1392
|
+
instruction: JsonText;
|
|
1393
|
+
text: string;
|
|
1394
|
+
reasonableNumOfChars: number;
|
|
1395
|
+
isExample: boolean;
|
|
1396
|
+
example: ExampleJson;
|
|
1397
|
+
__textAst?: TextAst;
|
|
1398
|
+
__isDefaultExample?: boolean;
|
|
1399
|
+
__defaultExample?: ExampleJson;
|
|
1400
|
+
}
|
|
1401
|
+
interface ChoiceJson {
|
|
1402
|
+
choice: string;
|
|
1403
|
+
isCorrect: boolean;
|
|
1404
|
+
item: JsonText;
|
|
1405
|
+
lead: JsonText;
|
|
1406
|
+
hint: JsonText;
|
|
1407
|
+
instruction: JsonText;
|
|
1408
|
+
isExample: boolean;
|
|
1409
|
+
example: ExampleJson;
|
|
1410
|
+
__isDefaultExample?: boolean;
|
|
1411
|
+
__defaultExample?: ExampleJson;
|
|
1412
|
+
}
|
|
1413
|
+
interface ResponseJson {
|
|
1414
|
+
response: string;
|
|
1415
|
+
isCorrect: boolean;
|
|
1416
|
+
item: JsonText;
|
|
1417
|
+
lead: JsonText;
|
|
1418
|
+
hint: JsonText;
|
|
1419
|
+
instruction: JsonText;
|
|
1420
|
+
isExample: boolean;
|
|
1421
|
+
example: ExampleJson;
|
|
1422
|
+
__isDefaultExample?: boolean;
|
|
1423
|
+
__defaultExample?: ExampleJson;
|
|
1424
|
+
}
|
|
1425
|
+
interface FeedbackJson {
|
|
1426
|
+
item: JsonText;
|
|
1427
|
+
lead: JsonText;
|
|
1428
|
+
hint: JsonText;
|
|
1429
|
+
instruction: JsonText;
|
|
1430
|
+
choices: FeedbackChoiceJson[];
|
|
1431
|
+
reason: FeedbackReasonJson;
|
|
1432
|
+
}
|
|
1433
|
+
interface QuizJson {
|
|
1434
|
+
item: JsonText;
|
|
1435
|
+
lead: JsonText;
|
|
1436
|
+
hint: JsonText;
|
|
1437
|
+
instruction: JsonText;
|
|
1438
|
+
isExample: boolean;
|
|
1439
|
+
choices: ChoiceJson[];
|
|
1440
|
+
responses: ResponseJson[];
|
|
1441
|
+
__isDefaultExample?: boolean;
|
|
1442
|
+
__defaultExample?: ExampleJson;
|
|
1443
|
+
}
|
|
1444
|
+
interface HeadingJson {
|
|
1445
|
+
forKeys: string;
|
|
1446
|
+
forValues: string | string[];
|
|
1447
|
+
__forValuesDefault?: string | string[];
|
|
1448
|
+
}
|
|
1449
|
+
interface PairJson {
|
|
1450
|
+
key: string;
|
|
1451
|
+
keyAudio: AudioResourceWrapperJson;
|
|
1452
|
+
keyImage: ImageResourceWrapperJson;
|
|
1453
|
+
item: JsonText;
|
|
1454
|
+
lead: JsonText;
|
|
1455
|
+
hint: JsonText;
|
|
1456
|
+
instruction: JsonText;
|
|
1457
|
+
isCaseSensitive: boolean;
|
|
1458
|
+
isExample: boolean;
|
|
1459
|
+
example: ExampleJson;
|
|
1460
|
+
values: string[];
|
|
1461
|
+
__valuesAst?: TextAst[];
|
|
1462
|
+
__isDefaultExample?: boolean;
|
|
1463
|
+
__defaultExample?: ExampleJson;
|
|
1464
|
+
}
|
|
1465
|
+
interface MatrixJson {
|
|
1466
|
+
key: string;
|
|
1467
|
+
item: JsonText;
|
|
1468
|
+
lead: JsonText;
|
|
1469
|
+
hint: JsonText;
|
|
1470
|
+
instruction: JsonText;
|
|
1471
|
+
isExample: boolean;
|
|
1472
|
+
cells: MatrixCellJson[];
|
|
1473
|
+
__isDefaultExample?: boolean;
|
|
1474
|
+
}
|
|
1475
|
+
interface MatrixCellJson {
|
|
1476
|
+
values: string[];
|
|
1477
|
+
item: JsonText;
|
|
1478
|
+
lead: JsonText;
|
|
1479
|
+
hint: JsonText;
|
|
1480
|
+
instruction: JsonText;
|
|
1481
|
+
isCaseSensitive: boolean;
|
|
1482
|
+
isExample: boolean;
|
|
1483
|
+
example: ExampleJson;
|
|
1484
|
+
__valuesAst?: TextAst[];
|
|
1485
|
+
__isDefaultExample?: boolean;
|
|
1486
|
+
__defaultExample?: ExampleJson;
|
|
1487
|
+
}
|
|
1488
|
+
interface PronunciationTableCellJson {
|
|
1489
|
+
title: JsonText;
|
|
1490
|
+
body: JsonText;
|
|
1491
|
+
audio: AudioResourceWrapperJson;
|
|
1492
|
+
}
|
|
1493
|
+
interface PronunciationTableJson {
|
|
1494
|
+
data: PronunciationTableCellJson[][];
|
|
1495
|
+
}
|
|
1496
|
+
interface TableJson {
|
|
1497
|
+
columnWidths?: (number | null)[];
|
|
1498
|
+
columns: JsonText[];
|
|
1499
|
+
data: JsonText[][];
|
|
1500
|
+
}
|
|
1501
|
+
interface TableExtendedJson {
|
|
1502
|
+
header?: TableSectionJson;
|
|
1503
|
+
body?: TableSectionJson;
|
|
1504
|
+
footer?: TableSectionJson;
|
|
1505
|
+
}
|
|
1506
|
+
interface TableSectionJson {
|
|
1507
|
+
rows: TableRowJson[];
|
|
1508
|
+
}
|
|
1509
|
+
interface TableRowJson {
|
|
1510
|
+
cells: TableCellJson[];
|
|
1511
|
+
}
|
|
1512
|
+
interface TableCellJson {
|
|
1513
|
+
content: JsonText;
|
|
1514
|
+
title?: boolean;
|
|
1515
|
+
rowspan?: number;
|
|
1516
|
+
colspan?: number;
|
|
1517
|
+
scope?: 'row' | 'col' | 'rowgroup' | 'colgroup';
|
|
1518
|
+
colwidth?: number;
|
|
1519
|
+
}
|
|
1520
|
+
interface QuestionJson {
|
|
1521
|
+
question: JsonText;
|
|
1522
|
+
partialAnswer: string;
|
|
1523
|
+
sampleSolution: string;
|
|
1524
|
+
additionalSolutions: string[];
|
|
1525
|
+
item: JsonText;
|
|
1526
|
+
lead: JsonText;
|
|
1527
|
+
hint: JsonText;
|
|
1528
|
+
instruction: JsonText;
|
|
1529
|
+
reasonableNumOfChars: number;
|
|
1530
|
+
isExample: boolean;
|
|
1531
|
+
example: ExampleJson;
|
|
1532
|
+
__sampleSolutionAst?: TextAst;
|
|
1533
|
+
__isDefaultExample?: boolean;
|
|
1534
|
+
__defaultExample?: ExampleJson;
|
|
1535
|
+
}
|
|
1536
|
+
interface BotResponseJson {
|
|
1537
|
+
response: string;
|
|
1538
|
+
reaction: string;
|
|
1539
|
+
feedback: string;
|
|
1540
|
+
item: string;
|
|
1541
|
+
lead: JsonText;
|
|
1542
|
+
hint: JsonText;
|
|
1543
|
+
}
|
|
1544
|
+
interface TechnicalTermJson {
|
|
1545
|
+
technicalTerm: string;
|
|
1546
|
+
lang: string;
|
|
1547
|
+
}
|
|
1548
|
+
interface ServingsJson {
|
|
1549
|
+
servings: number;
|
|
1550
|
+
unit: string;
|
|
1551
|
+
unitAbbr: string;
|
|
1552
|
+
decimalPlaces: number;
|
|
1553
|
+
disableCalculation: boolean;
|
|
1554
|
+
hint: string;
|
|
1555
|
+
}
|
|
1556
|
+
interface IngredientJson {
|
|
1557
|
+
title: string;
|
|
1558
|
+
checked: boolean;
|
|
1559
|
+
ingredient: string;
|
|
1560
|
+
quantity: number;
|
|
1561
|
+
unit: string;
|
|
1562
|
+
unitAbbr: string;
|
|
1563
|
+
decimalPlaces: number;
|
|
1564
|
+
disableCalculation: boolean;
|
|
1565
|
+
item: JsonText;
|
|
1566
|
+
lead: JsonText;
|
|
1567
|
+
hint: JsonText;
|
|
1568
|
+
}
|
|
1569
|
+
interface RatingLevelStartEndJson {
|
|
1570
|
+
level: number;
|
|
1571
|
+
label?: JsonText;
|
|
1572
|
+
}
|
|
1573
|
+
interface ListItemJson {
|
|
1574
|
+
item: JsonText;
|
|
1575
|
+
lead: JsonText;
|
|
1576
|
+
hint: JsonText;
|
|
1577
|
+
instruction: JsonText;
|
|
1578
|
+
body: JsonText | unknown;
|
|
1579
|
+
}
|
|
1580
|
+
interface BookReferenceJson {
|
|
1581
|
+
lang: string;
|
|
1582
|
+
refAuthor: string;
|
|
1583
|
+
refBookTitle: string[];
|
|
1584
|
+
refPublisher: string;
|
|
1585
|
+
}
|
|
1586
|
+
type ExampleJson = JsonText | boolean | null;
|
|
1587
|
+
|
|
1588
|
+
interface ParserJson {
|
|
1589
|
+
version?: string;
|
|
1590
|
+
bitmarkVersion?: string;
|
|
1591
|
+
commentedBitType?: string;
|
|
1592
|
+
internalComments?: string[];
|
|
1593
|
+
warnings?: ParserError[];
|
|
1594
|
+
errors?: ParserError[];
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1597
|
+
interface BitWrapperJson {
|
|
1598
|
+
bitmark?: string;
|
|
1599
|
+
bit: BitJson;
|
|
1600
|
+
parser?: ParserJson;
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
type index_AppLinkResourceJson = AppLinkResourceJson;
|
|
1604
|
+
type index_AppLinkResourceWrapperJson = AppLinkResourceWrapperJson;
|
|
1605
|
+
type index_ArticleResourceJson = ArticleResourceJson;
|
|
1606
|
+
type index_ArticleResourceWrapperJson = ArticleResourceWrapperJson;
|
|
1607
|
+
declare const index_Ast: typeof Ast;
|
|
1608
|
+
type index_AudioEmbedResourceJson = AudioEmbedResourceJson;
|
|
1609
|
+
type index_AudioEmbedResourceWrapperJson = AudioEmbedResourceWrapperJson;
|
|
1610
|
+
type index_AudioLinkResourceJson = AudioLinkResourceJson;
|
|
1611
|
+
type index_AudioLinkResourceWrapperJson = AudioLinkResourceWrapperJson;
|
|
1612
|
+
type index_AudioResourceJson = AudioResourceJson;
|
|
1613
|
+
type index_AudioResourceWrapperJson = AudioResourceWrapperJson;
|
|
1614
|
+
type index_BaseBodyBitJson = BaseBodyBitJson;
|
|
1615
|
+
type index_BaseResourceJson = BaseResourceJson;
|
|
1616
|
+
type index_BitJson = BitJson;
|
|
1617
|
+
declare const index_BitType: typeof BitType;
|
|
1618
|
+
type index_BitTypeType = BitTypeType;
|
|
1619
|
+
type index_BitWrapperJson = BitWrapperJson;
|
|
1620
|
+
declare const index_BitmarkFileGenerator: typeof BitmarkFileGenerator;
|
|
1621
|
+
declare const index_BitmarkGenerator: typeof BitmarkGenerator;
|
|
1622
|
+
type index_BitmarkOptions = BitmarkOptions;
|
|
1623
|
+
declare const index_BitmarkParser: typeof BitmarkParser;
|
|
1624
|
+
type index_BitmarkParserGenerator = BitmarkParserGenerator;
|
|
1625
|
+
declare const index_BitmarkParserGenerator: typeof BitmarkParserGenerator;
|
|
1626
|
+
declare const index_BitmarkParserType: typeof BitmarkParserType;
|
|
1627
|
+
type index_BitmarkParserTypeType = BitmarkParserTypeType;
|
|
1628
|
+
declare const index_BitmarkStringGenerator: typeof BitmarkStringGenerator;
|
|
1629
|
+
declare const index_BitmarkVersion: typeof BitmarkVersion;
|
|
1630
|
+
type index_BitmarkVersionType = BitmarkVersionType;
|
|
1631
|
+
type index_BodyBitJson = BodyBitJson;
|
|
1632
|
+
type index_BodyBitsJson = BodyBitsJson;
|
|
1633
|
+
declare const index_BodyTextFormat: typeof BodyTextFormat;
|
|
1634
|
+
type index_BodyTextFormatType = BodyTextFormatType;
|
|
1635
|
+
type index_BookJson = BookJson;
|
|
1636
|
+
type index_BookReferenceJson = BookReferenceJson;
|
|
1637
|
+
type index_BotResponseJson = BotResponseJson;
|
|
1638
|
+
declare const index_BoundingBoxIndex: typeof BoundingBoxIndex;
|
|
1639
|
+
type index_BuildBitOptions = BuildBitOptions;
|
|
1640
|
+
type index_Builder = Builder;
|
|
1641
|
+
declare const index_Builder: typeof Builder;
|
|
1642
|
+
declare const index_CardSetVersion: typeof CardSetVersion;
|
|
1643
|
+
type index_CardSetVersionType = CardSetVersionType;
|
|
1644
|
+
type index_ChoiceJson = ChoiceJson;
|
|
1645
|
+
type index_CodeBlockTextNode = CodeBlockTextNode;
|
|
1646
|
+
type index_CodeBlockTextNodeAttributes = CodeBlockTextNodeAttributes;
|
|
1647
|
+
type index_CommentMark = CommentMark;
|
|
1648
|
+
type index_ConvertHtmlTableOptions = ConvertHtmlTableOptions;
|
|
1649
|
+
type index_ConvertTextOptions = ConvertTextOptions;
|
|
1650
|
+
type index_CreateAstOptions = CreateAstOptions;
|
|
1651
|
+
type index_DefinitionListItemJson = DefinitionListItemJson;
|
|
1652
|
+
type index_DocumentDownloadResourceJson = DocumentDownloadResourceJson;
|
|
1653
|
+
type index_DocumentDownloadResourceWrapperJson = DocumentDownloadResourceWrapperJson;
|
|
1654
|
+
type index_DocumentEmbedResourceJson = DocumentEmbedResourceJson;
|
|
1655
|
+
type index_DocumentEmbedResourceWrapperJson = DocumentEmbedResourceWrapperJson;
|
|
1656
|
+
type index_DocumentLinkResourceJson = DocumentLinkResourceJson;
|
|
1657
|
+
type index_DocumentLinkResourceWrapperJson = DocumentLinkResourceWrapperJson;
|
|
1658
|
+
type index_DocumentResourceJson = DocumentResourceJson;
|
|
1659
|
+
type index_DocumentResourceWrapperJson = DocumentResourceWrapperJson;
|
|
1660
|
+
type index_ExampleJson = ExampleJson;
|
|
1661
|
+
type index_ExtRefMark = ExtRefMark;
|
|
1662
|
+
type index_ExtRefMarkAttibutes = ExtRefMarkAttibutes;
|
|
1663
|
+
type index_ExtractPlainTextOptions = ExtractPlainTextOptions;
|
|
1664
|
+
type index_FeedbackChoiceJson = FeedbackChoiceJson;
|
|
1665
|
+
type index_FeedbackJson = FeedbackJson;
|
|
1666
|
+
type index_FeedbackReasonJson = FeedbackReasonJson;
|
|
1667
|
+
type index_FileOptions = FileOptions;
|
|
1668
|
+
declare const index_FileWriter: typeof FileWriter;
|
|
1669
|
+
type index_FlashcardJson = FlashcardJson;
|
|
1670
|
+
type index_FootnoteAttibutes = FootnoteAttibutes;
|
|
1671
|
+
type index_FootnoteMark = FootnoteMark;
|
|
1672
|
+
type index_GapJson = GapJson;
|
|
1673
|
+
type index_GroupTagJson = GroupTagJson;
|
|
1674
|
+
type index_HeadingJson = HeadingJson;
|
|
1675
|
+
type index_HeadingTextNode = HeadingTextNode;
|
|
1676
|
+
type index_HeadingTextNodeAttributes = HeadingTextNodeAttributes;
|
|
1677
|
+
type index_HighlightJson = HighlightJson;
|
|
1678
|
+
type index_HighlightTextJson = HighlightTextJson;
|
|
1679
|
+
declare const index_HtmlTableGenerator: typeof HtmlTableGenerator;
|
|
1680
|
+
declare const index_HtmlTableParser: typeof HtmlTableParser;
|
|
1681
|
+
type index_ImageInlineTextNode = ImageInlineTextNode;
|
|
1682
|
+
type index_ImageLinkResourceJson = ImageLinkResourceJson;
|
|
1683
|
+
type index_ImageLinkResourceWrapperJson = ImageLinkResourceWrapperJson;
|
|
1684
|
+
type index_ImageResourceJson = ImageResourceJson;
|
|
1685
|
+
type index_ImageResourceWrapperJson = ImageResourceWrapperJson;
|
|
1686
|
+
type index_ImageResponsiveResourceJson = ImageResponsiveResourceJson;
|
|
1687
|
+
type index_ImageResponsiveResourceWrapperJson = ImageResponsiveResourceWrapperJson;
|
|
1688
|
+
type index_ImageSourceJson = ImageSourceJson;
|
|
1689
|
+
type index_ImageTextNode = ImageTextNode;
|
|
1690
|
+
type index_ImageTextNodeAttributes = ImageTextNodeAttributes;
|
|
1691
|
+
type index_InfoFormatType = InfoFormatType;
|
|
1692
|
+
type index_InfoTypeType = InfoTypeType;
|
|
1693
|
+
type index_IngredientJson = IngredientJson;
|
|
1694
|
+
declare const index_Input: typeof Input;
|
|
1695
|
+
type index_InputFormatType = InputFormatType;
|
|
1696
|
+
type index_InputType = InputType;
|
|
1697
|
+
declare const index_JsonFileGenerator: typeof JsonFileGenerator;
|
|
1698
|
+
declare const index_JsonGenerator: typeof JsonGenerator;
|
|
1699
|
+
type index_JsonOptions = JsonOptions;
|
|
1700
|
+
declare const index_JsonParser: typeof JsonParser;
|
|
1701
|
+
declare const index_JsonStringGenerator: typeof JsonStringGenerator;
|
|
1702
|
+
type index_JsonText = JsonText;
|
|
1703
|
+
type index_LatexTextNode = LatexTextNode;
|
|
1704
|
+
type index_LatexTextNodeAttributes = LatexTextNodeAttributes;
|
|
1705
|
+
type index_LegacyPseudoAst = LegacyPseudoAst;
|
|
1706
|
+
type index_LegacyUnsupportedError = LegacyUnsupportedError;
|
|
1707
|
+
declare const index_LegacyUnsupportedError: typeof LegacyUnsupportedError;
|
|
1708
|
+
type index_LinkMark = LinkMark;
|
|
1709
|
+
type index_LinkMarkAttibutes = LinkMarkAttibutes;
|
|
1710
|
+
type index_ListItemJson = ListItemJson;
|
|
1711
|
+
type index_ListTextNode = ListTextNode;
|
|
1712
|
+
type index_ListTextNodeAttributes = ListTextNodeAttributes;
|
|
1713
|
+
type index_MarkConfigJson = MarkConfigJson;
|
|
1714
|
+
type index_MarkJson = MarkJson;
|
|
1715
|
+
type index_MatrixCellJson = MatrixCellJson;
|
|
1716
|
+
type index_MatrixJson = MatrixJson;
|
|
1717
|
+
type index_MediaAttributes = MediaAttributes;
|
|
1718
|
+
declare const index_NodeType: typeof NodeType;
|
|
1719
|
+
declare const index_Output: typeof Output;
|
|
1720
|
+
type index_OutputType = OutputType;
|
|
1721
|
+
type index_PairJson = PairJson;
|
|
1722
|
+
type index_ParserError = ParserError;
|
|
1723
|
+
type index_ParserInfo = ParserInfo;
|
|
1724
|
+
type index_ParserJson = ParserJson;
|
|
1725
|
+
type index_ParserLocation = ParserLocation;
|
|
1726
|
+
type index_PersonJson = PersonJson;
|
|
1727
|
+
type index_PronunciationTableCellJson = PronunciationTableCellJson;
|
|
1728
|
+
type index_PronunciationTableJson = PronunciationTableJson;
|
|
1729
|
+
type index_QuestionJson = QuestionJson;
|
|
1730
|
+
type index_QuizJson = QuizJson;
|
|
1731
|
+
type index_RatingLevelStartEndJson = RatingLevelStartEndJson;
|
|
1732
|
+
type index_RefMark = RefMark;
|
|
1733
|
+
type index_RefMarkAttibutes = RefMarkAttibutes;
|
|
1734
|
+
type index_ResourceBuilder = ResourceBuilder;
|
|
1735
|
+
declare const index_ResourceBuilder: typeof ResourceBuilder;
|
|
1736
|
+
type index_ResourceDataJson = ResourceDataJson;
|
|
1737
|
+
type index_ResourceJson = ResourceJson;
|
|
1738
|
+
type index_ResourceTypeType = ResourceTypeType;
|
|
1739
|
+
type index_ResourceWrapperJson = ResourceWrapperJson;
|
|
1740
|
+
type index_ResponseJson = ResponseJson;
|
|
1741
|
+
type index_SectionTextNode = SectionTextNode;
|
|
1742
|
+
type index_SelectJson = SelectJson;
|
|
1743
|
+
type index_SelectOptionJson = SelectOptionJson;
|
|
1744
|
+
type index_ServingsJson = ServingsJson;
|
|
1745
|
+
type index_StatementJson = StatementJson;
|
|
1746
|
+
type index_StillImageFilmEmbedResourceJson = StillImageFilmEmbedResourceJson;
|
|
1747
|
+
type index_StillImageFilmEmbedResourceWrapperJson = StillImageFilmEmbedResourceWrapperJson;
|
|
1748
|
+
type index_StillImageFilmLinkResourceJson = StillImageFilmLinkResourceJson;
|
|
1749
|
+
type index_StillImageFilmLinkResourceWrapperJson = StillImageFilmLinkResourceWrapperJson;
|
|
1750
|
+
type index_StillImageFilmResourceJson = StillImageFilmResourceJson;
|
|
1751
|
+
type index_StillImageFilmResourceWrapperJson = StillImageFilmResourceWrapperJson;
|
|
1752
|
+
declare const index_StreamWriter: typeof StreamWriter;
|
|
1753
|
+
declare const index_StringWriter: typeof StringWriter;
|
|
1754
|
+
type index_SymbolMark = SymbolMark;
|
|
1755
|
+
type index_SymbolMarkAttibutes = SymbolMarkAttibutes;
|
|
1756
|
+
type index_TableCellJson = TableCellJson;
|
|
1757
|
+
type index_TableExtendedJson = TableExtendedJson;
|
|
1758
|
+
type index_TableJson = TableJson;
|
|
1759
|
+
type index_TableRowJson = TableRowJson;
|
|
1760
|
+
type index_TableSectionJson = TableSectionJson;
|
|
1761
|
+
type index_TaskItemTextNode = TaskItemTextNode;
|
|
1762
|
+
type index_TaskItemTextNodeAttributes = TaskItemTextNodeAttributes;
|
|
1763
|
+
type index_TechnicalTermJson = TechnicalTermJson;
|
|
1764
|
+
type index_TextAndIconJson = TextAndIconJson;
|
|
1765
|
+
type index_TextAst = TextAst;
|
|
1766
|
+
type index_TextFormatType = TextFormatType;
|
|
1767
|
+
type index_TextJsonOptions = TextJsonOptions;
|
|
1768
|
+
type index_TextLocationType = TextLocationType;
|
|
1769
|
+
type index_TextMark = TextMark;
|
|
1770
|
+
type index_TextMarkAttibutes = TextMarkAttibutes;
|
|
1771
|
+
declare const index_TextMarkType: typeof TextMarkType;
|
|
1772
|
+
type index_TextMarkTypeType = TextMarkTypeType;
|
|
1773
|
+
type index_TextNode = TextNode;
|
|
1774
|
+
type index_TextNodeAttibutes = TextNodeAttibutes;
|
|
1775
|
+
declare const index_TextNodeType: typeof TextNodeType;
|
|
1776
|
+
type index_TextNodeTypeType = TextNodeTypeType;
|
|
1777
|
+
type index_UnbreakscapeOptions = UnbreakscapeOptions;
|
|
1778
|
+
type index_UpgradeOptions = UpgradeOptions;
|
|
1779
|
+
type index_VideoEmbedResourceJson = VideoEmbedResourceJson;
|
|
1780
|
+
type index_VideoEmbedResourceWrapperJson = VideoEmbedResourceWrapperJson;
|
|
1781
|
+
type index_VideoLinkResourceJson = VideoLinkResourceJson;
|
|
1782
|
+
type index_VideoLinkResourceWrapperJson = VideoLinkResourceWrapperJson;
|
|
1783
|
+
type index_VideoResourceJson = VideoResourceJson;
|
|
1784
|
+
type index_VideoResourceWrapperJson = VideoResourceWrapperJson;
|
|
1785
|
+
type index_WebsiteLinkResourceJson = WebsiteLinkResourceJson;
|
|
1786
|
+
type index_WebsiteLinkResourceWrapperJson = WebsiteLinkResourceWrapperJson;
|
|
1787
|
+
type index_XRefMark = XRefMark;
|
|
1788
|
+
type index_XRefMarkAttibutes = XRefMarkAttibutes;
|
|
1789
|
+
declare const index_bitmarkTextParse: typeof bitmarkTextParse;
|
|
1790
|
+
declare const index_isPseudoAst: typeof isPseudoAst;
|
|
1791
|
+
declare namespace index {
|
|
1792
|
+
export { type index_AppLinkResourceJson as AppLinkResourceJson, type index_AppLinkResourceWrapperJson as AppLinkResourceWrapperJson, type index_ArticleResourceJson as ArticleResourceJson, type index_ArticleResourceWrapperJson as ArticleResourceWrapperJson, index_Ast as Ast, type index_AudioEmbedResourceJson as AudioEmbedResourceJson, type index_AudioEmbedResourceWrapperJson as AudioEmbedResourceWrapperJson, type index_AudioLinkResourceJson as AudioLinkResourceJson, type index_AudioLinkResourceWrapperJson as AudioLinkResourceWrapperJson, type index_AudioResourceJson as AudioResourceJson, type index_AudioResourceWrapperJson as AudioResourceWrapperJson, type index_BaseBodyBitJson as BaseBodyBitJson, type index_BaseResourceJson as BaseResourceJson, type index_BitJson as BitJson, index_BitType as BitType, type index_BitTypeType as BitTypeType, type index_BitWrapperJson as BitWrapperJson, index_BitmarkFileGenerator as BitmarkFileGenerator, index_BitmarkGenerator as BitmarkGenerator, type index_BitmarkOptions as BitmarkOptions, index_BitmarkParser as BitmarkParser, index_BitmarkParserGenerator as BitmarkParserGenerator, index_BitmarkParserType as BitmarkParserType, type index_BitmarkParserTypeType as BitmarkParserTypeType, index_BitmarkStringGenerator as BitmarkStringGenerator, index_BitmarkVersion as BitmarkVersion, type index_BitmarkVersionType as BitmarkVersionType, type index_BodyBitJson as BodyBitJson, type index_BodyBitsJson as BodyBitsJson, index_BodyTextFormat as BodyTextFormat, type index_BodyTextFormatType as BodyTextFormatType, type index_BookJson as BookJson, type index_BookReferenceJson as BookReferenceJson, type index_BotResponseJson as BotResponseJson, index_BoundingBoxIndex as BoundingBoxIndex, type BreakscapeOptions$1 as BreakscapeOptions, type index_BuildBitOptions as BuildBitOptions, index_Builder as Builder, index_CardSetVersion as CardSetVersion, type index_CardSetVersionType as CardSetVersionType, type index_ChoiceJson as ChoiceJson, type index_CodeBlockTextNode as CodeBlockTextNode, type index_CodeBlockTextNodeAttributes as CodeBlockTextNodeAttributes, type index_CommentMark as CommentMark, type index_ConvertHtmlTableOptions as ConvertHtmlTableOptions, type ConvertOptions$1 as ConvertOptions, type index_ConvertTextOptions as ConvertTextOptions, type index_CreateAstOptions as CreateAstOptions, type index_DefinitionListItemJson as DefinitionListItemJson, type index_DocumentDownloadResourceJson as DocumentDownloadResourceJson, type index_DocumentDownloadResourceWrapperJson as DocumentDownloadResourceWrapperJson, type index_DocumentEmbedResourceJson as DocumentEmbedResourceJson, type index_DocumentEmbedResourceWrapperJson as DocumentEmbedResourceWrapperJson, type index_DocumentLinkResourceJson as DocumentLinkResourceJson, type index_DocumentLinkResourceWrapperJson as DocumentLinkResourceWrapperJson, type index_DocumentResourceJson as DocumentResourceJson, type index_DocumentResourceWrapperJson as DocumentResourceWrapperJson, type index_ExampleJson as ExampleJson, type index_ExtRefMark as ExtRefMark, type index_ExtRefMarkAttibutes as ExtRefMarkAttibutes, type index_ExtractPlainTextOptions as ExtractPlainTextOptions, type index_FeedbackChoiceJson as FeedbackChoiceJson, type index_FeedbackJson as FeedbackJson, type index_FeedbackReasonJson as FeedbackReasonJson, type index_FileOptions as FileOptions, index_FileWriter as FileWriter, type index_FlashcardJson as FlashcardJson, type index_FootnoteAttibutes as FootnoteAttibutes, type index_FootnoteMark as FootnoteMark, type index_GapJson as GapJson, type index_GroupTagJson as GroupTagJson, type index_HeadingJson as HeadingJson, type index_HeadingTextNode as HeadingTextNode, type index_HeadingTextNodeAttributes as HeadingTextNodeAttributes, type index_HighlightJson as HighlightJson, type index_HighlightTextJson as HighlightTextJson, index_HtmlTableGenerator as HtmlTableGenerator, index_HtmlTableParser as HtmlTableParser, type index_ImageInlineTextNode as ImageInlineTextNode, type index_ImageLinkResourceJson as ImageLinkResourceJson, type index_ImageLinkResourceWrapperJson as ImageLinkResourceWrapperJson, type index_ImageResourceJson as ImageResourceJson, type index_ImageResourceWrapperJson as ImageResourceWrapperJson, type index_ImageResponsiveResourceJson as ImageResponsiveResourceJson, type index_ImageResponsiveResourceWrapperJson as ImageResponsiveResourceWrapperJson, type index_ImageSourceJson as ImageSourceJson, type index_ImageTextNode as ImageTextNode, type index_ImageTextNodeAttributes as ImageTextNodeAttributes, InfoFormat$1 as InfoFormat, type index_InfoFormatType as InfoFormatType, type InfoOptions$1 as InfoOptions, InfoType$1 as InfoType, type index_InfoTypeType as InfoTypeType, type index_IngredientJson as IngredientJson, index_Input as Input, InputFormat$1 as InputFormat, type index_InputFormatType as InputFormatType, type index_InputType as InputType, index_JsonFileGenerator as JsonFileGenerator, index_JsonGenerator as JsonGenerator, type index_JsonOptions as JsonOptions, index_JsonParser as JsonParser, index_JsonStringGenerator as JsonStringGenerator, type index_JsonText as JsonText, type index_LatexTextNode as LatexTextNode, type index_LatexTextNodeAttributes as LatexTextNodeAttributes, type index_LegacyPseudoAst as LegacyPseudoAst, index_LegacyUnsupportedError as LegacyUnsupportedError, type index_LinkMark as LinkMark, type index_LinkMarkAttibutes as LinkMarkAttibutes, type index_ListItemJson as ListItemJson, type index_ListTextNode as ListTextNode, type index_ListTextNodeAttributes as ListTextNodeAttributes, type index_MarkConfigJson as MarkConfigJson, type index_MarkJson as MarkJson, type index_MatrixCellJson as MatrixCellJson, type index_MatrixJson as MatrixJson, type index_MediaAttributes as MediaAttributes, index_NodeType as NodeType, index_Output as Output, type index_OutputType as OutputType, type index_PairJson as PairJson, type index_ParserError as ParserError, type index_ParserInfo as ParserInfo, type index_ParserJson as ParserJson, type index_ParserLocation as ParserLocation, type index_PersonJson as PersonJson, type index_PronunciationTableCellJson as PronunciationTableCellJson, type index_PronunciationTableJson as PronunciationTableJson, type index_QuestionJson as QuestionJson, type index_QuizJson as QuizJson, type index_RatingLevelStartEndJson as RatingLevelStartEndJson, type index_RefMark as RefMark, type index_RefMarkAttibutes as RefMarkAttibutes, index_ResourceBuilder as ResourceBuilder, type index_ResourceDataJson as ResourceDataJson, type index_ResourceJson as ResourceJson, type index_ResourceTypeType as ResourceTypeType, type index_ResourceWrapperJson as ResourceWrapperJson, type index_ResponseJson as ResponseJson, type index_SectionTextNode as SectionTextNode, type index_SelectJson as SelectJson, type index_SelectOptionJson as SelectOptionJson, type index_ServingsJson as ServingsJson, type index_StatementJson as StatementJson, type index_StillImageFilmEmbedResourceJson as StillImageFilmEmbedResourceJson, type index_StillImageFilmEmbedResourceWrapperJson as StillImageFilmEmbedResourceWrapperJson, type index_StillImageFilmLinkResourceJson as StillImageFilmLinkResourceJson, type index_StillImageFilmLinkResourceWrapperJson as StillImageFilmLinkResourceWrapperJson, type index_StillImageFilmResourceJson as StillImageFilmResourceJson, type index_StillImageFilmResourceWrapperJson as StillImageFilmResourceWrapperJson, index_StreamWriter as StreamWriter, index_StringWriter as StringWriter, type index_SymbolMark as SymbolMark, type index_SymbolMarkAttibutes as SymbolMarkAttibutes, type index_TableCellJson as TableCellJson, type index_TableExtendedJson as TableExtendedJson, type index_TableJson as TableJson, type index_TableRowJson as TableRowJson, type index_TableSectionJson as TableSectionJson, type index_TaskItemTextNode as TaskItemTextNode, type index_TaskItemTextNodeAttributes as TaskItemTextNodeAttributes, type index_TechnicalTermJson as TechnicalTermJson, type index_TextAndIconJson as TextAndIconJson, type index_TextAst as TextAst, type index_TextFormatType as TextFormatType, type index_TextJsonOptions as TextJsonOptions, TextLocation$1 as TextLocation, type index_TextLocationType as TextLocationType, type index_TextMark as TextMark, type index_TextMarkAttibutes as TextMarkAttibutes, index_TextMarkType as TextMarkType, type index_TextMarkTypeType as TextMarkTypeType, type index_TextNode as TextNode, type index_TextNodeAttibutes as TextNodeAttibutes, index_TextNodeType as TextNodeType, type index_TextNodeTypeType as TextNodeTypeType, type index_UnbreakscapeOptions as UnbreakscapeOptions, type index_UpgradeOptions as UpgradeOptions, type index_VideoEmbedResourceJson as VideoEmbedResourceJson, type index_VideoEmbedResourceWrapperJson as VideoEmbedResourceWrapperJson, type index_VideoLinkResourceJson as VideoLinkResourceJson, type index_VideoLinkResourceWrapperJson as VideoLinkResourceWrapperJson, type index_VideoResourceJson as VideoResourceJson, type index_VideoResourceWrapperJson as VideoResourceWrapperJson, type index_WebsiteLinkResourceJson as WebsiteLinkResourceJson, type index_WebsiteLinkResourceWrapperJson as WebsiteLinkResourceWrapperJson, type index_XRefMark as XRefMark, type index_XRefMarkAttibutes as XRefMarkAttibutes, index_bitmarkTextParse as bitmarkTextParse, index_isPseudoAst as isPseudoAst };
|
|
1793
|
+
}
|
|
1794
|
+
|
|
35
1795
|
/**
|
|
36
1796
|
* Output mode for JSON serialization.
|
|
37
1797
|
*
|
|
@@ -56,8 +1816,15 @@ interface ParseOptions {
|
|
|
56
1816
|
/** JSON output mode (default: `"optimized"`). */
|
|
57
1817
|
mode?: OutputMode;
|
|
58
1818
|
}
|
|
59
|
-
/**
|
|
60
|
-
|
|
1819
|
+
/**
|
|
1820
|
+
* Input format selector (adds auto-detection).
|
|
1821
|
+
*
|
|
1822
|
+
* `"auto"` sniffs bitmark-vs-JSON from the content; `"bitmark"` / `"json"` are
|
|
1823
|
+
* explicit; any config mapping id (e.g. `"html"`, `"xml"`) selects a markup
|
|
1824
|
+
* input that is reversed to the AST. The `(string & {})` arm admits those
|
|
1825
|
+
* config-driven mapping ids while keeping literal autocompletion.
|
|
1826
|
+
*/
|
|
1827
|
+
type InputFormat = "auto" | "bitmark" | "json" | (string & {});
|
|
61
1828
|
/** Concrete output format. `"text"` is lossy plain-text extraction and is
|
|
62
1829
|
* output-only (it cannot be used as an input format). */
|
|
63
1830
|
type OutputFormat = "bitmark" | "json" | "text";
|
|
@@ -82,6 +1849,11 @@ interface ConvertOptions {
|
|
|
82
1849
|
}
|
|
83
1850
|
/** Options for the {@link optimize}, {@link fullize}, and {@link canonicalize} functions. */
|
|
84
1851
|
interface NormalizeOptions {
|
|
1852
|
+
/**
|
|
1853
|
+
* Input format (default: `"auto"`). The output is re-emitted in this same
|
|
1854
|
+
* format — e.g. `"html"` in, html out. `"auto"` sniffs bitmark vs JSON.
|
|
1855
|
+
*/
|
|
1856
|
+
inputFormat?: InputFormat;
|
|
85
1857
|
/** Output mode — used by {@link canonicalize} only (default: `"optimized"`). */
|
|
86
1858
|
mode?: OutputMode;
|
|
87
1859
|
/** Prettify JSON output (default: `false`). */
|
|
@@ -247,13 +2019,16 @@ declare function parse(input: string, options?: ParseOptions): string;
|
|
|
247
2019
|
* array of structured parsed entries (`bit`, `parser`, `bitmark`).
|
|
248
2020
|
*/
|
|
249
2021
|
declare function convert(input: string, options?: ConvertOptions): string;
|
|
250
|
-
/** Re-emit input in its own format at optimized mode.
|
|
2022
|
+
/** Re-emit input in its own format at optimized mode. `options.inputFormat`
|
|
2023
|
+
* selects the format (default: `"auto"`). */
|
|
251
2024
|
declare function optimize(input: string, options?: NormalizeOptions): string;
|
|
252
|
-
/** Re-emit input in its own format at full mode (all keys). Aliased `expand`.
|
|
2025
|
+
/** Re-emit input in its own format at full mode (all keys). Aliased `expand`.
|
|
2026
|
+
* `options.inputFormat` selects the format (default: `"auto"`). */
|
|
253
2027
|
declare function fullize(input: string, options?: NormalizeOptions): string;
|
|
254
2028
|
/** Alias of {@link fullize}. */
|
|
255
2029
|
declare const expand: typeof fullize;
|
|
256
|
-
/** Re-emit input in its own format in canonical form.
|
|
2030
|
+
/** Re-emit input in its own format in canonical form. `options.inputFormat`
|
|
2031
|
+
* selects the format (default: `"auto"`). */
|
|
257
2032
|
declare function canonicalize(input: string, options?: NormalizeOptions): string;
|
|
258
2033
|
/** Count the bits in `input` (auto-detect). @throws on parse failure. */
|
|
259
2034
|
declare function countBits(input: string): number;
|
|
@@ -309,4 +2084,4 @@ declare function unbreakscapeText(input: string, options?: BreakscapeOptions): s
|
|
|
309
2084
|
*/
|
|
310
2085
|
declare function info(options?: InfoOptions): string;
|
|
311
2086
|
|
|
312
|
-
export { type BitSlice, type BitView, type BreakscapeOptions, type ConvertOptions, type InfoFormat, type InfoOptions, type InfoType, type InputFormat, type LexOptions, type LexStage, type NormalizeOptions, type OutputFormat, type OutputMode, type ParseOptions, type PatchEntry, type PatchOp, type PostHook, type PreHook, type PreHookResult, type TextFormat, type TextLocation, type TransformOptions, breakscapeText, canonicalize, convert, countBits, expand, fullize, info, init, initSync, lex, optimize, parse, splitBits, transform, transformParallel, unbreakscapeText, version };
|
|
2087
|
+
export { type BitSlice, type BitView, type BreakscapeOptions, type ConvertOptions, type InfoFormat, type InfoOptions, type InfoType, type InputFormat, type LexOptions, type LexStage, type NormalizeOptions, type OutputFormat, type OutputMode, type ParseOptions, type PatchEntry, type PatchOp, type PostHook, type PreHook, type PreHookResult, type TextFormat, type TextLocation, type TransformOptions, breakscapeText, canonicalize, convert, countBits, expand, fullize, info, init, initSync, index as legacy, lex, optimize, parse, splitBits, transform, transformParallel, unbreakscapeText, version };
|