@gmb/bitmark-parser-generator 1.4.10 → 1.4.12

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 (100) 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/breakscaping/Breakscape.js +1 -5
  4. package/dist/cjs/breakscaping/Breakscape.js.map +1 -1
  5. package/dist/cjs/config/Config.js +10 -2
  6. package/dist/cjs/config/Config.js.map +1 -1
  7. package/dist/cjs/config/raw/bits.js +4 -2
  8. package/dist/cjs/config/raw/bits.js.map +1 -1
  9. package/dist/cjs/config/raw/tags.js +0 -3
  10. package/dist/cjs/config/raw/tags.js.map +1 -1
  11. package/dist/cjs/generated/build-info.js +1 -1
  12. package/dist/cjs/generated/parser/bitmark/bitmark-peggy-parser.js +93 -564
  13. package/dist/cjs/generated/parser/bitmark/bitmark-peggy-parser.js.map +1 -1
  14. package/dist/cjs/generator/json/JsonGenerator.js +33 -23
  15. package/dist/cjs/generator/json/JsonGenerator.js.map +1 -1
  16. package/dist/cjs/generator/text/TextGenerator.js +8 -0
  17. package/dist/cjs/generator/text/TextGenerator.js.map +1 -1
  18. package/dist/cjs/info/InfoBuilder.js +2 -2
  19. package/dist/cjs/info/InfoBuilder.js.map +1 -1
  20. package/dist/cjs/model/config/enum/TagConfigKey.js +0 -1
  21. package/dist/cjs/model/config/enum/TagConfigKey.js.map +1 -1
  22. package/dist/cjs/model/enum/BitType.js +1 -0
  23. package/dist/cjs/model/enum/BitType.js.map +1 -1
  24. package/dist/cjs/model/enum/Tag.js +0 -1
  25. package/dist/cjs/model/enum/Tag.js.map +1 -1
  26. package/dist/cjs/model/enum/TextNodeType.js +1 -0
  27. package/dist/cjs/model/enum/TextNodeType.js.map +1 -1
  28. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js +17 -0
  29. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +1 -1
  30. package/dist/cjs/parser/json/JsonParser.js +97 -61
  31. package/dist/cjs/parser/json/JsonParser.js.map +1 -1
  32. package/dist/cjs/parser/text/TextParser.js +7 -2
  33. package/dist/cjs/parser/text/TextParser.js.map +1 -1
  34. package/dist/esm/breakscaping/Breakscape.js +1 -5
  35. package/dist/esm/breakscaping/Breakscape.js.map +1 -1
  36. package/dist/esm/config/Config.js +10 -2
  37. package/dist/esm/config/Config.js.map +1 -1
  38. package/dist/esm/config/raw/bits.js +4 -2
  39. package/dist/esm/config/raw/bits.js.map +1 -1
  40. package/dist/esm/config/raw/tags.js +0 -3
  41. package/dist/esm/config/raw/tags.js.map +1 -1
  42. package/dist/esm/generated/build-info.js +1 -1
  43. package/dist/esm/generated/parser/bitmark/bitmark-peggy-parser.js +93 -564
  44. package/dist/esm/generated/parser/bitmark/bitmark-peggy-parser.js.map +1 -1
  45. package/dist/esm/generator/json/JsonGenerator.js +33 -23
  46. package/dist/esm/generator/json/JsonGenerator.js.map +1 -1
  47. package/dist/esm/generator/text/TextGenerator.js +8 -0
  48. package/dist/esm/generator/text/TextGenerator.js.map +1 -1
  49. package/dist/esm/info/InfoBuilder.js +2 -2
  50. package/dist/esm/info/InfoBuilder.js.map +1 -1
  51. package/dist/esm/model/config/enum/TagConfigKey.js +0 -1
  52. package/dist/esm/model/config/enum/TagConfigKey.js.map +1 -1
  53. package/dist/esm/model/enum/BitType.js +1 -0
  54. package/dist/esm/model/enum/BitType.js.map +1 -1
  55. package/dist/esm/model/enum/Tag.js +0 -1
  56. package/dist/esm/model/enum/Tag.js.map +1 -1
  57. package/dist/esm/model/enum/TextNodeType.js +1 -0
  58. package/dist/esm/model/enum/TextNodeType.js.map +1 -1
  59. package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js +17 -0
  60. package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +1 -1
  61. package/dist/esm/parser/json/JsonParser.js +97 -61
  62. package/dist/esm/parser/json/JsonParser.js.map +1 -1
  63. package/dist/esm/parser/text/TextParser.js +7 -2
  64. package/dist/esm/parser/text/TextParser.js.map +1 -1
  65. package/dist/types/breakscaping/Breakscape.d.ts.map +1 -1
  66. package/dist/types/config/Config.d.ts.map +1 -1
  67. package/dist/types/config/raw/bits.d.ts.map +1 -1
  68. package/dist/types/config/raw/tags.d.ts.map +1 -1
  69. package/dist/types/generated/parser/bitmark/bitmark-peggy-parser.d.ts.map +1 -1
  70. package/dist/types/generator/json/JsonGenerator.d.ts +15 -7
  71. package/dist/types/generator/json/JsonGenerator.d.ts.map +1 -1
  72. package/dist/types/generator/text/TextGenerator.d.ts.map +1 -1
  73. package/dist/types/index.d.ts +1 -1
  74. package/dist/types/index.d.ts.map +1 -1
  75. package/dist/types/model/ast/TextNodes.d.ts +2 -1
  76. package/dist/types/model/ast/TextNodes.d.ts.map +1 -1
  77. package/dist/types/model/config/enum/ConfigKey.d.ts +0 -2
  78. package/dist/types/model/config/enum/ConfigKey.d.ts.map +1 -1
  79. package/dist/types/model/config/enum/TagConfigKey.d.ts +0 -3
  80. package/dist/types/model/config/enum/TagConfigKey.d.ts.map +1 -1
  81. package/dist/types/model/enum/BitType.d.ts +2 -0
  82. package/dist/types/model/enum/BitType.d.ts.map +1 -1
  83. package/dist/types/model/enum/Tag.d.ts +0 -2
  84. package/dist/types/model/enum/Tag.d.ts.map +1 -1
  85. package/dist/types/model/enum/TextNodeType.d.ts +2 -0
  86. package/dist/types/model/enum/TextNodeType.d.ts.map +1 -1
  87. package/dist/types/model/json/BitJson.d.ts +49 -49
  88. package/dist/types/model/json/BitJson.d.ts.map +1 -1
  89. package/dist/types/model/json/BodyBitJson.d.ts +17 -17
  90. package/dist/types/model/json/BodyBitJson.d.ts.map +1 -1
  91. package/dist/types/model/json/ResourceJson.d.ts +2 -2
  92. package/dist/types/model/json/ResourceJson.d.ts.map +1 -1
  93. package/dist/types/model/parser/ParserInfo.d.ts +1 -0
  94. package/dist/types/model/parser/ParserInfo.d.ts.map +1 -1
  95. package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts +1 -0
  96. package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts.map +1 -1
  97. package/dist/types/parser/json/JsonParser.d.ts +23 -3
  98. package/dist/types/parser/json/JsonParser.d.ts.map +1 -1
  99. package/dist/types/parser/text/TextParser.d.ts.map +1 -1
  100. package/package.json +1 -1
