@gmb/bitmark-parser-generator 3.30.0 → 3.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/browser/bitmark-parser-generator.min.js +1 -1
  2. package/dist/browser/bundle-report.html +2 -2
  3. package/dist/cjs/ast/Builder.js +1 -1
  4. package/dist/cjs/ast/Builder.js.map +1 -1
  5. package/dist/cjs/breakscaping/Breakscape.js +23 -269
  6. package/dist/cjs/breakscaping/Breakscape.js.map +1 -1
  7. package/dist/cjs/config/raw/bits.js +15 -0
  8. package/dist/cjs/config/raw/bits.js.map +1 -1
  9. package/dist/cjs/config/raw/properties.js +9 -0
  10. package/dist/cjs/config/raw/properties.js.map +1 -1
  11. package/dist/cjs/generated/build-info.js +1 -1
  12. package/dist/cjs/generator/bitmark/BitmarkGenerator.js +44 -44
  13. package/dist/cjs/generator/bitmark/BitmarkGenerator.js.map +1 -1
  14. package/dist/cjs/generator/json/JsonGenerator.js +7 -0
  15. package/dist/cjs/generator/json/JsonGenerator.js.map +1 -1
  16. package/dist/cjs/model/ast/NodeType.js +4 -0
  17. package/dist/cjs/model/ast/NodeType.js.map +1 -1
  18. package/dist/cjs/model/config/enum/PropertyConfigKey.js +2 -0
  19. package/dist/cjs/model/config/enum/PropertyConfigKey.js.map +1 -1
  20. package/dist/cjs/model/enum/BitType.js +1 -0
  21. package/dist/cjs/model/enum/BitType.js.map +1 -1
  22. package/dist/esm/ast/Builder.js +1 -1
  23. package/dist/esm/ast/Builder.js.map +1 -1
  24. package/dist/esm/breakscaping/Breakscape.js +23 -269
  25. package/dist/esm/breakscaping/Breakscape.js.map +1 -1
  26. package/dist/esm/config/raw/bits.js +15 -0
  27. package/dist/esm/config/raw/bits.js.map +1 -1
  28. package/dist/esm/config/raw/properties.js +9 -0
  29. package/dist/esm/config/raw/properties.js.map +1 -1
  30. package/dist/esm/generated/build-info.js +1 -1
  31. package/dist/esm/generator/bitmark/BitmarkGenerator.js +44 -44
  32. package/dist/esm/generator/bitmark/BitmarkGenerator.js.map +1 -1
  33. package/dist/esm/generator/json/JsonGenerator.js +7 -0
  34. package/dist/esm/generator/json/JsonGenerator.js.map +1 -1
  35. package/dist/esm/model/ast/NodeType.js +4 -0
  36. package/dist/esm/model/ast/NodeType.js.map +1 -1
  37. package/dist/esm/model/config/enum/PropertyConfigKey.js +2 -0
  38. package/dist/esm/model/config/enum/PropertyConfigKey.js.map +1 -1
  39. package/dist/esm/model/enum/BitType.js +1 -0
  40. package/dist/esm/model/enum/BitType.js.map +1 -1
  41. package/dist/types/ast/Builder.d.ts +2 -0
  42. package/dist/types/ast/Builder.d.ts.map +1 -1
  43. package/dist/types/breakscaping/Breakscape.d.ts +7 -17
  44. package/dist/types/breakscaping/Breakscape.d.ts.map +1 -1
  45. package/dist/types/config/raw/bits.d.ts.map +1 -1
  46. package/dist/types/config/raw/properties.d.ts.map +1 -1
  47. package/dist/types/generator/bitmark/BitmarkGenerator.d.ts.map +1 -1
  48. package/dist/types/generator/json/JsonGenerator.d.ts.map +1 -1
  49. package/dist/types/model/ast/NodeType.d.ts +8 -0
  50. package/dist/types/model/ast/NodeType.d.ts.map +1 -1
  51. package/dist/types/model/ast/Nodes.d.ts +2 -0
  52. package/dist/types/model/ast/Nodes.d.ts.map +1 -1
  53. package/dist/types/model/config/enum/ConfigKey.d.ts +4 -0
  54. package/dist/types/model/config/enum/ConfigKey.d.ts.map +1 -1
  55. package/dist/types/model/config/enum/PropertyConfigKey.d.ts +6 -0
  56. package/dist/types/model/config/enum/PropertyConfigKey.d.ts.map +1 -1
  57. package/dist/types/model/enum/BitType.d.ts +2 -0
  58. package/dist/types/model/enum/BitType.d.ts.map +1 -1
  59. package/dist/types/model/enum/PropertyTag.d.ts +4 -0
  60. package/dist/types/model/enum/PropertyTag.d.ts.map +1 -1
  61. package/dist/types/model/json/BitJson.d.ts +2 -0
  62. package/dist/types/model/json/BitJson.d.ts.map +1 -1
  63. package/package.json +2 -1
