react-native-enriched-markdown-scaffold 0.7.4-scaffold.9 → 1.0.2-scaffold.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -8
- package/ReactNativeEnrichedMarkdown.podspec +82 -73
- package/android/build.gradle +186 -1
- package/android/consumer-rules.pro +1 -1
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownManagerDelegate.java +9 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownManagerInterface.java +3 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownTextInputManagerDelegate.java +24 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownTextInputManagerInterface.java +8 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownTextManagerDelegate.java +9 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownTextManagerInterface.java +3 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/EventEmitters.cpp +75 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/EventEmitters.h +63 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/Props.cpp +35 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/Props.h +886 -23
- package/android/src/main/baseline-prof.txt +1 -1
- package/android/src/main/cpp/jni-adapter.cpp +74 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdown.kt +189 -13
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownInternalText.kt +17 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownManager.kt +50 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownText.kt +48 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownTextLayoutManager.kt +10 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownTextManager.kt +42 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/MeasurementStore.kt +82 -4
- package/android/src/main/java/com/swmansion/enriched/markdown/events/CopyPressEvent.kt +24 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/EnrichedMarkdownTextInputManager.kt +54 -4
- package/android/src/main/java/com/swmansion/enriched/markdown/input/EnrichedMarkdownTextInputView.kt +901 -462
- package/android/src/main/java/com/swmansion/enriched/markdown/input/MarkdownClipboard.kt +42 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/editing/BlockEditCoordinator.kt +196 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/editing/ClipboardCoordinator.kt +73 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/editing/EditContext.kt +19 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/editing/EditPipeline.kt +248 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/editing/EditSession.kt +52 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/editing/InputConnectionWrapper.kt +101 -7
- package/android/src/main/java/com/swmansion/enriched/markdown/input/editing/LinkCoordinator.kt +69 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/editing/MarkdownTextWatcher.kt +3 -3
- package/android/src/main/java/com/swmansion/enriched/markdown/input/editing/MentionCoordinator.kt +118 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/events/OnChangeStateEvent.kt +26 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/events/OnContextMenuItemPressEvent.kt +26 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/events/OnInputKeyPressEvent.kt +24 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/events/OnPasteEvent.kt +24 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/formatting/BlockStore.kt +254 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/formatting/FormattingStore.kt +80 -87
- package/android/src/main/java/com/swmansion/enriched/markdown/input/formatting/InputFormatter.kt +109 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/input/formatting/InputParser.kt +116 -22
- package/android/src/main/java/com/swmansion/enriched/markdown/input/formatting/MarkdownSerializer.kt +167 -38
- package/android/src/main/java/com/swmansion/enriched/markdown/input/formatting/RangeEditAdjustment.kt +149 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/layout/InputEventEmitter.kt +66 -5
- package/android/src/main/java/com/swmansion/enriched/markdown/input/layout/InputMeasurementStore.kt +4 -2
- package/android/src/main/java/com/swmansion/enriched/markdown/input/model/BlockRange.kt +27 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/model/BlockType.kt +48 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/model/FormattingRange.kt +9 -4
- package/android/src/main/java/com/swmansion/enriched/markdown/input/model/InputFormatterStyle.kt +39 -2
- package/android/src/main/java/com/swmansion/enriched/markdown/input/model/MathAtom.kt +20 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/model/MathChipStyle.kt +1 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/input/model/MutableRangeBounds.kt +11 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/spans/InputBulletSpan.kt +82 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/spans/InputHeadingSpan.kt +58 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/spans/InputListItemSpacingSpan.kt +37 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/spans/InputOrderedListMarkerSpan.kt +63 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/styles/BlockHandler.kt +54 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/styles/HeadingBlockHandler.kt +27 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/styles/OrderedListBlockHandler.kt +38 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/styles/UnorderedListBlockHandler.kt +37 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/toolbar/InputContextMenu.kt +8 -26
- package/android/src/main/java/com/swmansion/enriched/markdown/parser/MarkdownASTNode.kt +1 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/parser/Parser.kt +1 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/BlockStyleContext.kt +9 -2
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/BlockquoteRenderer.kt +100 -12
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/CodeBlockRenderer.kt +16 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/HeadingRenderer.kt +4 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/ListContextManager.kt +2 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/ListItemRenderer.kt +74 -18
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/ListRenderer.kt +43 -4
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/NodeRenderer.kt +9 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/SoftBreakRenderer.kt +16 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/SpanStyleCache.kt +30 -27
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/BaseListSpan.kt +24 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/BlockquoteSpan.kt +174 -24
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/CodeBackgroundSpan.kt +27 -3
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/CodeBlockSpan.kt +13 -16
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/CodeSpan.kt +1 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/EmphasisSpan.kt +1 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/ImageSpan.kt +182 -46
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/ListItemSpacingSpan.kt +33 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/ListMarkerAnchorSpan.kt +38 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/OrderedListSpan.kt +2 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/StrongSpan.kt +1 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/TaskListSpan.kt +3 -2
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/UnorderedListSpan.kt +3 -2
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/BlockquoteStyle.kt +6 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/CodeBlockStyle.kt +26 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/ImageStyle.kt +7 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/ListStyle.kt +4 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/StyleConfig.kt +13 -4
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/TableStyle.kt +6 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/common/CodeBlockHighlighter.kt +90 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/common/CodeBlockNode.kt +57 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/common/FeatureFlags.kt +1 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/common/MarkdownSegment.kt +9 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/common/MarkdownViewManagerUtils.kt +37 -7
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/common/ReadableMapExtensions.kt +3 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/common/RenderedSegment.kt +10 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/common/SegmentSignature.kt +1 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/common/StreamingMarkdownFilter.kt +83 -5
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/common/serialization/MarkdownASTSerializer.kt +4 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/input/MarkdownStyleParser.kt +74 -44
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/input/PasteTextUtils.kt +20 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/ImageCache.kt +26 -3
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/ImageDownloader.kt +22 -9
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/LocalImageLoader.kt +161 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/extensions/TextPaintExtensions.kt +23 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/interaction/CheckboxTouchHelper.kt +7 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/interaction/TaskListTapUtils.kt +41 -21
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/span/BlockSpacing.kt +15 -8
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/view/LinkLongPressMovementMethod.kt +58 -27
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/view/SelectionActionMode.kt +49 -15
- package/android/src/main/java/com/swmansion/enriched/markdown/views/BlockMenuOptions.kt +45 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/views/CodeBlockContainerView.kt +396 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/views/ContextMenuPopup.kt +9 -6
- package/android/src/main/java/com/swmansion/enriched/markdown/views/CopyGlyph.kt +101 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/views/TableContainerView.kt +36 -9
- package/android/src/main/jni/CMakeLists.txt +53 -0
- package/android/src/main/jni/react/renderer/components/EnrichedMarkdownTextSpec/MarkdownContainerShadowNode.cpp +10 -0
- package/android/src/main/jni/react/renderer/components/EnrichedMarkdownTextSpec/MarkdownContainerShadowNode.h +11 -2
- package/android/src/main/jni/react/renderer/components/EnrichedMarkdownTextSpec/MarkdownTextShadowNode.cpp +10 -0
- package/android/src/main/jni/react/renderer/components/EnrichedMarkdownTextSpec/MarkdownTextShadowNode.h +12 -2
- package/android/src/main/jni/react/renderer/components/EnrichedMarkdownTextSpec/MarkdownTextState.cpp +9 -0
- package/android/src/main/jni/react/renderer/components/EnrichedMarkdownTextSpec/MarkdownTextState.h +24 -0
- package/android/src/main/jni/react/renderer/components/EnrichedMarkdownTextSpec/conversions.h +16 -0
- package/android/src/math/java/com/swmansion/enriched/markdown/input/math/MathChipControllerImpl.kt +21 -4
- package/android/src/math/java/com/swmansion/enriched/markdown/renderer/MathInlineRenderer.kt +7 -2
- package/android/src/math/java/com/swmansion/enriched/markdown/spans/MathChipSpan.kt +1 -1
- package/android/src/math/java/com/swmansion/enriched/markdown/views/MathContainerView.kt +6 -4
- package/cpp/highlight/CodeBlockHighlighter.cpp +284 -0
- package/cpp/highlight/CodeBlockHighlighter.hpp +66 -0
- package/cpp/highlight/CodeBlockLanguages.cpp +138 -0
- package/cpp/highlight/CodeBlockLanguages.hpp +25 -0
- package/cpp/highlight/HighlightGrammars.hpp +28 -0
- package/cpp/highlight/code_highlight_podspec.rb +211 -0
- package/cpp/highlight/gen-registry.mjs +155 -0
- package/cpp/highlight/grammar-versions.json +159 -0
- package/cpp/highlight/vendor/generated/generated_queries.h +1665 -0
- package/cpp/highlight/vendor/generated/generated_registry.cpp +59 -0
- package/cpp/parser/MD4CParser.cpp +173 -61
- package/cpp/parser/MD4CParser.hpp +1 -0
- package/cpp/parser/MarkdownASTNode.hpp +2 -1
- package/cpp/wasm/ASTSerializer.cpp +2 -0
- package/cpp/wasm/build.sh +1 -0
- package/cpp/wasm/md4c_wasm.cpp +3 -1
- package/docs/ACCESSIBILITY.md +14 -2
- package/docs/API_REFERENCE.md +234 -12
- package/docs/BREAKING_CHANGES.md +129 -0
- package/docs/CODE_HIGHLIGHT.md +133 -0
- package/docs/COPY_OPTIONS.md +47 -3
- package/docs/ELEMENTS_STRUCTURE.md +52 -4
- package/docs/IMAGE_CACHING.md +30 -0
- package/docs/INPUT.md +108 -11
- package/docs/LATEX_MATH.md +87 -45
- package/docs/MACOS.md +1 -1
- package/docs/MARKDOWN_STREAMING.md +27 -1
- package/docs/NATIVE_ASSETS.md +127 -0
- package/docs/RTL.md +1 -1
- package/docs/STYLES.md +46 -6
- package/docs/TESTING.md +112 -0
- package/docs/TEXT.md +16 -6
- package/docs/WEB.md +3 -1
- package/ios/EnrichedMarkdown.h +7 -0
- package/ios/EnrichedMarkdown.mm +284 -75
- package/ios/EnrichedMarkdownText.h +7 -0
- package/ios/EnrichedMarkdownText.mm +101 -73
- package/ios/attachments/ENRMImageAttachment.h +9 -0
- package/ios/attachments/ENRMImageAttachment.m +143 -40
- package/ios/attachments/ENRMMathInlineAttachment.h +2 -0
- package/ios/attachments/ENRMMathInlineAttachment.m +48 -81
- package/ios/attachments/ENRMMathInlineAttachmentShared.h +2 -0
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/EventEmitters.cpp +75 -0
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/EventEmitters.h +63 -0
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/Props.cpp +35 -0
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/Props.h +886 -23
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/RCTComponentViewHelpers.h +131 -0
- package/ios/input/ENRMAutoLinkDetector.h +2 -1
- package/ios/input/ENRMAutoLinkDetector.mm +79 -41
- package/ios/input/ENRMBlockEditCoordinator.h +71 -0
- package/ios/input/ENRMBlockEditCoordinator.mm +195 -0
- package/ios/input/ENRMBlockRange.h +28 -0
- package/ios/input/ENRMBlockRange.mm +30 -0
- package/ios/input/ENRMBlockStore.h +56 -0
- package/ios/input/ENRMBlockStore.mm +275 -0
- package/ios/input/ENRMClipboardCoordinator.h +45 -0
- package/ios/input/ENRMClipboardCoordinator.mm +120 -0
- package/ios/input/ENRMDetectorPipeline.h +2 -1
- package/ios/input/ENRMEditPipeline.h +76 -0
- package/ios/input/ENRMEditPipeline.mm +228 -0
- package/ios/input/ENRMEditSession.h +36 -0
- package/ios/input/ENRMEditSession.mm +63 -0
- package/ios/input/ENRMFormattingStore.h +17 -0
- package/ios/input/ENRMFormattingStore.mm +95 -105
- package/ios/input/ENRMInputBlockType.h +91 -0
- package/ios/input/ENRMInputBlockType.mm +5 -0
- package/ios/input/ENRMInputDecorationDrawer.h +18 -0
- package/ios/input/ENRMInputEventEmitter.h +56 -0
- package/ios/input/ENRMInputEventEmitter.mm +308 -0
- package/ios/input/ENRMInputFormatter.h +29 -69
- package/ios/input/ENRMInputFormatter.mm +216 -124
- package/ios/input/ENRMInputFormatterStyle.h +99 -0
- package/ios/input/ENRMInputFormatterStyle.mm +188 -0
- package/ios/input/ENRMInputLayoutManager.h +9 -0
- package/ios/input/ENRMInputLayoutManager.mm +30 -0
- package/ios/input/ENRMInputListMarkerDrawer.h +32 -0
- package/ios/input/ENRMInputListMarkerDrawer.mm +426 -0
- package/ios/input/ENRMInputParser.h +5 -6
- package/ios/input/ENRMInputParser.mm +461 -178
- package/ios/input/ENRMInputRemend.mm +2 -2
- package/ios/input/ENRMInputStyleStateBuilder.h +40 -0
- package/ios/input/ENRMInputStyleStateBuilder.mm +60 -0
- package/ios/input/ENRMInputTextView.mm +103 -8
- package/ios/input/ENRMInputTypingAttributesController.h +42 -0
- package/ios/input/ENRMInputTypingAttributesController.mm +203 -0
- package/ios/input/ENRMLinkCoordinator.h +41 -0
- package/ios/input/ENRMLinkCoordinator.mm +89 -0
- package/ios/input/ENRMMarkdownSerializer.h +29 -5
- package/ios/input/ENRMMarkdownSerializer.mm +170 -48
- package/ios/input/ENRMMathAtom.h +26 -0
- package/ios/input/ENRMMathAtom.mm +12 -0
- package/ios/input/ENRMMentionCoordinator.h +45 -0
- package/ios/input/ENRMMentionCoordinator.mm +167 -0
- package/ios/input/ENRMRangeEditAdjustment.h +38 -0
- package/ios/input/ENRMRangeEditAdjustment.mm +91 -0
- package/ios/input/ENRMRangeStoreUtils.h +39 -0
- package/ios/input/EnrichedMarkdownTextInput+ContextMenu.mm +6 -6
- package/ios/input/EnrichedMarkdownTextInput+Internal.h +11 -3
- package/ios/input/EnrichedMarkdownTextInput.h +7 -1
- package/ios/input/EnrichedMarkdownTextInput.mm +1089 -1023
- package/ios/input/InputStylePropsUtils.h +109 -68
- package/ios/input/internals/EnrichedMarkdownTextInputShadowNode.mm +2 -1
- package/ios/input/styles/ENRMBlockHandler.h +46 -0
- package/ios/input/styles/ENRMHeadingBlockHandler.h +15 -0
- package/ios/input/styles/ENRMHeadingBlockHandler.mm +38 -0
- package/ios/input/styles/ENRMOrderedListBlockHandler.h +14 -0
- package/ios/input/styles/ENRMOrderedListBlockHandler.mm +48 -0
- package/ios/input/styles/ENRMUnorderedListBlockHandler.h +15 -0
- package/ios/input/styles/ENRMUnorderedListBlockHandler.mm +51 -0
- package/ios/internals/ENRMViewFreeMeasurement.h +331 -0
- package/ios/internals/EnrichedMarkdownShadowNode.h +1 -3
- package/ios/internals/EnrichedMarkdownShadowNode.mm +16 -20
- package/ios/internals/EnrichedMarkdownTextShadowNode.h +1 -3
- package/ios/internals/EnrichedMarkdownTextShadowNode.mm +15 -20
- package/ios/internals/MeasurementCache.h +33 -7
- package/ios/internals/ShadowMeasurementUtils.h +63 -58
- package/ios/math/ENRMMathChipController.h +74 -0
- package/ios/math/ENRMMathChipController.mm +476 -0
- package/ios/math/ENRMRaTeXBridge.swift +4 -1
- package/ios/parser/ENRMMarkdownParser.h +1 -8
- package/ios/parser/ENRMMarkdownParser.mm +2 -11
- package/ios/parser/MarkdownASTNode.h +2 -1
- package/ios/parser/MarkdownParserBridge.mm +4 -0
- package/ios/renderer/AttributedRenderer.m +20 -2
- package/ios/renderer/BaseRenderer.h +17 -2
- package/ios/renderer/BaseRenderer.m +30 -0
- package/ios/renderer/BlockquoteRenderer.h +1 -1
- package/ios/renderer/BlockquoteRenderer.m +144 -35
- package/ios/renderer/CodeBlockRenderer.h +1 -1
- package/ios/renderer/CodeBlockRenderer.m +27 -23
- package/ios/renderer/CodeRenderer.h +1 -1
- package/ios/renderer/CodeRenderer.m +3 -1
- package/ios/renderer/ENRMImageRenderer.h +1 -1
- package/ios/renderer/ENRMImageRenderer.m +5 -1
- package/ios/renderer/ENRMMathInlineRenderer.h +1 -1
- package/ios/renderer/ENRMMathInlineRenderer.m +5 -1
- package/ios/renderer/ENRMSpoilerRenderer.h +1 -1
- package/ios/renderer/ENRMSpoilerRenderer.m +3 -1
- package/ios/renderer/EmphasisRenderer.h +1 -1
- package/ios/renderer/EmphasisRenderer.m +3 -1
- package/ios/renderer/HeadingRenderer.h +1 -1
- package/ios/renderer/HeadingRenderer.m +13 -6
- package/ios/renderer/HighlightRenderer.h +1 -1
- package/ios/renderer/HighlightRenderer.m +3 -1
- package/ios/renderer/LinkRenderer.h +1 -1
- package/ios/renderer/LinkRenderer.m +3 -1
- package/ios/renderer/ListItemRenderer.h +13 -1
- package/ios/renderer/ListItemRenderer.m +102 -44
- package/ios/renderer/ListRenderer.h +2 -2
- package/ios/renderer/ListRenderer.m +63 -25
- package/ios/renderer/ParagraphRenderer.h +1 -1
- package/ios/renderer/ParagraphRenderer.m +16 -8
- package/ios/renderer/RenderContext.h +10 -0
- package/ios/renderer/RenderContext.m +44 -0
- package/ios/renderer/RendererFactory.m +14 -0
- package/ios/renderer/StrikethroughRenderer.h +1 -1
- package/ios/renderer/StrikethroughRenderer.m +3 -1
- package/ios/renderer/StrongRenderer.h +1 -1
- package/ios/renderer/StrongRenderer.m +3 -1
- package/ios/renderer/SubscriptRenderer.h +1 -1
- package/ios/renderer/SubscriptRenderer.m +3 -1
- package/ios/renderer/SuperscriptRenderer.h +1 -1
- package/ios/renderer/SuperscriptRenderer.m +3 -1
- package/ios/renderer/TextRenderer.h +2 -2
- package/ios/renderer/TextRenderer.m +3 -1
- package/ios/renderer/ThematicBreakRenderer.h +1 -1
- package/ios/renderer/ThematicBreakRenderer.m +3 -1
- package/ios/renderer/UnderlineRenderer.h +1 -1
- package/ios/renderer/UnderlineRenderer.m +3 -1
- package/ios/styles/StyleConfig.h +22 -0
- package/ios/styles/StyleConfig.mm +132 -0
- package/ios/utils/BlockquoteBorder.h +6 -0
- package/ios/utils/BlockquoteBorder.m +249 -52
- package/ios/utils/CodeBlockBackground.m +16 -2
- package/ios/utils/ENRMAtomicSize.h +65 -0
- package/ios/utils/ENRMBlockMenu.h +57 -0
- package/ios/utils/ENRMCodeBlockContent.h +37 -0
- package/ios/utils/ENRMCodeBlockContent.mm +79 -0
- package/ios/utils/ENRMCodeBlockHighlighter.h +37 -0
- package/ios/utils/ENRMCodeBlockHighlighter.mm +51 -0
- package/ios/utils/ENRMFeatureFlags.h +7 -0
- package/ios/utils/ENRMImageDownloader.h +11 -1
- package/ios/utils/ENRMImageDownloader.m +60 -16
- package/ios/utils/ENRMLocalImageLoader.h +31 -0
- package/ios/utils/ENRMLocalImageLoader.m +68 -0
- package/ios/utils/ENRMMathFallback.h +26 -0
- package/ios/utils/ENRMMathFallback.m +18 -0
- package/ios/utils/ENRMTextViewSetup.h +35 -17
- package/ios/utils/EditMenuUtils.h +22 -5
- package/ios/utils/EditMenuUtils.m +53 -9
- package/ios/utils/ImageRequestHeaderUtils.h +35 -0
- package/ios/utils/LastElementUtils.h +1 -0
- package/ios/utils/ListMarkerDrawer.m +29 -42
- package/ios/utils/MarkdownASTSerializer.m +4 -0
- package/ios/utils/ParagraphStyleUtils.h +5 -0
- package/ios/utils/ParagraphStyleUtils.m +77 -17
- package/ios/utils/RenderedMarkdownSegment.h +13 -1
- package/ios/utils/RenderedMarkdownSegment.m +20 -0
- package/ios/utils/SegmentRenderer.m +17 -4
- package/ios/utils/StreamingMarkdownFilter.h +11 -1
- package/ios/utils/StreamingMarkdownFilter.m +98 -2
- package/ios/utils/StylePropsUtils.h +63 -0
- package/ios/utils/TaskListTapUtils.m +24 -0
- package/ios/views/ENRMCodeBlockContainerView.h +53 -0
- package/ios/views/ENRMCodeBlockContainerView.m +559 -0
- package/ios/views/ENRMMathContainerView.h +16 -0
- package/ios/views/ENRMMathContainerView.m +74 -19
- package/ios/views/TableContainerView.h +22 -0
- package/ios/views/TableContainerView.m +261 -175
- package/jest.d.ts +1 -0
- package/jest.js +5 -0
- package/lib/module/EnrichedMarkdownNativeComponent.ts +73 -0
- package/lib/module/EnrichedMarkdownTextInput.js +84 -5
- package/lib/module/EnrichedMarkdownTextInput.js.map +1 -1
- package/lib/module/EnrichedMarkdownTextInputNativeComponent.ts +78 -5
- package/lib/module/EnrichedMarkdownTextNativeComponent.ts +74 -0
- package/lib/module/headingDefaults.js +34 -0
- package/lib/module/headingDefaults.js.map +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/jest/index.js +191 -0
- package/lib/module/jest/index.js.map +1 -0
- package/lib/module/native/EnrichedMarkdownText.js +37 -5
- package/lib/module/native/EnrichedMarkdownText.js.map +1 -1
- package/lib/module/normalizeMarkdownStyle.js +81 -19
- package/lib/module/normalizeMarkdownStyle.js.map +1 -1
- package/lib/module/normalizeMarkdownStyle.web.js +56 -18
- package/lib/module/normalizeMarkdownStyle.web.js.map +1 -1
- package/lib/module/normalizeMarkdownTextInputStyle.js +62 -15
- package/lib/module/normalizeMarkdownTextInputStyle.js.map +1 -1
- package/lib/module/normalizeMenuItem.js +1 -1
- package/lib/module/utils/textInputState.js +26 -0
- package/lib/module/utils/textInputState.js.map +1 -0
- package/lib/module/web/EnrichedMarkdownText.js +9 -5
- package/lib/module/web/EnrichedMarkdownText.js.map +1 -1
- package/lib/module/web/parseMarkdown.js +4 -3
- package/lib/module/web/parseMarkdown.js.map +1 -1
- package/lib/module/web/renderers/InlineRenderers.js +6 -0
- package/lib/module/web/renderers/InlineRenderers.js.map +1 -1
- package/lib/module/web/renderers/ListRenderers.js +7 -2
- package/lib/module/web/renderers/ListRenderers.js.map +1 -1
- package/lib/module/web/renderers/index.js +7 -4
- package/lib/module/web/renderers/index.js.map +1 -1
- package/lib/module/web/styles.js +83 -6
- package/lib/module/web/styles.js.map +1 -1
- package/lib/module/web/utils.js +1 -0
- package/lib/module/web/utils.js.map +1 -1
- package/lib/module/web/wasm/md4c.js +0 -0
- package/lib/module/web/wasm/md4c.js.map +1 -1
- package/lib/typescript/src/EnrichedMarkdownNativeComponent.d.ts +66 -0
- package/lib/typescript/src/EnrichedMarkdownNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/EnrichedMarkdownTextInput.d.ts +94 -9
- package/lib/typescript/src/EnrichedMarkdownTextInput.d.ts.map +1 -1
- package/lib/typescript/src/EnrichedMarkdownTextInputNativeComponent.d.ts +69 -5
- package/lib/typescript/src/EnrichedMarkdownTextInputNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/EnrichedMarkdownTextNativeComponent.d.ts +66 -0
- package/lib/typescript/src/EnrichedMarkdownTextNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/headingDefaults.d.ts +9 -0
- package/lib/typescript/src/headingDefaults.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +2 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/index.web.d.ts +1 -1
- package/lib/typescript/src/index.web.d.ts.map +1 -1
- package/lib/typescript/src/jest/index.d.ts +6 -0
- package/lib/typescript/src/jest/index.d.ts.map +1 -0
- package/lib/typescript/src/native/EnrichedMarkdownText.d.ts +3 -3
- package/lib/typescript/src/native/EnrichedMarkdownText.d.ts.map +1 -1
- package/lib/typescript/src/normalizeMarkdownStyle.d.ts.map +1 -1
- package/lib/typescript/src/normalizeMarkdownStyle.web.d.ts.map +1 -1
- package/lib/typescript/src/normalizeMarkdownTextInputStyle.d.ts +19 -5
- package/lib/typescript/src/normalizeMarkdownTextInputStyle.d.ts.map +1 -1
- package/lib/typescript/src/types/MarkdownStyle.d.ts +72 -0
- package/lib/typescript/src/types/MarkdownStyle.d.ts.map +1 -1
- package/lib/typescript/src/types/MarkdownStyleInternal.d.ts +27 -0
- package/lib/typescript/src/types/MarkdownStyleInternal.d.ts.map +1 -1
- package/lib/typescript/src/types/MarkdownTextProps.d.ts +104 -9
- package/lib/typescript/src/types/MarkdownTextProps.d.ts.map +1 -1
- package/lib/typescript/src/types/MarkdownTextProps.web.d.ts +19 -0
- package/lib/typescript/src/types/MarkdownTextProps.web.d.ts.map +1 -1
- package/lib/typescript/src/types/events.d.ts +19 -0
- package/lib/typescript/src/types/events.d.ts.map +1 -1
- package/lib/typescript/src/utils/textInputState.d.ts +24 -0
- package/lib/typescript/src/utils/textInputState.d.ts.map +1 -0
- package/lib/typescript/src/web/EnrichedMarkdownText.d.ts +1 -1
- package/lib/typescript/src/web/EnrichedMarkdownText.d.ts.map +1 -1
- package/lib/typescript/src/web/parseMarkdown.d.ts +1 -1
- package/lib/typescript/src/web/parseMarkdown.d.ts.map +1 -1
- package/lib/typescript/src/web/renderers/InlineRenderers.d.ts.map +1 -1
- package/lib/typescript/src/web/renderers/ListRenderers.d.ts.map +1 -1
- package/lib/typescript/src/web/renderers/index.d.ts +2 -1
- package/lib/typescript/src/web/renderers/index.d.ts.map +1 -1
- package/lib/typescript/src/web/styles.d.ts +2 -1
- package/lib/typescript/src/web/styles.d.ts.map +1 -1
- package/lib/typescript/src/web/types.d.ts +6 -2
- package/lib/typescript/src/web/types.d.ts.map +1 -1
- package/lib/typescript/src/web/utils.d.ts.map +1 -1
- package/package.json +36 -9
- package/postinstall.mjs +131 -0
- package/ratex-version.json +21 -0
- package/src/EnrichedMarkdownNativeComponent.ts +73 -0
- package/src/EnrichedMarkdownTextInput.tsx +159 -8
- package/src/EnrichedMarkdownTextInputNativeComponent.ts +78 -5
- package/src/EnrichedMarkdownTextNativeComponent.ts +74 -0
- package/src/headingDefaults.ts +21 -0
- package/src/index.tsx +9 -0
- package/src/index.web.tsx +1 -0
- package/src/jest/index.tsx +215 -0
- package/src/native/EnrichedMarkdownText.tsx +53 -2
- package/src/normalizeMarkdownStyle.ts +102 -16
- package/src/normalizeMarkdownStyle.web.ts +63 -15
- package/src/normalizeMarkdownTextInputStyle.ts +110 -35
- package/src/normalizeMenuItem.ts +1 -1
- package/src/types/MarkdownStyle.ts +74 -0
- package/src/types/MarkdownStyleInternal.ts +39 -0
- package/src/types/MarkdownTextProps.ts +101 -9
- package/src/types/MarkdownTextProps.web.ts +19 -0
- package/src/types/events.ts +21 -0
- package/src/utils/textInputState.ts +35 -0
- package/src/web/EnrichedMarkdownText.tsx +16 -2
- package/src/web/parseMarkdown.ts +6 -2
- package/src/web/renderers/InlineRenderers.tsx +5 -0
- package/src/web/renderers/ListRenderers.tsx +14 -2
- package/src/web/renderers/index.tsx +6 -2
- package/src/web/styles.ts +89 -5
- package/src/web/types.ts +6 -1
- package/src/web/utils.ts +1 -0
- package/src/web/wasm/md4c.js +0 -0
- package/vendor-grammars.mjs +511 -0
- package/vendor-ratex.mjs +173 -0
- package/app.plugin.js +0 -2
- package/plugin/build/withAndroidMath.js +0 -19
- package/plugin/build/withIosMath.js +0 -28
- package/plugin/build/withReactNativeEnrichedMarkdown.js +0 -11
- package/plugin/src/withAndroidMath.ts +0 -24
- package/plugin/src/withIosMath.ts +0 -35
- package/plugin/src/withReactNativeEnrichedMarkdown.ts +0 -17
- package/plugin/tsconfig.build.json +0 -16
|
@@ -562,6 +562,8 @@ struct EnrichedMarkdownMarkdownStyleBlockquoteStruct {
|
|
|
562
562
|
Float borderWidth{0.0};
|
|
563
563
|
Float gapWidth{0.0};
|
|
564
564
|
SharedColor backgroundColor{};
|
|
565
|
+
Float borderRadius{0.0};
|
|
566
|
+
Float padding{0.0};
|
|
565
567
|
|
|
566
568
|
|
|
567
569
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -580,6 +582,8 @@ struct EnrichedMarkdownMarkdownStyleBlockquoteStruct {
|
|
|
580
582
|
result["borderWidth"] = borderWidth;
|
|
581
583
|
result["gapWidth"] = gapWidth;
|
|
582
584
|
result["backgroundColor"] = ::facebook::react::toDynamic(backgroundColor);
|
|
585
|
+
result["borderRadius"] = borderRadius;
|
|
586
|
+
result["padding"] = padding;
|
|
583
587
|
return result;
|
|
584
588
|
}
|
|
585
589
|
#endif
|
|
@@ -632,6 +636,14 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
632
636
|
if (tmp_backgroundColor != map.end()) {
|
|
633
637
|
fromRawValue(context, tmp_backgroundColor->second, result.backgroundColor);
|
|
634
638
|
}
|
|
639
|
+
auto tmp_borderRadius = map.find("borderRadius");
|
|
640
|
+
if (tmp_borderRadius != map.end()) {
|
|
641
|
+
fromRawValue(context, tmp_borderRadius->second, result.borderRadius);
|
|
642
|
+
}
|
|
643
|
+
auto tmp_padding = map.find("padding");
|
|
644
|
+
if (tmp_padding != map.end()) {
|
|
645
|
+
fromRawValue(context, tmp_padding->second, result.padding);
|
|
646
|
+
}
|
|
635
647
|
}
|
|
636
648
|
|
|
637
649
|
static inline std::string toString(const EnrichedMarkdownMarkdownStyleBlockquoteStruct &value) {
|
|
@@ -659,6 +671,7 @@ struct EnrichedMarkdownMarkdownStyleListStruct {
|
|
|
659
671
|
std::string markerFontWeight{};
|
|
660
672
|
Float gapWidth{0.0};
|
|
661
673
|
Float marginLeft{0.0};
|
|
674
|
+
Float itemSpacing{0.0};
|
|
662
675
|
|
|
663
676
|
|
|
664
677
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -680,6 +693,7 @@ struct EnrichedMarkdownMarkdownStyleListStruct {
|
|
|
680
693
|
result["markerFontWeight"] = markerFontWeight;
|
|
681
694
|
result["gapWidth"] = gapWidth;
|
|
682
695
|
result["marginLeft"] = marginLeft;
|
|
696
|
+
result["itemSpacing"] = itemSpacing;
|
|
683
697
|
return result;
|
|
684
698
|
}
|
|
685
699
|
#endif
|
|
@@ -744,6 +758,10 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
744
758
|
if (tmp_marginLeft != map.end()) {
|
|
745
759
|
fromRawValue(context, tmp_marginLeft->second, result.marginLeft);
|
|
746
760
|
}
|
|
761
|
+
auto tmp_itemSpacing = map.find("itemSpacing");
|
|
762
|
+
if (tmp_itemSpacing != map.end()) {
|
|
763
|
+
fromRawValue(context, tmp_itemSpacing->second, result.itemSpacing);
|
|
764
|
+
}
|
|
747
765
|
}
|
|
748
766
|
|
|
749
767
|
static inline std::string toString(const EnrichedMarkdownMarkdownStyleListStruct &value) {
|
|
@@ -756,6 +774,118 @@ static inline folly::dynamic toDynamic(const EnrichedMarkdownMarkdownStyleListSt
|
|
|
756
774
|
}
|
|
757
775
|
#endif
|
|
758
776
|
|
|
777
|
+
struct EnrichedMarkdownMarkdownStyleCodeBlockSyntaxColorsStruct {
|
|
778
|
+
SharedColor keyword{};
|
|
779
|
+
SharedColor operatorColor{};
|
|
780
|
+
SharedColor punctuation{};
|
|
781
|
+
SharedColor string{};
|
|
782
|
+
SharedColor number{};
|
|
783
|
+
SharedColor constant{};
|
|
784
|
+
SharedColor comment{};
|
|
785
|
+
SharedColor function{};
|
|
786
|
+
SharedColor type{};
|
|
787
|
+
SharedColor variable{};
|
|
788
|
+
SharedColor property{};
|
|
789
|
+
SharedColor tag{};
|
|
790
|
+
SharedColor attribute{};
|
|
791
|
+
SharedColor embedded{};
|
|
792
|
+
|
|
793
|
+
|
|
794
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
795
|
+
bool operator==(const EnrichedMarkdownMarkdownStyleCodeBlockSyntaxColorsStruct&) const = default;
|
|
796
|
+
|
|
797
|
+
folly::dynamic toDynamic() const {
|
|
798
|
+
folly::dynamic result = folly::dynamic::object();
|
|
799
|
+
result["keyword"] = ::facebook::react::toDynamic(keyword);
|
|
800
|
+
result["operatorColor"] = ::facebook::react::toDynamic(operatorColor);
|
|
801
|
+
result["punctuation"] = ::facebook::react::toDynamic(punctuation);
|
|
802
|
+
result["string"] = ::facebook::react::toDynamic(string);
|
|
803
|
+
result["number"] = ::facebook::react::toDynamic(number);
|
|
804
|
+
result["constant"] = ::facebook::react::toDynamic(constant);
|
|
805
|
+
result["comment"] = ::facebook::react::toDynamic(comment);
|
|
806
|
+
result["function"] = ::facebook::react::toDynamic(function);
|
|
807
|
+
result["type"] = ::facebook::react::toDynamic(type);
|
|
808
|
+
result["variable"] = ::facebook::react::toDynamic(variable);
|
|
809
|
+
result["property"] = ::facebook::react::toDynamic(property);
|
|
810
|
+
result["tag"] = ::facebook::react::toDynamic(tag);
|
|
811
|
+
result["attribute"] = ::facebook::react::toDynamic(attribute);
|
|
812
|
+
result["embedded"] = ::facebook::react::toDynamic(embedded);
|
|
813
|
+
return result;
|
|
814
|
+
}
|
|
815
|
+
#endif
|
|
816
|
+
};
|
|
817
|
+
|
|
818
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownMarkdownStyleCodeBlockSyntaxColorsStruct &result) {
|
|
819
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
820
|
+
|
|
821
|
+
auto tmp_keyword = map.find("keyword");
|
|
822
|
+
if (tmp_keyword != map.end()) {
|
|
823
|
+
fromRawValue(context, tmp_keyword->second, result.keyword);
|
|
824
|
+
}
|
|
825
|
+
auto tmp_operatorColor = map.find("operatorColor");
|
|
826
|
+
if (tmp_operatorColor != map.end()) {
|
|
827
|
+
fromRawValue(context, tmp_operatorColor->second, result.operatorColor);
|
|
828
|
+
}
|
|
829
|
+
auto tmp_punctuation = map.find("punctuation");
|
|
830
|
+
if (tmp_punctuation != map.end()) {
|
|
831
|
+
fromRawValue(context, tmp_punctuation->second, result.punctuation);
|
|
832
|
+
}
|
|
833
|
+
auto tmp_string = map.find("string");
|
|
834
|
+
if (tmp_string != map.end()) {
|
|
835
|
+
fromRawValue(context, tmp_string->second, result.string);
|
|
836
|
+
}
|
|
837
|
+
auto tmp_number = map.find("number");
|
|
838
|
+
if (tmp_number != map.end()) {
|
|
839
|
+
fromRawValue(context, tmp_number->second, result.number);
|
|
840
|
+
}
|
|
841
|
+
auto tmp_constant = map.find("constant");
|
|
842
|
+
if (tmp_constant != map.end()) {
|
|
843
|
+
fromRawValue(context, tmp_constant->second, result.constant);
|
|
844
|
+
}
|
|
845
|
+
auto tmp_comment = map.find("comment");
|
|
846
|
+
if (tmp_comment != map.end()) {
|
|
847
|
+
fromRawValue(context, tmp_comment->second, result.comment);
|
|
848
|
+
}
|
|
849
|
+
auto tmp_function = map.find("function");
|
|
850
|
+
if (tmp_function != map.end()) {
|
|
851
|
+
fromRawValue(context, tmp_function->second, result.function);
|
|
852
|
+
}
|
|
853
|
+
auto tmp_type = map.find("type");
|
|
854
|
+
if (tmp_type != map.end()) {
|
|
855
|
+
fromRawValue(context, tmp_type->second, result.type);
|
|
856
|
+
}
|
|
857
|
+
auto tmp_variable = map.find("variable");
|
|
858
|
+
if (tmp_variable != map.end()) {
|
|
859
|
+
fromRawValue(context, tmp_variable->second, result.variable);
|
|
860
|
+
}
|
|
861
|
+
auto tmp_property = map.find("property");
|
|
862
|
+
if (tmp_property != map.end()) {
|
|
863
|
+
fromRawValue(context, tmp_property->second, result.property);
|
|
864
|
+
}
|
|
865
|
+
auto tmp_tag = map.find("tag");
|
|
866
|
+
if (tmp_tag != map.end()) {
|
|
867
|
+
fromRawValue(context, tmp_tag->second, result.tag);
|
|
868
|
+
}
|
|
869
|
+
auto tmp_attribute = map.find("attribute");
|
|
870
|
+
if (tmp_attribute != map.end()) {
|
|
871
|
+
fromRawValue(context, tmp_attribute->second, result.attribute);
|
|
872
|
+
}
|
|
873
|
+
auto tmp_embedded = map.find("embedded");
|
|
874
|
+
if (tmp_embedded != map.end()) {
|
|
875
|
+
fromRawValue(context, tmp_embedded->second, result.embedded);
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
static inline std::string toString(const EnrichedMarkdownMarkdownStyleCodeBlockSyntaxColorsStruct &value) {
|
|
880
|
+
return "[Object EnrichedMarkdownMarkdownStyleCodeBlockSyntaxColorsStruct]";
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
884
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownMarkdownStyleCodeBlockSyntaxColorsStruct &value) {
|
|
885
|
+
return value.toDynamic();
|
|
886
|
+
}
|
|
887
|
+
#endif
|
|
888
|
+
|
|
759
889
|
struct EnrichedMarkdownMarkdownStyleCodeBlockStruct {
|
|
760
890
|
Float fontSize{0.0};
|
|
761
891
|
std::string fontFamily{};
|
|
@@ -769,6 +899,7 @@ struct EnrichedMarkdownMarkdownStyleCodeBlockStruct {
|
|
|
769
899
|
Float borderRadius{0.0};
|
|
770
900
|
Float borderWidth{0.0};
|
|
771
901
|
Float padding{0.0};
|
|
902
|
+
EnrichedMarkdownMarkdownStyleCodeBlockSyntaxColorsStruct syntaxColors{};
|
|
772
903
|
|
|
773
904
|
|
|
774
905
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -788,6 +919,7 @@ struct EnrichedMarkdownMarkdownStyleCodeBlockStruct {
|
|
|
788
919
|
result["borderRadius"] = borderRadius;
|
|
789
920
|
result["borderWidth"] = borderWidth;
|
|
790
921
|
result["padding"] = padding;
|
|
922
|
+
result["syntaxColors"] = ::facebook::react::toDynamic(syntaxColors);
|
|
791
923
|
return result;
|
|
792
924
|
}
|
|
793
925
|
#endif
|
|
@@ -844,6 +976,10 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
844
976
|
if (tmp_padding != map.end()) {
|
|
845
977
|
fromRawValue(context, tmp_padding->second, result.padding);
|
|
846
978
|
}
|
|
979
|
+
auto tmp_syntaxColors = map.find("syntaxColors");
|
|
980
|
+
if (tmp_syntaxColors != map.end()) {
|
|
981
|
+
fromRawValue(context, tmp_syntaxColors->second, result.syntaxColors);
|
|
982
|
+
}
|
|
847
983
|
}
|
|
848
984
|
|
|
849
985
|
static inline std::string toString(const EnrichedMarkdownMarkdownStyleCodeBlockStruct &value) {
|
|
@@ -1190,6 +1326,9 @@ static inline folly::dynamic toDynamic(const EnrichedMarkdownMarkdownStyleCodeSt
|
|
|
1190
1326
|
|
|
1191
1327
|
struct EnrichedMarkdownMarkdownStyleImageStruct {
|
|
1192
1328
|
Float height{0.0};
|
|
1329
|
+
Float maxHeight{0.0};
|
|
1330
|
+
Float aspectRatio{0.0};
|
|
1331
|
+
std::string resizeMode{};
|
|
1193
1332
|
Float borderRadius{0.0};
|
|
1194
1333
|
Float marginTop{0.0};
|
|
1195
1334
|
Float marginBottom{0.0};
|
|
@@ -1201,6 +1340,9 @@ struct EnrichedMarkdownMarkdownStyleImageStruct {
|
|
|
1201
1340
|
folly::dynamic toDynamic() const {
|
|
1202
1341
|
folly::dynamic result = folly::dynamic::object();
|
|
1203
1342
|
result["height"] = height;
|
|
1343
|
+
result["maxHeight"] = maxHeight;
|
|
1344
|
+
result["aspectRatio"] = aspectRatio;
|
|
1345
|
+
result["resizeMode"] = resizeMode;
|
|
1204
1346
|
result["borderRadius"] = borderRadius;
|
|
1205
1347
|
result["marginTop"] = marginTop;
|
|
1206
1348
|
result["marginBottom"] = marginBottom;
|
|
@@ -1216,6 +1358,18 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
1216
1358
|
if (tmp_height != map.end()) {
|
|
1217
1359
|
fromRawValue(context, tmp_height->second, result.height);
|
|
1218
1360
|
}
|
|
1361
|
+
auto tmp_maxHeight = map.find("maxHeight");
|
|
1362
|
+
if (tmp_maxHeight != map.end()) {
|
|
1363
|
+
fromRawValue(context, tmp_maxHeight->second, result.maxHeight);
|
|
1364
|
+
}
|
|
1365
|
+
auto tmp_aspectRatio = map.find("aspectRatio");
|
|
1366
|
+
if (tmp_aspectRatio != map.end()) {
|
|
1367
|
+
fromRawValue(context, tmp_aspectRatio->second, result.aspectRatio);
|
|
1368
|
+
}
|
|
1369
|
+
auto tmp_resizeMode = map.find("resizeMode");
|
|
1370
|
+
if (tmp_resizeMode != map.end()) {
|
|
1371
|
+
fromRawValue(context, tmp_resizeMode->second, result.resizeMode);
|
|
1372
|
+
}
|
|
1219
1373
|
auto tmp_borderRadius = map.find("borderRadius");
|
|
1220
1374
|
if (tmp_borderRadius != map.end()) {
|
|
1221
1375
|
fromRawValue(context, tmp_borderRadius->second, result.borderRadius);
|
|
@@ -1344,6 +1498,8 @@ struct EnrichedMarkdownMarkdownStyleTableStruct {
|
|
|
1344
1498
|
Float borderRadius{0.0};
|
|
1345
1499
|
Float cellPaddingHorizontal{0.0};
|
|
1346
1500
|
Float cellPaddingVertical{0.0};
|
|
1501
|
+
Float horizontalOverflow{0.0};
|
|
1502
|
+
std::string align{};
|
|
1347
1503
|
|
|
1348
1504
|
|
|
1349
1505
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -1368,6 +1524,8 @@ struct EnrichedMarkdownMarkdownStyleTableStruct {
|
|
|
1368
1524
|
result["borderRadius"] = borderRadius;
|
|
1369
1525
|
result["cellPaddingHorizontal"] = cellPaddingHorizontal;
|
|
1370
1526
|
result["cellPaddingVertical"] = cellPaddingVertical;
|
|
1527
|
+
result["horizontalOverflow"] = horizontalOverflow;
|
|
1528
|
+
result["align"] = align;
|
|
1371
1529
|
return result;
|
|
1372
1530
|
}
|
|
1373
1531
|
#endif
|
|
@@ -1444,6 +1602,14 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
1444
1602
|
if (tmp_cellPaddingVertical != map.end()) {
|
|
1445
1603
|
fromRawValue(context, tmp_cellPaddingVertical->second, result.cellPaddingVertical);
|
|
1446
1604
|
}
|
|
1605
|
+
auto tmp_horizontalOverflow = map.find("horizontalOverflow");
|
|
1606
|
+
if (tmp_horizontalOverflow != map.end()) {
|
|
1607
|
+
fromRawValue(context, tmp_horizontalOverflow->second, result.horizontalOverflow);
|
|
1608
|
+
}
|
|
1609
|
+
auto tmp_align = map.find("align");
|
|
1610
|
+
if (tmp_align != map.end()) {
|
|
1611
|
+
fromRawValue(context, tmp_align->second, result.align);
|
|
1612
|
+
}
|
|
1447
1613
|
}
|
|
1448
1614
|
|
|
1449
1615
|
static inline std::string toString(const EnrichedMarkdownMarkdownStyleTableStruct &value) {
|
|
@@ -2090,6 +2256,7 @@ struct EnrichedMarkdownMd4cFlagsStruct {
|
|
|
2090
2256
|
bool subscript{false};
|
|
2091
2257
|
bool latexMath{false};
|
|
2092
2258
|
bool highlight{false};
|
|
2259
|
+
bool hardSoftBreaks{false};
|
|
2093
2260
|
|
|
2094
2261
|
|
|
2095
2262
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -2102,6 +2269,7 @@ struct EnrichedMarkdownMd4cFlagsStruct {
|
|
|
2102
2269
|
result["subscript"] = subscript;
|
|
2103
2270
|
result["latexMath"] = latexMath;
|
|
2104
2271
|
result["highlight"] = highlight;
|
|
2272
|
+
result["hardSoftBreaks"] = hardSoftBreaks;
|
|
2105
2273
|
return result;
|
|
2106
2274
|
}
|
|
2107
2275
|
#endif
|
|
@@ -2130,6 +2298,10 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
2130
2298
|
if (tmp_highlight != map.end()) {
|
|
2131
2299
|
fromRawValue(context, tmp_highlight->second, result.highlight);
|
|
2132
2300
|
}
|
|
2301
|
+
auto tmp_hardSoftBreaks = map.find("hardSoftBreaks");
|
|
2302
|
+
if (tmp_hardSoftBreaks != map.end()) {
|
|
2303
|
+
fromRawValue(context, tmp_hardSoftBreaks->second, result.hardSoftBreaks);
|
|
2304
|
+
}
|
|
2133
2305
|
}
|
|
2134
2306
|
|
|
2135
2307
|
static inline std::string toString(const EnrichedMarkdownMd4cFlagsStruct &value) {
|
|
@@ -2144,6 +2316,7 @@ static inline folly::dynamic toDynamic(const EnrichedMarkdownMd4cFlagsStruct &va
|
|
|
2144
2316
|
|
|
2145
2317
|
struct EnrichedMarkdownStreamingConfigStruct {
|
|
2146
2318
|
std::string tableMode{};
|
|
2319
|
+
std::string codeBlockMode{};
|
|
2147
2320
|
|
|
2148
2321
|
|
|
2149
2322
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -2152,6 +2325,7 @@ struct EnrichedMarkdownStreamingConfigStruct {
|
|
|
2152
2325
|
folly::dynamic toDynamic() const {
|
|
2153
2326
|
folly::dynamic result = folly::dynamic::object();
|
|
2154
2327
|
result["tableMode"] = tableMode;
|
|
2328
|
+
result["codeBlockMode"] = codeBlockMode;
|
|
2155
2329
|
return result;
|
|
2156
2330
|
}
|
|
2157
2331
|
#endif
|
|
@@ -2164,6 +2338,10 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
2164
2338
|
if (tmp_tableMode != map.end()) {
|
|
2165
2339
|
fromRawValue(context, tmp_tableMode->second, result.tableMode);
|
|
2166
2340
|
}
|
|
2341
|
+
auto tmp_codeBlockMode = map.find("codeBlockMode");
|
|
2342
|
+
if (tmp_codeBlockMode != map.end()) {
|
|
2343
|
+
fromRawValue(context, tmp_codeBlockMode->second, result.codeBlockMode);
|
|
2344
|
+
}
|
|
2167
2345
|
}
|
|
2168
2346
|
|
|
2169
2347
|
static inline std::string toString(const EnrichedMarkdownStreamingConfigStruct &value) {
|
|
@@ -2226,6 +2404,56 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
2226
2404
|
}
|
|
2227
2405
|
|
|
2228
2406
|
|
|
2407
|
+
struct EnrichedMarkdownImageRequestHeadersStruct {
|
|
2408
|
+
std::string name{};
|
|
2409
|
+
std::string value{};
|
|
2410
|
+
|
|
2411
|
+
|
|
2412
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
2413
|
+
bool operator==(const EnrichedMarkdownImageRequestHeadersStruct&) const = default;
|
|
2414
|
+
|
|
2415
|
+
folly::dynamic toDynamic() const {
|
|
2416
|
+
folly::dynamic result = folly::dynamic::object();
|
|
2417
|
+
result["name"] = name;
|
|
2418
|
+
result["value"] = value;
|
|
2419
|
+
return result;
|
|
2420
|
+
}
|
|
2421
|
+
#endif
|
|
2422
|
+
};
|
|
2423
|
+
|
|
2424
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownImageRequestHeadersStruct &result) {
|
|
2425
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
2426
|
+
|
|
2427
|
+
auto tmp_name = map.find("name");
|
|
2428
|
+
if (tmp_name != map.end()) {
|
|
2429
|
+
fromRawValue(context, tmp_name->second, result.name);
|
|
2430
|
+
}
|
|
2431
|
+
auto tmp_value = map.find("value");
|
|
2432
|
+
if (tmp_value != map.end()) {
|
|
2433
|
+
fromRawValue(context, tmp_value->second, result.value);
|
|
2434
|
+
}
|
|
2435
|
+
}
|
|
2436
|
+
|
|
2437
|
+
static inline std::string toString(const EnrichedMarkdownImageRequestHeadersStruct &value) {
|
|
2438
|
+
return "[Object EnrichedMarkdownImageRequestHeadersStruct]";
|
|
2439
|
+
}
|
|
2440
|
+
|
|
2441
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
2442
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownImageRequestHeadersStruct &value) {
|
|
2443
|
+
return value.toDynamic();
|
|
2444
|
+
}
|
|
2445
|
+
#endif
|
|
2446
|
+
|
|
2447
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<EnrichedMarkdownImageRequestHeadersStruct> &result) {
|
|
2448
|
+
auto items = (std::vector<RawValue>)value;
|
|
2449
|
+
for (const auto &item : items) {
|
|
2450
|
+
EnrichedMarkdownImageRequestHeadersStruct newItem;
|
|
2451
|
+
fromRawValue(context, item, newItem);
|
|
2452
|
+
result.emplace_back(newItem);
|
|
2453
|
+
}
|
|
2454
|
+
}
|
|
2455
|
+
|
|
2456
|
+
|
|
2229
2457
|
struct EnrichedMarkdownSelectionMenuConfigStruct {
|
|
2230
2458
|
bool copyAsMarkdown{false};
|
|
2231
2459
|
bool copyImageUrl{false};
|
|
@@ -2234,6 +2462,10 @@ struct EnrichedMarkdownSelectionMenuConfigStruct {
|
|
|
2234
2462
|
std::string copyImageUrlLabel{};
|
|
2235
2463
|
std::string copyImageUrlsLabel{};
|
|
2236
2464
|
std::vector<std::string> copyImageUrlPluralTemplates{};
|
|
2465
|
+
bool copyEnabled{false};
|
|
2466
|
+
bool copyFormatMarkdown{false};
|
|
2467
|
+
bool systemItemsNone{false};
|
|
2468
|
+
bool codeBlockCopyButton{false};
|
|
2237
2469
|
|
|
2238
2470
|
|
|
2239
2471
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -2248,6 +2480,10 @@ struct EnrichedMarkdownSelectionMenuConfigStruct {
|
|
|
2248
2480
|
result["copyImageUrlLabel"] = copyImageUrlLabel;
|
|
2249
2481
|
result["copyImageUrlsLabel"] = copyImageUrlsLabel;
|
|
2250
2482
|
result["copyImageUrlPluralTemplates"] = ::facebook::react::toDynamic(copyImageUrlPluralTemplates);
|
|
2483
|
+
result["copyEnabled"] = copyEnabled;
|
|
2484
|
+
result["copyFormatMarkdown"] = copyFormatMarkdown;
|
|
2485
|
+
result["systemItemsNone"] = systemItemsNone;
|
|
2486
|
+
result["codeBlockCopyButton"] = codeBlockCopyButton;
|
|
2251
2487
|
return result;
|
|
2252
2488
|
}
|
|
2253
2489
|
#endif
|
|
@@ -2284,6 +2520,22 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
2284
2520
|
if (tmp_copyImageUrlPluralTemplates != map.end()) {
|
|
2285
2521
|
fromRawValue(context, tmp_copyImageUrlPluralTemplates->second, result.copyImageUrlPluralTemplates);
|
|
2286
2522
|
}
|
|
2523
|
+
auto tmp_copyEnabled = map.find("copyEnabled");
|
|
2524
|
+
if (tmp_copyEnabled != map.end()) {
|
|
2525
|
+
fromRawValue(context, tmp_copyEnabled->second, result.copyEnabled);
|
|
2526
|
+
}
|
|
2527
|
+
auto tmp_copyFormatMarkdown = map.find("copyFormatMarkdown");
|
|
2528
|
+
if (tmp_copyFormatMarkdown != map.end()) {
|
|
2529
|
+
fromRawValue(context, tmp_copyFormatMarkdown->second, result.copyFormatMarkdown);
|
|
2530
|
+
}
|
|
2531
|
+
auto tmp_systemItemsNone = map.find("systemItemsNone");
|
|
2532
|
+
if (tmp_systemItemsNone != map.end()) {
|
|
2533
|
+
fromRawValue(context, tmp_systemItemsNone->second, result.systemItemsNone);
|
|
2534
|
+
}
|
|
2535
|
+
auto tmp_codeBlockCopyButton = map.find("codeBlockCopyButton");
|
|
2536
|
+
if (tmp_codeBlockCopyButton != map.end()) {
|
|
2537
|
+
fromRawValue(context, tmp_codeBlockCopyButton->second, result.codeBlockCopyButton);
|
|
2538
|
+
}
|
|
2287
2539
|
}
|
|
2288
2540
|
|
|
2289
2541
|
static inline std::string toString(const EnrichedMarkdownSelectionMenuConfigStruct &value) {
|
|
@@ -2568,6 +2820,7 @@ class EnrichedMarkdownProps final : public ViewProps {
|
|
|
2568
2820
|
|
|
2569
2821
|
std::string markdown{};
|
|
2570
2822
|
EnrichedMarkdownMarkdownStyleStruct markdownStyle{};
|
|
2823
|
+
bool enableTaskListItemToggle{true};
|
|
2571
2824
|
bool enableLinkPreview{true};
|
|
2572
2825
|
bool selectable{false};
|
|
2573
2826
|
SharedColor selectionColor{};
|
|
@@ -2579,7 +2832,9 @@ class EnrichedMarkdownProps final : public ViewProps {
|
|
|
2579
2832
|
bool streamingAnimation{false};
|
|
2580
2833
|
EnrichedMarkdownStreamingConfigStruct streamingConfig{};
|
|
2581
2834
|
std::string spoilerOverlay{std::string{"particles"}};
|
|
2835
|
+
bool contextMenuHidden{false};
|
|
2582
2836
|
std::vector<EnrichedMarkdownContextMenuItemsStruct> contextMenuItems{};
|
|
2837
|
+
std::vector<EnrichedMarkdownImageRequestHeadersStruct> imageRequestHeaders{};
|
|
2583
2838
|
EnrichedMarkdownSelectionMenuConfigStruct selectionMenuConfig{};
|
|
2584
2839
|
EnrichedMarkdownAccessibilityLabelsStruct accessibilityLabels{};
|
|
2585
2840
|
std::string textBreakStrategy{std::string{"highQuality"}};
|
|
@@ -2811,7 +3066,317 @@ static inline folly::dynamic toDynamic(const EnrichedMarkdownTextInputMarkdownSt
|
|
|
2811
3066
|
}
|
|
2812
3067
|
#endif
|
|
2813
3068
|
|
|
2814
|
-
struct
|
|
3069
|
+
struct EnrichedMarkdownTextInputMarkdownStyleH1Struct {
|
|
3070
|
+
Float fontSize{0.0};
|
|
3071
|
+
std::string fontWeight{};
|
|
3072
|
+
SharedColor color{};
|
|
3073
|
+
|
|
3074
|
+
|
|
3075
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
3076
|
+
bool operator==(const EnrichedMarkdownTextInputMarkdownStyleH1Struct&) const = default;
|
|
3077
|
+
|
|
3078
|
+
folly::dynamic toDynamic() const {
|
|
3079
|
+
folly::dynamic result = folly::dynamic::object();
|
|
3080
|
+
result["fontSize"] = fontSize;
|
|
3081
|
+
result["fontWeight"] = fontWeight;
|
|
3082
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
3083
|
+
return result;
|
|
3084
|
+
}
|
|
3085
|
+
#endif
|
|
3086
|
+
};
|
|
3087
|
+
|
|
3088
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextInputMarkdownStyleH1Struct &result) {
|
|
3089
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
3090
|
+
|
|
3091
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
3092
|
+
if (tmp_fontSize != map.end()) {
|
|
3093
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
3094
|
+
}
|
|
3095
|
+
auto tmp_fontWeight = map.find("fontWeight");
|
|
3096
|
+
if (tmp_fontWeight != map.end()) {
|
|
3097
|
+
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
3098
|
+
}
|
|
3099
|
+
auto tmp_color = map.find("color");
|
|
3100
|
+
if (tmp_color != map.end()) {
|
|
3101
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
3102
|
+
}
|
|
3103
|
+
}
|
|
3104
|
+
|
|
3105
|
+
static inline std::string toString(const EnrichedMarkdownTextInputMarkdownStyleH1Struct &value) {
|
|
3106
|
+
return "[Object EnrichedMarkdownTextInputMarkdownStyleH1Struct]";
|
|
3107
|
+
}
|
|
3108
|
+
|
|
3109
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
3110
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextInputMarkdownStyleH1Struct &value) {
|
|
3111
|
+
return value.toDynamic();
|
|
3112
|
+
}
|
|
3113
|
+
#endif
|
|
3114
|
+
|
|
3115
|
+
struct EnrichedMarkdownTextInputMarkdownStyleH2Struct {
|
|
3116
|
+
Float fontSize{0.0};
|
|
3117
|
+
std::string fontWeight{};
|
|
3118
|
+
SharedColor color{};
|
|
3119
|
+
|
|
3120
|
+
|
|
3121
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
3122
|
+
bool operator==(const EnrichedMarkdownTextInputMarkdownStyleH2Struct&) const = default;
|
|
3123
|
+
|
|
3124
|
+
folly::dynamic toDynamic() const {
|
|
3125
|
+
folly::dynamic result = folly::dynamic::object();
|
|
3126
|
+
result["fontSize"] = fontSize;
|
|
3127
|
+
result["fontWeight"] = fontWeight;
|
|
3128
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
3129
|
+
return result;
|
|
3130
|
+
}
|
|
3131
|
+
#endif
|
|
3132
|
+
};
|
|
3133
|
+
|
|
3134
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextInputMarkdownStyleH2Struct &result) {
|
|
3135
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
3136
|
+
|
|
3137
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
3138
|
+
if (tmp_fontSize != map.end()) {
|
|
3139
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
3140
|
+
}
|
|
3141
|
+
auto tmp_fontWeight = map.find("fontWeight");
|
|
3142
|
+
if (tmp_fontWeight != map.end()) {
|
|
3143
|
+
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
3144
|
+
}
|
|
3145
|
+
auto tmp_color = map.find("color");
|
|
3146
|
+
if (tmp_color != map.end()) {
|
|
3147
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
3148
|
+
}
|
|
3149
|
+
}
|
|
3150
|
+
|
|
3151
|
+
static inline std::string toString(const EnrichedMarkdownTextInputMarkdownStyleH2Struct &value) {
|
|
3152
|
+
return "[Object EnrichedMarkdownTextInputMarkdownStyleH2Struct]";
|
|
3153
|
+
}
|
|
3154
|
+
|
|
3155
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
3156
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextInputMarkdownStyleH2Struct &value) {
|
|
3157
|
+
return value.toDynamic();
|
|
3158
|
+
}
|
|
3159
|
+
#endif
|
|
3160
|
+
|
|
3161
|
+
struct EnrichedMarkdownTextInputMarkdownStyleH3Struct {
|
|
3162
|
+
Float fontSize{0.0};
|
|
3163
|
+
std::string fontWeight{};
|
|
3164
|
+
SharedColor color{};
|
|
3165
|
+
|
|
3166
|
+
|
|
3167
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
3168
|
+
bool operator==(const EnrichedMarkdownTextInputMarkdownStyleH3Struct&) const = default;
|
|
3169
|
+
|
|
3170
|
+
folly::dynamic toDynamic() const {
|
|
3171
|
+
folly::dynamic result = folly::dynamic::object();
|
|
3172
|
+
result["fontSize"] = fontSize;
|
|
3173
|
+
result["fontWeight"] = fontWeight;
|
|
3174
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
3175
|
+
return result;
|
|
3176
|
+
}
|
|
3177
|
+
#endif
|
|
3178
|
+
};
|
|
3179
|
+
|
|
3180
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextInputMarkdownStyleH3Struct &result) {
|
|
3181
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
3182
|
+
|
|
3183
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
3184
|
+
if (tmp_fontSize != map.end()) {
|
|
3185
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
3186
|
+
}
|
|
3187
|
+
auto tmp_fontWeight = map.find("fontWeight");
|
|
3188
|
+
if (tmp_fontWeight != map.end()) {
|
|
3189
|
+
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
3190
|
+
}
|
|
3191
|
+
auto tmp_color = map.find("color");
|
|
3192
|
+
if (tmp_color != map.end()) {
|
|
3193
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
3194
|
+
}
|
|
3195
|
+
}
|
|
3196
|
+
|
|
3197
|
+
static inline std::string toString(const EnrichedMarkdownTextInputMarkdownStyleH3Struct &value) {
|
|
3198
|
+
return "[Object EnrichedMarkdownTextInputMarkdownStyleH3Struct]";
|
|
3199
|
+
}
|
|
3200
|
+
|
|
3201
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
3202
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextInputMarkdownStyleH3Struct &value) {
|
|
3203
|
+
return value.toDynamic();
|
|
3204
|
+
}
|
|
3205
|
+
#endif
|
|
3206
|
+
|
|
3207
|
+
struct EnrichedMarkdownTextInputMarkdownStyleH4Struct {
|
|
3208
|
+
Float fontSize{0.0};
|
|
3209
|
+
std::string fontWeight{};
|
|
3210
|
+
SharedColor color{};
|
|
3211
|
+
|
|
3212
|
+
|
|
3213
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
3214
|
+
bool operator==(const EnrichedMarkdownTextInputMarkdownStyleH4Struct&) const = default;
|
|
3215
|
+
|
|
3216
|
+
folly::dynamic toDynamic() const {
|
|
3217
|
+
folly::dynamic result = folly::dynamic::object();
|
|
3218
|
+
result["fontSize"] = fontSize;
|
|
3219
|
+
result["fontWeight"] = fontWeight;
|
|
3220
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
3221
|
+
return result;
|
|
3222
|
+
}
|
|
3223
|
+
#endif
|
|
3224
|
+
};
|
|
3225
|
+
|
|
3226
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextInputMarkdownStyleH4Struct &result) {
|
|
3227
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
3228
|
+
|
|
3229
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
3230
|
+
if (tmp_fontSize != map.end()) {
|
|
3231
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
3232
|
+
}
|
|
3233
|
+
auto tmp_fontWeight = map.find("fontWeight");
|
|
3234
|
+
if (tmp_fontWeight != map.end()) {
|
|
3235
|
+
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
3236
|
+
}
|
|
3237
|
+
auto tmp_color = map.find("color");
|
|
3238
|
+
if (tmp_color != map.end()) {
|
|
3239
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
3240
|
+
}
|
|
3241
|
+
}
|
|
3242
|
+
|
|
3243
|
+
static inline std::string toString(const EnrichedMarkdownTextInputMarkdownStyleH4Struct &value) {
|
|
3244
|
+
return "[Object EnrichedMarkdownTextInputMarkdownStyleH4Struct]";
|
|
3245
|
+
}
|
|
3246
|
+
|
|
3247
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
3248
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextInputMarkdownStyleH4Struct &value) {
|
|
3249
|
+
return value.toDynamic();
|
|
3250
|
+
}
|
|
3251
|
+
#endif
|
|
3252
|
+
|
|
3253
|
+
struct EnrichedMarkdownTextInputMarkdownStyleH5Struct {
|
|
3254
|
+
Float fontSize{0.0};
|
|
3255
|
+
std::string fontWeight{};
|
|
3256
|
+
SharedColor color{};
|
|
3257
|
+
|
|
3258
|
+
|
|
3259
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
3260
|
+
bool operator==(const EnrichedMarkdownTextInputMarkdownStyleH5Struct&) const = default;
|
|
3261
|
+
|
|
3262
|
+
folly::dynamic toDynamic() const {
|
|
3263
|
+
folly::dynamic result = folly::dynamic::object();
|
|
3264
|
+
result["fontSize"] = fontSize;
|
|
3265
|
+
result["fontWeight"] = fontWeight;
|
|
3266
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
3267
|
+
return result;
|
|
3268
|
+
}
|
|
3269
|
+
#endif
|
|
3270
|
+
};
|
|
3271
|
+
|
|
3272
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextInputMarkdownStyleH5Struct &result) {
|
|
3273
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
3274
|
+
|
|
3275
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
3276
|
+
if (tmp_fontSize != map.end()) {
|
|
3277
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
3278
|
+
}
|
|
3279
|
+
auto tmp_fontWeight = map.find("fontWeight");
|
|
3280
|
+
if (tmp_fontWeight != map.end()) {
|
|
3281
|
+
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
3282
|
+
}
|
|
3283
|
+
auto tmp_color = map.find("color");
|
|
3284
|
+
if (tmp_color != map.end()) {
|
|
3285
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
3286
|
+
}
|
|
3287
|
+
}
|
|
3288
|
+
|
|
3289
|
+
static inline std::string toString(const EnrichedMarkdownTextInputMarkdownStyleH5Struct &value) {
|
|
3290
|
+
return "[Object EnrichedMarkdownTextInputMarkdownStyleH5Struct]";
|
|
3291
|
+
}
|
|
3292
|
+
|
|
3293
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
3294
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextInputMarkdownStyleH5Struct &value) {
|
|
3295
|
+
return value.toDynamic();
|
|
3296
|
+
}
|
|
3297
|
+
#endif
|
|
3298
|
+
|
|
3299
|
+
struct EnrichedMarkdownTextInputMarkdownStyleH6Struct {
|
|
3300
|
+
Float fontSize{0.0};
|
|
3301
|
+
std::string fontWeight{};
|
|
3302
|
+
SharedColor color{};
|
|
3303
|
+
|
|
3304
|
+
|
|
3305
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
3306
|
+
bool operator==(const EnrichedMarkdownTextInputMarkdownStyleH6Struct&) const = default;
|
|
3307
|
+
|
|
3308
|
+
folly::dynamic toDynamic() const {
|
|
3309
|
+
folly::dynamic result = folly::dynamic::object();
|
|
3310
|
+
result["fontSize"] = fontSize;
|
|
3311
|
+
result["fontWeight"] = fontWeight;
|
|
3312
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
3313
|
+
return result;
|
|
3314
|
+
}
|
|
3315
|
+
#endif
|
|
3316
|
+
};
|
|
3317
|
+
|
|
3318
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextInputMarkdownStyleH6Struct &result) {
|
|
3319
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
3320
|
+
|
|
3321
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
3322
|
+
if (tmp_fontSize != map.end()) {
|
|
3323
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
3324
|
+
}
|
|
3325
|
+
auto tmp_fontWeight = map.find("fontWeight");
|
|
3326
|
+
if (tmp_fontWeight != map.end()) {
|
|
3327
|
+
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
3328
|
+
}
|
|
3329
|
+
auto tmp_color = map.find("color");
|
|
3330
|
+
if (tmp_color != map.end()) {
|
|
3331
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
3332
|
+
}
|
|
3333
|
+
}
|
|
3334
|
+
|
|
3335
|
+
static inline std::string toString(const EnrichedMarkdownTextInputMarkdownStyleH6Struct &value) {
|
|
3336
|
+
return "[Object EnrichedMarkdownTextInputMarkdownStyleH6Struct]";
|
|
3337
|
+
}
|
|
3338
|
+
|
|
3339
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
3340
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextInputMarkdownStyleH6Struct &value) {
|
|
3341
|
+
return value.toDynamic();
|
|
3342
|
+
}
|
|
3343
|
+
#endif
|
|
3344
|
+
|
|
3345
|
+
struct EnrichedMarkdownTextInputMarkdownStyleListStruct {
|
|
3346
|
+
Float itemSpacing{0.0};
|
|
3347
|
+
|
|
3348
|
+
|
|
3349
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
3350
|
+
bool operator==(const EnrichedMarkdownTextInputMarkdownStyleListStruct&) const = default;
|
|
3351
|
+
|
|
3352
|
+
folly::dynamic toDynamic() const {
|
|
3353
|
+
folly::dynamic result = folly::dynamic::object();
|
|
3354
|
+
result["itemSpacing"] = itemSpacing;
|
|
3355
|
+
return result;
|
|
3356
|
+
}
|
|
3357
|
+
#endif
|
|
3358
|
+
};
|
|
3359
|
+
|
|
3360
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextInputMarkdownStyleListStruct &result) {
|
|
3361
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
3362
|
+
|
|
3363
|
+
auto tmp_itemSpacing = map.find("itemSpacing");
|
|
3364
|
+
if (tmp_itemSpacing != map.end()) {
|
|
3365
|
+
fromRawValue(context, tmp_itemSpacing->second, result.itemSpacing);
|
|
3366
|
+
}
|
|
3367
|
+
}
|
|
3368
|
+
|
|
3369
|
+
static inline std::string toString(const EnrichedMarkdownTextInputMarkdownStyleListStruct &value) {
|
|
3370
|
+
return "[Object EnrichedMarkdownTextInputMarkdownStyleListStruct]";
|
|
3371
|
+
}
|
|
3372
|
+
|
|
3373
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
3374
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextInputMarkdownStyleListStruct &value) {
|
|
3375
|
+
return value.toDynamic();
|
|
3376
|
+
}
|
|
3377
|
+
#endif
|
|
3378
|
+
|
|
3379
|
+
struct EnrichedMarkdownTextInputMarkdownStyleInlineMathStruct {
|
|
2815
3380
|
SharedColor color{};
|
|
2816
3381
|
Float fontSize{0.0};
|
|
2817
3382
|
SharedColor backgroundColor{};
|
|
@@ -2826,7 +3391,7 @@ struct EnrichedMarkdownTextInputMarkdownStyleMathStruct {
|
|
|
2826
3391
|
|
|
2827
3392
|
|
|
2828
3393
|
#ifdef RN_SERIALIZABLE_STATE
|
|
2829
|
-
bool operator==(const
|
|
3394
|
+
bool operator==(const EnrichedMarkdownTextInputMarkdownStyleInlineMathStruct&) const = default;
|
|
2830
3395
|
|
|
2831
3396
|
folly::dynamic toDynamic() const {
|
|
2832
3397
|
folly::dynamic result = folly::dynamic::object();
|
|
@@ -2846,7 +3411,7 @@ struct EnrichedMarkdownTextInputMarkdownStyleMathStruct {
|
|
|
2846
3411
|
#endif
|
|
2847
3412
|
};
|
|
2848
3413
|
|
|
2849
|
-
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value,
|
|
3414
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextInputMarkdownStyleInlineMathStruct &result) {
|
|
2850
3415
|
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
2851
3416
|
|
|
2852
3417
|
auto tmp_color = map.find("color");
|
|
@@ -2895,17 +3460,17 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
2895
3460
|
}
|
|
2896
3461
|
}
|
|
2897
3462
|
|
|
2898
|
-
static inline std::string toString(const
|
|
2899
|
-
return "[Object
|
|
3463
|
+
static inline std::string toString(const EnrichedMarkdownTextInputMarkdownStyleInlineMathStruct &value) {
|
|
3464
|
+
return "[Object EnrichedMarkdownTextInputMarkdownStyleInlineMathStruct]";
|
|
2900
3465
|
}
|
|
2901
3466
|
|
|
2902
3467
|
#ifdef RN_SERIALIZABLE_STATE
|
|
2903
|
-
static inline folly::dynamic toDynamic(const
|
|
3468
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextInputMarkdownStyleInlineMathStruct &value) {
|
|
2904
3469
|
return value.toDynamic();
|
|
2905
3470
|
}
|
|
2906
3471
|
#endif
|
|
2907
3472
|
|
|
2908
|
-
struct
|
|
3473
|
+
struct EnrichedMarkdownTextInputMarkdownStyleMathStruct {
|
|
2909
3474
|
SharedColor color{};
|
|
2910
3475
|
Float fontSize{0.0};
|
|
2911
3476
|
SharedColor backgroundColor{};
|
|
@@ -2919,11 +3484,11 @@ struct EnrichedMarkdownTextInputMarkdownStyleMathBlockStruct {
|
|
|
2919
3484
|
std::string fontWeight{};
|
|
2920
3485
|
Float marginTop{0.0};
|
|
2921
3486
|
Float marginBottom{0.0};
|
|
2922
|
-
std::string
|
|
3487
|
+
std::string textAlign{};
|
|
2923
3488
|
|
|
2924
3489
|
|
|
2925
3490
|
#ifdef RN_SERIALIZABLE_STATE
|
|
2926
|
-
bool operator==(const
|
|
3491
|
+
bool operator==(const EnrichedMarkdownTextInputMarkdownStyleMathStruct&) const = default;
|
|
2927
3492
|
|
|
2928
3493
|
folly::dynamic toDynamic() const {
|
|
2929
3494
|
folly::dynamic result = folly::dynamic::object();
|
|
@@ -2940,13 +3505,13 @@ struct EnrichedMarkdownTextInputMarkdownStyleMathBlockStruct {
|
|
|
2940
3505
|
result["fontWeight"] = fontWeight;
|
|
2941
3506
|
result["marginTop"] = marginTop;
|
|
2942
3507
|
result["marginBottom"] = marginBottom;
|
|
2943
|
-
result["
|
|
3508
|
+
result["textAlign"] = textAlign;
|
|
2944
3509
|
return result;
|
|
2945
3510
|
}
|
|
2946
3511
|
#endif
|
|
2947
3512
|
};
|
|
2948
3513
|
|
|
2949
|
-
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value,
|
|
3514
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextInputMarkdownStyleMathStruct &result) {
|
|
2950
3515
|
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
2951
3516
|
|
|
2952
3517
|
auto tmp_color = map.find("color");
|
|
@@ -3001,18 +3566,18 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
3001
3566
|
if (tmp_marginBottom != map.end()) {
|
|
3002
3567
|
fromRawValue(context, tmp_marginBottom->second, result.marginBottom);
|
|
3003
3568
|
}
|
|
3004
|
-
auto
|
|
3005
|
-
if (
|
|
3006
|
-
fromRawValue(context,
|
|
3569
|
+
auto tmp_textAlign = map.find("textAlign");
|
|
3570
|
+
if (tmp_textAlign != map.end()) {
|
|
3571
|
+
fromRawValue(context, tmp_textAlign->second, result.textAlign);
|
|
3007
3572
|
}
|
|
3008
3573
|
}
|
|
3009
3574
|
|
|
3010
|
-
static inline std::string toString(const
|
|
3011
|
-
return "[Object
|
|
3575
|
+
static inline std::string toString(const EnrichedMarkdownTextInputMarkdownStyleMathStruct &value) {
|
|
3576
|
+
return "[Object EnrichedMarkdownTextInputMarkdownStyleMathStruct]";
|
|
3012
3577
|
}
|
|
3013
3578
|
|
|
3014
3579
|
#ifdef RN_SERIALIZABLE_STATE
|
|
3015
|
-
static inline folly::dynamic toDynamic(const
|
|
3580
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextInputMarkdownStyleMathStruct &value) {
|
|
3016
3581
|
return value.toDynamic();
|
|
3017
3582
|
}
|
|
3018
3583
|
#endif
|
|
@@ -3023,8 +3588,15 @@ struct EnrichedMarkdownTextInputMarkdownStyleStruct {
|
|
|
3023
3588
|
EnrichedMarkdownTextInputMarkdownStyleLinkStruct link{};
|
|
3024
3589
|
std::vector<EnrichedMarkdownTextInputMarkdownStyleLinkVariantsStruct> linkVariants{};
|
|
3025
3590
|
EnrichedMarkdownTextInputMarkdownStyleSpoilerStruct spoiler{};
|
|
3591
|
+
EnrichedMarkdownTextInputMarkdownStyleH1Struct h1{};
|
|
3592
|
+
EnrichedMarkdownTextInputMarkdownStyleH2Struct h2{};
|
|
3593
|
+
EnrichedMarkdownTextInputMarkdownStyleH3Struct h3{};
|
|
3594
|
+
EnrichedMarkdownTextInputMarkdownStyleH4Struct h4{};
|
|
3595
|
+
EnrichedMarkdownTextInputMarkdownStyleH5Struct h5{};
|
|
3596
|
+
EnrichedMarkdownTextInputMarkdownStyleH6Struct h6{};
|
|
3597
|
+
EnrichedMarkdownTextInputMarkdownStyleListStruct list{};
|
|
3598
|
+
EnrichedMarkdownTextInputMarkdownStyleInlineMathStruct inlineMath{};
|
|
3026
3599
|
EnrichedMarkdownTextInputMarkdownStyleMathStruct math{};
|
|
3027
|
-
EnrichedMarkdownTextInputMarkdownStyleMathBlockStruct mathBlock{};
|
|
3028
3600
|
|
|
3029
3601
|
|
|
3030
3602
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -3037,8 +3609,15 @@ struct EnrichedMarkdownTextInputMarkdownStyleStruct {
|
|
|
3037
3609
|
result["link"] = ::facebook::react::toDynamic(link);
|
|
3038
3610
|
result["linkVariants"] = ::facebook::react::toDynamic(linkVariants);
|
|
3039
3611
|
result["spoiler"] = ::facebook::react::toDynamic(spoiler);
|
|
3612
|
+
result["h1"] = ::facebook::react::toDynamic(h1);
|
|
3613
|
+
result["h2"] = ::facebook::react::toDynamic(h2);
|
|
3614
|
+
result["h3"] = ::facebook::react::toDynamic(h3);
|
|
3615
|
+
result["h4"] = ::facebook::react::toDynamic(h4);
|
|
3616
|
+
result["h5"] = ::facebook::react::toDynamic(h5);
|
|
3617
|
+
result["h6"] = ::facebook::react::toDynamic(h6);
|
|
3618
|
+
result["list"] = ::facebook::react::toDynamic(list);
|
|
3619
|
+
result["inlineMath"] = ::facebook::react::toDynamic(inlineMath);
|
|
3040
3620
|
result["math"] = ::facebook::react::toDynamic(math);
|
|
3041
|
-
result["mathBlock"] = ::facebook::react::toDynamic(mathBlock);
|
|
3042
3621
|
return result;
|
|
3043
3622
|
}
|
|
3044
3623
|
#endif
|
|
@@ -3067,14 +3646,42 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
3067
3646
|
if (tmp_spoiler != map.end()) {
|
|
3068
3647
|
fromRawValue(context, tmp_spoiler->second, result.spoiler);
|
|
3069
3648
|
}
|
|
3649
|
+
auto tmp_h1 = map.find("h1");
|
|
3650
|
+
if (tmp_h1 != map.end()) {
|
|
3651
|
+
fromRawValue(context, tmp_h1->second, result.h1);
|
|
3652
|
+
}
|
|
3653
|
+
auto tmp_h2 = map.find("h2");
|
|
3654
|
+
if (tmp_h2 != map.end()) {
|
|
3655
|
+
fromRawValue(context, tmp_h2->second, result.h2);
|
|
3656
|
+
}
|
|
3657
|
+
auto tmp_h3 = map.find("h3");
|
|
3658
|
+
if (tmp_h3 != map.end()) {
|
|
3659
|
+
fromRawValue(context, tmp_h3->second, result.h3);
|
|
3660
|
+
}
|
|
3661
|
+
auto tmp_h4 = map.find("h4");
|
|
3662
|
+
if (tmp_h4 != map.end()) {
|
|
3663
|
+
fromRawValue(context, tmp_h4->second, result.h4);
|
|
3664
|
+
}
|
|
3665
|
+
auto tmp_h5 = map.find("h5");
|
|
3666
|
+
if (tmp_h5 != map.end()) {
|
|
3667
|
+
fromRawValue(context, tmp_h5->second, result.h5);
|
|
3668
|
+
}
|
|
3669
|
+
auto tmp_h6 = map.find("h6");
|
|
3670
|
+
if (tmp_h6 != map.end()) {
|
|
3671
|
+
fromRawValue(context, tmp_h6->second, result.h6);
|
|
3672
|
+
}
|
|
3673
|
+
auto tmp_list = map.find("list");
|
|
3674
|
+
if (tmp_list != map.end()) {
|
|
3675
|
+
fromRawValue(context, tmp_list->second, result.list);
|
|
3676
|
+
}
|
|
3677
|
+
auto tmp_inlineMath = map.find("inlineMath");
|
|
3678
|
+
if (tmp_inlineMath != map.end()) {
|
|
3679
|
+
fromRawValue(context, tmp_inlineMath->second, result.inlineMath);
|
|
3680
|
+
}
|
|
3070
3681
|
auto tmp_math = map.find("math");
|
|
3071
3682
|
if (tmp_math != map.end()) {
|
|
3072
3683
|
fromRawValue(context, tmp_math->second, result.math);
|
|
3073
3684
|
}
|
|
3074
|
-
auto tmp_mathBlock = map.find("mathBlock");
|
|
3075
|
-
if (tmp_mathBlock != map.end()) {
|
|
3076
|
-
fromRawValue(context, tmp_mathBlock->second, result.mathBlock);
|
|
3077
|
-
}
|
|
3078
3685
|
}
|
|
3079
3686
|
|
|
3080
3687
|
static inline std::string toString(const EnrichedMarkdownTextInputMarkdownStyleStruct &value) {
|
|
@@ -3361,6 +3968,7 @@ class EnrichedMarkdownTextInputProps final : public ViewProps {
|
|
|
3361
3968
|
bool scrollEnabled{false};
|
|
3362
3969
|
bool blockSyntax{false};
|
|
3363
3970
|
std::string autoCapitalize{};
|
|
3971
|
+
bool interceptPaste{false};
|
|
3364
3972
|
bool multiline{false};
|
|
3365
3973
|
SharedColor cursorColor{};
|
|
3366
3974
|
SharedColor selectionColor{};
|
|
@@ -3931,6 +4539,8 @@ struct EnrichedMarkdownTextMarkdownStyleBlockquoteStruct {
|
|
|
3931
4539
|
Float borderWidth{0.0};
|
|
3932
4540
|
Float gapWidth{0.0};
|
|
3933
4541
|
SharedColor backgroundColor{};
|
|
4542
|
+
Float borderRadius{0.0};
|
|
4543
|
+
Float padding{0.0};
|
|
3934
4544
|
|
|
3935
4545
|
|
|
3936
4546
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -3949,6 +4559,8 @@ struct EnrichedMarkdownTextMarkdownStyleBlockquoteStruct {
|
|
|
3949
4559
|
result["borderWidth"] = borderWidth;
|
|
3950
4560
|
result["gapWidth"] = gapWidth;
|
|
3951
4561
|
result["backgroundColor"] = ::facebook::react::toDynamic(backgroundColor);
|
|
4562
|
+
result["borderRadius"] = borderRadius;
|
|
4563
|
+
result["padding"] = padding;
|
|
3952
4564
|
return result;
|
|
3953
4565
|
}
|
|
3954
4566
|
#endif
|
|
@@ -4001,6 +4613,14 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
4001
4613
|
if (tmp_backgroundColor != map.end()) {
|
|
4002
4614
|
fromRawValue(context, tmp_backgroundColor->second, result.backgroundColor);
|
|
4003
4615
|
}
|
|
4616
|
+
auto tmp_borderRadius = map.find("borderRadius");
|
|
4617
|
+
if (tmp_borderRadius != map.end()) {
|
|
4618
|
+
fromRawValue(context, tmp_borderRadius->second, result.borderRadius);
|
|
4619
|
+
}
|
|
4620
|
+
auto tmp_padding = map.find("padding");
|
|
4621
|
+
if (tmp_padding != map.end()) {
|
|
4622
|
+
fromRawValue(context, tmp_padding->second, result.padding);
|
|
4623
|
+
}
|
|
4004
4624
|
}
|
|
4005
4625
|
|
|
4006
4626
|
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleBlockquoteStruct &value) {
|
|
@@ -4028,6 +4648,7 @@ struct EnrichedMarkdownTextMarkdownStyleListStruct {
|
|
|
4028
4648
|
std::string markerFontWeight{};
|
|
4029
4649
|
Float gapWidth{0.0};
|
|
4030
4650
|
Float marginLeft{0.0};
|
|
4651
|
+
Float itemSpacing{0.0};
|
|
4031
4652
|
|
|
4032
4653
|
|
|
4033
4654
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -4049,6 +4670,7 @@ struct EnrichedMarkdownTextMarkdownStyleListStruct {
|
|
|
4049
4670
|
result["markerFontWeight"] = markerFontWeight;
|
|
4050
4671
|
result["gapWidth"] = gapWidth;
|
|
4051
4672
|
result["marginLeft"] = marginLeft;
|
|
4673
|
+
result["itemSpacing"] = itemSpacing;
|
|
4052
4674
|
return result;
|
|
4053
4675
|
}
|
|
4054
4676
|
#endif
|
|
@@ -4113,6 +4735,10 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
4113
4735
|
if (tmp_marginLeft != map.end()) {
|
|
4114
4736
|
fromRawValue(context, tmp_marginLeft->second, result.marginLeft);
|
|
4115
4737
|
}
|
|
4738
|
+
auto tmp_itemSpacing = map.find("itemSpacing");
|
|
4739
|
+
if (tmp_itemSpacing != map.end()) {
|
|
4740
|
+
fromRawValue(context, tmp_itemSpacing->second, result.itemSpacing);
|
|
4741
|
+
}
|
|
4116
4742
|
}
|
|
4117
4743
|
|
|
4118
4744
|
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleListStruct &value) {
|
|
@@ -4125,6 +4751,118 @@ static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMarkdownStyleLi
|
|
|
4125
4751
|
}
|
|
4126
4752
|
#endif
|
|
4127
4753
|
|
|
4754
|
+
struct EnrichedMarkdownTextMarkdownStyleCodeBlockSyntaxColorsStruct {
|
|
4755
|
+
SharedColor keyword{};
|
|
4756
|
+
SharedColor operatorColor{};
|
|
4757
|
+
SharedColor punctuation{};
|
|
4758
|
+
SharedColor string{};
|
|
4759
|
+
SharedColor number{};
|
|
4760
|
+
SharedColor constant{};
|
|
4761
|
+
SharedColor comment{};
|
|
4762
|
+
SharedColor function{};
|
|
4763
|
+
SharedColor type{};
|
|
4764
|
+
SharedColor variable{};
|
|
4765
|
+
SharedColor property{};
|
|
4766
|
+
SharedColor tag{};
|
|
4767
|
+
SharedColor attribute{};
|
|
4768
|
+
SharedColor embedded{};
|
|
4769
|
+
|
|
4770
|
+
|
|
4771
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
4772
|
+
bool operator==(const EnrichedMarkdownTextMarkdownStyleCodeBlockSyntaxColorsStruct&) const = default;
|
|
4773
|
+
|
|
4774
|
+
folly::dynamic toDynamic() const {
|
|
4775
|
+
folly::dynamic result = folly::dynamic::object();
|
|
4776
|
+
result["keyword"] = ::facebook::react::toDynamic(keyword);
|
|
4777
|
+
result["operatorColor"] = ::facebook::react::toDynamic(operatorColor);
|
|
4778
|
+
result["punctuation"] = ::facebook::react::toDynamic(punctuation);
|
|
4779
|
+
result["string"] = ::facebook::react::toDynamic(string);
|
|
4780
|
+
result["number"] = ::facebook::react::toDynamic(number);
|
|
4781
|
+
result["constant"] = ::facebook::react::toDynamic(constant);
|
|
4782
|
+
result["comment"] = ::facebook::react::toDynamic(comment);
|
|
4783
|
+
result["function"] = ::facebook::react::toDynamic(function);
|
|
4784
|
+
result["type"] = ::facebook::react::toDynamic(type);
|
|
4785
|
+
result["variable"] = ::facebook::react::toDynamic(variable);
|
|
4786
|
+
result["property"] = ::facebook::react::toDynamic(property);
|
|
4787
|
+
result["tag"] = ::facebook::react::toDynamic(tag);
|
|
4788
|
+
result["attribute"] = ::facebook::react::toDynamic(attribute);
|
|
4789
|
+
result["embedded"] = ::facebook::react::toDynamic(embedded);
|
|
4790
|
+
return result;
|
|
4791
|
+
}
|
|
4792
|
+
#endif
|
|
4793
|
+
};
|
|
4794
|
+
|
|
4795
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextMarkdownStyleCodeBlockSyntaxColorsStruct &result) {
|
|
4796
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
4797
|
+
|
|
4798
|
+
auto tmp_keyword = map.find("keyword");
|
|
4799
|
+
if (tmp_keyword != map.end()) {
|
|
4800
|
+
fromRawValue(context, tmp_keyword->second, result.keyword);
|
|
4801
|
+
}
|
|
4802
|
+
auto tmp_operatorColor = map.find("operatorColor");
|
|
4803
|
+
if (tmp_operatorColor != map.end()) {
|
|
4804
|
+
fromRawValue(context, tmp_operatorColor->second, result.operatorColor);
|
|
4805
|
+
}
|
|
4806
|
+
auto tmp_punctuation = map.find("punctuation");
|
|
4807
|
+
if (tmp_punctuation != map.end()) {
|
|
4808
|
+
fromRawValue(context, tmp_punctuation->second, result.punctuation);
|
|
4809
|
+
}
|
|
4810
|
+
auto tmp_string = map.find("string");
|
|
4811
|
+
if (tmp_string != map.end()) {
|
|
4812
|
+
fromRawValue(context, tmp_string->second, result.string);
|
|
4813
|
+
}
|
|
4814
|
+
auto tmp_number = map.find("number");
|
|
4815
|
+
if (tmp_number != map.end()) {
|
|
4816
|
+
fromRawValue(context, tmp_number->second, result.number);
|
|
4817
|
+
}
|
|
4818
|
+
auto tmp_constant = map.find("constant");
|
|
4819
|
+
if (tmp_constant != map.end()) {
|
|
4820
|
+
fromRawValue(context, tmp_constant->second, result.constant);
|
|
4821
|
+
}
|
|
4822
|
+
auto tmp_comment = map.find("comment");
|
|
4823
|
+
if (tmp_comment != map.end()) {
|
|
4824
|
+
fromRawValue(context, tmp_comment->second, result.comment);
|
|
4825
|
+
}
|
|
4826
|
+
auto tmp_function = map.find("function");
|
|
4827
|
+
if (tmp_function != map.end()) {
|
|
4828
|
+
fromRawValue(context, tmp_function->second, result.function);
|
|
4829
|
+
}
|
|
4830
|
+
auto tmp_type = map.find("type");
|
|
4831
|
+
if (tmp_type != map.end()) {
|
|
4832
|
+
fromRawValue(context, tmp_type->second, result.type);
|
|
4833
|
+
}
|
|
4834
|
+
auto tmp_variable = map.find("variable");
|
|
4835
|
+
if (tmp_variable != map.end()) {
|
|
4836
|
+
fromRawValue(context, tmp_variable->second, result.variable);
|
|
4837
|
+
}
|
|
4838
|
+
auto tmp_property = map.find("property");
|
|
4839
|
+
if (tmp_property != map.end()) {
|
|
4840
|
+
fromRawValue(context, tmp_property->second, result.property);
|
|
4841
|
+
}
|
|
4842
|
+
auto tmp_tag = map.find("tag");
|
|
4843
|
+
if (tmp_tag != map.end()) {
|
|
4844
|
+
fromRawValue(context, tmp_tag->second, result.tag);
|
|
4845
|
+
}
|
|
4846
|
+
auto tmp_attribute = map.find("attribute");
|
|
4847
|
+
if (tmp_attribute != map.end()) {
|
|
4848
|
+
fromRawValue(context, tmp_attribute->second, result.attribute);
|
|
4849
|
+
}
|
|
4850
|
+
auto tmp_embedded = map.find("embedded");
|
|
4851
|
+
if (tmp_embedded != map.end()) {
|
|
4852
|
+
fromRawValue(context, tmp_embedded->second, result.embedded);
|
|
4853
|
+
}
|
|
4854
|
+
}
|
|
4855
|
+
|
|
4856
|
+
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleCodeBlockSyntaxColorsStruct &value) {
|
|
4857
|
+
return "[Object EnrichedMarkdownTextMarkdownStyleCodeBlockSyntaxColorsStruct]";
|
|
4858
|
+
}
|
|
4859
|
+
|
|
4860
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
4861
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMarkdownStyleCodeBlockSyntaxColorsStruct &value) {
|
|
4862
|
+
return value.toDynamic();
|
|
4863
|
+
}
|
|
4864
|
+
#endif
|
|
4865
|
+
|
|
4128
4866
|
struct EnrichedMarkdownTextMarkdownStyleCodeBlockStruct {
|
|
4129
4867
|
Float fontSize{0.0};
|
|
4130
4868
|
std::string fontFamily{};
|
|
@@ -4138,6 +4876,7 @@ struct EnrichedMarkdownTextMarkdownStyleCodeBlockStruct {
|
|
|
4138
4876
|
Float borderRadius{0.0};
|
|
4139
4877
|
Float borderWidth{0.0};
|
|
4140
4878
|
Float padding{0.0};
|
|
4879
|
+
EnrichedMarkdownTextMarkdownStyleCodeBlockSyntaxColorsStruct syntaxColors{};
|
|
4141
4880
|
|
|
4142
4881
|
|
|
4143
4882
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -4157,6 +4896,7 @@ struct EnrichedMarkdownTextMarkdownStyleCodeBlockStruct {
|
|
|
4157
4896
|
result["borderRadius"] = borderRadius;
|
|
4158
4897
|
result["borderWidth"] = borderWidth;
|
|
4159
4898
|
result["padding"] = padding;
|
|
4899
|
+
result["syntaxColors"] = ::facebook::react::toDynamic(syntaxColors);
|
|
4160
4900
|
return result;
|
|
4161
4901
|
}
|
|
4162
4902
|
#endif
|
|
@@ -4213,6 +4953,10 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
4213
4953
|
if (tmp_padding != map.end()) {
|
|
4214
4954
|
fromRawValue(context, tmp_padding->second, result.padding);
|
|
4215
4955
|
}
|
|
4956
|
+
auto tmp_syntaxColors = map.find("syntaxColors");
|
|
4957
|
+
if (tmp_syntaxColors != map.end()) {
|
|
4958
|
+
fromRawValue(context, tmp_syntaxColors->second, result.syntaxColors);
|
|
4959
|
+
}
|
|
4216
4960
|
}
|
|
4217
4961
|
|
|
4218
4962
|
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleCodeBlockStruct &value) {
|
|
@@ -4559,6 +5303,9 @@ static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMarkdownStyleCo
|
|
|
4559
5303
|
|
|
4560
5304
|
struct EnrichedMarkdownTextMarkdownStyleImageStruct {
|
|
4561
5305
|
Float height{0.0};
|
|
5306
|
+
Float maxHeight{0.0};
|
|
5307
|
+
Float aspectRatio{0.0};
|
|
5308
|
+
std::string resizeMode{};
|
|
4562
5309
|
Float borderRadius{0.0};
|
|
4563
5310
|
Float marginTop{0.0};
|
|
4564
5311
|
Float marginBottom{0.0};
|
|
@@ -4570,6 +5317,9 @@ struct EnrichedMarkdownTextMarkdownStyleImageStruct {
|
|
|
4570
5317
|
folly::dynamic toDynamic() const {
|
|
4571
5318
|
folly::dynamic result = folly::dynamic::object();
|
|
4572
5319
|
result["height"] = height;
|
|
5320
|
+
result["maxHeight"] = maxHeight;
|
|
5321
|
+
result["aspectRatio"] = aspectRatio;
|
|
5322
|
+
result["resizeMode"] = resizeMode;
|
|
4573
5323
|
result["borderRadius"] = borderRadius;
|
|
4574
5324
|
result["marginTop"] = marginTop;
|
|
4575
5325
|
result["marginBottom"] = marginBottom;
|
|
@@ -4585,6 +5335,18 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
4585
5335
|
if (tmp_height != map.end()) {
|
|
4586
5336
|
fromRawValue(context, tmp_height->second, result.height);
|
|
4587
5337
|
}
|
|
5338
|
+
auto tmp_maxHeight = map.find("maxHeight");
|
|
5339
|
+
if (tmp_maxHeight != map.end()) {
|
|
5340
|
+
fromRawValue(context, tmp_maxHeight->second, result.maxHeight);
|
|
5341
|
+
}
|
|
5342
|
+
auto tmp_aspectRatio = map.find("aspectRatio");
|
|
5343
|
+
if (tmp_aspectRatio != map.end()) {
|
|
5344
|
+
fromRawValue(context, tmp_aspectRatio->second, result.aspectRatio);
|
|
5345
|
+
}
|
|
5346
|
+
auto tmp_resizeMode = map.find("resizeMode");
|
|
5347
|
+
if (tmp_resizeMode != map.end()) {
|
|
5348
|
+
fromRawValue(context, tmp_resizeMode->second, result.resizeMode);
|
|
5349
|
+
}
|
|
4588
5350
|
auto tmp_borderRadius = map.find("borderRadius");
|
|
4589
5351
|
if (tmp_borderRadius != map.end()) {
|
|
4590
5352
|
fromRawValue(context, tmp_borderRadius->second, result.borderRadius);
|
|
@@ -4713,6 +5475,8 @@ struct EnrichedMarkdownTextMarkdownStyleTableStruct {
|
|
|
4713
5475
|
Float borderRadius{0.0};
|
|
4714
5476
|
Float cellPaddingHorizontal{0.0};
|
|
4715
5477
|
Float cellPaddingVertical{0.0};
|
|
5478
|
+
Float horizontalOverflow{0.0};
|
|
5479
|
+
std::string align{};
|
|
4716
5480
|
|
|
4717
5481
|
|
|
4718
5482
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -4737,6 +5501,8 @@ struct EnrichedMarkdownTextMarkdownStyleTableStruct {
|
|
|
4737
5501
|
result["borderRadius"] = borderRadius;
|
|
4738
5502
|
result["cellPaddingHorizontal"] = cellPaddingHorizontal;
|
|
4739
5503
|
result["cellPaddingVertical"] = cellPaddingVertical;
|
|
5504
|
+
result["horizontalOverflow"] = horizontalOverflow;
|
|
5505
|
+
result["align"] = align;
|
|
4740
5506
|
return result;
|
|
4741
5507
|
}
|
|
4742
5508
|
#endif
|
|
@@ -4813,6 +5579,14 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
4813
5579
|
if (tmp_cellPaddingVertical != map.end()) {
|
|
4814
5580
|
fromRawValue(context, tmp_cellPaddingVertical->second, result.cellPaddingVertical);
|
|
4815
5581
|
}
|
|
5582
|
+
auto tmp_horizontalOverflow = map.find("horizontalOverflow");
|
|
5583
|
+
if (tmp_horizontalOverflow != map.end()) {
|
|
5584
|
+
fromRawValue(context, tmp_horizontalOverflow->second, result.horizontalOverflow);
|
|
5585
|
+
}
|
|
5586
|
+
auto tmp_align = map.find("align");
|
|
5587
|
+
if (tmp_align != map.end()) {
|
|
5588
|
+
fromRawValue(context, tmp_align->second, result.align);
|
|
5589
|
+
}
|
|
4816
5590
|
}
|
|
4817
5591
|
|
|
4818
5592
|
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleTableStruct &value) {
|
|
@@ -5459,6 +6233,7 @@ struct EnrichedMarkdownTextMd4cFlagsStruct {
|
|
|
5459
6233
|
bool subscript{false};
|
|
5460
6234
|
bool latexMath{false};
|
|
5461
6235
|
bool highlight{false};
|
|
6236
|
+
bool hardSoftBreaks{false};
|
|
5462
6237
|
|
|
5463
6238
|
|
|
5464
6239
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -5471,6 +6246,7 @@ struct EnrichedMarkdownTextMd4cFlagsStruct {
|
|
|
5471
6246
|
result["subscript"] = subscript;
|
|
5472
6247
|
result["latexMath"] = latexMath;
|
|
5473
6248
|
result["highlight"] = highlight;
|
|
6249
|
+
result["hardSoftBreaks"] = hardSoftBreaks;
|
|
5474
6250
|
return result;
|
|
5475
6251
|
}
|
|
5476
6252
|
#endif
|
|
@@ -5499,6 +6275,10 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
5499
6275
|
if (tmp_highlight != map.end()) {
|
|
5500
6276
|
fromRawValue(context, tmp_highlight->second, result.highlight);
|
|
5501
6277
|
}
|
|
6278
|
+
auto tmp_hardSoftBreaks = map.find("hardSoftBreaks");
|
|
6279
|
+
if (tmp_hardSoftBreaks != map.end()) {
|
|
6280
|
+
fromRawValue(context, tmp_hardSoftBreaks->second, result.hardSoftBreaks);
|
|
6281
|
+
}
|
|
5502
6282
|
}
|
|
5503
6283
|
|
|
5504
6284
|
static inline std::string toString(const EnrichedMarkdownTextMd4cFlagsStruct &value) {
|
|
@@ -5513,6 +6293,7 @@ static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMd4cFlagsStruct
|
|
|
5513
6293
|
|
|
5514
6294
|
struct EnrichedMarkdownTextStreamingConfigStruct {
|
|
5515
6295
|
std::string tableMode{};
|
|
6296
|
+
std::string codeBlockMode{};
|
|
5516
6297
|
|
|
5517
6298
|
|
|
5518
6299
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -5521,6 +6302,7 @@ struct EnrichedMarkdownTextStreamingConfigStruct {
|
|
|
5521
6302
|
folly::dynamic toDynamic() const {
|
|
5522
6303
|
folly::dynamic result = folly::dynamic::object();
|
|
5523
6304
|
result["tableMode"] = tableMode;
|
|
6305
|
+
result["codeBlockMode"] = codeBlockMode;
|
|
5524
6306
|
return result;
|
|
5525
6307
|
}
|
|
5526
6308
|
#endif
|
|
@@ -5533,6 +6315,10 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
5533
6315
|
if (tmp_tableMode != map.end()) {
|
|
5534
6316
|
fromRawValue(context, tmp_tableMode->second, result.tableMode);
|
|
5535
6317
|
}
|
|
6318
|
+
auto tmp_codeBlockMode = map.find("codeBlockMode");
|
|
6319
|
+
if (tmp_codeBlockMode != map.end()) {
|
|
6320
|
+
fromRawValue(context, tmp_codeBlockMode->second, result.codeBlockMode);
|
|
6321
|
+
}
|
|
5536
6322
|
}
|
|
5537
6323
|
|
|
5538
6324
|
static inline std::string toString(const EnrichedMarkdownTextStreamingConfigStruct &value) {
|
|
@@ -5595,6 +6381,56 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
5595
6381
|
}
|
|
5596
6382
|
|
|
5597
6383
|
|
|
6384
|
+
struct EnrichedMarkdownTextImageRequestHeadersStruct {
|
|
6385
|
+
std::string name{};
|
|
6386
|
+
std::string value{};
|
|
6387
|
+
|
|
6388
|
+
|
|
6389
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
6390
|
+
bool operator==(const EnrichedMarkdownTextImageRequestHeadersStruct&) const = default;
|
|
6391
|
+
|
|
6392
|
+
folly::dynamic toDynamic() const {
|
|
6393
|
+
folly::dynamic result = folly::dynamic::object();
|
|
6394
|
+
result["name"] = name;
|
|
6395
|
+
result["value"] = value;
|
|
6396
|
+
return result;
|
|
6397
|
+
}
|
|
6398
|
+
#endif
|
|
6399
|
+
};
|
|
6400
|
+
|
|
6401
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextImageRequestHeadersStruct &result) {
|
|
6402
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
6403
|
+
|
|
6404
|
+
auto tmp_name = map.find("name");
|
|
6405
|
+
if (tmp_name != map.end()) {
|
|
6406
|
+
fromRawValue(context, tmp_name->second, result.name);
|
|
6407
|
+
}
|
|
6408
|
+
auto tmp_value = map.find("value");
|
|
6409
|
+
if (tmp_value != map.end()) {
|
|
6410
|
+
fromRawValue(context, tmp_value->second, result.value);
|
|
6411
|
+
}
|
|
6412
|
+
}
|
|
6413
|
+
|
|
6414
|
+
static inline std::string toString(const EnrichedMarkdownTextImageRequestHeadersStruct &value) {
|
|
6415
|
+
return "[Object EnrichedMarkdownTextImageRequestHeadersStruct]";
|
|
6416
|
+
}
|
|
6417
|
+
|
|
6418
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
6419
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextImageRequestHeadersStruct &value) {
|
|
6420
|
+
return value.toDynamic();
|
|
6421
|
+
}
|
|
6422
|
+
#endif
|
|
6423
|
+
|
|
6424
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<EnrichedMarkdownTextImageRequestHeadersStruct> &result) {
|
|
6425
|
+
auto items = (std::vector<RawValue>)value;
|
|
6426
|
+
for (const auto &item : items) {
|
|
6427
|
+
EnrichedMarkdownTextImageRequestHeadersStruct newItem;
|
|
6428
|
+
fromRawValue(context, item, newItem);
|
|
6429
|
+
result.emplace_back(newItem);
|
|
6430
|
+
}
|
|
6431
|
+
}
|
|
6432
|
+
|
|
6433
|
+
|
|
5598
6434
|
struct EnrichedMarkdownTextSelectionMenuConfigStruct {
|
|
5599
6435
|
bool copyAsMarkdown{false};
|
|
5600
6436
|
bool copyImageUrl{false};
|
|
@@ -5603,6 +6439,10 @@ struct EnrichedMarkdownTextSelectionMenuConfigStruct {
|
|
|
5603
6439
|
std::string copyImageUrlLabel{};
|
|
5604
6440
|
std::string copyImageUrlsLabel{};
|
|
5605
6441
|
std::vector<std::string> copyImageUrlPluralTemplates{};
|
|
6442
|
+
bool copyEnabled{false};
|
|
6443
|
+
bool copyFormatMarkdown{false};
|
|
6444
|
+
bool systemItemsNone{false};
|
|
6445
|
+
bool codeBlockCopyButton{false};
|
|
5606
6446
|
|
|
5607
6447
|
|
|
5608
6448
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -5617,6 +6457,10 @@ struct EnrichedMarkdownTextSelectionMenuConfigStruct {
|
|
|
5617
6457
|
result["copyImageUrlLabel"] = copyImageUrlLabel;
|
|
5618
6458
|
result["copyImageUrlsLabel"] = copyImageUrlsLabel;
|
|
5619
6459
|
result["copyImageUrlPluralTemplates"] = ::facebook::react::toDynamic(copyImageUrlPluralTemplates);
|
|
6460
|
+
result["copyEnabled"] = copyEnabled;
|
|
6461
|
+
result["copyFormatMarkdown"] = copyFormatMarkdown;
|
|
6462
|
+
result["systemItemsNone"] = systemItemsNone;
|
|
6463
|
+
result["codeBlockCopyButton"] = codeBlockCopyButton;
|
|
5620
6464
|
return result;
|
|
5621
6465
|
}
|
|
5622
6466
|
#endif
|
|
@@ -5653,6 +6497,22 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
5653
6497
|
if (tmp_copyImageUrlPluralTemplates != map.end()) {
|
|
5654
6498
|
fromRawValue(context, tmp_copyImageUrlPluralTemplates->second, result.copyImageUrlPluralTemplates);
|
|
5655
6499
|
}
|
|
6500
|
+
auto tmp_copyEnabled = map.find("copyEnabled");
|
|
6501
|
+
if (tmp_copyEnabled != map.end()) {
|
|
6502
|
+
fromRawValue(context, tmp_copyEnabled->second, result.copyEnabled);
|
|
6503
|
+
}
|
|
6504
|
+
auto tmp_copyFormatMarkdown = map.find("copyFormatMarkdown");
|
|
6505
|
+
if (tmp_copyFormatMarkdown != map.end()) {
|
|
6506
|
+
fromRawValue(context, tmp_copyFormatMarkdown->second, result.copyFormatMarkdown);
|
|
6507
|
+
}
|
|
6508
|
+
auto tmp_systemItemsNone = map.find("systemItemsNone");
|
|
6509
|
+
if (tmp_systemItemsNone != map.end()) {
|
|
6510
|
+
fromRawValue(context, tmp_systemItemsNone->second, result.systemItemsNone);
|
|
6511
|
+
}
|
|
6512
|
+
auto tmp_codeBlockCopyButton = map.find("codeBlockCopyButton");
|
|
6513
|
+
if (tmp_codeBlockCopyButton != map.end()) {
|
|
6514
|
+
fromRawValue(context, tmp_codeBlockCopyButton->second, result.codeBlockCopyButton);
|
|
6515
|
+
}
|
|
5656
6516
|
}
|
|
5657
6517
|
|
|
5658
6518
|
static inline std::string toString(const EnrichedMarkdownTextSelectionMenuConfigStruct &value) {
|
|
@@ -5937,6 +6797,7 @@ class EnrichedMarkdownTextProps final : public ViewProps {
|
|
|
5937
6797
|
|
|
5938
6798
|
std::string markdown{};
|
|
5939
6799
|
EnrichedMarkdownTextMarkdownStyleStruct markdownStyle{};
|
|
6800
|
+
bool enableTaskListItemToggle{true};
|
|
5940
6801
|
bool enableLinkPreview{true};
|
|
5941
6802
|
bool selectable{false};
|
|
5942
6803
|
SharedColor selectionColor{};
|
|
@@ -5948,7 +6809,9 @@ class EnrichedMarkdownTextProps final : public ViewProps {
|
|
|
5948
6809
|
bool streamingAnimation{false};
|
|
5949
6810
|
EnrichedMarkdownTextStreamingConfigStruct streamingConfig{};
|
|
5950
6811
|
std::string spoilerOverlay{std::string{"particles"}};
|
|
6812
|
+
bool contextMenuHidden{false};
|
|
5951
6813
|
std::vector<EnrichedMarkdownTextContextMenuItemsStruct> contextMenuItems{};
|
|
6814
|
+
std::vector<EnrichedMarkdownTextImageRequestHeadersStruct> imageRequestHeaders{};
|
|
5952
6815
|
EnrichedMarkdownTextSelectionMenuConfigStruct selectionMenuConfig{};
|
|
5953
6816
|
EnrichedMarkdownTextAccessibilityLabelsStruct accessibilityLabels{};
|
|
5954
6817
|
std::string textBreakStrategy{std::string{"highQuality"}};
|