react-native-enriched-markdown 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -0
- package/README.md +551 -0
- package/ReactNativeEnrichedMarkdown.podspec +27 -0
- package/android/build.gradle +101 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownTextManagerDelegate.java +54 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownTextManagerInterface.java +26 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/ComponentDescriptors.cpp +22 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/ComponentDescriptors.h +24 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/EventEmitters.cpp +33 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/EventEmitters.h +31 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/Props.cpp +82 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/Props.h +1388 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/ShadowNodes.cpp +17 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/ShadowNodes.h +32 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/States.cpp +16 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/States.h +20 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/baseline-prof.txt +65 -0
- package/android/src/main/cpp/jni-adapter.cpp +220 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownText.kt +270 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownTextLayoutManager.kt +15 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownTextManager.kt +173 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownTextPackage.kt +17 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/MeasurementStore.kt +385 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/accessibility/MarkdownAccessibilityHelper.kt +279 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/events/LinkLongPressEvent.kt +23 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/events/LinkPressEvent.kt +23 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/parser/MarkdownASTNode.kt +31 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/parser/Parser.kt +62 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/BlockStyleContext.kt +166 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/BlockquoteRenderer.kt +84 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/CodeBlockRenderer.kt +104 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/CodeRenderer.kt +36 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/DocumentRenderer.kt +16 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/EmphasisRenderer.kt +27 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/HeadingRenderer.kt +70 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/ImageRenderer.kt +68 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/LineBreakRenderer.kt +16 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/LinkRenderer.kt +29 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/ListContextManager.kt +105 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/ListItemRenderer.kt +59 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/ListRenderer.kt +76 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/NodeRenderer.kt +103 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/ParagraphRenderer.kt +80 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/Renderer.kt +109 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/SpanStyleCache.kt +86 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/StrikethroughRenderer.kt +27 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/StrongRenderer.kt +27 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/TextRenderer.kt +30 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/ThematicBreakRenderer.kt +45 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/UnderlineRenderer.kt +27 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/BaseListSpan.kt +136 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/BlockquoteSpan.kt +135 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/CodeBackgroundSpan.kt +180 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/CodeBlockSpan.kt +196 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/CodeSpan.kt +27 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/EmphasisSpan.kt +34 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/HeadingSpan.kt +38 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/ImageSpan.kt +321 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/LineHeightSpan.kt +27 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/LinkSpan.kt +51 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/MarginBottomSpan.kt +76 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/OrderedListSpan.kt +87 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/StrikethroughSpan.kt +12 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/StrongSpan.kt +37 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/TextSpan.kt +26 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/ThematicBreakSpan.kt +69 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/UnorderedListSpan.kt +69 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/BaseBlockStyle.kt +11 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/BlockquoteStyle.kt +51 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/CodeBlockStyle.kt +54 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/CodeStyle.kt +21 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/EmphasisStyle.kt +17 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/HeadingStyle.kt +33 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/ImageStyle.kt +23 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/InlineImageStyle.kt +17 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/LinkStyle.kt +19 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/ListStyle.kt +57 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/ParagraphStyle.kt +33 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/StrikethroughStyle.kt +17 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/StrongStyle.kt +17 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/StyleConfig.kt +211 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/StyleParser.kt +92 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/TextAlignment.kt +32 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/ThematicBreakStyle.kt +23 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/UnderlineStyle.kt +17 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/AsyncDrawable.kt +91 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/HTMLGenerator.kt +827 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/LinkLongPressMovementMethod.kt +121 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/MarkdownExtractor.kt +375 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/SelectionActionMode.kt +139 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/Utils.kt +183 -0
- package/android/src/main/jni/CMakeLists.txt +70 -0
- package/android/src/main/jni/EnrichedMarkdownTextSpec.cpp +21 -0
- package/android/src/main/jni/EnrichedMarkdownTextSpec.h +25 -0
- package/android/src/main/jni/react/renderer/components/EnrichedMarkdownTextSpec/MarkdownTextComponentDescriptor.h +29 -0
- package/android/src/main/jni/react/renderer/components/EnrichedMarkdownTextSpec/MarkdownTextMeasurementManager.cpp +45 -0
- package/android/src/main/jni/react/renderer/components/EnrichedMarkdownTextSpec/MarkdownTextMeasurementManager.h +21 -0
- package/android/src/main/jni/react/renderer/components/EnrichedMarkdownTextSpec/MarkdownTextShadowNode.cpp +20 -0
- package/android/src/main/jni/react/renderer/components/EnrichedMarkdownTextSpec/MarkdownTextShadowNode.h +37 -0
- package/android/src/main/jni/react/renderer/components/EnrichedMarkdownTextSpec/conversions.h +22 -0
- package/cpp/md4c/md4c.c +6492 -0
- package/cpp/md4c/md4c.h +402 -0
- package/cpp/parser/MD4CParser.cpp +327 -0
- package/cpp/parser/MD4CParser.hpp +27 -0
- package/cpp/parser/MarkdownASTNode.hpp +51 -0
- package/ios/EnrichedMarkdownText.h +18 -0
- package/ios/EnrichedMarkdownText.mm +1401 -0
- package/ios/attachments/EnrichedMarkdownImageAttachment.h +23 -0
- package/ios/attachments/EnrichedMarkdownImageAttachment.m +185 -0
- package/ios/attachments/ThematicBreakAttachment.h +15 -0
- package/ios/attachments/ThematicBreakAttachment.m +33 -0
- package/ios/generated/EnrichedMarkdownTextSpec/ComponentDescriptors.cpp +22 -0
- package/ios/generated/EnrichedMarkdownTextSpec/ComponentDescriptors.h +24 -0
- package/ios/generated/EnrichedMarkdownTextSpec/EventEmitters.cpp +33 -0
- package/ios/generated/EnrichedMarkdownTextSpec/EventEmitters.h +31 -0
- package/ios/generated/EnrichedMarkdownTextSpec/Props.cpp +82 -0
- package/ios/generated/EnrichedMarkdownTextSpec/Props.h +1388 -0
- package/ios/generated/EnrichedMarkdownTextSpec/RCTComponentViewHelpers.h +20 -0
- package/ios/generated/EnrichedMarkdownTextSpec/ShadowNodes.cpp +17 -0
- package/ios/generated/EnrichedMarkdownTextSpec/ShadowNodes.h +32 -0
- package/ios/generated/EnrichedMarkdownTextSpec/States.cpp +16 -0
- package/ios/generated/EnrichedMarkdownTextSpec/States.h +20 -0
- package/ios/internals/EnrichedMarkdownTextComponentDescriptor.h +19 -0
- package/ios/internals/EnrichedMarkdownTextShadowNode.h +43 -0
- package/ios/internals/EnrichedMarkdownTextShadowNode.mm +85 -0
- package/ios/internals/EnrichedMarkdownTextState.h +24 -0
- package/ios/parser/MarkdownASTNode.h +35 -0
- package/ios/parser/MarkdownASTNode.m +32 -0
- package/ios/parser/MarkdownParser.h +17 -0
- package/ios/parser/MarkdownParser.mm +42 -0
- package/ios/parser/MarkdownParserBridge.mm +120 -0
- package/ios/renderer/AttributedRenderer.h +11 -0
- package/ios/renderer/AttributedRenderer.m +152 -0
- package/ios/renderer/BlockquoteRenderer.h +7 -0
- package/ios/renderer/BlockquoteRenderer.m +160 -0
- package/ios/renderer/CodeBlockRenderer.h +10 -0
- package/ios/renderer/CodeBlockRenderer.m +90 -0
- package/ios/renderer/CodeRenderer.h +10 -0
- package/ios/renderer/CodeRenderer.m +60 -0
- package/ios/renderer/EmphasisRenderer.h +6 -0
- package/ios/renderer/EmphasisRenderer.m +96 -0
- package/ios/renderer/HeadingRenderer.h +7 -0
- package/ios/renderer/HeadingRenderer.m +105 -0
- package/ios/renderer/ImageRenderer.h +12 -0
- package/ios/renderer/ImageRenderer.m +83 -0
- package/ios/renderer/LinkRenderer.h +7 -0
- package/ios/renderer/LinkRenderer.m +69 -0
- package/ios/renderer/ListItemRenderer.h +16 -0
- package/ios/renderer/ListItemRenderer.m +103 -0
- package/ios/renderer/ListRenderer.h +13 -0
- package/ios/renderer/ListRenderer.m +70 -0
- package/ios/renderer/NodeRenderer.h +8 -0
- package/ios/renderer/ParagraphRenderer.h +7 -0
- package/ios/renderer/ParagraphRenderer.m +80 -0
- package/ios/renderer/RenderContext.h +105 -0
- package/ios/renderer/RenderContext.m +312 -0
- package/ios/renderer/RendererFactory.h +12 -0
- package/ios/renderer/RendererFactory.m +116 -0
- package/ios/renderer/StrikethroughRenderer.h +6 -0
- package/ios/renderer/StrikethroughRenderer.m +40 -0
- package/ios/renderer/StrongRenderer.h +6 -0
- package/ios/renderer/StrongRenderer.m +83 -0
- package/ios/renderer/TextRenderer.h +6 -0
- package/ios/renderer/TextRenderer.m +16 -0
- package/ios/renderer/ThematicBreakRenderer.h +5 -0
- package/ios/renderer/ThematicBreakRenderer.m +53 -0
- package/ios/renderer/UnderlineRenderer.h +6 -0
- package/ios/renderer/UnderlineRenderer.m +39 -0
- package/ios/styles/StyleConfig.h +274 -0
- package/ios/styles/StyleConfig.mm +1806 -0
- package/ios/utils/AccessibilityInfo.h +35 -0
- package/ios/utils/AccessibilityInfo.m +24 -0
- package/ios/utils/BlockquoteBorder.h +20 -0
- package/ios/utils/BlockquoteBorder.m +92 -0
- package/ios/utils/CodeBackground.h +19 -0
- package/ios/utils/CodeBackground.m +191 -0
- package/ios/utils/CodeBlockBackground.h +17 -0
- package/ios/utils/CodeBlockBackground.m +82 -0
- package/ios/utils/EditMenuUtils.h +22 -0
- package/ios/utils/EditMenuUtils.m +118 -0
- package/ios/utils/FontUtils.h +25 -0
- package/ios/utils/FontUtils.m +27 -0
- package/ios/utils/HTMLGenerator.h +20 -0
- package/ios/utils/HTMLGenerator.m +793 -0
- package/ios/utils/LastElementUtils.h +53 -0
- package/ios/utils/ListMarkerDrawer.h +15 -0
- package/ios/utils/ListMarkerDrawer.m +127 -0
- package/ios/utils/MarkdownAccessibilityElementBuilder.h +45 -0
- package/ios/utils/MarkdownAccessibilityElementBuilder.m +323 -0
- package/ios/utils/MarkdownExtractor.h +17 -0
- package/ios/utils/MarkdownExtractor.m +308 -0
- package/ios/utils/ParagraphStyleUtils.h +21 -0
- package/ios/utils/ParagraphStyleUtils.m +111 -0
- package/ios/utils/PasteboardUtils.h +36 -0
- package/ios/utils/PasteboardUtils.m +134 -0
- package/ios/utils/RTFExportUtils.h +24 -0
- package/ios/utils/RTFExportUtils.m +297 -0
- package/ios/utils/RuntimeKeys.h +38 -0
- package/ios/utils/RuntimeKeys.m +11 -0
- package/ios/utils/TextViewLayoutManager.h +14 -0
- package/ios/utils/TextViewLayoutManager.mm +113 -0
- package/lib/module/EnrichedMarkdownText.js +65 -0
- package/lib/module/EnrichedMarkdownText.js.map +1 -0
- package/lib/module/EnrichedMarkdownTextNativeComponent.ts +210 -0
- package/lib/module/index.js +4 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/normalizeMarkdownStyle.js +384 -0
- package/lib/module/normalizeMarkdownStyle.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/EnrichedMarkdownText.d.ts +183 -0
- package/lib/typescript/src/EnrichedMarkdownText.d.ts.map +1 -0
- package/lib/typescript/src/EnrichedMarkdownTextNativeComponent.d.ts +185 -0
- package/lib/typescript/src/EnrichedMarkdownTextNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +4 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/normalizeMarkdownStyle.d.ts +6 -0
- package/lib/typescript/src/normalizeMarkdownStyle.d.ts.map +1 -0
- package/package.json +186 -1
- package/react-native.config.js +13 -0
- package/src/EnrichedMarkdownText.tsx +280 -0
- package/src/EnrichedMarkdownTextNativeComponent.ts +210 -0
- package/src/index.tsx +10 -0
- package/src/normalizeMarkdownStyle.ts +423 -0
|
@@ -0,0 +1,1388 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GeneratePropsH.js
|
|
9
|
+
*/
|
|
10
|
+
#pragma once
|
|
11
|
+
|
|
12
|
+
#include <react/renderer/components/view/ViewProps.h>
|
|
13
|
+
#include <react/renderer/core/PropsParserContext.h>
|
|
14
|
+
#include <react/renderer/core/propsConversions.h>
|
|
15
|
+
#include <react/renderer/graphics/Color.h>
|
|
16
|
+
|
|
17
|
+
namespace facebook::react {
|
|
18
|
+
|
|
19
|
+
struct EnrichedMarkdownTextMarkdownStyleParagraphStruct {
|
|
20
|
+
Float fontSize{0.0};
|
|
21
|
+
std::string fontFamily{};
|
|
22
|
+
std::string fontWeight{};
|
|
23
|
+
SharedColor color{};
|
|
24
|
+
Float marginTop{0.0};
|
|
25
|
+
Float marginBottom{0.0};
|
|
26
|
+
Float lineHeight{0.0};
|
|
27
|
+
std::string textAlign{};
|
|
28
|
+
|
|
29
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
30
|
+
bool operator==(const EnrichedMarkdownTextMarkdownStyleParagraphStruct&) const = default;
|
|
31
|
+
|
|
32
|
+
folly::dynamic toDynamic() const {
|
|
33
|
+
folly::dynamic result = folly::dynamic::object();
|
|
34
|
+
result["fontSize"] = fontSize;
|
|
35
|
+
result["fontFamily"] = fontFamily;
|
|
36
|
+
result["fontWeight"] = fontWeight;
|
|
37
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
38
|
+
result["marginTop"] = marginTop;
|
|
39
|
+
result["marginBottom"] = marginBottom;
|
|
40
|
+
result["lineHeight"] = lineHeight;
|
|
41
|
+
result["textAlign"] = textAlign;
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
#endif
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextMarkdownStyleParagraphStruct &result) {
|
|
48
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
49
|
+
|
|
50
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
51
|
+
if (tmp_fontSize != map.end()) {
|
|
52
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
53
|
+
}
|
|
54
|
+
auto tmp_fontFamily = map.find("fontFamily");
|
|
55
|
+
if (tmp_fontFamily != map.end()) {
|
|
56
|
+
fromRawValue(context, tmp_fontFamily->second, result.fontFamily);
|
|
57
|
+
}
|
|
58
|
+
auto tmp_fontWeight = map.find("fontWeight");
|
|
59
|
+
if (tmp_fontWeight != map.end()) {
|
|
60
|
+
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
61
|
+
}
|
|
62
|
+
auto tmp_color = map.find("color");
|
|
63
|
+
if (tmp_color != map.end()) {
|
|
64
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
65
|
+
}
|
|
66
|
+
auto tmp_marginTop = map.find("marginTop");
|
|
67
|
+
if (tmp_marginTop != map.end()) {
|
|
68
|
+
fromRawValue(context, tmp_marginTop->second, result.marginTop);
|
|
69
|
+
}
|
|
70
|
+
auto tmp_marginBottom = map.find("marginBottom");
|
|
71
|
+
if (tmp_marginBottom != map.end()) {
|
|
72
|
+
fromRawValue(context, tmp_marginBottom->second, result.marginBottom);
|
|
73
|
+
}
|
|
74
|
+
auto tmp_lineHeight = map.find("lineHeight");
|
|
75
|
+
if (tmp_lineHeight != map.end()) {
|
|
76
|
+
fromRawValue(context, tmp_lineHeight->second, result.lineHeight);
|
|
77
|
+
}
|
|
78
|
+
auto tmp_textAlign = map.find("textAlign");
|
|
79
|
+
if (tmp_textAlign != map.end()) {
|
|
80
|
+
fromRawValue(context, tmp_textAlign->second, result.textAlign);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleParagraphStruct &value) {
|
|
85
|
+
return "[Object EnrichedMarkdownTextMarkdownStyleParagraphStruct]";
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
89
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMarkdownStyleParagraphStruct &value) {
|
|
90
|
+
return value.toDynamic();
|
|
91
|
+
}
|
|
92
|
+
#endif
|
|
93
|
+
|
|
94
|
+
struct EnrichedMarkdownTextMarkdownStyleH1Struct {
|
|
95
|
+
Float fontSize{0.0};
|
|
96
|
+
std::string fontFamily{};
|
|
97
|
+
std::string fontWeight{};
|
|
98
|
+
SharedColor color{};
|
|
99
|
+
Float marginTop{0.0};
|
|
100
|
+
Float marginBottom{0.0};
|
|
101
|
+
Float lineHeight{0.0};
|
|
102
|
+
std::string textAlign{};
|
|
103
|
+
|
|
104
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
105
|
+
bool operator==(const EnrichedMarkdownTextMarkdownStyleH1Struct&) const = default;
|
|
106
|
+
|
|
107
|
+
folly::dynamic toDynamic() const {
|
|
108
|
+
folly::dynamic result = folly::dynamic::object();
|
|
109
|
+
result["fontSize"] = fontSize;
|
|
110
|
+
result["fontFamily"] = fontFamily;
|
|
111
|
+
result["fontWeight"] = fontWeight;
|
|
112
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
113
|
+
result["marginTop"] = marginTop;
|
|
114
|
+
result["marginBottom"] = marginBottom;
|
|
115
|
+
result["lineHeight"] = lineHeight;
|
|
116
|
+
result["textAlign"] = textAlign;
|
|
117
|
+
return result;
|
|
118
|
+
}
|
|
119
|
+
#endif
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextMarkdownStyleH1Struct &result) {
|
|
123
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
124
|
+
|
|
125
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
126
|
+
if (tmp_fontSize != map.end()) {
|
|
127
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
128
|
+
}
|
|
129
|
+
auto tmp_fontFamily = map.find("fontFamily");
|
|
130
|
+
if (tmp_fontFamily != map.end()) {
|
|
131
|
+
fromRawValue(context, tmp_fontFamily->second, result.fontFamily);
|
|
132
|
+
}
|
|
133
|
+
auto tmp_fontWeight = map.find("fontWeight");
|
|
134
|
+
if (tmp_fontWeight != map.end()) {
|
|
135
|
+
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
136
|
+
}
|
|
137
|
+
auto tmp_color = map.find("color");
|
|
138
|
+
if (tmp_color != map.end()) {
|
|
139
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
140
|
+
}
|
|
141
|
+
auto tmp_marginTop = map.find("marginTop");
|
|
142
|
+
if (tmp_marginTop != map.end()) {
|
|
143
|
+
fromRawValue(context, tmp_marginTop->second, result.marginTop);
|
|
144
|
+
}
|
|
145
|
+
auto tmp_marginBottom = map.find("marginBottom");
|
|
146
|
+
if (tmp_marginBottom != map.end()) {
|
|
147
|
+
fromRawValue(context, tmp_marginBottom->second, result.marginBottom);
|
|
148
|
+
}
|
|
149
|
+
auto tmp_lineHeight = map.find("lineHeight");
|
|
150
|
+
if (tmp_lineHeight != map.end()) {
|
|
151
|
+
fromRawValue(context, tmp_lineHeight->second, result.lineHeight);
|
|
152
|
+
}
|
|
153
|
+
auto tmp_textAlign = map.find("textAlign");
|
|
154
|
+
if (tmp_textAlign != map.end()) {
|
|
155
|
+
fromRawValue(context, tmp_textAlign->second, result.textAlign);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleH1Struct &value) {
|
|
160
|
+
return "[Object EnrichedMarkdownTextMarkdownStyleH1Struct]";
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
164
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMarkdownStyleH1Struct &value) {
|
|
165
|
+
return value.toDynamic();
|
|
166
|
+
}
|
|
167
|
+
#endif
|
|
168
|
+
|
|
169
|
+
struct EnrichedMarkdownTextMarkdownStyleH2Struct {
|
|
170
|
+
Float fontSize{0.0};
|
|
171
|
+
std::string fontFamily{};
|
|
172
|
+
std::string fontWeight{};
|
|
173
|
+
SharedColor color{};
|
|
174
|
+
Float marginTop{0.0};
|
|
175
|
+
Float marginBottom{0.0};
|
|
176
|
+
Float lineHeight{0.0};
|
|
177
|
+
std::string textAlign{};
|
|
178
|
+
|
|
179
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
180
|
+
bool operator==(const EnrichedMarkdownTextMarkdownStyleH2Struct&) const = default;
|
|
181
|
+
|
|
182
|
+
folly::dynamic toDynamic() const {
|
|
183
|
+
folly::dynamic result = folly::dynamic::object();
|
|
184
|
+
result["fontSize"] = fontSize;
|
|
185
|
+
result["fontFamily"] = fontFamily;
|
|
186
|
+
result["fontWeight"] = fontWeight;
|
|
187
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
188
|
+
result["marginTop"] = marginTop;
|
|
189
|
+
result["marginBottom"] = marginBottom;
|
|
190
|
+
result["lineHeight"] = lineHeight;
|
|
191
|
+
result["textAlign"] = textAlign;
|
|
192
|
+
return result;
|
|
193
|
+
}
|
|
194
|
+
#endif
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextMarkdownStyleH2Struct &result) {
|
|
198
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
199
|
+
|
|
200
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
201
|
+
if (tmp_fontSize != map.end()) {
|
|
202
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
203
|
+
}
|
|
204
|
+
auto tmp_fontFamily = map.find("fontFamily");
|
|
205
|
+
if (tmp_fontFamily != map.end()) {
|
|
206
|
+
fromRawValue(context, tmp_fontFamily->second, result.fontFamily);
|
|
207
|
+
}
|
|
208
|
+
auto tmp_fontWeight = map.find("fontWeight");
|
|
209
|
+
if (tmp_fontWeight != map.end()) {
|
|
210
|
+
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
211
|
+
}
|
|
212
|
+
auto tmp_color = map.find("color");
|
|
213
|
+
if (tmp_color != map.end()) {
|
|
214
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
215
|
+
}
|
|
216
|
+
auto tmp_marginTop = map.find("marginTop");
|
|
217
|
+
if (tmp_marginTop != map.end()) {
|
|
218
|
+
fromRawValue(context, tmp_marginTop->second, result.marginTop);
|
|
219
|
+
}
|
|
220
|
+
auto tmp_marginBottom = map.find("marginBottom");
|
|
221
|
+
if (tmp_marginBottom != map.end()) {
|
|
222
|
+
fromRawValue(context, tmp_marginBottom->second, result.marginBottom);
|
|
223
|
+
}
|
|
224
|
+
auto tmp_lineHeight = map.find("lineHeight");
|
|
225
|
+
if (tmp_lineHeight != map.end()) {
|
|
226
|
+
fromRawValue(context, tmp_lineHeight->second, result.lineHeight);
|
|
227
|
+
}
|
|
228
|
+
auto tmp_textAlign = map.find("textAlign");
|
|
229
|
+
if (tmp_textAlign != map.end()) {
|
|
230
|
+
fromRawValue(context, tmp_textAlign->second, result.textAlign);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleH2Struct &value) {
|
|
235
|
+
return "[Object EnrichedMarkdownTextMarkdownStyleH2Struct]";
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
239
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMarkdownStyleH2Struct &value) {
|
|
240
|
+
return value.toDynamic();
|
|
241
|
+
}
|
|
242
|
+
#endif
|
|
243
|
+
|
|
244
|
+
struct EnrichedMarkdownTextMarkdownStyleH3Struct {
|
|
245
|
+
Float fontSize{0.0};
|
|
246
|
+
std::string fontFamily{};
|
|
247
|
+
std::string fontWeight{};
|
|
248
|
+
SharedColor color{};
|
|
249
|
+
Float marginTop{0.0};
|
|
250
|
+
Float marginBottom{0.0};
|
|
251
|
+
Float lineHeight{0.0};
|
|
252
|
+
std::string textAlign{};
|
|
253
|
+
|
|
254
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
255
|
+
bool operator==(const EnrichedMarkdownTextMarkdownStyleH3Struct&) const = default;
|
|
256
|
+
|
|
257
|
+
folly::dynamic toDynamic() const {
|
|
258
|
+
folly::dynamic result = folly::dynamic::object();
|
|
259
|
+
result["fontSize"] = fontSize;
|
|
260
|
+
result["fontFamily"] = fontFamily;
|
|
261
|
+
result["fontWeight"] = fontWeight;
|
|
262
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
263
|
+
result["marginTop"] = marginTop;
|
|
264
|
+
result["marginBottom"] = marginBottom;
|
|
265
|
+
result["lineHeight"] = lineHeight;
|
|
266
|
+
result["textAlign"] = textAlign;
|
|
267
|
+
return result;
|
|
268
|
+
}
|
|
269
|
+
#endif
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextMarkdownStyleH3Struct &result) {
|
|
273
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
274
|
+
|
|
275
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
276
|
+
if (tmp_fontSize != map.end()) {
|
|
277
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
278
|
+
}
|
|
279
|
+
auto tmp_fontFamily = map.find("fontFamily");
|
|
280
|
+
if (tmp_fontFamily != map.end()) {
|
|
281
|
+
fromRawValue(context, tmp_fontFamily->second, result.fontFamily);
|
|
282
|
+
}
|
|
283
|
+
auto tmp_fontWeight = map.find("fontWeight");
|
|
284
|
+
if (tmp_fontWeight != map.end()) {
|
|
285
|
+
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
286
|
+
}
|
|
287
|
+
auto tmp_color = map.find("color");
|
|
288
|
+
if (tmp_color != map.end()) {
|
|
289
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
290
|
+
}
|
|
291
|
+
auto tmp_marginTop = map.find("marginTop");
|
|
292
|
+
if (tmp_marginTop != map.end()) {
|
|
293
|
+
fromRawValue(context, tmp_marginTop->second, result.marginTop);
|
|
294
|
+
}
|
|
295
|
+
auto tmp_marginBottom = map.find("marginBottom");
|
|
296
|
+
if (tmp_marginBottom != map.end()) {
|
|
297
|
+
fromRawValue(context, tmp_marginBottom->second, result.marginBottom);
|
|
298
|
+
}
|
|
299
|
+
auto tmp_lineHeight = map.find("lineHeight");
|
|
300
|
+
if (tmp_lineHeight != map.end()) {
|
|
301
|
+
fromRawValue(context, tmp_lineHeight->second, result.lineHeight);
|
|
302
|
+
}
|
|
303
|
+
auto tmp_textAlign = map.find("textAlign");
|
|
304
|
+
if (tmp_textAlign != map.end()) {
|
|
305
|
+
fromRawValue(context, tmp_textAlign->second, result.textAlign);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleH3Struct &value) {
|
|
310
|
+
return "[Object EnrichedMarkdownTextMarkdownStyleH3Struct]";
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
314
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMarkdownStyleH3Struct &value) {
|
|
315
|
+
return value.toDynamic();
|
|
316
|
+
}
|
|
317
|
+
#endif
|
|
318
|
+
|
|
319
|
+
struct EnrichedMarkdownTextMarkdownStyleH4Struct {
|
|
320
|
+
Float fontSize{0.0};
|
|
321
|
+
std::string fontFamily{};
|
|
322
|
+
std::string fontWeight{};
|
|
323
|
+
SharedColor color{};
|
|
324
|
+
Float marginTop{0.0};
|
|
325
|
+
Float marginBottom{0.0};
|
|
326
|
+
Float lineHeight{0.0};
|
|
327
|
+
std::string textAlign{};
|
|
328
|
+
|
|
329
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
330
|
+
bool operator==(const EnrichedMarkdownTextMarkdownStyleH4Struct&) const = default;
|
|
331
|
+
|
|
332
|
+
folly::dynamic toDynamic() const {
|
|
333
|
+
folly::dynamic result = folly::dynamic::object();
|
|
334
|
+
result["fontSize"] = fontSize;
|
|
335
|
+
result["fontFamily"] = fontFamily;
|
|
336
|
+
result["fontWeight"] = fontWeight;
|
|
337
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
338
|
+
result["marginTop"] = marginTop;
|
|
339
|
+
result["marginBottom"] = marginBottom;
|
|
340
|
+
result["lineHeight"] = lineHeight;
|
|
341
|
+
result["textAlign"] = textAlign;
|
|
342
|
+
return result;
|
|
343
|
+
}
|
|
344
|
+
#endif
|
|
345
|
+
};
|
|
346
|
+
|
|
347
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextMarkdownStyleH4Struct &result) {
|
|
348
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
349
|
+
|
|
350
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
351
|
+
if (tmp_fontSize != map.end()) {
|
|
352
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
353
|
+
}
|
|
354
|
+
auto tmp_fontFamily = map.find("fontFamily");
|
|
355
|
+
if (tmp_fontFamily != map.end()) {
|
|
356
|
+
fromRawValue(context, tmp_fontFamily->second, result.fontFamily);
|
|
357
|
+
}
|
|
358
|
+
auto tmp_fontWeight = map.find("fontWeight");
|
|
359
|
+
if (tmp_fontWeight != map.end()) {
|
|
360
|
+
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
361
|
+
}
|
|
362
|
+
auto tmp_color = map.find("color");
|
|
363
|
+
if (tmp_color != map.end()) {
|
|
364
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
365
|
+
}
|
|
366
|
+
auto tmp_marginTop = map.find("marginTop");
|
|
367
|
+
if (tmp_marginTop != map.end()) {
|
|
368
|
+
fromRawValue(context, tmp_marginTop->second, result.marginTop);
|
|
369
|
+
}
|
|
370
|
+
auto tmp_marginBottom = map.find("marginBottom");
|
|
371
|
+
if (tmp_marginBottom != map.end()) {
|
|
372
|
+
fromRawValue(context, tmp_marginBottom->second, result.marginBottom);
|
|
373
|
+
}
|
|
374
|
+
auto tmp_lineHeight = map.find("lineHeight");
|
|
375
|
+
if (tmp_lineHeight != map.end()) {
|
|
376
|
+
fromRawValue(context, tmp_lineHeight->second, result.lineHeight);
|
|
377
|
+
}
|
|
378
|
+
auto tmp_textAlign = map.find("textAlign");
|
|
379
|
+
if (tmp_textAlign != map.end()) {
|
|
380
|
+
fromRawValue(context, tmp_textAlign->second, result.textAlign);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleH4Struct &value) {
|
|
385
|
+
return "[Object EnrichedMarkdownTextMarkdownStyleH4Struct]";
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
389
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMarkdownStyleH4Struct &value) {
|
|
390
|
+
return value.toDynamic();
|
|
391
|
+
}
|
|
392
|
+
#endif
|
|
393
|
+
|
|
394
|
+
struct EnrichedMarkdownTextMarkdownStyleH5Struct {
|
|
395
|
+
Float fontSize{0.0};
|
|
396
|
+
std::string fontFamily{};
|
|
397
|
+
std::string fontWeight{};
|
|
398
|
+
SharedColor color{};
|
|
399
|
+
Float marginTop{0.0};
|
|
400
|
+
Float marginBottom{0.0};
|
|
401
|
+
Float lineHeight{0.0};
|
|
402
|
+
std::string textAlign{};
|
|
403
|
+
|
|
404
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
405
|
+
bool operator==(const EnrichedMarkdownTextMarkdownStyleH5Struct&) const = default;
|
|
406
|
+
|
|
407
|
+
folly::dynamic toDynamic() const {
|
|
408
|
+
folly::dynamic result = folly::dynamic::object();
|
|
409
|
+
result["fontSize"] = fontSize;
|
|
410
|
+
result["fontFamily"] = fontFamily;
|
|
411
|
+
result["fontWeight"] = fontWeight;
|
|
412
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
413
|
+
result["marginTop"] = marginTop;
|
|
414
|
+
result["marginBottom"] = marginBottom;
|
|
415
|
+
result["lineHeight"] = lineHeight;
|
|
416
|
+
result["textAlign"] = textAlign;
|
|
417
|
+
return result;
|
|
418
|
+
}
|
|
419
|
+
#endif
|
|
420
|
+
};
|
|
421
|
+
|
|
422
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextMarkdownStyleH5Struct &result) {
|
|
423
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
424
|
+
|
|
425
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
426
|
+
if (tmp_fontSize != map.end()) {
|
|
427
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
428
|
+
}
|
|
429
|
+
auto tmp_fontFamily = map.find("fontFamily");
|
|
430
|
+
if (tmp_fontFamily != map.end()) {
|
|
431
|
+
fromRawValue(context, tmp_fontFamily->second, result.fontFamily);
|
|
432
|
+
}
|
|
433
|
+
auto tmp_fontWeight = map.find("fontWeight");
|
|
434
|
+
if (tmp_fontWeight != map.end()) {
|
|
435
|
+
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
436
|
+
}
|
|
437
|
+
auto tmp_color = map.find("color");
|
|
438
|
+
if (tmp_color != map.end()) {
|
|
439
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
440
|
+
}
|
|
441
|
+
auto tmp_marginTop = map.find("marginTop");
|
|
442
|
+
if (tmp_marginTop != map.end()) {
|
|
443
|
+
fromRawValue(context, tmp_marginTop->second, result.marginTop);
|
|
444
|
+
}
|
|
445
|
+
auto tmp_marginBottom = map.find("marginBottom");
|
|
446
|
+
if (tmp_marginBottom != map.end()) {
|
|
447
|
+
fromRawValue(context, tmp_marginBottom->second, result.marginBottom);
|
|
448
|
+
}
|
|
449
|
+
auto tmp_lineHeight = map.find("lineHeight");
|
|
450
|
+
if (tmp_lineHeight != map.end()) {
|
|
451
|
+
fromRawValue(context, tmp_lineHeight->second, result.lineHeight);
|
|
452
|
+
}
|
|
453
|
+
auto tmp_textAlign = map.find("textAlign");
|
|
454
|
+
if (tmp_textAlign != map.end()) {
|
|
455
|
+
fromRawValue(context, tmp_textAlign->second, result.textAlign);
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleH5Struct &value) {
|
|
460
|
+
return "[Object EnrichedMarkdownTextMarkdownStyleH5Struct]";
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
464
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMarkdownStyleH5Struct &value) {
|
|
465
|
+
return value.toDynamic();
|
|
466
|
+
}
|
|
467
|
+
#endif
|
|
468
|
+
|
|
469
|
+
struct EnrichedMarkdownTextMarkdownStyleH6Struct {
|
|
470
|
+
Float fontSize{0.0};
|
|
471
|
+
std::string fontFamily{};
|
|
472
|
+
std::string fontWeight{};
|
|
473
|
+
SharedColor color{};
|
|
474
|
+
Float marginTop{0.0};
|
|
475
|
+
Float marginBottom{0.0};
|
|
476
|
+
Float lineHeight{0.0};
|
|
477
|
+
std::string textAlign{};
|
|
478
|
+
|
|
479
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
480
|
+
bool operator==(const EnrichedMarkdownTextMarkdownStyleH6Struct&) const = default;
|
|
481
|
+
|
|
482
|
+
folly::dynamic toDynamic() const {
|
|
483
|
+
folly::dynamic result = folly::dynamic::object();
|
|
484
|
+
result["fontSize"] = fontSize;
|
|
485
|
+
result["fontFamily"] = fontFamily;
|
|
486
|
+
result["fontWeight"] = fontWeight;
|
|
487
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
488
|
+
result["marginTop"] = marginTop;
|
|
489
|
+
result["marginBottom"] = marginBottom;
|
|
490
|
+
result["lineHeight"] = lineHeight;
|
|
491
|
+
result["textAlign"] = textAlign;
|
|
492
|
+
return result;
|
|
493
|
+
}
|
|
494
|
+
#endif
|
|
495
|
+
};
|
|
496
|
+
|
|
497
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextMarkdownStyleH6Struct &result) {
|
|
498
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
499
|
+
|
|
500
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
501
|
+
if (tmp_fontSize != map.end()) {
|
|
502
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
503
|
+
}
|
|
504
|
+
auto tmp_fontFamily = map.find("fontFamily");
|
|
505
|
+
if (tmp_fontFamily != map.end()) {
|
|
506
|
+
fromRawValue(context, tmp_fontFamily->second, result.fontFamily);
|
|
507
|
+
}
|
|
508
|
+
auto tmp_fontWeight = map.find("fontWeight");
|
|
509
|
+
if (tmp_fontWeight != map.end()) {
|
|
510
|
+
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
511
|
+
}
|
|
512
|
+
auto tmp_color = map.find("color");
|
|
513
|
+
if (tmp_color != map.end()) {
|
|
514
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
515
|
+
}
|
|
516
|
+
auto tmp_marginTop = map.find("marginTop");
|
|
517
|
+
if (tmp_marginTop != map.end()) {
|
|
518
|
+
fromRawValue(context, tmp_marginTop->second, result.marginTop);
|
|
519
|
+
}
|
|
520
|
+
auto tmp_marginBottom = map.find("marginBottom");
|
|
521
|
+
if (tmp_marginBottom != map.end()) {
|
|
522
|
+
fromRawValue(context, tmp_marginBottom->second, result.marginBottom);
|
|
523
|
+
}
|
|
524
|
+
auto tmp_lineHeight = map.find("lineHeight");
|
|
525
|
+
if (tmp_lineHeight != map.end()) {
|
|
526
|
+
fromRawValue(context, tmp_lineHeight->second, result.lineHeight);
|
|
527
|
+
}
|
|
528
|
+
auto tmp_textAlign = map.find("textAlign");
|
|
529
|
+
if (tmp_textAlign != map.end()) {
|
|
530
|
+
fromRawValue(context, tmp_textAlign->second, result.textAlign);
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleH6Struct &value) {
|
|
535
|
+
return "[Object EnrichedMarkdownTextMarkdownStyleH6Struct]";
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
539
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMarkdownStyleH6Struct &value) {
|
|
540
|
+
return value.toDynamic();
|
|
541
|
+
}
|
|
542
|
+
#endif
|
|
543
|
+
|
|
544
|
+
struct EnrichedMarkdownTextMarkdownStyleBlockquoteStruct {
|
|
545
|
+
Float fontSize{0.0};
|
|
546
|
+
std::string fontFamily{};
|
|
547
|
+
std::string fontWeight{};
|
|
548
|
+
SharedColor color{};
|
|
549
|
+
Float marginTop{0.0};
|
|
550
|
+
Float marginBottom{0.0};
|
|
551
|
+
Float lineHeight{0.0};
|
|
552
|
+
SharedColor borderColor{};
|
|
553
|
+
Float borderWidth{0.0};
|
|
554
|
+
Float gapWidth{0.0};
|
|
555
|
+
SharedColor backgroundColor{};
|
|
556
|
+
|
|
557
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
558
|
+
bool operator==(const EnrichedMarkdownTextMarkdownStyleBlockquoteStruct&) const = default;
|
|
559
|
+
|
|
560
|
+
folly::dynamic toDynamic() const {
|
|
561
|
+
folly::dynamic result = folly::dynamic::object();
|
|
562
|
+
result["fontSize"] = fontSize;
|
|
563
|
+
result["fontFamily"] = fontFamily;
|
|
564
|
+
result["fontWeight"] = fontWeight;
|
|
565
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
566
|
+
result["marginTop"] = marginTop;
|
|
567
|
+
result["marginBottom"] = marginBottom;
|
|
568
|
+
result["lineHeight"] = lineHeight;
|
|
569
|
+
result["borderColor"] = ::facebook::react::toDynamic(borderColor);
|
|
570
|
+
result["borderWidth"] = borderWidth;
|
|
571
|
+
result["gapWidth"] = gapWidth;
|
|
572
|
+
result["backgroundColor"] = ::facebook::react::toDynamic(backgroundColor);
|
|
573
|
+
return result;
|
|
574
|
+
}
|
|
575
|
+
#endif
|
|
576
|
+
};
|
|
577
|
+
|
|
578
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextMarkdownStyleBlockquoteStruct &result) {
|
|
579
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
580
|
+
|
|
581
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
582
|
+
if (tmp_fontSize != map.end()) {
|
|
583
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
584
|
+
}
|
|
585
|
+
auto tmp_fontFamily = map.find("fontFamily");
|
|
586
|
+
if (tmp_fontFamily != map.end()) {
|
|
587
|
+
fromRawValue(context, tmp_fontFamily->second, result.fontFamily);
|
|
588
|
+
}
|
|
589
|
+
auto tmp_fontWeight = map.find("fontWeight");
|
|
590
|
+
if (tmp_fontWeight != map.end()) {
|
|
591
|
+
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
592
|
+
}
|
|
593
|
+
auto tmp_color = map.find("color");
|
|
594
|
+
if (tmp_color != map.end()) {
|
|
595
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
596
|
+
}
|
|
597
|
+
auto tmp_marginTop = map.find("marginTop");
|
|
598
|
+
if (tmp_marginTop != map.end()) {
|
|
599
|
+
fromRawValue(context, tmp_marginTop->second, result.marginTop);
|
|
600
|
+
}
|
|
601
|
+
auto tmp_marginBottom = map.find("marginBottom");
|
|
602
|
+
if (tmp_marginBottom != map.end()) {
|
|
603
|
+
fromRawValue(context, tmp_marginBottom->second, result.marginBottom);
|
|
604
|
+
}
|
|
605
|
+
auto tmp_lineHeight = map.find("lineHeight");
|
|
606
|
+
if (tmp_lineHeight != map.end()) {
|
|
607
|
+
fromRawValue(context, tmp_lineHeight->second, result.lineHeight);
|
|
608
|
+
}
|
|
609
|
+
auto tmp_borderColor = map.find("borderColor");
|
|
610
|
+
if (tmp_borderColor != map.end()) {
|
|
611
|
+
fromRawValue(context, tmp_borderColor->second, result.borderColor);
|
|
612
|
+
}
|
|
613
|
+
auto tmp_borderWidth = map.find("borderWidth");
|
|
614
|
+
if (tmp_borderWidth != map.end()) {
|
|
615
|
+
fromRawValue(context, tmp_borderWidth->second, result.borderWidth);
|
|
616
|
+
}
|
|
617
|
+
auto tmp_gapWidth = map.find("gapWidth");
|
|
618
|
+
if (tmp_gapWidth != map.end()) {
|
|
619
|
+
fromRawValue(context, tmp_gapWidth->second, result.gapWidth);
|
|
620
|
+
}
|
|
621
|
+
auto tmp_backgroundColor = map.find("backgroundColor");
|
|
622
|
+
if (tmp_backgroundColor != map.end()) {
|
|
623
|
+
fromRawValue(context, tmp_backgroundColor->second, result.backgroundColor);
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleBlockquoteStruct &value) {
|
|
628
|
+
return "[Object EnrichedMarkdownTextMarkdownStyleBlockquoteStruct]";
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
632
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMarkdownStyleBlockquoteStruct &value) {
|
|
633
|
+
return value.toDynamic();
|
|
634
|
+
}
|
|
635
|
+
#endif
|
|
636
|
+
|
|
637
|
+
struct EnrichedMarkdownTextMarkdownStyleListStruct {
|
|
638
|
+
Float fontSize{0.0};
|
|
639
|
+
std::string fontFamily{};
|
|
640
|
+
std::string fontWeight{};
|
|
641
|
+
SharedColor color{};
|
|
642
|
+
Float marginTop{0.0};
|
|
643
|
+
Float marginBottom{0.0};
|
|
644
|
+
Float lineHeight{0.0};
|
|
645
|
+
SharedColor bulletColor{};
|
|
646
|
+
Float bulletSize{0.0};
|
|
647
|
+
SharedColor markerColor{};
|
|
648
|
+
std::string markerFontWeight{};
|
|
649
|
+
Float gapWidth{0.0};
|
|
650
|
+
Float marginLeft{0.0};
|
|
651
|
+
|
|
652
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
653
|
+
bool operator==(const EnrichedMarkdownTextMarkdownStyleListStruct&) const = default;
|
|
654
|
+
|
|
655
|
+
folly::dynamic toDynamic() const {
|
|
656
|
+
folly::dynamic result = folly::dynamic::object();
|
|
657
|
+
result["fontSize"] = fontSize;
|
|
658
|
+
result["fontFamily"] = fontFamily;
|
|
659
|
+
result["fontWeight"] = fontWeight;
|
|
660
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
661
|
+
result["marginTop"] = marginTop;
|
|
662
|
+
result["marginBottom"] = marginBottom;
|
|
663
|
+
result["lineHeight"] = lineHeight;
|
|
664
|
+
result["bulletColor"] = ::facebook::react::toDynamic(bulletColor);
|
|
665
|
+
result["bulletSize"] = bulletSize;
|
|
666
|
+
result["markerColor"] = ::facebook::react::toDynamic(markerColor);
|
|
667
|
+
result["markerFontWeight"] = markerFontWeight;
|
|
668
|
+
result["gapWidth"] = gapWidth;
|
|
669
|
+
result["marginLeft"] = marginLeft;
|
|
670
|
+
return result;
|
|
671
|
+
}
|
|
672
|
+
#endif
|
|
673
|
+
};
|
|
674
|
+
|
|
675
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextMarkdownStyleListStruct &result) {
|
|
676
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
677
|
+
|
|
678
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
679
|
+
if (tmp_fontSize != map.end()) {
|
|
680
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
681
|
+
}
|
|
682
|
+
auto tmp_fontFamily = map.find("fontFamily");
|
|
683
|
+
if (tmp_fontFamily != map.end()) {
|
|
684
|
+
fromRawValue(context, tmp_fontFamily->second, result.fontFamily);
|
|
685
|
+
}
|
|
686
|
+
auto tmp_fontWeight = map.find("fontWeight");
|
|
687
|
+
if (tmp_fontWeight != map.end()) {
|
|
688
|
+
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
689
|
+
}
|
|
690
|
+
auto tmp_color = map.find("color");
|
|
691
|
+
if (tmp_color != map.end()) {
|
|
692
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
693
|
+
}
|
|
694
|
+
auto tmp_marginTop = map.find("marginTop");
|
|
695
|
+
if (tmp_marginTop != map.end()) {
|
|
696
|
+
fromRawValue(context, tmp_marginTop->second, result.marginTop);
|
|
697
|
+
}
|
|
698
|
+
auto tmp_marginBottom = map.find("marginBottom");
|
|
699
|
+
if (tmp_marginBottom != map.end()) {
|
|
700
|
+
fromRawValue(context, tmp_marginBottom->second, result.marginBottom);
|
|
701
|
+
}
|
|
702
|
+
auto tmp_lineHeight = map.find("lineHeight");
|
|
703
|
+
if (tmp_lineHeight != map.end()) {
|
|
704
|
+
fromRawValue(context, tmp_lineHeight->second, result.lineHeight);
|
|
705
|
+
}
|
|
706
|
+
auto tmp_bulletColor = map.find("bulletColor");
|
|
707
|
+
if (tmp_bulletColor != map.end()) {
|
|
708
|
+
fromRawValue(context, tmp_bulletColor->second, result.bulletColor);
|
|
709
|
+
}
|
|
710
|
+
auto tmp_bulletSize = map.find("bulletSize");
|
|
711
|
+
if (tmp_bulletSize != map.end()) {
|
|
712
|
+
fromRawValue(context, tmp_bulletSize->second, result.bulletSize);
|
|
713
|
+
}
|
|
714
|
+
auto tmp_markerColor = map.find("markerColor");
|
|
715
|
+
if (tmp_markerColor != map.end()) {
|
|
716
|
+
fromRawValue(context, tmp_markerColor->second, result.markerColor);
|
|
717
|
+
}
|
|
718
|
+
auto tmp_markerFontWeight = map.find("markerFontWeight");
|
|
719
|
+
if (tmp_markerFontWeight != map.end()) {
|
|
720
|
+
fromRawValue(context, tmp_markerFontWeight->second, result.markerFontWeight);
|
|
721
|
+
}
|
|
722
|
+
auto tmp_gapWidth = map.find("gapWidth");
|
|
723
|
+
if (tmp_gapWidth != map.end()) {
|
|
724
|
+
fromRawValue(context, tmp_gapWidth->second, result.gapWidth);
|
|
725
|
+
}
|
|
726
|
+
auto tmp_marginLeft = map.find("marginLeft");
|
|
727
|
+
if (tmp_marginLeft != map.end()) {
|
|
728
|
+
fromRawValue(context, tmp_marginLeft->second, result.marginLeft);
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleListStruct &value) {
|
|
733
|
+
return "[Object EnrichedMarkdownTextMarkdownStyleListStruct]";
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
737
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMarkdownStyleListStruct &value) {
|
|
738
|
+
return value.toDynamic();
|
|
739
|
+
}
|
|
740
|
+
#endif
|
|
741
|
+
|
|
742
|
+
struct EnrichedMarkdownTextMarkdownStyleCodeBlockStruct {
|
|
743
|
+
Float fontSize{0.0};
|
|
744
|
+
std::string fontFamily{};
|
|
745
|
+
std::string fontWeight{};
|
|
746
|
+
SharedColor color{};
|
|
747
|
+
Float marginTop{0.0};
|
|
748
|
+
Float marginBottom{0.0};
|
|
749
|
+
Float lineHeight{0.0};
|
|
750
|
+
SharedColor backgroundColor{};
|
|
751
|
+
SharedColor borderColor{};
|
|
752
|
+
Float borderRadius{0.0};
|
|
753
|
+
Float borderWidth{0.0};
|
|
754
|
+
Float padding{0.0};
|
|
755
|
+
|
|
756
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
757
|
+
bool operator==(const EnrichedMarkdownTextMarkdownStyleCodeBlockStruct&) const = default;
|
|
758
|
+
|
|
759
|
+
folly::dynamic toDynamic() const {
|
|
760
|
+
folly::dynamic result = folly::dynamic::object();
|
|
761
|
+
result["fontSize"] = fontSize;
|
|
762
|
+
result["fontFamily"] = fontFamily;
|
|
763
|
+
result["fontWeight"] = fontWeight;
|
|
764
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
765
|
+
result["marginTop"] = marginTop;
|
|
766
|
+
result["marginBottom"] = marginBottom;
|
|
767
|
+
result["lineHeight"] = lineHeight;
|
|
768
|
+
result["backgroundColor"] = ::facebook::react::toDynamic(backgroundColor);
|
|
769
|
+
result["borderColor"] = ::facebook::react::toDynamic(borderColor);
|
|
770
|
+
result["borderRadius"] = borderRadius;
|
|
771
|
+
result["borderWidth"] = borderWidth;
|
|
772
|
+
result["padding"] = padding;
|
|
773
|
+
return result;
|
|
774
|
+
}
|
|
775
|
+
#endif
|
|
776
|
+
};
|
|
777
|
+
|
|
778
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextMarkdownStyleCodeBlockStruct &result) {
|
|
779
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
780
|
+
|
|
781
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
782
|
+
if (tmp_fontSize != map.end()) {
|
|
783
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
784
|
+
}
|
|
785
|
+
auto tmp_fontFamily = map.find("fontFamily");
|
|
786
|
+
if (tmp_fontFamily != map.end()) {
|
|
787
|
+
fromRawValue(context, tmp_fontFamily->second, result.fontFamily);
|
|
788
|
+
}
|
|
789
|
+
auto tmp_fontWeight = map.find("fontWeight");
|
|
790
|
+
if (tmp_fontWeight != map.end()) {
|
|
791
|
+
fromRawValue(context, tmp_fontWeight->second, result.fontWeight);
|
|
792
|
+
}
|
|
793
|
+
auto tmp_color = map.find("color");
|
|
794
|
+
if (tmp_color != map.end()) {
|
|
795
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
796
|
+
}
|
|
797
|
+
auto tmp_marginTop = map.find("marginTop");
|
|
798
|
+
if (tmp_marginTop != map.end()) {
|
|
799
|
+
fromRawValue(context, tmp_marginTop->second, result.marginTop);
|
|
800
|
+
}
|
|
801
|
+
auto tmp_marginBottom = map.find("marginBottom");
|
|
802
|
+
if (tmp_marginBottom != map.end()) {
|
|
803
|
+
fromRawValue(context, tmp_marginBottom->second, result.marginBottom);
|
|
804
|
+
}
|
|
805
|
+
auto tmp_lineHeight = map.find("lineHeight");
|
|
806
|
+
if (tmp_lineHeight != map.end()) {
|
|
807
|
+
fromRawValue(context, tmp_lineHeight->second, result.lineHeight);
|
|
808
|
+
}
|
|
809
|
+
auto tmp_backgroundColor = map.find("backgroundColor");
|
|
810
|
+
if (tmp_backgroundColor != map.end()) {
|
|
811
|
+
fromRawValue(context, tmp_backgroundColor->second, result.backgroundColor);
|
|
812
|
+
}
|
|
813
|
+
auto tmp_borderColor = map.find("borderColor");
|
|
814
|
+
if (tmp_borderColor != map.end()) {
|
|
815
|
+
fromRawValue(context, tmp_borderColor->second, result.borderColor);
|
|
816
|
+
}
|
|
817
|
+
auto tmp_borderRadius = map.find("borderRadius");
|
|
818
|
+
if (tmp_borderRadius != map.end()) {
|
|
819
|
+
fromRawValue(context, tmp_borderRadius->second, result.borderRadius);
|
|
820
|
+
}
|
|
821
|
+
auto tmp_borderWidth = map.find("borderWidth");
|
|
822
|
+
if (tmp_borderWidth != map.end()) {
|
|
823
|
+
fromRawValue(context, tmp_borderWidth->second, result.borderWidth);
|
|
824
|
+
}
|
|
825
|
+
auto tmp_padding = map.find("padding");
|
|
826
|
+
if (tmp_padding != map.end()) {
|
|
827
|
+
fromRawValue(context, tmp_padding->second, result.padding);
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleCodeBlockStruct &value) {
|
|
832
|
+
return "[Object EnrichedMarkdownTextMarkdownStyleCodeBlockStruct]";
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
836
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMarkdownStyleCodeBlockStruct &value) {
|
|
837
|
+
return value.toDynamic();
|
|
838
|
+
}
|
|
839
|
+
#endif
|
|
840
|
+
|
|
841
|
+
struct EnrichedMarkdownTextMarkdownStyleLinkStruct {
|
|
842
|
+
SharedColor color{};
|
|
843
|
+
bool underline{false};
|
|
844
|
+
|
|
845
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
846
|
+
bool operator==(const EnrichedMarkdownTextMarkdownStyleLinkStruct&) const = default;
|
|
847
|
+
|
|
848
|
+
folly::dynamic toDynamic() const {
|
|
849
|
+
folly::dynamic result = folly::dynamic::object();
|
|
850
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
851
|
+
result["underline"] = underline;
|
|
852
|
+
return result;
|
|
853
|
+
}
|
|
854
|
+
#endif
|
|
855
|
+
};
|
|
856
|
+
|
|
857
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextMarkdownStyleLinkStruct &result) {
|
|
858
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
859
|
+
|
|
860
|
+
auto tmp_color = map.find("color");
|
|
861
|
+
if (tmp_color != map.end()) {
|
|
862
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
863
|
+
}
|
|
864
|
+
auto tmp_underline = map.find("underline");
|
|
865
|
+
if (tmp_underline != map.end()) {
|
|
866
|
+
fromRawValue(context, tmp_underline->second, result.underline);
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleLinkStruct &value) {
|
|
871
|
+
return "[Object EnrichedMarkdownTextMarkdownStyleLinkStruct]";
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
875
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMarkdownStyleLinkStruct &value) {
|
|
876
|
+
return value.toDynamic();
|
|
877
|
+
}
|
|
878
|
+
#endif
|
|
879
|
+
|
|
880
|
+
struct EnrichedMarkdownTextMarkdownStyleStrongStruct {
|
|
881
|
+
SharedColor color{};
|
|
882
|
+
|
|
883
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
884
|
+
bool operator==(const EnrichedMarkdownTextMarkdownStyleStrongStruct&) const = default;
|
|
885
|
+
|
|
886
|
+
folly::dynamic toDynamic() const {
|
|
887
|
+
folly::dynamic result = folly::dynamic::object();
|
|
888
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
889
|
+
return result;
|
|
890
|
+
}
|
|
891
|
+
#endif
|
|
892
|
+
};
|
|
893
|
+
|
|
894
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextMarkdownStyleStrongStruct &result) {
|
|
895
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
896
|
+
|
|
897
|
+
auto tmp_color = map.find("color");
|
|
898
|
+
if (tmp_color != map.end()) {
|
|
899
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleStrongStruct &value) {
|
|
904
|
+
return "[Object EnrichedMarkdownTextMarkdownStyleStrongStruct]";
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
908
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMarkdownStyleStrongStruct &value) {
|
|
909
|
+
return value.toDynamic();
|
|
910
|
+
}
|
|
911
|
+
#endif
|
|
912
|
+
|
|
913
|
+
struct EnrichedMarkdownTextMarkdownStyleEmStruct {
|
|
914
|
+
SharedColor color{};
|
|
915
|
+
|
|
916
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
917
|
+
bool operator==(const EnrichedMarkdownTextMarkdownStyleEmStruct&) const = default;
|
|
918
|
+
|
|
919
|
+
folly::dynamic toDynamic() const {
|
|
920
|
+
folly::dynamic result = folly::dynamic::object();
|
|
921
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
922
|
+
return result;
|
|
923
|
+
}
|
|
924
|
+
#endif
|
|
925
|
+
};
|
|
926
|
+
|
|
927
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextMarkdownStyleEmStruct &result) {
|
|
928
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
929
|
+
|
|
930
|
+
auto tmp_color = map.find("color");
|
|
931
|
+
if (tmp_color != map.end()) {
|
|
932
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleEmStruct &value) {
|
|
937
|
+
return "[Object EnrichedMarkdownTextMarkdownStyleEmStruct]";
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
941
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMarkdownStyleEmStruct &value) {
|
|
942
|
+
return value.toDynamic();
|
|
943
|
+
}
|
|
944
|
+
#endif
|
|
945
|
+
|
|
946
|
+
struct EnrichedMarkdownTextMarkdownStyleStrikethroughStruct {
|
|
947
|
+
SharedColor color{};
|
|
948
|
+
|
|
949
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
950
|
+
bool operator==(const EnrichedMarkdownTextMarkdownStyleStrikethroughStruct&) const = default;
|
|
951
|
+
|
|
952
|
+
folly::dynamic toDynamic() const {
|
|
953
|
+
folly::dynamic result = folly::dynamic::object();
|
|
954
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
955
|
+
return result;
|
|
956
|
+
}
|
|
957
|
+
#endif
|
|
958
|
+
};
|
|
959
|
+
|
|
960
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextMarkdownStyleStrikethroughStruct &result) {
|
|
961
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
962
|
+
|
|
963
|
+
auto tmp_color = map.find("color");
|
|
964
|
+
if (tmp_color != map.end()) {
|
|
965
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleStrikethroughStruct &value) {
|
|
970
|
+
return "[Object EnrichedMarkdownTextMarkdownStyleStrikethroughStruct]";
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
974
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMarkdownStyleStrikethroughStruct &value) {
|
|
975
|
+
return value.toDynamic();
|
|
976
|
+
}
|
|
977
|
+
#endif
|
|
978
|
+
|
|
979
|
+
struct EnrichedMarkdownTextMarkdownStyleUnderlineStruct {
|
|
980
|
+
SharedColor color{};
|
|
981
|
+
|
|
982
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
983
|
+
bool operator==(const EnrichedMarkdownTextMarkdownStyleUnderlineStruct&) const = default;
|
|
984
|
+
|
|
985
|
+
folly::dynamic toDynamic() const {
|
|
986
|
+
folly::dynamic result = folly::dynamic::object();
|
|
987
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
988
|
+
return result;
|
|
989
|
+
}
|
|
990
|
+
#endif
|
|
991
|
+
};
|
|
992
|
+
|
|
993
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextMarkdownStyleUnderlineStruct &result) {
|
|
994
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
995
|
+
|
|
996
|
+
auto tmp_color = map.find("color");
|
|
997
|
+
if (tmp_color != map.end()) {
|
|
998
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleUnderlineStruct &value) {
|
|
1003
|
+
return "[Object EnrichedMarkdownTextMarkdownStyleUnderlineStruct]";
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1007
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMarkdownStyleUnderlineStruct &value) {
|
|
1008
|
+
return value.toDynamic();
|
|
1009
|
+
}
|
|
1010
|
+
#endif
|
|
1011
|
+
|
|
1012
|
+
struct EnrichedMarkdownTextMarkdownStyleCodeStruct {
|
|
1013
|
+
SharedColor color{};
|
|
1014
|
+
SharedColor backgroundColor{};
|
|
1015
|
+
SharedColor borderColor{};
|
|
1016
|
+
|
|
1017
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1018
|
+
bool operator==(const EnrichedMarkdownTextMarkdownStyleCodeStruct&) const = default;
|
|
1019
|
+
|
|
1020
|
+
folly::dynamic toDynamic() const {
|
|
1021
|
+
folly::dynamic result = folly::dynamic::object();
|
|
1022
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
1023
|
+
result["backgroundColor"] = ::facebook::react::toDynamic(backgroundColor);
|
|
1024
|
+
result["borderColor"] = ::facebook::react::toDynamic(borderColor);
|
|
1025
|
+
return result;
|
|
1026
|
+
}
|
|
1027
|
+
#endif
|
|
1028
|
+
};
|
|
1029
|
+
|
|
1030
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextMarkdownStyleCodeStruct &result) {
|
|
1031
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
1032
|
+
|
|
1033
|
+
auto tmp_color = map.find("color");
|
|
1034
|
+
if (tmp_color != map.end()) {
|
|
1035
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
1036
|
+
}
|
|
1037
|
+
auto tmp_backgroundColor = map.find("backgroundColor");
|
|
1038
|
+
if (tmp_backgroundColor != map.end()) {
|
|
1039
|
+
fromRawValue(context, tmp_backgroundColor->second, result.backgroundColor);
|
|
1040
|
+
}
|
|
1041
|
+
auto tmp_borderColor = map.find("borderColor");
|
|
1042
|
+
if (tmp_borderColor != map.end()) {
|
|
1043
|
+
fromRawValue(context, tmp_borderColor->second, result.borderColor);
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleCodeStruct &value) {
|
|
1048
|
+
return "[Object EnrichedMarkdownTextMarkdownStyleCodeStruct]";
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1052
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMarkdownStyleCodeStruct &value) {
|
|
1053
|
+
return value.toDynamic();
|
|
1054
|
+
}
|
|
1055
|
+
#endif
|
|
1056
|
+
|
|
1057
|
+
struct EnrichedMarkdownTextMarkdownStyleImageStruct {
|
|
1058
|
+
Float height{0.0};
|
|
1059
|
+
Float borderRadius{0.0};
|
|
1060
|
+
Float marginTop{0.0};
|
|
1061
|
+
Float marginBottom{0.0};
|
|
1062
|
+
|
|
1063
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1064
|
+
bool operator==(const EnrichedMarkdownTextMarkdownStyleImageStruct&) const = default;
|
|
1065
|
+
|
|
1066
|
+
folly::dynamic toDynamic() const {
|
|
1067
|
+
folly::dynamic result = folly::dynamic::object();
|
|
1068
|
+
result["height"] = height;
|
|
1069
|
+
result["borderRadius"] = borderRadius;
|
|
1070
|
+
result["marginTop"] = marginTop;
|
|
1071
|
+
result["marginBottom"] = marginBottom;
|
|
1072
|
+
return result;
|
|
1073
|
+
}
|
|
1074
|
+
#endif
|
|
1075
|
+
};
|
|
1076
|
+
|
|
1077
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextMarkdownStyleImageStruct &result) {
|
|
1078
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
1079
|
+
|
|
1080
|
+
auto tmp_height = map.find("height");
|
|
1081
|
+
if (tmp_height != map.end()) {
|
|
1082
|
+
fromRawValue(context, tmp_height->second, result.height);
|
|
1083
|
+
}
|
|
1084
|
+
auto tmp_borderRadius = map.find("borderRadius");
|
|
1085
|
+
if (tmp_borderRadius != map.end()) {
|
|
1086
|
+
fromRawValue(context, tmp_borderRadius->second, result.borderRadius);
|
|
1087
|
+
}
|
|
1088
|
+
auto tmp_marginTop = map.find("marginTop");
|
|
1089
|
+
if (tmp_marginTop != map.end()) {
|
|
1090
|
+
fromRawValue(context, tmp_marginTop->second, result.marginTop);
|
|
1091
|
+
}
|
|
1092
|
+
auto tmp_marginBottom = map.find("marginBottom");
|
|
1093
|
+
if (tmp_marginBottom != map.end()) {
|
|
1094
|
+
fromRawValue(context, tmp_marginBottom->second, result.marginBottom);
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleImageStruct &value) {
|
|
1099
|
+
return "[Object EnrichedMarkdownTextMarkdownStyleImageStruct]";
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1103
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMarkdownStyleImageStruct &value) {
|
|
1104
|
+
return value.toDynamic();
|
|
1105
|
+
}
|
|
1106
|
+
#endif
|
|
1107
|
+
|
|
1108
|
+
struct EnrichedMarkdownTextMarkdownStyleInlineImageStruct {
|
|
1109
|
+
Float size{0.0};
|
|
1110
|
+
|
|
1111
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1112
|
+
bool operator==(const EnrichedMarkdownTextMarkdownStyleInlineImageStruct&) const = default;
|
|
1113
|
+
|
|
1114
|
+
folly::dynamic toDynamic() const {
|
|
1115
|
+
folly::dynamic result = folly::dynamic::object();
|
|
1116
|
+
result["size"] = size;
|
|
1117
|
+
return result;
|
|
1118
|
+
}
|
|
1119
|
+
#endif
|
|
1120
|
+
};
|
|
1121
|
+
|
|
1122
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextMarkdownStyleInlineImageStruct &result) {
|
|
1123
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
1124
|
+
|
|
1125
|
+
auto tmp_size = map.find("size");
|
|
1126
|
+
if (tmp_size != map.end()) {
|
|
1127
|
+
fromRawValue(context, tmp_size->second, result.size);
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleInlineImageStruct &value) {
|
|
1132
|
+
return "[Object EnrichedMarkdownTextMarkdownStyleInlineImageStruct]";
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1136
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMarkdownStyleInlineImageStruct &value) {
|
|
1137
|
+
return value.toDynamic();
|
|
1138
|
+
}
|
|
1139
|
+
#endif
|
|
1140
|
+
|
|
1141
|
+
struct EnrichedMarkdownTextMarkdownStyleThematicBreakStruct {
|
|
1142
|
+
SharedColor color{};
|
|
1143
|
+
Float height{0.0};
|
|
1144
|
+
Float marginTop{0.0};
|
|
1145
|
+
Float marginBottom{0.0};
|
|
1146
|
+
|
|
1147
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1148
|
+
bool operator==(const EnrichedMarkdownTextMarkdownStyleThematicBreakStruct&) const = default;
|
|
1149
|
+
|
|
1150
|
+
folly::dynamic toDynamic() const {
|
|
1151
|
+
folly::dynamic result = folly::dynamic::object();
|
|
1152
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
1153
|
+
result["height"] = height;
|
|
1154
|
+
result["marginTop"] = marginTop;
|
|
1155
|
+
result["marginBottom"] = marginBottom;
|
|
1156
|
+
return result;
|
|
1157
|
+
}
|
|
1158
|
+
#endif
|
|
1159
|
+
};
|
|
1160
|
+
|
|
1161
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextMarkdownStyleThematicBreakStruct &result) {
|
|
1162
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
1163
|
+
|
|
1164
|
+
auto tmp_color = map.find("color");
|
|
1165
|
+
if (tmp_color != map.end()) {
|
|
1166
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
1167
|
+
}
|
|
1168
|
+
auto tmp_height = map.find("height");
|
|
1169
|
+
if (tmp_height != map.end()) {
|
|
1170
|
+
fromRawValue(context, tmp_height->second, result.height);
|
|
1171
|
+
}
|
|
1172
|
+
auto tmp_marginTop = map.find("marginTop");
|
|
1173
|
+
if (tmp_marginTop != map.end()) {
|
|
1174
|
+
fromRawValue(context, tmp_marginTop->second, result.marginTop);
|
|
1175
|
+
}
|
|
1176
|
+
auto tmp_marginBottom = map.find("marginBottom");
|
|
1177
|
+
if (tmp_marginBottom != map.end()) {
|
|
1178
|
+
fromRawValue(context, tmp_marginBottom->second, result.marginBottom);
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleThematicBreakStruct &value) {
|
|
1183
|
+
return "[Object EnrichedMarkdownTextMarkdownStyleThematicBreakStruct]";
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1187
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMarkdownStyleThematicBreakStruct &value) {
|
|
1188
|
+
return value.toDynamic();
|
|
1189
|
+
}
|
|
1190
|
+
#endif
|
|
1191
|
+
|
|
1192
|
+
struct EnrichedMarkdownTextMarkdownStyleStruct {
|
|
1193
|
+
EnrichedMarkdownTextMarkdownStyleParagraphStruct paragraph{};
|
|
1194
|
+
EnrichedMarkdownTextMarkdownStyleH1Struct h1{};
|
|
1195
|
+
EnrichedMarkdownTextMarkdownStyleH2Struct h2{};
|
|
1196
|
+
EnrichedMarkdownTextMarkdownStyleH3Struct h3{};
|
|
1197
|
+
EnrichedMarkdownTextMarkdownStyleH4Struct h4{};
|
|
1198
|
+
EnrichedMarkdownTextMarkdownStyleH5Struct h5{};
|
|
1199
|
+
EnrichedMarkdownTextMarkdownStyleH6Struct h6{};
|
|
1200
|
+
EnrichedMarkdownTextMarkdownStyleBlockquoteStruct blockquote{};
|
|
1201
|
+
EnrichedMarkdownTextMarkdownStyleListStruct list{};
|
|
1202
|
+
EnrichedMarkdownTextMarkdownStyleCodeBlockStruct codeBlock{};
|
|
1203
|
+
EnrichedMarkdownTextMarkdownStyleLinkStruct link{};
|
|
1204
|
+
EnrichedMarkdownTextMarkdownStyleStrongStruct strong{};
|
|
1205
|
+
EnrichedMarkdownTextMarkdownStyleEmStruct em{};
|
|
1206
|
+
EnrichedMarkdownTextMarkdownStyleStrikethroughStruct strikethrough{};
|
|
1207
|
+
EnrichedMarkdownTextMarkdownStyleUnderlineStruct underline{};
|
|
1208
|
+
EnrichedMarkdownTextMarkdownStyleCodeStruct code{};
|
|
1209
|
+
EnrichedMarkdownTextMarkdownStyleImageStruct image{};
|
|
1210
|
+
EnrichedMarkdownTextMarkdownStyleInlineImageStruct inlineImage{};
|
|
1211
|
+
EnrichedMarkdownTextMarkdownStyleThematicBreakStruct thematicBreak{};
|
|
1212
|
+
|
|
1213
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1214
|
+
bool operator==(const EnrichedMarkdownTextMarkdownStyleStruct&) const = default;
|
|
1215
|
+
|
|
1216
|
+
folly::dynamic toDynamic() const {
|
|
1217
|
+
folly::dynamic result = folly::dynamic::object();
|
|
1218
|
+
result["paragraph"] = ::facebook::react::toDynamic(paragraph);
|
|
1219
|
+
result["h1"] = ::facebook::react::toDynamic(h1);
|
|
1220
|
+
result["h2"] = ::facebook::react::toDynamic(h2);
|
|
1221
|
+
result["h3"] = ::facebook::react::toDynamic(h3);
|
|
1222
|
+
result["h4"] = ::facebook::react::toDynamic(h4);
|
|
1223
|
+
result["h5"] = ::facebook::react::toDynamic(h5);
|
|
1224
|
+
result["h6"] = ::facebook::react::toDynamic(h6);
|
|
1225
|
+
result["blockquote"] = ::facebook::react::toDynamic(blockquote);
|
|
1226
|
+
result["list"] = ::facebook::react::toDynamic(list);
|
|
1227
|
+
result["codeBlock"] = ::facebook::react::toDynamic(codeBlock);
|
|
1228
|
+
result["link"] = ::facebook::react::toDynamic(link);
|
|
1229
|
+
result["strong"] = ::facebook::react::toDynamic(strong);
|
|
1230
|
+
result["em"] = ::facebook::react::toDynamic(em);
|
|
1231
|
+
result["strikethrough"] = ::facebook::react::toDynamic(strikethrough);
|
|
1232
|
+
result["underline"] = ::facebook::react::toDynamic(underline);
|
|
1233
|
+
result["code"] = ::facebook::react::toDynamic(code);
|
|
1234
|
+
result["image"] = ::facebook::react::toDynamic(image);
|
|
1235
|
+
result["inlineImage"] = ::facebook::react::toDynamic(inlineImage);
|
|
1236
|
+
result["thematicBreak"] = ::facebook::react::toDynamic(thematicBreak);
|
|
1237
|
+
return result;
|
|
1238
|
+
}
|
|
1239
|
+
#endif
|
|
1240
|
+
};
|
|
1241
|
+
|
|
1242
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextMarkdownStyleStruct &result) {
|
|
1243
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
1244
|
+
|
|
1245
|
+
auto tmp_paragraph = map.find("paragraph");
|
|
1246
|
+
if (tmp_paragraph != map.end()) {
|
|
1247
|
+
fromRawValue(context, tmp_paragraph->second, result.paragraph);
|
|
1248
|
+
}
|
|
1249
|
+
auto tmp_h1 = map.find("h1");
|
|
1250
|
+
if (tmp_h1 != map.end()) {
|
|
1251
|
+
fromRawValue(context, tmp_h1->second, result.h1);
|
|
1252
|
+
}
|
|
1253
|
+
auto tmp_h2 = map.find("h2");
|
|
1254
|
+
if (tmp_h2 != map.end()) {
|
|
1255
|
+
fromRawValue(context, tmp_h2->second, result.h2);
|
|
1256
|
+
}
|
|
1257
|
+
auto tmp_h3 = map.find("h3");
|
|
1258
|
+
if (tmp_h3 != map.end()) {
|
|
1259
|
+
fromRawValue(context, tmp_h3->second, result.h3);
|
|
1260
|
+
}
|
|
1261
|
+
auto tmp_h4 = map.find("h4");
|
|
1262
|
+
if (tmp_h4 != map.end()) {
|
|
1263
|
+
fromRawValue(context, tmp_h4->second, result.h4);
|
|
1264
|
+
}
|
|
1265
|
+
auto tmp_h5 = map.find("h5");
|
|
1266
|
+
if (tmp_h5 != map.end()) {
|
|
1267
|
+
fromRawValue(context, tmp_h5->second, result.h5);
|
|
1268
|
+
}
|
|
1269
|
+
auto tmp_h6 = map.find("h6");
|
|
1270
|
+
if (tmp_h6 != map.end()) {
|
|
1271
|
+
fromRawValue(context, tmp_h6->second, result.h6);
|
|
1272
|
+
}
|
|
1273
|
+
auto tmp_blockquote = map.find("blockquote");
|
|
1274
|
+
if (tmp_blockquote != map.end()) {
|
|
1275
|
+
fromRawValue(context, tmp_blockquote->second, result.blockquote);
|
|
1276
|
+
}
|
|
1277
|
+
auto tmp_list = map.find("list");
|
|
1278
|
+
if (tmp_list != map.end()) {
|
|
1279
|
+
fromRawValue(context, tmp_list->second, result.list);
|
|
1280
|
+
}
|
|
1281
|
+
auto tmp_codeBlock = map.find("codeBlock");
|
|
1282
|
+
if (tmp_codeBlock != map.end()) {
|
|
1283
|
+
fromRawValue(context, tmp_codeBlock->second, result.codeBlock);
|
|
1284
|
+
}
|
|
1285
|
+
auto tmp_link = map.find("link");
|
|
1286
|
+
if (tmp_link != map.end()) {
|
|
1287
|
+
fromRawValue(context, tmp_link->second, result.link);
|
|
1288
|
+
}
|
|
1289
|
+
auto tmp_strong = map.find("strong");
|
|
1290
|
+
if (tmp_strong != map.end()) {
|
|
1291
|
+
fromRawValue(context, tmp_strong->second, result.strong);
|
|
1292
|
+
}
|
|
1293
|
+
auto tmp_em = map.find("em");
|
|
1294
|
+
if (tmp_em != map.end()) {
|
|
1295
|
+
fromRawValue(context, tmp_em->second, result.em);
|
|
1296
|
+
}
|
|
1297
|
+
auto tmp_strikethrough = map.find("strikethrough");
|
|
1298
|
+
if (tmp_strikethrough != map.end()) {
|
|
1299
|
+
fromRawValue(context, tmp_strikethrough->second, result.strikethrough);
|
|
1300
|
+
}
|
|
1301
|
+
auto tmp_underline = map.find("underline");
|
|
1302
|
+
if (tmp_underline != map.end()) {
|
|
1303
|
+
fromRawValue(context, tmp_underline->second, result.underline);
|
|
1304
|
+
}
|
|
1305
|
+
auto tmp_code = map.find("code");
|
|
1306
|
+
if (tmp_code != map.end()) {
|
|
1307
|
+
fromRawValue(context, tmp_code->second, result.code);
|
|
1308
|
+
}
|
|
1309
|
+
auto tmp_image = map.find("image");
|
|
1310
|
+
if (tmp_image != map.end()) {
|
|
1311
|
+
fromRawValue(context, tmp_image->second, result.image);
|
|
1312
|
+
}
|
|
1313
|
+
auto tmp_inlineImage = map.find("inlineImage");
|
|
1314
|
+
if (tmp_inlineImage != map.end()) {
|
|
1315
|
+
fromRawValue(context, tmp_inlineImage->second, result.inlineImage);
|
|
1316
|
+
}
|
|
1317
|
+
auto tmp_thematicBreak = map.find("thematicBreak");
|
|
1318
|
+
if (tmp_thematicBreak != map.end()) {
|
|
1319
|
+
fromRawValue(context, tmp_thematicBreak->second, result.thematicBreak);
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
static inline std::string toString(const EnrichedMarkdownTextMarkdownStyleStruct &value) {
|
|
1324
|
+
return "[Object EnrichedMarkdownTextMarkdownStyleStruct]";
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1328
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMarkdownStyleStruct &value) {
|
|
1329
|
+
return value.toDynamic();
|
|
1330
|
+
}
|
|
1331
|
+
#endif
|
|
1332
|
+
|
|
1333
|
+
struct EnrichedMarkdownTextMd4cFlagsStruct {
|
|
1334
|
+
bool underline{false};
|
|
1335
|
+
|
|
1336
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1337
|
+
bool operator==(const EnrichedMarkdownTextMd4cFlagsStruct&) const = default;
|
|
1338
|
+
|
|
1339
|
+
folly::dynamic toDynamic() const {
|
|
1340
|
+
folly::dynamic result = folly::dynamic::object();
|
|
1341
|
+
result["underline"] = underline;
|
|
1342
|
+
return result;
|
|
1343
|
+
}
|
|
1344
|
+
#endif
|
|
1345
|
+
};
|
|
1346
|
+
|
|
1347
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedMarkdownTextMd4cFlagsStruct &result) {
|
|
1348
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
1349
|
+
|
|
1350
|
+
auto tmp_underline = map.find("underline");
|
|
1351
|
+
if (tmp_underline != map.end()) {
|
|
1352
|
+
fromRawValue(context, tmp_underline->second, result.underline);
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
static inline std::string toString(const EnrichedMarkdownTextMd4cFlagsStruct &value) {
|
|
1357
|
+
return "[Object EnrichedMarkdownTextMd4cFlagsStruct]";
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1361
|
+
static inline folly::dynamic toDynamic(const EnrichedMarkdownTextMd4cFlagsStruct &value) {
|
|
1362
|
+
return value.toDynamic();
|
|
1363
|
+
}
|
|
1364
|
+
#endif
|
|
1365
|
+
class EnrichedMarkdownTextProps final : public ViewProps {
|
|
1366
|
+
public:
|
|
1367
|
+
EnrichedMarkdownTextProps() = default;
|
|
1368
|
+
EnrichedMarkdownTextProps(const PropsParserContext& context, const EnrichedMarkdownTextProps &sourceProps, const RawProps &rawProps);
|
|
1369
|
+
|
|
1370
|
+
#pragma mark - Props
|
|
1371
|
+
|
|
1372
|
+
std::string markdown{};
|
|
1373
|
+
EnrichedMarkdownTextMarkdownStyleStruct markdownStyle{};
|
|
1374
|
+
bool enableLinkPreview{true};
|
|
1375
|
+
bool selectable{false};
|
|
1376
|
+
EnrichedMarkdownTextMd4cFlagsStruct md4cFlags{};
|
|
1377
|
+
bool allowFontScaling{true};
|
|
1378
|
+
Float maxFontSizeMultiplier{0.0};
|
|
1379
|
+
bool allowTrailingMargin{false};
|
|
1380
|
+
|
|
1381
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1382
|
+
ComponentName getDiffPropsImplementationTarget() const override;
|
|
1383
|
+
|
|
1384
|
+
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
|
1385
|
+
#endif
|
|
1386
|
+
};
|
|
1387
|
+
|
|
1388
|
+
} // namespace facebook::react
|