@@ -3,152 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Breakscape = void 0;
4
4
  const TextFormat_1 = require("../model/enum/TextFormat");
5
5
  const TextLocation_1 = require("../model/enum/TextLocation");
6
- const StringUtils_1 = require("../utils/StringUtils");
7
- /**
8
- * Utility class for breakscaping strings.
9
- *
10
- * ============
11
- * Breakscaping
12
- * ============
13
- *
14
- * Breakscaping is the process of escaping certain character sequences in a string so that they are not interpreted as
15
- * special sequences by the parser.
16
- *
17
- * This is different from escaping in that when escaping, single characters tend to be escaped, rather than sequences
18
- * being broken (split) by a special charater.
19
- *
20
- * The special character is ^
21
- * To include the special character in a text which is breakscaped, use ^^ (once), ^^^ (twice), etc.
22
- *
23
- * Any sequence can be breakscaped by breaking it with a single ^ character.
24
- *
25
- * When breakscaping text programmatically, the following rules apply to keep the breakscaping to a minimum:
26
- *
27
- * The following breakscaping rules are applied when breakscaping text:
28
- * <item> <from> <to> <textFormat>
29
- * - hat: ^ ==> ^^ [bodyBitmark, tagBitmark, tagPlain]
30
- * - hat: ^^ ==> ^^^ [bodyBitmark, tagBitmark, tagPlain]
31
- * - hat: ^..N ==> ^..N+1 [bodyBitmark, tagBitmark, tagPlain]
32
- * - inline: == ==> =^= [bodyBitmark, tagBitmark]
33
- * - bold: ** ==> *^* [bodyBitmark, tagBitmark]
34
- * - light: `` ==> `^` [bodyBitmark, tagBitmark]
35
- * - italic: __ ==> _^_ [bodyBitmark, tagBitmark]
36
- * - highlight: !! ==> !^! [bodyBitmark, tagBitmark]
37
- *
38
- * - title block: (SOL)[##]#(space) ==> (SOL)[##]#^(space) [bodyBitmark]
39
- * - new block: (SOL)|(WS EOL) ==> (SOL)|^(WS EOL) [bodyBitmark]
40
- * - code block: (SOL)|code(:type) ==> (SOL)|^code(:type) [bodyBitmark]
41
- * - image block: (SOL)|image:(url) ==> (SOL)|^image:(url) [bodyBitmark]
42
- * - bullet list: (SOL)•(space) ==> (SOL)•^(space) [bodyBitmark]
43
- * - simple list: (SOL)•_(space) ==> (SOL)•^_(space) [bodyBitmark]
44
- * - ordered list (numeric): (SOL)•<numbers>(space) ==> (SOL)•^<numbers>(space) [bodyBitmark]
45
- * - ordered list: (roman,lower) (SOL)•<numbers>i(space) ==> (SOL)•^<numbers>i(space) [bodyBitmark]
46
- * - ordered list: (roman,upper) (SOL)•<numbers>I(space) ==> (SOL)•^<numbers>I(space) [bodyBitmark]
47
- * - ordered list: (SOL)•<letters>(space) ==> (SOL)•^<letters>(space) [bodyBitmark]
48
- * - tag list +: (SOL)•+(space) ==> (SOL)•^+(space) [bodyBitmark]
49
- * - tag list -: (SOL)•-(space) ==> (SOL)•^-(space) [bodyBitmark]
50
- *
51
- * - start of bit: [. ==> [^. [bodyBitmark]
52
- * - start of property: [@ ==> [^@ [bodyBitmark]
53
- * - start of title: [# ==> [^# [bodyBitmark]
54
- * - start of anchor: [▼ ==> [^▼ [bodyBitmark]
55
- * - start of reference: [► ==> [^► [bodyBitmark]
56
- * - start of item/lead: [% ==> [^% [bodyBitmark]
57
- * - start of instruction: [! ==> [^! [bodyBitmark]
58
- * - start of hint: [? ==> [^? [bodyBitmark]
59
- * - start of true statement: [+ ==> [^+ [bodyBitmark]
60
- * - start of false statement: [- ==> [^- [bodyBitmark]
61
- * - start of sample solution: [$ ==> [^$ [bodyBitmark]
62
- * - start of gap: [_ ==> [^_ [bodyBitmark]
63
- * - start of mark: [= ==> [^= [bodyBitmark]
64
- * - start of resource: [& ==> [^& [bodyBitmark]
65
- * - old plain text divider: $$$$ ==> $^$$$ [bodyBitmark]
66
- * - old footer divider: ~~~~ ==> ~^~~~ [bodyBitmark]
67
- *
68
- * - start of bit: (SOL)[. ==> (SOL)[^. [bodyPlain]
69
- * - start of bit: (SOL)[^. ==> (SOL)[^^. [bodyPlain]
70
- * - start of bit: (SOL)[^..N. ==> (SOL)[^..N+1. [bodyPlain]
71
- *
72
- * - end of tag: ] ==> ^] [tagBitmark, tagPlain]
73
- *
74
- *
75
- * ==============
76
- * Unbreakscaping
77
- * ==============
78
- *
79
- * Unbreakscaping is the process of removing the breakscaping characters from a string.
80
- * It is the opposite of breakscaping.
81
- *
82
- * In all text but plain text:
83
- * ^ is always removed/reduced wherever it is found.
84
- * ^^ is always needed to represent a ^.
85
- *
86
- * In plain text:
87
- * ^ is only removed/reduced when it would break the start of a bit.
88
- *
89
- * The following unbreakscaping rules apply when unbreakscaping text:
90
- * <item> <from> <to> <textFormat>
91
- * - hat: ^ ==> [bodyBitmark, tagBitmark, tagPlain]
92
- * - hat: ^^ ==> ^ [bodyBitmark, tagBitmark, tagPlain]
93
- * - hat: ^..N ==> ^..N-1 [bodyBitmark, tagBitmark, tagPlain]
94
- *
95
- * - start of bit: (SOL)[^. ==> (SOL)[. [bodyPlain]
96
- * - start of bit: (SOL)[^^. ==> (SOL)[^. [bodyPlain]
97
- * - start of bit: (SOL)[^..N. ==> (SOL)[^..N-1. [bodyPlain]
98
- *
99
- */
100
- //
101
- // Breakscaping
102
- //
103
- const REGEX_MARKS = /([*`_!=])(?=\1)/; // BM_TAG: $1^ --BODY: $1^ ++BODY: $1^
104
- const REGEX_BLOCKS = /^(\|)(code[\s]*|code:|image:|[\s]*$)/; // ++BODY: $2^$3
105
- const REGEX_TITLE_BLOCKS = /^([#]{1,3})([^\S\r\n]+)/; // ++BODY: $4^$5
106
- const REGEX_LIST_BLOCKS = /^(•)([0-9]+[iI]*|[a-zA-Z]{1}|_|\+|-|)([^\S\r\n]+)/; // ++BODY: $6^$7$8
107
- const REGEX_START_OF_TAG = /(\[)([.@#▼►%!?+\-$_=&])/; // --BODY: $2^$3 ++BODY: $9^$10
108
- const REGEX_FOOTER_DIVIDER = /^(~)(~~~[ \t]*)$/; // --BODY: $4^$5 ++BODY: $11^$12
109
- const REGEX_PLAIN_TEXT_DIVIDER = /^(\$)(\$\$\$[ \t]*)$/; // --BODY: $6^$7 ++BODY: $13^$14
110
- const REGEX_END_OF_TAG = /(\^*])/; // BM_TAG: ^$2 PLAIN_TAG: ^$1
111
- const REGEX_BIT_START = /^(\[)(\^*)(\.)/; // PLAIN_BODY: $1^$2$3
112
- const REGEX_HATS = /(\^+)/; // BM_TAG: $3^ PLAIN_TAG: $2^ --BODY: ^$8 ++BODY: $15^ // Must be last
113
- const BREAKSCAPE_BITMARK_TAG_REGEX_SOURCE = `${REGEX_MARKS.source}|${REGEX_END_OF_TAG.source}|${REGEX_HATS.source}`;
114
- const BREAKSCAPE_PLAIN_TAG_REGEX_SOURCE = `${REGEX_END_OF_TAG.source}|${REGEX_HATS.source}`;
115
- const BREAKSCAPE_BITMARK_BODY_REGEX_SOURCE = `${REGEX_MARKS.source}|${REGEX_BLOCKS.source}|${REGEX_TITLE_BLOCKS.source}|${REGEX_LIST_BLOCKS.source}|${REGEX_START_OF_TAG.source}|${REGEX_FOOTER_DIVIDER.source}|${REGEX_PLAIN_TEXT_DIVIDER.source}|${REGEX_HATS.source}`;
116
- const BREAKSCAPE_PLAIN_BODY_REGEX_SOURCE = `${REGEX_BIT_START.source}`;
117
- // Breakscape regex for bitmarkText (bitmark+) in tags
118
- const BREAKSCAPE_BITMARK_TAG_REGEX = new RegExp(BREAKSCAPE_BITMARK_TAG_REGEX_SOURCE, 'gm');
119
- const BREAKSCAPE_BITMARK_TAG_REGEX_REPLACER = '$1$3^$2';
120
- // Breakscape regex for plain text in tags
121
- const BREAKSCAPE_PLAIN_TAG_REGEX = new RegExp(BREAKSCAPE_PLAIN_TAG_REGEX_SOURCE, 'gm');
122
- const BREAKSCAPE_PLAIN_TAG_REGEX_REPLACER = '$2^$1';
123
- // Breakscape regex for bitmarkText (bitmark++) in body
124
- const BREAKSCAPE_BITMARK_BODY_REGEX = new RegExp(BREAKSCAPE_BITMARK_BODY_REGEX_SOURCE, 'gm');
125
- const BREAKSCAPE_BITMARK_BODY_REGEX_REPLACER = '$1$2$4$6$9$11$13$15^$3$5$7$8$10$12$14';
126
- // Breakscape regex for plain text in body
127
- const BREAKSCAPE_PLAIN_BODY_REGEX = new RegExp(BREAKSCAPE_PLAIN_BODY_REGEX_SOURCE, 'gm');
128
- const BREAKSCAPE_PLAIN_BODY_REGEX_REPLACER = '$1^$2$3';
129
- // Breakscape regex for v2 tag. Not required, same as BREAKSCAPE_PLAIN_TAG_REGEX
130
- // const BREAKSCAPE_V2_TAG_REGEX = new RegExp('^(\\^*])|(\\^+)', 'gm');
131
- // const BREAKSCAPE_V2_TAG_REGEX_REPLACER = '$2^$1';
132
- // Breakscape regex for v2 body
133
- const BREAKSCAPE_V2_BODY_REGEX = new RegExp('^(?:(\\[)(\\^*)(\\.))|(\\^+)', 'gm');
134
- const BREAKSCAPE_V2_BODY_REGEX_REPLACER = '$1$4^$2$3';
135
- // Unbreakscape regex for everything but plain text in the body
136
- const UNBREAKSCAPE_REGEX = new RegExp('\\^([\\^]*)', 'gm');
137
- const UNBREAKSCAPE_REGEX_REPLACER = '$1';
138
- // Unbreakscape regex for plain text in the body
139
- const UNBREAKSCAPE_PLAIN_IN_BODY_REGEX = new RegExp('^(\\[)\\^(\\^*)(\\.)', 'gm');
140
- const UNBREAKSCAPE_PLAIN_IN_BODY_REGEX_REPLACER = '$1$2$3';
141
- // Regex explanation:
142
- // - match a single | or • or # character at the start of a line and capture in group 1
143
- // This will capture all new block characters within the code text.
144
- // Replace with group 1, ^
145
- // TODO: Not sure this is used any longer. #code blocks are not separate bits as far as I am aware?
146
- const BREAKSCAPE_CODE_REGEX = new RegExp('^(\\||•|#)', 'gm');
147
- const BREAKSCAPE_CODE_REGEX_REPLACER = '$1^';
6
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
7
+ const ExternalBreakscape = require('@gmb/bitmark-breakscape');
148
8
  const DEFAULT_BREAKSCAPE_OPTIONS = {
149
9
  textFormat: TextFormat_1.TextFormat.bitmarkText,
150
10
  textLocation: TextLocation_1.TextLocation.body,
11
+ inPlaceArray: false,
12
+ v2: false,
151
13
  };
14
+ const externalBreakscape = new ExternalBreakscape.Breakscape();
152
15
  class Breakscape {
153
16
  constructor() {
154
17
  this.EMPTY_STRING = '';
@@ -163,31 +26,13 @@ class Breakscape {
163
26
  * @returns the input value with any strings breakscaped.
164
27
  */
165
28
  breakscape(val, options) {
166
- if (val == null)
167
- return val;
168
29
  const opts = Object.assign({}, DEFAULT_BREAKSCAPE_OPTIONS, options);
169
- // Select the correct regex and replacer for the text format and location
170
- const { regex, replacer } = this.selectBreakscapeRegexAndReplacer(opts.textFormat, opts.textLocation, opts.v2);
171
- const breakscapeStr = (str) => {
172
- if (!str)
173
- return str;
174
- str = str.replace(regex, replacer);
175
- return str;
176
- };
177
- if (Array.isArray(val)) {
178
- const newVal = opts.inPlaceArray ? val : new Array(val.length);
179
- for (let i = 0, len = val.length; i < len; i++) {
180
- const v = val[i];
181
- if (StringUtils_1.StringUtils.isString(v)) {
182
- newVal[i] = breakscapeStr(v);
183
- }
184
- }
185
- val = newVal;
186
- }
187
- else if (StringUtils_1.StringUtils.isString(val)) {
188
- val = breakscapeStr(val);
189
- }
190
- return val;
30
+ return externalBreakscape.breakscape(val, {
31
+ format: opts.textFormat,
32
+ location: opts.textLocation,
33
+ inPlaceArray: opts.inPlaceArray,
34
+ v2: opts.v2,
35
+ });
191
36
  }
192
37
  /**
193
38
  * Unbreakscape a string or an array of strings.
@@ -198,34 +43,13 @@ class Breakscape {
198
43
  * @returns the input value with any strings unbreakscaped.
199
44
  */
200
45
  unbreakscape(val, options) {
201
- if (val == null)
202
- return val;
203
46
  const opts = Object.assign({}, DEFAULT_BREAKSCAPE_OPTIONS, options);
204
- // Select the correct regex and replacer for the text format and location
205
- const { regex, replacer } = this.selectUnbreakscapeRegexAndReplacer(opts.textFormat, opts.textLocation);
206
- const unbreakscapeStr = (str) => {
207
- if (!str)
208
- return str;
209
- str = str.replace(regex, replacer);
210
- return str;
211
- };
212
- if (Array.isArray(val)) {
213
- const newVal = opts.inPlaceArray ? val : new Array(val.length);
214
- for (let i = 0, len = val.length; i < len; i++) {
215
- const v = val[i];
216
- if (StringUtils_1.StringUtils.isString(v)) {
217
- newVal[i] = unbreakscapeStr(v);
218
- }
219
- else {
220
- newVal[i] = v;
221
- }
222
- }
223
- val = newVal;
224
- }
225
- else if (StringUtils_1.StringUtils.isString(val)) {
226
- val = unbreakscapeStr(val);
227
- }
228
- return val;
47
+ return externalBreakscape.unbreakscape(val, {
48
+ format: opts.textFormat,
49
+ location: opts.textLocation,
50
+ inPlaceArray: opts.inPlaceArray,
51
+ v2: opts.v2,
52
+ });
229
53
  }
230
54
  /**
231
55
  * Breakscape a code string or an array of code strings.
@@ -236,83 +60,13 @@ class Breakscape {
236
60
  * @returns the input value with any strings breakscaped
237
61
  */
238
62
  breakscapeCode(val, options) {
239
- if (val == null)
240
- return val;
241
63
  const opts = Object.assign({}, DEFAULT_BREAKSCAPE_OPTIONS, options);
242
- const breakscapeStr = (str) => {
243
- if (!str)
244
- return str;
245
- return str.replace(BREAKSCAPE_CODE_REGEX, BREAKSCAPE_CODE_REGEX_REPLACER);
246
- };
247
- if (Array.isArray(val)) {
248
- const newVal = opts.inPlaceArray ? val : [val.length];
249
- for (let i = 0, len = val.length; i < len; i++) {
250
- const v = val[i];
251
- if (StringUtils_1.StringUtils.isString(v)) {
252
- val[i] = breakscapeStr(v);
253
- }
254
- }
255
- val = newVal;
256
- }
257
- else if (StringUtils_1.StringUtils.isString(val)) {
258
- val = breakscapeStr(val);
259
- }
260
- return val;
261
- }
262
- /**
263
- * For breakscaping, select the correct regex and replacer for the text format and location.
264
- *
265
- * @param textFormat the format of the text
266
- * @param textLocation the location of the text
267
- * @param v2 if true, use v2 breakscaping
268
- * @returns the regex and replacer
269
- */
270
- selectBreakscapeRegexAndReplacer(textFormat, textLocation, v2) {
271
- let regex;
272
- let replacer;
273
- if (textLocation === TextLocation_1.TextLocation.tag) {
274
- regex = BREAKSCAPE_PLAIN_TAG_REGEX;
275
- replacer = BREAKSCAPE_PLAIN_TAG_REGEX_REPLACER;
276
- if (!v2 && textFormat === TextFormat_1.TextFormat.bitmarkText) {
277
- regex = BREAKSCAPE_BITMARK_TAG_REGEX;
278
- replacer = BREAKSCAPE_BITMARK_TAG_REGEX_REPLACER;
279
- }
280
- }
281
- else {
282
- // if (textLocation === TextLocation.body) {
283
- regex = BREAKSCAPE_PLAIN_BODY_REGEX;
284
- replacer = BREAKSCAPE_PLAIN_BODY_REGEX_REPLACER;
285
- if (textFormat === TextFormat_1.TextFormat.bitmarkText) {
286
- if (v2) {
287
- // Hack for v2 breakscaping (still needed??)
288
- regex = BREAKSCAPE_V2_BODY_REGEX;
289
- replacer = BREAKSCAPE_V2_BODY_REGEX_REPLACER;
290
- }
291
- else {
292
- regex = BREAKSCAPE_BITMARK_BODY_REGEX;
293
- replacer = BREAKSCAPE_BITMARK_BODY_REGEX_REPLACER;
294
- }
295
- }
296
- }
297
- return { regex, replacer };
298
- }
299
- /**
300
- * For unbreakscaping, select the correct regex and replacer for the text format and location.
301
- *
302
- * @param textFormat the format of the text
303
- * @param textLocation the location of the text
304
- * @returns the regex and replacer
305
- */
306
- selectUnbreakscapeRegexAndReplacer(textFormat, textLocation) {
307
- const isBitmarkText = textFormat === TextFormat_1.TextFormat.bitmarkText;
308
- const isPlain = !isBitmarkText;
309
- let regex = UNBREAKSCAPE_REGEX;
310
- let replacer = UNBREAKSCAPE_REGEX_REPLACER;
311
- if (textLocation === TextLocation_1.TextLocation.body && isPlain) {
312
- regex = UNBREAKSCAPE_PLAIN_IN_BODY_REGEX;
313
- replacer = UNBREAKSCAPE_PLAIN_IN_BODY_REGEX_REPLACER;
314
- }
315
- return { regex, replacer };
64
+ return externalBreakscape.breakscapeCode(val, {
65
+ format: opts.textFormat,
66
+ location: opts.textLocation,
67
+ inPlaceArray: opts.inPlaceArray,
68
+ v2: opts.v2,
69
+ });
316
70
  }
317
71
  /**
318
72
  * Concatenate two breakscaped strings.
@@ -1 +1 @@
1
- {"version":3,"file":"Breakscape.js","sourceRoot":"","sources":["../../../src/breakscaping/Breakscape.ts"],"names":[],"mappings":";;;AACA,yD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
+ type: BitTagType_1.BitTagType.property,
2177
+ configKey: PropertyConfigKey_1.PropertyConfigKey.tableHeaderWhitespaceNoWrap,
2178
+ },
2175
2179
  {
2176
2180
  type: BitTagType_1.BitTagType.property,
2177
2181
  configKey: PropertyConfigKey_1.PropertyConfigKey.tableSearch,
@@ -2265,6 +2269,17 @@ const BITS = {
2265
2269
  },
2266
2270
  ],
2267
2271
  },
2272
+ [BitType_1.BitType.tocResource]: {
2273
+ since: '3.31.0',
2274
+ baseBitType: BitType_1.BitType.toc,
2275
+ tags: [
2276
+ {
2277
+ type: BitTagType_1.BitTagType.property,
2278
+ configKey: PropertyConfigKey_1.PropertyConfigKey.tocResource,
2279
+ maxCount: Count_1.Count.infinity,
2280
+ },
2281
+ ],
2282
+ },
2268
2283
  [BitType_1.BitType.anchor]: { since: '1.3.0', baseBitType: BitType_1.BitType._standard },
2269
2284
  [BitType_1.BitType.bitBookEnding]: { since: '1.3.0', baseBitType: BitType_1.BitType._standard },
2270
2285
  [BitType_1.BitType.bitBookSummary]: { since: '1.3.0', baseBitType: BitType_1.BitType._standard },