@gmb/bitmark-parser-generator 1.0.11
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/LICENSE +7 -0
- package/README.md +183 -0
- package/dist/browser/bitmark-parser-generator-antlr.min.js +2 -0
- package/dist/browser/bitmark-parser-generator-antlr.min.js.LICENSE.txt +22 -0
- package/dist/browser/bitmark-parser-generator.min.js +1 -0
- package/dist/browser/bundle-report.html +39 -0
- package/dist/cjs/BitmarkParserGenerator.js +470 -0
- package/dist/cjs/BitmarkParserGenerator.js.map +1 -0
- package/dist/cjs/ast/Ast.js +216 -0
- package/dist/cjs/ast/Ast.js.map +1 -0
- package/dist/cjs/ast/BaseBuilder.js +72 -0
- package/dist/cjs/ast/BaseBuilder.js.map +1 -0
- package/dist/cjs/ast/Builder.js +607 -0
- package/dist/cjs/ast/Builder.js.map +1 -0
- package/dist/cjs/ast/ResourceBuilder.js +629 -0
- package/dist/cjs/ast/ResourceBuilder.js.map +1 -0
- package/dist/cjs/ast/rules/NodeValidator.js +137 -0
- package/dist/cjs/ast/rules/NodeValidator.js.map +1 -0
- package/dist/cjs/ast/writer/FileWriter.js +109 -0
- package/dist/cjs/ast/writer/FileWriter.js.map +1 -0
- package/dist/cjs/ast/writer/StreamWriter.js +76 -0
- package/dist/cjs/ast/writer/StreamWriter.js.map +1 -0
- package/dist/cjs/ast/writer/StringWriter.js +102 -0
- package/dist/cjs/ast/writer/StringWriter.js.map +1 -0
- package/dist/cjs/ast/writer/Writer.js +3 -0
- package/dist/cjs/ast/writer/Writer.js.map +1 -0
- package/dist/cjs/config/bits/_errorBitConfig.js +10 -0
- package/dist/cjs/config/bits/_errorBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/aiPromptBitConfig.js +12 -0
- package/dist/cjs/config/bits/aiPromptBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/anchorBitConfig.js +11 -0
- package/dist/cjs/config/bits/anchorBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/appLinkBitConfig.js +14 -0
- package/dist/cjs/config/bits/appLinkBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/articleAiBitConfig.js +13 -0
- package/dist/cjs/config/bits/articleAiBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/articleAttachmentBitConfig.js +12 -0
- package/dist/cjs/config/bits/articleAttachmentBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/articleBitConfig.js +12 -0
- package/dist/cjs/config/bits/articleBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/articleEmbedBitConfig.js +14 -0
- package/dist/cjs/config/bits/articleEmbedBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/articleLinkBitConfig.js +14 -0
- package/dist/cjs/config/bits/articleLinkBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/assignmentBitConfig.js +12 -0
- package/dist/cjs/config/bits/assignmentBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/audioBitConfig.js +14 -0
- package/dist/cjs/config/bits/audioBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/audioEmbedBitConfig.js +14 -0
- package/dist/cjs/config/bits/audioEmbedBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/audioLinkBitConfig.js +14 -0
- package/dist/cjs/config/bits/audioLinkBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/bitAliasBitConfig.js +12 -0
- package/dist/cjs/config/bits/bitAliasBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/bitBookEndingBitConfig.js +11 -0
- package/dist/cjs/config/bits/bitBookEndingBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/bitBookSummaryBitConfig.js +11 -0
- package/dist/cjs/config/bits/bitBookSummaryBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/blogArticleBitConfig.js +12 -0
- package/dist/cjs/config/bits/blogArticleBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/bookBitConfig.js +49 -0
- package/dist/cjs/config/bits/bookBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/botActionAnnounceBitConfig.js +11 -0
- package/dist/cjs/config/bits/botActionAnnounceBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/botActionRatingNumberBitConfig.js +11 -0
- package/dist/cjs/config/bits/botActionRatingNumberBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/botActionRemindBitConfig.js +11 -0
- package/dist/cjs/config/bits/botActionRemindBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/botActionResponseBitConfig.js +14 -0
- package/dist/cjs/config/bits/botActionResponseBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/botActionSaveBitConfig.js +11 -0
- package/dist/cjs/config/bits/botActionSaveBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/botActionSendBitConfig.js +12 -0
- package/dist/cjs/config/bits/botActionSendBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/botActionTrueFalseBitConfig.js +11 -0
- package/dist/cjs/config/bits/botActionTrueFalseBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/botInterviewBitConfig.js +11 -0
- package/dist/cjs/config/bits/botInterviewBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/browserImageBitConfig.js +15 -0
- package/dist/cjs/config/bits/browserImageBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/bugBitConfig.js +12 -0
- package/dist/cjs/config/bits/bugBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/card1BitConfig.js +12 -0
- package/dist/cjs/config/bits/card1BitConfig.js.map +1 -0
- package/dist/cjs/config/bits/chapterBitConfig.js +12 -0
- package/dist/cjs/config/bits/chapterBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/chapterSubjectMatterBitConfig.js +11 -0
- package/dist/cjs/config/bits/chapterSubjectMatterBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/chatBitConfig.js +11 -0
- package/dist/cjs/config/bits/chatBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/clozeAndMultipleChoiceTextBitConfig.js +13 -0
- package/dist/cjs/config/bits/clozeAndMultipleChoiceTextBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/clozeBitConfig.js +13 -0
- package/dist/cjs/config/bits/clozeBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/clozeInstructionGroupedBitConfig.js +13 -0
- package/dist/cjs/config/bits/clozeInstructionGroupedBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/clozeSolutionGroupedBitConfig.js +13 -0
- package/dist/cjs/config/bits/clozeSolutionGroupedBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/codeBitConfig.js +12 -0
- package/dist/cjs/config/bits/codeBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/conclusionBitConfig.js +12 -0
- package/dist/cjs/config/bits/conclusionBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/conversationBitConfig.js +19 -0
- package/dist/cjs/config/bits/conversationBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/correctionBitConfig.js +12 -0
- package/dist/cjs/config/bits/correctionBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/dangerBitConfig.js +12 -0
- package/dist/cjs/config/bits/dangerBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/details1BitConfig.js +11 -0
- package/dist/cjs/config/bits/details1BitConfig.js.map +1 -0
- package/dist/cjs/config/bits/detailsBitConfig.js +12 -0
- package/dist/cjs/config/bits/detailsBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/documentBitConfig.js +14 -0
- package/dist/cjs/config/bits/documentBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/documentDownloadBitConfig.js +14 -0
- package/dist/cjs/config/bits/documentDownloadBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/documentEmbedBitConfig.js +14 -0
- package/dist/cjs/config/bits/documentEmbedBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/documentLinkBitConfig.js +14 -0
- package/dist/cjs/config/bits/documentLinkBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/documentUploadBitConfig.js +11 -0
- package/dist/cjs/config/bits/documentUploadBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/editorialBitConfig.js +12 -0
- package/dist/cjs/config/bits/editorialBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/essayBitConfig.js +13 -0
- package/dist/cjs/config/bits/essayBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/exampleBitConfig.js +12 -0
- package/dist/cjs/config/bits/exampleBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/featuredBitConfig.js +12 -0
- package/dist/cjs/config/bits/featuredBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/flashcard1BitConfig.js +11 -0
- package/dist/cjs/config/bits/flashcard1BitConfig.js.map +1 -0
- package/dist/cjs/config/bits/flashcardBitConfig.js +11 -0
- package/dist/cjs/config/bits/flashcardBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/focusImageBitConfig.js +15 -0
- package/dist/cjs/config/bits/focusImageBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/footNoteBitConfig.js +12 -0
- package/dist/cjs/config/bits/footNoteBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/generic/cardSetBitConfigs.js +138 -0
- package/dist/cjs/config/bits/generic/cardSetBitConfigs.js.map +1 -0
- package/dist/cjs/config/bits/generic/chainBitConfigs.js +47 -0
- package/dist/cjs/config/bits/generic/chainBitConfigs.js.map +1 -0
- package/dist/cjs/config/bits/generic/resourceChainBitConfigs.js +197 -0
- package/dist/cjs/config/bits/generic/resourceChainBitConfigs.js.map +1 -0
- package/dist/cjs/config/bits/generic/standardBitConfigs.js +46 -0
- package/dist/cjs/config/bits/generic/standardBitConfigs.js.map +1 -0
- package/dist/cjs/config/bits/groupBornBitConfig.js +11 -0
- package/dist/cjs/config/bits/groupBornBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/groupDiedBitConfig.js +11 -0
- package/dist/cjs/config/bits/groupDiedBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/helpBitConfig.js +12 -0
- package/dist/cjs/config/bits/helpBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/highlightTextBitConfig.js +13 -0
- package/dist/cjs/config/bits/highlightTextBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/hintBitConfig.js +12 -0
- package/dist/cjs/config/bits/hintBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/imageBitConfig.js +14 -0
- package/dist/cjs/config/bits/imageBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/imageLinkBitConfig.js +14 -0
- package/dist/cjs/config/bits/imageLinkBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/imagePrototypeBitConfig.js +14 -0
- package/dist/cjs/config/bits/imagePrototypeBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/imageSuperWideBitConfig.js +14 -0
- package/dist/cjs/config/bits/imageSuperWideBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/imageZoomBitConfig.js +14 -0
- package/dist/cjs/config/bits/imageZoomBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/infoBitConfig.js +12 -0
- package/dist/cjs/config/bits/infoBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/internalLinkBitConfig.js +12 -0
- package/dist/cjs/config/bits/internalLinkBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/interviewBitConfig.js +15 -0
- package/dist/cjs/config/bits/interviewBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/interviewInstructionGroupedBitConfig.js +15 -0
- package/dist/cjs/config/bits/interviewInstructionGroupedBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/learningPathBitConfig.js +87 -0
- package/dist/cjs/config/bits/learningPathBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/markBitConfig.js +12 -0
- package/dist/cjs/config/bits/markBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/matchBitConfig.js +64 -0
- package/dist/cjs/config/bits/matchBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/messageBitConfig.js +12 -0
- package/dist/cjs/config/bits/messageBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/multipleChoice1BitConfig.js +13 -0
- package/dist/cjs/config/bits/multipleChoice1BitConfig.js.map +1 -0
- package/dist/cjs/config/bits/multipleChoiceBitConfig.js +16 -0
- package/dist/cjs/config/bits/multipleChoiceBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/multipleChoiceTextBitConfig.js +13 -0
- package/dist/cjs/config/bits/multipleChoiceTextBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/multipleResponse1BitConfig.js +13 -0
- package/dist/cjs/config/bits/multipleResponse1BitConfig.js.map +1 -0
- package/dist/cjs/config/bits/multipleResponseBitConfig.js +16 -0
- package/dist/cjs/config/bits/multipleResponseBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/newspaperArticleBitConfig.js +12 -0
- package/dist/cjs/config/bits/newspaperArticleBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/noteAiBitConfig.js +13 -0
- package/dist/cjs/config/bits/noteAiBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/noteBitConfig.js +12 -0
- package/dist/cjs/config/bits/noteBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/notebookArticleBitConfig.js +12 -0
- package/dist/cjs/config/bits/notebookArticleBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/pageBitConfig.js +12 -0
- package/dist/cjs/config/bits/pageBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/photoBitConfig.js +14 -0
- package/dist/cjs/config/bits/photoBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/preparationNoteBitConfig.js +12 -0
- package/dist/cjs/config/bits/preparationNoteBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/question1BitConfig.js +12 -0
- package/dist/cjs/config/bits/question1BitConfig.js.map +1 -0
- package/dist/cjs/config/bits/quoteBitConfig.js +12 -0
- package/dist/cjs/config/bits/quoteBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/ratingBitConfig.js +11 -0
- package/dist/cjs/config/bits/ratingBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/recordAudioBitConfig.js +11 -0
- package/dist/cjs/config/bits/recordAudioBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/releaseNoteBitConfig.js +13 -0
- package/dist/cjs/config/bits/releaseNoteBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/releaseNotesSummaryBitConfig.js +12 -0
- package/dist/cjs/config/bits/releaseNotesSummaryBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/remarkBitConfig.js +12 -0
- package/dist/cjs/config/bits/remarkBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/sampleSolutionBitConfig.js +15 -0
- package/dist/cjs/config/bits/sampleSolutionBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/screenshotBitConfig.js +14 -0
- package/dist/cjs/config/bits/screenshotBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/selfAssessmentBitConfig.js +12 -0
- package/dist/cjs/config/bits/selfAssessmentBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/sequenceBitConfig.js +15 -0
- package/dist/cjs/config/bits/sequenceBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/sideNoteBitConfig.js +12 -0
- package/dist/cjs/config/bits/sideNoteBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/statementBitConfig.js +12 -0
- package/dist/cjs/config/bits/statementBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/stickyNoteBitConfig.js +12 -0
- package/dist/cjs/config/bits/stickyNoteBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/stillImageFilmBitConfig.js +14 -0
- package/dist/cjs/config/bits/stillImageFilmBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/stillImageFilmEmbedBitConfig.js +14 -0
- package/dist/cjs/config/bits/stillImageFilmEmbedBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/stillImageFilmLinkBitConfig.js +14 -0
- package/dist/cjs/config/bits/stillImageFilmLinkBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/summaryAiBitConfig.js +13 -0
- package/dist/cjs/config/bits/summaryAiBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/summaryBitConfig.js +13 -0
- package/dist/cjs/config/bits/summaryBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/survey1BitConfig.js +12 -0
- package/dist/cjs/config/bits/survey1BitConfig.js.map +1 -0
- package/dist/cjs/config/bits/surveyAnonymous1BitConfig.js +12 -0
- package/dist/cjs/config/bits/surveyAnonymous1BitConfig.js.map +1 -0
- package/dist/cjs/config/bits/surveyAnonymousBitConfig.js +12 -0
- package/dist/cjs/config/bits/surveyAnonymousBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/surveyBitConfig.js +12 -0
- package/dist/cjs/config/bits/surveyBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/takePictureBitConfig.js +11 -0
- package/dist/cjs/config/bits/takePictureBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/tocBitConfig.js +11 -0
- package/dist/cjs/config/bits/tocBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/trueFalse1BitConfig.js +14 -0
- package/dist/cjs/config/bits/trueFalse1BitConfig.js.map +1 -0
- package/dist/cjs/config/bits/trueFalseBitConfig.js +16 -0
- package/dist/cjs/config/bits/trueFalseBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/vendorPadletEmbedBitConfig.js +12 -0
- package/dist/cjs/config/bits/vendorPadletEmbedBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/videoBitConfig.js +14 -0
- package/dist/cjs/config/bits/videoBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/videoEmbedBitConfig.js +14 -0
- package/dist/cjs/config/bits/videoEmbedBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/videoLandscapeBitConfig.js +14 -0
- package/dist/cjs/config/bits/videoLandscapeBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/videoLinkBitConfig.js +14 -0
- package/dist/cjs/config/bits/videoLinkBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/videoPortraitBitConfig.js +14 -0
- package/dist/cjs/config/bits/videoPortraitBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/warningBitConfig.js +12 -0
- package/dist/cjs/config/bits/warningBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/websiteLinkBitConfig.js +14 -0
- package/dist/cjs/config/bits/websiteLinkBitConfig.js.map +1 -0
- package/dist/cjs/config/bits/workbookArticleBitConfig.js +12 -0
- package/dist/cjs/config/bits/workbookArticleBitConfig.js.map +1 -0
- package/dist/cjs/config/config.js +177 -0
- package/dist/cjs/config/config.js.map +1 -0
- package/dist/cjs/config/properties/actionPropertyConfig.js +9 -0
- package/dist/cjs/config/properties/actionPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/ageRangePropertyConfig.js +8 -0
- package/dist/cjs/config/properties/ageRangePropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/aiGeneratedPropertyConfig.js +11 -0
- package/dist/cjs/config/properties/aiGeneratedPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/authorPropertyConfig.js +8 -0
- package/dist/cjs/config/properties/authorPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/bookPropertyConfig.js +9 -0
- package/dist/cjs/config/properties/bookPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/botPropertyConfig.js +8 -0
- package/dist/cjs/config/properties/botPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/caseSensitivePropertyConfig.js +11 -0
- package/dist/cjs/config/properties/caseSensitivePropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/computerLanguagePropertyConfig.js +9 -0
- package/dist/cjs/config/properties/computerLanguagePropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/coverImagePropertyConfig.js +8 -0
- package/dist/cjs/config/properties/coverImagePropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/datePropertyConfig.js +8 -0
- package/dist/cjs/config/properties/datePropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/deeplinkPropertyConfig.js +8 -0
- package/dist/cjs/config/properties/deeplinkPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/durationPropertyConfig.js +9 -0
- package/dist/cjs/config/properties/durationPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/examplePropertyConfig.js +9 -0
- package/dist/cjs/config/properties/examplePropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/externalIdPropertyConfig.js +8 -0
- package/dist/cjs/config/properties/externalIdPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/externalLinkPropertyConfig.js +9 -0
- package/dist/cjs/config/properties/externalLinkPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/externalLinkTextPropertyConfig.js +9 -0
- package/dist/cjs/config/properties/externalLinkTextPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/focusXPropertyConfig.js +9 -0
- package/dist/cjs/config/properties/focusXPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/focusYPropertyConfig.js +9 -0
- package/dist/cjs/config/properties/focusYPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/idPropertyConfig.js +8 -0
- package/dist/cjs/config/properties/idPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/isInfoOnlyPropertyConfig.js +9 -0
- package/dist/cjs/config/properties/isInfoOnlyPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/isTrackedPropertyConfig.js +9 -0
- package/dist/cjs/config/properties/isTrackedPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/kindPropertyConfig.js +9 -0
- package/dist/cjs/config/properties/kindPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/labelFalsePropertyConfig.js +9 -0
- package/dist/cjs/config/properties/labelFalsePropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/labelTruePropertyConfig.js +9 -0
- package/dist/cjs/config/properties/labelTruePropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/languagePropertyConfig.js +8 -0
- package/dist/cjs/config/properties/languagePropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/levelPropertyConfig.js +9 -0
- package/dist/cjs/config/properties/levelPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/listPropertyConfig.js +8 -0
- package/dist/cjs/config/properties/listPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/locationPropertyConfig.js +9 -0
- package/dist/cjs/config/properties/locationPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/longAnswerPropertyConfig.js +11 -0
- package/dist/cjs/config/properties/longAnswerPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/padletIdPropertyConfig.js +9 -0
- package/dist/cjs/config/properties/padletIdPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/partialAnswerPropertyConfig.js +9 -0
- package/dist/cjs/config/properties/partialAnswerPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/partnerPropertyConfig.js +9 -0
- package/dist/cjs/config/properties/partnerPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/progressPropertyConfig.js +10 -0
- package/dist/cjs/config/properties/progressPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/publicationsPropertyConfig.js +8 -0
- package/dist/cjs/config/properties/publicationsPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/publisherPropertyConfig.js +8 -0
- package/dist/cjs/config/properties/publisherPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/quotedPersonPropertyConfig.js +9 -0
- package/dist/cjs/config/properties/quotedPersonPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/reactionPropertyConfig.js +9 -0
- package/dist/cjs/config/properties/reactionPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/referencePropertyConfig.js +10 -0
- package/dist/cjs/config/properties/referencePropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/releaseVersionPropertyConfig.js +9 -0
- package/dist/cjs/config/properties/releaseVersionPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/resourcePropertyConfig.js +78 -0
- package/dist/cjs/config/properties/resourcePropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/sampleSolutionPropertyConfig.js +9 -0
- package/dist/cjs/config/properties/sampleSolutionPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/shortAnswerPropertyConfig.js +11 -0
- package/dist/cjs/config/properties/shortAnswerPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/spaceIdPropertyConfig.js +8 -0
- package/dist/cjs/config/properties/spaceIdPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/subjectPropertyConfig.js +8 -0
- package/dist/cjs/config/properties/subjectPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/subtypePropertyConfig.js +9 -0
- package/dist/cjs/config/properties/subtypePropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/textReferencePropertyConfig.js +9 -0
- package/dist/cjs/config/properties/textReferencePropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/themePropertyConfig.js +8 -0
- package/dist/cjs/config/properties/themePropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/thumbImagePropertyConfig.js +9 -0
- package/dist/cjs/config/properties/thumbImagePropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/tocPropertyConfig.js +10 -0
- package/dist/cjs/config/properties/tocPropertyConfig.js.map +1 -0
- package/dist/cjs/config/properties/videoCallLinkPropertyConfig copy.js +9 -0
- package/dist/cjs/config/properties/videoCallLinkPropertyConfig copy.js.map +1 -0
- package/dist/cjs/config/properties/videoCallLinkPropertyConfig.js +9 -0
- package/dist/cjs/config/properties/videoCallLinkPropertyConfig.js.map +1 -0
- package/dist/cjs/generated/build-info.js +10 -0
- package/dist/cjs/generated/build-info.js.map +1 -0
- package/dist/cjs/generated/parser/bitmark/bitmark-peggy-parser.js +3429 -0
- package/dist/cjs/generated/parser/bitmark/bitmark-peggy-parser.js.map +1 -0
- package/dist/cjs/generated/parser/text/text-peggy-parser.js +6897 -0
- package/dist/cjs/generated/parser/text/text-peggy-parser.js.map +1 -0
- package/dist/cjs/generator/Generator.js +3 -0
- package/dist/cjs/generator/Generator.js.map +1 -0
- package/dist/cjs/generator/bitmark/BitmarkFileGenerator.js +49 -0
- package/dist/cjs/generator/bitmark/BitmarkFileGenerator.js.map +1 -0
- package/dist/cjs/generator/bitmark/BitmarkGenerator.js +1202 -0
- package/dist/cjs/generator/bitmark/BitmarkGenerator.js.map +1 -0
- package/dist/cjs/generator/bitmark/BitmarkStringGenerator.js +51 -0
- package/dist/cjs/generator/bitmark/BitmarkStringGenerator.js.map +1 -0
- package/dist/cjs/generator/json/JsonFileGenerator.js +53 -0
- package/dist/cjs/generator/json/JsonFileGenerator.js.map +1 -0
- package/dist/cjs/generator/json/JsonGenerator.js +2049 -0
- package/dist/cjs/generator/json/JsonGenerator.js.map +1 -0
- package/dist/cjs/generator/json/JsonObjectGenerator.js +51 -0
- package/dist/cjs/generator/json/JsonObjectGenerator.js.map +1 -0
- package/dist/cjs/generator/json/JsonStringGenerator.js +50 -0
- package/dist/cjs/generator/json/JsonStringGenerator.js.map +1 -0
- package/dist/cjs/generator/text/TextGenerator.js +663 -0
- package/dist/cjs/generator/text/TextGenerator.js.map +1 -0
- package/dist/cjs/index.js +66 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/init/init.js +16 -0
- package/dist/cjs/init/init.js.map +1 -0
- package/dist/cjs/model/ast/NodeType.js +238 -0
- package/dist/cjs/model/ast/NodeType.js.map +1 -0
- package/dist/cjs/model/ast/Nodes.js +3 -0
- package/dist/cjs/model/ast/Nodes.js.map +1 -0
- package/dist/cjs/model/ast/TextNodes.js +3 -0
- package/dist/cjs/model/ast/TextNodes.js.map +1 -0
- package/dist/cjs/model/config/TagData.js +6 -0
- package/dist/cjs/model/config/TagData.js.map +1 -0
- package/dist/cjs/model/enum/BitType.js +185 -0
- package/dist/cjs/model/enum/BitType.js.map +1 -0
- package/dist/cjs/model/enum/BitmarkGeneratorOutput.js +2 -0
- package/dist/cjs/model/enum/BitmarkGeneratorOutput.js.map +1 -0
- package/dist/cjs/model/enum/BitmarkParserType.js +10 -0
- package/dist/cjs/model/enum/BitmarkParserType.js.map +1 -0
- package/dist/cjs/model/enum/BitmarkVersion.js +12 -0
- package/dist/cjs/model/enum/BitmarkVersion.js.map +1 -0
- package/dist/cjs/model/enum/BodyBitType.js +13 -0
- package/dist/cjs/model/enum/BodyBitType.js.map +1 -0
- package/dist/cjs/model/enum/CardSetType.js +15 -0
- package/dist/cjs/model/enum/CardSetType.js.map +1 -0
- package/dist/cjs/model/enum/CardSetVersion.js +10 -0
- package/dist/cjs/model/enum/CardSetVersion.js.map +1 -0
- package/dist/cjs/model/enum/PropertyKey.js +76 -0
- package/dist/cjs/model/enum/PropertyKey.js.map +1 -0
- package/dist/cjs/model/enum/ResourceType.js +31 -0
- package/dist/cjs/model/enum/ResourceType.js.map +1 -0
- package/dist/cjs/model/enum/TagType.js +22 -0
- package/dist/cjs/model/enum/TagType.js.map +1 -0
- package/dist/cjs/model/enum/TextFormat.js +11 -0
- package/dist/cjs/model/enum/TextFormat.js.map +1 -0
- package/dist/cjs/model/enum/TextMarkType.js +25 -0
- package/dist/cjs/model/enum/TextMarkType.js.map +1 -0
- package/dist/cjs/model/enum/TextNodeType.js +26 -0
- package/dist/cjs/model/enum/TextNodeType.js.map +1 -0
- package/dist/cjs/model/enum/TextSection.js +18 -0
- package/dist/cjs/model/enum/TextSection.js.map +1 -0
- package/dist/cjs/model/json/BitJson.js +3 -0
- package/dist/cjs/model/json/BitJson.js.map +1 -0
- package/dist/cjs/model/json/BitWrapperJson.js +3 -0
- package/dist/cjs/model/json/BitWrapperJson.js.map +1 -0
- package/dist/cjs/model/json/BodyBitJson.js +3 -0
- package/dist/cjs/model/json/BodyBitJson.js.map +1 -0
- package/dist/cjs/model/json/ParserJson.js +3 -0
- package/dist/cjs/model/json/ParserJson.js.map +1 -0
- package/dist/cjs/model/json/ResourceJson.js +3 -0
- package/dist/cjs/model/json/ResourceJson.js.map +1 -0
- package/dist/cjs/model/parser/ParserData.js +3 -0
- package/dist/cjs/model/parser/ParserData.js.map +1 -0
- package/dist/cjs/model/parser/ParserError.js +3 -0
- package/dist/cjs/model/parser/ParserError.js.map +1 -0
- package/dist/cjs/model/parser/ParserInfo.js +3 -0
- package/dist/cjs/model/parser/ParserInfo.js.map +1 -0
- package/dist/cjs/model/parser/ParserLocation.js +3 -0
- package/dist/cjs/model/parser/ParserLocation.js.map +1 -0
- package/dist/cjs/model/parser/ParserLocationRange.js +3 -0
- package/dist/cjs/model/parser/ParserLocationRange.js.map +1 -0
- package/dist/cjs/parser/bitmark/BitmarkParser.js +67 -0
- package/dist/cjs/parser/bitmark/BitmarkParser.js.map +1 -0
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParser.js +7 -0
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParser.js.map +1 -0
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserHelper.js +533 -0
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserHelper.js.map +1 -0
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js +575 -0
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +1 -0
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserTypes.js +64 -0
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserTypes.js.map +1 -0
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserValidator.js +610 -0
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserValidator.js.map +1 -0
- package/dist/cjs/parser/bitmark/peg/PeggyGrammarLocation.js +82 -0
- package/dist/cjs/parser/bitmark/peg/PeggyGrammarLocation.js.map +1 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +35 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +1 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/CardContentProcessor.js +405 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/CardContentProcessor.js.map +1 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +16 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +1 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/CommentTagContentProcessor.js +19 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/CommentTagContentProcessor.js.map +1 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +35 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +1 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js +42 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js.map +1 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +16 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +1 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.js +51 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.js.map +1 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +63 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +1 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js +16 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js.map +1 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js +115 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +1 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js +42 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +1 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js +177 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js.map +1 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js +18 -0
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js.map +1 -0
- package/dist/cjs/parser/json/JsonParser.js +592 -0
- package/dist/cjs/parser/json/JsonParser.js.map +1 -0
- package/dist/cjs/parser/text/TextParser.js +33 -0
- package/dist/cjs/parser/text/TextParser.js.map +1 -0
- package/dist/cjs/parser/text/peg/TextPegParser.js +7 -0
- package/dist/cjs/parser/text/peg/TextPegParser.js.map +1 -0
- package/dist/cjs/utils/ArrayUtils.js +43 -0
- package/dist/cjs/utils/ArrayUtils.js.map +1 -0
- package/dist/cjs/utils/BitUtils.js +34 -0
- package/dist/cjs/utils/BitUtils.js.map +1 -0
- package/dist/cjs/utils/BooleanUtils.js +62 -0
- package/dist/cjs/utils/BooleanUtils.js.map +1 -0
- package/dist/cjs/utils/FileUtils.js +65 -0
- package/dist/cjs/utils/FileUtils.js.map +1 -0
- package/dist/cjs/utils/NumberUtils.js +26 -0
- package/dist/cjs/utils/NumberUtils.js.map +1 -0
- package/dist/cjs/utils/ObjectUtils.js +203 -0
- package/dist/cjs/utils/ObjectUtils.js.map +1 -0
- package/dist/cjs/utils/StringUtils.js +134 -0
- package/dist/cjs/utils/StringUtils.js.map +1 -0
- package/dist/cjs/utils/UrlUtils.js +37 -0
- package/dist/cjs/utils/UrlUtils.js.map +1 -0
- package/dist/cjs/utils/env/Env.js +131 -0
- package/dist/cjs/utils/env/Env.js.map +1 -0
- package/dist/cjs/utils/env/Environment.js +15 -0
- package/dist/cjs/utils/env/Environment.js.map +1 -0
- package/dist/cjs/utils/env/Os.js +14 -0
- package/dist/cjs/utils/env/Os.js.map +1 -0
- package/dist/cjs/utils/env/Version.js +12 -0
- package/dist/cjs/utils/env/Version.js.map +1 -0
- package/dist/cjs/utils/env/userAgent.js +89 -0
- package/dist/cjs/utils/env/userAgent.js.map +1 -0
- package/dist/cjs/utils/polyfill/fs.js +15 -0
- package/dist/cjs/utils/polyfill/fs.js.map +1 -0
- package/dist/esm/BitmarkParserGenerator.js +440 -0
- package/dist/esm/BitmarkParserGenerator.js.map +1 -0
- package/dist/esm/ast/Ast.js +213 -0
- package/dist/esm/ast/Ast.js.map +1 -0
- package/dist/esm/ast/BaseBuilder.js +69 -0
- package/dist/esm/ast/BaseBuilder.js.map +1 -0
- package/dist/esm/ast/Builder.js +604 -0
- package/dist/esm/ast/Builder.js.map +1 -0
- package/dist/esm/ast/ResourceBuilder.js +626 -0
- package/dist/esm/ast/ResourceBuilder.js.map +1 -0
- package/dist/esm/ast/rules/NodeValidator.js +134 -0
- package/dist/esm/ast/rules/NodeValidator.js.map +1 -0
- package/dist/esm/ast/writer/FileWriter.js +80 -0
- package/dist/esm/ast/writer/FileWriter.js.map +1 -0
- package/dist/esm/ast/writer/StreamWriter.js +70 -0
- package/dist/esm/ast/writer/StreamWriter.js.map +1 -0
- package/dist/esm/ast/writer/StringWriter.js +99 -0
- package/dist/esm/ast/writer/StringWriter.js.map +1 -0
- package/dist/esm/ast/writer/Writer.js +2 -0
- package/dist/esm/ast/writer/Writer.js.map +1 -0
- package/dist/esm/config/bits/_errorBitConfig.js +8 -0
- package/dist/esm/config/bits/_errorBitConfig.js.map +1 -0
- package/dist/esm/config/bits/aiPromptBitConfig.js +10 -0
- package/dist/esm/config/bits/aiPromptBitConfig.js.map +1 -0
- package/dist/esm/config/bits/anchorBitConfig.js +9 -0
- package/dist/esm/config/bits/anchorBitConfig.js.map +1 -0
- package/dist/esm/config/bits/appLinkBitConfig.js +12 -0
- package/dist/esm/config/bits/appLinkBitConfig.js.map +1 -0
- package/dist/esm/config/bits/articleAiBitConfig.js +11 -0
- package/dist/esm/config/bits/articleAiBitConfig.js.map +1 -0
- package/dist/esm/config/bits/articleAttachmentBitConfig.js +10 -0
- package/dist/esm/config/bits/articleAttachmentBitConfig.js.map +1 -0
- package/dist/esm/config/bits/articleBitConfig.js +10 -0
- package/dist/esm/config/bits/articleBitConfig.js.map +1 -0
- package/dist/esm/config/bits/articleEmbedBitConfig.js +12 -0
- package/dist/esm/config/bits/articleEmbedBitConfig.js.map +1 -0
- package/dist/esm/config/bits/articleLinkBitConfig.js +12 -0
- package/dist/esm/config/bits/articleLinkBitConfig.js.map +1 -0
- package/dist/esm/config/bits/assignmentBitConfig.js +10 -0
- package/dist/esm/config/bits/assignmentBitConfig.js.map +1 -0
- package/dist/esm/config/bits/audioBitConfig.js +12 -0
- package/dist/esm/config/bits/audioBitConfig.js.map +1 -0
- package/dist/esm/config/bits/audioEmbedBitConfig.js +12 -0
- package/dist/esm/config/bits/audioEmbedBitConfig.js.map +1 -0
- package/dist/esm/config/bits/audioLinkBitConfig.js +12 -0
- package/dist/esm/config/bits/audioLinkBitConfig.js.map +1 -0
- package/dist/esm/config/bits/bitAliasBitConfig.js +10 -0
- package/dist/esm/config/bits/bitAliasBitConfig.js.map +1 -0
- package/dist/esm/config/bits/bitBookEndingBitConfig.js +9 -0
- package/dist/esm/config/bits/bitBookEndingBitConfig.js.map +1 -0
- package/dist/esm/config/bits/bitBookSummaryBitConfig.js +9 -0
- package/dist/esm/config/bits/bitBookSummaryBitConfig.js.map +1 -0
- package/dist/esm/config/bits/blogArticleBitConfig.js +10 -0
- package/dist/esm/config/bits/blogArticleBitConfig.js.map +1 -0
- package/dist/esm/config/bits/bookBitConfig.js +47 -0
- package/dist/esm/config/bits/bookBitConfig.js.map +1 -0
- package/dist/esm/config/bits/botActionAnnounceBitConfig.js +9 -0
- package/dist/esm/config/bits/botActionAnnounceBitConfig.js.map +1 -0
- package/dist/esm/config/bits/botActionRatingNumberBitConfig.js +9 -0
- package/dist/esm/config/bits/botActionRatingNumberBitConfig.js.map +1 -0
- package/dist/esm/config/bits/botActionRemindBitConfig.js +9 -0
- package/dist/esm/config/bits/botActionRemindBitConfig.js.map +1 -0
- package/dist/esm/config/bits/botActionResponseBitConfig.js +12 -0
- package/dist/esm/config/bits/botActionResponseBitConfig.js.map +1 -0
- package/dist/esm/config/bits/botActionSaveBitConfig.js +9 -0
- package/dist/esm/config/bits/botActionSaveBitConfig.js.map +1 -0
- package/dist/esm/config/bits/botActionSendBitConfig.js +10 -0
- package/dist/esm/config/bits/botActionSendBitConfig.js.map +1 -0
- package/dist/esm/config/bits/botActionTrueFalseBitConfig.js +9 -0
- package/dist/esm/config/bits/botActionTrueFalseBitConfig.js.map +1 -0
- package/dist/esm/config/bits/botInterviewBitConfig.js +9 -0
- package/dist/esm/config/bits/botInterviewBitConfig.js.map +1 -0
- package/dist/esm/config/bits/browserImageBitConfig.js +13 -0
- package/dist/esm/config/bits/browserImageBitConfig.js.map +1 -0
- package/dist/esm/config/bits/bugBitConfig.js +10 -0
- package/dist/esm/config/bits/bugBitConfig.js.map +1 -0
- package/dist/esm/config/bits/card1BitConfig.js +10 -0
- package/dist/esm/config/bits/card1BitConfig.js.map +1 -0
- package/dist/esm/config/bits/chapterBitConfig.js +10 -0
- package/dist/esm/config/bits/chapterBitConfig.js.map +1 -0
- package/dist/esm/config/bits/chapterSubjectMatterBitConfig.js +9 -0
- package/dist/esm/config/bits/chapterSubjectMatterBitConfig.js.map +1 -0
- package/dist/esm/config/bits/chatBitConfig.js +9 -0
- package/dist/esm/config/bits/chatBitConfig.js.map +1 -0
- package/dist/esm/config/bits/clozeAndMultipleChoiceTextBitConfig.js +11 -0
- package/dist/esm/config/bits/clozeAndMultipleChoiceTextBitConfig.js.map +1 -0
- package/dist/esm/config/bits/clozeBitConfig.js +11 -0
- package/dist/esm/config/bits/clozeBitConfig.js.map +1 -0
- package/dist/esm/config/bits/clozeInstructionGroupedBitConfig.js +11 -0
- package/dist/esm/config/bits/clozeInstructionGroupedBitConfig.js.map +1 -0
- package/dist/esm/config/bits/clozeSolutionGroupedBitConfig.js +11 -0
- package/dist/esm/config/bits/clozeSolutionGroupedBitConfig.js.map +1 -0
- package/dist/esm/config/bits/codeBitConfig.js +10 -0
- package/dist/esm/config/bits/codeBitConfig.js.map +1 -0
- package/dist/esm/config/bits/conclusionBitConfig.js +10 -0
- package/dist/esm/config/bits/conclusionBitConfig.js.map +1 -0
- package/dist/esm/config/bits/conversationBitConfig.js +17 -0
- package/dist/esm/config/bits/conversationBitConfig.js.map +1 -0
- package/dist/esm/config/bits/correctionBitConfig.js +10 -0
- package/dist/esm/config/bits/correctionBitConfig.js.map +1 -0
- package/dist/esm/config/bits/dangerBitConfig.js +10 -0
- package/dist/esm/config/bits/dangerBitConfig.js.map +1 -0
- package/dist/esm/config/bits/details1BitConfig.js +9 -0
- package/dist/esm/config/bits/details1BitConfig.js.map +1 -0
- package/dist/esm/config/bits/detailsBitConfig.js +10 -0
- package/dist/esm/config/bits/detailsBitConfig.js.map +1 -0
- package/dist/esm/config/bits/documentBitConfig.js +12 -0
- package/dist/esm/config/bits/documentBitConfig.js.map +1 -0
- package/dist/esm/config/bits/documentDownloadBitConfig.js +12 -0
- package/dist/esm/config/bits/documentDownloadBitConfig.js.map +1 -0
- package/dist/esm/config/bits/documentEmbedBitConfig.js +12 -0
- package/dist/esm/config/bits/documentEmbedBitConfig.js.map +1 -0
- package/dist/esm/config/bits/documentLinkBitConfig.js +12 -0
- package/dist/esm/config/bits/documentLinkBitConfig.js.map +1 -0
- package/dist/esm/config/bits/documentUploadBitConfig.js +9 -0
- package/dist/esm/config/bits/documentUploadBitConfig.js.map +1 -0
- package/dist/esm/config/bits/editorialBitConfig.js +10 -0
- package/dist/esm/config/bits/editorialBitConfig.js.map +1 -0
- package/dist/esm/config/bits/essayBitConfig.js +11 -0
- package/dist/esm/config/bits/essayBitConfig.js.map +1 -0
- package/dist/esm/config/bits/exampleBitConfig.js +10 -0
- package/dist/esm/config/bits/exampleBitConfig.js.map +1 -0
- package/dist/esm/config/bits/featuredBitConfig.js +10 -0
- package/dist/esm/config/bits/featuredBitConfig.js.map +1 -0
- package/dist/esm/config/bits/flashcard1BitConfig.js +9 -0
- package/dist/esm/config/bits/flashcard1BitConfig.js.map +1 -0
- package/dist/esm/config/bits/flashcardBitConfig.js +9 -0
- package/dist/esm/config/bits/flashcardBitConfig.js.map +1 -0
- package/dist/esm/config/bits/focusImageBitConfig.js +13 -0
- package/dist/esm/config/bits/focusImageBitConfig.js.map +1 -0
- package/dist/esm/config/bits/footNoteBitConfig.js +10 -0
- package/dist/esm/config/bits/footNoteBitConfig.js.map +1 -0
- package/dist/esm/config/bits/generic/cardSetBitConfigs.js +127 -0
- package/dist/esm/config/bits/generic/cardSetBitConfigs.js.map +1 -0
- package/dist/esm/config/bits/generic/chainBitConfigs.js +42 -0
- package/dist/esm/config/bits/generic/chainBitConfigs.js.map +1 -0
- package/dist/esm/config/bits/generic/resourceChainBitConfigs.js +173 -0
- package/dist/esm/config/bits/generic/resourceChainBitConfigs.js.map +1 -0
- package/dist/esm/config/bits/generic/standardBitConfigs.js +40 -0
- package/dist/esm/config/bits/generic/standardBitConfigs.js.map +1 -0
- package/dist/esm/config/bits/groupBornBitConfig.js +9 -0
- package/dist/esm/config/bits/groupBornBitConfig.js.map +1 -0
- package/dist/esm/config/bits/groupDiedBitConfig.js +9 -0
- package/dist/esm/config/bits/groupDiedBitConfig.js.map +1 -0
- package/dist/esm/config/bits/helpBitConfig.js +10 -0
- package/dist/esm/config/bits/helpBitConfig.js.map +1 -0
- package/dist/esm/config/bits/highlightTextBitConfig.js +11 -0
- package/dist/esm/config/bits/highlightTextBitConfig.js.map +1 -0
- package/dist/esm/config/bits/hintBitConfig.js +10 -0
- package/dist/esm/config/bits/hintBitConfig.js.map +1 -0
- package/dist/esm/config/bits/imageBitConfig.js +12 -0
- package/dist/esm/config/bits/imageBitConfig.js.map +1 -0
- package/dist/esm/config/bits/imageLinkBitConfig.js +12 -0
- package/dist/esm/config/bits/imageLinkBitConfig.js.map +1 -0
- package/dist/esm/config/bits/imagePrototypeBitConfig.js +12 -0
- package/dist/esm/config/bits/imagePrototypeBitConfig.js.map +1 -0
- package/dist/esm/config/bits/imageSuperWideBitConfig.js +12 -0
- package/dist/esm/config/bits/imageSuperWideBitConfig.js.map +1 -0
- package/dist/esm/config/bits/imageZoomBitConfig.js +12 -0
- package/dist/esm/config/bits/imageZoomBitConfig.js.map +1 -0
- package/dist/esm/config/bits/infoBitConfig.js +10 -0
- package/dist/esm/config/bits/infoBitConfig.js.map +1 -0
- package/dist/esm/config/bits/internalLinkBitConfig.js +10 -0
- package/dist/esm/config/bits/internalLinkBitConfig.js.map +1 -0
- package/dist/esm/config/bits/interviewBitConfig.js +13 -0
- package/dist/esm/config/bits/interviewBitConfig.js.map +1 -0
- package/dist/esm/config/bits/interviewInstructionGroupedBitConfig.js +13 -0
- package/dist/esm/config/bits/interviewInstructionGroupedBitConfig.js.map +1 -0
- package/dist/esm/config/bits/learningPathBitConfig.js +85 -0
- package/dist/esm/config/bits/learningPathBitConfig.js.map +1 -0
- package/dist/esm/config/bits/markBitConfig.js +10 -0
- package/dist/esm/config/bits/markBitConfig.js.map +1 -0
- package/dist/esm/config/bits/matchBitConfig.js +62 -0
- package/dist/esm/config/bits/matchBitConfig.js.map +1 -0
- package/dist/esm/config/bits/messageBitConfig.js +10 -0
- package/dist/esm/config/bits/messageBitConfig.js.map +1 -0
- package/dist/esm/config/bits/multipleChoice1BitConfig.js +11 -0
- package/dist/esm/config/bits/multipleChoice1BitConfig.js.map +1 -0
- package/dist/esm/config/bits/multipleChoiceBitConfig.js +14 -0
- package/dist/esm/config/bits/multipleChoiceBitConfig.js.map +1 -0
- package/dist/esm/config/bits/multipleChoiceTextBitConfig.js +11 -0
- package/dist/esm/config/bits/multipleChoiceTextBitConfig.js.map +1 -0
- package/dist/esm/config/bits/multipleResponse1BitConfig.js +11 -0
- package/dist/esm/config/bits/multipleResponse1BitConfig.js.map +1 -0
- package/dist/esm/config/bits/multipleResponseBitConfig.js +14 -0
- package/dist/esm/config/bits/multipleResponseBitConfig.js.map +1 -0
- package/dist/esm/config/bits/newspaperArticleBitConfig.js +10 -0
- package/dist/esm/config/bits/newspaperArticleBitConfig.js.map +1 -0
- package/dist/esm/config/bits/noteAiBitConfig.js +11 -0
- package/dist/esm/config/bits/noteAiBitConfig.js.map +1 -0
- package/dist/esm/config/bits/noteBitConfig.js +10 -0
- package/dist/esm/config/bits/noteBitConfig.js.map +1 -0
- package/dist/esm/config/bits/notebookArticleBitConfig.js +10 -0
- package/dist/esm/config/bits/notebookArticleBitConfig.js.map +1 -0
- package/dist/esm/config/bits/pageBitConfig.js +10 -0
- package/dist/esm/config/bits/pageBitConfig.js.map +1 -0
- package/dist/esm/config/bits/photoBitConfig.js +12 -0
- package/dist/esm/config/bits/photoBitConfig.js.map +1 -0
- package/dist/esm/config/bits/preparationNoteBitConfig.js +10 -0
- package/dist/esm/config/bits/preparationNoteBitConfig.js.map +1 -0
- package/dist/esm/config/bits/question1BitConfig.js +10 -0
- package/dist/esm/config/bits/question1BitConfig.js.map +1 -0
- package/dist/esm/config/bits/quoteBitConfig.js +10 -0
- package/dist/esm/config/bits/quoteBitConfig.js.map +1 -0
- package/dist/esm/config/bits/ratingBitConfig.js +9 -0
- package/dist/esm/config/bits/ratingBitConfig.js.map +1 -0
- package/dist/esm/config/bits/recordAudioBitConfig.js +9 -0
- package/dist/esm/config/bits/recordAudioBitConfig.js.map +1 -0
- package/dist/esm/config/bits/releaseNoteBitConfig.js +11 -0
- package/dist/esm/config/bits/releaseNoteBitConfig.js.map +1 -0
- package/dist/esm/config/bits/releaseNotesSummaryBitConfig.js +10 -0
- package/dist/esm/config/bits/releaseNotesSummaryBitConfig.js.map +1 -0
- package/dist/esm/config/bits/remarkBitConfig.js +10 -0
- package/dist/esm/config/bits/remarkBitConfig.js.map +1 -0
- package/dist/esm/config/bits/sampleSolutionBitConfig.js +13 -0
- package/dist/esm/config/bits/sampleSolutionBitConfig.js.map +1 -0
- package/dist/esm/config/bits/screenshotBitConfig.js +12 -0
- package/dist/esm/config/bits/screenshotBitConfig.js.map +1 -0
- package/dist/esm/config/bits/selfAssessmentBitConfig.js +10 -0
- package/dist/esm/config/bits/selfAssessmentBitConfig.js.map +1 -0
- package/dist/esm/config/bits/sequenceBitConfig.js +13 -0
- package/dist/esm/config/bits/sequenceBitConfig.js.map +1 -0
- package/dist/esm/config/bits/sideNoteBitConfig.js +10 -0
- package/dist/esm/config/bits/sideNoteBitConfig.js.map +1 -0
- package/dist/esm/config/bits/statementBitConfig.js +10 -0
- package/dist/esm/config/bits/statementBitConfig.js.map +1 -0
- package/dist/esm/config/bits/stickyNoteBitConfig.js +10 -0
- package/dist/esm/config/bits/stickyNoteBitConfig.js.map +1 -0
- package/dist/esm/config/bits/stillImageFilmBitConfig.js +12 -0
- package/dist/esm/config/bits/stillImageFilmBitConfig.js.map +1 -0
- package/dist/esm/config/bits/stillImageFilmEmbedBitConfig.js +12 -0
- package/dist/esm/config/bits/stillImageFilmEmbedBitConfig.js.map +1 -0
- package/dist/esm/config/bits/stillImageFilmLinkBitConfig.js +12 -0
- package/dist/esm/config/bits/stillImageFilmLinkBitConfig.js.map +1 -0
- package/dist/esm/config/bits/summaryAiBitConfig.js +11 -0
- package/dist/esm/config/bits/summaryAiBitConfig.js.map +1 -0
- package/dist/esm/config/bits/summaryBitConfig.js +11 -0
- package/dist/esm/config/bits/summaryBitConfig.js.map +1 -0
- package/dist/esm/config/bits/survey1BitConfig.js +10 -0
- package/dist/esm/config/bits/survey1BitConfig.js.map +1 -0
- package/dist/esm/config/bits/surveyAnonymous1BitConfig.js +10 -0
- package/dist/esm/config/bits/surveyAnonymous1BitConfig.js.map +1 -0
- package/dist/esm/config/bits/surveyAnonymousBitConfig.js +10 -0
- package/dist/esm/config/bits/surveyAnonymousBitConfig.js.map +1 -0
- package/dist/esm/config/bits/surveyBitConfig.js +10 -0
- package/dist/esm/config/bits/surveyBitConfig.js.map +1 -0
- package/dist/esm/config/bits/takePictureBitConfig.js +9 -0
- package/dist/esm/config/bits/takePictureBitConfig.js.map +1 -0
- package/dist/esm/config/bits/tocBitConfig.js +9 -0
- package/dist/esm/config/bits/tocBitConfig.js.map +1 -0
- package/dist/esm/config/bits/trueFalse1BitConfig.js +12 -0
- package/dist/esm/config/bits/trueFalse1BitConfig.js.map +1 -0
- package/dist/esm/config/bits/trueFalseBitConfig.js +14 -0
- package/dist/esm/config/bits/trueFalseBitConfig.js.map +1 -0
- package/dist/esm/config/bits/vendorPadletEmbedBitConfig.js +10 -0
- package/dist/esm/config/bits/vendorPadletEmbedBitConfig.js.map +1 -0
- package/dist/esm/config/bits/videoBitConfig.js +12 -0
- package/dist/esm/config/bits/videoBitConfig.js.map +1 -0
- package/dist/esm/config/bits/videoEmbedBitConfig.js +12 -0
- package/dist/esm/config/bits/videoEmbedBitConfig.js.map +1 -0
- package/dist/esm/config/bits/videoLandscapeBitConfig.js +12 -0
- package/dist/esm/config/bits/videoLandscapeBitConfig.js.map +1 -0
- package/dist/esm/config/bits/videoLinkBitConfig.js +12 -0
- package/dist/esm/config/bits/videoLinkBitConfig.js.map +1 -0
- package/dist/esm/config/bits/videoPortraitBitConfig.js +12 -0
- package/dist/esm/config/bits/videoPortraitBitConfig.js.map +1 -0
- package/dist/esm/config/bits/warningBitConfig.js +10 -0
- package/dist/esm/config/bits/warningBitConfig.js.map +1 -0
- package/dist/esm/config/bits/websiteLinkBitConfig.js +12 -0
- package/dist/esm/config/bits/websiteLinkBitConfig.js.map +1 -0
- package/dist/esm/config/bits/workbookArticleBitConfig.js +10 -0
- package/dist/esm/config/bits/workbookArticleBitConfig.js.map +1 -0
- package/dist/esm/config/config.js +175 -0
- package/dist/esm/config/config.js.map +1 -0
- package/dist/esm/config/properties/actionPropertyConfig.js +7 -0
- package/dist/esm/config/properties/actionPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/ageRangePropertyConfig.js +6 -0
- package/dist/esm/config/properties/ageRangePropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/aiGeneratedPropertyConfig.js +9 -0
- package/dist/esm/config/properties/aiGeneratedPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/authorPropertyConfig.js +6 -0
- package/dist/esm/config/properties/authorPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/bookPropertyConfig.js +7 -0
- package/dist/esm/config/properties/bookPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/botPropertyConfig.js +6 -0
- package/dist/esm/config/properties/botPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/caseSensitivePropertyConfig.js +9 -0
- package/dist/esm/config/properties/caseSensitivePropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/computerLanguagePropertyConfig.js +7 -0
- package/dist/esm/config/properties/computerLanguagePropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/coverImagePropertyConfig.js +6 -0
- package/dist/esm/config/properties/coverImagePropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/datePropertyConfig.js +6 -0
- package/dist/esm/config/properties/datePropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/deeplinkPropertyConfig.js +6 -0
- package/dist/esm/config/properties/deeplinkPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/durationPropertyConfig.js +7 -0
- package/dist/esm/config/properties/durationPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/examplePropertyConfig.js +7 -0
- package/dist/esm/config/properties/examplePropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/externalIdPropertyConfig.js +6 -0
- package/dist/esm/config/properties/externalIdPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/externalLinkPropertyConfig.js +7 -0
- package/dist/esm/config/properties/externalLinkPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/externalLinkTextPropertyConfig.js +7 -0
- package/dist/esm/config/properties/externalLinkTextPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/focusXPropertyConfig.js +7 -0
- package/dist/esm/config/properties/focusXPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/focusYPropertyConfig.js +7 -0
- package/dist/esm/config/properties/focusYPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/idPropertyConfig.js +6 -0
- package/dist/esm/config/properties/idPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/isInfoOnlyPropertyConfig.js +7 -0
- package/dist/esm/config/properties/isInfoOnlyPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/isTrackedPropertyConfig.js +7 -0
- package/dist/esm/config/properties/isTrackedPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/kindPropertyConfig.js +7 -0
- package/dist/esm/config/properties/kindPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/labelFalsePropertyConfig.js +7 -0
- package/dist/esm/config/properties/labelFalsePropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/labelTruePropertyConfig.js +7 -0
- package/dist/esm/config/properties/labelTruePropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/languagePropertyConfig.js +6 -0
- package/dist/esm/config/properties/languagePropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/levelPropertyConfig.js +7 -0
- package/dist/esm/config/properties/levelPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/listPropertyConfig.js +6 -0
- package/dist/esm/config/properties/listPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/locationPropertyConfig.js +7 -0
- package/dist/esm/config/properties/locationPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/longAnswerPropertyConfig.js +9 -0
- package/dist/esm/config/properties/longAnswerPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/padletIdPropertyConfig.js +7 -0
- package/dist/esm/config/properties/padletIdPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/partialAnswerPropertyConfig.js +7 -0
- package/dist/esm/config/properties/partialAnswerPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/partnerPropertyConfig.js +7 -0
- package/dist/esm/config/properties/partnerPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/progressPropertyConfig.js +8 -0
- package/dist/esm/config/properties/progressPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/publicationsPropertyConfig.js +6 -0
- package/dist/esm/config/properties/publicationsPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/publisherPropertyConfig.js +6 -0
- package/dist/esm/config/properties/publisherPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/quotedPersonPropertyConfig.js +7 -0
- package/dist/esm/config/properties/quotedPersonPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/reactionPropertyConfig.js +7 -0
- package/dist/esm/config/properties/reactionPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/referencePropertyConfig.js +8 -0
- package/dist/esm/config/properties/referencePropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/releaseVersionPropertyConfig.js +7 -0
- package/dist/esm/config/properties/releaseVersionPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/resourcePropertyConfig.js +76 -0
- package/dist/esm/config/properties/resourcePropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/sampleSolutionPropertyConfig.js +7 -0
- package/dist/esm/config/properties/sampleSolutionPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/shortAnswerPropertyConfig.js +9 -0
- package/dist/esm/config/properties/shortAnswerPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/spaceIdPropertyConfig.js +6 -0
- package/dist/esm/config/properties/spaceIdPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/subjectPropertyConfig.js +6 -0
- package/dist/esm/config/properties/subjectPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/subtypePropertyConfig.js +7 -0
- package/dist/esm/config/properties/subtypePropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/textReferencePropertyConfig.js +7 -0
- package/dist/esm/config/properties/textReferencePropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/themePropertyConfig.js +6 -0
- package/dist/esm/config/properties/themePropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/thumbImagePropertyConfig.js +7 -0
- package/dist/esm/config/properties/thumbImagePropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/tocPropertyConfig.js +8 -0
- package/dist/esm/config/properties/tocPropertyConfig.js.map +1 -0
- package/dist/esm/config/properties/videoCallLinkPropertyConfig copy.js +7 -0
- package/dist/esm/config/properties/videoCallLinkPropertyConfig copy.js.map +1 -0
- package/dist/esm/config/properties/videoCallLinkPropertyConfig.js +7 -0
- package/dist/esm/config/properties/videoCallLinkPropertyConfig.js.map +1 -0
- package/dist/esm/generated/build-info.js +7 -0
- package/dist/esm/generated/build-info.js.map +1 -0
- package/dist/esm/generated/parser/bitmark/bitmark-peggy-parser.js +3425 -0
- package/dist/esm/generated/parser/bitmark/bitmark-peggy-parser.js.map +1 -0
- package/dist/esm/generated/parser/text/text-peggy-parser.js +6893 -0
- package/dist/esm/generated/parser/text/text-peggy-parser.js.map +1 -0
- package/dist/esm/generator/Generator.js +2 -0
- package/dist/esm/generator/Generator.js.map +1 -0
- package/dist/esm/generator/bitmark/BitmarkFileGenerator.js +46 -0
- package/dist/esm/generator/bitmark/BitmarkFileGenerator.js.map +1 -0
- package/dist/esm/generator/bitmark/BitmarkGenerator.js +1199 -0
- package/dist/esm/generator/bitmark/BitmarkGenerator.js.map +1 -0
- package/dist/esm/generator/bitmark/BitmarkStringGenerator.js +48 -0
- package/dist/esm/generator/bitmark/BitmarkStringGenerator.js.map +1 -0
- package/dist/esm/generator/json/JsonFileGenerator.js +50 -0
- package/dist/esm/generator/json/JsonFileGenerator.js.map +1 -0
- package/dist/esm/generator/json/JsonGenerator.js +2046 -0
- package/dist/esm/generator/json/JsonGenerator.js.map +1 -0
- package/dist/esm/generator/json/JsonObjectGenerator.js +48 -0
- package/dist/esm/generator/json/JsonObjectGenerator.js.map +1 -0
- package/dist/esm/generator/json/JsonStringGenerator.js +47 -0
- package/dist/esm/generator/json/JsonStringGenerator.js.map +1 -0
- package/dist/esm/generator/text/TextGenerator.js +660 -0
- package/dist/esm/generator/text/TextGenerator.js.map +1 -0
- package/dist/esm/index.js +40 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/init/init.js +13 -0
- package/dist/esm/init/init.js.map +1 -0
- package/dist/esm/model/ast/NodeType.js +235 -0
- package/dist/esm/model/ast/NodeType.js.map +1 -0
- package/dist/esm/model/ast/Nodes.js +2 -0
- package/dist/esm/model/ast/Nodes.js.map +1 -0
- package/dist/esm/model/ast/TextNodes.js +2 -0
- package/dist/esm/model/ast/TextNodes.js.map +1 -0
- package/dist/esm/model/config/TagData.js +3 -0
- package/dist/esm/model/config/TagData.js.map +1 -0
- package/dist/esm/model/enum/BitType.js +182 -0
- package/dist/esm/model/enum/BitType.js.map +1 -0
- package/dist/esm/model/enum/BitmarkGeneratorOutput.js +2 -0
- package/dist/esm/model/enum/BitmarkGeneratorOutput.js.map +1 -0
- package/dist/esm/model/enum/BitmarkParserType.js +7 -0
- package/dist/esm/model/enum/BitmarkParserType.js.map +1 -0
- package/dist/esm/model/enum/BitmarkVersion.js +8 -0
- package/dist/esm/model/enum/BitmarkVersion.js.map +1 -0
- package/dist/esm/model/enum/BodyBitType.js +10 -0
- package/dist/esm/model/enum/BodyBitType.js.map +1 -0
- package/dist/esm/model/enum/CardSetType.js +12 -0
- package/dist/esm/model/enum/CardSetType.js.map +1 -0
- package/dist/esm/model/enum/CardSetVersion.js +7 -0
- package/dist/esm/model/enum/CardSetVersion.js.map +1 -0
- package/dist/esm/model/enum/PropertyKey.js +73 -0
- package/dist/esm/model/enum/PropertyKey.js.map +1 -0
- package/dist/esm/model/enum/ResourceType.js +28 -0
- package/dist/esm/model/enum/ResourceType.js.map +1 -0
- package/dist/esm/model/enum/TagType.js +19 -0
- package/dist/esm/model/enum/TagType.js.map +1 -0
- package/dist/esm/model/enum/TextFormat.js +8 -0
- package/dist/esm/model/enum/TextFormat.js.map +1 -0
- package/dist/esm/model/enum/TextMarkType.js +22 -0
- package/dist/esm/model/enum/TextMarkType.js.map +1 -0
- package/dist/esm/model/enum/TextNodeType.js +23 -0
- package/dist/esm/model/enum/TextNodeType.js.map +1 -0
- package/dist/esm/model/enum/TextSection.js +15 -0
- package/dist/esm/model/enum/TextSection.js.map +1 -0
- package/dist/esm/model/json/BitJson.js +2 -0
- package/dist/esm/model/json/BitJson.js.map +1 -0
- package/dist/esm/model/json/BitWrapperJson.js +2 -0
- package/dist/esm/model/json/BitWrapperJson.js.map +1 -0
- package/dist/esm/model/json/BodyBitJson.js +2 -0
- package/dist/esm/model/json/BodyBitJson.js.map +1 -0
- package/dist/esm/model/json/ParserJson.js +2 -0
- package/dist/esm/model/json/ParserJson.js.map +1 -0
- package/dist/esm/model/json/ResourceJson.js +2 -0
- package/dist/esm/model/json/ResourceJson.js.map +1 -0
- package/dist/esm/model/parser/ParserData.js +2 -0
- package/dist/esm/model/parser/ParserData.js.map +1 -0
- package/dist/esm/model/parser/ParserError.js +2 -0
- package/dist/esm/model/parser/ParserError.js.map +1 -0
- package/dist/esm/model/parser/ParserInfo.js +2 -0
- package/dist/esm/model/parser/ParserInfo.js.map +1 -0
- package/dist/esm/model/parser/ParserLocation.js +2 -0
- package/dist/esm/model/parser/ParserLocation.js.map +1 -0
- package/dist/esm/model/parser/ParserLocationRange.js +2 -0
- package/dist/esm/model/parser/ParserLocationRange.js.map +1 -0
- package/dist/esm/parser/bitmark/BitmarkParser.js +64 -0
- package/dist/esm/parser/bitmark/BitmarkParser.js.map +1 -0
- package/dist/esm/parser/bitmark/peg/BitmarkPegParser.js +4 -0
- package/dist/esm/parser/bitmark/peg/BitmarkPegParser.js.map +1 -0
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserHelper.js +530 -0
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserHelper.js.map +1 -0
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js +572 -0
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +1 -0
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserTypes.js +54 -0
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserTypes.js.map +1 -0
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserValidator.js +607 -0
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserValidator.js.map +1 -0
- package/dist/esm/parser/bitmark/peg/PeggyGrammarLocation.js +79 -0
- package/dist/esm/parser/bitmark/peg/PeggyGrammarLocation.js.map +1 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +32 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +1 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/CardContentProcessor.js +402 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/CardContentProcessor.js.map +1 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +13 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +1 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/CommentTagContentProcessor.js +16 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/CommentTagContentProcessor.js.map +1 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +32 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +1 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js +39 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js.map +1 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +13 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +1 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.js +48 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.js.map +1 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +60 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +1 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js +13 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js.map +1 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js +111 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +1 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js +38 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +1 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js +174 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js.map +1 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js +15 -0
- package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js.map +1 -0
- package/dist/esm/parser/json/JsonParser.js +589 -0
- package/dist/esm/parser/json/JsonParser.js.map +1 -0
- package/dist/esm/parser/text/TextParser.js +30 -0
- package/dist/esm/parser/text/TextParser.js.map +1 -0
- package/dist/esm/parser/text/peg/TextPegParser.js +4 -0
- package/dist/esm/parser/text/peg/TextPegParser.js.map +1 -0
- package/dist/esm/utils/ArrayUtils.js +40 -0
- package/dist/esm/utils/ArrayUtils.js.map +1 -0
- package/dist/esm/utils/BitUtils.js +31 -0
- package/dist/esm/utils/BitUtils.js.map +1 -0
- package/dist/esm/utils/BooleanUtils.js +59 -0
- package/dist/esm/utils/BooleanUtils.js.map +1 -0
- package/dist/esm/utils/FileUtils.js +36 -0
- package/dist/esm/utils/FileUtils.js.map +1 -0
- package/dist/esm/utils/NumberUtils.js +23 -0
- package/dist/esm/utils/NumberUtils.js.map +1 -0
- package/dist/esm/utils/ObjectUtils.js +200 -0
- package/dist/esm/utils/ObjectUtils.js.map +1 -0
- package/dist/esm/utils/StringUtils.js +131 -0
- package/dist/esm/utils/StringUtils.js.map +1 -0
- package/dist/esm/utils/UrlUtils.js +34 -0
- package/dist/esm/utils/UrlUtils.js.map +1 -0
- package/dist/esm/utils/env/Env.js +127 -0
- package/dist/esm/utils/env/Env.js.map +1 -0
- package/dist/esm/utils/env/Environment.js +12 -0
- package/dist/esm/utils/env/Environment.js.map +1 -0
- package/dist/esm/utils/env/Os.js +11 -0
- package/dist/esm/utils/env/Os.js.map +1 -0
- package/dist/esm/utils/env/Version.js +9 -0
- package/dist/esm/utils/env/Version.js.map +1 -0
- package/dist/esm/utils/env/userAgent.js +86 -0
- package/dist/esm/utils/env/userAgent.js.map +1 -0
- package/dist/esm/utils/polyfill/fs.js +11 -0
- package/dist/esm/utils/polyfill/fs.js.map +1 -0
- package/dist/types/BitmarkParserGenerator.d.ts +212 -0
- package/dist/types/BitmarkParserGenerator.d.ts.map +1 -0
- package/dist/types/ast/Ast.d.ts +141 -0
- package/dist/types/ast/Ast.d.ts.map +1 -0
- package/dist/types/ast/BaseBuilder.d.ts +22 -0
- package/dist/types/ast/BaseBuilder.d.ts.map +1 -0
- package/dist/types/ast/Builder.d.ts +402 -0
- package/dist/types/ast/Builder.d.ts.map +1 -0
- package/dist/types/ast/ResourceBuilder.d.ts +383 -0
- package/dist/types/ast/ResourceBuilder.d.ts.map +1 -0
- package/dist/types/ast/rules/NodeValidator.d.ts +20 -0
- package/dist/types/ast/rules/NodeValidator.d.ts.map +1 -0
- package/dist/types/ast/writer/FileWriter.d.ts +39 -0
- package/dist/types/ast/writer/FileWriter.d.ts.map +1 -0
- package/dist/types/ast/writer/StreamWriter.d.ts +28 -0
- package/dist/types/ast/writer/StreamWriter.d.ts.map +1 -0
- package/dist/types/ast/writer/StringWriter.d.ts +28 -0
- package/dist/types/ast/writer/StringWriter.d.ts.map +1 -0
- package/dist/types/ast/writer/Writer.d.ts +66 -0
- package/dist/types/ast/writer/Writer.d.ts.map +1 -0
- package/dist/types/config/bits/_errorBitConfig.d.ts +2 -0
- package/dist/types/config/bits/_errorBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/aiPromptBitConfig.d.ts +2 -0
- package/dist/types/config/bits/aiPromptBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/anchorBitConfig.d.ts +2 -0
- package/dist/types/config/bits/anchorBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/appLinkBitConfig.d.ts +2 -0
- package/dist/types/config/bits/appLinkBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/articleAiBitConfig.d.ts +2 -0
- package/dist/types/config/bits/articleAiBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/articleAttachmentBitConfig.d.ts +2 -0
- package/dist/types/config/bits/articleAttachmentBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/articleBitConfig.d.ts +2 -0
- package/dist/types/config/bits/articleBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/articleEmbedBitConfig.d.ts +2 -0
- package/dist/types/config/bits/articleEmbedBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/articleLinkBitConfig.d.ts +2 -0
- package/dist/types/config/bits/articleLinkBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/assignmentBitConfig.d.ts +2 -0
- package/dist/types/config/bits/assignmentBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/audioBitConfig.d.ts +2 -0
- package/dist/types/config/bits/audioBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/audioEmbedBitConfig.d.ts +2 -0
- package/dist/types/config/bits/audioEmbedBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/audioLinkBitConfig.d.ts +2 -0
- package/dist/types/config/bits/audioLinkBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/bitAliasBitConfig.d.ts +2 -0
- package/dist/types/config/bits/bitAliasBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/bitBookEndingBitConfig.d.ts +2 -0
- package/dist/types/config/bits/bitBookEndingBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/bitBookSummaryBitConfig.d.ts +2 -0
- package/dist/types/config/bits/bitBookSummaryBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/blogArticleBitConfig.d.ts +2 -0
- package/dist/types/config/bits/blogArticleBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/bookBitConfig.d.ts +2 -0
- package/dist/types/config/bits/bookBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/botActionAnnounceBitConfig.d.ts +2 -0
- package/dist/types/config/bits/botActionAnnounceBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/botActionRatingNumberBitConfig.d.ts +2 -0
- package/dist/types/config/bits/botActionRatingNumberBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/botActionRemindBitConfig.d.ts +2 -0
- package/dist/types/config/bits/botActionRemindBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/botActionResponseBitConfig.d.ts +2 -0
- package/dist/types/config/bits/botActionResponseBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/botActionSaveBitConfig.d.ts +2 -0
- package/dist/types/config/bits/botActionSaveBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/botActionSendBitConfig.d.ts +2 -0
- package/dist/types/config/bits/botActionSendBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/botActionTrueFalseBitConfig.d.ts +2 -0
- package/dist/types/config/bits/botActionTrueFalseBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/botInterviewBitConfig.d.ts +2 -0
- package/dist/types/config/bits/botInterviewBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/browserImageBitConfig.d.ts +2 -0
- package/dist/types/config/bits/browserImageBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/bugBitConfig.d.ts +2 -0
- package/dist/types/config/bits/bugBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/card1BitConfig.d.ts +2 -0
- package/dist/types/config/bits/card1BitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/chapterBitConfig.d.ts +2 -0
- package/dist/types/config/bits/chapterBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/chapterSubjectMatterBitConfig.d.ts +2 -0
- package/dist/types/config/bits/chapterSubjectMatterBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/chatBitConfig.d.ts +2 -0
- package/dist/types/config/bits/chatBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/clozeAndMultipleChoiceTextBitConfig.d.ts +2 -0
- package/dist/types/config/bits/clozeAndMultipleChoiceTextBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/clozeBitConfig.d.ts +2 -0
- package/dist/types/config/bits/clozeBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/clozeInstructionGroupedBitConfig.d.ts +2 -0
- package/dist/types/config/bits/clozeInstructionGroupedBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/clozeSolutionGroupedBitConfig.d.ts +2 -0
- package/dist/types/config/bits/clozeSolutionGroupedBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/codeBitConfig.d.ts +2 -0
- package/dist/types/config/bits/codeBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/conclusionBitConfig.d.ts +2 -0
- package/dist/types/config/bits/conclusionBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/conversationBitConfig.d.ts +2 -0
- package/dist/types/config/bits/conversationBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/correctionBitConfig.d.ts +2 -0
- package/dist/types/config/bits/correctionBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/dangerBitConfig.d.ts +2 -0
- package/dist/types/config/bits/dangerBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/details1BitConfig.d.ts +2 -0
- package/dist/types/config/bits/details1BitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/detailsBitConfig.d.ts +2 -0
- package/dist/types/config/bits/detailsBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/documentBitConfig.d.ts +2 -0
- package/dist/types/config/bits/documentBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/documentDownloadBitConfig.d.ts +2 -0
- package/dist/types/config/bits/documentDownloadBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/documentEmbedBitConfig.d.ts +2 -0
- package/dist/types/config/bits/documentEmbedBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/documentLinkBitConfig.d.ts +2 -0
- package/dist/types/config/bits/documentLinkBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/documentUploadBitConfig.d.ts +2 -0
- package/dist/types/config/bits/documentUploadBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/editorialBitConfig.d.ts +2 -0
- package/dist/types/config/bits/editorialBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/essayBitConfig.d.ts +2 -0
- package/dist/types/config/bits/essayBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/exampleBitConfig.d.ts +2 -0
- package/dist/types/config/bits/exampleBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/featuredBitConfig.d.ts +2 -0
- package/dist/types/config/bits/featuredBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/flashcard1BitConfig.d.ts +2 -0
- package/dist/types/config/bits/flashcard1BitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/flashcardBitConfig.d.ts +2 -0
- package/dist/types/config/bits/flashcardBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/focusImageBitConfig.d.ts +2 -0
- package/dist/types/config/bits/focusImageBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/footNoteBitConfig.d.ts +2 -0
- package/dist/types/config/bits/footNoteBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/generic/cardSetBitConfigs.d.ts +12 -0
- package/dist/types/config/bits/generic/cardSetBitConfigs.d.ts.map +1 -0
- package/dist/types/config/bits/generic/chainBitConfigs.d.ts +6 -0
- package/dist/types/config/bits/generic/chainBitConfigs.d.ts.map +1 -0
- package/dist/types/config/bits/generic/resourceChainBitConfigs.d.ts +25 -0
- package/dist/types/config/bits/generic/resourceChainBitConfigs.d.ts.map +1 -0
- package/dist/types/config/bits/generic/standardBitConfigs.d.ts +7 -0
- package/dist/types/config/bits/generic/standardBitConfigs.d.ts.map +1 -0
- package/dist/types/config/bits/groupBornBitConfig.d.ts +2 -0
- package/dist/types/config/bits/groupBornBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/groupDiedBitConfig.d.ts +2 -0
- package/dist/types/config/bits/groupDiedBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/helpBitConfig.d.ts +2 -0
- package/dist/types/config/bits/helpBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/highlightTextBitConfig.d.ts +2 -0
- package/dist/types/config/bits/highlightTextBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/hintBitConfig.d.ts +2 -0
- package/dist/types/config/bits/hintBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/imageBitConfig.d.ts +2 -0
- package/dist/types/config/bits/imageBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/imageLinkBitConfig.d.ts +2 -0
- package/dist/types/config/bits/imageLinkBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/imagePrototypeBitConfig.d.ts +2 -0
- package/dist/types/config/bits/imagePrototypeBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/imageSuperWideBitConfig.d.ts +2 -0
- package/dist/types/config/bits/imageSuperWideBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/imageZoomBitConfig.d.ts +2 -0
- package/dist/types/config/bits/imageZoomBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/infoBitConfig.d.ts +2 -0
- package/dist/types/config/bits/infoBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/internalLinkBitConfig.d.ts +2 -0
- package/dist/types/config/bits/internalLinkBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/interviewBitConfig.d.ts +2 -0
- package/dist/types/config/bits/interviewBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/interviewInstructionGroupedBitConfig.d.ts +2 -0
- package/dist/types/config/bits/interviewInstructionGroupedBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/learningPathBitConfig.d.ts +2 -0
- package/dist/types/config/bits/learningPathBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/markBitConfig.d.ts +2 -0
- package/dist/types/config/bits/markBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/matchBitConfig.d.ts +2 -0
- package/dist/types/config/bits/matchBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/messageBitConfig.d.ts +2 -0
- package/dist/types/config/bits/messageBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/multipleChoice1BitConfig.d.ts +2 -0
- package/dist/types/config/bits/multipleChoice1BitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/multipleChoiceBitConfig.d.ts +2 -0
- package/dist/types/config/bits/multipleChoiceBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/multipleChoiceTextBitConfig.d.ts +2 -0
- package/dist/types/config/bits/multipleChoiceTextBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/multipleResponse1BitConfig.d.ts +2 -0
- package/dist/types/config/bits/multipleResponse1BitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/multipleResponseBitConfig.d.ts +2 -0
- package/dist/types/config/bits/multipleResponseBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/newspaperArticleBitConfig.d.ts +2 -0
- package/dist/types/config/bits/newspaperArticleBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/noteAiBitConfig.d.ts +2 -0
- package/dist/types/config/bits/noteAiBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/noteBitConfig.d.ts +2 -0
- package/dist/types/config/bits/noteBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/notebookArticleBitConfig.d.ts +2 -0
- package/dist/types/config/bits/notebookArticleBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/pageBitConfig.d.ts +2 -0
- package/dist/types/config/bits/pageBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/photoBitConfig.d.ts +2 -0
- package/dist/types/config/bits/photoBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/preparationNoteBitConfig.d.ts +2 -0
- package/dist/types/config/bits/preparationNoteBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/question1BitConfig.d.ts +2 -0
- package/dist/types/config/bits/question1BitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/quoteBitConfig.d.ts +2 -0
- package/dist/types/config/bits/quoteBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/ratingBitConfig.d.ts +2 -0
- package/dist/types/config/bits/ratingBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/recordAudioBitConfig.d.ts +2 -0
- package/dist/types/config/bits/recordAudioBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/releaseNoteBitConfig.d.ts +2 -0
- package/dist/types/config/bits/releaseNoteBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/releaseNotesSummaryBitConfig.d.ts +2 -0
- package/dist/types/config/bits/releaseNotesSummaryBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/remarkBitConfig.d.ts +2 -0
- package/dist/types/config/bits/remarkBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/sampleSolutionBitConfig.d.ts +2 -0
- package/dist/types/config/bits/sampleSolutionBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/screenshotBitConfig.d.ts +2 -0
- package/dist/types/config/bits/screenshotBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/selfAssessmentBitConfig.d.ts +2 -0
- package/dist/types/config/bits/selfAssessmentBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/sequenceBitConfig.d.ts +2 -0
- package/dist/types/config/bits/sequenceBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/sideNoteBitConfig.d.ts +2 -0
- package/dist/types/config/bits/sideNoteBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/statementBitConfig.d.ts +2 -0
- package/dist/types/config/bits/statementBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/stickyNoteBitConfig.d.ts +2 -0
- package/dist/types/config/bits/stickyNoteBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/stillImageFilmBitConfig.d.ts +2 -0
- package/dist/types/config/bits/stillImageFilmBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/stillImageFilmEmbedBitConfig.d.ts +2 -0
- package/dist/types/config/bits/stillImageFilmEmbedBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/stillImageFilmLinkBitConfig.d.ts +2 -0
- package/dist/types/config/bits/stillImageFilmLinkBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/summaryAiBitConfig.d.ts +2 -0
- package/dist/types/config/bits/summaryAiBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/summaryBitConfig.d.ts +2 -0
- package/dist/types/config/bits/summaryBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/survey1BitConfig.d.ts +2 -0
- package/dist/types/config/bits/survey1BitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/surveyAnonymous1BitConfig.d.ts +2 -0
- package/dist/types/config/bits/surveyAnonymous1BitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/surveyAnonymousBitConfig.d.ts +2 -0
- package/dist/types/config/bits/surveyAnonymousBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/surveyBitConfig.d.ts +2 -0
- package/dist/types/config/bits/surveyBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/takePictureBitConfig.d.ts +2 -0
- package/dist/types/config/bits/takePictureBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/tocBitConfig.d.ts +2 -0
- package/dist/types/config/bits/tocBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/trueFalse1BitConfig.d.ts +2 -0
- package/dist/types/config/bits/trueFalse1BitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/trueFalseBitConfig.d.ts +2 -0
- package/dist/types/config/bits/trueFalseBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/vendorPadletEmbedBitConfig.d.ts +2 -0
- package/dist/types/config/bits/vendorPadletEmbedBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/videoBitConfig.d.ts +2 -0
- package/dist/types/config/bits/videoBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/videoEmbedBitConfig.d.ts +2 -0
- package/dist/types/config/bits/videoEmbedBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/videoLandscapeBitConfig.d.ts +2 -0
- package/dist/types/config/bits/videoLandscapeBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/videoLinkBitConfig.d.ts +2 -0
- package/dist/types/config/bits/videoLinkBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/videoPortraitBitConfig.d.ts +2 -0
- package/dist/types/config/bits/videoPortraitBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/warningBitConfig.d.ts +2 -0
- package/dist/types/config/bits/warningBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/websiteLinkBitConfig.d.ts +2 -0
- package/dist/types/config/bits/websiteLinkBitConfig.d.ts.map +1 -0
- package/dist/types/config/bits/workbookArticleBitConfig.d.ts +2 -0
- package/dist/types/config/bits/workbookArticleBitConfig.d.ts.map +1 -0
- package/dist/types/config/config.d.ts +173 -0
- package/dist/types/config/config.d.ts.map +1 -0
- package/dist/types/config/properties/actionPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/actionPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/ageRangePropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/ageRangePropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/aiGeneratedPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/aiGeneratedPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/authorPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/authorPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/bookPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/bookPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/botPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/botPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/caseSensitivePropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/caseSensitivePropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/computerLanguagePropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/computerLanguagePropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/coverImagePropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/coverImagePropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/datePropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/datePropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/deeplinkPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/deeplinkPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/durationPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/durationPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/examplePropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/examplePropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/externalIdPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/externalIdPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/externalLinkPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/externalLinkPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/externalLinkTextPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/externalLinkTextPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/focusXPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/focusXPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/focusYPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/focusYPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/idPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/idPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/isInfoOnlyPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/isInfoOnlyPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/isTrackedPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/isTrackedPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/kindPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/kindPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/labelFalsePropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/labelFalsePropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/labelTruePropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/labelTruePropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/languagePropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/languagePropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/levelPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/levelPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/listPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/listPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/locationPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/locationPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/longAnswerPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/longAnswerPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/padletIdPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/padletIdPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/partialAnswerPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/partialAnswerPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/partnerPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/partnerPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/progressPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/progressPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/publicationsPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/publicationsPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/publisherPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/publisherPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/quotedPersonPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/quotedPersonPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/reactionPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/reactionPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/referencePropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/referencePropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/releaseVersionPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/releaseVersionPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/resourcePropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/resourcePropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/sampleSolutionPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/sampleSolutionPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/shortAnswerPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/shortAnswerPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/spaceIdPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/spaceIdPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/subjectPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/subjectPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/subtypePropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/subtypePropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/textReferencePropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/textReferencePropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/themePropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/themePropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/thumbImagePropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/thumbImagePropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/tocPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/tocPropertyConfig.d.ts.map +1 -0
- package/dist/types/config/properties/videoCallLinkPropertyConfig copy.d.ts +2 -0
- package/dist/types/config/properties/videoCallLinkPropertyConfig copy.d.ts.map +1 -0
- package/dist/types/config/properties/videoCallLinkPropertyConfig.d.ts +2 -0
- package/dist/types/config/properties/videoCallLinkPropertyConfig.d.ts.map +1 -0
- package/dist/types/generated/build-info.d.ts +5 -0
- package/dist/types/generated/build-info.d.ts.map +1 -0
- package/dist/types/generated/parser/bitmark/bitmark-peggy-parser.d.ts +11 -0
- package/dist/types/generated/parser/bitmark/bitmark-peggy-parser.d.ts.map +1 -0
- package/dist/types/generated/parser/text/text-peggy-parser.d.ts +11 -0
- package/dist/types/generated/parser/text/text-peggy-parser.d.ts.map +1 -0
- package/dist/types/generator/Generator.d.ts +6 -0
- package/dist/types/generator/Generator.d.ts.map +1 -0
- package/dist/types/generator/bitmark/BitmarkFileGenerator.d.ts +42 -0
- package/dist/types/generator/bitmark/BitmarkFileGenerator.d.ts.map +1 -0
- package/dist/types/generator/bitmark/BitmarkGenerator.d.ts +263 -0
- package/dist/types/generator/bitmark/BitmarkGenerator.d.ts.map +1 -0
- package/dist/types/generator/bitmark/BitmarkStringGenerator.d.ts +31 -0
- package/dist/types/generator/bitmark/BitmarkStringGenerator.d.ts.map +1 -0
- package/dist/types/generator/json/JsonFileGenerator.d.ts +46 -0
- package/dist/types/generator/json/JsonFileGenerator.d.ts.map +1 -0
- package/dist/types/generator/json/JsonGenerator.d.ts +288 -0
- package/dist/types/generator/json/JsonGenerator.d.ts.map +1 -0
- package/dist/types/generator/json/JsonObjectGenerator.d.ts +32 -0
- package/dist/types/generator/json/JsonObjectGenerator.d.ts.map +1 -0
- package/dist/types/generator/json/JsonStringGenerator.d.ts +30 -0
- package/dist/types/generator/json/JsonStringGenerator.d.ts.map +1 -0
- package/dist/types/generator/text/TextGenerator.d.ts +127 -0
- package/dist/types/generator/text/TextGenerator.d.ts.map +1 -0
- package/dist/types/index.d.ts +44 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/init/init.d.ts +4 -0
- package/dist/types/init/init.d.ts.map +1 -0
- package/dist/types/model/ast/NodeType.d.ts +445 -0
- package/dist/types/model/ast/NodeType.d.ts.map +1 -0
- package/dist/types/model/ast/Nodes.d.ts +408 -0
- package/dist/types/model/ast/Nodes.d.ts.map +1 -0
- package/dist/types/model/ast/TextNodes.d.ts +73 -0
- package/dist/types/model/ast/TextNodes.d.ts.map +1 -0
- package/dist/types/model/config/TagData.d.ts +14 -0
- package/dist/types/model/config/TagData.d.ts.map +1 -0
- package/dist/types/model/enum/BitType.d.ts +385 -0
- package/dist/types/model/enum/BitType.d.ts.map +1 -0
- package/dist/types/model/enum/BitmarkGeneratorOutput.d.ts +1 -0
- package/dist/types/model/enum/BitmarkGeneratorOutput.d.ts.map +1 -0
- package/dist/types/model/enum/BitmarkParserType.d.ts +11 -0
- package/dist/types/model/enum/BitmarkParserType.d.ts.map +1 -0
- package/dist/types/model/enum/BitmarkVersion.d.ts +12 -0
- package/dist/types/model/enum/BitmarkVersion.d.ts.map +1 -0
- package/dist/types/model/enum/BodyBitType.d.ts +22 -0
- package/dist/types/model/enum/BodyBitType.d.ts.map +1 -0
- package/dist/types/model/enum/CardSetType.d.ts +21 -0
- package/dist/types/model/enum/CardSetType.d.ts.map +1 -0
- package/dist/types/model/enum/CardSetVersion.d.ts +11 -0
- package/dist/types/model/enum/CardSetVersion.d.ts.map +1 -0
- package/dist/types/model/enum/PropertyKey.d.ts +150 -0
- package/dist/types/model/enum/PropertyKey.d.ts.map +1 -0
- package/dist/types/model/enum/ResourceType.d.ts +76 -0
- package/dist/types/model/enum/ResourceType.d.ts.map +1 -0
- package/dist/types/model/enum/TagType.d.ts +35 -0
- package/dist/types/model/enum/TagType.d.ts.map +1 -0
- package/dist/types/model/enum/TextFormat.d.ts +13 -0
- package/dist/types/model/enum/TextFormat.d.ts.map +1 -0
- package/dist/types/model/enum/TextMarkType.d.ts +37 -0
- package/dist/types/model/enum/TextMarkType.d.ts.map +1 -0
- package/dist/types/model/enum/TextNodeType.d.ts +37 -0
- package/dist/types/model/enum/TextNodeType.d.ts.map +1 -0
- package/dist/types/model/enum/TextSection.d.ts +27 -0
- package/dist/types/model/enum/TextSection.d.ts.map +1 -0
- package/dist/types/model/json/BitJson.d.ts +187 -0
- package/dist/types/model/json/BitJson.d.ts.map +1 -0
- package/dist/types/model/json/BitWrapperJson.d.ts +8 -0
- package/dist/types/model/json/BitWrapperJson.d.ts.map +1 -0
- package/dist/types/model/json/BodyBitJson.d.ts +61 -0
- package/dist/types/model/json/BodyBitJson.d.ts.map +1 -0
- package/dist/types/model/json/ParserJson.d.ts +10 -0
- package/dist/types/model/json/ParserJson.d.ts.map +1 -0
- package/dist/types/model/json/ResourceJson.d.ts +252 -0
- package/dist/types/model/json/ResourceJson.d.ts.map +1 -0
- package/dist/types/model/parser/ParserData.d.ts +11 -0
- package/dist/types/model/parser/ParserData.d.ts.map +1 -0
- package/dist/types/model/parser/ParserError.d.ts +17 -0
- package/dist/types/model/parser/ParserError.d.ts.map +1 -0
- package/dist/types/model/parser/ParserInfo.d.ts +10 -0
- package/dist/types/model/parser/ParserInfo.d.ts.map +1 -0
- package/dist/types/model/parser/ParserLocation.d.ts +6 -0
- package/dist/types/model/parser/ParserLocation.d.ts.map +1 -0
- package/dist/types/model/parser/ParserLocationRange.d.ts +10 -0
- package/dist/types/model/parser/ParserLocationRange.d.ts.map +1 -0
- package/dist/types/parser/bitmark/BitmarkParser.d.ts +28 -0
- package/dist/types/parser/bitmark/BitmarkParser.d.ts.map +1 -0
- package/dist/types/parser/bitmark/peg/BitmarkPegParser.d.ts +8 -0
- package/dist/types/parser/bitmark/peg/BitmarkPegParser.d.ts.map +1 -0
- package/dist/types/parser/bitmark/peg/BitmarkPegParserHelper.d.ts +96 -0
- package/dist/types/parser/bitmark/peg/BitmarkPegParserHelper.d.ts.map +1 -0
- package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts +128 -0
- package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts.map +1 -0
- package/dist/types/parser/bitmark/peg/BitmarkPegParserTypes.d.ts +261 -0
- package/dist/types/parser/bitmark/peg/BitmarkPegParserTypes.d.ts.map +1 -0
- package/dist/types/parser/bitmark/peg/BitmarkPegParserValidator.d.ts +182 -0
- package/dist/types/parser/bitmark/peg/BitmarkPegParserValidator.d.ts.map +1 -0
- package/dist/types/parser/bitmark/peg/PeggyGrammarLocation.d.ts +61 -0
- package/dist/types/parser/bitmark/peg/PeggyGrammarLocation.d.ts.map +1 -0
- package/dist/types/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.d.ts +5 -0
- package/dist/types/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.d.ts.map +1 -0
- package/dist/types/parser/bitmark/peg/contentProcessors/CardContentProcessor.d.ts +6 -0
- package/dist/types/parser/bitmark/peg/contentProcessors/CardContentProcessor.d.ts.map +1 -0
- package/dist/types/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.d.ts +5 -0
- package/dist/types/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.d.ts.map +1 -0
- package/dist/types/parser/bitmark/peg/contentProcessors/CommentTagContentProcessor.d.ts +5 -0
- package/dist/types/parser/bitmark/peg/contentProcessors/CommentTagContentProcessor.d.ts.map +1 -0
- package/dist/types/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.d.ts +5 -0
- package/dist/types/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.d.ts.map +1 -0
- package/dist/types/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.d.ts +6 -0
- package/dist/types/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.d.ts.map +1 -0
- package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.d.ts +5 -0
- package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.d.ts.map +1 -0
- package/dist/types/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.d.ts +5 -0
- package/dist/types/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.d.ts.map +1 -0
- package/dist/types/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.d.ts +5 -0
- package/dist/types/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.d.ts.map +1 -0
- package/dist/types/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.d.ts +5 -0
- package/dist/types/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.d.ts.map +1 -0
- package/dist/types/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.d.ts +14 -0
- package/dist/types/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.d.ts.map +1 -0
- package/dist/types/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.d.ts +6 -0
- package/dist/types/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.d.ts.map +1 -0
- package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.d.ts +6 -0
- package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.d.ts.map +1 -0
- package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.d.ts +5 -0
- package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.d.ts.map +1 -0
- package/dist/types/parser/json/JsonParser.d.ts +77 -0
- package/dist/types/parser/json/JsonParser.d.ts.map +1 -0
- package/dist/types/parser/text/TextParser.d.ts +19 -0
- package/dist/types/parser/text/TextParser.d.ts.map +1 -0
- package/dist/types/parser/text/peg/TextPegParser.d.ts +8 -0
- package/dist/types/parser/text/peg/TextPegParser.d.ts.map +1 -0
- package/dist/types/utils/ArrayUtils.d.ts +25 -0
- package/dist/types/utils/ArrayUtils.d.ts.map +1 -0
- package/dist/types/utils/BitUtils.d.ts +17 -0
- package/dist/types/utils/BitUtils.d.ts.map +1 -0
- package/dist/types/utils/BooleanUtils.d.ts +30 -0
- package/dist/types/utils/BooleanUtils.d.ts.map +1 -0
- package/dist/types/utils/FileUtils.d.ts +12 -0
- package/dist/types/utils/FileUtils.d.ts.map +1 -0
- package/dist/types/utils/NumberUtils.d.ts +16 -0
- package/dist/types/utils/NumberUtils.d.ts.map +1 -0
- package/dist/types/utils/ObjectUtils.d.ts +118 -0
- package/dist/types/utils/ObjectUtils.d.ts.map +1 -0
- package/dist/types/utils/StringUtils.d.ts +46 -0
- package/dist/types/utils/StringUtils.d.ts.map +1 -0
- package/dist/types/utils/UrlUtils.d.ts +7 -0
- package/dist/types/utils/UrlUtils.d.ts.map +1 -0
- package/dist/types/utils/env/Env.d.ts +39 -0
- package/dist/types/utils/env/Env.d.ts.map +1 -0
- package/dist/types/utils/env/Environment.d.ts +21 -0
- package/dist/types/utils/env/Environment.d.ts.map +1 -0
- package/dist/types/utils/env/Os.d.ts +19 -0
- package/dist/types/utils/env/Os.d.ts.map +1 -0
- package/dist/types/utils/env/Version.d.ts +10 -0
- package/dist/types/utils/env/Version.d.ts.map +1 -0
- package/dist/types/utils/env/userAgent.d.ts +11 -0
- package/dist/types/utils/env/userAgent.d.ts.map +1 -0
- package/dist/types/utils/polyfill/fs.d.ts +6 -0
- package/dist/types/utils/polyfill/fs.d.ts.map +1 -0
- package/package.json +127 -0
|
@@ -0,0 +1,2046 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
11
|
+
var t = {};
|
|
12
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
13
|
+
t[p] = s[p];
|
|
14
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
15
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
16
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
17
|
+
t[p[i]] = s[p[i]];
|
|
18
|
+
}
|
|
19
|
+
return t;
|
|
20
|
+
};
|
|
21
|
+
import { Ast } from '../../ast/Ast';
|
|
22
|
+
import { NodeType } from '../../model/ast/NodeType';
|
|
23
|
+
import { BitType } from '../../model/enum/BitType';
|
|
24
|
+
import { BitmarkVersion, DEFAULT_BITMARK_VERSION } from '../../model/enum/BitmarkVersion';
|
|
25
|
+
import { BodyBitType } from '../../model/enum/BodyBitType';
|
|
26
|
+
import { PropertyKey } from '../../model/enum/PropertyKey';
|
|
27
|
+
import { ResourceType } from '../../model/enum/ResourceType';
|
|
28
|
+
import { TextFormat } from '../../model/enum/TextFormat';
|
|
29
|
+
import { TextParser } from '../../parser/text/TextParser';
|
|
30
|
+
import { ArrayUtils } from '../../utils/ArrayUtils';
|
|
31
|
+
import { StringUtils } from '../../utils/StringUtils';
|
|
32
|
+
import { UrlUtils } from '../../utils/UrlUtils';
|
|
33
|
+
const DEFAULT_OPTIONS = {
|
|
34
|
+
// debugGenerationInline: true,
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Generate bitmark JSON from a bitmark AST
|
|
38
|
+
*
|
|
39
|
+
* TODO: NOT IMPLEMENTED!
|
|
40
|
+
*/
|
|
41
|
+
class JsonGenerator {
|
|
42
|
+
/**
|
|
43
|
+
* Generate bitmark JSON from a bitmark AST
|
|
44
|
+
*
|
|
45
|
+
* @param writer - destination for the output
|
|
46
|
+
* @param options - JSON generation options
|
|
47
|
+
*/
|
|
48
|
+
constructor(writer, options) {
|
|
49
|
+
var _a;
|
|
50
|
+
this.ast = new Ast();
|
|
51
|
+
this.textParser = new TextParser();
|
|
52
|
+
// State
|
|
53
|
+
this.json = [];
|
|
54
|
+
this.bitWrapperJson = {};
|
|
55
|
+
this.bitJson = {};
|
|
56
|
+
this.textDefault = '';
|
|
57
|
+
this.bodyDefault = '';
|
|
58
|
+
// Debug
|
|
59
|
+
this.printed = false;
|
|
60
|
+
this.bitmarkVersion = (_a = BitmarkVersion.fromValue(options === null || options === void 0 ? void 0 : options.bitmarkVersion)) !== null && _a !== void 0 ? _a : DEFAULT_BITMARK_VERSION;
|
|
61
|
+
this.options = Object.assign(Object.assign({}, DEFAULT_OPTIONS), options === null || options === void 0 ? void 0 : options.jsonOptions);
|
|
62
|
+
this.jsonPrettifySpace = this.options.prettify === true ? 2 : this.options.prettify || undefined;
|
|
63
|
+
// Set defaults according to bitmark version
|
|
64
|
+
if (this.bitmarkVersion === BitmarkVersion.v2) {
|
|
65
|
+
if (this.options.textAsPlainText === undefined) {
|
|
66
|
+
this.options.textAsPlainText = true;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
if (this.options.textAsPlainText === undefined) {
|
|
71
|
+
this.options.textAsPlainText = false;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
this.writer = writer;
|
|
75
|
+
this.enter = this.enter.bind(this);
|
|
76
|
+
this.between = this.between.bind(this);
|
|
77
|
+
this.exit = this.exit.bind(this);
|
|
78
|
+
this.leaf = this.leaf.bind(this);
|
|
79
|
+
this.generatePropertyHandlers();
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Generate bitmark markup from bitmark AST
|
|
83
|
+
*
|
|
84
|
+
* @param ast bitmark AST
|
|
85
|
+
*/
|
|
86
|
+
generate(ast) {
|
|
87
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
88
|
+
// Reset the state
|
|
89
|
+
this.resetState();
|
|
90
|
+
// Open the writer
|
|
91
|
+
yield this.writer.open();
|
|
92
|
+
// Walk the bitmark AST
|
|
93
|
+
this.walkAndWrite(ast);
|
|
94
|
+
// Write the JSON object to file
|
|
95
|
+
this.write(JSON.stringify(this.json, null, this.jsonPrettifySpace));
|
|
96
|
+
// Close the writer
|
|
97
|
+
yield this.writer.close();
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Generate text from a bitmark text AST synchronously
|
|
102
|
+
*
|
|
103
|
+
* @param ast bitmark text AST
|
|
104
|
+
*/
|
|
105
|
+
generateSync(ast) {
|
|
106
|
+
// Reset the state
|
|
107
|
+
this.resetState();
|
|
108
|
+
// Open the writer
|
|
109
|
+
this.writer.openSync();
|
|
110
|
+
// Walk the bitmark AST
|
|
111
|
+
this.walkAndWrite(ast);
|
|
112
|
+
// Close the writer
|
|
113
|
+
this.writer.closeSync();
|
|
114
|
+
}
|
|
115
|
+
resetState() {
|
|
116
|
+
this.json = [];
|
|
117
|
+
this.bitWrapperJson = {};
|
|
118
|
+
this.bitJson = {};
|
|
119
|
+
this.textDefault = this.options.textAsPlainText ? '' : [];
|
|
120
|
+
this.bodyDefault = this.options.textAsPlainText ? '' : [];
|
|
121
|
+
this.printed = false;
|
|
122
|
+
}
|
|
123
|
+
walkAndWrite(ast) {
|
|
124
|
+
// Walk the bitmark AST
|
|
125
|
+
this.ast.walk(ast, NodeType.bitmarkAst, this, undefined);
|
|
126
|
+
}
|
|
127
|
+
enter(node, parent, route) {
|
|
128
|
+
let res = void 0;
|
|
129
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
130
|
+
const gen = this;
|
|
131
|
+
const funcName = `enter_${node.key}`;
|
|
132
|
+
if (!this.printed) {
|
|
133
|
+
this.printed = true;
|
|
134
|
+
}
|
|
135
|
+
if (this.options.debugGenerationInline)
|
|
136
|
+
this.writeInlineDebug(node.key, { open: true });
|
|
137
|
+
if (typeof gen[funcName] === 'function') {
|
|
138
|
+
res = gen[funcName](node, parent, route);
|
|
139
|
+
}
|
|
140
|
+
return res;
|
|
141
|
+
}
|
|
142
|
+
between(node, left, right, parent, route) {
|
|
143
|
+
let res = void 0;
|
|
144
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
145
|
+
const gen = this;
|
|
146
|
+
const funcName = `between_${node.key}`;
|
|
147
|
+
if (this.options.debugGenerationInline)
|
|
148
|
+
this.writeInlineDebug(node.key, { single: true });
|
|
149
|
+
if (typeof gen[funcName] === 'function') {
|
|
150
|
+
res = gen[funcName](node, left, right, parent, route);
|
|
151
|
+
}
|
|
152
|
+
return res;
|
|
153
|
+
}
|
|
154
|
+
exit(node, parent, route) {
|
|
155
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
156
|
+
const gen = this;
|
|
157
|
+
const funcName = `exit_${node.key}`;
|
|
158
|
+
if (this.options.debugGenerationInline)
|
|
159
|
+
this.writeInlineDebug(node.key, { close: true });
|
|
160
|
+
if (typeof gen[funcName] === 'function') {
|
|
161
|
+
gen[funcName](node, parent, route);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
leaf(node, parent, route) {
|
|
165
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
166
|
+
const gen = this;
|
|
167
|
+
const funcName = `leaf_${node.key}`;
|
|
168
|
+
if (this.options.debugGenerationInline)
|
|
169
|
+
this.writeInlineDebug(node.key, { open: true });
|
|
170
|
+
if (typeof gen[funcName] === 'function') {
|
|
171
|
+
gen[funcName](node, parent, route);
|
|
172
|
+
}
|
|
173
|
+
if (this.options.debugGenerationInline)
|
|
174
|
+
this.writeInlineDebug(node.key, { close: true });
|
|
175
|
+
}
|
|
176
|
+
//
|
|
177
|
+
// NODE HANDLERS
|
|
178
|
+
//
|
|
179
|
+
//
|
|
180
|
+
// Non-Terminal nodes (branches)
|
|
181
|
+
//
|
|
182
|
+
// bitmark
|
|
183
|
+
enter_bitmarkAst(_node, _parent, _route) {
|
|
184
|
+
// Reset the JSON
|
|
185
|
+
this.json = [];
|
|
186
|
+
}
|
|
187
|
+
// bitmarkAst -> bits
|
|
188
|
+
// bitmarkAst -> bits -> bitsValue
|
|
189
|
+
enter_bitsValue(node, _parent, _route) {
|
|
190
|
+
const bit = node.value;
|
|
191
|
+
// Reset
|
|
192
|
+
this.bitWrapperJson = {
|
|
193
|
+
//
|
|
194
|
+
};
|
|
195
|
+
this.json.push(this.bitWrapperJson);
|
|
196
|
+
this.bitJson = this.createBitJson(bit);
|
|
197
|
+
this.bitWrapperJson.bit = this.bitJson;
|
|
198
|
+
}
|
|
199
|
+
exit_bitsValue(_node, _parent, _route) {
|
|
200
|
+
// Clean up the bit JSON, removing any unwanted values
|
|
201
|
+
this.cleanAndSetDefaultsForBitJson(this.bitJson);
|
|
202
|
+
}
|
|
203
|
+
// bitmarkAst -> bits -> bitsValue -> partner
|
|
204
|
+
enter_partner(node, parent, _route) {
|
|
205
|
+
const partner = node.value;
|
|
206
|
+
// Ignore example that is not at the bit level as it are handled elsewhere
|
|
207
|
+
if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType.bitsValue)
|
|
208
|
+
return;
|
|
209
|
+
const { name, avatarImage } = partner;
|
|
210
|
+
const partnerJson = {};
|
|
211
|
+
this.addProperty(partnerJson, 'name', name !== null && name !== void 0 ? name : '', true);
|
|
212
|
+
if (avatarImage) {
|
|
213
|
+
const res = this.parseResourceToJson(avatarImage);
|
|
214
|
+
if (res && res.type === ResourceType.image) {
|
|
215
|
+
partnerJson.avatarImage = res.image;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
this.bitJson.partner = partnerJson;
|
|
219
|
+
}
|
|
220
|
+
// bitmarkAst -> bits -> bitsValue -> sampleSolution
|
|
221
|
+
enter_sampleSolution(node, _parent, _route) {
|
|
222
|
+
if (node.value != null)
|
|
223
|
+
this.addProperty(this.bitJson, 'sampleSolution', node.value, true);
|
|
224
|
+
}
|
|
225
|
+
// bitmarkAst -> bits -> bitsValue -> itemLead
|
|
226
|
+
enter_itemLead(node, parent, _route) {
|
|
227
|
+
const itemLead = node.value;
|
|
228
|
+
const { item, lead } = itemLead;
|
|
229
|
+
// Ignore item / lead that are not at the bit level as they are handled elsewhere
|
|
230
|
+
if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType.bitsValue)
|
|
231
|
+
return;
|
|
232
|
+
if (item != null) {
|
|
233
|
+
this.bitJson.item = this.toTextAstOrString(item);
|
|
234
|
+
}
|
|
235
|
+
if (lead != null) {
|
|
236
|
+
this.bitJson.lead = this.toTextAstOrString(lead);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
// bitmarkAst -> bits -> bitsValue -> extraProperties
|
|
240
|
+
enter_extraProperties(node, _parent, _route) {
|
|
241
|
+
const extraProperties = node.value;
|
|
242
|
+
if (!this.options.excludeUnknownProperties && extraProperties) {
|
|
243
|
+
for (const [key, values] of Object.entries(extraProperties)) {
|
|
244
|
+
let k = key;
|
|
245
|
+
if (Object.prototype.hasOwnProperty.call(this.bitJson, key)) {
|
|
246
|
+
k = `_${key}`;
|
|
247
|
+
}
|
|
248
|
+
this.addProperty(this.bitJson, k, values);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
// bitmarkAst -> bits -> bitsValue -> body -> bodyParts
|
|
253
|
+
enter_bodyParts(node, _parent, route) {
|
|
254
|
+
const bodyParts = node.value;
|
|
255
|
+
const plainText = this.options.textAsPlainText;
|
|
256
|
+
const textFormat = this.getTextFormat(route);
|
|
257
|
+
let fullBodyTextStr = '';
|
|
258
|
+
let placeholderIndex = 0;
|
|
259
|
+
// Ensure body exists
|
|
260
|
+
if (this.bitJson.body == null)
|
|
261
|
+
this.bitJson.body = this.bodyDefault;
|
|
262
|
+
// Function for creating the placeholder keys
|
|
263
|
+
const createPlaceholderKeys = (i) => {
|
|
264
|
+
return {
|
|
265
|
+
// Old placeholder style (for backwards compatibility) = {0}
|
|
266
|
+
legacyPlaceholderKey: `{${i}}`,
|
|
267
|
+
// New placeholder style (cannot clash as bitmark parser would have removed it) = [!0]
|
|
268
|
+
placeholderKey: `[!${i}]`,
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
// Loop the text bodyParts creating full body text with the correct placeholders
|
|
272
|
+
//
|
|
273
|
+
// For text output 'fullBodyTextStr:
|
|
274
|
+
// - is created and written to the JSON
|
|
275
|
+
// - has placeholders inserted into 'fullBodyTextStr' in the format {0}
|
|
276
|
+
//
|
|
277
|
+
// For JSON output 'fullBodyTextStr:
|
|
278
|
+
// - is created and passed into the text parser to create the body text AST
|
|
279
|
+
// - has placeholders inserted into 'fullBodyTextStr' in the format [!0] to allow the text parser to identify
|
|
280
|
+
// where the body bits should be inserted
|
|
281
|
+
//
|
|
282
|
+
for (let i = 0; i < bodyParts.length; i++) {
|
|
283
|
+
const bodyPart = bodyParts[i];
|
|
284
|
+
const isText = bodyPart.type === BodyBitType.text;
|
|
285
|
+
if (isText) {
|
|
286
|
+
const asText = bodyPart;
|
|
287
|
+
const bodyTextPart = asText.data.bodyText;
|
|
288
|
+
// Append the text part to the full text body
|
|
289
|
+
fullBodyTextStr += bodyTextPart;
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
const { legacyPlaceholderKey, placeholderKey } = createPlaceholderKeys(placeholderIndex);
|
|
293
|
+
// Append the placeholder to the full text body
|
|
294
|
+
fullBodyTextStr += plainText ? legacyPlaceholderKey : placeholderKey;
|
|
295
|
+
placeholderIndex++;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
// Add string or AST to the body
|
|
299
|
+
this.bitJson.body = this.toTextAstOrString(fullBodyTextStr, textFormat);
|
|
300
|
+
const bodyAst = this.bitJson.body;
|
|
301
|
+
// Loop the body parts again to create the body bits:
|
|
302
|
+
// - For text output the body bits are inserted into the 'placeholders' object
|
|
303
|
+
// - For JSON output the body bits are inserted into body AST, replacing the placeholders created by the text parser
|
|
304
|
+
placeholderIndex = 0;
|
|
305
|
+
for (let i = 0; i < bodyParts.length; i++) {
|
|
306
|
+
const bodyPart = bodyParts[i];
|
|
307
|
+
// Skip text body parts as they are handled above
|
|
308
|
+
const isText = bodyPart.type === BodyBitType.text;
|
|
309
|
+
if (isText)
|
|
310
|
+
continue;
|
|
311
|
+
const bodyBit = bodyPart;
|
|
312
|
+
let bodyBitJson;
|
|
313
|
+
const { legacyPlaceholderKey } = createPlaceholderKeys(placeholderIndex);
|
|
314
|
+
switch (bodyPart.type) {
|
|
315
|
+
case BodyBitType.gap: {
|
|
316
|
+
const gap = bodyBit;
|
|
317
|
+
bodyBitJson = this.createGapJson(gap);
|
|
318
|
+
break;
|
|
319
|
+
}
|
|
320
|
+
case BodyBitType.select: {
|
|
321
|
+
const select = bodyBit;
|
|
322
|
+
bodyBitJson = this.createSelectJson(select);
|
|
323
|
+
break;
|
|
324
|
+
}
|
|
325
|
+
case BodyBitType.highlight: {
|
|
326
|
+
const highlight = bodyBit;
|
|
327
|
+
bodyBitJson = this.createHighlightJson(highlight);
|
|
328
|
+
break;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
// Add the gap to the placeholders
|
|
332
|
+
if (bodyBitJson) {
|
|
333
|
+
if (plainText) {
|
|
334
|
+
// Ensure placeholders exists
|
|
335
|
+
if (!this.bitJson.placeholders)
|
|
336
|
+
this.bitJson.placeholders = {};
|
|
337
|
+
// Add the body bit to the placeholders
|
|
338
|
+
this.bitJson.placeholders[legacyPlaceholderKey] = bodyBitJson;
|
|
339
|
+
}
|
|
340
|
+
else {
|
|
341
|
+
// Insert the body bit into the body AST
|
|
342
|
+
this.replacePlaceholderWithBodyBit(bodyAst, bodyBitJson, placeholderIndex);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
placeholderIndex++;
|
|
346
|
+
}
|
|
347
|
+
// Stop traversal of this branch for efficiency
|
|
348
|
+
return false;
|
|
349
|
+
}
|
|
350
|
+
// bitmarkAst -> bits -> bitsValue -> cardNode -> elements
|
|
351
|
+
enter_elements(node, _parent, _route) {
|
|
352
|
+
const elements = node.value;
|
|
353
|
+
// Ignore elements that are not at the bit level as they are handled elsewhere as quizzes
|
|
354
|
+
// if (parent?.key !== NodeType.bitsValue) return;
|
|
355
|
+
if (elements && elements.length > 0) {
|
|
356
|
+
this.bitJson.elements = elements;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
// bitmarkAst -> bits -> bitsValue -> statement
|
|
360
|
+
enter_statement(node, parent, _route) {
|
|
361
|
+
var _a, _b;
|
|
362
|
+
const statement = node.value;
|
|
363
|
+
// Ignore statement that is not at the bit level as it is handled elsewhere
|
|
364
|
+
if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType.bitsValue)
|
|
365
|
+
return;
|
|
366
|
+
if (statement) {
|
|
367
|
+
this.bitJson.statement = (_a = statement.text) !== null && _a !== void 0 ? _a : '';
|
|
368
|
+
this.bitJson.isCorrect = (_b = statement.isCorrect) !== null && _b !== void 0 ? _b : false;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
// bitmarkAst -> bits -> bitsValue -> cardNode -> statements -> statementsValue
|
|
372
|
+
enter_statements(node, parent, _route) {
|
|
373
|
+
var _a, _b, _c, _d;
|
|
374
|
+
const statements = node.value;
|
|
375
|
+
// Ignore statements that are not at the card node level as they are handled elsewhere
|
|
376
|
+
if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType.cardNode)
|
|
377
|
+
return;
|
|
378
|
+
const statementsJson = [];
|
|
379
|
+
if (statements) {
|
|
380
|
+
for (const s of statements) {
|
|
381
|
+
// Create the statement
|
|
382
|
+
const statementJson = Object.assign(Object.assign({ statement: (_a = s.text) !== null && _a !== void 0 ? _a : '', isCorrect: (_b = s.isCorrect) !== null && _b !== void 0 ? _b : false }, this.toItemLeadHintInstruction(s)), this.toExampleAndIsExample(s.example));
|
|
383
|
+
// Delete unwanted properties
|
|
384
|
+
if (((_c = s.itemLead) === null || _c === void 0 ? void 0 : _c.item) == null)
|
|
385
|
+
delete statementJson.item;
|
|
386
|
+
if (((_d = s.itemLead) === null || _d === void 0 ? void 0 : _d.lead) == null)
|
|
387
|
+
delete statementJson.lead;
|
|
388
|
+
if ((s === null || s === void 0 ? void 0 : s.hint) == null)
|
|
389
|
+
delete statementJson.hint;
|
|
390
|
+
if ((s === null || s === void 0 ? void 0 : s.instruction) == null)
|
|
391
|
+
delete statementJson.instruction;
|
|
392
|
+
if ((s === null || s === void 0 ? void 0 : s.example) == null)
|
|
393
|
+
delete statementJson.example;
|
|
394
|
+
statementsJson.push(statementJson);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
if (statementsJson.length > 0) {
|
|
398
|
+
this.bitJson.statements = statementsJson;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
// bitmarkAst -> bits -> bitsValue -> choices
|
|
402
|
+
// X bitmarkAst -> bits -> bitsValue -> cardNode -> quizzes -> quizzesValue -> choices
|
|
403
|
+
enter_choices(node, parent, _route) {
|
|
404
|
+
var _a, _b, _c;
|
|
405
|
+
const choices = node.value;
|
|
406
|
+
// Ignore choices that are not at the bit level as they are handled elsewhere as quizzes
|
|
407
|
+
if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType.bitsValue)
|
|
408
|
+
return;
|
|
409
|
+
const choicesJson = [];
|
|
410
|
+
if (choices) {
|
|
411
|
+
for (const c of choices) {
|
|
412
|
+
// Create the choice
|
|
413
|
+
const choiceJson = Object.assign({ choice: (_a = c.text) !== null && _a !== void 0 ? _a : '', isCorrect: (_b = c.isCorrect) !== null && _b !== void 0 ? _b : false }, this.toItemLeadHintInstruction(c));
|
|
414
|
+
// Delete unwanted properties
|
|
415
|
+
if (((_c = c.itemLead) === null || _c === void 0 ? void 0 : _c.lead) == null)
|
|
416
|
+
delete choiceJson.lead;
|
|
417
|
+
choicesJson.push(choiceJson);
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
if (choicesJson.length > 0) {
|
|
421
|
+
this.bitJson.choices = choicesJson;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
// bitmarkAst -> bits -> bitsValue -> responses
|
|
425
|
+
// X bitmarkAst -> bits -> bitsValue -> cardNode -> quizzes -> quizzesValue -> responses
|
|
426
|
+
enter_responses(node, parent, _route) {
|
|
427
|
+
var _a, _b, _c;
|
|
428
|
+
const responses = node.value;
|
|
429
|
+
// Ignore responses that are not at the bit level as they are handled elsewhere as quizzes
|
|
430
|
+
if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType.bitsValue)
|
|
431
|
+
return;
|
|
432
|
+
const responsesJson = [];
|
|
433
|
+
if (responses) {
|
|
434
|
+
for (const r of responses) {
|
|
435
|
+
// Create the response
|
|
436
|
+
const responseJson = Object.assign({ response: (_a = r.text) !== null && _a !== void 0 ? _a : '', isCorrect: (_b = r.isCorrect) !== null && _b !== void 0 ? _b : false }, this.toItemLeadHintInstruction(r));
|
|
437
|
+
// Delete unwanted properties
|
|
438
|
+
if (((_c = r.itemLead) === null || _c === void 0 ? void 0 : _c.lead) == null)
|
|
439
|
+
delete responseJson.lead;
|
|
440
|
+
responsesJson.push(responseJson);
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
if (responsesJson.length > 0) {
|
|
444
|
+
this.bitJson.responses = responsesJson;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
// bitmarkAst -> bits -> bitsValue -> cardNode -> quizzes
|
|
448
|
+
enter_quizzes(node, _parent, _route) {
|
|
449
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
450
|
+
const quizzes = node.value;
|
|
451
|
+
const quizzesJson = [];
|
|
452
|
+
if (quizzes) {
|
|
453
|
+
for (const q of quizzes) {
|
|
454
|
+
// Choices
|
|
455
|
+
const choicesJson = [];
|
|
456
|
+
if (q.choices) {
|
|
457
|
+
for (const c of q.choices) {
|
|
458
|
+
// Create the choice
|
|
459
|
+
const choiceJson = Object.assign({ choice: (_a = c.text) !== null && _a !== void 0 ? _a : '', isCorrect: (_b = c.isCorrect) !== null && _b !== void 0 ? _b : false }, this.toItemLeadHintInstruction(c));
|
|
460
|
+
// Delete unwanted properties
|
|
461
|
+
if (((_c = q.itemLead) === null || _c === void 0 ? void 0 : _c.lead) == null)
|
|
462
|
+
delete choiceJson.lead;
|
|
463
|
+
choicesJson.push(choiceJson);
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
// Responses
|
|
467
|
+
const responsesJson = [];
|
|
468
|
+
if (q.responses) {
|
|
469
|
+
for (const c of q.responses) {
|
|
470
|
+
// Create the choice
|
|
471
|
+
const responseJson = Object.assign({ response: (_d = c.text) !== null && _d !== void 0 ? _d : '', isCorrect: (_e = c.isCorrect) !== null && _e !== void 0 ? _e : false }, this.toItemLeadHintInstruction(c));
|
|
472
|
+
// Delete unwanted properties
|
|
473
|
+
if (((_f = q.itemLead) === null || _f === void 0 ? void 0 : _f.lead) == null)
|
|
474
|
+
delete responseJson.lead;
|
|
475
|
+
responsesJson.push(responseJson);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
// Create the quiz
|
|
479
|
+
const quizJson = Object.assign(Object.assign(Object.assign({}, this.toItemLeadHintInstruction(q)), this.toExampleAndIsExample(q.example)), { choices: q.choices ? choicesJson : undefined, responses: q.responses ? responsesJson : undefined });
|
|
480
|
+
// Delete unwanted properties
|
|
481
|
+
if (((_g = q.itemLead) === null || _g === void 0 ? void 0 : _g.lead) == null)
|
|
482
|
+
delete quizJson.lead;
|
|
483
|
+
quizzesJson.push(quizJson);
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
if (quizzesJson.length > 0) {
|
|
487
|
+
this.bitJson.quizzes = quizzesJson;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
// bitmarkAst -> bits -> bitsValue -> cardNode -> heading
|
|
491
|
+
enter_heading(node, _parent, _route) {
|
|
492
|
+
var _a, _b;
|
|
493
|
+
const heading = node.value;
|
|
494
|
+
// Ensure the heading is valid for writing out (it will be valid, but if it is empty, it should not be written)
|
|
495
|
+
let valid = false;
|
|
496
|
+
if (heading && heading.forKeys /*&& heading.forValues && heading.forValues.length > 0*/) {
|
|
497
|
+
valid = true;
|
|
498
|
+
}
|
|
499
|
+
if (!valid)
|
|
500
|
+
return false;
|
|
501
|
+
// Create the heading
|
|
502
|
+
const headingJson = {
|
|
503
|
+
forKeys: (_a = heading.forKeys) !== null && _a !== void 0 ? _a : '',
|
|
504
|
+
};
|
|
505
|
+
// TODO: Should probably check wether bit is a match or a matrix and add a string for match and array for matrix
|
|
506
|
+
if (Array.isArray(heading.forValues)) {
|
|
507
|
+
if (heading.forValues.length > 1) {
|
|
508
|
+
headingJson.forValues = heading.forValues;
|
|
509
|
+
}
|
|
510
|
+
else if (heading.forValues.length === 1) {
|
|
511
|
+
headingJson.forValues = heading.forValues[0];
|
|
512
|
+
}
|
|
513
|
+
else {
|
|
514
|
+
headingJson.forValues = heading.forValues;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
else {
|
|
518
|
+
headingJson.forValues = (_b = heading.forValues) !== null && _b !== void 0 ? _b : '';
|
|
519
|
+
}
|
|
520
|
+
this.bitJson.heading = headingJson;
|
|
521
|
+
}
|
|
522
|
+
// bitmarkAst -> bits -> bitsValue -> cardNode -> pairs
|
|
523
|
+
enter_pairs(node, _parent, _route) {
|
|
524
|
+
var _a, _b, _c, _d, _e;
|
|
525
|
+
const pairs = node.value;
|
|
526
|
+
const pairsJson = [];
|
|
527
|
+
if (pairs) {
|
|
528
|
+
for (const p of pairs) {
|
|
529
|
+
// Create the question
|
|
530
|
+
const pairJson = Object.assign(Object.assign(Object.assign({ key: (_a = p.key) !== null && _a !== void 0 ? _a : '', keyAudio: p.keyAudio ? this.addAudioResource(p.keyAudio) : undefined, keyImage: p.keyImage ? this.addImageResource(p.keyImage) : undefined, values: (_b = p.values) !== null && _b !== void 0 ? _b : [] }, this.toItemLeadHintInstruction(p)), this.toExampleAndIsExample(p.example)), { isCaseSensitive: (_c = p.isCaseSensitive) !== null && _c !== void 0 ? _c : true, isLongAnswer: (_d = !p.isShortAnswer) !== null && _d !== void 0 ? _d : false });
|
|
531
|
+
// Delete unwanted properties
|
|
532
|
+
if (((_e = p.itemLead) === null || _e === void 0 ? void 0 : _e.lead) == null)
|
|
533
|
+
delete pairJson.lead;
|
|
534
|
+
if (pairJson.key) {
|
|
535
|
+
delete pairJson.keyAudio;
|
|
536
|
+
delete pairJson.keyImage;
|
|
537
|
+
}
|
|
538
|
+
if (pairJson.keyAudio != null) {
|
|
539
|
+
delete pairJson.key;
|
|
540
|
+
delete pairJson.keyImage;
|
|
541
|
+
}
|
|
542
|
+
if (pairJson.keyImage != null) {
|
|
543
|
+
delete pairJson.key;
|
|
544
|
+
delete pairJson.keyAudio;
|
|
545
|
+
}
|
|
546
|
+
pairsJson.push(pairJson);
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
if (pairsJson.length > 0) {
|
|
550
|
+
this.bitJson.pairs = pairsJson;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
// bitmarkAst -> bits -> bitsValue -> cardNode -> matrix
|
|
554
|
+
enter_matrix(node, _parent, _route) {
|
|
555
|
+
var _a, _b, _c, _d, _e, _f;
|
|
556
|
+
const matrix = node.value;
|
|
557
|
+
const matrixJsonArray = [];
|
|
558
|
+
if (matrix) {
|
|
559
|
+
for (const m of matrix) {
|
|
560
|
+
// Choices
|
|
561
|
+
const matrixCellsJson = [];
|
|
562
|
+
if (m.cells) {
|
|
563
|
+
for (const c of m.cells) {
|
|
564
|
+
// Create the choice
|
|
565
|
+
const matrixCellJson = Object.assign(Object.assign({ values: (_a = c.values) !== null && _a !== void 0 ? _a : [] }, this.toItemLeadHintInstruction(c)), this.toExampleAndIsExample(c.example));
|
|
566
|
+
// Delete unwanted properties
|
|
567
|
+
if (((_b = c.itemLead) === null || _b === void 0 ? void 0 : _b.lead) == null)
|
|
568
|
+
delete matrixCellJson.lead;
|
|
569
|
+
if (c.hint == null)
|
|
570
|
+
delete matrixCellJson.hint;
|
|
571
|
+
if (c.example == null)
|
|
572
|
+
delete matrixCellJson.isExample;
|
|
573
|
+
if (c.example == null)
|
|
574
|
+
delete matrixCellJson.example;
|
|
575
|
+
matrixCellsJson.push(matrixCellJson);
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
// Create the matrix
|
|
579
|
+
const matrixJson = Object.assign(Object.assign(Object.assign({ key: (_c = m.key) !== null && _c !== void 0 ? _c : '', cells: matrixCellsJson !== null && matrixCellsJson !== void 0 ? matrixCellsJson : [] }, this.toItemLeadHintInstruction(m)), this.toExampleAndIsExample(m.example)), { isCaseSensitive: (_d = m.isCaseSensitive) !== null && _d !== void 0 ? _d : true, isLongAnswer: (_e = !m.isShortAnswer) !== null && _e !== void 0 ? _e : false });
|
|
580
|
+
// Delete unwanted properties
|
|
581
|
+
if (((_f = m.itemLead) === null || _f === void 0 ? void 0 : _f.lead) == null)
|
|
582
|
+
delete matrixJson.lead;
|
|
583
|
+
if (m.instruction == null)
|
|
584
|
+
delete matrixJson.instruction;
|
|
585
|
+
matrixJsonArray.push(matrixJson);
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
if (matrixJsonArray.length > 0) {
|
|
589
|
+
this.bitJson.matrix = matrixJsonArray;
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
// bitmarkAst -> bits -> bitsValue -> cardNode -> questions
|
|
593
|
+
enter_questions(node, _parent, _route) {
|
|
594
|
+
var _a, _b, _c, _d, _e;
|
|
595
|
+
const questions = node.value;
|
|
596
|
+
const questionsJson = [];
|
|
597
|
+
if (questions) {
|
|
598
|
+
for (const q of questions) {
|
|
599
|
+
// Create the question
|
|
600
|
+
const questionJson = Object.assign(Object.assign(Object.assign({ question: (_a = q.question) !== null && _a !== void 0 ? _a : '', partialAnswer: (_b = ArrayUtils.asSingle(q.partialAnswer)) !== null && _b !== void 0 ? _b : '', sampleSolution: (_c = q.sampleSolution) !== null && _c !== void 0 ? _c : '' }, this.toItemLeadHintInstruction(q)), this.toExampleAndIsExample(q.example)), {
|
|
601
|
+
// isCaseSensitive: q.isCaseSensitive ?? true,
|
|
602
|
+
isShortAnswer: (_d = q.isShortAnswer) !== null && _d !== void 0 ? _d : true });
|
|
603
|
+
// Delete unwanted properties
|
|
604
|
+
if (((_e = q.itemLead) === null || _e === void 0 ? void 0 : _e.lead) == null)
|
|
605
|
+
delete questionJson.lead;
|
|
606
|
+
questionsJson.push(questionJson);
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
if (questionsJson.length > 0) {
|
|
610
|
+
this.bitJson.questions = questionsJson;
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
// bitmarkAst -> bits -> bitsValue -> cardNode -> botResponses
|
|
614
|
+
enter_botResponses(node, parent, _route) {
|
|
615
|
+
var _a, _b, _c, _d;
|
|
616
|
+
const botResponses = node.value;
|
|
617
|
+
// Ignore responses that are not at the cardNode level as they are handled elsewhere
|
|
618
|
+
if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType.cardNode)
|
|
619
|
+
return;
|
|
620
|
+
const responsesJson = [];
|
|
621
|
+
if (botResponses) {
|
|
622
|
+
for (const r of botResponses) {
|
|
623
|
+
// Create the response
|
|
624
|
+
const responseJson = Object.assign({ response: (_a = r.response) !== null && _a !== void 0 ? _a : '', reaction: (_b = r.reaction) !== null && _b !== void 0 ? _b : '', feedback: (_c = r.feedback) !== null && _c !== void 0 ? _c : '' }, this.toItemLeadHintInstruction(r));
|
|
625
|
+
// Delete unwanted properties
|
|
626
|
+
if (((_d = r.itemLead) === null || _d === void 0 ? void 0 : _d.lead) == null)
|
|
627
|
+
delete responseJson.lead;
|
|
628
|
+
if (r.hint == null)
|
|
629
|
+
delete responseJson.hint;
|
|
630
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
631
|
+
delete responseJson.instruction;
|
|
632
|
+
responsesJson.push(responseJson);
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
if (responsesJson.length > 0) {
|
|
636
|
+
this.bitJson.responses = responsesJson;
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
// bitmarkAst -> bits -> bitsValue -> resource
|
|
640
|
+
enter_resource(node, _parent, _route) {
|
|
641
|
+
const resource = node.value;
|
|
642
|
+
// This is a resource - handle it with the common code
|
|
643
|
+
this.bitJson.resource = this.parseResourceToJson(resource);
|
|
644
|
+
}
|
|
645
|
+
//
|
|
646
|
+
// Terminal nodes (leaves)
|
|
647
|
+
//
|
|
648
|
+
// bitmarkAst -> bits -> bitsValue -> title
|
|
649
|
+
leaf_title(node, _parent, _route) {
|
|
650
|
+
this.bitJson.title = this.toTextAstOrString(node.value);
|
|
651
|
+
}
|
|
652
|
+
// bitmarkAst -> bits -> bitsValue -> subtitle
|
|
653
|
+
leaf_subtitle(node, _parent, _route) {
|
|
654
|
+
this.bitJson.subtitle = this.toTextAstOrString(node.value);
|
|
655
|
+
}
|
|
656
|
+
// // bitmarkAst -> bits -> bitsValue -> level
|
|
657
|
+
leaf_level(node, _parent, _route) {
|
|
658
|
+
var _a;
|
|
659
|
+
if (node.value != null)
|
|
660
|
+
this.addProperty(this.bitJson, 'level', (_a = node.value) !== null && _a !== void 0 ? _a : 1, true);
|
|
661
|
+
}
|
|
662
|
+
// bitmarkAst -> bits -> bitsValue -> book
|
|
663
|
+
leaf_book(node, _parent, _route) {
|
|
664
|
+
if (node.value != null)
|
|
665
|
+
this.addProperty(this.bitJson, 'book', node.value, true);
|
|
666
|
+
}
|
|
667
|
+
// bitmarkAst -> bits -> bitsValue -> anchor
|
|
668
|
+
leaf_anchor(node, _parent, _route) {
|
|
669
|
+
if (node.value != null)
|
|
670
|
+
this.addProperty(this.bitJson, 'anchor', node.value, true);
|
|
671
|
+
}
|
|
672
|
+
// bitmarkAst -> bits -> bitsValue -> reference
|
|
673
|
+
leaf_reference(node, _parent, _route) {
|
|
674
|
+
if (node.value != null)
|
|
675
|
+
this.addProperty(this.bitJson, 'reference', node.value, true);
|
|
676
|
+
}
|
|
677
|
+
// bitmarkAst -> bits -> bitsValue -> referenceEnd
|
|
678
|
+
leaf_referenceEnd(node, _parent, _route) {
|
|
679
|
+
if (node.value != null)
|
|
680
|
+
this.addProperty(this.bitJson, 'referenceEnd', node.value, true);
|
|
681
|
+
}
|
|
682
|
+
// bitmarkAst -> bits -> bitsValue -> * -> hint
|
|
683
|
+
leaf_hint(node, parent, _route) {
|
|
684
|
+
const hint = node.value;
|
|
685
|
+
// Ignore hint that is not at the bit level as it are handled elsewhere
|
|
686
|
+
if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType.bitsValue)
|
|
687
|
+
return;
|
|
688
|
+
this.bitJson.hint = this.toTextAstOrString(hint);
|
|
689
|
+
}
|
|
690
|
+
// bitmarkAst -> bits -> bitsValue -> * -> instruction
|
|
691
|
+
leaf_instruction(node, parent, _route) {
|
|
692
|
+
const instruction = node.value;
|
|
693
|
+
// Ignore instruction that is not at the bit level as it are handled elsewhere
|
|
694
|
+
if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType.bitsValue)
|
|
695
|
+
return;
|
|
696
|
+
this.bitJson.instruction = this.toTextAstOrString(instruction);
|
|
697
|
+
}
|
|
698
|
+
// bitmarkAst -> bits -> bitsValue -> example
|
|
699
|
+
leaf_example(node, parent, _route) {
|
|
700
|
+
const example = node.value;
|
|
701
|
+
// Ignore example that is not at the bit level as it are handled elsewhere
|
|
702
|
+
if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType.bitsValue)
|
|
703
|
+
return;
|
|
704
|
+
const res = this.toExampleAndIsExample(example);
|
|
705
|
+
this.bitJson.isExample = res.isExample;
|
|
706
|
+
this.bitJson.example = res.example;
|
|
707
|
+
}
|
|
708
|
+
// bitmarkAst -> bits -> footer -> footerText
|
|
709
|
+
leaf_footerText(node, _parent, _route) {
|
|
710
|
+
const footer = node.value;
|
|
711
|
+
this.bitJson.footer = this.toTextAstOrString(footer);
|
|
712
|
+
}
|
|
713
|
+
// bitmarkAst -> bits -> bitsValue -> markup
|
|
714
|
+
leaf_markup(node, _parent, _route) {
|
|
715
|
+
const bitmark = node.value;
|
|
716
|
+
if (bitmark)
|
|
717
|
+
this.bitWrapperJson.bitmark = bitmark;
|
|
718
|
+
}
|
|
719
|
+
// bitmarkAst -> bits -> bitsValue -> parser
|
|
720
|
+
enter_parser(node, parent, _route) {
|
|
721
|
+
const parser = node.value;
|
|
722
|
+
if (parser) {
|
|
723
|
+
const { version, excessResources: parserExcessResources, warnings, errors } = parser, parserRest = __rest(parser, ["version", "excessResources", "warnings", "errors"]);
|
|
724
|
+
const bitmarkVersion = `${this.bitmarkVersion}`;
|
|
725
|
+
// Parse resources to JSON from AST
|
|
726
|
+
let excessResources;
|
|
727
|
+
if (Array.isArray(parserExcessResources) && parserExcessResources.length > 0) {
|
|
728
|
+
excessResources = [];
|
|
729
|
+
for (const r of parserExcessResources) {
|
|
730
|
+
const rJson = this.parseResourceToJson(r);
|
|
731
|
+
if (rJson)
|
|
732
|
+
excessResources.push(rJson);
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
if ((parent === null || parent === void 0 ? void 0 : parent.key) === NodeType.bitsValue) {
|
|
736
|
+
// Bit level parser information
|
|
737
|
+
this.bitWrapperJson.parser = Object.assign(Object.assign({ version,
|
|
738
|
+
bitmarkVersion }, parserRest), { warnings,
|
|
739
|
+
errors,
|
|
740
|
+
excessResources });
|
|
741
|
+
if (!this.options.enableWarnings) {
|
|
742
|
+
// Remove warnings if not enabled
|
|
743
|
+
delete this.bitWrapperJson.parser.warnings;
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
else {
|
|
747
|
+
// Top level parser information (not specific to a bit)
|
|
748
|
+
// TODO - not sure where this error can be written
|
|
749
|
+
// this.bitWrapperJson.parser = {
|
|
750
|
+
// errors,
|
|
751
|
+
// };
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
// bitmarkAst -> errors
|
|
756
|
+
// protected enter_errors(node: NodeInfo, parent: NodeInfo | undefined, _route: NodeInfo[],
|
|
757
|
+
// context: Context): void {
|
|
758
|
+
// const errors = node.value as ParserError[] | undefined;
|
|
759
|
+
// if (errors && errors.length > 0) {
|
|
760
|
+
// // Complete bit is invalid
|
|
761
|
+
// // TODO - not sure where this error can be written
|
|
762
|
+
// // this.bitWrapperJson.parser = {
|
|
763
|
+
// // errors,
|
|
764
|
+
// // };
|
|
765
|
+
// }
|
|
766
|
+
// }
|
|
767
|
+
//
|
|
768
|
+
// Generated Node Handlers
|
|
769
|
+
//
|
|
770
|
+
/**
|
|
771
|
+
* Generate the handlers for properties, as they are mostly the same, but not quite
|
|
772
|
+
*/
|
|
773
|
+
generatePropertyHandlers() {
|
|
774
|
+
var _a;
|
|
775
|
+
for (const key of PropertyKey.values()) {
|
|
776
|
+
const validatedKey = PropertyKey.fromValue(key);
|
|
777
|
+
const meta = (_a = PropertyKey.getMetadata(validatedKey)) !== null && _a !== void 0 ? _a : {};
|
|
778
|
+
const astKey = meta.astKey ? meta.astKey : key;
|
|
779
|
+
const funcName = `enter_${astKey}`;
|
|
780
|
+
// Special cases (handled outside of the automatically generated handlers)
|
|
781
|
+
if (astKey === PropertyKey.example)
|
|
782
|
+
continue;
|
|
783
|
+
if (astKey === PropertyKey.partner)
|
|
784
|
+
continue;
|
|
785
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
786
|
+
this[funcName] = (node, parent, _route) => {
|
|
787
|
+
const value = node.value;
|
|
788
|
+
if (value == null)
|
|
789
|
+
return;
|
|
790
|
+
// if (key === 'progress') debugger;
|
|
791
|
+
// Ignore any property that is not at the bit level as that will be handled by a different handler
|
|
792
|
+
if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType.bitsValue)
|
|
793
|
+
return;
|
|
794
|
+
// Convert key as needed
|
|
795
|
+
let jsonKey = key;
|
|
796
|
+
if (meta.jsonKey)
|
|
797
|
+
jsonKey = meta.jsonKey;
|
|
798
|
+
// Add the property
|
|
799
|
+
this.addProperty(this.bitJson, jsonKey, value, meta.isSingle);
|
|
800
|
+
};
|
|
801
|
+
// Bind this
|
|
802
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
803
|
+
this[funcName] = this[funcName].bind(this);
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
// // END NODE HANDLERS
|
|
807
|
+
//
|
|
808
|
+
// HELPER FUNCTIONS
|
|
809
|
+
//
|
|
810
|
+
createGapJson(gap) {
|
|
811
|
+
var _a;
|
|
812
|
+
const data = gap.data;
|
|
813
|
+
// Create the gap
|
|
814
|
+
const gapJson = Object.assign(Object.assign(Object.assign({ type: 'gap', solutions: data.solutions }, this.toItemLeadHintInstruction(data)), this.toExampleAndIsExample(data.example)), { isCaseSensitive: (_a = data.isCaseSensitive) !== null && _a !== void 0 ? _a : true });
|
|
815
|
+
// Remove unwanted properties
|
|
816
|
+
if (!gapJson.lead)
|
|
817
|
+
delete gapJson.lead;
|
|
818
|
+
return gapJson;
|
|
819
|
+
}
|
|
820
|
+
createSelectJson(select) {
|
|
821
|
+
var _a, _b, _c;
|
|
822
|
+
const data = select.data;
|
|
823
|
+
// Create the select options
|
|
824
|
+
const options = [];
|
|
825
|
+
for (const option of data.options) {
|
|
826
|
+
const optionJson = Object.assign(Object.assign({ text: option.text, isCorrect: (_a = option.isCorrect) !== null && _a !== void 0 ? _a : false }, this.toItemLeadHintInstruction(option)), this.toExampleAndIsExample(option.example));
|
|
827
|
+
// Remove unwanted properties
|
|
828
|
+
if (!optionJson.item)
|
|
829
|
+
delete optionJson.item;
|
|
830
|
+
if (!optionJson.lead)
|
|
831
|
+
delete optionJson.lead;
|
|
832
|
+
if (!optionJson.instruction)
|
|
833
|
+
delete optionJson.instruction;
|
|
834
|
+
if (!optionJson.example)
|
|
835
|
+
delete optionJson.example;
|
|
836
|
+
if (!optionJson.isExample)
|
|
837
|
+
delete optionJson.isExample;
|
|
838
|
+
if (!optionJson.isCaseSensitive)
|
|
839
|
+
delete optionJson.isCaseSensitive;
|
|
840
|
+
options.push(optionJson);
|
|
841
|
+
}
|
|
842
|
+
// Create the select
|
|
843
|
+
const selectJson = Object.assign(Object.assign({ type: 'select', prefix: (_b = data.prefix) !== null && _b !== void 0 ? _b : '', options, postfix: (_c = data.postfix) !== null && _c !== void 0 ? _c : '' }, this.toItemLeadHintInstruction(data)), this.toExampleAndIsExample(data.example));
|
|
844
|
+
// Remove unwanted properties
|
|
845
|
+
if (!selectJson.lead)
|
|
846
|
+
delete selectJson.lead;
|
|
847
|
+
return selectJson;
|
|
848
|
+
}
|
|
849
|
+
createHighlightJson(highlight) {
|
|
850
|
+
var _a, _b, _c, _d;
|
|
851
|
+
const data = highlight.data;
|
|
852
|
+
// Create the highlight options
|
|
853
|
+
const texts = [];
|
|
854
|
+
for (const text of data.texts) {
|
|
855
|
+
const textJson = Object.assign(Object.assign({ text: text.text, isCorrect: (_a = text.isCorrect) !== null && _a !== void 0 ? _a : false, isHighlighted: (_b = text.isHighlighted) !== null && _b !== void 0 ? _b : false }, this.toItemLeadHintInstruction(text)), this.toExampleAndIsExample(text.example));
|
|
856
|
+
// Remove unwanted properties
|
|
857
|
+
if (!textJson.item)
|
|
858
|
+
delete textJson.item;
|
|
859
|
+
if (!textJson.lead)
|
|
860
|
+
delete textJson.lead;
|
|
861
|
+
if (!textJson.hint)
|
|
862
|
+
delete textJson.hint;
|
|
863
|
+
if (!textJson.example)
|
|
864
|
+
delete textJson.example;
|
|
865
|
+
if (!textJson.isExample)
|
|
866
|
+
delete textJson.isExample;
|
|
867
|
+
if (!textJson.isCaseSensitive)
|
|
868
|
+
delete textJson.isCaseSensitive;
|
|
869
|
+
texts.push(textJson);
|
|
870
|
+
}
|
|
871
|
+
// Create the select
|
|
872
|
+
const highlightJson = Object.assign(Object.assign({ type: 'highlight', prefix: (_c = data.prefix) !== null && _c !== void 0 ? _c : '', texts, postfix: (_d = data.postfix) !== null && _d !== void 0 ? _d : '' }, this.toItemLeadHintInstruction(data)), this.toExampleAndIsExample(data.example));
|
|
873
|
+
// Remove unwanted properties
|
|
874
|
+
if (!highlightJson.lead)
|
|
875
|
+
delete highlightJson.lead;
|
|
876
|
+
return highlightJson;
|
|
877
|
+
}
|
|
878
|
+
parseResourceToJson(resource) {
|
|
879
|
+
if (!resource)
|
|
880
|
+
return undefined;
|
|
881
|
+
// All resources should now be valid as they are validated in the AST
|
|
882
|
+
// TODO: remove code below
|
|
883
|
+
// // Check if a resource has a value, if not, we should not write it (or any of its chained properties)
|
|
884
|
+
// let valid = false;
|
|
885
|
+
// if (resource.value) {
|
|
886
|
+
// valid = true;
|
|
887
|
+
// }
|
|
888
|
+
// // Resource is not valid, return undefined
|
|
889
|
+
// if (!valid) return undefined;
|
|
890
|
+
// // Resource is valid, write it.
|
|
891
|
+
let resourceJson;
|
|
892
|
+
switch (resource.type) {
|
|
893
|
+
case ResourceType.image:
|
|
894
|
+
resourceJson = {
|
|
895
|
+
type: ResourceType.image,
|
|
896
|
+
image: this.addImageResource(resource),
|
|
897
|
+
};
|
|
898
|
+
break;
|
|
899
|
+
case ResourceType.imageLink:
|
|
900
|
+
resourceJson = {
|
|
901
|
+
type: ResourceType.imageLink,
|
|
902
|
+
imageLink: this.addImageLinkResource(resource),
|
|
903
|
+
};
|
|
904
|
+
break;
|
|
905
|
+
case ResourceType.audio:
|
|
906
|
+
resourceJson = {
|
|
907
|
+
type: ResourceType.audio,
|
|
908
|
+
audio: this.addAudioResource(resource),
|
|
909
|
+
};
|
|
910
|
+
break;
|
|
911
|
+
case ResourceType.audioEmbed:
|
|
912
|
+
resourceJson = {
|
|
913
|
+
type: ResourceType.audioEmbed,
|
|
914
|
+
audioEmbed: this.addAudioEmbedResource(resource),
|
|
915
|
+
};
|
|
916
|
+
break;
|
|
917
|
+
case ResourceType.audioLink:
|
|
918
|
+
resourceJson = {
|
|
919
|
+
type: ResourceType.audioLink,
|
|
920
|
+
audioLink: this.addAudioLinkResource(resource),
|
|
921
|
+
};
|
|
922
|
+
break;
|
|
923
|
+
case ResourceType.video:
|
|
924
|
+
resourceJson = {
|
|
925
|
+
type: ResourceType.video,
|
|
926
|
+
video: this.addVideoResource(resource),
|
|
927
|
+
};
|
|
928
|
+
break;
|
|
929
|
+
case ResourceType.videoEmbed:
|
|
930
|
+
resourceJson = {
|
|
931
|
+
type: ResourceType.videoEmbed,
|
|
932
|
+
videoEmbed: this.addVideoEmbedResource(resource),
|
|
933
|
+
};
|
|
934
|
+
resourceJson.videoEmbed = this.addVideoLinkResource(resource);
|
|
935
|
+
break;
|
|
936
|
+
case ResourceType.videoLink:
|
|
937
|
+
resourceJson = {
|
|
938
|
+
type: ResourceType.videoLink,
|
|
939
|
+
videoLink: this.addVideoLinkResource(resource),
|
|
940
|
+
};
|
|
941
|
+
break;
|
|
942
|
+
case ResourceType.stillImageFilm: {
|
|
943
|
+
const stillImageFilmResource = resource;
|
|
944
|
+
// Only write the resource if it has both an image and audio
|
|
945
|
+
if (stillImageFilmResource.image.value != null && stillImageFilmResource.audio.value != null) {
|
|
946
|
+
resourceJson = {
|
|
947
|
+
type: ResourceType.stillImageFilm,
|
|
948
|
+
image: this.addImageResource(stillImageFilmResource.image),
|
|
949
|
+
audio: this.addAudioResource(stillImageFilmResource.audio),
|
|
950
|
+
};
|
|
951
|
+
}
|
|
952
|
+
break;
|
|
953
|
+
}
|
|
954
|
+
case ResourceType.stillImageFilmEmbed:
|
|
955
|
+
resourceJson = {
|
|
956
|
+
type: ResourceType.stillImageFilmEmbed,
|
|
957
|
+
stillImageFilmEmbed: this.addStillImageFilmEmbedResource(resource),
|
|
958
|
+
};
|
|
959
|
+
break;
|
|
960
|
+
case ResourceType.stillImageFilmLink:
|
|
961
|
+
resourceJson = {
|
|
962
|
+
type: ResourceType.stillImageFilmLink,
|
|
963
|
+
stillImageFilmLink: this.addStillImageFilmLinkResource(resource),
|
|
964
|
+
};
|
|
965
|
+
break;
|
|
966
|
+
case ResourceType.article:
|
|
967
|
+
resourceJson = {
|
|
968
|
+
type: ResourceType.article,
|
|
969
|
+
article: this.addArticleResource(resource),
|
|
970
|
+
};
|
|
971
|
+
break;
|
|
972
|
+
case ResourceType.document:
|
|
973
|
+
resourceJson = {
|
|
974
|
+
type: ResourceType.document,
|
|
975
|
+
document: this.addDocumentResource(resource),
|
|
976
|
+
};
|
|
977
|
+
break;
|
|
978
|
+
case ResourceType.documentEmbed:
|
|
979
|
+
resourceJson = {
|
|
980
|
+
type: ResourceType.documentEmbed,
|
|
981
|
+
documentEmbed: this.addDocumentEmbedResource(resource),
|
|
982
|
+
};
|
|
983
|
+
break;
|
|
984
|
+
case ResourceType.documentLink:
|
|
985
|
+
resourceJson = {
|
|
986
|
+
type: ResourceType.documentLink,
|
|
987
|
+
documentLink: this.addDocumentLinkResource(resource),
|
|
988
|
+
};
|
|
989
|
+
break;
|
|
990
|
+
case ResourceType.documentDownload:
|
|
991
|
+
resourceJson = {
|
|
992
|
+
type: ResourceType.documentDownload,
|
|
993
|
+
documentDownload: this.addDocumentDownloadResource(resource),
|
|
994
|
+
};
|
|
995
|
+
break;
|
|
996
|
+
case ResourceType.appLink:
|
|
997
|
+
resourceJson = {
|
|
998
|
+
type: ResourceType.appLink,
|
|
999
|
+
appLink: this.addAppLinkResource(resource),
|
|
1000
|
+
};
|
|
1001
|
+
break;
|
|
1002
|
+
case ResourceType.websiteLink:
|
|
1003
|
+
resourceJson = {
|
|
1004
|
+
type: ResourceType.websiteLink,
|
|
1005
|
+
websiteLink: this.addWebsiteLinkResource(resource),
|
|
1006
|
+
};
|
|
1007
|
+
break;
|
|
1008
|
+
default:
|
|
1009
|
+
}
|
|
1010
|
+
return resourceJson;
|
|
1011
|
+
}
|
|
1012
|
+
addImageResource(resource) {
|
|
1013
|
+
var _a, _b, _c;
|
|
1014
|
+
const resourceJson = {};
|
|
1015
|
+
if (StringUtils.isString(resource)) {
|
|
1016
|
+
const value = resource;
|
|
1017
|
+
resource = {
|
|
1018
|
+
type: ResourceType.image,
|
|
1019
|
+
value,
|
|
1020
|
+
format: UrlUtils.fileExtensionFromUrl(value),
|
|
1021
|
+
provider: UrlUtils.domainFromUrl(value),
|
|
1022
|
+
};
|
|
1023
|
+
}
|
|
1024
|
+
resource = resource; // Keep TS compiler happy
|
|
1025
|
+
if (resource.format != null)
|
|
1026
|
+
resourceJson.format = resource.format;
|
|
1027
|
+
if (resource.provider != null)
|
|
1028
|
+
resourceJson.provider = resource.provider;
|
|
1029
|
+
if (resource.value != null)
|
|
1030
|
+
resourceJson.src = resource.value;
|
|
1031
|
+
if (resource.src1x != null)
|
|
1032
|
+
resourceJson.src1x = resource.src1x;
|
|
1033
|
+
if (resource.src2x != null)
|
|
1034
|
+
resourceJson.src2x = resource.src2x;
|
|
1035
|
+
if (resource.src3x != null)
|
|
1036
|
+
resourceJson.src3x = resource.src3x;
|
|
1037
|
+
if (resource.src4x != null)
|
|
1038
|
+
resourceJson.src4x = resource.src4x;
|
|
1039
|
+
resourceJson.width = (_a = resource.width) !== null && _a !== void 0 ? _a : null;
|
|
1040
|
+
resourceJson.height = (_b = resource.height) !== null && _b !== void 0 ? _b : null;
|
|
1041
|
+
resourceJson.alt = (_c = resource.alt) !== null && _c !== void 0 ? _c : '';
|
|
1042
|
+
this.addGenericResourceProperties(resource, resourceJson);
|
|
1043
|
+
return resourceJson;
|
|
1044
|
+
}
|
|
1045
|
+
addImageLinkResource(resource) {
|
|
1046
|
+
var _a, _b, _c;
|
|
1047
|
+
const resourceJson = {};
|
|
1048
|
+
if (StringUtils.isString(resource)) {
|
|
1049
|
+
const value = resource;
|
|
1050
|
+
resource = {
|
|
1051
|
+
type: ResourceType.imageLink,
|
|
1052
|
+
value,
|
|
1053
|
+
format: UrlUtils.fileExtensionFromUrl(value),
|
|
1054
|
+
provider: UrlUtils.domainFromUrl(value),
|
|
1055
|
+
};
|
|
1056
|
+
}
|
|
1057
|
+
resource = resource; // Keep TS compiler happy
|
|
1058
|
+
if (resource.format != null)
|
|
1059
|
+
resourceJson.format = resource.format;
|
|
1060
|
+
if (resource.provider != null)
|
|
1061
|
+
resourceJson.provider = resource.provider;
|
|
1062
|
+
if (resource.value != null)
|
|
1063
|
+
resourceJson.url = resource.value;
|
|
1064
|
+
if (resource.src1x != null)
|
|
1065
|
+
resourceJson.src1x = resource.src1x;
|
|
1066
|
+
if (resource.src2x != null)
|
|
1067
|
+
resourceJson.src2x = resource.src2x;
|
|
1068
|
+
if (resource.src3x != null)
|
|
1069
|
+
resourceJson.src3x = resource.src3x;
|
|
1070
|
+
if (resource.src4x != null)
|
|
1071
|
+
resourceJson.src4x = resource.src4x;
|
|
1072
|
+
resourceJson.width = (_a = resource.width) !== null && _a !== void 0 ? _a : null;
|
|
1073
|
+
resourceJson.height = (_b = resource.height) !== null && _b !== void 0 ? _b : null;
|
|
1074
|
+
resourceJson.alt = (_c = resource.alt) !== null && _c !== void 0 ? _c : '';
|
|
1075
|
+
this.addGenericResourceProperties(resource, resourceJson);
|
|
1076
|
+
return resourceJson;
|
|
1077
|
+
}
|
|
1078
|
+
addAudioResource(resource) {
|
|
1079
|
+
const resourceJson = {};
|
|
1080
|
+
if (resource.format != null)
|
|
1081
|
+
resourceJson.format = resource.format;
|
|
1082
|
+
if (resource.provider != null)
|
|
1083
|
+
resourceJson.provider = resource.provider;
|
|
1084
|
+
if (resource.value != null)
|
|
1085
|
+
resourceJson.src = resource.value;
|
|
1086
|
+
if (resource.duration != null)
|
|
1087
|
+
resourceJson.duration = resource.duration;
|
|
1088
|
+
if (resource.mute != null)
|
|
1089
|
+
resourceJson.mute = resource.mute;
|
|
1090
|
+
if (resource.autoplay != null)
|
|
1091
|
+
resourceJson.autoplay = resource.autoplay;
|
|
1092
|
+
this.addGenericResourceProperties(resource, resourceJson);
|
|
1093
|
+
return resourceJson;
|
|
1094
|
+
}
|
|
1095
|
+
addAudioEmbedResource(resource) {
|
|
1096
|
+
const resourceJson = {};
|
|
1097
|
+
if (resource.format != null)
|
|
1098
|
+
resourceJson.format = resource.format;
|
|
1099
|
+
if (resource.provider != null)
|
|
1100
|
+
resourceJson.provider = resource.provider;
|
|
1101
|
+
if (resource.value != null)
|
|
1102
|
+
resourceJson.src = resource.value;
|
|
1103
|
+
if (resource.duration != null)
|
|
1104
|
+
resourceJson.duration = resource.duration;
|
|
1105
|
+
if (resource.mute != null)
|
|
1106
|
+
resourceJson.mute = resource.mute;
|
|
1107
|
+
if (resource.autoplay != null)
|
|
1108
|
+
resourceJson.autoplay = resource.autoplay;
|
|
1109
|
+
this.addGenericResourceProperties(resource, resourceJson);
|
|
1110
|
+
return resourceJson;
|
|
1111
|
+
}
|
|
1112
|
+
addAudioLinkResource(resource) {
|
|
1113
|
+
const resourceJson = {};
|
|
1114
|
+
if (resource.format != null)
|
|
1115
|
+
resourceJson.format = resource.format;
|
|
1116
|
+
if (resource.provider != null)
|
|
1117
|
+
resourceJson.provider = resource.provider;
|
|
1118
|
+
if (resource.value != null)
|
|
1119
|
+
resourceJson.url = resource.value;
|
|
1120
|
+
if (resource.duration != null)
|
|
1121
|
+
resourceJson.duration = resource.duration;
|
|
1122
|
+
if (resource.mute != null)
|
|
1123
|
+
resourceJson.mute = resource.mute;
|
|
1124
|
+
if (resource.autoplay != null)
|
|
1125
|
+
resourceJson.autoplay = resource.autoplay;
|
|
1126
|
+
this.addGenericResourceProperties(resource, resourceJson, true);
|
|
1127
|
+
return resourceJson;
|
|
1128
|
+
}
|
|
1129
|
+
addVideoResource(resource) {
|
|
1130
|
+
var _a, _b;
|
|
1131
|
+
const resourceJson = {};
|
|
1132
|
+
if (resource.format != null)
|
|
1133
|
+
resourceJson.format = resource.format;
|
|
1134
|
+
if (resource.provider != null)
|
|
1135
|
+
resourceJson.provider = resource.provider;
|
|
1136
|
+
if (resource.value != null)
|
|
1137
|
+
resourceJson.src = resource.value;
|
|
1138
|
+
resourceJson.width = (_a = resource.width) !== null && _a !== void 0 ? _a : null;
|
|
1139
|
+
resourceJson.height = (_b = resource.height) !== null && _b !== void 0 ? _b : null;
|
|
1140
|
+
if (resource.duration != null)
|
|
1141
|
+
resourceJson.duration = resource.duration;
|
|
1142
|
+
if (resource.mute != null)
|
|
1143
|
+
resourceJson.mute = resource.mute;
|
|
1144
|
+
if (resource.autoplay != null)
|
|
1145
|
+
resourceJson.autoplay = resource.autoplay;
|
|
1146
|
+
if (resource.allowSubtitles != null)
|
|
1147
|
+
resourceJson.allowSubtitles = resource.allowSubtitles;
|
|
1148
|
+
if (resource.showSubtitles != null)
|
|
1149
|
+
resourceJson.showSubtitles = resource.showSubtitles;
|
|
1150
|
+
if (resource.alt != null)
|
|
1151
|
+
resourceJson.alt = resource.alt;
|
|
1152
|
+
if (resource.posterImage != null)
|
|
1153
|
+
resourceJson.posterImage = this.addImageResource(resource.posterImage);
|
|
1154
|
+
if (resource.thumbnails != null && resource.thumbnails.length > 0) {
|
|
1155
|
+
resourceJson.thumbnails = [];
|
|
1156
|
+
for (const thumbnail of resource.thumbnails) {
|
|
1157
|
+
resourceJson.thumbnails.push(this.addImageResource(thumbnail));
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
this.addGenericResourceProperties(resource, resourceJson);
|
|
1161
|
+
return resourceJson;
|
|
1162
|
+
}
|
|
1163
|
+
addVideoEmbedResource(resource) {
|
|
1164
|
+
var _a, _b;
|
|
1165
|
+
const resourceJson = {};
|
|
1166
|
+
if (resource.format != null)
|
|
1167
|
+
resourceJson.format = resource.format;
|
|
1168
|
+
if (resource.provider != null)
|
|
1169
|
+
resourceJson.provider = resource.provider;
|
|
1170
|
+
if (resource.value != null)
|
|
1171
|
+
resourceJson.src = resource.value;
|
|
1172
|
+
resourceJson.width = (_a = resource.width) !== null && _a !== void 0 ? _a : null;
|
|
1173
|
+
resourceJson.height = (_b = resource.height) !== null && _b !== void 0 ? _b : null;
|
|
1174
|
+
if (resource.duration != null)
|
|
1175
|
+
resourceJson.duration = resource.duration;
|
|
1176
|
+
if (resource.mute != null)
|
|
1177
|
+
resourceJson.mute = resource.mute;
|
|
1178
|
+
if (resource.autoplay != null)
|
|
1179
|
+
resourceJson.autoplay = resource.autoplay;
|
|
1180
|
+
if (resource.allowSubtitles != null)
|
|
1181
|
+
resourceJson.allowSubtitles = resource.allowSubtitles;
|
|
1182
|
+
if (resource.showSubtitles != null)
|
|
1183
|
+
resourceJson.showSubtitles = resource.showSubtitles;
|
|
1184
|
+
if (resource.alt != null)
|
|
1185
|
+
resourceJson.alt = resource.alt;
|
|
1186
|
+
if (resource.posterImage != null)
|
|
1187
|
+
resourceJson.posterImage = this.addImageResource(resource.posterImage);
|
|
1188
|
+
if (resource.thumbnails != null && resource.thumbnails.length > 0) {
|
|
1189
|
+
resourceJson.thumbnails = [];
|
|
1190
|
+
for (const thumbnail of resource.thumbnails) {
|
|
1191
|
+
resourceJson.thumbnails.push(this.addImageResource(thumbnail));
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
this.addGenericResourceProperties(resource, resourceJson);
|
|
1195
|
+
return resourceJson;
|
|
1196
|
+
}
|
|
1197
|
+
addVideoLinkResource(resource) {
|
|
1198
|
+
var _a, _b;
|
|
1199
|
+
const resourceJson = {};
|
|
1200
|
+
if (resource.format != null)
|
|
1201
|
+
resourceJson.format = resource.format;
|
|
1202
|
+
if (resource.provider != null)
|
|
1203
|
+
resourceJson.provider = resource.provider;
|
|
1204
|
+
if (resource.value != null)
|
|
1205
|
+
resourceJson.url = resource.value;
|
|
1206
|
+
resourceJson.width = (_a = resource.width) !== null && _a !== void 0 ? _a : null;
|
|
1207
|
+
resourceJson.height = (_b = resource.height) !== null && _b !== void 0 ? _b : null;
|
|
1208
|
+
if (resource.duration != null)
|
|
1209
|
+
resourceJson.duration = resource.duration;
|
|
1210
|
+
if (resource.mute != null)
|
|
1211
|
+
resourceJson.mute = resource.mute;
|
|
1212
|
+
if (resource.autoplay != null)
|
|
1213
|
+
resourceJson.autoplay = resource.autoplay;
|
|
1214
|
+
if (resource.allowSubtitles != null)
|
|
1215
|
+
resourceJson.allowSubtitles = resource.allowSubtitles;
|
|
1216
|
+
if (resource.showSubtitles != null)
|
|
1217
|
+
resourceJson.showSubtitles = resource.showSubtitles;
|
|
1218
|
+
if (resource.alt != null)
|
|
1219
|
+
resourceJson.alt = resource.alt;
|
|
1220
|
+
if (resource.posterImage != null)
|
|
1221
|
+
resourceJson.posterImage = this.addImageResource(resource.posterImage);
|
|
1222
|
+
if (resource.thumbnails != null && resource.thumbnails.length > 0) {
|
|
1223
|
+
resourceJson.thumbnails = [];
|
|
1224
|
+
for (const thumbnail of resource.thumbnails) {
|
|
1225
|
+
resourceJson.thumbnails.push(this.addImageResource(thumbnail));
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
this.addGenericResourceProperties(resource, resourceJson);
|
|
1229
|
+
return resourceJson;
|
|
1230
|
+
}
|
|
1231
|
+
addStillImageFilmEmbedResource(resource) {
|
|
1232
|
+
var _a, _b;
|
|
1233
|
+
const resourceJson = {};
|
|
1234
|
+
if (resource.format != null)
|
|
1235
|
+
resourceJson.format = resource.format;
|
|
1236
|
+
if (resource.provider != null)
|
|
1237
|
+
resourceJson.provider = resource.provider;
|
|
1238
|
+
if (resource.value != null)
|
|
1239
|
+
resourceJson.url = resource.value;
|
|
1240
|
+
resourceJson.width = (_a = resource.width) !== null && _a !== void 0 ? _a : null;
|
|
1241
|
+
resourceJson.height = (_b = resource.height) !== null && _b !== void 0 ? _b : null;
|
|
1242
|
+
if (resource.duration != null)
|
|
1243
|
+
resourceJson.duration = resource.duration;
|
|
1244
|
+
if (resource.mute != null)
|
|
1245
|
+
resourceJson.mute = resource.mute;
|
|
1246
|
+
if (resource.autoplay != null)
|
|
1247
|
+
resourceJson.autoplay = resource.autoplay;
|
|
1248
|
+
if (resource.allowSubtitles != null)
|
|
1249
|
+
resourceJson.allowSubtitles = resource.allowSubtitles;
|
|
1250
|
+
if (resource.showSubtitles != null)
|
|
1251
|
+
resourceJson.showSubtitles = resource.showSubtitles;
|
|
1252
|
+
if (resource.alt != null)
|
|
1253
|
+
resourceJson.alt = resource.alt;
|
|
1254
|
+
if (resource.posterImage != null)
|
|
1255
|
+
resourceJson.posterImage = this.addImageResource(resource.posterImage);
|
|
1256
|
+
if (resource.thumbnails != null && resource.thumbnails.length > 0) {
|
|
1257
|
+
resourceJson.thumbnails = [];
|
|
1258
|
+
for (const thumbnail of resource.thumbnails) {
|
|
1259
|
+
resourceJson.thumbnails.push(this.addImageResource(thumbnail));
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
this.addGenericResourceProperties(resource, resourceJson);
|
|
1263
|
+
return resourceJson;
|
|
1264
|
+
}
|
|
1265
|
+
addStillImageFilmLinkResource(resource) {
|
|
1266
|
+
var _a, _b;
|
|
1267
|
+
const resourceJson = {};
|
|
1268
|
+
if (resource.format != null)
|
|
1269
|
+
resourceJson.format = resource.format;
|
|
1270
|
+
if (resource.provider != null)
|
|
1271
|
+
resourceJson.provider = resource.provider;
|
|
1272
|
+
if (resource.value != null)
|
|
1273
|
+
resourceJson.url = resource.value;
|
|
1274
|
+
resourceJson.width = (_a = resource.width) !== null && _a !== void 0 ? _a : null;
|
|
1275
|
+
resourceJson.height = (_b = resource.height) !== null && _b !== void 0 ? _b : null;
|
|
1276
|
+
if (resource.duration != null)
|
|
1277
|
+
resourceJson.duration = resource.duration;
|
|
1278
|
+
if (resource.mute != null)
|
|
1279
|
+
resourceJson.mute = resource.mute;
|
|
1280
|
+
if (resource.autoplay != null)
|
|
1281
|
+
resourceJson.autoplay = resource.autoplay;
|
|
1282
|
+
if (resource.allowSubtitles != null)
|
|
1283
|
+
resourceJson.allowSubtitles = resource.allowSubtitles;
|
|
1284
|
+
if (resource.showSubtitles != null)
|
|
1285
|
+
resourceJson.showSubtitles = resource.showSubtitles;
|
|
1286
|
+
if (resource.alt != null)
|
|
1287
|
+
resourceJson.alt = resource.alt;
|
|
1288
|
+
if (resource.posterImage != null)
|
|
1289
|
+
resourceJson.posterImage = this.addImageResource(resource.posterImage);
|
|
1290
|
+
if (resource.thumbnails != null && resource.thumbnails.length > 0) {
|
|
1291
|
+
resourceJson.thumbnails = [];
|
|
1292
|
+
for (const thumbnail of resource.thumbnails) {
|
|
1293
|
+
resourceJson.thumbnails.push(this.addImageResource(thumbnail));
|
|
1294
|
+
}
|
|
1295
|
+
}
|
|
1296
|
+
this.addGenericResourceProperties(resource, resourceJson);
|
|
1297
|
+
return resourceJson;
|
|
1298
|
+
}
|
|
1299
|
+
addArticleResource(resource) {
|
|
1300
|
+
const resourceJson = {};
|
|
1301
|
+
if (resource.format != null)
|
|
1302
|
+
resourceJson.format = resource.format;
|
|
1303
|
+
if (resource.provider != null)
|
|
1304
|
+
resourceJson.provider = resource.provider;
|
|
1305
|
+
if (resource.value != null)
|
|
1306
|
+
resourceJson.body = resource.value;
|
|
1307
|
+
// if (resource.href != null) resourceJson.href = resource.href; // It is never used (and doesn't exist in the AST model)
|
|
1308
|
+
this.addGenericResourceProperties(resource, resourceJson);
|
|
1309
|
+
return resourceJson;
|
|
1310
|
+
}
|
|
1311
|
+
addDocumentResource(resource) {
|
|
1312
|
+
const resourceJson = {};
|
|
1313
|
+
if (resource.format != null)
|
|
1314
|
+
resourceJson.format = resource.format;
|
|
1315
|
+
if (resource.provider != null)
|
|
1316
|
+
resourceJson.provider = resource.provider;
|
|
1317
|
+
if (resource.value != null)
|
|
1318
|
+
resourceJson.url = resource.value;
|
|
1319
|
+
// if (resource.href != null) resourceJson.href = resource.href; // It is never used (and doesn't exist in the AST model)
|
|
1320
|
+
this.addGenericResourceProperties(resource, resourceJson);
|
|
1321
|
+
return resourceJson;
|
|
1322
|
+
}
|
|
1323
|
+
addDocumentEmbedResource(resource) {
|
|
1324
|
+
const resourceJson = {};
|
|
1325
|
+
if (resource.format != null)
|
|
1326
|
+
resourceJson.format = resource.format;
|
|
1327
|
+
if (resource.provider != null)
|
|
1328
|
+
resourceJson.provider = resource.provider;
|
|
1329
|
+
if (resource.value != null)
|
|
1330
|
+
resourceJson.url = resource.value;
|
|
1331
|
+
// if (resource.href != null) resourceJson.href = resource.href; // It is never used (and doesn't exist in the AST model)
|
|
1332
|
+
this.addGenericResourceProperties(resource, resourceJson);
|
|
1333
|
+
return resourceJson;
|
|
1334
|
+
}
|
|
1335
|
+
addDocumentLinkResource(resource) {
|
|
1336
|
+
const resourceJson = {};
|
|
1337
|
+
if (resource.format != null)
|
|
1338
|
+
resourceJson.format = resource.format;
|
|
1339
|
+
if (resource.provider != null)
|
|
1340
|
+
resourceJson.provider = resource.provider;
|
|
1341
|
+
if (resource.value != null)
|
|
1342
|
+
resourceJson.url = resource.value;
|
|
1343
|
+
// if (resource.href != null) resourceJson.href = resource.href; // It is never used (and doesn't exist in the AST model)
|
|
1344
|
+
this.addGenericResourceProperties(resource, resourceJson);
|
|
1345
|
+
return resourceJson;
|
|
1346
|
+
}
|
|
1347
|
+
addDocumentDownloadResource(resource) {
|
|
1348
|
+
const resourceJson = {};
|
|
1349
|
+
if (resource.format != null)
|
|
1350
|
+
resourceJson.format = resource.format;
|
|
1351
|
+
if (resource.provider != null)
|
|
1352
|
+
resourceJson.provider = resource.provider;
|
|
1353
|
+
if (resource.value != null)
|
|
1354
|
+
resourceJson.url = resource.value;
|
|
1355
|
+
// if (resource.href != null) resourceJson.href = resource.href; // It is never used (and doesn't exist in the AST model)
|
|
1356
|
+
this.addGenericResourceProperties(resource, resourceJson);
|
|
1357
|
+
return resourceJson;
|
|
1358
|
+
}
|
|
1359
|
+
addAppLinkResource(resource) {
|
|
1360
|
+
const resourceJson = {};
|
|
1361
|
+
// if (resource.format != null) resourceJson.format = resource.format;
|
|
1362
|
+
if (resource.value != null)
|
|
1363
|
+
resourceJson.url = resource.value;
|
|
1364
|
+
this.addGenericResourceProperties(resource, resourceJson);
|
|
1365
|
+
return resourceJson;
|
|
1366
|
+
}
|
|
1367
|
+
addWebsiteLinkResource(resource) {
|
|
1368
|
+
const resourceJson = {};
|
|
1369
|
+
// if (resource.format != null) resourceJson.format = resource.format;
|
|
1370
|
+
if (resource.value != null)
|
|
1371
|
+
resourceJson.url = resource.value;
|
|
1372
|
+
if (resource.siteName != null)
|
|
1373
|
+
resourceJson.siteName = resource.siteName;
|
|
1374
|
+
this.addGenericResourceProperties(resource, resourceJson);
|
|
1375
|
+
return resourceJson;
|
|
1376
|
+
}
|
|
1377
|
+
addGenericResourceProperties(resource, resourceJson, noDefaults) {
|
|
1378
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1379
|
+
if (noDefaults) {
|
|
1380
|
+
if (resource.license != null)
|
|
1381
|
+
resourceJson.license = (_a = resource.license) !== null && _a !== void 0 ? _a : '';
|
|
1382
|
+
if (resource.copyright != null)
|
|
1383
|
+
resourceJson.copyright = (_b = resource.copyright) !== null && _b !== void 0 ? _b : '';
|
|
1384
|
+
if (resource.provider != null)
|
|
1385
|
+
resourceJson.provider = resource.provider;
|
|
1386
|
+
if (resource.showInIndex != null)
|
|
1387
|
+
resourceJson.showInIndex = (_c = resource.showInIndex) !== null && _c !== void 0 ? _c : false;
|
|
1388
|
+
if (resource.caption != null)
|
|
1389
|
+
resourceJson.caption = this.toTextAstOrString((_d = resource.caption) !== null && _d !== void 0 ? _d : '');
|
|
1390
|
+
}
|
|
1391
|
+
else {
|
|
1392
|
+
resourceJson.license = (_e = resource.license) !== null && _e !== void 0 ? _e : '';
|
|
1393
|
+
resourceJson.copyright = (_f = resource.copyright) !== null && _f !== void 0 ? _f : '';
|
|
1394
|
+
if (resource.provider != null)
|
|
1395
|
+
resourceJson.provider = resource.provider;
|
|
1396
|
+
resourceJson.showInIndex = (_g = resource.showInIndex) !== null && _g !== void 0 ? _g : false;
|
|
1397
|
+
resourceJson.caption = this.toTextAstOrString((_h = resource.caption) !== null && _h !== void 0 ? _h : '');
|
|
1398
|
+
}
|
|
1399
|
+
return resourceJson;
|
|
1400
|
+
}
|
|
1401
|
+
toItemLeadHintInstruction(item) {
|
|
1402
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1403
|
+
return {
|
|
1404
|
+
item: this.toTextAstOrString((_b = (_a = item.itemLead) === null || _a === void 0 ? void 0 : _a.item) !== null && _b !== void 0 ? _b : ''),
|
|
1405
|
+
lead: this.toTextAstOrString((_d = (_c = item.itemLead) === null || _c === void 0 ? void 0 : _c.lead) !== null && _d !== void 0 ? _d : ''),
|
|
1406
|
+
hint: this.toTextAstOrString((_e = item.hint) !== null && _e !== void 0 ? _e : ''),
|
|
1407
|
+
instruction: this.toTextAstOrString((_f = item.instruction) !== null && _f !== void 0 ? _f : ''),
|
|
1408
|
+
};
|
|
1409
|
+
}
|
|
1410
|
+
toExampleAndIsExample(exampleIn) {
|
|
1411
|
+
let isExample = false;
|
|
1412
|
+
let example = this.textDefault;
|
|
1413
|
+
if (exampleIn === true) {
|
|
1414
|
+
isExample = true;
|
|
1415
|
+
}
|
|
1416
|
+
else if (exampleIn) {
|
|
1417
|
+
isExample = true;
|
|
1418
|
+
example = this.toTextAstOrString(exampleIn);
|
|
1419
|
+
}
|
|
1420
|
+
return {
|
|
1421
|
+
isExample,
|
|
1422
|
+
example,
|
|
1423
|
+
};
|
|
1424
|
+
}
|
|
1425
|
+
addProperty(
|
|
1426
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1427
|
+
target, name, values, singleWithoutArray) {
|
|
1428
|
+
if (values !== undefined) {
|
|
1429
|
+
if (!Array.isArray(values))
|
|
1430
|
+
values = [values];
|
|
1431
|
+
if (Array.isArray(values) && values.length > 0) {
|
|
1432
|
+
if (singleWithoutArray && values.length >= 1) {
|
|
1433
|
+
target[name] = values[values.length - 1];
|
|
1434
|
+
}
|
|
1435
|
+
else {
|
|
1436
|
+
target[name] = values;
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
/**
|
|
1442
|
+
* Get the bit type from any node
|
|
1443
|
+
*
|
|
1444
|
+
* @param route the route to the node
|
|
1445
|
+
* @returns the bit type
|
|
1446
|
+
*/
|
|
1447
|
+
getBitType(route) {
|
|
1448
|
+
for (const node of route) {
|
|
1449
|
+
if (node.key === NodeType.bitsValue) {
|
|
1450
|
+
const n = node.value;
|
|
1451
|
+
return BitType.fromValue(n === null || n === void 0 ? void 0 : n.bitType);
|
|
1452
|
+
}
|
|
1453
|
+
}
|
|
1454
|
+
return undefined;
|
|
1455
|
+
}
|
|
1456
|
+
/**
|
|
1457
|
+
* Get the text format from any node
|
|
1458
|
+
*
|
|
1459
|
+
* @param route the route to the node
|
|
1460
|
+
* @returns the text format
|
|
1461
|
+
*/
|
|
1462
|
+
getTextFormat(route) {
|
|
1463
|
+
for (const node of route) {
|
|
1464
|
+
if (node.key === NodeType.bitsValue) {
|
|
1465
|
+
const n = node.value;
|
|
1466
|
+
return TextFormat.fromValue(n === null || n === void 0 ? void 0 : n.textFormat);
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
return undefined;
|
|
1470
|
+
}
|
|
1471
|
+
/**
|
|
1472
|
+
* Convert parse a string to TextAst if required, otherwise just return the string as is.
|
|
1473
|
+
* @param text
|
|
1474
|
+
* @returns
|
|
1475
|
+
*/
|
|
1476
|
+
toTextAstOrString(text, format = TextFormat.bitmarkMinusMinus) {
|
|
1477
|
+
if (!text)
|
|
1478
|
+
undefined;
|
|
1479
|
+
if (this.options.textAsPlainText) {
|
|
1480
|
+
return text;
|
|
1481
|
+
}
|
|
1482
|
+
// Use the text parser to parse the text
|
|
1483
|
+
const textAst = this.textParser.toAst(text, {
|
|
1484
|
+
textFormat: format,
|
|
1485
|
+
});
|
|
1486
|
+
return textAst;
|
|
1487
|
+
}
|
|
1488
|
+
/**
|
|
1489
|
+
* Walk the body AST to find the placeholder and replace it with the body bit.
|
|
1490
|
+
*
|
|
1491
|
+
* @param bodyAst the body AST
|
|
1492
|
+
* @param bodyBitJson the body bit json to insert at the placeholder position
|
|
1493
|
+
* @param index the index of the placeholder to replace
|
|
1494
|
+
*/
|
|
1495
|
+
replacePlaceholderWithBodyBit(bodyAst, bodyBitJson, index) {
|
|
1496
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1497
|
+
const walkRecursive = (node, parent, parentKey) => {
|
|
1498
|
+
if (Array.isArray(node)) {
|
|
1499
|
+
// Walk the array of nodes
|
|
1500
|
+
for (let i = 0; i < node.length; i++) {
|
|
1501
|
+
const child = node[i];
|
|
1502
|
+
const done = walkRecursive(child, node, i);
|
|
1503
|
+
if (done)
|
|
1504
|
+
return true;
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
else {
|
|
1508
|
+
if (node.type === 'bit' && node.index === index) {
|
|
1509
|
+
// Found the placeholder, replace it with the body bit
|
|
1510
|
+
parent[parentKey] = bodyBitJson;
|
|
1511
|
+
return true;
|
|
1512
|
+
}
|
|
1513
|
+
if (node.content) {
|
|
1514
|
+
// Walk the child content
|
|
1515
|
+
const done = walkRecursive(node.content, node, 'content');
|
|
1516
|
+
if (done)
|
|
1517
|
+
return true;
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
return false;
|
|
1521
|
+
};
|
|
1522
|
+
walkRecursive(bodyAst, null, null);
|
|
1523
|
+
}
|
|
1524
|
+
//
|
|
1525
|
+
// WRITE FUNCTIONS
|
|
1526
|
+
//
|
|
1527
|
+
writeInlineDebug(key, state) {
|
|
1528
|
+
let tag = key;
|
|
1529
|
+
if (state.open) {
|
|
1530
|
+
tag = `<${key}>`;
|
|
1531
|
+
}
|
|
1532
|
+
else if (state.close) {
|
|
1533
|
+
tag = `</${key}>`;
|
|
1534
|
+
}
|
|
1535
|
+
else if (state.single) {
|
|
1536
|
+
tag = `<${key} />`;
|
|
1537
|
+
}
|
|
1538
|
+
this.writeString(tag);
|
|
1539
|
+
}
|
|
1540
|
+
writeString(s) {
|
|
1541
|
+
if (s != null)
|
|
1542
|
+
this.write(`${s}`);
|
|
1543
|
+
}
|
|
1544
|
+
/**
|
|
1545
|
+
* Create a new bit json object.
|
|
1546
|
+
* - This function defines the order of the properties in the json.
|
|
1547
|
+
*
|
|
1548
|
+
* @param bit
|
|
1549
|
+
* @returns
|
|
1550
|
+
*/
|
|
1551
|
+
createBitJson(bit) {
|
|
1552
|
+
const bitJson = {
|
|
1553
|
+
type: bit.bitType,
|
|
1554
|
+
format: bit.textFormat,
|
|
1555
|
+
// Properties
|
|
1556
|
+
id: undefined,
|
|
1557
|
+
externalId: undefined,
|
|
1558
|
+
spaceId: undefined,
|
|
1559
|
+
padletId: undefined,
|
|
1560
|
+
AIGenerated: undefined,
|
|
1561
|
+
releaseVersion: undefined,
|
|
1562
|
+
book: undefined,
|
|
1563
|
+
ageRange: undefined,
|
|
1564
|
+
language: undefined,
|
|
1565
|
+
computerLanguage: undefined,
|
|
1566
|
+
subtype: undefined,
|
|
1567
|
+
coverImage: undefined,
|
|
1568
|
+
publisher: undefined,
|
|
1569
|
+
publications: undefined,
|
|
1570
|
+
author: undefined,
|
|
1571
|
+
subject: undefined,
|
|
1572
|
+
date: undefined,
|
|
1573
|
+
location: undefined,
|
|
1574
|
+
theme: undefined,
|
|
1575
|
+
kind: undefined,
|
|
1576
|
+
action: undefined,
|
|
1577
|
+
thumbImage: undefined,
|
|
1578
|
+
focusX: undefined,
|
|
1579
|
+
focusY: undefined,
|
|
1580
|
+
deeplink: undefined,
|
|
1581
|
+
externalLink: undefined,
|
|
1582
|
+
externalLinkText: undefined,
|
|
1583
|
+
videoCallLink: undefined,
|
|
1584
|
+
duration: undefined,
|
|
1585
|
+
list: undefined,
|
|
1586
|
+
textReference: undefined,
|
|
1587
|
+
isTracked: undefined,
|
|
1588
|
+
isInfoOnly: undefined,
|
|
1589
|
+
labelTrue: undefined,
|
|
1590
|
+
labelFalse: undefined,
|
|
1591
|
+
quotedPerson: undefined,
|
|
1592
|
+
partialAnswer: undefined,
|
|
1593
|
+
// Book data
|
|
1594
|
+
title: undefined,
|
|
1595
|
+
subtitle: undefined,
|
|
1596
|
+
level: undefined,
|
|
1597
|
+
toc: undefined,
|
|
1598
|
+
progress: undefined,
|
|
1599
|
+
anchor: undefined,
|
|
1600
|
+
reference: undefined,
|
|
1601
|
+
referenceEnd: undefined,
|
|
1602
|
+
// Item, Lead, Hint, Instruction
|
|
1603
|
+
item: undefined,
|
|
1604
|
+
lead: undefined,
|
|
1605
|
+
hint: undefined,
|
|
1606
|
+
instruction: undefined,
|
|
1607
|
+
// Example
|
|
1608
|
+
example: undefined,
|
|
1609
|
+
isExample: undefined,
|
|
1610
|
+
// Partner .conversion-xxx only
|
|
1611
|
+
partner: undefined,
|
|
1612
|
+
// Extra Properties
|
|
1613
|
+
extraProperties: undefined,
|
|
1614
|
+
// Body
|
|
1615
|
+
body: undefined,
|
|
1616
|
+
// Resource
|
|
1617
|
+
resource: undefined,
|
|
1618
|
+
// Children
|
|
1619
|
+
statement: undefined,
|
|
1620
|
+
isCorrect: undefined,
|
|
1621
|
+
sampleSolution: undefined,
|
|
1622
|
+
elements: undefined,
|
|
1623
|
+
statements: undefined,
|
|
1624
|
+
responses: undefined,
|
|
1625
|
+
quizzes: undefined,
|
|
1626
|
+
heading: undefined,
|
|
1627
|
+
pairs: undefined,
|
|
1628
|
+
matrix: undefined,
|
|
1629
|
+
choices: undefined,
|
|
1630
|
+
questions: undefined,
|
|
1631
|
+
// Placeholders
|
|
1632
|
+
placeholders: undefined,
|
|
1633
|
+
// Footer
|
|
1634
|
+
footer: undefined,
|
|
1635
|
+
};
|
|
1636
|
+
// Add the resource template if there should be a resource (indicated by resourceType) but there is none defined.
|
|
1637
|
+
// if (bit.resourceType && !bitJson.resource) {
|
|
1638
|
+
// const jsonKey = ResourceType.keyFromValue(bit.resourceType);
|
|
1639
|
+
// bitJson.resource = {
|
|
1640
|
+
// type: bit.resourceType,
|
|
1641
|
+
// } as ResourceJson;
|
|
1642
|
+
// // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1643
|
+
// if (jsonKey) (bitJson.resource as any)[jsonKey] = {};
|
|
1644
|
+
// }
|
|
1645
|
+
return bitJson;
|
|
1646
|
+
}
|
|
1647
|
+
/**
|
|
1648
|
+
* Remove wanted properties from bit json object.
|
|
1649
|
+
* - This function defines the defaults for properties in the json.
|
|
1650
|
+
*
|
|
1651
|
+
* @param bit
|
|
1652
|
+
* @returns
|
|
1653
|
+
*/
|
|
1654
|
+
cleanAndSetDefaultsForBitJson(bitJson) {
|
|
1655
|
+
const plainText = this.options.textAsPlainText;
|
|
1656
|
+
// Clear 'item' which may be an empty string if 'lead' was set but item not
|
|
1657
|
+
// Only necessary because '.article' does not include a default value for 'item'
|
|
1658
|
+
// which is totally inconsistent, but maybe is wanted.
|
|
1659
|
+
if (!bitJson.item)
|
|
1660
|
+
bitJson.item = undefined;
|
|
1661
|
+
// Add default properties to the bit.
|
|
1662
|
+
// NOTE: Not all bits have the same default properties.
|
|
1663
|
+
// The properties used in the antlr parser are a bit random sometimes?
|
|
1664
|
+
switch (bitJson.type) {
|
|
1665
|
+
case BitType._error:
|
|
1666
|
+
break;
|
|
1667
|
+
case BitType.article:
|
|
1668
|
+
case BitType.highlightText:
|
|
1669
|
+
case BitType.message:
|
|
1670
|
+
case BitType.sampleSolution:
|
|
1671
|
+
case BitType.page:
|
|
1672
|
+
case BitType.statement:
|
|
1673
|
+
if (bitJson.body == null)
|
|
1674
|
+
bitJson.body = this.bodyDefault;
|
|
1675
|
+
break;
|
|
1676
|
+
default: // Most bits have these defaults, but there are special cases (not sure if that is by error or design)
|
|
1677
|
+
if (bitJson.item == null)
|
|
1678
|
+
bitJson.item = this.textDefault;
|
|
1679
|
+
if (bitJson.hint == null)
|
|
1680
|
+
bitJson.hint = this.textDefault;
|
|
1681
|
+
if (bitJson.isExample == null)
|
|
1682
|
+
bitJson.isExample = false;
|
|
1683
|
+
if (bitJson.example == null)
|
|
1684
|
+
bitJson.example = this.textDefault;
|
|
1685
|
+
if (bitJson.body == null)
|
|
1686
|
+
bitJson.body = this.bodyDefault;
|
|
1687
|
+
break;
|
|
1688
|
+
case BitType.multipleChoice1:
|
|
1689
|
+
case BitType.multipleResponse1:
|
|
1690
|
+
case BitType.sequence:
|
|
1691
|
+
if (bitJson.item == null)
|
|
1692
|
+
bitJson.item = this.textDefault;
|
|
1693
|
+
if (bitJson.hint == null)
|
|
1694
|
+
bitJson.hint = this.textDefault;
|
|
1695
|
+
if (bitJson.instruction == null)
|
|
1696
|
+
bitJson.instruction = this.textDefault;
|
|
1697
|
+
if (bitJson.isExample == null)
|
|
1698
|
+
bitJson.isExample = false;
|
|
1699
|
+
if (bitJson.example == null)
|
|
1700
|
+
bitJson.example = this.textDefault;
|
|
1701
|
+
if (bitJson.body == null)
|
|
1702
|
+
bitJson.body = this.bodyDefault;
|
|
1703
|
+
break;
|
|
1704
|
+
case BitType.essay:
|
|
1705
|
+
if (bitJson.item == null)
|
|
1706
|
+
bitJson.item = this.textDefault;
|
|
1707
|
+
if (bitJson.hint == null)
|
|
1708
|
+
bitJson.hint = this.textDefault;
|
|
1709
|
+
if (bitJson.instruction == null)
|
|
1710
|
+
bitJson.instruction = this.textDefault;
|
|
1711
|
+
if (bitJson.isExample == null)
|
|
1712
|
+
bitJson.isExample = false;
|
|
1713
|
+
if (bitJson.example == null)
|
|
1714
|
+
bitJson.example = this.textDefault;
|
|
1715
|
+
if (bitJson.body == null)
|
|
1716
|
+
bitJson.body = this.bodyDefault;
|
|
1717
|
+
if (bitJson.partialAnswer == null)
|
|
1718
|
+
bitJson.partialAnswer = '';
|
|
1719
|
+
// if (bitJson.sampleSolution == null) bitJson.sampleSolution = '';
|
|
1720
|
+
break;
|
|
1721
|
+
case BitType.trueFalse1:
|
|
1722
|
+
if (bitJson.item == null)
|
|
1723
|
+
bitJson.item = this.textDefault;
|
|
1724
|
+
if (bitJson.lead == null)
|
|
1725
|
+
bitJson.lead = this.textDefault;
|
|
1726
|
+
if (bitJson.hint == null)
|
|
1727
|
+
bitJson.hint = this.textDefault;
|
|
1728
|
+
if (bitJson.instruction == null)
|
|
1729
|
+
bitJson.instruction = this.textDefault;
|
|
1730
|
+
if (bitJson.isExample == null)
|
|
1731
|
+
bitJson.isExample = false;
|
|
1732
|
+
if (bitJson.isCorrect == null)
|
|
1733
|
+
bitJson.isCorrect = false;
|
|
1734
|
+
if (bitJson.body == null)
|
|
1735
|
+
bitJson.body = this.bodyDefault;
|
|
1736
|
+
break;
|
|
1737
|
+
case BitType.trueFalse:
|
|
1738
|
+
if (bitJson.item == null)
|
|
1739
|
+
bitJson.item = this.textDefault;
|
|
1740
|
+
if (bitJson.lead == null)
|
|
1741
|
+
bitJson.lead = this.textDefault;
|
|
1742
|
+
if (bitJson.hint == null)
|
|
1743
|
+
bitJson.hint = this.textDefault;
|
|
1744
|
+
if (bitJson.instruction == null)
|
|
1745
|
+
bitJson.instruction = this.textDefault;
|
|
1746
|
+
if (bitJson.labelFalse == null)
|
|
1747
|
+
bitJson.labelFalse = '';
|
|
1748
|
+
if (bitJson.labelTrue == null)
|
|
1749
|
+
bitJson.labelTrue = '';
|
|
1750
|
+
if (bitJson.body == null)
|
|
1751
|
+
bitJson.body = this.bodyDefault;
|
|
1752
|
+
break;
|
|
1753
|
+
case BitType.chapter:
|
|
1754
|
+
if (bitJson.item == null)
|
|
1755
|
+
bitJson.item = this.textDefault;
|
|
1756
|
+
if (bitJson.hint == null)
|
|
1757
|
+
bitJson.hint = this.textDefault;
|
|
1758
|
+
if (bitJson.isExample == null)
|
|
1759
|
+
bitJson.isExample = false;
|
|
1760
|
+
if (bitJson.example == null)
|
|
1761
|
+
bitJson.example = this.textDefault;
|
|
1762
|
+
if (bitJson.toc == null)
|
|
1763
|
+
bitJson.toc = true; // Always set on chapter bits?
|
|
1764
|
+
if (bitJson.progress == null)
|
|
1765
|
+
bitJson.progress = true; // Always set on chapter bits
|
|
1766
|
+
if (bitJson.level == null)
|
|
1767
|
+
bitJson.level = 1; // Set level 1 if none set (makes no sense, but in ANTLR parser)
|
|
1768
|
+
if (bitJson.body == null)
|
|
1769
|
+
bitJson.body = this.bodyDefault;
|
|
1770
|
+
break;
|
|
1771
|
+
case BitType.multipleChoice:
|
|
1772
|
+
case BitType.multipleResponse:
|
|
1773
|
+
if (bitJson.item == null)
|
|
1774
|
+
bitJson.item = this.textDefault;
|
|
1775
|
+
if (bitJson.hint == null)
|
|
1776
|
+
bitJson.hint = this.textDefault;
|
|
1777
|
+
if (bitJson.instruction == null)
|
|
1778
|
+
bitJson.instruction = this.textDefault;
|
|
1779
|
+
if (bitJson.body == null)
|
|
1780
|
+
bitJson.body = this.bodyDefault;
|
|
1781
|
+
if (bitJson.footer == null)
|
|
1782
|
+
bitJson.footer = this.textDefault;
|
|
1783
|
+
break;
|
|
1784
|
+
case BitType.interview:
|
|
1785
|
+
case BitType.interviewInstructionGrouped:
|
|
1786
|
+
if (bitJson.item == null)
|
|
1787
|
+
bitJson.item = this.textDefault;
|
|
1788
|
+
if (bitJson.hint == null)
|
|
1789
|
+
bitJson.hint = this.textDefault;
|
|
1790
|
+
if (bitJson.instruction == null)
|
|
1791
|
+
bitJson.instruction = this.textDefault;
|
|
1792
|
+
if (bitJson.body == null)
|
|
1793
|
+
bitJson.body = this.bodyDefault;
|
|
1794
|
+
if (bitJson.footer == null)
|
|
1795
|
+
bitJson.footer = this.textDefault;
|
|
1796
|
+
if (bitJson.questions == null)
|
|
1797
|
+
bitJson.questions = [];
|
|
1798
|
+
break;
|
|
1799
|
+
case BitType.match:
|
|
1800
|
+
case BitType.matchReverse:
|
|
1801
|
+
case BitType.matchSolutionGrouped:
|
|
1802
|
+
case BitType.matchAll:
|
|
1803
|
+
case BitType.matchAllReverse:
|
|
1804
|
+
if (bitJson.item == null)
|
|
1805
|
+
bitJson.item = this.textDefault;
|
|
1806
|
+
if (bitJson.heading == null)
|
|
1807
|
+
bitJson.heading = {};
|
|
1808
|
+
if (bitJson.body == null)
|
|
1809
|
+
bitJson.body = this.bodyDefault;
|
|
1810
|
+
break;
|
|
1811
|
+
case BitType.matchMatrix:
|
|
1812
|
+
if (bitJson.item == null)
|
|
1813
|
+
bitJson.item = this.textDefault;
|
|
1814
|
+
if (bitJson.body == null)
|
|
1815
|
+
bitJson.body = this.bodyDefault;
|
|
1816
|
+
break;
|
|
1817
|
+
case BitType.learningPathBook:
|
|
1818
|
+
case BitType.learningPathBotTraining:
|
|
1819
|
+
case BitType.learningPathClassroomEvent:
|
|
1820
|
+
case BitType.learningPathClassroomTraining:
|
|
1821
|
+
case BitType.learningPathClosing:
|
|
1822
|
+
case BitType.learningPathExternalLink:
|
|
1823
|
+
case BitType.learningPathFeedback:
|
|
1824
|
+
case BitType.learningPathLearningGoal:
|
|
1825
|
+
case BitType.learningPathLti:
|
|
1826
|
+
case BitType.learningPathSign:
|
|
1827
|
+
case BitType.learningPathStep:
|
|
1828
|
+
case BitType.learningPathVideoCall:
|
|
1829
|
+
if (bitJson.item == null)
|
|
1830
|
+
bitJson.item = this.textDefault;
|
|
1831
|
+
if (bitJson.hint == null)
|
|
1832
|
+
bitJson.hint = this.textDefault;
|
|
1833
|
+
if (bitJson.isExample == null)
|
|
1834
|
+
bitJson.isExample = false;
|
|
1835
|
+
if (bitJson.example == null)
|
|
1836
|
+
bitJson.example = this.textDefault;
|
|
1837
|
+
if (bitJson.isTracked == null)
|
|
1838
|
+
bitJson.isTracked = true;
|
|
1839
|
+
if (bitJson.isInfoOnly == null)
|
|
1840
|
+
bitJson.isInfoOnly = false;
|
|
1841
|
+
if (bitJson.body == null)
|
|
1842
|
+
bitJson.body = this.bodyDefault;
|
|
1843
|
+
break;
|
|
1844
|
+
case BitType.articleAi:
|
|
1845
|
+
case BitType.noteAi:
|
|
1846
|
+
case BitType.summaryAi:
|
|
1847
|
+
if (bitJson.AIGenerated == null)
|
|
1848
|
+
bitJson.AIGenerated = true;
|
|
1849
|
+
if (bitJson.item == null)
|
|
1850
|
+
bitJson.item = this.textDefault;
|
|
1851
|
+
if (bitJson.hint == null)
|
|
1852
|
+
bitJson.hint = this.textDefault;
|
|
1853
|
+
if (bitJson.isExample == null)
|
|
1854
|
+
bitJson.isExample = false;
|
|
1855
|
+
if (bitJson.example == null)
|
|
1856
|
+
bitJson.example = this.textDefault;
|
|
1857
|
+
if (bitJson.body == null)
|
|
1858
|
+
bitJson.body = this.bodyDefault;
|
|
1859
|
+
break;
|
|
1860
|
+
}
|
|
1861
|
+
// Remove unwanted properties
|
|
1862
|
+
// Properties
|
|
1863
|
+
if (bitJson.id == null)
|
|
1864
|
+
delete bitJson.id;
|
|
1865
|
+
if (bitJson.externalId == null)
|
|
1866
|
+
delete bitJson.externalId;
|
|
1867
|
+
if (bitJson.spaceId == null)
|
|
1868
|
+
delete bitJson.spaceId;
|
|
1869
|
+
if (bitJson.padletId == null)
|
|
1870
|
+
delete bitJson.padletId;
|
|
1871
|
+
if (bitJson.AIGenerated == null)
|
|
1872
|
+
delete bitJson.AIGenerated;
|
|
1873
|
+
if (bitJson.releaseVersion == null)
|
|
1874
|
+
delete bitJson.releaseVersion;
|
|
1875
|
+
if (bitJson.book == null)
|
|
1876
|
+
delete bitJson.book;
|
|
1877
|
+
if (bitJson.ageRange == null)
|
|
1878
|
+
delete bitJson.ageRange;
|
|
1879
|
+
if (bitJson.language == null)
|
|
1880
|
+
delete bitJson.language;
|
|
1881
|
+
if (bitJson.computerLanguage == null)
|
|
1882
|
+
delete bitJson.computerLanguage;
|
|
1883
|
+
if (bitJson.subtype == null)
|
|
1884
|
+
delete bitJson.subtype;
|
|
1885
|
+
if (bitJson.coverImage == null)
|
|
1886
|
+
delete bitJson.coverImage;
|
|
1887
|
+
if (bitJson.publisher == null)
|
|
1888
|
+
delete bitJson.publisher;
|
|
1889
|
+
if (bitJson.publications == null)
|
|
1890
|
+
delete bitJson.publications;
|
|
1891
|
+
if (bitJson.author == null)
|
|
1892
|
+
delete bitJson.author;
|
|
1893
|
+
if (bitJson.subject == null)
|
|
1894
|
+
delete bitJson.subject;
|
|
1895
|
+
if (bitJson.date == null)
|
|
1896
|
+
delete bitJson.date;
|
|
1897
|
+
if (bitJson.location == null)
|
|
1898
|
+
delete bitJson.location;
|
|
1899
|
+
if (bitJson.theme == null)
|
|
1900
|
+
delete bitJson.theme;
|
|
1901
|
+
if (bitJson.kind == null)
|
|
1902
|
+
delete bitJson.kind;
|
|
1903
|
+
if (bitJson.action == null)
|
|
1904
|
+
delete bitJson.action;
|
|
1905
|
+
if (bitJson.thumbImage == null)
|
|
1906
|
+
delete bitJson.thumbImage;
|
|
1907
|
+
if (bitJson.deeplink == null)
|
|
1908
|
+
delete bitJson.deeplink;
|
|
1909
|
+
if (bitJson.externalLink == null)
|
|
1910
|
+
delete bitJson.externalLink;
|
|
1911
|
+
if (bitJson.externalLinkText == null)
|
|
1912
|
+
delete bitJson.externalLinkText;
|
|
1913
|
+
if (bitJson.videoCallLink == null)
|
|
1914
|
+
delete bitJson.videoCallLink;
|
|
1915
|
+
if (bitJson.duration == null)
|
|
1916
|
+
delete bitJson.duration;
|
|
1917
|
+
if (bitJson.list == null)
|
|
1918
|
+
delete bitJson.list;
|
|
1919
|
+
if (bitJson.textReference == null)
|
|
1920
|
+
delete bitJson.textReference;
|
|
1921
|
+
if (bitJson.isTracked == null)
|
|
1922
|
+
delete bitJson.isTracked;
|
|
1923
|
+
if (bitJson.isInfoOnly == null)
|
|
1924
|
+
delete bitJson.isInfoOnly;
|
|
1925
|
+
if (bitJson.labelTrue == null)
|
|
1926
|
+
delete bitJson.labelTrue;
|
|
1927
|
+
if (bitJson.labelFalse == null)
|
|
1928
|
+
delete bitJson.labelFalse;
|
|
1929
|
+
if (bitJson.quotedPerson == null)
|
|
1930
|
+
delete bitJson.quotedPerson;
|
|
1931
|
+
// Book data
|
|
1932
|
+
if (bitJson.title == null)
|
|
1933
|
+
delete bitJson.title;
|
|
1934
|
+
if (bitJson.subtitle == null)
|
|
1935
|
+
delete bitJson.subtitle;
|
|
1936
|
+
if (bitJson.level == null)
|
|
1937
|
+
delete bitJson.level;
|
|
1938
|
+
if (bitJson.toc == null)
|
|
1939
|
+
delete bitJson.toc;
|
|
1940
|
+
if (bitJson.progress == null)
|
|
1941
|
+
delete bitJson.progress;
|
|
1942
|
+
if (bitJson.anchor == null)
|
|
1943
|
+
delete bitJson.anchor;
|
|
1944
|
+
if (bitJson.reference == null)
|
|
1945
|
+
delete bitJson.reference;
|
|
1946
|
+
if (bitJson.referenceEnd == null)
|
|
1947
|
+
delete bitJson.referenceEnd;
|
|
1948
|
+
// Item, Lead, Hint, Instruction
|
|
1949
|
+
if (bitJson.item == null)
|
|
1950
|
+
delete bitJson.item;
|
|
1951
|
+
if (bitJson.lead == null)
|
|
1952
|
+
delete bitJson.lead;
|
|
1953
|
+
if (bitJson.hint == null)
|
|
1954
|
+
delete bitJson.hint;
|
|
1955
|
+
if (bitJson.instruction == null)
|
|
1956
|
+
delete bitJson.instruction;
|
|
1957
|
+
// Example
|
|
1958
|
+
if (bitJson.example == null)
|
|
1959
|
+
delete bitJson.example;
|
|
1960
|
+
if (bitJson.isExample == null)
|
|
1961
|
+
delete bitJson.isExample;
|
|
1962
|
+
// Extra Properties
|
|
1963
|
+
if (bitJson.extraProperties == null)
|
|
1964
|
+
delete bitJson.extraProperties;
|
|
1965
|
+
// Body
|
|
1966
|
+
if (bitJson.body == null)
|
|
1967
|
+
delete bitJson.body;
|
|
1968
|
+
// Placeholders
|
|
1969
|
+
if (bitJson.placeholders == null || Object.keys(bitJson.placeholders).length === 0)
|
|
1970
|
+
delete bitJson.placeholders;
|
|
1971
|
+
// Resource
|
|
1972
|
+
if (bitJson.resource == null)
|
|
1973
|
+
delete bitJson.resource;
|
|
1974
|
+
// Children
|
|
1975
|
+
if (bitJson.statement == null)
|
|
1976
|
+
delete bitJson.statement;
|
|
1977
|
+
if (bitJson.isCorrect == null)
|
|
1978
|
+
delete bitJson.isCorrect;
|
|
1979
|
+
if (bitJson.sampleSolution == null)
|
|
1980
|
+
delete bitJson.sampleSolution;
|
|
1981
|
+
if (bitJson.partialAnswer == null)
|
|
1982
|
+
delete bitJson.partialAnswer;
|
|
1983
|
+
if (bitJson.elements == null)
|
|
1984
|
+
delete bitJson.elements;
|
|
1985
|
+
if (bitJson.statements == null)
|
|
1986
|
+
delete bitJson.statements;
|
|
1987
|
+
if (bitJson.responses == null)
|
|
1988
|
+
delete bitJson.responses;
|
|
1989
|
+
if (bitJson.quizzes == null)
|
|
1990
|
+
delete bitJson.quizzes;
|
|
1991
|
+
if (bitJson.heading == null)
|
|
1992
|
+
delete bitJson.heading;
|
|
1993
|
+
if (bitJson.pairs == null)
|
|
1994
|
+
delete bitJson.pairs;
|
|
1995
|
+
if (bitJson.matrix == null)
|
|
1996
|
+
delete bitJson.matrix;
|
|
1997
|
+
if (bitJson.choices == null)
|
|
1998
|
+
delete bitJson.choices;
|
|
1999
|
+
if (bitJson.questions == null)
|
|
2000
|
+
delete bitJson.questions;
|
|
2001
|
+
// Placeholders
|
|
2002
|
+
if (!plainText || bitJson.placeholders == null)
|
|
2003
|
+
delete bitJson.placeholders;
|
|
2004
|
+
// Footer
|
|
2005
|
+
if (bitJson.footer == null)
|
|
2006
|
+
delete bitJson.footer;
|
|
2007
|
+
return bitJson;
|
|
2008
|
+
}
|
|
2009
|
+
//
|
|
2010
|
+
// Writer interface
|
|
2011
|
+
//
|
|
2012
|
+
/**
|
|
2013
|
+
* Writes a string value to the output.
|
|
2014
|
+
* @param value - The string value to be written.
|
|
2015
|
+
*/
|
|
2016
|
+
write(value) {
|
|
2017
|
+
this.writer.write(value);
|
|
2018
|
+
return this;
|
|
2019
|
+
}
|
|
2020
|
+
/**
|
|
2021
|
+
* Writes a new line to the output. The line is indented automatically. The line is ended with the endOfLineString.
|
|
2022
|
+
* @param value - The line to write. When omitted, only the endOfLineString is written.
|
|
2023
|
+
*/
|
|
2024
|
+
writeLine(value) {
|
|
2025
|
+
this.writer.writeLine(value);
|
|
2026
|
+
return this;
|
|
2027
|
+
}
|
|
2028
|
+
/**
|
|
2029
|
+
* Writes a collection of lines to the output. Each line is indented automatically and ended with the endOfLineString.
|
|
2030
|
+
* @param values - The lines to write.
|
|
2031
|
+
* @param delimiter - An optional delimiter to be written at the end of each line, except for the last one.
|
|
2032
|
+
*/
|
|
2033
|
+
writeLines(values, delimiter) {
|
|
2034
|
+
this.writer.writeLines(values, delimiter);
|
|
2035
|
+
return this;
|
|
2036
|
+
}
|
|
2037
|
+
/**
|
|
2038
|
+
* Writes a single whitespace character to the output.
|
|
2039
|
+
*/
|
|
2040
|
+
writeWhiteSpace() {
|
|
2041
|
+
this.writer.writeWhiteSpace();
|
|
2042
|
+
return this;
|
|
2043
|
+
}
|
|
2044
|
+
}
|
|
2045
|
+
export { JsonGenerator };
|
|
2046
|
+
//# sourceMappingURL=JsonGenerator.js.map
|