react-native-enriched-markdown-scaffold 0.7.4-scaffold.9 → 1.0.2-scaffold.10
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 +188 -1
- package/android/consumer-rules.pro +1 -1
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownManagerDelegate.java +27 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownManagerInterface.java +7 -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 +27 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownTextManagerInterface.java +7 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/EventEmitters.cpp +223 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/EventEmitters.h +183 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/Props.cpp +65 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/Props.h +1086 -61
- 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 +351 -13
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownInternalText.kt +62 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownManager.kt +85 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownText.kt +160 -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 +76 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/MeasurementStore.kt +126 -10
- package/android/src/main/java/com/swmansion/enriched/markdown/events/CopyPressEvent.kt +24 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/events/CopyRequestEvent.kt +28 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/events/LinkLayoutEvent.kt +36 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/events/SelectionChangeEvent.kt +43 -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 +923 -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 +108 -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/LinkRenderer.kt +37 -7
- 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 +35 -28
- 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 +20 -82
- 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/InlineChipPainter.kt +140 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/LinkChipSpans.kt +177 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/LinkSpan.kt +1 -6
- 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/InlineMathStyle.kt +16 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/LinkStyle.kt +36 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/LinkVariantEntry.kt +7 -3
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/ListStyle.kt +4 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/MathStyle.kt +3 -0
- 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 +84 -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 +52 -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/conversion/HTMLGenerator.kt +2 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/conversion/MarkdownExtractor.kt +6 -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/HeadlessActionMode.kt +88 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/view/LinkLayoutCollector.kt +100 -0
- 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 +72 -16
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/view/SelectionChangeReporter.kt +232 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/views/BlockMenuOptions.kt +64 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/views/CodeBlockContainerView.kt +414 -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 +61 -11
- 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 +8 -2
- package/android/src/math/java/com/swmansion/enriched/markdown/spans/MathChipSpan.kt +1 -1
- package/android/src/math/java/com/swmansion/enriched/markdown/spans/MathInlineSpan.kt +13 -6
- package/android/src/math/java/com/swmansion/enriched/markdown/spans/MathMeasureHelper.kt +2 -1
- package/android/src/math/java/com/swmansion/enriched/markdown/views/MathContainerView.kt +26 -8
- 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 +405 -12
- package/docs/BREAKING_CHANGES.md +129 -0
- package/docs/CODE_HIGHLIGHT.md +133 -0
- package/docs/COPY_OPTIONS.md +61 -3
- package/docs/ELEMENTS_STRUCTURE.md +52 -4
- package/docs/IMAGE_CACHING.md +30 -0
- package/docs/INPUT.md +110 -11
- package/docs/LATEX_MATH.md +87 -45
- package/docs/MACOS.md +1 -1
- package/docs/MARKDOWN_STREAMING.md +27 -1
- package/docs/MENTIONS.md +8 -1
- package/docs/NATIVE_ASSETS.md +127 -0
- package/docs/RTL.md +1 -1
- package/docs/STYLES.md +73 -6
- package/docs/TESTING.md +112 -0
- package/docs/TEXT.md +18 -6
- package/docs/WEB.md +4 -1
- package/ios/EnrichedMarkdown.h +7 -0
- package/ios/EnrichedMarkdown.mm +583 -76
- package/ios/EnrichedMarkdownText.h +7 -0
- package/ios/EnrichedMarkdownText.mm +299 -73
- package/ios/attachments/ENRMImageAttachment.h +9 -0
- package/ios/attachments/ENRMImageAttachment.m +143 -40
- package/ios/attachments/ENRMMathInlineAttachment+macOS.m +2 -1
- package/ios/attachments/ENRMMathInlineAttachment.h +5 -0
- package/ios/attachments/ENRMMathInlineAttachment.m +50 -82
- package/ios/attachments/ENRMMathInlineAttachmentShared.h +2 -0
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/EventEmitters.cpp +223 -0
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/EventEmitters.h +183 -0
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/Props.cpp +65 -0
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/Props.h +1086 -61
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/RCTComponentViewHelpers.h +181 -2
- 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 +41 -9
- 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 +27 -6
- 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 +6 -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 +50 -16
- 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 +42 -0
- package/ios/styles/StyleConfig.mm +216 -0
- package/ios/utils/BlockquoteBorder.h +6 -0
- package/ios/utils/BlockquoteBorder.m +249 -52
- package/ios/utils/CodeBackground.m +3 -65
- package/ios/utils/CodeBlockBackground.m +16 -2
- package/ios/utils/ENRMAtomicSize.h +65 -0
- package/ios/utils/ENRMBlockMenu.h +66 -0
- package/ios/utils/ENRMChipDrawing.h +24 -0
- package/ios/utils/ENRMChipDrawing.m +83 -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/ENRMLinkChip.h +70 -0
- package/ios/utils/ENRMLinkChip.m +213 -0
- package/ios/utils/ENRMLinkLayout.h +50 -0
- package/ios/utils/ENRMLinkLayout.m +45 -0
- 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/ENRMSelectionChange.h +120 -0
- package/ios/utils/ENRMSelectionChange.m +282 -0
- package/ios/utils/ENRMTextViewSetup.h +35 -17
- package/ios/utils/EditMenuUtils+macOS.m +4 -1
- package/ios/utils/EditMenuUtils.h +35 -6
- package/ios/utils/EditMenuUtils.m +188 -11
- package/ios/utils/HTMLGenerator.m +2 -1
- 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/MarkdownAccessibilityElementBuilder.m +3 -1
- package/ios/utils/MarkdownExtractor.m +2 -1
- package/ios/utils/ParagraphStyleUtils.h +5 -0
- package/ios/utils/ParagraphStyleUtils.m +77 -17
- package/ios/utils/RTFExportUtils.m +2 -0
- 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 +110 -1
- package/ios/utils/TaskListTapUtils.m +24 -0
- package/ios/utils/TextViewLayoutManager.mm +3 -0
- package/ios/views/ENRMCodeBlockContainerView.h +60 -0
- package/ios/views/ENRMCodeBlockContainerView.m +569 -0
- package/ios/views/ENRMMathContainerView.h +23 -0
- package/ios/views/ENRMMathContainerView.m +87 -20
- package/ios/views/TableContainerView.h +32 -0
- package/ios/views/TableContainerView.m +291 -175
- package/jest.d.ts +1 -0
- package/jest.js +5 -0
- package/lib/module/EnrichedMarkdownNativeComponent.ts +203 -1
- 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 +204 -1
- 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 +205 -0
- package/lib/module/jest/index.js.map +1 -0
- package/lib/module/native/EnrichedMarkdownText.js +199 -15
- package/lib/module/native/EnrichedMarkdownText.js.map +1 -1
- package/lib/module/normalizeMarkdownStyle.js +98 -23
- package/lib/module/normalizeMarkdownStyle.js.map +1 -1
- package/lib/module/normalizeMarkdownStyle.web.js +73 -22
- 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 +15 -8
- 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 +102 -3
- 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 +101 -6
- package/lib/module/web/styles.js.map +1 -1
- package/lib/module/web/utils.js +14 -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 +185 -2
- 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 +185 -2
- 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 +3 -3
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/index.web.d.ts +2 -2
- 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 +5 -5
- 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 +122 -5
- package/lib/typescript/src/types/MarkdownStyle.d.ts.map +1 -1
- package/lib/typescript/src/types/MarkdownStyleInternal.d.ts +39 -0
- package/lib/typescript/src/types/MarkdownStyleInternal.d.ts.map +1 -1
- package/lib/typescript/src/types/MarkdownTextProps.d.ts +207 -10
- package/lib/typescript/src/types/MarkdownTextProps.d.ts.map +1 -1
- package/lib/typescript/src/types/MarkdownTextProps.web.d.ts +60 -1
- package/lib/typescript/src/types/MarkdownTextProps.web.d.ts.map +1 -1
- package/lib/typescript/src/types/events.d.ts +85 -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 +10 -2
- package/lib/typescript/src/web/types.d.ts.map +1 -1
- package/lib/typescript/src/web/utils.d.ts +4 -0
- 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 +203 -1
- package/src/EnrichedMarkdownTextInput.tsx +159 -8
- package/src/EnrichedMarkdownTextInputNativeComponent.ts +78 -5
- package/src/EnrichedMarkdownTextNativeComponent.ts +204 -1
- package/src/headingDefaults.ts +21 -0
- package/src/index.tsx +15 -0
- package/src/index.web.tsx +6 -1
- package/src/jest/index.tsx +236 -0
- package/src/native/EnrichedMarkdownText.tsx +260 -11
- package/src/normalizeMarkdownStyle.ts +117 -16
- package/src/normalizeMarkdownStyle.web.ts +76 -15
- package/src/normalizeMarkdownTextInputStyle.ts +110 -35
- package/src/normalizeMenuItem.ts +1 -1
- package/src/types/MarkdownStyle.ts +125 -5
- package/src/types/MarkdownStyleInternal.ts +51 -0
- package/src/types/MarkdownTextProps.ts +215 -10
- package/src/types/MarkdownTextProps.web.ts +62 -1
- package/src/types/events.ts +90 -0
- package/src/utils/textInputState.ts +35 -0
- package/src/web/EnrichedMarkdownText.tsx +26 -5
- package/src/web/parseMarkdown.ts +6 -2
- package/src/web/renderers/InlineRenderers.tsx +116 -3
- package/src/web/renderers/ListRenderers.tsx +14 -2
- package/src/web/renderers/index.tsx +6 -2
- package/src/web/styles.ts +114 -5
- package/src/web/types.ts +10 -1
- package/src/web/utils.ts +9 -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) {
|
|
@@ -861,6 +997,11 @@ struct EnrichedMarkdownMarkdownStyleLinkStruct {
|
|
|
861
997
|
SharedColor color{};
|
|
862
998
|
bool underline{false};
|
|
863
999
|
SharedColor backgroundColor{};
|
|
1000
|
+
Float borderRadius{0.0};
|
|
1001
|
+
Float paddingHorizontal{0.0};
|
|
1002
|
+
Float paddingVertical{0.0};
|
|
1003
|
+
SharedColor borderColor{};
|
|
1004
|
+
Float borderWidth{0.0};
|
|
864
1005
|
|
|
865
1006
|
|
|
866
1007
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -872,6 +1013,11 @@ struct EnrichedMarkdownMarkdownStyleLinkStruct {
|
|
|
872
1013
|
result["color"] = ::facebook::react::toDynamic(color);
|
|
873
1014
|
result["underline"] = underline;
|
|
874
1015
|
result["backgroundColor"] = ::facebook::react::toDynamic(backgroundColor);
|
|
1016
|
+
result["borderRadius"] = borderRadius;
|
|
1017
|
+
result["paddingHorizontal"] = paddingHorizontal;
|
|
1018
|
+
result["paddingVertical"] = paddingVertical;
|
|
1019
|
+
result["borderColor"] = ::facebook::react::toDynamic(borderColor);
|
|
1020
|
+
result["borderWidth"] = borderWidth;
|
|
875
1021
|
return result;
|
|
876
1022
|
}
|
|
877
1023
|
#endif
|
|
@@ -896,6 +1042,26 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
896
1042
|
if (tmp_backgroundColor != map.end()) {
|
|
897
1043
|
fromRawValue(context, tmp_backgroundColor->second, result.backgroundColor);
|
|
898
1044
|
}
|
|
1045
|
+
auto tmp_borderRadius = map.find("borderRadius");
|
|
1046
|
+
if (tmp_borderRadius != map.end()) {
|
|
1047
|
+
fromRawValue(context, tmp_borderRadius->second, result.borderRadius);
|
|
1048
|
+
}
|
|
1049
|
+
auto tmp_paddingHorizontal = map.find("paddingHorizontal");
|
|
1050
|
+
if (tmp_paddingHorizontal != map.end()) {
|
|
1051
|
+
fromRawValue(context, tmp_paddingHorizontal->second, result.paddingHorizontal);
|
|
1052
|
+
}
|
|
1053
|
+
auto tmp_paddingVertical = map.find("paddingVertical");
|
|
1054
|
+
if (tmp_paddingVertical != map.end()) {
|
|
1055
|
+
fromRawValue(context, tmp_paddingVertical->second, result.paddingVertical);
|
|
1056
|
+
}
|
|
1057
|
+
auto tmp_borderColor = map.find("borderColor");
|
|
1058
|
+
if (tmp_borderColor != map.end()) {
|
|
1059
|
+
fromRawValue(context, tmp_borderColor->second, result.borderColor);
|
|
1060
|
+
}
|
|
1061
|
+
auto tmp_borderWidth = map.find("borderWidth");
|
|
1062
|
+
if (tmp_borderWidth != map.end()) {
|
|
1063
|
+
fromRawValue(context, tmp_borderWidth->second, result.borderWidth);
|
|
1064
|
+
}
|
|
899
1065
|
}
|
|
900
1066
|
|
|
901
1067
|
static inline std::string toString(const EnrichedMarkdownMarkdownStyleLinkStruct &value) {
|
|
@@ -913,6 +1079,11 @@ struct EnrichedMarkdownMarkdownStyleLinkVariantsStruct {
|
|
|
913
1079
|
SharedColor color{};
|
|
914
1080
|
bool underline{false};
|
|
915
1081
|
SharedColor backgroundColor{};
|
|
1082
|
+
Float borderRadius{0.0};
|
|
1083
|
+
Float paddingHorizontal{0.0};
|
|
1084
|
+
Float paddingVertical{0.0};
|
|
1085
|
+
SharedColor borderColor{};
|
|
1086
|
+
Float borderWidth{0.0};
|
|
916
1087
|
|
|
917
1088
|
|
|
918
1089
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -924,6 +1095,11 @@ struct EnrichedMarkdownMarkdownStyleLinkVariantsStruct {
|
|
|
924
1095
|
result["color"] = ::facebook::react::toDynamic(color);
|
|
925
1096
|
result["underline"] = underline;
|
|
926
1097
|
result["backgroundColor"] = ::facebook::react::toDynamic(backgroundColor);
|
|
1098
|
+
result["borderRadius"] = borderRadius;
|
|
1099
|
+
result["paddingHorizontal"] = paddingHorizontal;
|
|
1100
|
+
result["paddingVertical"] = paddingVertical;
|
|
1101
|
+
result["borderColor"] = ::facebook::react::toDynamic(borderColor);
|
|
1102
|
+
result["borderWidth"] = borderWidth;
|
|
927
1103
|
return result;
|
|
928
1104
|
}
|
|
929
1105
|
#endif
|
|
@@ -948,6 +1124,26 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
948
1124
|
if (tmp_backgroundColor != map.end()) {
|
|
949
1125
|
fromRawValue(context, tmp_backgroundColor->second, result.backgroundColor);
|
|
950
1126
|
}
|
|
1127
|
+
auto tmp_borderRadius = map.find("borderRadius");
|
|
1128
|
+
if (tmp_borderRadius != map.end()) {
|
|
1129
|
+
fromRawValue(context, tmp_borderRadius->second, result.borderRadius);
|
|
1130
|
+
}
|
|
1131
|
+
auto tmp_paddingHorizontal = map.find("paddingHorizontal");
|
|
1132
|
+
if (tmp_paddingHorizontal != map.end()) {
|
|
1133
|
+
fromRawValue(context, tmp_paddingHorizontal->second, result.paddingHorizontal);
|
|
1134
|
+
}
|
|
1135
|
+
auto tmp_paddingVertical = map.find("paddingVertical");
|
|
1136
|
+
if (tmp_paddingVertical != map.end()) {
|
|
1137
|
+
fromRawValue(context, tmp_paddingVertical->second, result.paddingVertical);
|
|
1138
|
+
}
|
|
1139
|
+
auto tmp_borderColor = map.find("borderColor");
|
|
1140
|
+
if (tmp_borderColor != map.end()) {
|
|
1141
|
+
fromRawValue(context, tmp_borderColor->second, result.borderColor);
|
|
1142
|
+
}
|
|
1143
|
+
auto tmp_borderWidth = map.find("borderWidth");
|
|
1144
|
+
if (tmp_borderWidth != map.end()) {
|
|
1145
|
+
fromRawValue(context, tmp_borderWidth->second, result.borderWidth);
|
|
1146
|
+
}
|
|
951
1147
|
}
|
|
952
1148
|
|
|
953
1149
|
static inline std::string toString(const EnrichedMarkdownMarkdownStyleLinkVariantsStruct &value) {
|
|
@@ -1190,6 +1386,9 @@ static inline folly::dynamic toDynamic(const EnrichedMarkdownMarkdownStyleCodeSt
|
|
|
1190
1386
|
|
|
1191
1387
|
struct EnrichedMarkdownMarkdownStyleImageStruct {
|
|
1192
1388
|
Float height{0.0};
|
|
1389
|
+
Float maxHeight{0.0};
|
|
1390
|
+
Float aspectRatio{0.0};
|
|
1391
|
+
std::string resizeMode{};
|
|
1193
1392
|
Float borderRadius{0.0};
|
|
1194
1393
|
Float marginTop{0.0};
|
|
1195
1394
|
Float marginBottom{0.0};
|
|
@@ -1201,6 +1400,9 @@ struct EnrichedMarkdownMarkdownStyleImageStruct {
|
|
|
1201
1400
|
folly::dynamic toDynamic() const {
|
|
1202
1401
|
folly::dynamic result = folly::dynamic::object();
|
|
1203
1402
|
result["height"] = height;
|
|
1403
|
+
result["maxHeight"] = maxHeight;
|
|
1404
|
+
result["aspectRatio"] = aspectRatio;
|
|
1405
|
+
result["resizeMode"] = resizeMode;
|
|
1204
1406
|
result["borderRadius"] = borderRadius;
|
|
1205
1407
|
result["marginTop"] = marginTop;
|
|
1206
1408
|
result["marginBottom"] = marginBottom;
|
|
@@ -1216,6 +1418,18 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
1216
1418
|
if (tmp_height != map.end()) {
|
|
1217
1419
|
fromRawValue(context, tmp_height->second, result.height);
|
|
1218
1420
|
}
|
|
1421
|
+
auto tmp_maxHeight = map.find("maxHeight");
|
|
1422
|
+
if (tmp_maxHeight != map.end()) {
|
|
1423
|
+
fromRawValue(context, tmp_maxHeight->second, result.maxHeight);
|
|
1424
|
+
}
|
|
1425
|
+
auto tmp_aspectRatio = map.find("aspectRatio");
|
|
1426
|
+
if (tmp_aspectRatio != map.end()) {
|
|
1427
|
+
fromRawValue(context, tmp_aspectRatio->second, result.aspectRatio);
|
|
1428
|
+
}
|
|
1429
|
+
auto tmp_resizeMode = map.find("resizeMode");
|
|
1430
|
+
if (tmp_resizeMode != map.end()) {
|
|
1431
|
+
fromRawValue(context, tmp_resizeMode->second, result.resizeMode);
|
|
1432
|
+
}
|
|
1219
1433
|
auto tmp_borderRadius = map.find("borderRadius");
|
|
1220
1434
|
if (tmp_borderRadius != map.end()) {
|
|
1221
1435
|
fromRawValue(context, tmp_borderRadius->second, result.borderRadius);
|
|
@@ -1344,6 +1558,8 @@ struct EnrichedMarkdownMarkdownStyleTableStruct {
|
|
|
1344
1558
|
Float borderRadius{0.0};
|
|
1345
1559
|
Float cellPaddingHorizontal{0.0};
|
|
1346
1560
|
Float cellPaddingVertical{0.0};
|
|
1561
|
+
Float horizontalOverflow{0.0};
|
|
1562
|
+
std::string align{};
|
|
1347
1563
|
|
|
1348
1564
|
|
|
1349
1565
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -1368,6 +1584,8 @@ struct EnrichedMarkdownMarkdownStyleTableStruct {
|
|
|
1368
1584
|
result["borderRadius"] = borderRadius;
|
|
1369
1585
|
result["cellPaddingHorizontal"] = cellPaddingHorizontal;
|
|
1370
1586
|
result["cellPaddingVertical"] = cellPaddingVertical;
|
|
1587
|
+
result["horizontalOverflow"] = horizontalOverflow;
|
|
1588
|
+
result["align"] = align;
|
|
1371
1589
|
return result;
|
|
1372
1590
|
}
|
|
1373
1591
|
#endif
|
|
@@ -1444,6 +1662,14 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
1444
1662
|
if (tmp_cellPaddingVertical != map.end()) {
|
|
1445
1663
|
fromRawValue(context, tmp_cellPaddingVertical->second, result.cellPaddingVertical);
|
|
1446
1664
|
}
|
|
1665
|
+
auto tmp_horizontalOverflow = map.find("horizontalOverflow");
|
|
1666
|
+
if (tmp_horizontalOverflow != map.end()) {
|
|
1667
|
+
fromRawValue(context, tmp_horizontalOverflow->second, result.horizontalOverflow);
|
|
1668
|
+
}
|
|
1669
|
+
auto tmp_align = map.find("align");
|
|
1670
|
+
if (tmp_align != map.end()) {
|
|
1671
|
+
fromRawValue(context, tmp_align->second, result.align);
|
|
1672
|
+
}
|
|
1447
1673
|
}
|
|
1448
1674
|
|
|
1449
1675
|
static inline std::string toString(const EnrichedMarkdownMarkdownStyleTableStruct &value) {
|
|
@@ -1535,6 +1761,7 @@ struct EnrichedMarkdownMarkdownStyleMathStruct {
|
|
|
1535
1761
|
Float marginBottom{0.0};
|
|
1536
1762
|
std::string textAlign{};
|
|
1537
1763
|
std::string fontWeight{};
|
|
1764
|
+
Float glyphOverflow{0.0};
|
|
1538
1765
|
|
|
1539
1766
|
|
|
1540
1767
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -1550,6 +1777,7 @@ struct EnrichedMarkdownMarkdownStyleMathStruct {
|
|
|
1550
1777
|
result["marginBottom"] = marginBottom;
|
|
1551
1778
|
result["textAlign"] = textAlign;
|
|
1552
1779
|
result["fontWeight"] = fontWeight;
|
|
1780
|
+
result["glyphOverflow"] = glyphOverflow;
|
|
1553
1781
|
return result;
|
|
1554
1782
|
}
|
|
1555
1783
|
#endif
|
|
@@ -1590,6 +1818,10 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
1590
1818
|
if (tmp_fontWeight != map.end()) {
|
|
1591
1819
|
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
1592
1820
|
}
|
|
1821
|
+
auto tmp_glyphOverflow = map.find("glyphOverflow");
|
|
1822
|
+
if (tmp_glyphOverflow != map.end()) {
|
|
1823
|
+
fromRawValue(context, tmp_glyphOverflow->second, result.glyphOverflow);
|
|
1824
|
+
}
|
|
1593
1825
|
}
|
|
1594
1826
|
|
|
1595
1827
|
static inline std::string toString(const EnrichedMarkdownMarkdownStyleMathStruct &value) {
|
|
@@ -1606,6 +1838,7 @@ struct EnrichedMarkdownMarkdownStyleInlineMathStruct {
|
|
|
1606
1838
|
SharedColor color{};
|
|
1607
1839
|
Float paddingVertical{0.0};
|
|
1608
1840
|
std::string fontWeight{};
|
|
1841
|
+
Float glyphOverflow{0.0};
|
|
1609
1842
|
|
|
1610
1843
|
|
|
1611
1844
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -1616,6 +1849,7 @@ struct EnrichedMarkdownMarkdownStyleInlineMathStruct {
|
|
|
1616
1849
|
result["color"] = ::facebook::react::toDynamic(color);
|
|
1617
1850
|
result["paddingVertical"] = paddingVertical;
|
|
1618
1851
|
result["fontWeight"] = fontWeight;
|
|
1852
|
+
result["glyphOverflow"] = glyphOverflow;
|
|
1619
1853
|
return result;
|
|
1620
1854
|
}
|
|
1621
1855
|
#endif
|
|
@@ -1636,6 +1870,10 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
1636
1870
|
if (tmp_fontWeight != map.end()) {
|
|
1637
1871
|
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
1638
1872
|
}
|
|
1873
|
+
auto tmp_glyphOverflow = map.find("glyphOverflow");
|
|
1874
|
+
if (tmp_glyphOverflow != map.end()) {
|
|
1875
|
+
fromRawValue(context, tmp_glyphOverflow->second, result.glyphOverflow);
|
|
1876
|
+
}
|
|
1639
1877
|
}
|
|
1640
1878
|
|
|
1641
1879
|
static inline std::string toString(const EnrichedMarkdownMarkdownStyleInlineMathStruct &value) {
|
|
@@ -2090,6 +2328,7 @@ struct EnrichedMarkdownMd4cFlagsStruct {
|
|
|
2090
2328
|
bool subscript{false};
|
|
2091
2329
|
bool latexMath{false};
|
|
2092
2330
|
bool highlight{false};
|
|
2331
|
+
bool hardSoftBreaks{false};
|
|
2093
2332
|
|
|
2094
2333
|
|
|
2095
2334
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -2102,6 +2341,7 @@ struct EnrichedMarkdownMd4cFlagsStruct {
|
|
|
2102
2341
|
result["subscript"] = subscript;
|
|
2103
2342
|
result["latexMath"] = latexMath;
|
|
2104
2343
|
result["highlight"] = highlight;
|
|
2344
|
+
result["hardSoftBreaks"] = hardSoftBreaks;
|
|
2105
2345
|
return result;
|
|
2106
2346
|
}
|
|
2107
2347
|
#endif
|
|
@@ -2130,6 +2370,10 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
2130
2370
|
if (tmp_highlight != map.end()) {
|
|
2131
2371
|
fromRawValue(context, tmp_highlight->second, result.highlight);
|
|
2132
2372
|
}
|
|
2373
|
+
auto tmp_hardSoftBreaks = map.find("hardSoftBreaks");
|
|
2374
|
+
if (tmp_hardSoftBreaks != map.end()) {
|
|
2375
|
+
fromRawValue(context, tmp_hardSoftBreaks->second, result.hardSoftBreaks);
|
|
2376
|
+
}
|
|
2133
2377
|
}
|
|
2134
2378
|
|
|
2135
2379
|
static inline std::string toString(const EnrichedMarkdownMd4cFlagsStruct &value) {
|
|
@@ -2144,6 +2388,7 @@ static inline folly::dynamic toDynamic(const EnrichedMarkdownMd4cFlagsStruct &va
|
|
|
2144
2388
|
|
|
2145
2389
|
struct EnrichedMarkdownStreamingConfigStruct {
|
|
2146
2390
|
std::string tableMode{};
|
|
2391
|
+
std::string codeBlockMode{};
|
|
2147
2392
|
|
|
2148
2393
|
|
|
2149
2394
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -2152,6 +2397,7 @@ struct EnrichedMarkdownStreamingConfigStruct {
|
|
|
2152
2397
|
folly::dynamic toDynamic() const {
|
|
2153
2398
|
folly::dynamic result = folly::dynamic::object();
|
|
2154
2399
|
result["tableMode"] = tableMode;
|
|
2400
|
+
result["codeBlockMode"] = codeBlockMode;
|
|
2155
2401
|
return result;
|
|
2156
2402
|
}
|
|
2157
2403
|
#endif
|
|
@@ -2164,6 +2410,10 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
2164
2410
|
if (tmp_tableMode != map.end()) {
|
|
2165
2411
|
fromRawValue(context, tmp_tableMode->second, result.tableMode);
|
|
2166
2412
|
}
|
|
2413
|
+
auto tmp_codeBlockMode = map.find("codeBlockMode");
|
|
2414
|
+
if (tmp_codeBlockMode != map.end()) {
|
|
2415
|
+
fromRawValue(context, tmp_codeBlockMode->second, result.codeBlockMode);
|
|
2416
|
+
}
|
|
2167
2417
|
}
|
|
2168
2418
|
|
|
2169
2419
|
static inline std::string toString(const EnrichedMarkdownStreamingConfigStruct &value) {
|
|
@@ -2226,6 +2476,56 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
2226
2476
|
}
|
|
2227
2477
|
|
|
2228
2478
|
|
|
2479
|
+
struct EnrichedMarkdownImageRequestHeadersStruct {
|
|
2480
|
+
std::string name{};
|
|
2481
|
+
std::string value{};
|
|
2482
|
+
|
|
2483
|
+
|
|
2484
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
2485
|
+
bool operator==(const EnrichedMarkdownImageRequestHeadersStruct&) const = default;
|
|
2486
|
+
|
|
2487
|
+
folly::dynamic toDynamic() const {
|
|
2488
|
+
folly::dynamic result = folly::dynamic::object();
|
|
2489
|
+
result["name"] = name;
|
|
2490
|
+
result["value"] = value;
|
|
2491
|
+
return result;
|
|
2492
|
+
}
|
|
2493
|
+
#endif
|
|
2494
|
+
};
|
|
2495
|
+
|
|
2496
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownImageRequestHeadersStruct &result) {
|
|
2497
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
2498
|
+
|
|
2499
|
+
auto tmp_name = map.find("name");
|
|
2500
|
+
if (tmp_name != map.end()) {
|
|
2501
|
+
fromRawValue(context, tmp_name->second, result.name);
|
|
2502
|
+
}
|
|
2503
|
+
auto tmp_value = map.find("value");
|
|
2504
|
+
if (tmp_value != map.end()) {
|
|
2505
|
+
fromRawValue(context, tmp_value->second, result.value);
|
|
2506
|
+
}
|
|
2507
|
+
}
|
|
2508
|
+
|
|
2509
|
+
static inline std::string toString(const EnrichedMarkdownImageRequestHeadersStruct &value) {
|
|
2510
|
+
return "[Object EnrichedMarkdownImageRequestHeadersStruct]";
|
|
2511
|
+
}
|
|
2512
|
+
|
|
2513
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
2514
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownImageRequestHeadersStruct &value) {
|
|
2515
|
+
return value.toDynamic();
|
|
2516
|
+
}
|
|
2517
|
+
#endif
|
|
2518
|
+
|
|
2519
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<EnrichedMarkdownImageRequestHeadersStruct> &result) {
|
|
2520
|
+
auto items = (std::vector<RawValue>)value;
|
|
2521
|
+
for (const auto &item : items) {
|
|
2522
|
+
EnrichedMarkdownImageRequestHeadersStruct newItem;
|
|
2523
|
+
fromRawValue(context, item, newItem);
|
|
2524
|
+
result.emplace_back(newItem);
|
|
2525
|
+
}
|
|
2526
|
+
}
|
|
2527
|
+
|
|
2528
|
+
|
|
2229
2529
|
struct EnrichedMarkdownSelectionMenuConfigStruct {
|
|
2230
2530
|
bool copyAsMarkdown{false};
|
|
2231
2531
|
bool copyImageUrl{false};
|
|
@@ -2234,6 +2534,11 @@ struct EnrichedMarkdownSelectionMenuConfigStruct {
|
|
|
2234
2534
|
std::string copyImageUrlLabel{};
|
|
2235
2535
|
std::string copyImageUrlsLabel{};
|
|
2236
2536
|
std::vector<std::string> copyImageUrlPluralTemplates{};
|
|
2537
|
+
bool copyEnabled{false};
|
|
2538
|
+
bool copyFormatMarkdown{false};
|
|
2539
|
+
bool systemItemsNone{false};
|
|
2540
|
+
bool codeBlockCopyButton{false};
|
|
2541
|
+
bool interceptCopy{false};
|
|
2237
2542
|
|
|
2238
2543
|
|
|
2239
2544
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -2248,6 +2553,11 @@ struct EnrichedMarkdownSelectionMenuConfigStruct {
|
|
|
2248
2553
|
result["copyImageUrlLabel"] = copyImageUrlLabel;
|
|
2249
2554
|
result["copyImageUrlsLabel"] = copyImageUrlsLabel;
|
|
2250
2555
|
result["copyImageUrlPluralTemplates"] = ::facebook::react::toDynamic(copyImageUrlPluralTemplates);
|
|
2556
|
+
result["copyEnabled"] = copyEnabled;
|
|
2557
|
+
result["copyFormatMarkdown"] = copyFormatMarkdown;
|
|
2558
|
+
result["systemItemsNone"] = systemItemsNone;
|
|
2559
|
+
result["codeBlockCopyButton"] = codeBlockCopyButton;
|
|
2560
|
+
result["interceptCopy"] = interceptCopy;
|
|
2251
2561
|
return result;
|
|
2252
2562
|
}
|
|
2253
2563
|
#endif
|
|
@@ -2284,6 +2594,26 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
2284
2594
|
if (tmp_copyImageUrlPluralTemplates != map.end()) {
|
|
2285
2595
|
fromRawValue(context, tmp_copyImageUrlPluralTemplates->second, result.copyImageUrlPluralTemplates);
|
|
2286
2596
|
}
|
|
2597
|
+
auto tmp_copyEnabled = map.find("copyEnabled");
|
|
2598
|
+
if (tmp_copyEnabled != map.end()) {
|
|
2599
|
+
fromRawValue(context, tmp_copyEnabled->second, result.copyEnabled);
|
|
2600
|
+
}
|
|
2601
|
+
auto tmp_copyFormatMarkdown = map.find("copyFormatMarkdown");
|
|
2602
|
+
if (tmp_copyFormatMarkdown != map.end()) {
|
|
2603
|
+
fromRawValue(context, tmp_copyFormatMarkdown->second, result.copyFormatMarkdown);
|
|
2604
|
+
}
|
|
2605
|
+
auto tmp_systemItemsNone = map.find("systemItemsNone");
|
|
2606
|
+
if (tmp_systemItemsNone != map.end()) {
|
|
2607
|
+
fromRawValue(context, tmp_systemItemsNone->second, result.systemItemsNone);
|
|
2608
|
+
}
|
|
2609
|
+
auto tmp_codeBlockCopyButton = map.find("codeBlockCopyButton");
|
|
2610
|
+
if (tmp_codeBlockCopyButton != map.end()) {
|
|
2611
|
+
fromRawValue(context, tmp_codeBlockCopyButton->second, result.codeBlockCopyButton);
|
|
2612
|
+
}
|
|
2613
|
+
auto tmp_interceptCopy = map.find("interceptCopy");
|
|
2614
|
+
if (tmp_interceptCopy != map.end()) {
|
|
2615
|
+
fromRawValue(context, tmp_interceptCopy->second, result.interceptCopy);
|
|
2616
|
+
}
|
|
2287
2617
|
}
|
|
2288
2618
|
|
|
2289
2619
|
static inline std::string toString(const EnrichedMarkdownSelectionMenuConfigStruct &value) {
|
|
@@ -2568,7 +2898,11 @@ class EnrichedMarkdownProps final : public ViewProps {
|
|
|
2568
2898
|
|
|
2569
2899
|
std::string markdown{};
|
|
2570
2900
|
EnrichedMarkdownMarkdownStyleStruct markdownStyle{};
|
|
2901
|
+
bool emitLinkLayout{false};
|
|
2902
|
+
bool emitSelectionChange{false};
|
|
2903
|
+
bool enableTaskListItemToggle{true};
|
|
2571
2904
|
bool enableLinkPreview{true};
|
|
2905
|
+
bool linkLongPressSelects{false};
|
|
2572
2906
|
bool selectable{false};
|
|
2573
2907
|
SharedColor selectionColor{};
|
|
2574
2908
|
SharedColor selectionHandleColor{};
|
|
@@ -2579,7 +2913,9 @@ class EnrichedMarkdownProps final : public ViewProps {
|
|
|
2579
2913
|
bool streamingAnimation{false};
|
|
2580
2914
|
EnrichedMarkdownStreamingConfigStruct streamingConfig{};
|
|
2581
2915
|
std::string spoilerOverlay{std::string{"particles"}};
|
|
2916
|
+
bool contextMenuHidden{false};
|
|
2582
2917
|
std::vector<EnrichedMarkdownContextMenuItemsStruct> contextMenuItems{};
|
|
2918
|
+
std::vector<EnrichedMarkdownImageRequestHeadersStruct> imageRequestHeaders{};
|
|
2583
2919
|
EnrichedMarkdownSelectionMenuConfigStruct selectionMenuConfig{};
|
|
2584
2920
|
EnrichedMarkdownAccessibilityLabelsStruct accessibilityLabels{};
|
|
2585
2921
|
std::string textBreakStrategy{std::string{"highQuality"}};
|
|
@@ -2741,77 +3077,387 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
2741
3077
|
if (tmp_color != map.end()) {
|
|
2742
3078
|
fromRawValue(context, tmp_color->second, result.color);
|
|
2743
3079
|
}
|
|
2744
|
-
auto tmp_underline = map.find("underline");
|
|
2745
|
-
if (tmp_underline != map.end()) {
|
|
2746
|
-
fromRawValue(context, tmp_underline->second, result.underline);
|
|
2747
|
-
}
|
|
2748
|
-
auto tmp_backgroundColor = map.find("backgroundColor");
|
|
2749
|
-
if (tmp_backgroundColor != map.end()) {
|
|
2750
|
-
fromRawValue(context, tmp_backgroundColor->second, result.backgroundColor);
|
|
2751
|
-
}
|
|
3080
|
+
auto tmp_underline = map.find("underline");
|
|
3081
|
+
if (tmp_underline != map.end()) {
|
|
3082
|
+
fromRawValue(context, tmp_underline->second, result.underline);
|
|
3083
|
+
}
|
|
3084
|
+
auto tmp_backgroundColor = map.find("backgroundColor");
|
|
3085
|
+
if (tmp_backgroundColor != map.end()) {
|
|
3086
|
+
fromRawValue(context, tmp_backgroundColor->second, result.backgroundColor);
|
|
3087
|
+
}
|
|
3088
|
+
}
|
|
3089
|
+
|
|
3090
|
+
static inline std::string toString(const EnrichedMarkdownTextInputMarkdownStyleLinkVariantsStruct &value) {
|
|
3091
|
+
return "[Object EnrichedMarkdownTextInputMarkdownStyleLinkVariantsStruct]";
|
|
3092
|
+
}
|
|
3093
|
+
|
|
3094
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
3095
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextInputMarkdownStyleLinkVariantsStruct &value) {
|
|
3096
|
+
return value.toDynamic();
|
|
3097
|
+
}
|
|
3098
|
+
#endif
|
|
3099
|
+
|
|
3100
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<EnrichedMarkdownTextInputMarkdownStyleLinkVariantsStruct> &result) {
|
|
3101
|
+
auto items = (std::vector<RawValue>)value;
|
|
3102
|
+
for (const auto &item : items) {
|
|
3103
|
+
EnrichedMarkdownTextInputMarkdownStyleLinkVariantsStruct newItem;
|
|
3104
|
+
fromRawValue(context, item, newItem);
|
|
3105
|
+
result.emplace_back(newItem);
|
|
3106
|
+
}
|
|
3107
|
+
}
|
|
3108
|
+
|
|
3109
|
+
|
|
3110
|
+
struct EnrichedMarkdownTextInputMarkdownStyleSpoilerStruct {
|
|
3111
|
+
SharedColor color{};
|
|
3112
|
+
SharedColor backgroundColor{};
|
|
3113
|
+
|
|
3114
|
+
|
|
3115
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
3116
|
+
bool operator==(const EnrichedMarkdownTextInputMarkdownStyleSpoilerStruct&) const = default;
|
|
3117
|
+
|
|
3118
|
+
folly::dynamic toDynamic() const {
|
|
3119
|
+
folly::dynamic result = folly::dynamic::object();
|
|
3120
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
3121
|
+
result["backgroundColor"] = ::facebook::react::toDynamic(backgroundColor);
|
|
3122
|
+
return result;
|
|
3123
|
+
}
|
|
3124
|
+
#endif
|
|
3125
|
+
};
|
|
3126
|
+
|
|
3127
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextInputMarkdownStyleSpoilerStruct &result) {
|
|
3128
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
3129
|
+
|
|
3130
|
+
auto tmp_color = map.find("color");
|
|
3131
|
+
if (tmp_color != map.end()) {
|
|
3132
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
3133
|
+
}
|
|
3134
|
+
auto tmp_backgroundColor = map.find("backgroundColor");
|
|
3135
|
+
if (tmp_backgroundColor != map.end()) {
|
|
3136
|
+
fromRawValue(context, tmp_backgroundColor->second, result.backgroundColor);
|
|
3137
|
+
}
|
|
3138
|
+
}
|
|
3139
|
+
|
|
3140
|
+
static inline std::string toString(const EnrichedMarkdownTextInputMarkdownStyleSpoilerStruct &value) {
|
|
3141
|
+
return "[Object EnrichedMarkdownTextInputMarkdownStyleSpoilerStruct]";
|
|
3142
|
+
}
|
|
3143
|
+
|
|
3144
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
3145
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextInputMarkdownStyleSpoilerStruct &value) {
|
|
3146
|
+
return value.toDynamic();
|
|
3147
|
+
}
|
|
3148
|
+
#endif
|
|
3149
|
+
|
|
3150
|
+
struct EnrichedMarkdownTextInputMarkdownStyleH1Struct {
|
|
3151
|
+
Float fontSize{0.0};
|
|
3152
|
+
std::string fontWeight{};
|
|
3153
|
+
SharedColor color{};
|
|
3154
|
+
|
|
3155
|
+
|
|
3156
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
3157
|
+
bool operator==(const EnrichedMarkdownTextInputMarkdownStyleH1Struct&) const = default;
|
|
3158
|
+
|
|
3159
|
+
folly::dynamic toDynamic() const {
|
|
3160
|
+
folly::dynamic result = folly::dynamic::object();
|
|
3161
|
+
result["fontSize"] = fontSize;
|
|
3162
|
+
result["fontWeight"] = fontWeight;
|
|
3163
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
3164
|
+
return result;
|
|
3165
|
+
}
|
|
3166
|
+
#endif
|
|
3167
|
+
};
|
|
3168
|
+
|
|
3169
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextInputMarkdownStyleH1Struct &result) {
|
|
3170
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
3171
|
+
|
|
3172
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
3173
|
+
if (tmp_fontSize != map.end()) {
|
|
3174
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
3175
|
+
}
|
|
3176
|
+
auto tmp_fontWeight = map.find("fontWeight");
|
|
3177
|
+
if (tmp_fontWeight != map.end()) {
|
|
3178
|
+
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
3179
|
+
}
|
|
3180
|
+
auto tmp_color = map.find("color");
|
|
3181
|
+
if (tmp_color != map.end()) {
|
|
3182
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
3183
|
+
}
|
|
3184
|
+
}
|
|
3185
|
+
|
|
3186
|
+
static inline std::string toString(const EnrichedMarkdownTextInputMarkdownStyleH1Struct &value) {
|
|
3187
|
+
return "[Object EnrichedMarkdownTextInputMarkdownStyleH1Struct]";
|
|
3188
|
+
}
|
|
3189
|
+
|
|
3190
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
3191
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextInputMarkdownStyleH1Struct &value) {
|
|
3192
|
+
return value.toDynamic();
|
|
3193
|
+
}
|
|
3194
|
+
#endif
|
|
3195
|
+
|
|
3196
|
+
struct EnrichedMarkdownTextInputMarkdownStyleH2Struct {
|
|
3197
|
+
Float fontSize{0.0};
|
|
3198
|
+
std::string fontWeight{};
|
|
3199
|
+
SharedColor color{};
|
|
3200
|
+
|
|
3201
|
+
|
|
3202
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
3203
|
+
bool operator==(const EnrichedMarkdownTextInputMarkdownStyleH2Struct&) const = default;
|
|
3204
|
+
|
|
3205
|
+
folly::dynamic toDynamic() const {
|
|
3206
|
+
folly::dynamic result = folly::dynamic::object();
|
|
3207
|
+
result["fontSize"] = fontSize;
|
|
3208
|
+
result["fontWeight"] = fontWeight;
|
|
3209
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
3210
|
+
return result;
|
|
3211
|
+
}
|
|
3212
|
+
#endif
|
|
3213
|
+
};
|
|
3214
|
+
|
|
3215
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextInputMarkdownStyleH2Struct &result) {
|
|
3216
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
3217
|
+
|
|
3218
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
3219
|
+
if (tmp_fontSize != map.end()) {
|
|
3220
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
3221
|
+
}
|
|
3222
|
+
auto tmp_fontWeight = map.find("fontWeight");
|
|
3223
|
+
if (tmp_fontWeight != map.end()) {
|
|
3224
|
+
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
3225
|
+
}
|
|
3226
|
+
auto tmp_color = map.find("color");
|
|
3227
|
+
if (tmp_color != map.end()) {
|
|
3228
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
3229
|
+
}
|
|
3230
|
+
}
|
|
3231
|
+
|
|
3232
|
+
static inline std::string toString(const EnrichedMarkdownTextInputMarkdownStyleH2Struct &value) {
|
|
3233
|
+
return "[Object EnrichedMarkdownTextInputMarkdownStyleH2Struct]";
|
|
3234
|
+
}
|
|
3235
|
+
|
|
3236
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
3237
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextInputMarkdownStyleH2Struct &value) {
|
|
3238
|
+
return value.toDynamic();
|
|
3239
|
+
}
|
|
3240
|
+
#endif
|
|
3241
|
+
|
|
3242
|
+
struct EnrichedMarkdownTextInputMarkdownStyleH3Struct {
|
|
3243
|
+
Float fontSize{0.0};
|
|
3244
|
+
std::string fontWeight{};
|
|
3245
|
+
SharedColor color{};
|
|
3246
|
+
|
|
3247
|
+
|
|
3248
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
3249
|
+
bool operator==(const EnrichedMarkdownTextInputMarkdownStyleH3Struct&) const = default;
|
|
3250
|
+
|
|
3251
|
+
folly::dynamic toDynamic() const {
|
|
3252
|
+
folly::dynamic result = folly::dynamic::object();
|
|
3253
|
+
result["fontSize"] = fontSize;
|
|
3254
|
+
result["fontWeight"] = fontWeight;
|
|
3255
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
3256
|
+
return result;
|
|
3257
|
+
}
|
|
3258
|
+
#endif
|
|
3259
|
+
};
|
|
3260
|
+
|
|
3261
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextInputMarkdownStyleH3Struct &result) {
|
|
3262
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
3263
|
+
|
|
3264
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
3265
|
+
if (tmp_fontSize != map.end()) {
|
|
3266
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
3267
|
+
}
|
|
3268
|
+
auto tmp_fontWeight = map.find("fontWeight");
|
|
3269
|
+
if (tmp_fontWeight != map.end()) {
|
|
3270
|
+
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
3271
|
+
}
|
|
3272
|
+
auto tmp_color = map.find("color");
|
|
3273
|
+
if (tmp_color != map.end()) {
|
|
3274
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
3275
|
+
}
|
|
3276
|
+
}
|
|
3277
|
+
|
|
3278
|
+
static inline std::string toString(const EnrichedMarkdownTextInputMarkdownStyleH3Struct &value) {
|
|
3279
|
+
return "[Object EnrichedMarkdownTextInputMarkdownStyleH3Struct]";
|
|
3280
|
+
}
|
|
3281
|
+
|
|
3282
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
3283
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextInputMarkdownStyleH3Struct &value) {
|
|
3284
|
+
return value.toDynamic();
|
|
3285
|
+
}
|
|
3286
|
+
#endif
|
|
3287
|
+
|
|
3288
|
+
struct EnrichedMarkdownTextInputMarkdownStyleH4Struct {
|
|
3289
|
+
Float fontSize{0.0};
|
|
3290
|
+
std::string fontWeight{};
|
|
3291
|
+
SharedColor color{};
|
|
3292
|
+
|
|
3293
|
+
|
|
3294
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
3295
|
+
bool operator==(const EnrichedMarkdownTextInputMarkdownStyleH4Struct&) const = default;
|
|
3296
|
+
|
|
3297
|
+
folly::dynamic toDynamic() const {
|
|
3298
|
+
folly::dynamic result = folly::dynamic::object();
|
|
3299
|
+
result["fontSize"] = fontSize;
|
|
3300
|
+
result["fontWeight"] = fontWeight;
|
|
3301
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
3302
|
+
return result;
|
|
3303
|
+
}
|
|
3304
|
+
#endif
|
|
3305
|
+
};
|
|
3306
|
+
|
|
3307
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextInputMarkdownStyleH4Struct &result) {
|
|
3308
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
3309
|
+
|
|
3310
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
3311
|
+
if (tmp_fontSize != map.end()) {
|
|
3312
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
3313
|
+
}
|
|
3314
|
+
auto tmp_fontWeight = map.find("fontWeight");
|
|
3315
|
+
if (tmp_fontWeight != map.end()) {
|
|
3316
|
+
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
3317
|
+
}
|
|
3318
|
+
auto tmp_color = map.find("color");
|
|
3319
|
+
if (tmp_color != map.end()) {
|
|
3320
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
3321
|
+
}
|
|
3322
|
+
}
|
|
3323
|
+
|
|
3324
|
+
static inline std::string toString(const EnrichedMarkdownTextInputMarkdownStyleH4Struct &value) {
|
|
3325
|
+
return "[Object EnrichedMarkdownTextInputMarkdownStyleH4Struct]";
|
|
3326
|
+
}
|
|
3327
|
+
|
|
3328
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
3329
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextInputMarkdownStyleH4Struct &value) {
|
|
3330
|
+
return value.toDynamic();
|
|
3331
|
+
}
|
|
3332
|
+
#endif
|
|
3333
|
+
|
|
3334
|
+
struct EnrichedMarkdownTextInputMarkdownStyleH5Struct {
|
|
3335
|
+
Float fontSize{0.0};
|
|
3336
|
+
std::string fontWeight{};
|
|
3337
|
+
SharedColor color{};
|
|
3338
|
+
|
|
3339
|
+
|
|
3340
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
3341
|
+
bool operator==(const EnrichedMarkdownTextInputMarkdownStyleH5Struct&) const = default;
|
|
3342
|
+
|
|
3343
|
+
folly::dynamic toDynamic() const {
|
|
3344
|
+
folly::dynamic result = folly::dynamic::object();
|
|
3345
|
+
result["fontSize"] = fontSize;
|
|
3346
|
+
result["fontWeight"] = fontWeight;
|
|
3347
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
3348
|
+
return result;
|
|
3349
|
+
}
|
|
3350
|
+
#endif
|
|
3351
|
+
};
|
|
3352
|
+
|
|
3353
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextInputMarkdownStyleH5Struct &result) {
|
|
3354
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
3355
|
+
|
|
3356
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
3357
|
+
if (tmp_fontSize != map.end()) {
|
|
3358
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
3359
|
+
}
|
|
3360
|
+
auto tmp_fontWeight = map.find("fontWeight");
|
|
3361
|
+
if (tmp_fontWeight != map.end()) {
|
|
3362
|
+
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
3363
|
+
}
|
|
3364
|
+
auto tmp_color = map.find("color");
|
|
3365
|
+
if (tmp_color != map.end()) {
|
|
3366
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
3367
|
+
}
|
|
3368
|
+
}
|
|
3369
|
+
|
|
3370
|
+
static inline std::string toString(const EnrichedMarkdownTextInputMarkdownStyleH5Struct &value) {
|
|
3371
|
+
return "[Object EnrichedMarkdownTextInputMarkdownStyleH5Struct]";
|
|
3372
|
+
}
|
|
3373
|
+
|
|
3374
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
3375
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextInputMarkdownStyleH5Struct &value) {
|
|
3376
|
+
return value.toDynamic();
|
|
3377
|
+
}
|
|
3378
|
+
#endif
|
|
3379
|
+
|
|
3380
|
+
struct EnrichedMarkdownTextInputMarkdownStyleH6Struct {
|
|
3381
|
+
Float fontSize{0.0};
|
|
3382
|
+
std::string fontWeight{};
|
|
3383
|
+
SharedColor color{};
|
|
3384
|
+
|
|
3385
|
+
|
|
3386
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
3387
|
+
bool operator==(const EnrichedMarkdownTextInputMarkdownStyleH6Struct&) const = default;
|
|
3388
|
+
|
|
3389
|
+
folly::dynamic toDynamic() const {
|
|
3390
|
+
folly::dynamic result = folly::dynamic::object();
|
|
3391
|
+
result["fontSize"] = fontSize;
|
|
3392
|
+
result["fontWeight"] = fontWeight;
|
|
3393
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
3394
|
+
return result;
|
|
3395
|
+
}
|
|
3396
|
+
#endif
|
|
3397
|
+
};
|
|
3398
|
+
|
|
3399
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextInputMarkdownStyleH6Struct &result) {
|
|
3400
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
3401
|
+
|
|
3402
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
3403
|
+
if (tmp_fontSize != map.end()) {
|
|
3404
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
3405
|
+
}
|
|
3406
|
+
auto tmp_fontWeight = map.find("fontWeight");
|
|
3407
|
+
if (tmp_fontWeight != map.end()) {
|
|
3408
|
+
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
3409
|
+
}
|
|
3410
|
+
auto tmp_color = map.find("color");
|
|
3411
|
+
if (tmp_color != map.end()) {
|
|
3412
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
3413
|
+
}
|
|
2752
3414
|
}
|
|
2753
3415
|
|
|
2754
|
-
static inline std::string toString(const
|
|
2755
|
-
return "[Object
|
|
3416
|
+
static inline std::string toString(const EnrichedMarkdownTextInputMarkdownStyleH6Struct &value) {
|
|
3417
|
+
return "[Object EnrichedMarkdownTextInputMarkdownStyleH6Struct]";
|
|
2756
3418
|
}
|
|
2757
3419
|
|
|
2758
3420
|
#ifdef RN_SERIALIZABLE_STATE
|
|
2759
|
-
static inline folly::dynamic toDynamic(const
|
|
3421
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextInputMarkdownStyleH6Struct &value) {
|
|
2760
3422
|
return value.toDynamic();
|
|
2761
3423
|
}
|
|
2762
3424
|
#endif
|
|
2763
3425
|
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
for (const auto &item : items) {
|
|
2767
|
-
EnrichedMarkdownTextInputMarkdownStyleLinkVariantsStruct newItem;
|
|
2768
|
-
fromRawValue(context, item, newItem);
|
|
2769
|
-
result.emplace_back(newItem);
|
|
2770
|
-
}
|
|
2771
|
-
}
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
struct EnrichedMarkdownTextInputMarkdownStyleSpoilerStruct {
|
|
2775
|
-
SharedColor color{};
|
|
2776
|
-
SharedColor backgroundColor{};
|
|
3426
|
+
struct EnrichedMarkdownTextInputMarkdownStyleListStruct {
|
|
3427
|
+
Float itemSpacing{0.0};
|
|
2777
3428
|
|
|
2778
3429
|
|
|
2779
3430
|
#ifdef RN_SERIALIZABLE_STATE
|
|
2780
|
-
bool operator==(const
|
|
3431
|
+
bool operator==(const EnrichedMarkdownTextInputMarkdownStyleListStruct&) const = default;
|
|
2781
3432
|
|
|
2782
3433
|
folly::dynamic toDynamic() const {
|
|
2783
3434
|
folly::dynamic result = folly::dynamic::object();
|
|
2784
|
-
result["
|
|
2785
|
-
result["backgroundColor"] = ::facebook::react::toDynamic(backgroundColor);
|
|
3435
|
+
result["itemSpacing"] = itemSpacing;
|
|
2786
3436
|
return result;
|
|
2787
3437
|
}
|
|
2788
3438
|
#endif
|
|
2789
3439
|
};
|
|
2790
3440
|
|
|
2791
|
-
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value,
|
|
3441
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextInputMarkdownStyleListStruct &result) {
|
|
2792
3442
|
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
2793
3443
|
|
|
2794
|
-
auto
|
|
2795
|
-
if (
|
|
2796
|
-
fromRawValue(context,
|
|
2797
|
-
}
|
|
2798
|
-
auto tmp_backgroundColor = map.find("backgroundColor");
|
|
2799
|
-
if (tmp_backgroundColor != map.end()) {
|
|
2800
|
-
fromRawValue(context, tmp_backgroundColor->second, result.backgroundColor);
|
|
3444
|
+
auto tmp_itemSpacing = map.find("itemSpacing");
|
|
3445
|
+
if (tmp_itemSpacing != map.end()) {
|
|
3446
|
+
fromRawValue(context, tmp_itemSpacing->second, result.itemSpacing);
|
|
2801
3447
|
}
|
|
2802
3448
|
}
|
|
2803
3449
|
|
|
2804
|
-
static inline std::string toString(const
|
|
2805
|
-
return "[Object
|
|
3450
|
+
static inline std::string toString(const EnrichedMarkdownTextInputMarkdownStyleListStruct &value) {
|
|
3451
|
+
return "[Object EnrichedMarkdownTextInputMarkdownStyleListStruct]";
|
|
2806
3452
|
}
|
|
2807
3453
|
|
|
2808
3454
|
#ifdef RN_SERIALIZABLE_STATE
|
|
2809
|
-
static inline folly::dynamic toDynamic(const
|
|
3455
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextInputMarkdownStyleListStruct &value) {
|
|
2810
3456
|
return value.toDynamic();
|
|
2811
3457
|
}
|
|
2812
3458
|
#endif
|
|
2813
3459
|
|
|
2814
|
-
struct
|
|
3460
|
+
struct EnrichedMarkdownTextInputMarkdownStyleInlineMathStruct {
|
|
2815
3461
|
SharedColor color{};
|
|
2816
3462
|
Float fontSize{0.0};
|
|
2817
3463
|
SharedColor backgroundColor{};
|
|
@@ -2826,7 +3472,7 @@ struct EnrichedMarkdownTextInputMarkdownStyleMathStruct {
|
|
|
2826
3472
|
|
|
2827
3473
|
|
|
2828
3474
|
#ifdef RN_SERIALIZABLE_STATE
|
|
2829
|
-
bool operator==(const
|
|
3475
|
+
bool operator==(const EnrichedMarkdownTextInputMarkdownStyleInlineMathStruct&) const = default;
|
|
2830
3476
|
|
|
2831
3477
|
folly::dynamic toDynamic() const {
|
|
2832
3478
|
folly::dynamic result = folly::dynamic::object();
|
|
@@ -2846,7 +3492,7 @@ struct EnrichedMarkdownTextInputMarkdownStyleMathStruct {
|
|
|
2846
3492
|
#endif
|
|
2847
3493
|
};
|
|
2848
3494
|
|
|
2849
|
-
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value,
|
|
3495
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextInputMarkdownStyleInlineMathStruct &result) {
|
|
2850
3496
|
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
2851
3497
|
|
|
2852
3498
|
auto tmp_color = map.find("color");
|
|
@@ -2895,17 +3541,17 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
2895
3541
|
}
|
|
2896
3542
|
}
|
|
2897
3543
|
|
|
2898
|
-
static inline std::string toString(const
|
|
2899
|
-
return "[Object
|
|
3544
|
+
static inline std::string toString(const EnrichedMarkdownTextInputMarkdownStyleInlineMathStruct &value) {
|
|
3545
|
+
return "[Object EnrichedMarkdownTextInputMarkdownStyleInlineMathStruct]";
|
|
2900
3546
|
}
|
|
2901
3547
|
|
|
2902
3548
|
#ifdef RN_SERIALIZABLE_STATE
|
|
2903
|
-
static inline folly::dynamic toDynamic(const
|
|
3549
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextInputMarkdownStyleInlineMathStruct &value) {
|
|
2904
3550
|
return value.toDynamic();
|
|
2905
3551
|
}
|
|
2906
3552
|
#endif
|
|
2907
3553
|
|
|
2908
|
-
struct
|
|
3554
|
+
struct EnrichedMarkdownTextInputMarkdownStyleMathStruct {
|
|
2909
3555
|
SharedColor color{};
|
|
2910
3556
|
Float fontSize{0.0};
|
|
2911
3557
|
SharedColor backgroundColor{};
|
|
@@ -2919,11 +3565,11 @@ struct EnrichedMarkdownTextInputMarkdownStyleMathBlockStruct {
|
|
|
2919
3565
|
std::string fontWeight{};
|
|
2920
3566
|
Float marginTop{0.0};
|
|
2921
3567
|
Float marginBottom{0.0};
|
|
2922
|
-
std::string
|
|
3568
|
+
std::string textAlign{};
|
|
2923
3569
|
|
|
2924
3570
|
|
|
2925
3571
|
#ifdef RN_SERIALIZABLE_STATE
|
|
2926
|
-
bool operator==(const
|
|
3572
|
+
bool operator==(const EnrichedMarkdownTextInputMarkdownStyleMathStruct&) const = default;
|
|
2927
3573
|
|
|
2928
3574
|
folly::dynamic toDynamic() const {
|
|
2929
3575
|
folly::dynamic result = folly::dynamic::object();
|
|
@@ -2940,13 +3586,13 @@ struct EnrichedMarkdownTextInputMarkdownStyleMathBlockStruct {
|
|
|
2940
3586
|
result["fontWeight"] = fontWeight;
|
|
2941
3587
|
result["marginTop"] = marginTop;
|
|
2942
3588
|
result["marginBottom"] = marginBottom;
|
|
2943
|
-
result["
|
|
3589
|
+
result["textAlign"] = textAlign;
|
|
2944
3590
|
return result;
|
|
2945
3591
|
}
|
|
2946
3592
|
#endif
|
|
2947
3593
|
};
|
|
2948
3594
|
|
|
2949
|
-
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value,
|
|
3595
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextInputMarkdownStyleMathStruct &result) {
|
|
2950
3596
|
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
2951
3597
|
|
|
2952
3598
|
auto tmp_color = map.find("color");
|
|
@@ -3001,18 +3647,18 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
3001
3647
|
if (tmp_marginBottom != map.end()) {
|
|
3002
3648
|
fromRawValue(context, tmp_marginBottom->second, result.marginBottom);
|
|
3003
3649
|
}
|
|
3004
|
-
auto
|
|
3005
|
-
if (
|
|
3006
|
-
fromRawValue(context,
|
|
3650
|
+
auto tmp_textAlign = map.find("textAlign");
|
|
3651
|
+
if (tmp_textAlign != map.end()) {
|
|
3652
|
+
fromRawValue(context, tmp_textAlign->second, result.textAlign);
|
|
3007
3653
|
}
|
|
3008
3654
|
}
|
|
3009
3655
|
|
|
3010
|
-
static inline std::string toString(const
|
|
3011
|
-
return "[Object
|
|
3656
|
+
static inline std::string toString(const EnrichedMarkdownTextInputMarkdownStyleMathStruct &value) {
|
|
3657
|
+
return "[Object EnrichedMarkdownTextInputMarkdownStyleMathStruct]";
|
|
3012
3658
|
}
|
|
3013
3659
|
|
|
3014
3660
|
#ifdef RN_SERIALIZABLE_STATE
|
|
3015
|
-
static inline folly::dynamic toDynamic(const
|
|
3661
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextInputMarkdownStyleMathStruct &value) {
|
|
3016
3662
|
return value.toDynamic();
|
|
3017
3663
|
}
|
|
3018
3664
|
#endif
|
|
@@ -3023,8 +3669,15 @@ struct EnrichedMarkdownTextInputMarkdownStyleStruct {
|
|
|
3023
3669
|
EnrichedMarkdownTextInputMarkdownStyleLinkStruct link{};
|
|
3024
3670
|
std::vector<EnrichedMarkdownTextInputMarkdownStyleLinkVariantsStruct> linkVariants{};
|
|
3025
3671
|
EnrichedMarkdownTextInputMarkdownStyleSpoilerStruct spoiler{};
|
|
3672
|
+
EnrichedMarkdownTextInputMarkdownStyleH1Struct h1{};
|
|
3673
|
+
EnrichedMarkdownTextInputMarkdownStyleH2Struct h2{};
|
|
3674
|
+
EnrichedMarkdownTextInputMarkdownStyleH3Struct h3{};
|
|
3675
|
+
EnrichedMarkdownTextInputMarkdownStyleH4Struct h4{};
|
|
3676
|
+
EnrichedMarkdownTextInputMarkdownStyleH5Struct h5{};
|
|
3677
|
+
EnrichedMarkdownTextInputMarkdownStyleH6Struct h6{};
|
|
3678
|
+
EnrichedMarkdownTextInputMarkdownStyleListStruct list{};
|
|
3679
|
+
EnrichedMarkdownTextInputMarkdownStyleInlineMathStruct inlineMath{};
|
|
3026
3680
|
EnrichedMarkdownTextInputMarkdownStyleMathStruct math{};
|
|
3027
|
-
EnrichedMarkdownTextInputMarkdownStyleMathBlockStruct mathBlock{};
|
|
3028
3681
|
|
|
3029
3682
|
|
|
3030
3683
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -3037,8 +3690,15 @@ struct EnrichedMarkdownTextInputMarkdownStyleStruct {
|
|
|
3037
3690
|
result["link"] = ::facebook::react::toDynamic(link);
|
|
3038
3691
|
result["linkVariants"] = ::facebook::react::toDynamic(linkVariants);
|
|
3039
3692
|
result["spoiler"] = ::facebook::react::toDynamic(spoiler);
|
|
3693
|
+
result["h1"] = ::facebook::react::toDynamic(h1);
|
|
3694
|
+
result["h2"] = ::facebook::react::toDynamic(h2);
|
|
3695
|
+
result["h3"] = ::facebook::react::toDynamic(h3);
|
|
3696
|
+
result["h4"] = ::facebook::react::toDynamic(h4);
|
|
3697
|
+
result["h5"] = ::facebook::react::toDynamic(h5);
|
|
3698
|
+
result["h6"] = ::facebook::react::toDynamic(h6);
|
|
3699
|
+
result["list"] = ::facebook::react::toDynamic(list);
|
|
3700
|
+
result["inlineMath"] = ::facebook::react::toDynamic(inlineMath);
|
|
3040
3701
|
result["math"] = ::facebook::react::toDynamic(math);
|
|
3041
|
-
result["mathBlock"] = ::facebook::react::toDynamic(mathBlock);
|
|
3042
3702
|
return result;
|
|
3043
3703
|
}
|
|
3044
3704
|
#endif
|
|
@@ -3067,14 +3727,42 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
3067
3727
|
if (tmp_spoiler != map.end()) {
|
|
3068
3728
|
fromRawValue(context, tmp_spoiler->second, result.spoiler);
|
|
3069
3729
|
}
|
|
3730
|
+
auto tmp_h1 = map.find("h1");
|
|
3731
|
+
if (tmp_h1 != map.end()) {
|
|
3732
|
+
fromRawValue(context, tmp_h1->second, result.h1);
|
|
3733
|
+
}
|
|
3734
|
+
auto tmp_h2 = map.find("h2");
|
|
3735
|
+
if (tmp_h2 != map.end()) {
|
|
3736
|
+
fromRawValue(context, tmp_h2->second, result.h2);
|
|
3737
|
+
}
|
|
3738
|
+
auto tmp_h3 = map.find("h3");
|
|
3739
|
+
if (tmp_h3 != map.end()) {
|
|
3740
|
+
fromRawValue(context, tmp_h3->second, result.h3);
|
|
3741
|
+
}
|
|
3742
|
+
auto tmp_h4 = map.find("h4");
|
|
3743
|
+
if (tmp_h4 != map.end()) {
|
|
3744
|
+
fromRawValue(context, tmp_h4->second, result.h4);
|
|
3745
|
+
}
|
|
3746
|
+
auto tmp_h5 = map.find("h5");
|
|
3747
|
+
if (tmp_h5 != map.end()) {
|
|
3748
|
+
fromRawValue(context, tmp_h5->second, result.h5);
|
|
3749
|
+
}
|
|
3750
|
+
auto tmp_h6 = map.find("h6");
|
|
3751
|
+
if (tmp_h6 != map.end()) {
|
|
3752
|
+
fromRawValue(context, tmp_h6->second, result.h6);
|
|
3753
|
+
}
|
|
3754
|
+
auto tmp_list = map.find("list");
|
|
3755
|
+
if (tmp_list != map.end()) {
|
|
3756
|
+
fromRawValue(context, tmp_list->second, result.list);
|
|
3757
|
+
}
|
|
3758
|
+
auto tmp_inlineMath = map.find("inlineMath");
|
|
3759
|
+
if (tmp_inlineMath != map.end()) {
|
|
3760
|
+
fromRawValue(context, tmp_inlineMath->second, result.inlineMath);
|
|
3761
|
+
}
|
|
3070
3762
|
auto tmp_math = map.find("math");
|
|
3071
3763
|
if (tmp_math != map.end()) {
|
|
3072
3764
|
fromRawValue(context, tmp_math->second, result.math);
|
|
3073
3765
|
}
|
|
3074
|
-
auto tmp_mathBlock = map.find("mathBlock");
|
|
3075
|
-
if (tmp_mathBlock != map.end()) {
|
|
3076
|
-
fromRawValue(context, tmp_mathBlock->second, result.mathBlock);
|
|
3077
|
-
}
|
|
3078
3766
|
}
|
|
3079
3767
|
|
|
3080
3768
|
static inline std::string toString(const EnrichedMarkdownTextInputMarkdownStyleStruct &value) {
|
|
@@ -3361,6 +4049,7 @@ class EnrichedMarkdownTextInputProps final : public ViewProps {
|
|
|
3361
4049
|
bool scrollEnabled{false};
|
|
3362
4050
|
bool blockSyntax{false};
|
|
3363
4051
|
std::string autoCapitalize{};
|
|
4052
|
+
bool interceptPaste{false};
|
|
3364
4053
|
bool multiline{false};
|
|
3365
4054
|
SharedColor cursorColor{};
|
|
3366
4055
|
SharedColor selectionColor{};
|
|
@@ -3931,6 +4620,8 @@ struct EnrichedMarkdownTextMarkdownStyleBlockquoteStruct {
|
|
|
3931
4620
|
Float borderWidth{0.0};
|
|
3932
4621
|
Float gapWidth{0.0};
|
|
3933
4622
|
SharedColor backgroundColor{};
|
|
4623
|
+
Float borderRadius{0.0};
|
|
4624
|
+
Float padding{0.0};
|
|
3934
4625
|
|
|
3935
4626
|
|
|
3936
4627
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -3949,6 +4640,8 @@ struct EnrichedMarkdownTextMarkdownStyleBlockquoteStruct {
|
|
|
3949
4640
|
result["borderWidth"] = borderWidth;
|
|
3950
4641
|
result["gapWidth"] = gapWidth;
|
|
3951
4642
|
result["backgroundColor"] = ::facebook::react::toDynamic(backgroundColor);
|
|
4643
|
+
result["borderRadius"] = borderRadius;
|
|
4644
|
+
result["padding"] = padding;
|
|
3952
4645
|
return result;
|
|
3953
4646
|
}
|
|
3954
4647
|
#endif
|
|
@@ -4001,6 +4694,14 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
4001
4694
|
if (tmp_backgroundColor != map.end()) {
|
|
4002
4695
|
fromRawValue(context, tmp_backgroundColor->second, result.backgroundColor);
|
|
4003
4696
|
}
|
|
4697
|
+
auto tmp_borderRadius = map.find("borderRadius");
|
|
4698
|
+
if (tmp_borderRadius != map.end()) {
|
|
4699
|
+
fromRawValue(context, tmp_borderRadius->second, result.borderRadius);
|
|
4700
|
+
}
|
|
4701
|
+
auto tmp_padding = map.find("padding");
|
|
4702
|
+
if (tmp_padding != map.end()) {
|
|
4703
|
+
fromRawValue(context, tmp_padding->second, result.padding);
|
|
4704
|
+
}
|
|
4004
4705
|
}
|
|
4005
4706
|
|
|
4006
4707
|
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleBlockquoteStruct &value) {
|
|
@@ -4028,6 +4729,7 @@ struct EnrichedMarkdownTextMarkdownStyleListStruct {
|
|
|
4028
4729
|
std::string markerFontWeight{};
|
|
4029
4730
|
Float gapWidth{0.0};
|
|
4030
4731
|
Float marginLeft{0.0};
|
|
4732
|
+
Float itemSpacing{0.0};
|
|
4031
4733
|
|
|
4032
4734
|
|
|
4033
4735
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -4049,6 +4751,7 @@ struct EnrichedMarkdownTextMarkdownStyleListStruct {
|
|
|
4049
4751
|
result["markerFontWeight"] = markerFontWeight;
|
|
4050
4752
|
result["gapWidth"] = gapWidth;
|
|
4051
4753
|
result["marginLeft"] = marginLeft;
|
|
4754
|
+
result["itemSpacing"] = itemSpacing;
|
|
4052
4755
|
return result;
|
|
4053
4756
|
}
|
|
4054
4757
|
#endif
|
|
@@ -4113,6 +4816,10 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
4113
4816
|
if (tmp_marginLeft != map.end()) {
|
|
4114
4817
|
fromRawValue(context, tmp_marginLeft->second, result.marginLeft);
|
|
4115
4818
|
}
|
|
4819
|
+
auto tmp_itemSpacing = map.find("itemSpacing");
|
|
4820
|
+
if (tmp_itemSpacing != map.end()) {
|
|
4821
|
+
fromRawValue(context, tmp_itemSpacing->second, result.itemSpacing);
|
|
4822
|
+
}
|
|
4116
4823
|
}
|
|
4117
4824
|
|
|
4118
4825
|
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleListStruct &value) {
|
|
@@ -4125,6 +4832,118 @@ static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMarkdownStyleLi
|
|
|
4125
4832
|
}
|
|
4126
4833
|
#endif
|
|
4127
4834
|
|
|
4835
|
+
struct EnrichedMarkdownTextMarkdownStyleCodeBlockSyntaxColorsStruct {
|
|
4836
|
+
SharedColor keyword{};
|
|
4837
|
+
SharedColor operatorColor{};
|
|
4838
|
+
SharedColor punctuation{};
|
|
4839
|
+
SharedColor string{};
|
|
4840
|
+
SharedColor number{};
|
|
4841
|
+
SharedColor constant{};
|
|
4842
|
+
SharedColor comment{};
|
|
4843
|
+
SharedColor function{};
|
|
4844
|
+
SharedColor type{};
|
|
4845
|
+
SharedColor variable{};
|
|
4846
|
+
SharedColor property{};
|
|
4847
|
+
SharedColor tag{};
|
|
4848
|
+
SharedColor attribute{};
|
|
4849
|
+
SharedColor embedded{};
|
|
4850
|
+
|
|
4851
|
+
|
|
4852
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
4853
|
+
bool operator==(const EnrichedMarkdownTextMarkdownStyleCodeBlockSyntaxColorsStruct&) const = default;
|
|
4854
|
+
|
|
4855
|
+
folly::dynamic toDynamic() const {
|
|
4856
|
+
folly::dynamic result = folly::dynamic::object();
|
|
4857
|
+
result["keyword"] = ::facebook::react::toDynamic(keyword);
|
|
4858
|
+
result["operatorColor"] = ::facebook::react::toDynamic(operatorColor);
|
|
4859
|
+
result["punctuation"] = ::facebook::react::toDynamic(punctuation);
|
|
4860
|
+
result["string"] = ::facebook::react::toDynamic(string);
|
|
4861
|
+
result["number"] = ::facebook::react::toDynamic(number);
|
|
4862
|
+
result["constant"] = ::facebook::react::toDynamic(constant);
|
|
4863
|
+
result["comment"] = ::facebook::react::toDynamic(comment);
|
|
4864
|
+
result["function"] = ::facebook::react::toDynamic(function);
|
|
4865
|
+
result["type"] = ::facebook::react::toDynamic(type);
|
|
4866
|
+
result["variable"] = ::facebook::react::toDynamic(variable);
|
|
4867
|
+
result["property"] = ::facebook::react::toDynamic(property);
|
|
4868
|
+
result["tag"] = ::facebook::react::toDynamic(tag);
|
|
4869
|
+
result["attribute"] = ::facebook::react::toDynamic(attribute);
|
|
4870
|
+
result["embedded"] = ::facebook::react::toDynamic(embedded);
|
|
4871
|
+
return result;
|
|
4872
|
+
}
|
|
4873
|
+
#endif
|
|
4874
|
+
};
|
|
4875
|
+
|
|
4876
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextMarkdownStyleCodeBlockSyntaxColorsStruct &result) {
|
|
4877
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
4878
|
+
|
|
4879
|
+
auto tmp_keyword = map.find("keyword");
|
|
4880
|
+
if (tmp_keyword != map.end()) {
|
|
4881
|
+
fromRawValue(context, tmp_keyword->second, result.keyword);
|
|
4882
|
+
}
|
|
4883
|
+
auto tmp_operatorColor = map.find("operatorColor");
|
|
4884
|
+
if (tmp_operatorColor != map.end()) {
|
|
4885
|
+
fromRawValue(context, tmp_operatorColor->second, result.operatorColor);
|
|
4886
|
+
}
|
|
4887
|
+
auto tmp_punctuation = map.find("punctuation");
|
|
4888
|
+
if (tmp_punctuation != map.end()) {
|
|
4889
|
+
fromRawValue(context, tmp_punctuation->second, result.punctuation);
|
|
4890
|
+
}
|
|
4891
|
+
auto tmp_string = map.find("string");
|
|
4892
|
+
if (tmp_string != map.end()) {
|
|
4893
|
+
fromRawValue(context, tmp_string->second, result.string);
|
|
4894
|
+
}
|
|
4895
|
+
auto tmp_number = map.find("number");
|
|
4896
|
+
if (tmp_number != map.end()) {
|
|
4897
|
+
fromRawValue(context, tmp_number->second, result.number);
|
|
4898
|
+
}
|
|
4899
|
+
auto tmp_constant = map.find("constant");
|
|
4900
|
+
if (tmp_constant != map.end()) {
|
|
4901
|
+
fromRawValue(context, tmp_constant->second, result.constant);
|
|
4902
|
+
}
|
|
4903
|
+
auto tmp_comment = map.find("comment");
|
|
4904
|
+
if (tmp_comment != map.end()) {
|
|
4905
|
+
fromRawValue(context, tmp_comment->second, result.comment);
|
|
4906
|
+
}
|
|
4907
|
+
auto tmp_function = map.find("function");
|
|
4908
|
+
if (tmp_function != map.end()) {
|
|
4909
|
+
fromRawValue(context, tmp_function->second, result.function);
|
|
4910
|
+
}
|
|
4911
|
+
auto tmp_type = map.find("type");
|
|
4912
|
+
if (tmp_type != map.end()) {
|
|
4913
|
+
fromRawValue(context, tmp_type->second, result.type);
|
|
4914
|
+
}
|
|
4915
|
+
auto tmp_variable = map.find("variable");
|
|
4916
|
+
if (tmp_variable != map.end()) {
|
|
4917
|
+
fromRawValue(context, tmp_variable->second, result.variable);
|
|
4918
|
+
}
|
|
4919
|
+
auto tmp_property = map.find("property");
|
|
4920
|
+
if (tmp_property != map.end()) {
|
|
4921
|
+
fromRawValue(context, tmp_property->second, result.property);
|
|
4922
|
+
}
|
|
4923
|
+
auto tmp_tag = map.find("tag");
|
|
4924
|
+
if (tmp_tag != map.end()) {
|
|
4925
|
+
fromRawValue(context, tmp_tag->second, result.tag);
|
|
4926
|
+
}
|
|
4927
|
+
auto tmp_attribute = map.find("attribute");
|
|
4928
|
+
if (tmp_attribute != map.end()) {
|
|
4929
|
+
fromRawValue(context, tmp_attribute->second, result.attribute);
|
|
4930
|
+
}
|
|
4931
|
+
auto tmp_embedded = map.find("embedded");
|
|
4932
|
+
if (tmp_embedded != map.end()) {
|
|
4933
|
+
fromRawValue(context, tmp_embedded->second, result.embedded);
|
|
4934
|
+
}
|
|
4935
|
+
}
|
|
4936
|
+
|
|
4937
|
+
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleCodeBlockSyntaxColorsStruct &value) {
|
|
4938
|
+
return "[Object EnrichedMarkdownTextMarkdownStyleCodeBlockSyntaxColorsStruct]";
|
|
4939
|
+
}
|
|
4940
|
+
|
|
4941
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
4942
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMarkdownStyleCodeBlockSyntaxColorsStruct &value) {
|
|
4943
|
+
return value.toDynamic();
|
|
4944
|
+
}
|
|
4945
|
+
#endif
|
|
4946
|
+
|
|
4128
4947
|
struct EnrichedMarkdownTextMarkdownStyleCodeBlockStruct {
|
|
4129
4948
|
Float fontSize{0.0};
|
|
4130
4949
|
std::string fontFamily{};
|
|
@@ -4138,6 +4957,7 @@ struct EnrichedMarkdownTextMarkdownStyleCodeBlockStruct {
|
|
|
4138
4957
|
Float borderRadius{0.0};
|
|
4139
4958
|
Float borderWidth{0.0};
|
|
4140
4959
|
Float padding{0.0};
|
|
4960
|
+
EnrichedMarkdownTextMarkdownStyleCodeBlockSyntaxColorsStruct syntaxColors{};
|
|
4141
4961
|
|
|
4142
4962
|
|
|
4143
4963
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -4157,6 +4977,7 @@ struct EnrichedMarkdownTextMarkdownStyleCodeBlockStruct {
|
|
|
4157
4977
|
result["borderRadius"] = borderRadius;
|
|
4158
4978
|
result["borderWidth"] = borderWidth;
|
|
4159
4979
|
result["padding"] = padding;
|
|
4980
|
+
result["syntaxColors"] = ::facebook::react::toDynamic(syntaxColors);
|
|
4160
4981
|
return result;
|
|
4161
4982
|
}
|
|
4162
4983
|
#endif
|
|
@@ -4213,6 +5034,10 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
4213
5034
|
if (tmp_padding != map.end()) {
|
|
4214
5035
|
fromRawValue(context, tmp_padding->second, result.padding);
|
|
4215
5036
|
}
|
|
5037
|
+
auto tmp_syntaxColors = map.find("syntaxColors");
|
|
5038
|
+
if (tmp_syntaxColors != map.end()) {
|
|
5039
|
+
fromRawValue(context, tmp_syntaxColors->second, result.syntaxColors);
|
|
5040
|
+
}
|
|
4216
5041
|
}
|
|
4217
5042
|
|
|
4218
5043
|
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleCodeBlockStruct &value) {
|
|
@@ -4230,6 +5055,11 @@ struct EnrichedMarkdownTextMarkdownStyleLinkStruct {
|
|
|
4230
5055
|
SharedColor color{};
|
|
4231
5056
|
bool underline{false};
|
|
4232
5057
|
SharedColor backgroundColor{};
|
|
5058
|
+
Float borderRadius{0.0};
|
|
5059
|
+
Float paddingHorizontal{0.0};
|
|
5060
|
+
Float paddingVertical{0.0};
|
|
5061
|
+
SharedColor borderColor{};
|
|
5062
|
+
Float borderWidth{0.0};
|
|
4233
5063
|
|
|
4234
5064
|
|
|
4235
5065
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -4241,6 +5071,11 @@ struct EnrichedMarkdownTextMarkdownStyleLinkStruct {
|
|
|
4241
5071
|
result["color"] = ::facebook::react::toDynamic(color);
|
|
4242
5072
|
result["underline"] = underline;
|
|
4243
5073
|
result["backgroundColor"] = ::facebook::react::toDynamic(backgroundColor);
|
|
5074
|
+
result["borderRadius"] = borderRadius;
|
|
5075
|
+
result["paddingHorizontal"] = paddingHorizontal;
|
|
5076
|
+
result["paddingVertical"] = paddingVertical;
|
|
5077
|
+
result["borderColor"] = ::facebook::react::toDynamic(borderColor);
|
|
5078
|
+
result["borderWidth"] = borderWidth;
|
|
4244
5079
|
return result;
|
|
4245
5080
|
}
|
|
4246
5081
|
#endif
|
|
@@ -4265,6 +5100,26 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
4265
5100
|
if (tmp_backgroundColor != map.end()) {
|
|
4266
5101
|
fromRawValue(context, tmp_backgroundColor->second, result.backgroundColor);
|
|
4267
5102
|
}
|
|
5103
|
+
auto tmp_borderRadius = map.find("borderRadius");
|
|
5104
|
+
if (tmp_borderRadius != map.end()) {
|
|
5105
|
+
fromRawValue(context, tmp_borderRadius->second, result.borderRadius);
|
|
5106
|
+
}
|
|
5107
|
+
auto tmp_paddingHorizontal = map.find("paddingHorizontal");
|
|
5108
|
+
if (tmp_paddingHorizontal != map.end()) {
|
|
5109
|
+
fromRawValue(context, tmp_paddingHorizontal->second, result.paddingHorizontal);
|
|
5110
|
+
}
|
|
5111
|
+
auto tmp_paddingVertical = map.find("paddingVertical");
|
|
5112
|
+
if (tmp_paddingVertical != map.end()) {
|
|
5113
|
+
fromRawValue(context, tmp_paddingVertical->second, result.paddingVertical);
|
|
5114
|
+
}
|
|
5115
|
+
auto tmp_borderColor = map.find("borderColor");
|
|
5116
|
+
if (tmp_borderColor != map.end()) {
|
|
5117
|
+
fromRawValue(context, tmp_borderColor->second, result.borderColor);
|
|
5118
|
+
}
|
|
5119
|
+
auto tmp_borderWidth = map.find("borderWidth");
|
|
5120
|
+
if (tmp_borderWidth != map.end()) {
|
|
5121
|
+
fromRawValue(context, tmp_borderWidth->second, result.borderWidth);
|
|
5122
|
+
}
|
|
4268
5123
|
}
|
|
4269
5124
|
|
|
4270
5125
|
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleLinkStruct &value) {
|
|
@@ -4282,6 +5137,11 @@ struct EnrichedMarkdownTextMarkdownStyleLinkVariantsStruct {
|
|
|
4282
5137
|
SharedColor color{};
|
|
4283
5138
|
bool underline{false};
|
|
4284
5139
|
SharedColor backgroundColor{};
|
|
5140
|
+
Float borderRadius{0.0};
|
|
5141
|
+
Float paddingHorizontal{0.0};
|
|
5142
|
+
Float paddingVertical{0.0};
|
|
5143
|
+
SharedColor borderColor{};
|
|
5144
|
+
Float borderWidth{0.0};
|
|
4285
5145
|
|
|
4286
5146
|
|
|
4287
5147
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -4293,6 +5153,11 @@ struct EnrichedMarkdownTextMarkdownStyleLinkVariantsStruct {
|
|
|
4293
5153
|
result["color"] = ::facebook::react::toDynamic(color);
|
|
4294
5154
|
result["underline"] = underline;
|
|
4295
5155
|
result["backgroundColor"] = ::facebook::react::toDynamic(backgroundColor);
|
|
5156
|
+
result["borderRadius"] = borderRadius;
|
|
5157
|
+
result["paddingHorizontal"] = paddingHorizontal;
|
|
5158
|
+
result["paddingVertical"] = paddingVertical;
|
|
5159
|
+
result["borderColor"] = ::facebook::react::toDynamic(borderColor);
|
|
5160
|
+
result["borderWidth"] = borderWidth;
|
|
4296
5161
|
return result;
|
|
4297
5162
|
}
|
|
4298
5163
|
#endif
|
|
@@ -4317,6 +5182,26 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
4317
5182
|
if (tmp_backgroundColor != map.end()) {
|
|
4318
5183
|
fromRawValue(context, tmp_backgroundColor->second, result.backgroundColor);
|
|
4319
5184
|
}
|
|
5185
|
+
auto tmp_borderRadius = map.find("borderRadius");
|
|
5186
|
+
if (tmp_borderRadius != map.end()) {
|
|
5187
|
+
fromRawValue(context, tmp_borderRadius->second, result.borderRadius);
|
|
5188
|
+
}
|
|
5189
|
+
auto tmp_paddingHorizontal = map.find("paddingHorizontal");
|
|
5190
|
+
if (tmp_paddingHorizontal != map.end()) {
|
|
5191
|
+
fromRawValue(context, tmp_paddingHorizontal->second, result.paddingHorizontal);
|
|
5192
|
+
}
|
|
5193
|
+
auto tmp_paddingVertical = map.find("paddingVertical");
|
|
5194
|
+
if (tmp_paddingVertical != map.end()) {
|
|
5195
|
+
fromRawValue(context, tmp_paddingVertical->second, result.paddingVertical);
|
|
5196
|
+
}
|
|
5197
|
+
auto tmp_borderColor = map.find("borderColor");
|
|
5198
|
+
if (tmp_borderColor != map.end()) {
|
|
5199
|
+
fromRawValue(context, tmp_borderColor->second, result.borderColor);
|
|
5200
|
+
}
|
|
5201
|
+
auto tmp_borderWidth = map.find("borderWidth");
|
|
5202
|
+
if (tmp_borderWidth != map.end()) {
|
|
5203
|
+
fromRawValue(context, tmp_borderWidth->second, result.borderWidth);
|
|
5204
|
+
}
|
|
4320
5205
|
}
|
|
4321
5206
|
|
|
4322
5207
|
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleLinkVariantsStruct &value) {
|
|
@@ -4559,6 +5444,9 @@ static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMarkdownStyleCo
|
|
|
4559
5444
|
|
|
4560
5445
|
struct EnrichedMarkdownTextMarkdownStyleImageStruct {
|
|
4561
5446
|
Float height{0.0};
|
|
5447
|
+
Float maxHeight{0.0};
|
|
5448
|
+
Float aspectRatio{0.0};
|
|
5449
|
+
std::string resizeMode{};
|
|
4562
5450
|
Float borderRadius{0.0};
|
|
4563
5451
|
Float marginTop{0.0};
|
|
4564
5452
|
Float marginBottom{0.0};
|
|
@@ -4570,6 +5458,9 @@ struct EnrichedMarkdownTextMarkdownStyleImageStruct {
|
|
|
4570
5458
|
folly::dynamic toDynamic() const {
|
|
4571
5459
|
folly::dynamic result = folly::dynamic::object();
|
|
4572
5460
|
result["height"] = height;
|
|
5461
|
+
result["maxHeight"] = maxHeight;
|
|
5462
|
+
result["aspectRatio"] = aspectRatio;
|
|
5463
|
+
result["resizeMode"] = resizeMode;
|
|
4573
5464
|
result["borderRadius"] = borderRadius;
|
|
4574
5465
|
result["marginTop"] = marginTop;
|
|
4575
5466
|
result["marginBottom"] = marginBottom;
|
|
@@ -4585,6 +5476,18 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
4585
5476
|
if (tmp_height != map.end()) {
|
|
4586
5477
|
fromRawValue(context, tmp_height->second, result.height);
|
|
4587
5478
|
}
|
|
5479
|
+
auto tmp_maxHeight = map.find("maxHeight");
|
|
5480
|
+
if (tmp_maxHeight != map.end()) {
|
|
5481
|
+
fromRawValue(context, tmp_maxHeight->second, result.maxHeight);
|
|
5482
|
+
}
|
|
5483
|
+
auto tmp_aspectRatio = map.find("aspectRatio");
|
|
5484
|
+
if (tmp_aspectRatio != map.end()) {
|
|
5485
|
+
fromRawValue(context, tmp_aspectRatio->second, result.aspectRatio);
|
|
5486
|
+
}
|
|
5487
|
+
auto tmp_resizeMode = map.find("resizeMode");
|
|
5488
|
+
if (tmp_resizeMode != map.end()) {
|
|
5489
|
+
fromRawValue(context, tmp_resizeMode->second, result.resizeMode);
|
|
5490
|
+
}
|
|
4588
5491
|
auto tmp_borderRadius = map.find("borderRadius");
|
|
4589
5492
|
if (tmp_borderRadius != map.end()) {
|
|
4590
5493
|
fromRawValue(context, tmp_borderRadius->second, result.borderRadius);
|
|
@@ -4713,6 +5616,8 @@ struct EnrichedMarkdownTextMarkdownStyleTableStruct {
|
|
|
4713
5616
|
Float borderRadius{0.0};
|
|
4714
5617
|
Float cellPaddingHorizontal{0.0};
|
|
4715
5618
|
Float cellPaddingVertical{0.0};
|
|
5619
|
+
Float horizontalOverflow{0.0};
|
|
5620
|
+
std::string align{};
|
|
4716
5621
|
|
|
4717
5622
|
|
|
4718
5623
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -4737,6 +5642,8 @@ struct EnrichedMarkdownTextMarkdownStyleTableStruct {
|
|
|
4737
5642
|
result["borderRadius"] = borderRadius;
|
|
4738
5643
|
result["cellPaddingHorizontal"] = cellPaddingHorizontal;
|
|
4739
5644
|
result["cellPaddingVertical"] = cellPaddingVertical;
|
|
5645
|
+
result["horizontalOverflow"] = horizontalOverflow;
|
|
5646
|
+
result["align"] = align;
|
|
4740
5647
|
return result;
|
|
4741
5648
|
}
|
|
4742
5649
|
#endif
|
|
@@ -4813,6 +5720,14 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
4813
5720
|
if (tmp_cellPaddingVertical != map.end()) {
|
|
4814
5721
|
fromRawValue(context, tmp_cellPaddingVertical->second, result.cellPaddingVertical);
|
|
4815
5722
|
}
|
|
5723
|
+
auto tmp_horizontalOverflow = map.find("horizontalOverflow");
|
|
5724
|
+
if (tmp_horizontalOverflow != map.end()) {
|
|
5725
|
+
fromRawValue(context, tmp_horizontalOverflow->second, result.horizontalOverflow);
|
|
5726
|
+
}
|
|
5727
|
+
auto tmp_align = map.find("align");
|
|
5728
|
+
if (tmp_align != map.end()) {
|
|
5729
|
+
fromRawValue(context, tmp_align->second, result.align);
|
|
5730
|
+
}
|
|
4816
5731
|
}
|
|
4817
5732
|
|
|
4818
5733
|
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleTableStruct &value) {
|
|
@@ -4904,6 +5819,7 @@ struct EnrichedMarkdownTextMarkdownStyleMathStruct {
|
|
|
4904
5819
|
Float marginBottom{0.0};
|
|
4905
5820
|
std::string textAlign{};
|
|
4906
5821
|
std::string fontWeight{};
|
|
5822
|
+
Float glyphOverflow{0.0};
|
|
4907
5823
|
|
|
4908
5824
|
|
|
4909
5825
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -4919,6 +5835,7 @@ struct EnrichedMarkdownTextMarkdownStyleMathStruct {
|
|
|
4919
5835
|
result["marginBottom"] = marginBottom;
|
|
4920
5836
|
result["textAlign"] = textAlign;
|
|
4921
5837
|
result["fontWeight"] = fontWeight;
|
|
5838
|
+
result["glyphOverflow"] = glyphOverflow;
|
|
4922
5839
|
return result;
|
|
4923
5840
|
}
|
|
4924
5841
|
#endif
|
|
@@ -4959,6 +5876,10 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
4959
5876
|
if (tmp_fontWeight != map.end()) {
|
|
4960
5877
|
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
4961
5878
|
}
|
|
5879
|
+
auto tmp_glyphOverflow = map.find("glyphOverflow");
|
|
5880
|
+
if (tmp_glyphOverflow != map.end()) {
|
|
5881
|
+
fromRawValue(context, tmp_glyphOverflow->second, result.glyphOverflow);
|
|
5882
|
+
}
|
|
4962
5883
|
}
|
|
4963
5884
|
|
|
4964
5885
|
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleMathStruct &value) {
|
|
@@ -4975,6 +5896,7 @@ struct EnrichedMarkdownTextMarkdownStyleInlineMathStruct {
|
|
|
4975
5896
|
SharedColor color{};
|
|
4976
5897
|
Float paddingVertical{0.0};
|
|
4977
5898
|
std::string fontWeight{};
|
|
5899
|
+
Float glyphOverflow{0.0};
|
|
4978
5900
|
|
|
4979
5901
|
|
|
4980
5902
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -4985,6 +5907,7 @@ struct EnrichedMarkdownTextMarkdownStyleInlineMathStruct {
|
|
|
4985
5907
|
result["color"] = ::facebook::react::toDynamic(color);
|
|
4986
5908
|
result["paddingVertical"] = paddingVertical;
|
|
4987
5909
|
result["fontWeight"] = fontWeight;
|
|
5910
|
+
result["glyphOverflow"] = glyphOverflow;
|
|
4988
5911
|
return result;
|
|
4989
5912
|
}
|
|
4990
5913
|
#endif
|
|
@@ -5005,6 +5928,10 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
5005
5928
|
if (tmp_fontWeight != map.end()) {
|
|
5006
5929
|
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
5007
5930
|
}
|
|
5931
|
+
auto tmp_glyphOverflow = map.find("glyphOverflow");
|
|
5932
|
+
if (tmp_glyphOverflow != map.end()) {
|
|
5933
|
+
fromRawValue(context, tmp_glyphOverflow->second, result.glyphOverflow);
|
|
5934
|
+
}
|
|
5008
5935
|
}
|
|
5009
5936
|
|
|
5010
5937
|
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleInlineMathStruct &value) {
|
|
@@ -5459,6 +6386,7 @@ struct EnrichedMarkdownTextMd4cFlagsStruct {
|
|
|
5459
6386
|
bool subscript{false};
|
|
5460
6387
|
bool latexMath{false};
|
|
5461
6388
|
bool highlight{false};
|
|
6389
|
+
bool hardSoftBreaks{false};
|
|
5462
6390
|
|
|
5463
6391
|
|
|
5464
6392
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -5471,6 +6399,7 @@ struct EnrichedMarkdownTextMd4cFlagsStruct {
|
|
|
5471
6399
|
result["subscript"] = subscript;
|
|
5472
6400
|
result["latexMath"] = latexMath;
|
|
5473
6401
|
result["highlight"] = highlight;
|
|
6402
|
+
result["hardSoftBreaks"] = hardSoftBreaks;
|
|
5474
6403
|
return result;
|
|
5475
6404
|
}
|
|
5476
6405
|
#endif
|
|
@@ -5499,6 +6428,10 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
5499
6428
|
if (tmp_highlight != map.end()) {
|
|
5500
6429
|
fromRawValue(context, tmp_highlight->second, result.highlight);
|
|
5501
6430
|
}
|
|
6431
|
+
auto tmp_hardSoftBreaks = map.find("hardSoftBreaks");
|
|
6432
|
+
if (tmp_hardSoftBreaks != map.end()) {
|
|
6433
|
+
fromRawValue(context, tmp_hardSoftBreaks->second, result.hardSoftBreaks);
|
|
6434
|
+
}
|
|
5502
6435
|
}
|
|
5503
6436
|
|
|
5504
6437
|
static inline std::string toString(const EnrichedMarkdownTextMd4cFlagsStruct &value) {
|
|
@@ -5513,6 +6446,7 @@ static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMd4cFlagsStruct
|
|
|
5513
6446
|
|
|
5514
6447
|
struct EnrichedMarkdownTextStreamingConfigStruct {
|
|
5515
6448
|
std::string tableMode{};
|
|
6449
|
+
std::string codeBlockMode{};
|
|
5516
6450
|
|
|
5517
6451
|
|
|
5518
6452
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -5521,6 +6455,7 @@ struct EnrichedMarkdownTextStreamingConfigStruct {
|
|
|
5521
6455
|
folly::dynamic toDynamic() const {
|
|
5522
6456
|
folly::dynamic result = folly::dynamic::object();
|
|
5523
6457
|
result["tableMode"] = tableMode;
|
|
6458
|
+
result["codeBlockMode"] = codeBlockMode;
|
|
5524
6459
|
return result;
|
|
5525
6460
|
}
|
|
5526
6461
|
#endif
|
|
@@ -5533,6 +6468,10 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
5533
6468
|
if (tmp_tableMode != map.end()) {
|
|
5534
6469
|
fromRawValue(context, tmp_tableMode->second, result.tableMode);
|
|
5535
6470
|
}
|
|
6471
|
+
auto tmp_codeBlockMode = map.find("codeBlockMode");
|
|
6472
|
+
if (tmp_codeBlockMode != map.end()) {
|
|
6473
|
+
fromRawValue(context, tmp_codeBlockMode->second, result.codeBlockMode);
|
|
6474
|
+
}
|
|
5536
6475
|
}
|
|
5537
6476
|
|
|
5538
6477
|
static inline std::string toString(const EnrichedMarkdownTextStreamingConfigStruct &value) {
|
|
@@ -5595,6 +6534,56 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
5595
6534
|
}
|
|
5596
6535
|
|
|
5597
6536
|
|
|
6537
|
+
struct EnrichedMarkdownTextImageRequestHeadersStruct {
|
|
6538
|
+
std::string name{};
|
|
6539
|
+
std::string value{};
|
|
6540
|
+
|
|
6541
|
+
|
|
6542
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
6543
|
+
bool operator==(const EnrichedMarkdownTextImageRequestHeadersStruct&) const = default;
|
|
6544
|
+
|
|
6545
|
+
folly::dynamic toDynamic() const {
|
|
6546
|
+
folly::dynamic result = folly::dynamic::object();
|
|
6547
|
+
result["name"] = name;
|
|
6548
|
+
result["value"] = value;
|
|
6549
|
+
return result;
|
|
6550
|
+
}
|
|
6551
|
+
#endif
|
|
6552
|
+
};
|
|
6553
|
+
|
|
6554
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextImageRequestHeadersStruct &result) {
|
|
6555
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
6556
|
+
|
|
6557
|
+
auto tmp_name = map.find("name");
|
|
6558
|
+
if (tmp_name != map.end()) {
|
|
6559
|
+
fromRawValue(context, tmp_name->second, result.name);
|
|
6560
|
+
}
|
|
6561
|
+
auto tmp_value = map.find("value");
|
|
6562
|
+
if (tmp_value != map.end()) {
|
|
6563
|
+
fromRawValue(context, tmp_value->second, result.value);
|
|
6564
|
+
}
|
|
6565
|
+
}
|
|
6566
|
+
|
|
6567
|
+
static inline std::string toString(const EnrichedMarkdownTextImageRequestHeadersStruct &value) {
|
|
6568
|
+
return "[Object EnrichedMarkdownTextImageRequestHeadersStruct]";
|
|
6569
|
+
}
|
|
6570
|
+
|
|
6571
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
6572
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextImageRequestHeadersStruct &value) {
|
|
6573
|
+
return value.toDynamic();
|
|
6574
|
+
}
|
|
6575
|
+
#endif
|
|
6576
|
+
|
|
6577
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<EnrichedMarkdownTextImageRequestHeadersStruct> &result) {
|
|
6578
|
+
auto items = (std::vector<RawValue>)value;
|
|
6579
|
+
for (const auto &item : items) {
|
|
6580
|
+
EnrichedMarkdownTextImageRequestHeadersStruct newItem;
|
|
6581
|
+
fromRawValue(context, item, newItem);
|
|
6582
|
+
result.emplace_back(newItem);
|
|
6583
|
+
}
|
|
6584
|
+
}
|
|
6585
|
+
|
|
6586
|
+
|
|
5598
6587
|
struct EnrichedMarkdownTextSelectionMenuConfigStruct {
|
|
5599
6588
|
bool copyAsMarkdown{false};
|
|
5600
6589
|
bool copyImageUrl{false};
|
|
@@ -5603,6 +6592,11 @@ struct EnrichedMarkdownTextSelectionMenuConfigStruct {
|
|
|
5603
6592
|
std::string copyImageUrlLabel{};
|
|
5604
6593
|
std::string copyImageUrlsLabel{};
|
|
5605
6594
|
std::vector<std::string> copyImageUrlPluralTemplates{};
|
|
6595
|
+
bool copyEnabled{false};
|
|
6596
|
+
bool copyFormatMarkdown{false};
|
|
6597
|
+
bool systemItemsNone{false};
|
|
6598
|
+
bool codeBlockCopyButton{false};
|
|
6599
|
+
bool interceptCopy{false};
|
|
5606
6600
|
|
|
5607
6601
|
|
|
5608
6602
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -5617,6 +6611,11 @@ struct EnrichedMarkdownTextSelectionMenuConfigStruct {
|
|
|
5617
6611
|
result["copyImageUrlLabel"] = copyImageUrlLabel;
|
|
5618
6612
|
result["copyImageUrlsLabel"] = copyImageUrlsLabel;
|
|
5619
6613
|
result["copyImageUrlPluralTemplates"] = ::facebook::react::toDynamic(copyImageUrlPluralTemplates);
|
|
6614
|
+
result["copyEnabled"] = copyEnabled;
|
|
6615
|
+
result["copyFormatMarkdown"] = copyFormatMarkdown;
|
|
6616
|
+
result["systemItemsNone"] = systemItemsNone;
|
|
6617
|
+
result["codeBlockCopyButton"] = codeBlockCopyButton;
|
|
6618
|
+
result["interceptCopy"] = interceptCopy;
|
|
5620
6619
|
return result;
|
|
5621
6620
|
}
|
|
5622
6621
|
#endif
|
|
@@ -5653,6 +6652,26 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
5653
6652
|
if (tmp_copyImageUrlPluralTemplates != map.end()) {
|
|
5654
6653
|
fromRawValue(context, tmp_copyImageUrlPluralTemplates->second, result.copyImageUrlPluralTemplates);
|
|
5655
6654
|
}
|
|
6655
|
+
auto tmp_copyEnabled = map.find("copyEnabled");
|
|
6656
|
+
if (tmp_copyEnabled != map.end()) {
|
|
6657
|
+
fromRawValue(context, tmp_copyEnabled->second, result.copyEnabled);
|
|
6658
|
+
}
|
|
6659
|
+
auto tmp_copyFormatMarkdown = map.find("copyFormatMarkdown");
|
|
6660
|
+
if (tmp_copyFormatMarkdown != map.end()) {
|
|
6661
|
+
fromRawValue(context, tmp_copyFormatMarkdown->second, result.copyFormatMarkdown);
|
|
6662
|
+
}
|
|
6663
|
+
auto tmp_systemItemsNone = map.find("systemItemsNone");
|
|
6664
|
+
if (tmp_systemItemsNone != map.end()) {
|
|
6665
|
+
fromRawValue(context, tmp_systemItemsNone->second, result.systemItemsNone);
|
|
6666
|
+
}
|
|
6667
|
+
auto tmp_codeBlockCopyButton = map.find("codeBlockCopyButton");
|
|
6668
|
+
if (tmp_codeBlockCopyButton != map.end()) {
|
|
6669
|
+
fromRawValue(context, tmp_codeBlockCopyButton->second, result.codeBlockCopyButton);
|
|
6670
|
+
}
|
|
6671
|
+
auto tmp_interceptCopy = map.find("interceptCopy");
|
|
6672
|
+
if (tmp_interceptCopy != map.end()) {
|
|
6673
|
+
fromRawValue(context, tmp_interceptCopy->second, result.interceptCopy);
|
|
6674
|
+
}
|
|
5656
6675
|
}
|
|
5657
6676
|
|
|
5658
6677
|
static inline std::string toString(const EnrichedMarkdownTextSelectionMenuConfigStruct &value) {
|
|
@@ -5937,7 +6956,11 @@ class EnrichedMarkdownTextProps final : public ViewProps {
|
|
|
5937
6956
|
|
|
5938
6957
|
std::string markdown{};
|
|
5939
6958
|
EnrichedMarkdownTextMarkdownStyleStruct markdownStyle{};
|
|
6959
|
+
bool emitLinkLayout{false};
|
|
6960
|
+
bool emitSelectionChange{false};
|
|
6961
|
+
bool enableTaskListItemToggle{true};
|
|
5940
6962
|
bool enableLinkPreview{true};
|
|
6963
|
+
bool linkLongPressSelects{false};
|
|
5941
6964
|
bool selectable{false};
|
|
5942
6965
|
SharedColor selectionColor{};
|
|
5943
6966
|
SharedColor selectionHandleColor{};
|
|
@@ -5948,7 +6971,9 @@ class EnrichedMarkdownTextProps final : public ViewProps {
|
|
|
5948
6971
|
bool streamingAnimation{false};
|
|
5949
6972
|
EnrichedMarkdownTextStreamingConfigStruct streamingConfig{};
|
|
5950
6973
|
std::string spoilerOverlay{std::string{"particles"}};
|
|
6974
|
+
bool contextMenuHidden{false};
|
|
5951
6975
|
std::vector<EnrichedMarkdownTextContextMenuItemsStruct> contextMenuItems{};
|
|
6976
|
+
std::vector<EnrichedMarkdownTextImageRequestHeadersStruct> imageRequestHeaders{};
|
|
5952
6977
|
EnrichedMarkdownTextSelectionMenuConfigStruct selectionMenuConfig{};
|
|
5953
6978
|
EnrichedMarkdownTextAccessibilityLabelsStruct accessibilityLabels{};
|
|
5954
6979
|
std::string textBreakStrategy{std::string{"highQuality"}};
|