@@ -177,6 +177,9 @@ class BitmarkPegParserProcessor {
177
177
  // Bit type was invalid, so ignore the bit, returning instead the parsing errors
178
178
  if (!bitType || bitType.root === RootBitType._error)
179
179
  return this.invalidBit();
180
+ // Bit type was comment, so ignore the bit, returning the comment info instead
181
+ if (bitType.root === RootBitType._comment)
182
+ return this.commentBit();
180
183
  if (DEBUG_BIT_CONTENT_RAW)
181
184
  this.debugPrint('BIT CONTENT RAW', bitContent);
182
185
  const isTrueFalseV1 = bitType.root === RootBitType.trueFalse1;
@@ -239,6 +242,17 @@ class BitmarkPegParserProcessor {
239
242
  });
240
243
  return { value: bit };
241
244
  }
245
+ // Build bit for commented bit
246
+ commentBit() {
247
+ // Build the errors
248
+ this.parser.errors = this.buildBitLevelErrors();
249
+ // Build the error bit
250
+ const bit = builder.bit({
251
+ bitType: Config.getBitType(RootBitType._comment),
252
+ parser: this.parser,
253
+ });
254
+ return { value: bit };
255
+ }
242
256
  // Build bit header
243
257
  buildBitHeader(bitType, textFormatAndResourceType) {
244
258
  var _a;
@@ -247,6 +261,9 @@ class BitmarkPegParserProcessor {
247
261
  if (validBitType.root === RootBitType._error) {
248
262
  this.addError(`Invalid bit type: '${bitType}'`);
249
263
  }
264
+ else if (validBitType.root === RootBitType._comment) {
265
+ this.parser.commentedBitType = `[.${bitType.slice(1)}]`;
266
+ }
250
267
  return {
251
268
  bitType: validBitType,
252
269
  textFormat: (_a = textFormatAndResourceType.textFormat) !== null && _a !== void 0 ? _a : TextFormat.bitmarkMinusMinus,
@@ -1 +1 @@
1
- {"version":3,"file":"BitmarkPegParserProcessor.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AG,CAAC,cAAc,MAAM,QAAQ,CAAC,CAAC;aAC3C;iBAAM;gBACL,OAAO,CAAC,GAAG,CAAC,YAAY,MAAM,EAAE,CAAC,CAAC;aACnC;SACF;QAED,eAAe;QACf,KAAK,CAAC;IACR,CAAC;CACF;AAED,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
@@ -165,12 +165,12 @@ class JsonParser {
165
165
  // Convert reference to referenceProperty
166
166
  const { reference, referenceProperty } = this.referenceToAst(referenceIn);
167
167
  // Build bit
168
- const bitNode = builder.bit(Object.assign(Object.assign(Object.assign({ bitType, textFormat: format, resourceType: resourceAttachmentType, id: this.parseText(id), externalId: this.parseText(externalId), spaceId: this.parseText(spaceId), padletId: this.parseText(padletId), jupyterId: this.parseText(jupyterId), jupyterExecutionCount, aiGenerated: AIGenerated, releaseVersion: this.parseText(releaseVersion), ageRange, lang: this.parseText(lang), language: this.parseText(language), computerLanguage: this.parseText(computerLanguage), target: this.parseText(target), tag: this.parseText(tag), icon: this.parseText(icon), iconTag: this.parseText(iconTag), colorTag: this.parseText(colorTag), flashcardSet: this.parseText(flashcardSet), subtype: this.parseText(subtype), bookAlias: this.parseText(bookAlias), coverImage: this.parseText(coverImage), publisher: this.parseText(publisher), publications: this.parseText(publications), author: this.parseText(author), date: this.parseText(date), location: this.parseText(location), theme: this.parseText(theme), kind: this.parseText(kind), action: this.parseText(action), duration: this.parseText(duration), referenceProperty: this.parseText(referenceProperty), thumbImage: this.parseText(thumbImage), focusX,
169
- focusY, deeplink: this.parseText(deeplink), externalLink: this.parseText(externalLink), externalLinkText: this.parseText(externalLinkText), videoCallLink: this.parseText(videoCallLink), bot: this.parseText(bot), list: this.parseText(list), textReference: this.parseText(textReference), isTracked,
170
- isInfoOnly, labelTrue: this.parseText(labelTrue), labelFalse: this.parseText(labelFalse), content2Buy: this.parseText(content2Buy), quotedPerson: this.parseText(quotedPerson), reasonableNumOfChars,
171
- maxCreatedBits, book: this.parseText(book), title: this.parseText(title), subtitle: this.parseText(subtitle), level,
168
+ const bitNode = builder.bit(Object.assign(Object.assign(Object.assign({ bitType, textFormat: format, resourceType: resourceAttachmentType, id: this.convertStringToBreakscapedString(id), externalId: this.convertStringToBreakscapedString(externalId), spaceId: this.convertStringToBreakscapedString(spaceId), padletId: this.convertStringToBreakscapedString(padletId), jupyterId: this.convertStringToBreakscapedString(jupyterId), jupyterExecutionCount, aiGenerated: AIGenerated, releaseVersion: this.convertStringToBreakscapedString(releaseVersion), ageRange, lang: this.convertStringToBreakscapedString(lang), language: this.convertStringToBreakscapedString(language), computerLanguage: this.convertStringToBreakscapedString(computerLanguage), target: this.convertStringToBreakscapedString(target), tag: this.convertStringToBreakscapedString(tag), icon: this.convertStringToBreakscapedString(icon), iconTag: this.convertStringToBreakscapedString(iconTag), colorTag: this.convertStringToBreakscapedString(colorTag), flashcardSet: this.convertStringToBreakscapedString(flashcardSet), subtype: this.convertStringToBreakscapedString(subtype), bookAlias: this.convertStringToBreakscapedString(bookAlias), coverImage: this.convertStringToBreakscapedString(coverImage), publisher: this.convertStringToBreakscapedString(publisher), publications: this.convertStringToBreakscapedString(publications), author: this.convertStringToBreakscapedString(author), date: this.convertStringToBreakscapedString(date), location: this.convertStringToBreakscapedString(location), theme: this.convertStringToBreakscapedString(theme), kind: this.convertStringToBreakscapedString(kind), action: this.convertStringToBreakscapedString(action), duration: this.convertStringToBreakscapedString(duration), referenceProperty: this.convertStringToBreakscapedString(referenceProperty), thumbImage: this.convertStringToBreakscapedString(thumbImage), focusX,
169
+ focusY, deeplink: this.convertStringToBreakscapedString(deeplink), externalLink: this.convertStringToBreakscapedString(externalLink), externalLinkText: this.convertStringToBreakscapedString(externalLinkText), videoCallLink: this.convertStringToBreakscapedString(videoCallLink), bot: this.convertStringToBreakscapedString(bot), list: this.convertStringToBreakscapedString(list), textReference: this.convertStringToBreakscapedString(textReference), isTracked,
170
+ isInfoOnly, labelTrue: this.convertStringToBreakscapedString(labelTrue), labelFalse: this.convertStringToBreakscapedString(labelFalse), content2Buy: this.convertStringToBreakscapedString(content2Buy), quotedPerson: this.convertStringToBreakscapedString(quotedPerson), reasonableNumOfChars,
171
+ maxCreatedBits, book: this.convertStringToBreakscapedString(book), title: this.convertJsonTextToBreakscapedString(title), subtitle: this.convertJsonTextToBreakscapedString(subtitle), level,
172
172
  toc,
173
- progress, anchor: this.parseText(anchor), reference: this.parseText(reference), referenceEnd: this.parseText(referenceEnd) }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), this.parseExample(example)), { imageSource: imageSourceNode, partner: partnerNode, markConfig: markConfigNode, resources: resourcesNode, body: bodyNode, sampleSolution: this.parseText(sampleSolution), elements: this.parseText(elements), flashcards: flashcardNodes, statements: statementNodes, responses: responseNodes, quizzes: quizNodes, heading: headingNode, pairs: pairsNodes, matrix: matrixNodes, choices: choiceNodes, questions: questionNodes, botResponses: botResponseNodes, footer: footerNode }));
173
+ progress, anchor: this.convertStringToBreakscapedString(anchor), reference: this.convertStringToBreakscapedString(reference), referenceEnd: this.convertStringToBreakscapedString(referenceEnd) }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), this.parseExample(example)), { imageSource: imageSourceNode, partner: partnerNode, markConfig: markConfigNode, resources: resourcesNode, body: bodyNode, sampleSolution: this.convertStringToBreakscapedString(sampleSolution), elements: this.convertStringToBreakscapedString(elements), flashcards: flashcardNodes, statements: statementNodes, responses: responseNodes, quizzes: quizNodes, heading: headingNode, pairs: pairsNodes, matrix: matrixNodes, choices: choiceNodes, questions: questionNodes, botResponses: botResponseNodes, footer: footerNode }));
174
174
  return bitNode;
175
175
  }
176
176
  imageSourceBitToAst(imageSource) {
@@ -179,9 +179,9 @@ class JsonParser {
179
179
  if (imageSource) {
180
180
  const { url, mockupId, format, size, trim } = imageSource;
181
181
  node = builder.imageSource({
182
- url: (_a = this.parseText(url)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING,
183
- mockupId: (_b = this.parseText(mockupId)) !== null && _b !== void 0 ? _b : Breakscape.EMPTY_STRING,
184
- format: this.parseText(format),
182
+ url: (_a = this.convertStringToBreakscapedString(url)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING,
183
+ mockupId: (_b = this.convertStringToBreakscapedString(mockupId)) !== null && _b !== void 0 ? _b : Breakscape.EMPTY_STRING,
184
+ format: this.convertStringToBreakscapedString(format),
185
185
  size,
186
186
  trim,
187
187
  });
@@ -194,7 +194,7 @@ class JsonParser {
194
194
  if (partner) {
195
195
  const avatarImage = this.resourceDataToAst(ResourceTag.image, partner.avatarImage);
196
196
  node = builder.partner({
197
- name: (_a = this.parseText(partner.name)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING,
197
+ name: (_a = this.convertStringToBreakscapedString(partner.name)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING,
198
198
  avatarImage,
199
199
  });
200
200
  }
@@ -207,9 +207,9 @@ class JsonParser {
207
207
  for (const m of marks) {
208
208
  const { mark, color, emphasis } = m;
209
209
  const node = builder.markConfig({
210
- mark: (_a = this.parseText(mark)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING,
211
- color: this.parseText(color),
212
- emphasis: this.parseText(emphasis),
210
+ mark: (_a = this.convertStringToBreakscapedString(mark)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING,
211
+ color: this.convertStringToBreakscapedString(color),
212
+ emphasis: this.convertStringToBreakscapedString(emphasis),
213
213
  });
214
214
  nodes.push(node);
215
215
  }
@@ -224,7 +224,7 @@ class JsonParser {
224
224
  if (Array.isArray(flashcards)) {
225
225
  for (const c of flashcards) {
226
226
  const { question, answer, alternativeAnswers, item, lead, hint, instruction, example } = c;
227
- const node = builder.flashcard(Object.assign(Object.assign({ question: (_a = this.parseText(question)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING, answer: this.parseText(answer), alternativeAnswers: this.parseText(alternativeAnswers) }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), this.parseExample(example)));
227
+ const node = builder.flashcard(Object.assign(Object.assign({ question: (_a = this.convertStringToBreakscapedString(question)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING, answer: this.convertStringToBreakscapedString(answer), alternativeAnswers: this.convertStringToBreakscapedString(alternativeAnswers) }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), this.parseExample(example)));
228
228
  nodes.push(node);
229
229
  }
230
230
  }
@@ -236,13 +236,13 @@ class JsonParser {
236
236
  var _a, _b;
237
237
  const nodes = [];
238
238
  if (statement) {
239
- const node = builder.statement(Object.assign({ text: (_a = this.parseText(statement)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING, isCorrect: isCorrect !== null && isCorrect !== void 0 ? isCorrect : false }, this.parseExample(example)));
239
+ const node = builder.statement(Object.assign({ text: (_a = this.convertStringToBreakscapedString(statement)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING, isCorrect: isCorrect !== null && isCorrect !== void 0 ? isCorrect : false }, this.parseExample(example)));
240
240
  nodes.push(node);
241
241
  }
242
242
  if (Array.isArray(statements)) {
243
243
  for (const s of statements) {
244
244
  const { statement, isCorrect, item, lead, hint, instruction, example } = s;
245
- const node = builder.statement(Object.assign(Object.assign({ text: (_b = this.parseText(statement)) !== null && _b !== void 0 ? _b : Breakscape.EMPTY_STRING, isCorrect }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), this.parseExample(example)));
245
+ const node = builder.statement(Object.assign(Object.assign({ text: (_b = this.convertStringToBreakscapedString(statement)) !== null && _b !== void 0 ? _b : Breakscape.EMPTY_STRING, isCorrect }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), this.parseExample(example)));
246
246
  nodes.push(node);
247
247
  }
248
248
  }
@@ -256,7 +256,7 @@ class JsonParser {
256
256
  if (Array.isArray(choices)) {
257
257
  for (const c of choices) {
258
258
  const { choice, isCorrect, item, lead, hint, instruction, example } = c;
259
- const node = builder.choice(Object.assign(Object.assign({ text: (_a = this.parseText(choice)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING, isCorrect }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), this.parseExample(example)));
259
+ const node = builder.choice(Object.assign(Object.assign({ text: (_a = this.convertStringToBreakscapedString(choice)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING, isCorrect }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), this.parseExample(example)));
260
260
  nodes.push(node);
261
261
  }
262
262
  }
@@ -273,7 +273,7 @@ class JsonParser {
273
273
  if (Array.isArray(responses)) {
274
274
  for (const r of responses) {
275
275
  const { response, isCorrect, item, lead, hint, instruction, example } = r;
276
- const node = builder.response(Object.assign(Object.assign({ text: (_a = this.parseText(response)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING, isCorrect }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), this.parseExample(example)));
276
+ const node = builder.response(Object.assign(Object.assign({ text: (_a = this.convertStringToBreakscapedString(response)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING, isCorrect }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), this.parseExample(example)));
277
277
  nodes.push(node);
278
278
  }
279
279
  }
@@ -287,7 +287,7 @@ class JsonParser {
287
287
  if (Array.isArray(options)) {
288
288
  for (const o of options) {
289
289
  const { text, isCorrect, item, lead, hint, instruction, example } = o;
290
- const node = builder.selectOption(Object.assign(Object.assign({ text: (_a = this.parseText(text)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING, isCorrect }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), this.parseExample(example)));
290
+ const node = builder.selectOption(Object.assign(Object.assign({ text: (_a = this.convertStringToBreakscapedString(text)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING, isCorrect }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), this.parseExample(example)));
291
291
  nodes.push(node);
292
292
  }
293
293
  }
@@ -299,7 +299,7 @@ class JsonParser {
299
299
  if (Array.isArray(highlightTexts)) {
300
300
  for (const t of highlightTexts) {
301
301
  const { text, isCorrect, isHighlighted, item, lead, hint, instruction, example } = t;
302
- const node = builder.highlightText(Object.assign(Object.assign({ text: (_a = this.parseText(text)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING, isCorrect,
302
+ const node = builder.highlightText(Object.assign(Object.assign({ text: (_a = this.convertStringToBreakscapedString(text)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING, isCorrect,
303
303
  isHighlighted }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), this.parseExample(example)));
304
304
  nodes.push(node);
305
305
  }
@@ -326,8 +326,8 @@ class JsonParser {
326
326
  let node;
327
327
  if (heading) {
328
328
  node = builder.heading({
329
- forKeys: (_a = this.parseText(heading.forKeys)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING,
330
- forValues: (_b = this.parseText(heading.forValues)) !== null && _b !== void 0 ? _b : [],
329
+ forKeys: (_a = this.convertStringToBreakscapedString(heading.forKeys)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING,
330
+ forValues: (_b = this.convertStringToBreakscapedString(heading.forValues)) !== null && _b !== void 0 ? _b : [],
331
331
  });
332
332
  }
333
333
  return node;
@@ -340,7 +340,7 @@ class JsonParser {
340
340
  const { key, keyAudio, keyImage, values, item, lead, hint, instruction, example, isCaseSensitive } = p;
341
341
  const audio = this.resourceDataToAst(ResourceTag.audio, keyAudio);
342
342
  const image = this.resourceDataToAst(ResourceTag.image, keyImage);
343
- const node = builder.pair(Object.assign(Object.assign(Object.assign({ key: this.parseText(key), keyAudio: audio, keyImage: image, values: (_a = this.parseText(values)) !== null && _a !== void 0 ? _a : [] }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), this.parseExample(example)), { isCaseSensitive }));
343
+ const node = builder.pair(Object.assign(Object.assign(Object.assign({ key: this.convertStringToBreakscapedString(key), keyAudio: audio, keyImage: image, values: (_a = this.convertStringToBreakscapedString(values)) !== null && _a !== void 0 ? _a : [] }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), this.parseExample(example)), { isCaseSensitive }));
344
344
  nodes.push(node);
345
345
  }
346
346
  }
@@ -354,7 +354,7 @@ class JsonParser {
354
354
  if (Array.isArray(matrix)) {
355
355
  for (const m of matrix) {
356
356
  const { key, cells, item, lead, hint, instruction, example } = m;
357
- const node = builder.matrix(Object.assign(Object.assign({ key: (_a = this.parseText(key)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING, cells: (_b = this.matrixCellsToAst(cells)) !== null && _b !== void 0 ? _b : [] }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), this.parseExample(example)));
357
+ const node = builder.matrix(Object.assign(Object.assign({ key: (_a = this.convertStringToBreakscapedString(key)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING, cells: (_b = this.matrixCellsToAst(cells)) !== null && _b !== void 0 ? _b : [] }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), this.parseExample(example)));
358
358
  nodes.push(node);
359
359
  }
360
360
  }
@@ -368,7 +368,7 @@ class JsonParser {
368
368
  if (Array.isArray(matrixCells)) {
369
369
  for (const mc of matrixCells) {
370
370
  const { values, item, lead, hint, instruction, isCaseSensitive, example } = mc;
371
- const node = builder.matrixCell(Object.assign(Object.assign(Object.assign({ values: (_a = this.parseText(values)) !== null && _a !== void 0 ? _a : [] }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), { isCaseSensitive }), this.parseExample(example)));
371
+ const node = builder.matrixCell(Object.assign(Object.assign(Object.assign({ values: (_a = this.convertStringToBreakscapedString(values)) !== null && _a !== void 0 ? _a : [] }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), { isCaseSensitive }), this.parseExample(example)));
372
372
  nodes.push(node);
373
373
  }
374
374
  }
@@ -382,7 +382,7 @@ class JsonParser {
382
382
  if (Array.isArray(questions)) {
383
383
  for (const q of questions) {
384
384
  const { question, partialAnswer, sampleSolution, item, lead, hint, instruction, example, reasonableNumOfChars, } = q;
385
- const node = builder.question(Object.assign(Object.assign(Object.assign({ question: (_a = this.parseText(question)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING, partialAnswer: this.parseText(partialAnswer), sampleSolution: this.parseText(sampleSolution) }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), this.parseExample(example)), { reasonableNumOfChars }));
385
+ const node = builder.question(Object.assign(Object.assign(Object.assign({ question: (_a = this.convertStringToBreakscapedString(question)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING, partialAnswer: this.convertStringToBreakscapedString(partialAnswer), sampleSolution: this.convertStringToBreakscapedString(sampleSolution) }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), this.parseExample(example)), { reasonableNumOfChars }));
386
386
  nodes.push(node);
387
387
  }
388
388
  }
@@ -400,12 +400,12 @@ class JsonParser {
400
400
  for (const r of responses) {
401
401
  const { response, reaction, feedback, item, lead, hint } = r;
402
402
  const node = builder.botResponse({
403
- response: (_a = this.parseText(response)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING,
404
- reaction: (_b = this.parseText(reaction)) !== null && _b !== void 0 ? _b : Breakscape.EMPTY_STRING,
405
- feedback: (_c = this.parseText(feedback)) !== null && _c !== void 0 ? _c : Breakscape.EMPTY_STRING,
406
- item: this.parseText(item),
407
- lead: this.parseText(lead),
408
- hint: this.parseText(hint),
403
+ response: (_a = this.convertStringToBreakscapedString(response)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING,
404
+ reaction: (_b = this.convertStringToBreakscapedString(reaction)) !== null && _b !== void 0 ? _b : Breakscape.EMPTY_STRING,
405
+ feedback: (_c = this.convertStringToBreakscapedString(feedback)) !== null && _c !== void 0 ? _c : Breakscape.EMPTY_STRING,
406
+ item: this.convertJsonTextToBreakscapedString(item),
407
+ lead: this.convertJsonTextToBreakscapedString(lead),
408
+ hint: this.convertJsonTextToBreakscapedString(hint),
409
409
  });
410
410
  nodes.push(node);
411
411
  }
@@ -480,19 +480,19 @@ class JsonParser {
480
480
  node = resourceBuilder.resource({
481
481
  type,
482
482
  // Generic (except Article / Document)
483
- value: this.parseText(url),
483
+ value: this.convertStringToBreakscapedString(url),
484
484
  // ImageLikeResource / AudioLikeResource / VideoLikeResource / Article / Document
485
- format: this.parseText(data.format),
485
+ format: this.convertStringToBreakscapedString(data.format),
486
486
  // ImageLikeResource
487
- src1x: this.parseText(data.src1x),
488
- src2x: this.parseText(data.src2x),
489
- src3x: this.parseText(data.src3x),
490
- src4x: this.parseText(data.src4x),
491
- caption: this.parseText(data.caption),
487
+ src1x: this.convertStringToBreakscapedString(data.src1x),
488
+ src2x: this.convertStringToBreakscapedString(data.src2x),
489
+ src3x: this.convertStringToBreakscapedString(data.src3x),
490
+ src4x: this.convertStringToBreakscapedString(data.src4x),
491
+ caption: this.convertJsonTextToBreakscapedString(data.caption),
492
492
  // ImageLikeResource / VideoLikeResource
493
493
  width: (_a = data.width) !== null && _a !== void 0 ? _a : undefined,
494
494
  height: (_b = data.height) !== null && _b !== void 0 ? _b : undefined,
495
- alt: this.parseText(data.alt),
495
+ alt: this.convertStringToBreakscapedString(data.alt),
496
496
  // VideoLikeResource
497
497
  duration: data.duration,
498
498
  mute: data.mute,
@@ -502,10 +502,10 @@ class JsonParser {
502
502
  posterImage,
503
503
  thumbnails,
504
504
  // WebsiteLinkResource
505
- siteName: this.parseText(data.siteName),
505
+ siteName: this.convertStringToBreakscapedString(data.siteName),
506
506
  // Generic Resource
507
- license: this.parseText(data.license),
508
- copyright: this.parseText(data.copyright),
507
+ license: this.convertStringToBreakscapedString(data.license),
508
+ copyright: this.convertStringToBreakscapedString(data.copyright),
509
509
  showInIndex: data.showInIndex,
510
510
  });
511
511
  }
@@ -518,12 +518,13 @@ class JsonParser {
518
518
  if (Array.isArray(body)) {
519
519
  // Body is an array (prosemirror like JSON)
520
520
  // Parse the body to string in case it is in JSON format
521
- bodyStr = this.parseText(body, textFormat);
521
+ bodyStr = this.convertJsonTextToBreakscapedString(body, textFormat);
522
522
  // Get the placeholders from the text parser
523
523
  placeholders = this.textGenerator.getPlaceholders();
524
524
  }
525
525
  else {
526
526
  // Body is a string (legacy)
527
+ // bodyStr = this.parseText(body, textFormat);
527
528
  bodyStr = body;
528
529
  }
529
530
  // Placeholders
@@ -554,8 +555,7 @@ class JsonParser {
554
555
  return node;
555
556
  }
556
557
  bodyTextToAst(bodyText) {
557
- var _a;
558
- return builder.bodyText({ text: (_a = this.parseText(bodyText)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING });
558
+ return builder.bodyText({ text: bodyText !== null && bodyText !== void 0 ? bodyText : Breakscape.EMPTY_STRING });
559
559
  }
560
560
  bodyBitToAst(bit) {
561
561
  switch (bit.type) {
@@ -576,10 +576,10 @@ class JsonParser {
576
576
  return hightlight;
577
577
  }
578
578
  }
579
- return this.bodyTextToAst('');
579
+ return this.bodyTextToAst(Breakscape.EMPTY_STRING);
580
580
  }
581
581
  footerToAst(footerText, textFormat) {
582
- const text = this.parseText(footerText, textFormat);
582
+ const text = this.convertJsonTextToBreakscapedString(footerText, textFormat);
583
583
  if (text) {
584
584
  return builder.footerText({ text });
585
585
  }
@@ -601,14 +601,14 @@ class JsonParser {
601
601
  var _a;
602
602
  const { item, lead, hint, instruction, example, isCaseSensitive, solutions } = bit;
603
603
  // Build bit
604
- const bitNode = builder.gap(Object.assign(Object.assign(Object.assign({ solutions: (_a = this.parseText(solutions)) !== null && _a !== void 0 ? _a : [] }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), this.parseExample(example)), { isCaseSensitive }));
604
+ const bitNode = builder.gap(Object.assign(Object.assign(Object.assign({ solutions: (_a = this.convertStringToBreakscapedString(solutions)) !== null && _a !== void 0 ? _a : [] }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), this.parseExample(example)), { isCaseSensitive }));
605
605
  return bitNode;
606
606
  }
607
607
  markBitToAst(bit) {
608
608
  var _a;
609
609
  const { solution, mark, item, lead, hint, instruction, example } = bit;
610
610
  // Build bit
611
- const bitNode = builder.mark(Object.assign(Object.assign({ solution: (_a = this.parseText(solution)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING, mark: this.parseText(mark) }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), this.parseExample(example)));
611
+ const bitNode = builder.mark(Object.assign(Object.assign({ solution: (_a = this.convertStringToBreakscapedString(solution)) !== null && _a !== void 0 ? _a : Breakscape.EMPTY_STRING, mark: this.convertStringToBreakscapedString(mark) }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), this.parseExample(example)));
612
612
  return bitNode;
613
613
  }
614
614
  selectBitToAst(bit) {
@@ -616,7 +616,7 @@ class JsonParser {
616
616
  // Build options bits
617
617
  const selectOptionNodes = this.selectOptionBitsToAst(options);
618
618
  // Build bit
619
- const node = builder.select(Object.assign(Object.assign({ options: selectOptionNodes, prefix: this.parseText(prefix), postfix: this.parseText(postfix) }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), this.parseExample(example)));
619
+ const node = builder.select(Object.assign(Object.assign({ options: selectOptionNodes, prefix: this.convertStringToBreakscapedString(prefix), postfix: this.convertStringToBreakscapedString(postfix) }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), this.parseExample(example)));
620
620
  return node;
621
621
  }
622
622
  highlightBitToAst(bit) {
@@ -624,38 +624,45 @@ class JsonParser {
624
624
  // Build options bits
625
625
  const highlightTextNodes = this.highlightTextBitsToAst(texts);
626
626
  // Build bit
627
- const node = builder.highlight(Object.assign(Object.assign({ texts: highlightTextNodes, prefix: this.parseText(prefix), postfix: this.parseText(postfix) }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), this.parseExample(example)));
627
+ const node = builder.highlight(Object.assign(Object.assign({ texts: highlightTextNodes, prefix: this.convertStringToBreakscapedString(prefix), postfix: this.convertStringToBreakscapedString(postfix) }, this.parseItemLeadHintInstruction(item, lead, hint, instruction)), this.parseExample(example)));
628
628
  return node;
629
629
  }
630
630
  parseItemLeadHintInstruction(item, lead, hint, instruction) {
631
631
  return {
632
- item: this.parseText(item),
633
- lead: this.parseText(lead),
634
- hint: this.parseText(hint),
635
- instruction: this.parseText(instruction),
632
+ item: this.convertJsonTextToBreakscapedString(item),
633
+ lead: this.convertJsonTextToBreakscapedString(lead),
634
+ hint: this.convertJsonTextToBreakscapedString(hint),
635
+ instruction: this.convertJsonTextToBreakscapedString(instruction),
636
636
  };
637
637
  }
638
638
  parseExample(example) {
639
639
  if (example == null)
640
640
  return undefined;
641
- const exampleStr = this.parseText(example);
641
+ const exampleStr = this.convertJsonTextToBreakscapedString(example);
642
642
  if (exampleStr) {
643
643
  return { example: exampleStr };
644
644
  }
645
645
  return { example: !!example };
646
646
  }
647
647
  /**
648
- * Parse the text from the JSON to convert it to the breakscaped format
649
- * The text in is either a string or TextAst.
648
+ * Convert the JsonText from the JSON to the AST format:
649
+ * Input:
650
+ * - Bitmark v2: breakscaped string
651
+ * - Bitmark v3: bitmark text JSON (TextAst)
652
+ * Output:
653
+ * - breakscaped string
650
654
  *
651
- * @param text string or TextAst or string[] or TextAst[]
655
+ * In the case of Bitmark v2 type texts, there is nothing to do but cast the type.
656
+ *
657
+ * @param breakscaped string or TextAst or breakscaped string[] or TextAst[]
652
658
  * @param textFormat format of TextAst
653
659
  * @returns Breakscaped string or breakscaped string[]
654
660
  */
655
- parseText(text, textFormat) {
661
+ convertJsonTextToBreakscapedString(text, textFormat) {
656
662
  if (text == null)
657
663
  return undefined;
658
664
  if (this.textParser.isAst(text)) {
665
+ // Use the text generator to convert the TextAst to breakscaped string
659
666
  // this.ast.printTree(text, NodeType.textAst);
660
667
  const parsedText = this.textGenerator.generateSync(text, textFormat);
661
668
  return parsedText;
@@ -665,16 +672,45 @@ class JsonParser {
665
672
  for (let i = 0, len = text.length; i < len; i++) {
666
673
  const t = text[i];
667
674
  if (this.textParser.isAst(t)) {
675
+ // Use the text generator to convert the TextAst to breakscaped string
668
676
  // this.ast.printTree(text, NodeType.textAst);
669
677
  const parsedText = this.textGenerator.generateSync(t, textFormat);
670
678
  strArray[i] = parsedText;
671
679
  }
672
680
  else {
673
- strArray[i] = Breakscape.breakscape(t);
681
+ // strArray[i] = Breakscape.breakscape(t as string);
682
+ strArray[i] = t;
674
683
  }
675
684
  }
676
685
  return strArray;
677
686
  }
687
+ // return Breakscape.breakscape(text as string) as R;
688
+ return text;
689
+ }
690
+ /**
691
+ * Convert the string from the JSON to the AST format:
692
+ * Input:
693
+ * - Bitmark v2/v3: string
694
+ * Output:
695
+ * - breakscaped string
696
+ *
697
+ * In the case of Bitmark v2 type texts, there is nothing to do but cast the type.
698
+ *
699
+ * @param text string or TextAst or string[] or TextAst[]
700
+ * @param textFormat format of TextAst
701
+ * @returns Breakscaped string or breakscaped string[]
702
+ */
703
+ convertStringToBreakscapedString(text) {
704
+ if (text == null)
705
+ return undefined;
706
+ if (Array.isArray(text)) {
707
+ const strArray = [];
708
+ for (let i = 0, len = text.length; i < len; i++) {
709
+ const t = text[i];
710
+ strArray[i] = Breakscape.breakscape(t);
711
+ }
712
+ return strArray;
713
+ }
678
714
  return Breakscape.breakscape(text);
679
715
  }
680
716
  }