react-native-enriched-html 0.0.0 → 1.1.0-nightly-20260617-3dfd09072
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 +402 -0
- package/ReactNativeEnrichedHtml.podspec +31 -0
- package/android/build.gradle +106 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedTextInputViewManagerDelegate.java +203 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedTextInputViewManagerInterface.java +74 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedTextViewManagerDelegate.java +70 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedTextViewManagerInterface.java +31 -0
- package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/ComponentDescriptors.cpp +22 -0
- package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/ComponentDescriptors.h +24 -0
- package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/EventEmitters.cpp +456 -0
- package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/EventEmitters.h +410 -0
- package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/Props.cpp +272 -0
- package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/Props.h +1595 -0
- package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/ShadowNodes.cpp +17 -0
- package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/ShadowNodes.h +23 -0
- package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/States.cpp +16 -0
- package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/States.h +20 -0
- package/android/gradle.properties +5 -0
- package/android/lint.gradle +70 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/AndroidManifestNew.xml +2 -0
- package/android/src/main/java/com/swmansion/enriched/ReactNativeEnrichedPackage.kt +22 -0
- package/android/src/main/java/com/swmansion/enriched/common/AllowFontScaling.kt +36 -0
- package/android/src/main/java/com/swmansion/enriched/common/AsyncDrawable.kt +126 -0
- package/android/src/main/java/com/swmansion/enriched/common/CheckboxDrawable.kt +81 -0
- package/android/src/main/java/com/swmansion/enriched/common/EnrichedConstants.kt +16 -0
- package/android/src/main/java/com/swmansion/enriched/common/EnrichedStyle.kt +57 -0
- package/android/src/main/java/com/swmansion/enriched/common/ForceRedrawSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/common/GumboNormalizer.kt +5 -0
- package/android/src/main/java/com/swmansion/enriched/common/MentionStyle.kt +9 -0
- package/android/src/main/java/com/swmansion/enriched/common/ResourceManager.kt +26 -0
- package/android/src/main/java/com/swmansion/enriched/common/parser/EnrichedParser.java +1034 -0
- package/android/src/main/java/com/swmansion/enriched/common/parser/EnrichedSpanFactory.kt +82 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedAlignmentSpan.kt +19 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedBlockQuoteSpan.kt +53 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedBoldSpan.kt +12 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedCheckboxListSpan.kt +92 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedCodeBlockSpan.kt +81 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedH1Span.kt +20 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedH2Span.kt +20 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedH3Span.kt +20 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedH4Span.kt +21 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedH5Span.kt +20 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedH6Span.kt +20 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedImageSpan.kt +185 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedInlineCodeSpan.kt +24 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedItalicSpan.kt +12 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedLinkSpan.kt +29 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedMentionSpan.kt +35 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedOrderedListSpan.kt +79 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedStrikeThroughSpan.kt +11 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedUnderlineSpan.kt +11 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedUnorderedListSpan.kt +62 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/interfaces/EnrichedBlockSpan.kt +5 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/interfaces/EnrichedHeadingSpan.kt +3 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/interfaces/EnrichedInlineSpan.kt +3 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/interfaces/EnrichedParagraphSpan.kt +5 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/interfaces/EnrichedSpan.kt +3 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/interfaces/EnrichedZeroWidthSpaceSpan.kt +4 -0
- package/android/src/main/java/com/swmansion/enriched/text/EnrichedTextMovementMethod.kt +75 -0
- package/android/src/main/java/com/swmansion/enriched/text/EnrichedTextSpanFactory.kt +83 -0
- package/android/src/main/java/com/swmansion/enriched/text/EnrichedTextStyle.kt +202 -0
- package/android/src/main/java/com/swmansion/enriched/text/EnrichedTextView.kt +361 -0
- package/android/src/main/java/com/swmansion/enriched/text/EnrichedTextViewManager.kt +157 -0
- package/android/src/main/java/com/swmansion/enriched/text/MeasurementStore.kt +170 -0
- package/android/src/main/java/com/swmansion/enriched/text/events/OnLinkPressEvent.kt +23 -0
- package/android/src/main/java/com/swmansion/enriched/text/events/OnMentionPressEvent.kt +32 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextAlignmentSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextBlockQuoteSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextBoldSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextCheckboxListSpan.kt +15 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextCodeBlockSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextH1Span.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextH2Span.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextH3Span.kt +15 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextH4Span.kt +15 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextH5Span.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextH6Span.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextImageSpan.kt +57 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextInlineCodeSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextItalicSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextLinkSpan.kt +41 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextMentionSpan.kt +63 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextOrderedListSpan.kt +16 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextStrikeThroughSpan.kt +15 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextUnderlineSpan.kt +15 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/EnrichedTextUnorderedListSpan.kt +15 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/interfaces/EnrichedTextClickableSpan.kt +9 -0
- package/android/src/main/java/com/swmansion/enriched/text/spans/interfaces/EnrichedTextSpan.kt +10 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/EnrichedTextInputConnectionWrapper.kt +140 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/EnrichedTextInputSpannableFactory.kt +85 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/EnrichedTextInputView.kt +1141 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/EnrichedTextInputViewLayoutManager.kt +27 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/EnrichedTextInputViewManager.kt +500 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/MeasurementStore.kt +230 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/MentionHandler.kt +55 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnChangeHtmlEvent.kt +27 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnChangeSelectionEvent.kt +30 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnChangeStateEvent.kt +21 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnChangeTextEvent.kt +30 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnContextMenuItemPressEvent.kt +35 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnInputBlurEvent.kt +25 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnInputFocusEvent.kt +25 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnInputKeyPressEvent.kt +27 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnLinkDetectedEvent.kt +32 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnMentionDetectedEvent.kt +30 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnMentionEvent.kt +34 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnPasteImagesEvent.kt +47 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnRequestHtmlResultEvent.kt +32 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnSubmitEditingEvent.kt +29 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputAlignmentSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputBlockQuoteSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputBoldSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputCheckboxListSpan.kt +15 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputCodeBlockSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputH1Span.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputH2Span.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputH3Span.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputH4Span.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputH5Span.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputH6Span.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputImageSpan.kt +36 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputInlineCodeSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputItalicSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputLinkSpan.kt +16 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputMentionSpan.kt +18 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputOrderedListSpan.kt +21 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputStrikeThroughSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputUnderlineSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputUnorderedListSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedLineHeightSpan.kt +45 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedSpans.kt +240 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/interfaces/EnrichedInputSpan.kt +10 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/styles/AlignmentStyles.kt +367 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/styles/HtmlStyle.kt +371 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/styles/InlineStyles.kt +232 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/styles/ListStyles.kt +260 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/styles/ParagraphStyles.kt +439 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/styles/ParametrizedStyles.kt +408 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/EnrichedEditableFactory.kt +17 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/EnrichedSelection.kt +340 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/EnrichedSpanState.kt +318 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/EnrichedSpannable.kt +156 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/EnrichedSpannableStringBuilder.kt +59 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/RichContentReceiver.kt +127 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/ShortcutsHandler.kt +150 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/StyleUtils.kt +51 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/Utils.kt +106 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/watchers/EnrichedSpanWatcher.kt +109 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/watchers/EnrichedTextWatcher.kt +106 -0
- package/android/src/main/new_arch/CMakeLists.txt +62 -0
- package/android/src/main/new_arch/GumboNormalizerJni.cpp +14 -0
- package/android/src/main/new_arch/ReactNativeEnrichedSpec.cpp +11 -0
- package/android/src/main/new_arch/ReactNativeEnrichedSpec.h +16 -0
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/EnrichedTextComponentDescriptor.h +32 -0
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/EnrichedTextInputComponentDescriptor.h +35 -0
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/EnrichedTextInputMeasurementManager.cpp +53 -0
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/EnrichedTextInputMeasurementManager.h +25 -0
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/EnrichedTextInputShadowNode.cpp +35 -0
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/EnrichedTextInputShadowNode.h +53 -0
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/EnrichedTextInputState.cpp +9 -0
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/EnrichedTextInputState.h +24 -0
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/EnrichedTextMeasurementManager.cpp +45 -0
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/EnrichedTextMeasurementManager.h +25 -0
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/EnrichedTextShadowNode.cpp +21 -0
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/EnrichedTextShadowNode.h +39 -0
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/conversions.h +44 -0
- package/android/src/main/res/drawable/broken_image.xml +10 -0
- package/cpp/CMakeLists.txt +50 -0
- package/cpp/GumboParser/GumboParser.h +34043 -0
- package/cpp/README.md +59 -0
- package/cpp/parser/GumboNormalizer.c +915 -0
- package/cpp/parser/GumboParser.cpp +16 -0
- package/cpp/parser/GumboParser.hpp +23 -0
- package/cpp/tests/GumboParserTest.cpp +457 -0
- package/ios/EnrichedTextInputView.h +54 -0
- package/ios/EnrichedTextInputView.mm +2170 -0
- package/ios/EnrichedTextInputViewManager.mm +13 -0
- package/ios/EnrichedTextView.h +35 -0
- package/ios/EnrichedTextView.mm +806 -0
- package/ios/EnrichedTextViewManager.mm +13 -0
- package/ios/config/EnrichedConfig.h +114 -0
- package/ios/config/EnrichedConfig.mm +727 -0
- package/ios/enrichedInputTextView/EnrichedInputTextView.h +6 -0
- package/ios/enrichedInputTextView/EnrichedInputTextView.mm +334 -0
- package/ios/enrichedTextTextView/EnrichedTextTextView.h +16 -0
- package/ios/enrichedTextTextView/EnrichedTextTextView.mm +71 -0
- package/ios/extensions/ColorExtension.h +8 -0
- package/ios/extensions/ColorExtension.mm +48 -0
- package/ios/extensions/FontExtension.h +11 -0
- package/ios/extensions/FontExtension.mm +72 -0
- package/ios/extensions/ImageExtension.h +33 -0
- package/ios/extensions/ImageExtension.mm +176 -0
- package/ios/extensions/LayoutManagerExtension.h +6 -0
- package/ios/extensions/LayoutManagerExtension.mm +454 -0
- package/ios/extensions/StringExtension.h +15 -0
- package/ios/extensions/StringExtension.mm +69 -0
- package/ios/generated/ReactNativeEnrichedSpec/ComponentDescriptors.cpp +22 -0
- package/ios/generated/ReactNativeEnrichedSpec/ComponentDescriptors.h +24 -0
- package/ios/generated/ReactNativeEnrichedSpec/EventEmitters.cpp +456 -0
- package/ios/generated/ReactNativeEnrichedSpec/EventEmitters.h +410 -0
- package/ios/generated/ReactNativeEnrichedSpec/Props.cpp +272 -0
- package/ios/generated/ReactNativeEnrichedSpec/Props.h +1595 -0
- package/ios/generated/ReactNativeEnrichedSpec/RCTComponentViewHelpers.h +570 -0
- package/ios/generated/ReactNativeEnrichedSpec/ShadowNodes.cpp +17 -0
- package/ios/generated/ReactNativeEnrichedSpec/ShadowNodes.h +23 -0
- package/ios/generated/ReactNativeEnrichedSpec/States.cpp +16 -0
- package/ios/generated/ReactNativeEnrichedSpec/States.h +20 -0
- package/ios/htmlParser/HtmlParser.h +11 -0
- package/ios/htmlParser/HtmlParser.mm +1468 -0
- package/ios/inputAttributesManager/InputAttributesManager.h +18 -0
- package/ios/inputAttributesManager/InputAttributesManager.mm +222 -0
- package/ios/inputHtmlParser/InputHtmlParser.h +10 -0
- package/ios/inputHtmlParser/InputHtmlParser.mm +225 -0
- package/ios/interfaces/AlignmentEntry.h +9 -0
- package/ios/interfaces/AlignmentEntry.mm +4 -0
- package/ios/interfaces/AttributeEntry.h +9 -0
- package/ios/interfaces/AttributeEntry.mm +4 -0
- package/ios/interfaces/BaseStyleProtocol.h +17 -0
- package/ios/interfaces/EnrichedTextStyleHeaders.h +62 -0
- package/ios/interfaces/EnrichedViewHost.h +26 -0
- package/ios/interfaces/ImageAttachment.h +11 -0
- package/ios/interfaces/ImageAttachment.mm +107 -0
- package/ios/interfaces/ImageData.h +10 -0
- package/ios/interfaces/ImageData.mm +4 -0
- package/ios/interfaces/LinkData.h +11 -0
- package/ios/interfaces/LinkData.mm +43 -0
- package/ios/interfaces/LinkRegexConfig.h +19 -0
- package/ios/interfaces/LinkRegexConfig.mm +37 -0
- package/ios/interfaces/MediaAttachment.h +23 -0
- package/ios/interfaces/MediaAttachment.mm +31 -0
- package/ios/interfaces/MentionParams.h +8 -0
- package/ios/interfaces/MentionParams.mm +4 -0
- package/ios/interfaces/MentionStyleProps.h +17 -0
- package/ios/interfaces/MentionStyleProps.mm +80 -0
- package/ios/interfaces/StyleBase.h +38 -0
- package/ios/interfaces/StyleBase.mm +279 -0
- package/ios/interfaces/StyleHeaders.h +110 -0
- package/ios/interfaces/StylePair.h +9 -0
- package/ios/interfaces/StylePair.mm +4 -0
- package/ios/interfaces/StyleTypeEnum.h +27 -0
- package/ios/interfaces/TextDecorationLineEnum.h +6 -0
- package/ios/interfaces/TextDecorationLineEnum.mm +4 -0
- package/ios/internals/EnrichedTextComponentDescriptor.h +19 -0
- package/ios/internals/EnrichedTextInputViewComponentDescriptor.h +19 -0
- package/ios/internals/EnrichedTextInputViewShadowNode.h +44 -0
- package/ios/internals/EnrichedTextInputViewShadowNode.mm +103 -0
- package/ios/internals/EnrichedTextInputViewState.cpp +10 -0
- package/ios/internals/EnrichedTextInputViewState.h +22 -0
- package/ios/internals/EnrichedTextViewShadowNode.h +34 -0
- package/ios/internals/EnrichedTextViewShadowNode.mm +72 -0
- package/ios/internals/EnrichedTextViewState.cpp +7 -0
- package/ios/internals/EnrichedTextViewState.h +18 -0
- package/ios/styles/AlignmentStyle.mm +203 -0
- package/ios/styles/BlockQuoteStyle.mm +54 -0
- package/ios/styles/BoldStyle.mm +37 -0
- package/ios/styles/CheckboxListStyle.mm +154 -0
- package/ios/styles/CodeBlockStyle.mm +49 -0
- package/ios/styles/EnrichedTextStyles.mm +61 -0
- package/ios/styles/H1Style.mm +20 -0
- package/ios/styles/H2Style.mm +20 -0
- package/ios/styles/H3Style.mm +20 -0
- package/ios/styles/H4Style.mm +20 -0
- package/ios/styles/H5Style.mm +20 -0
- package/ios/styles/H6Style.mm +20 -0
- package/ios/styles/HeadingStyleBase.mm +96 -0
- package/ios/styles/ImageStyle.mm +150 -0
- package/ios/styles/InlineCodeStyle.mm +65 -0
- package/ios/styles/ItalicStyle.mm +37 -0
- package/ios/styles/LinkStyle.mm +532 -0
- package/ios/styles/MentionStyle.mm +541 -0
- package/ios/styles/OrderedListStyle.mm +48 -0
- package/ios/styles/StrikethroughStyle.mm +25 -0
- package/ios/styles/UnderlineStyle.mm +24 -0
- package/ios/styles/UnorderedListStyle.mm +48 -0
- package/ios/textHtmlParser/TextHtmlParser.h +10 -0
- package/ios/textHtmlParser/TextHtmlParser.mm +181 -0
- package/ios/utils/AlignmentUtils.h +20 -0
- package/ios/utils/AlignmentUtils.mm +111 -0
- package/ios/utils/AttachmentLayoutUtils.h +24 -0
- package/ios/utils/AttachmentLayoutUtils.mm +144 -0
- package/ios/utils/CheckboxHitTestUtils.h +10 -0
- package/ios/utils/CheckboxHitTestUtils.mm +122 -0
- package/ios/utils/DotReplacementUtils.h +10 -0
- package/ios/utils/DotReplacementUtils.mm +68 -0
- package/ios/utils/EnrichedTextTouchHandler.h +14 -0
- package/ios/utils/EnrichedTextTouchHandler.mm +152 -0
- package/ios/utils/KeyboardUtils.h +7 -0
- package/ios/utils/KeyboardUtils.mm +30 -0
- package/ios/utils/OccurenceUtils.h +44 -0
- package/ios/utils/OccurenceUtils.mm +185 -0
- package/ios/utils/ParagraphAttributesUtils.h +18 -0
- package/ios/utils/ParagraphAttributesUtils.mm +289 -0
- package/ios/utils/RangeUtils.h +12 -0
- package/ios/utils/RangeUtils.mm +183 -0
- package/ios/utils/ShortcutsUtils.h +21 -0
- package/ios/utils/ShortcutsUtils.mm +486 -0
- package/ios/utils/StyleUtils.h +33 -0
- package/ios/utils/StyleUtils.mm +290 -0
- package/ios/utils/TextBlockTapGestureRecognizer.h +17 -0
- package/ios/utils/TextBlockTapGestureRecognizer.mm +56 -0
- package/ios/utils/TextInsertionUtils.h +17 -0
- package/ios/utils/TextInsertionUtils.mm +60 -0
- package/ios/utils/TextListsUtils.h +40 -0
- package/ios/utils/TextListsUtils.mm +93 -0
- package/ios/utils/WeakBox.h +3 -0
- package/ios/utils/WeakBox.m +4 -0
- package/ios/utils/WordsUtils.h +7 -0
- package/ios/utils/WordsUtils.mm +98 -0
- package/ios/utils/ZeroWidthSpaceUtils.h +14 -0
- package/ios/utils/ZeroWidthSpaceUtils.mm +310 -0
- package/lib/module/index.js +4 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/index.native.js +7 -0
- package/lib/module/index.native.js.map +1 -0
- package/lib/module/native/EnrichedText.js +76 -0
- package/lib/module/native/EnrichedText.js.map +1 -0
- package/lib/module/native/EnrichedTextInput.js +306 -0
- package/lib/module/native/EnrichedTextInput.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/spec/EnrichedTextInputNativeComponent.ts +524 -0
- package/lib/module/spec/EnrichedTextNativeComponent.ts +110 -0
- package/lib/module/types.js +4 -0
- package/lib/module/types.js.map +1 -0
- package/lib/module/utils/EnrichedTextInputDefaultProps.js +20 -0
- package/lib/module/utils/EnrichedTextInputDefaultProps.js.map +1 -0
- package/lib/module/utils/defaultHtmlStyle.js +83 -0
- package/lib/module/utils/defaultHtmlStyle.js.map +1 -0
- package/lib/module/utils/expandMentionStylesForIndicators.js +15 -0
- package/lib/module/utils/expandMentionStylesForIndicators.js.map +1 -0
- package/lib/module/utils/isMentionStyleRecord.js +10 -0
- package/lib/module/utils/isMentionStyleRecord.js.map +1 -0
- package/lib/module/utils/normalizeHtmlStyle.js +126 -0
- package/lib/module/utils/normalizeHtmlStyle.js.map +1 -0
- package/lib/module/utils/nullthrows.js +9 -0
- package/lib/module/utils/nullthrows.js.map +1 -0
- package/lib/module/utils/regexParser.js +46 -0
- package/lib/module/utils/regexParser.js.map +1 -0
- package/lib/module/web/EnrichedTextInput.css +201 -0
- package/lib/module/web/EnrichedTextInput.js +314 -0
- package/lib/module/web/EnrichedTextInput.js.map +1 -0
- package/lib/module/web/adaptWebToNativeEvent.js +34 -0
- package/lib/module/web/adaptWebToNativeEvent.js.map +1 -0
- package/lib/module/web/checkboxHtmlNormalizer.js +54 -0
- package/lib/module/web/checkboxHtmlNormalizer.js.map +1 -0
- package/lib/module/web/formats/EnrichedBlockquote.js +32 -0
- package/lib/module/web/formats/EnrichedBlockquote.js.map +1 -0
- package/lib/module/web/formats/EnrichedBold.js +22 -0
- package/lib/module/web/formats/EnrichedBold.js.map +1 -0
- package/lib/module/web/formats/EnrichedCheckboxItem.js +32 -0
- package/lib/module/web/formats/EnrichedCheckboxItem.js.map +1 -0
- package/lib/module/web/formats/EnrichedCheckboxList.js +35 -0
- package/lib/module/web/formats/EnrichedCheckboxList.js.map +1 -0
- package/lib/module/web/formats/EnrichedCode.js +15 -0
- package/lib/module/web/formats/EnrichedCode.js.map +1 -0
- package/lib/module/web/formats/EnrichedCodeBlock.js +43 -0
- package/lib/module/web/formats/EnrichedCodeBlock.js.map +1 -0
- package/lib/module/web/formats/EnrichedHeading.js +27 -0
- package/lib/module/web/formats/EnrichedHeading.js.map +1 -0
- package/lib/module/web/formats/EnrichedImage.js +57 -0
- package/lib/module/web/formats/EnrichedImage.js.map +1 -0
- package/lib/module/web/formats/EnrichedImageNodeView.js +90 -0
- package/lib/module/web/formats/EnrichedImageNodeView.js.map +1 -0
- package/lib/module/web/formats/EnrichedItalic.js +22 -0
- package/lib/module/web/formats/EnrichedItalic.js.map +1 -0
- package/lib/module/web/formats/EnrichedLink.js +140 -0
- package/lib/module/web/formats/EnrichedLink.js.map +1 -0
- package/lib/module/web/formats/EnrichedListItem.js +19 -0
- package/lib/module/web/formats/EnrichedListItem.js.map +1 -0
- package/lib/module/web/formats/EnrichedMention.js +50 -0
- package/lib/module/web/formats/EnrichedMention.js.map +1 -0
- package/lib/module/web/formats/EnrichedOrderedList.js +32 -0
- package/lib/module/web/formats/EnrichedOrderedList.js.map +1 -0
- package/lib/module/web/formats/EnrichedStrike.js +22 -0
- package/lib/module/web/formats/EnrichedStrike.js.map +1 -0
- package/lib/module/web/formats/EnrichedUnderline.js +22 -0
- package/lib/module/web/formats/EnrichedUnderline.js.map +1 -0
- package/lib/module/web/formats/EnrichedUnorderedList.js +33 -0
- package/lib/module/web/formats/EnrichedUnorderedList.js.map +1 -0
- package/lib/module/web/formats/applyWrappingListToSelection.js +63 -0
- package/lib/module/web/formats/applyWrappingListToSelection.js.map +1 -0
- package/lib/module/web/formats/formatRules.js +48 -0
- package/lib/module/web/formats/formatRules.js.map +1 -0
- package/lib/module/web/formats/listKeyboard.js +50 -0
- package/lib/module/web/formats/listKeyboard.js.map +1 -0
- package/lib/module/web/formats/wrappedBlockKeyboard.js +58 -0
- package/lib/module/web/formats/wrappedBlockKeyboard.js.map +1 -0
- package/lib/module/web/pasteImages.js +78 -0
- package/lib/module/web/pasteImages.js.map +1 -0
- package/lib/module/web/pastedImageDimensions.js +49 -0
- package/lib/module/web/pastedImageDimensions.js.map +1 -0
- package/lib/module/web/pmPlugins/MentionPlugin/index.js +36 -0
- package/lib/module/web/pmPlugins/MentionPlugin/index.js.map +1 -0
- package/lib/module/web/pmPlugins/MentionPlugin/isCaretInBlockedContext.js +11 -0
- package/lib/module/web/pmPlugins/MentionPlugin/isCaretInBlockedContext.js.map +1 -0
- package/lib/module/web/pmPlugins/MentionPlugin/makeMentionPluginState.js +67 -0
- package/lib/module/web/pmPlugins/MentionPlugin/makeMentionPluginState.js.map +1 -0
- package/lib/module/web/pmPlugins/MentionPlugin/mentionPluginKey.js +5 -0
- package/lib/module/web/pmPlugins/MentionPlugin/mentionPluginKey.js.map +1 -0
- package/lib/module/web/pmPlugins/MentionPlugin/removeMentionMarksIfSpansResized.js +56 -0
- package/lib/module/web/pmPlugins/MentionPlugin/removeMentionMarksIfSpansResized.js.map +1 -0
- package/lib/module/web/pmPlugins/MentionPlugin/setMention.js +58 -0
- package/lib/module/web/pmPlugins/MentionPlugin/setMention.js.map +1 -0
- package/lib/module/web/pmPlugins/MentionPlugin/startMention.js +9 -0
- package/lib/module/web/pmPlugins/MentionPlugin/startMention.js.map +1 -0
- package/lib/module/web/pmPlugins/MentionPlugin/stripPartialMentionMarks.js +9 -0
- package/lib/module/web/pmPlugins/MentionPlugin/stripPartialMentionMarks.js.map +1 -0
- package/lib/module/web/pmPlugins/MentionPlugin/subscribeMentionEvents.js +100 -0
- package/lib/module/web/pmPlugins/MentionPlugin/subscribeMentionEvents.js.map +1 -0
- package/lib/module/web/pmPlugins/MentionPlugin/types.js +4 -0
- package/lib/module/web/pmPlugins/MentionPlugin/types.js.map +1 -0
- package/lib/module/web/pmPlugins/MergeAdjacentSameKindBlocksPlugin.js +42 -0
- package/lib/module/web/pmPlugins/MergeAdjacentSameKindBlocksPlugin.js.map +1 -0
- package/lib/module/web/pmPlugins/ShortcutPlugin.js +123 -0
- package/lib/module/web/pmPlugins/ShortcutPlugin.js.map +1 -0
- package/lib/module/web/pmPlugins/StrictMarksPlugin.js +98 -0
- package/lib/module/web/pmPlugins/StrictMarksPlugin.js.map +1 -0
- package/lib/module/web/pmPlugins/StripBoldInStyledHeadingsPlugin.js +56 -0
- package/lib/module/web/pmPlugins/StripBoldInStyledHeadingsPlugin.js.map +1 -0
- package/lib/module/web/pmPlugins/StripMarksInCodeBlockPlugin.js +28 -0
- package/lib/module/web/pmPlugins/StripMarksInCodeBlockPlugin.js.map +1 -0
- package/lib/module/web/pmPlugins/StripMarksOnImagePlugin.js +29 -0
- package/lib/module/web/pmPlugins/StripMarksOnImagePlugin.js.map +1 -0
- package/lib/module/web/positionMapping.js +76 -0
- package/lib/module/web/positionMapping.js.map +1 -0
- package/lib/module/web/returnKeyTypeToEnterKeyHint.js +20 -0
- package/lib/module/web/returnKeyTypeToEnterKeyHint.js.map +1 -0
- package/lib/module/web/styleConversion/buildMentionRulesCSS.js +33 -0
- package/lib/module/web/styleConversion/buildMentionRulesCSS.js.map +1 -0
- package/lib/module/web/styleConversion/enrichedInputStyleToCSSProperties.js +159 -0
- package/lib/module/web/styleConversion/enrichedInputStyleToCSSProperties.js.map +1 -0
- package/lib/module/web/styleConversion/enrichedInputThemingToCSSProperties.js +18 -0
- package/lib/module/web/styleConversion/enrichedInputThemingToCSSProperties.js.map +1 -0
- package/lib/module/web/styleConversion/htmlStyleToCSSVariables.js +145 -0
- package/lib/module/web/styleConversion/htmlStyleToCSSVariables.js.map +1 -0
- package/lib/module/web/styleConversion/mentionIndicatorCssKey.js +15 -0
- package/lib/module/web/styleConversion/mentionIndicatorCssKey.js.map +1 -0
- package/lib/module/web/styleConversion/toColor.js +18 -0
- package/lib/module/web/styleConversion/toColor.js.map +1 -0
- package/lib/module/web/tiptapHtmlNormalizer.js +30 -0
- package/lib/module/web/tiptapHtmlNormalizer.js.map +1 -0
- package/lib/module/web/useOnChangeHtml.js +8 -0
- package/lib/module/web/useOnChangeHtml.js.map +1 -0
- package/lib/module/web/useOnChangeState.js +88 -0
- package/lib/module/web/useOnChangeState.js.map +1 -0
- package/lib/module/web/useOnChangeText.js +11 -0
- package/lib/module/web/useOnChangeText.js.map +1 -0
- package/lib/module/web/useOnEditorChange.js +25 -0
- package/lib/module/web/useOnEditorChange.js.map +1 -0
- package/lib/module/web/useOnLinkDetected.js +68 -0
- package/lib/module/web/useOnLinkDetected.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/index.d.ts +3 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/index.native.d.ts +5 -0
- package/lib/typescript/src/index.native.d.ts.map +1 -0
- package/lib/typescript/src/native/EnrichedText.d.ts +3 -0
- package/lib/typescript/src/native/EnrichedText.d.ts.map +1 -0
- package/lib/typescript/src/native/EnrichedTextInput.d.ts +3 -0
- package/lib/typescript/src/native/EnrichedTextInput.d.ts.map +1 -0
- package/lib/typescript/src/spec/EnrichedTextInputNativeComponent.d.ts +405 -0
- package/lib/typescript/src/spec/EnrichedTextInputNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/spec/EnrichedTextNativeComponent.d.ts +88 -0
- package/lib/typescript/src/spec/EnrichedTextNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +721 -0
- package/lib/typescript/src/types.d.ts.map +1 -0
- package/lib/typescript/src/utils/EnrichedTextInputDefaultProps.d.ts +13 -0
- package/lib/typescript/src/utils/EnrichedTextInputDefaultProps.d.ts.map +1 -0
- package/lib/typescript/src/utils/defaultHtmlStyle.d.ts +4 -0
- package/lib/typescript/src/utils/defaultHtmlStyle.d.ts.map +1 -0
- package/lib/typescript/src/utils/expandMentionStylesForIndicators.d.ts +3 -0
- package/lib/typescript/src/utils/expandMentionStylesForIndicators.d.ts.map +1 -0
- package/lib/typescript/src/utils/isMentionStyleRecord.d.ts +3 -0
- package/lib/typescript/src/utils/isMentionStyleRecord.d.ts.map +1 -0
- package/lib/typescript/src/utils/normalizeHtmlStyle.d.ts +6 -0
- package/lib/typescript/src/utils/normalizeHtmlStyle.d.ts.map +1 -0
- package/lib/typescript/src/utils/nullthrows.d.ts +2 -0
- package/lib/typescript/src/utils/nullthrows.d.ts.map +1 -0
- package/lib/typescript/src/utils/regexParser.d.ts +3 -0
- package/lib/typescript/src/utils/regexParser.d.ts.map +1 -0
- package/lib/typescript/src/web/EnrichedTextInput.d.ts +4 -0
- package/lib/typescript/src/web/EnrichedTextInput.d.ts.map +1 -0
- package/lib/typescript/src/web/adaptWebToNativeEvent.d.ts +3 -0
- package/lib/typescript/src/web/adaptWebToNativeEvent.d.ts.map +1 -0
- package/lib/typescript/src/web/checkboxHtmlNormalizer.d.ts +3 -0
- package/lib/typescript/src/web/checkboxHtmlNormalizer.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedBlockquote.d.ts +2 -0
- package/lib/typescript/src/web/formats/EnrichedBlockquote.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedBold.d.ts +2 -0
- package/lib/typescript/src/web/formats/EnrichedBold.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedCheckboxItem.d.ts +2 -0
- package/lib/typescript/src/web/formats/EnrichedCheckboxItem.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedCheckboxList.d.ts +9 -0
- package/lib/typescript/src/web/formats/EnrichedCheckboxList.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedCode.d.ts +2 -0
- package/lib/typescript/src/web/formats/EnrichedCode.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedCodeBlock.d.ts +9 -0
- package/lib/typescript/src/web/formats/EnrichedCodeBlock.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedHeading.d.ts +5 -0
- package/lib/typescript/src/web/formats/EnrichedHeading.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedImage.d.ts +2 -0
- package/lib/typescript/src/web/formats/EnrichedImage.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedImageNodeView.d.ts +3 -0
- package/lib/typescript/src/web/formats/EnrichedImageNodeView.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedItalic.d.ts +2 -0
- package/lib/typescript/src/web/formats/EnrichedItalic.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedLink.d.ts +5 -0
- package/lib/typescript/src/web/formats/EnrichedLink.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedListItem.d.ts +2 -0
- package/lib/typescript/src/web/formats/EnrichedListItem.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedMention.d.ts +4 -0
- package/lib/typescript/src/web/formats/EnrichedMention.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedOrderedList.d.ts +2 -0
- package/lib/typescript/src/web/formats/EnrichedOrderedList.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedStrike.d.ts +2 -0
- package/lib/typescript/src/web/formats/EnrichedStrike.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedUnderline.d.ts +2 -0
- package/lib/typescript/src/web/formats/EnrichedUnderline.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/EnrichedUnorderedList.d.ts +9 -0
- package/lib/typescript/src/web/formats/EnrichedUnorderedList.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/applyWrappingListToSelection.d.ts +18 -0
- package/lib/typescript/src/web/formats/applyWrappingListToSelection.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/formatRules.d.ts +10 -0
- package/lib/typescript/src/web/formats/formatRules.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/listKeyboard.d.ts +4 -0
- package/lib/typescript/src/web/formats/listKeyboard.d.ts.map +1 -0
- package/lib/typescript/src/web/formats/wrappedBlockKeyboard.d.ts +12 -0
- package/lib/typescript/src/web/formats/wrappedBlockKeyboard.d.ts.map +1 -0
- package/lib/typescript/src/web/pasteImages.d.ts +10 -0
- package/lib/typescript/src/web/pasteImages.d.ts.map +1 -0
- package/lib/typescript/src/web/pastedImageDimensions.d.ts +9 -0
- package/lib/typescript/src/web/pastedImageDimensions.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/index.d.ts +9 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/index.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/isCaretInBlockedContext.d.ts +3 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/isCaretInBlockedContext.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/makeMentionPluginState.d.ts +4 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/makeMentionPluginState.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/mentionPluginKey.d.ts +4 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/mentionPluginKey.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/removeMentionMarksIfSpansResized.d.ts +9 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/removeMentionMarksIfSpansResized.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/setMention.d.ts +3 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/setMention.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/startMention.d.ts +3 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/startMention.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/stripPartialMentionMarks.d.ts +3 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/stripPartialMentionMarks.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/subscribeMentionEvents.d.ts +4 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/subscribeMentionEvents.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/types.d.ts +20 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/types.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/MergeAdjacentSameKindBlocksPlugin.d.ts +3 -0
- package/lib/typescript/src/web/pmPlugins/MergeAdjacentSameKindBlocksPlugin.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/ShortcutPlugin.d.ts +7 -0
- package/lib/typescript/src/web/pmPlugins/ShortcutPlugin.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/StrictMarksPlugin.d.ts +3 -0
- package/lib/typescript/src/web/pmPlugins/StrictMarksPlugin.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/StripBoldInStyledHeadingsPlugin.d.ts +10 -0
- package/lib/typescript/src/web/pmPlugins/StripBoldInStyledHeadingsPlugin.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/StripMarksInCodeBlockPlugin.d.ts +3 -0
- package/lib/typescript/src/web/pmPlugins/StripMarksInCodeBlockPlugin.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/StripMarksOnImagePlugin.d.ts +3 -0
- package/lib/typescript/src/web/pmPlugins/StripMarksOnImagePlugin.d.ts.map +1 -0
- package/lib/typescript/src/web/positionMapping.d.ts +39 -0
- package/lib/typescript/src/web/positionMapping.d.ts.map +1 -0
- package/lib/typescript/src/web/returnKeyTypeToEnterKeyHint.d.ts +4 -0
- package/lib/typescript/src/web/returnKeyTypeToEnterKeyHint.d.ts.map +1 -0
- package/lib/typescript/src/web/styleConversion/buildMentionRulesCSS.d.ts +3 -0
- package/lib/typescript/src/web/styleConversion/buildMentionRulesCSS.d.ts.map +1 -0
- package/lib/typescript/src/web/styleConversion/enrichedInputStyleToCSSProperties.d.ts +8 -0
- package/lib/typescript/src/web/styleConversion/enrichedInputStyleToCSSProperties.d.ts.map +1 -0
- package/lib/typescript/src/web/styleConversion/enrichedInputThemingToCSSProperties.d.ts +9 -0
- package/lib/typescript/src/web/styleConversion/enrichedInputThemingToCSSProperties.d.ts.map +1 -0
- package/lib/typescript/src/web/styleConversion/htmlStyleToCSSVariables.d.ts +10 -0
- package/lib/typescript/src/web/styleConversion/htmlStyleToCSSVariables.d.ts.map +1 -0
- package/lib/typescript/src/web/styleConversion/mentionIndicatorCssKey.d.ts +3 -0
- package/lib/typescript/src/web/styleConversion/mentionIndicatorCssKey.d.ts.map +1 -0
- package/lib/typescript/src/web/styleConversion/toColor.d.ts +3 -0
- package/lib/typescript/src/web/styleConversion/toColor.d.ts.map +1 -0
- package/lib/typescript/src/web/tiptapHtmlNormalizer.d.ts +3 -0
- package/lib/typescript/src/web/tiptapHtmlNormalizer.d.ts.map +1 -0
- package/lib/typescript/src/web/useOnChangeHtml.d.ts +5 -0
- package/lib/typescript/src/web/useOnChangeHtml.d.ts.map +1 -0
- package/lib/typescript/src/web/useOnChangeState.d.ts +6 -0
- package/lib/typescript/src/web/useOnChangeState.d.ts.map +1 -0
- package/lib/typescript/src/web/useOnChangeText.d.ts +5 -0
- package/lib/typescript/src/web/useOnChangeText.d.ts.map +1 -0
- package/lib/typescript/src/web/useOnEditorChange.d.ts +6 -0
- package/lib/typescript/src/web/useOnEditorChange.d.ts.map +1 -0
- package/lib/typescript/src/web/useOnLinkDetected.d.ts +4 -0
- package/lib/typescript/src/web/useOnLinkDetected.d.ts.map +1 -0
- package/package.json +232 -1
- package/react-native.config.js +16 -0
- package/src/index.native.tsx +34 -0
- package/src/index.tsx +24 -0
- package/src/native/EnrichedText.tsx +115 -0
- package/src/native/EnrichedTextInput.tsx +374 -0
- package/src/spec/EnrichedTextInputNativeComponent.ts +524 -0
- package/src/spec/EnrichedTextNativeComponent.ts +110 -0
- package/src/types.ts +864 -0
- package/src/utils/EnrichedTextInputDefaultProps.ts +16 -0
- package/src/utils/defaultHtmlStyle.ts +83 -0
- package/src/utils/expandMentionStylesForIndicators.ts +19 -0
- package/src/utils/isMentionStyleRecord.ts +22 -0
- package/src/utils/normalizeHtmlStyle.ts +181 -0
- package/src/utils/nullthrows.ts +7 -0
- package/src/utils/regexParser.ts +56 -0
- package/src/web/EnrichedTextInput.css +201 -0
- package/src/web/EnrichedTextInput.tsx +403 -0
- package/src/web/adaptWebToNativeEvent.ts +37 -0
- package/src/web/checkboxHtmlNormalizer.ts +62 -0
- package/src/web/formats/EnrichedBlockquote.ts +36 -0
- package/src/web/formats/EnrichedBold.ts +16 -0
- package/src/web/formats/EnrichedCheckboxItem.ts +35 -0
- package/src/web/formats/EnrichedCheckboxList.ts +47 -0
- package/src/web/formats/EnrichedCode.ts +13 -0
- package/src/web/formats/EnrichedCodeBlock.ts +53 -0
- package/src/web/formats/EnrichedHeading.ts +36 -0
- package/src/web/formats/EnrichedImage.ts +59 -0
- package/src/web/formats/EnrichedImageNodeView.tsx +89 -0
- package/src/web/formats/EnrichedItalic.ts +16 -0
- package/src/web/formats/EnrichedLink.ts +149 -0
- package/src/web/formats/EnrichedListItem.ts +17 -0
- package/src/web/formats/EnrichedMention.ts +55 -0
- package/src/web/formats/EnrichedOrderedList.ts +40 -0
- package/src/web/formats/EnrichedStrike.ts +16 -0
- package/src/web/formats/EnrichedUnderline.ts +16 -0
- package/src/web/formats/EnrichedUnorderedList.ts +50 -0
- package/src/web/formats/applyWrappingListToSelection.ts +76 -0
- package/src/web/formats/formatRules.ts +84 -0
- package/src/web/formats/listKeyboard.ts +58 -0
- package/src/web/formats/wrappedBlockKeyboard.ts +76 -0
- package/src/web/pasteImages.ts +96 -0
- package/src/web/pastedImageDimensions.ts +40 -0
- package/src/web/pmPlugins/MentionPlugin/index.ts +45 -0
- package/src/web/pmPlugins/MentionPlugin/isCaretInBlockedContext.ts +17 -0
- package/src/web/pmPlugins/MentionPlugin/makeMentionPluginState.ts +75 -0
- package/src/web/pmPlugins/MentionPlugin/mentionPluginKey.ts +4 -0
- package/src/web/pmPlugins/MentionPlugin/removeMentionMarksIfSpansResized.ts +68 -0
- package/src/web/pmPlugins/MentionPlugin/setMention.ts +83 -0
- package/src/web/pmPlugins/MentionPlugin/startMention.ts +14 -0
- package/src/web/pmPlugins/MentionPlugin/stripPartialMentionMarks.ts +20 -0
- package/src/web/pmPlugins/MentionPlugin/subscribeMentionEvents.ts +105 -0
- package/src/web/pmPlugins/MentionPlugin/types.ts +22 -0
- package/src/web/pmPlugins/MergeAdjacentSameKindBlocksPlugin.ts +57 -0
- package/src/web/pmPlugins/ShortcutPlugin.ts +98 -0
- package/src/web/pmPlugins/StrictMarksPlugin.ts +131 -0
- package/src/web/pmPlugins/StripBoldInStyledHeadingsPlugin.ts +79 -0
- package/src/web/pmPlugins/StripMarksInCodeBlockPlugin.ts +34 -0
- package/src/web/pmPlugins/StripMarksOnImagePlugin.ts +33 -0
- package/src/web/positionMapping.ts +81 -0
- package/src/web/returnKeyTypeToEnterKeyHint.ts +29 -0
- package/src/web/styleConversion/buildMentionRulesCSS.ts +42 -0
- package/src/web/styleConversion/enrichedInputStyleToCSSProperties.ts +224 -0
- package/src/web/styleConversion/enrichedInputThemingToCSSProperties.ts +34 -0
- package/src/web/styleConversion/htmlStyleToCSSVariables.ts +226 -0
- package/src/web/styleConversion/mentionIndicatorCssKey.ts +14 -0
- package/src/web/styleConversion/toColor.ts +17 -0
- package/src/web/tiptapHtmlNormalizer.ts +33 -0
- package/src/web/useOnChangeHtml.ts +14 -0
- package/src/web/useOnChangeState.ts +125 -0
- package/src/web/useOnChangeText.ts +15 -0
- package/src/web/useOnEditorChange.ts +33 -0
- package/src/web/useOnLinkDetected.ts +82 -0
|
@@ -0,0 +1,1595 @@
|
|
|
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 <folly/dynamic.h>
|
|
13
|
+
#include <react/renderer/components/view/ViewProps.h>
|
|
14
|
+
#include <react/renderer/core/PropsParserContext.h>
|
|
15
|
+
#include <react/renderer/core/propsConversions.h>
|
|
16
|
+
#include <react/renderer/graphics/Color.h>
|
|
17
|
+
#include <vector>
|
|
18
|
+
|
|
19
|
+
namespace facebook::react {
|
|
20
|
+
|
|
21
|
+
struct EnrichedTextInputViewHtmlStyleH1Struct {
|
|
22
|
+
Float fontSize{0.0};
|
|
23
|
+
bool bold{false};
|
|
24
|
+
|
|
25
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
26
|
+
bool operator==(const EnrichedTextInputViewHtmlStyleH1Struct&) const = default;
|
|
27
|
+
|
|
28
|
+
folly::dynamic toDynamic() const {
|
|
29
|
+
folly::dynamic result = folly::dynamic::object();
|
|
30
|
+
result["fontSize"] = fontSize;
|
|
31
|
+
result["bold"] = bold;
|
|
32
|
+
return result;
|
|
33
|
+
}
|
|
34
|
+
#endif
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextInputViewHtmlStyleH1Struct &result) {
|
|
38
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
39
|
+
|
|
40
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
41
|
+
if (tmp_fontSize != map.end()) {
|
|
42
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
43
|
+
}
|
|
44
|
+
auto tmp_bold = map.find("bold");
|
|
45
|
+
if (tmp_bold != map.end()) {
|
|
46
|
+
fromRawValue(context, tmp_bold->second, result.bold);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
static inline std::string toString(const EnrichedTextInputViewHtmlStyleH1Struct &value) {
|
|
51
|
+
return "[Object EnrichedTextInputViewHtmlStyleH1Struct]";
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
55
|
+
static inline folly::dynamic toDynamic(const EnrichedTextInputViewHtmlStyleH1Struct &value) {
|
|
56
|
+
return value.toDynamic();
|
|
57
|
+
}
|
|
58
|
+
#endif
|
|
59
|
+
|
|
60
|
+
struct EnrichedTextInputViewHtmlStyleH2Struct {
|
|
61
|
+
Float fontSize{0.0};
|
|
62
|
+
bool bold{false};
|
|
63
|
+
|
|
64
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
65
|
+
bool operator==(const EnrichedTextInputViewHtmlStyleH2Struct&) const = default;
|
|
66
|
+
|
|
67
|
+
folly::dynamic toDynamic() const {
|
|
68
|
+
folly::dynamic result = folly::dynamic::object();
|
|
69
|
+
result["fontSize"] = fontSize;
|
|
70
|
+
result["bold"] = bold;
|
|
71
|
+
return result;
|
|
72
|
+
}
|
|
73
|
+
#endif
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextInputViewHtmlStyleH2Struct &result) {
|
|
77
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
78
|
+
|
|
79
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
80
|
+
if (tmp_fontSize != map.end()) {
|
|
81
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
82
|
+
}
|
|
83
|
+
auto tmp_bold = map.find("bold");
|
|
84
|
+
if (tmp_bold != map.end()) {
|
|
85
|
+
fromRawValue(context, tmp_bold->second, result.bold);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
static inline std::string toString(const EnrichedTextInputViewHtmlStyleH2Struct &value) {
|
|
90
|
+
return "[Object EnrichedTextInputViewHtmlStyleH2Struct]";
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
94
|
+
static inline folly::dynamic toDynamic(const EnrichedTextInputViewHtmlStyleH2Struct &value) {
|
|
95
|
+
return value.toDynamic();
|
|
96
|
+
}
|
|
97
|
+
#endif
|
|
98
|
+
|
|
99
|
+
struct EnrichedTextInputViewHtmlStyleH3Struct {
|
|
100
|
+
Float fontSize{0.0};
|
|
101
|
+
bool bold{false};
|
|
102
|
+
|
|
103
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
104
|
+
bool operator==(const EnrichedTextInputViewHtmlStyleH3Struct&) const = default;
|
|
105
|
+
|
|
106
|
+
folly::dynamic toDynamic() const {
|
|
107
|
+
folly::dynamic result = folly::dynamic::object();
|
|
108
|
+
result["fontSize"] = fontSize;
|
|
109
|
+
result["bold"] = bold;
|
|
110
|
+
return result;
|
|
111
|
+
}
|
|
112
|
+
#endif
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextInputViewHtmlStyleH3Struct &result) {
|
|
116
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
117
|
+
|
|
118
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
119
|
+
if (tmp_fontSize != map.end()) {
|
|
120
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
121
|
+
}
|
|
122
|
+
auto tmp_bold = map.find("bold");
|
|
123
|
+
if (tmp_bold != map.end()) {
|
|
124
|
+
fromRawValue(context, tmp_bold->second, result.bold);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
static inline std::string toString(const EnrichedTextInputViewHtmlStyleH3Struct &value) {
|
|
129
|
+
return "[Object EnrichedTextInputViewHtmlStyleH3Struct]";
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
133
|
+
static inline folly::dynamic toDynamic(const EnrichedTextInputViewHtmlStyleH3Struct &value) {
|
|
134
|
+
return value.toDynamic();
|
|
135
|
+
}
|
|
136
|
+
#endif
|
|
137
|
+
|
|
138
|
+
struct EnrichedTextInputViewHtmlStyleH4Struct {
|
|
139
|
+
Float fontSize{0.0};
|
|
140
|
+
bool bold{false};
|
|
141
|
+
|
|
142
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
143
|
+
bool operator==(const EnrichedTextInputViewHtmlStyleH4Struct&) const = default;
|
|
144
|
+
|
|
145
|
+
folly::dynamic toDynamic() const {
|
|
146
|
+
folly::dynamic result = folly::dynamic::object();
|
|
147
|
+
result["fontSize"] = fontSize;
|
|
148
|
+
result["bold"] = bold;
|
|
149
|
+
return result;
|
|
150
|
+
}
|
|
151
|
+
#endif
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextInputViewHtmlStyleH4Struct &result) {
|
|
155
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
156
|
+
|
|
157
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
158
|
+
if (tmp_fontSize != map.end()) {
|
|
159
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
160
|
+
}
|
|
161
|
+
auto tmp_bold = map.find("bold");
|
|
162
|
+
if (tmp_bold != map.end()) {
|
|
163
|
+
fromRawValue(context, tmp_bold->second, result.bold);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
static inline std::string toString(const EnrichedTextInputViewHtmlStyleH4Struct &value) {
|
|
168
|
+
return "[Object EnrichedTextInputViewHtmlStyleH4Struct]";
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
172
|
+
static inline folly::dynamic toDynamic(const EnrichedTextInputViewHtmlStyleH4Struct &value) {
|
|
173
|
+
return value.toDynamic();
|
|
174
|
+
}
|
|
175
|
+
#endif
|
|
176
|
+
|
|
177
|
+
struct EnrichedTextInputViewHtmlStyleH5Struct {
|
|
178
|
+
Float fontSize{0.0};
|
|
179
|
+
bool bold{false};
|
|
180
|
+
|
|
181
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
182
|
+
bool operator==(const EnrichedTextInputViewHtmlStyleH5Struct&) const = default;
|
|
183
|
+
|
|
184
|
+
folly::dynamic toDynamic() const {
|
|
185
|
+
folly::dynamic result = folly::dynamic::object();
|
|
186
|
+
result["fontSize"] = fontSize;
|
|
187
|
+
result["bold"] = bold;
|
|
188
|
+
return result;
|
|
189
|
+
}
|
|
190
|
+
#endif
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextInputViewHtmlStyleH5Struct &result) {
|
|
194
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
195
|
+
|
|
196
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
197
|
+
if (tmp_fontSize != map.end()) {
|
|
198
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
199
|
+
}
|
|
200
|
+
auto tmp_bold = map.find("bold");
|
|
201
|
+
if (tmp_bold != map.end()) {
|
|
202
|
+
fromRawValue(context, tmp_bold->second, result.bold);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
static inline std::string toString(const EnrichedTextInputViewHtmlStyleH5Struct &value) {
|
|
207
|
+
return "[Object EnrichedTextInputViewHtmlStyleH5Struct]";
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
211
|
+
static inline folly::dynamic toDynamic(const EnrichedTextInputViewHtmlStyleH5Struct &value) {
|
|
212
|
+
return value.toDynamic();
|
|
213
|
+
}
|
|
214
|
+
#endif
|
|
215
|
+
|
|
216
|
+
struct EnrichedTextInputViewHtmlStyleH6Struct {
|
|
217
|
+
Float fontSize{0.0};
|
|
218
|
+
bool bold{false};
|
|
219
|
+
|
|
220
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
221
|
+
bool operator==(const EnrichedTextInputViewHtmlStyleH6Struct&) const = default;
|
|
222
|
+
|
|
223
|
+
folly::dynamic toDynamic() const {
|
|
224
|
+
folly::dynamic result = folly::dynamic::object();
|
|
225
|
+
result["fontSize"] = fontSize;
|
|
226
|
+
result["bold"] = bold;
|
|
227
|
+
return result;
|
|
228
|
+
}
|
|
229
|
+
#endif
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextInputViewHtmlStyleH6Struct &result) {
|
|
233
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
234
|
+
|
|
235
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
236
|
+
if (tmp_fontSize != map.end()) {
|
|
237
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
238
|
+
}
|
|
239
|
+
auto tmp_bold = map.find("bold");
|
|
240
|
+
if (tmp_bold != map.end()) {
|
|
241
|
+
fromRawValue(context, tmp_bold->second, result.bold);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
static inline std::string toString(const EnrichedTextInputViewHtmlStyleH6Struct &value) {
|
|
246
|
+
return "[Object EnrichedTextInputViewHtmlStyleH6Struct]";
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
250
|
+
static inline folly::dynamic toDynamic(const EnrichedTextInputViewHtmlStyleH6Struct &value) {
|
|
251
|
+
return value.toDynamic();
|
|
252
|
+
}
|
|
253
|
+
#endif
|
|
254
|
+
|
|
255
|
+
struct EnrichedTextInputViewHtmlStyleBlockquoteStruct {
|
|
256
|
+
SharedColor borderColor{};
|
|
257
|
+
Float borderWidth{0.0};
|
|
258
|
+
Float gapWidth{0.0};
|
|
259
|
+
SharedColor color{};
|
|
260
|
+
|
|
261
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
262
|
+
bool operator==(const EnrichedTextInputViewHtmlStyleBlockquoteStruct&) const = default;
|
|
263
|
+
|
|
264
|
+
folly::dynamic toDynamic() const {
|
|
265
|
+
folly::dynamic result = folly::dynamic::object();
|
|
266
|
+
result["borderColor"] = ::facebook::react::toDynamic(borderColor);
|
|
267
|
+
result["borderWidth"] = borderWidth;
|
|
268
|
+
result["gapWidth"] = gapWidth;
|
|
269
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
270
|
+
return result;
|
|
271
|
+
}
|
|
272
|
+
#endif
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextInputViewHtmlStyleBlockquoteStruct &result) {
|
|
276
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
277
|
+
|
|
278
|
+
auto tmp_borderColor = map.find("borderColor");
|
|
279
|
+
if (tmp_borderColor != map.end()) {
|
|
280
|
+
fromRawValue(context, tmp_borderColor->second, result.borderColor);
|
|
281
|
+
}
|
|
282
|
+
auto tmp_borderWidth = map.find("borderWidth");
|
|
283
|
+
if (tmp_borderWidth != map.end()) {
|
|
284
|
+
fromRawValue(context, tmp_borderWidth->second, result.borderWidth);
|
|
285
|
+
}
|
|
286
|
+
auto tmp_gapWidth = map.find("gapWidth");
|
|
287
|
+
if (tmp_gapWidth != map.end()) {
|
|
288
|
+
fromRawValue(context, tmp_gapWidth->second, result.gapWidth);
|
|
289
|
+
}
|
|
290
|
+
auto tmp_color = map.find("color");
|
|
291
|
+
if (tmp_color != map.end()) {
|
|
292
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
static inline std::string toString(const EnrichedTextInputViewHtmlStyleBlockquoteStruct &value) {
|
|
297
|
+
return "[Object EnrichedTextInputViewHtmlStyleBlockquoteStruct]";
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
301
|
+
static inline folly::dynamic toDynamic(const EnrichedTextInputViewHtmlStyleBlockquoteStruct &value) {
|
|
302
|
+
return value.toDynamic();
|
|
303
|
+
}
|
|
304
|
+
#endif
|
|
305
|
+
|
|
306
|
+
struct EnrichedTextInputViewHtmlStyleCodeblockStruct {
|
|
307
|
+
SharedColor color{};
|
|
308
|
+
Float borderRadius{0.0};
|
|
309
|
+
SharedColor backgroundColor{};
|
|
310
|
+
|
|
311
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
312
|
+
bool operator==(const EnrichedTextInputViewHtmlStyleCodeblockStruct&) const = default;
|
|
313
|
+
|
|
314
|
+
folly::dynamic toDynamic() const {
|
|
315
|
+
folly::dynamic result = folly::dynamic::object();
|
|
316
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
317
|
+
result["borderRadius"] = borderRadius;
|
|
318
|
+
result["backgroundColor"] = ::facebook::react::toDynamic(backgroundColor);
|
|
319
|
+
return result;
|
|
320
|
+
}
|
|
321
|
+
#endif
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextInputViewHtmlStyleCodeblockStruct &result) {
|
|
325
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
326
|
+
|
|
327
|
+
auto tmp_color = map.find("color");
|
|
328
|
+
if (tmp_color != map.end()) {
|
|
329
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
330
|
+
}
|
|
331
|
+
auto tmp_borderRadius = map.find("borderRadius");
|
|
332
|
+
if (tmp_borderRadius != map.end()) {
|
|
333
|
+
fromRawValue(context, tmp_borderRadius->second, result.borderRadius);
|
|
334
|
+
}
|
|
335
|
+
auto tmp_backgroundColor = map.find("backgroundColor");
|
|
336
|
+
if (tmp_backgroundColor != map.end()) {
|
|
337
|
+
fromRawValue(context, tmp_backgroundColor->second, result.backgroundColor);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
static inline std::string toString(const EnrichedTextInputViewHtmlStyleCodeblockStruct &value) {
|
|
342
|
+
return "[Object EnrichedTextInputViewHtmlStyleCodeblockStruct]";
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
346
|
+
static inline folly::dynamic toDynamic(const EnrichedTextInputViewHtmlStyleCodeblockStruct &value) {
|
|
347
|
+
return value.toDynamic();
|
|
348
|
+
}
|
|
349
|
+
#endif
|
|
350
|
+
|
|
351
|
+
struct EnrichedTextInputViewHtmlStyleCodeStruct {
|
|
352
|
+
SharedColor color{};
|
|
353
|
+
SharedColor backgroundColor{};
|
|
354
|
+
|
|
355
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
356
|
+
bool operator==(const EnrichedTextInputViewHtmlStyleCodeStruct&) const = default;
|
|
357
|
+
|
|
358
|
+
folly::dynamic toDynamic() const {
|
|
359
|
+
folly::dynamic result = folly::dynamic::object();
|
|
360
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
361
|
+
result["backgroundColor"] = ::facebook::react::toDynamic(backgroundColor);
|
|
362
|
+
return result;
|
|
363
|
+
}
|
|
364
|
+
#endif
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextInputViewHtmlStyleCodeStruct &result) {
|
|
368
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
369
|
+
|
|
370
|
+
auto tmp_color = map.find("color");
|
|
371
|
+
if (tmp_color != map.end()) {
|
|
372
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
373
|
+
}
|
|
374
|
+
auto tmp_backgroundColor = map.find("backgroundColor");
|
|
375
|
+
if (tmp_backgroundColor != map.end()) {
|
|
376
|
+
fromRawValue(context, tmp_backgroundColor->second, result.backgroundColor);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
static inline std::string toString(const EnrichedTextInputViewHtmlStyleCodeStruct &value) {
|
|
381
|
+
return "[Object EnrichedTextInputViewHtmlStyleCodeStruct]";
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
385
|
+
static inline folly::dynamic toDynamic(const EnrichedTextInputViewHtmlStyleCodeStruct &value) {
|
|
386
|
+
return value.toDynamic();
|
|
387
|
+
}
|
|
388
|
+
#endif
|
|
389
|
+
|
|
390
|
+
struct EnrichedTextInputViewHtmlStyleAStruct {
|
|
391
|
+
SharedColor color{};
|
|
392
|
+
std::string textDecorationLine{};
|
|
393
|
+
|
|
394
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
395
|
+
bool operator==(const EnrichedTextInputViewHtmlStyleAStruct&) const = default;
|
|
396
|
+
|
|
397
|
+
folly::dynamic toDynamic() const {
|
|
398
|
+
folly::dynamic result = folly::dynamic::object();
|
|
399
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
400
|
+
result["textDecorationLine"] = textDecorationLine;
|
|
401
|
+
return result;
|
|
402
|
+
}
|
|
403
|
+
#endif
|
|
404
|
+
};
|
|
405
|
+
|
|
406
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextInputViewHtmlStyleAStruct &result) {
|
|
407
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
408
|
+
|
|
409
|
+
auto tmp_color = map.find("color");
|
|
410
|
+
if (tmp_color != map.end()) {
|
|
411
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
412
|
+
}
|
|
413
|
+
auto tmp_textDecorationLine = map.find("textDecorationLine");
|
|
414
|
+
if (tmp_textDecorationLine != map.end()) {
|
|
415
|
+
fromRawValue(context, tmp_textDecorationLine->second, result.textDecorationLine);
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
static inline std::string toString(const EnrichedTextInputViewHtmlStyleAStruct &value) {
|
|
420
|
+
return "[Object EnrichedTextInputViewHtmlStyleAStruct]";
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
424
|
+
static inline folly::dynamic toDynamic(const EnrichedTextInputViewHtmlStyleAStruct &value) {
|
|
425
|
+
return value.toDynamic();
|
|
426
|
+
}
|
|
427
|
+
#endif
|
|
428
|
+
|
|
429
|
+
struct EnrichedTextInputViewHtmlStyleOlStruct {
|
|
430
|
+
Float gapWidth{0.0};
|
|
431
|
+
Float marginLeft{0.0};
|
|
432
|
+
std::string markerFontWeight{};
|
|
433
|
+
SharedColor markerColor{};
|
|
434
|
+
|
|
435
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
436
|
+
bool operator==(const EnrichedTextInputViewHtmlStyleOlStruct&) const = default;
|
|
437
|
+
|
|
438
|
+
folly::dynamic toDynamic() const {
|
|
439
|
+
folly::dynamic result = folly::dynamic::object();
|
|
440
|
+
result["gapWidth"] = gapWidth;
|
|
441
|
+
result["marginLeft"] = marginLeft;
|
|
442
|
+
result["markerFontWeight"] = markerFontWeight;
|
|
443
|
+
result["markerColor"] = ::facebook::react::toDynamic(markerColor);
|
|
444
|
+
return result;
|
|
445
|
+
}
|
|
446
|
+
#endif
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextInputViewHtmlStyleOlStruct &result) {
|
|
450
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
451
|
+
|
|
452
|
+
auto tmp_gapWidth = map.find("gapWidth");
|
|
453
|
+
if (tmp_gapWidth != map.end()) {
|
|
454
|
+
fromRawValue(context, tmp_gapWidth->second, result.gapWidth);
|
|
455
|
+
}
|
|
456
|
+
auto tmp_marginLeft = map.find("marginLeft");
|
|
457
|
+
if (tmp_marginLeft != map.end()) {
|
|
458
|
+
fromRawValue(context, tmp_marginLeft->second, result.marginLeft);
|
|
459
|
+
}
|
|
460
|
+
auto tmp_markerFontWeight = map.find("markerFontWeight");
|
|
461
|
+
if (tmp_markerFontWeight != map.end()) {
|
|
462
|
+
fromRawValue(context, tmp_markerFontWeight->second, result.markerFontWeight);
|
|
463
|
+
}
|
|
464
|
+
auto tmp_markerColor = map.find("markerColor");
|
|
465
|
+
if (tmp_markerColor != map.end()) {
|
|
466
|
+
fromRawValue(context, tmp_markerColor->second, result.markerColor);
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
static inline std::string toString(const EnrichedTextInputViewHtmlStyleOlStruct &value) {
|
|
471
|
+
return "[Object EnrichedTextInputViewHtmlStyleOlStruct]";
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
475
|
+
static inline folly::dynamic toDynamic(const EnrichedTextInputViewHtmlStyleOlStruct &value) {
|
|
476
|
+
return value.toDynamic();
|
|
477
|
+
}
|
|
478
|
+
#endif
|
|
479
|
+
|
|
480
|
+
struct EnrichedTextInputViewHtmlStyleUlStruct {
|
|
481
|
+
SharedColor bulletColor{};
|
|
482
|
+
Float bulletSize{0.0};
|
|
483
|
+
Float marginLeft{0.0};
|
|
484
|
+
Float gapWidth{0.0};
|
|
485
|
+
|
|
486
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
487
|
+
bool operator==(const EnrichedTextInputViewHtmlStyleUlStruct&) const = default;
|
|
488
|
+
|
|
489
|
+
folly::dynamic toDynamic() const {
|
|
490
|
+
folly::dynamic result = folly::dynamic::object();
|
|
491
|
+
result["bulletColor"] = ::facebook::react::toDynamic(bulletColor);
|
|
492
|
+
result["bulletSize"] = bulletSize;
|
|
493
|
+
result["marginLeft"] = marginLeft;
|
|
494
|
+
result["gapWidth"] = gapWidth;
|
|
495
|
+
return result;
|
|
496
|
+
}
|
|
497
|
+
#endif
|
|
498
|
+
};
|
|
499
|
+
|
|
500
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextInputViewHtmlStyleUlStruct &result) {
|
|
501
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
502
|
+
|
|
503
|
+
auto tmp_bulletColor = map.find("bulletColor");
|
|
504
|
+
if (tmp_bulletColor != map.end()) {
|
|
505
|
+
fromRawValue(context, tmp_bulletColor->second, result.bulletColor);
|
|
506
|
+
}
|
|
507
|
+
auto tmp_bulletSize = map.find("bulletSize");
|
|
508
|
+
if (tmp_bulletSize != map.end()) {
|
|
509
|
+
fromRawValue(context, tmp_bulletSize->second, result.bulletSize);
|
|
510
|
+
}
|
|
511
|
+
auto tmp_marginLeft = map.find("marginLeft");
|
|
512
|
+
if (tmp_marginLeft != map.end()) {
|
|
513
|
+
fromRawValue(context, tmp_marginLeft->second, result.marginLeft);
|
|
514
|
+
}
|
|
515
|
+
auto tmp_gapWidth = map.find("gapWidth");
|
|
516
|
+
if (tmp_gapWidth != map.end()) {
|
|
517
|
+
fromRawValue(context, tmp_gapWidth->second, result.gapWidth);
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
static inline std::string toString(const EnrichedTextInputViewHtmlStyleUlStruct &value) {
|
|
522
|
+
return "[Object EnrichedTextInputViewHtmlStyleUlStruct]";
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
526
|
+
static inline folly::dynamic toDynamic(const EnrichedTextInputViewHtmlStyleUlStruct &value) {
|
|
527
|
+
return value.toDynamic();
|
|
528
|
+
}
|
|
529
|
+
#endif
|
|
530
|
+
|
|
531
|
+
struct EnrichedTextInputViewHtmlStyleUlCheckboxStruct {
|
|
532
|
+
Float gapWidth{0.0};
|
|
533
|
+
Float boxSize{0.0};
|
|
534
|
+
Float marginLeft{0.0};
|
|
535
|
+
SharedColor boxColor{};
|
|
536
|
+
|
|
537
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
538
|
+
bool operator==(const EnrichedTextInputViewHtmlStyleUlCheckboxStruct&) const = default;
|
|
539
|
+
|
|
540
|
+
folly::dynamic toDynamic() const {
|
|
541
|
+
folly::dynamic result = folly::dynamic::object();
|
|
542
|
+
result["gapWidth"] = gapWidth;
|
|
543
|
+
result["boxSize"] = boxSize;
|
|
544
|
+
result["marginLeft"] = marginLeft;
|
|
545
|
+
result["boxColor"] = ::facebook::react::toDynamic(boxColor);
|
|
546
|
+
return result;
|
|
547
|
+
}
|
|
548
|
+
#endif
|
|
549
|
+
};
|
|
550
|
+
|
|
551
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextInputViewHtmlStyleUlCheckboxStruct &result) {
|
|
552
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
553
|
+
|
|
554
|
+
auto tmp_gapWidth = map.find("gapWidth");
|
|
555
|
+
if (tmp_gapWidth != map.end()) {
|
|
556
|
+
fromRawValue(context, tmp_gapWidth->second, result.gapWidth);
|
|
557
|
+
}
|
|
558
|
+
auto tmp_boxSize = map.find("boxSize");
|
|
559
|
+
if (tmp_boxSize != map.end()) {
|
|
560
|
+
fromRawValue(context, tmp_boxSize->second, result.boxSize);
|
|
561
|
+
}
|
|
562
|
+
auto tmp_marginLeft = map.find("marginLeft");
|
|
563
|
+
if (tmp_marginLeft != map.end()) {
|
|
564
|
+
fromRawValue(context, tmp_marginLeft->second, result.marginLeft);
|
|
565
|
+
}
|
|
566
|
+
auto tmp_boxColor = map.find("boxColor");
|
|
567
|
+
if (tmp_boxColor != map.end()) {
|
|
568
|
+
fromRawValue(context, tmp_boxColor->second, result.boxColor);
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
static inline std::string toString(const EnrichedTextInputViewHtmlStyleUlCheckboxStruct &value) {
|
|
573
|
+
return "[Object EnrichedTextInputViewHtmlStyleUlCheckboxStruct]";
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
577
|
+
static inline folly::dynamic toDynamic(const EnrichedTextInputViewHtmlStyleUlCheckboxStruct &value) {
|
|
578
|
+
return value.toDynamic();
|
|
579
|
+
}
|
|
580
|
+
#endif
|
|
581
|
+
|
|
582
|
+
struct EnrichedTextInputViewHtmlStyleStruct {
|
|
583
|
+
EnrichedTextInputViewHtmlStyleH1Struct h1{};
|
|
584
|
+
EnrichedTextInputViewHtmlStyleH2Struct h2{};
|
|
585
|
+
EnrichedTextInputViewHtmlStyleH3Struct h3{};
|
|
586
|
+
EnrichedTextInputViewHtmlStyleH4Struct h4{};
|
|
587
|
+
EnrichedTextInputViewHtmlStyleH5Struct h5{};
|
|
588
|
+
EnrichedTextInputViewHtmlStyleH6Struct h6{};
|
|
589
|
+
EnrichedTextInputViewHtmlStyleBlockquoteStruct blockquote{};
|
|
590
|
+
EnrichedTextInputViewHtmlStyleCodeblockStruct codeblock{};
|
|
591
|
+
EnrichedTextInputViewHtmlStyleCodeStruct code{};
|
|
592
|
+
EnrichedTextInputViewHtmlStyleAStruct a{};
|
|
593
|
+
folly::dynamic mention{};
|
|
594
|
+
EnrichedTextInputViewHtmlStyleOlStruct ol{};
|
|
595
|
+
EnrichedTextInputViewHtmlStyleUlStruct ul{};
|
|
596
|
+
EnrichedTextInputViewHtmlStyleUlCheckboxStruct ulCheckbox{};
|
|
597
|
+
|
|
598
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
599
|
+
bool operator==(const EnrichedTextInputViewHtmlStyleStruct&) const = default;
|
|
600
|
+
|
|
601
|
+
folly::dynamic toDynamic() const {
|
|
602
|
+
folly::dynamic result = folly::dynamic::object();
|
|
603
|
+
result["h1"] = ::facebook::react::toDynamic(h1);
|
|
604
|
+
result["h2"] = ::facebook::react::toDynamic(h2);
|
|
605
|
+
result["h3"] = ::facebook::react::toDynamic(h3);
|
|
606
|
+
result["h4"] = ::facebook::react::toDynamic(h4);
|
|
607
|
+
result["h5"] = ::facebook::react::toDynamic(h5);
|
|
608
|
+
result["h6"] = ::facebook::react::toDynamic(h6);
|
|
609
|
+
result["blockquote"] = ::facebook::react::toDynamic(blockquote);
|
|
610
|
+
result["codeblock"] = ::facebook::react::toDynamic(codeblock);
|
|
611
|
+
result["code"] = ::facebook::react::toDynamic(code);
|
|
612
|
+
result["a"] = ::facebook::react::toDynamic(a);
|
|
613
|
+
result["mention"] = mention;
|
|
614
|
+
result["ol"] = ::facebook::react::toDynamic(ol);
|
|
615
|
+
result["ul"] = ::facebook::react::toDynamic(ul);
|
|
616
|
+
result["ulCheckbox"] = ::facebook::react::toDynamic(ulCheckbox);
|
|
617
|
+
return result;
|
|
618
|
+
}
|
|
619
|
+
#endif
|
|
620
|
+
};
|
|
621
|
+
|
|
622
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextInputViewHtmlStyleStruct &result) {
|
|
623
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
624
|
+
|
|
625
|
+
auto tmp_h1 = map.find("h1");
|
|
626
|
+
if (tmp_h1 != map.end()) {
|
|
627
|
+
fromRawValue(context, tmp_h1->second, result.h1);
|
|
628
|
+
}
|
|
629
|
+
auto tmp_h2 = map.find("h2");
|
|
630
|
+
if (tmp_h2 != map.end()) {
|
|
631
|
+
fromRawValue(context, tmp_h2->second, result.h2);
|
|
632
|
+
}
|
|
633
|
+
auto tmp_h3 = map.find("h3");
|
|
634
|
+
if (tmp_h3 != map.end()) {
|
|
635
|
+
fromRawValue(context, tmp_h3->second, result.h3);
|
|
636
|
+
}
|
|
637
|
+
auto tmp_h4 = map.find("h4");
|
|
638
|
+
if (tmp_h4 != map.end()) {
|
|
639
|
+
fromRawValue(context, tmp_h4->second, result.h4);
|
|
640
|
+
}
|
|
641
|
+
auto tmp_h5 = map.find("h5");
|
|
642
|
+
if (tmp_h5 != map.end()) {
|
|
643
|
+
fromRawValue(context, tmp_h5->second, result.h5);
|
|
644
|
+
}
|
|
645
|
+
auto tmp_h6 = map.find("h6");
|
|
646
|
+
if (tmp_h6 != map.end()) {
|
|
647
|
+
fromRawValue(context, tmp_h6->second, result.h6);
|
|
648
|
+
}
|
|
649
|
+
auto tmp_blockquote = map.find("blockquote");
|
|
650
|
+
if (tmp_blockquote != map.end()) {
|
|
651
|
+
fromRawValue(context, tmp_blockquote->second, result.blockquote);
|
|
652
|
+
}
|
|
653
|
+
auto tmp_codeblock = map.find("codeblock");
|
|
654
|
+
if (tmp_codeblock != map.end()) {
|
|
655
|
+
fromRawValue(context, tmp_codeblock->second, result.codeblock);
|
|
656
|
+
}
|
|
657
|
+
auto tmp_code = map.find("code");
|
|
658
|
+
if (tmp_code != map.end()) {
|
|
659
|
+
fromRawValue(context, tmp_code->second, result.code);
|
|
660
|
+
}
|
|
661
|
+
auto tmp_a = map.find("a");
|
|
662
|
+
if (tmp_a != map.end()) {
|
|
663
|
+
fromRawValue(context, tmp_a->second, result.a);
|
|
664
|
+
}
|
|
665
|
+
auto tmp_mention = map.find("mention");
|
|
666
|
+
if (tmp_mention != map.end()) {
|
|
667
|
+
fromRawValue(context, tmp_mention->second, result.mention);
|
|
668
|
+
}
|
|
669
|
+
auto tmp_ol = map.find("ol");
|
|
670
|
+
if (tmp_ol != map.end()) {
|
|
671
|
+
fromRawValue(context, tmp_ol->second, result.ol);
|
|
672
|
+
}
|
|
673
|
+
auto tmp_ul = map.find("ul");
|
|
674
|
+
if (tmp_ul != map.end()) {
|
|
675
|
+
fromRawValue(context, tmp_ul->second, result.ul);
|
|
676
|
+
}
|
|
677
|
+
auto tmp_ulCheckbox = map.find("ulCheckbox");
|
|
678
|
+
if (tmp_ulCheckbox != map.end()) {
|
|
679
|
+
fromRawValue(context, tmp_ulCheckbox->second, result.ulCheckbox);
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
static inline std::string toString(const EnrichedTextInputViewHtmlStyleStruct &value) {
|
|
684
|
+
return "[Object EnrichedTextInputViewHtmlStyleStruct]";
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
688
|
+
static inline folly::dynamic toDynamic(const EnrichedTextInputViewHtmlStyleStruct &value) {
|
|
689
|
+
return value.toDynamic();
|
|
690
|
+
}
|
|
691
|
+
#endif
|
|
692
|
+
|
|
693
|
+
struct EnrichedTextInputViewLinkRegexStruct {
|
|
694
|
+
std::string pattern{};
|
|
695
|
+
bool caseInsensitive{false};
|
|
696
|
+
bool dotAll{false};
|
|
697
|
+
bool isDisabled{false};
|
|
698
|
+
bool isDefault{false};
|
|
699
|
+
|
|
700
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
701
|
+
bool operator==(const EnrichedTextInputViewLinkRegexStruct&) const = default;
|
|
702
|
+
|
|
703
|
+
folly::dynamic toDynamic() const {
|
|
704
|
+
folly::dynamic result = folly::dynamic::object();
|
|
705
|
+
result["pattern"] = pattern;
|
|
706
|
+
result["caseInsensitive"] = caseInsensitive;
|
|
707
|
+
result["dotAll"] = dotAll;
|
|
708
|
+
result["isDisabled"] = isDisabled;
|
|
709
|
+
result["isDefault"] = isDefault;
|
|
710
|
+
return result;
|
|
711
|
+
}
|
|
712
|
+
#endif
|
|
713
|
+
};
|
|
714
|
+
|
|
715
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextInputViewLinkRegexStruct &result) {
|
|
716
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
717
|
+
|
|
718
|
+
auto tmp_pattern = map.find("pattern");
|
|
719
|
+
if (tmp_pattern != map.end()) {
|
|
720
|
+
fromRawValue(context, tmp_pattern->second, result.pattern);
|
|
721
|
+
}
|
|
722
|
+
auto tmp_caseInsensitive = map.find("caseInsensitive");
|
|
723
|
+
if (tmp_caseInsensitive != map.end()) {
|
|
724
|
+
fromRawValue(context, tmp_caseInsensitive->second, result.caseInsensitive);
|
|
725
|
+
}
|
|
726
|
+
auto tmp_dotAll = map.find("dotAll");
|
|
727
|
+
if (tmp_dotAll != map.end()) {
|
|
728
|
+
fromRawValue(context, tmp_dotAll->second, result.dotAll);
|
|
729
|
+
}
|
|
730
|
+
auto tmp_isDisabled = map.find("isDisabled");
|
|
731
|
+
if (tmp_isDisabled != map.end()) {
|
|
732
|
+
fromRawValue(context, tmp_isDisabled->second, result.isDisabled);
|
|
733
|
+
}
|
|
734
|
+
auto tmp_isDefault = map.find("isDefault");
|
|
735
|
+
if (tmp_isDefault != map.end()) {
|
|
736
|
+
fromRawValue(context, tmp_isDefault->second, result.isDefault);
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
static inline std::string toString(const EnrichedTextInputViewLinkRegexStruct &value) {
|
|
741
|
+
return "[Object EnrichedTextInputViewLinkRegexStruct]";
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
745
|
+
static inline folly::dynamic toDynamic(const EnrichedTextInputViewLinkRegexStruct &value) {
|
|
746
|
+
return value.toDynamic();
|
|
747
|
+
}
|
|
748
|
+
#endif
|
|
749
|
+
|
|
750
|
+
struct EnrichedTextInputViewContextMenuItemsStruct {
|
|
751
|
+
std::string text{};
|
|
752
|
+
|
|
753
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
754
|
+
bool operator==(const EnrichedTextInputViewContextMenuItemsStruct&) const = default;
|
|
755
|
+
|
|
756
|
+
folly::dynamic toDynamic() const {
|
|
757
|
+
folly::dynamic result = folly::dynamic::object();
|
|
758
|
+
result["text"] = text;
|
|
759
|
+
return result;
|
|
760
|
+
}
|
|
761
|
+
#endif
|
|
762
|
+
};
|
|
763
|
+
|
|
764
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextInputViewContextMenuItemsStruct &result) {
|
|
765
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
766
|
+
|
|
767
|
+
auto tmp_text = map.find("text");
|
|
768
|
+
if (tmp_text != map.end()) {
|
|
769
|
+
fromRawValue(context, tmp_text->second, result.text);
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
static inline std::string toString(const EnrichedTextInputViewContextMenuItemsStruct &value) {
|
|
774
|
+
return "[Object EnrichedTextInputViewContextMenuItemsStruct]";
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
778
|
+
static inline folly::dynamic toDynamic(const EnrichedTextInputViewContextMenuItemsStruct &value) {
|
|
779
|
+
return value.toDynamic();
|
|
780
|
+
}
|
|
781
|
+
#endif
|
|
782
|
+
|
|
783
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<EnrichedTextInputViewContextMenuItemsStruct> &result) {
|
|
784
|
+
auto items = (std::vector<RawValue>)value;
|
|
785
|
+
for (const auto &item : items) {
|
|
786
|
+
EnrichedTextInputViewContextMenuItemsStruct newItem;
|
|
787
|
+
fromRawValue(context, item, newItem);
|
|
788
|
+
result.emplace_back(newItem);
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
struct EnrichedTextInputViewTextShortcutsStruct {
|
|
794
|
+
std::string trigger{};
|
|
795
|
+
std::string style{};
|
|
796
|
+
|
|
797
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
798
|
+
bool operator==(const EnrichedTextInputViewTextShortcutsStruct&) const = default;
|
|
799
|
+
|
|
800
|
+
folly::dynamic toDynamic() const {
|
|
801
|
+
folly::dynamic result = folly::dynamic::object();
|
|
802
|
+
result["trigger"] = trigger;
|
|
803
|
+
result["style"] = style;
|
|
804
|
+
return result;
|
|
805
|
+
}
|
|
806
|
+
#endif
|
|
807
|
+
};
|
|
808
|
+
|
|
809
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextInputViewTextShortcutsStruct &result) {
|
|
810
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
811
|
+
|
|
812
|
+
auto tmp_trigger = map.find("trigger");
|
|
813
|
+
if (tmp_trigger != map.end()) {
|
|
814
|
+
fromRawValue(context, tmp_trigger->second, result.trigger);
|
|
815
|
+
}
|
|
816
|
+
auto tmp_style = map.find("style");
|
|
817
|
+
if (tmp_style != map.end()) {
|
|
818
|
+
fromRawValue(context, tmp_style->second, result.style);
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
static inline std::string toString(const EnrichedTextInputViewTextShortcutsStruct &value) {
|
|
823
|
+
return "[Object EnrichedTextInputViewTextShortcutsStruct]";
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
827
|
+
static inline folly::dynamic toDynamic(const EnrichedTextInputViewTextShortcutsStruct &value) {
|
|
828
|
+
return value.toDynamic();
|
|
829
|
+
}
|
|
830
|
+
#endif
|
|
831
|
+
|
|
832
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<EnrichedTextInputViewTextShortcutsStruct> &result) {
|
|
833
|
+
auto items = (std::vector<RawValue>)value;
|
|
834
|
+
for (const auto &item : items) {
|
|
835
|
+
EnrichedTextInputViewTextShortcutsStruct newItem;
|
|
836
|
+
fromRawValue(context, item, newItem);
|
|
837
|
+
result.emplace_back(newItem);
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
class EnrichedTextInputViewProps final : public ViewProps {
|
|
842
|
+
public:
|
|
843
|
+
EnrichedTextInputViewProps() = default;
|
|
844
|
+
EnrichedTextInputViewProps(const PropsParserContext& context, const EnrichedTextInputViewProps &sourceProps, const RawProps &rawProps);
|
|
845
|
+
|
|
846
|
+
#pragma mark - Props
|
|
847
|
+
|
|
848
|
+
bool autoFocus{false};
|
|
849
|
+
bool editable{false};
|
|
850
|
+
std::string defaultValue{};
|
|
851
|
+
std::string placeholder{};
|
|
852
|
+
SharedColor placeholderTextColor{};
|
|
853
|
+
std::vector<std::string> mentionIndicators{};
|
|
854
|
+
SharedColor cursorColor{};
|
|
855
|
+
SharedColor selectionColor{};
|
|
856
|
+
std::string autoCapitalize{};
|
|
857
|
+
EnrichedTextInputViewHtmlStyleStruct htmlStyle{};
|
|
858
|
+
bool scrollEnabled{false};
|
|
859
|
+
EnrichedTextInputViewLinkRegexStruct linkRegex{};
|
|
860
|
+
std::vector<EnrichedTextInputViewContextMenuItemsStruct> contextMenuItems{};
|
|
861
|
+
std::vector<EnrichedTextInputViewTextShortcutsStruct> textShortcuts{};
|
|
862
|
+
std::string returnKeyType{};
|
|
863
|
+
std::string returnKeyLabel{};
|
|
864
|
+
std::string submitBehavior{};
|
|
865
|
+
bool allowFontScaling{false};
|
|
866
|
+
SharedColor color{};
|
|
867
|
+
Float fontSize{0.0};
|
|
868
|
+
Float lineHeight{0.0};
|
|
869
|
+
std::string fontFamily{};
|
|
870
|
+
std::string fontWeight{};
|
|
871
|
+
std::string fontStyle{};
|
|
872
|
+
bool isOnChangeHtmlSet{false};
|
|
873
|
+
bool isOnChangeTextSet{false};
|
|
874
|
+
bool androidExperimentalSynchronousEvents{false};
|
|
875
|
+
bool useHtmlNormalizer{false};
|
|
876
|
+
|
|
877
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
878
|
+
ComponentName getDiffPropsImplementationTarget() const override;
|
|
879
|
+
|
|
880
|
+
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
|
881
|
+
#endif
|
|
882
|
+
};
|
|
883
|
+
|
|
884
|
+
struct EnrichedTextViewHtmlStyleH1Struct {
|
|
885
|
+
Float fontSize{0.0};
|
|
886
|
+
bool bold{false};
|
|
887
|
+
|
|
888
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
889
|
+
bool operator==(const EnrichedTextViewHtmlStyleH1Struct&) const = default;
|
|
890
|
+
|
|
891
|
+
folly::dynamic toDynamic() const {
|
|
892
|
+
folly::dynamic result = folly::dynamic::object();
|
|
893
|
+
result["fontSize"] = fontSize;
|
|
894
|
+
result["bold"] = bold;
|
|
895
|
+
return result;
|
|
896
|
+
}
|
|
897
|
+
#endif
|
|
898
|
+
};
|
|
899
|
+
|
|
900
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextViewHtmlStyleH1Struct &result) {
|
|
901
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
902
|
+
|
|
903
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
904
|
+
if (tmp_fontSize != map.end()) {
|
|
905
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
906
|
+
}
|
|
907
|
+
auto tmp_bold = map.find("bold");
|
|
908
|
+
if (tmp_bold != map.end()) {
|
|
909
|
+
fromRawValue(context, tmp_bold->second, result.bold);
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
static inline std::string toString(const EnrichedTextViewHtmlStyleH1Struct &value) {
|
|
914
|
+
return "[Object EnrichedTextViewHtmlStyleH1Struct]";
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
918
|
+
static inline folly::dynamic toDynamic(const EnrichedTextViewHtmlStyleH1Struct &value) {
|
|
919
|
+
return value.toDynamic();
|
|
920
|
+
}
|
|
921
|
+
#endif
|
|
922
|
+
|
|
923
|
+
struct EnrichedTextViewHtmlStyleH2Struct {
|
|
924
|
+
Float fontSize{0.0};
|
|
925
|
+
bool bold{false};
|
|
926
|
+
|
|
927
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
928
|
+
bool operator==(const EnrichedTextViewHtmlStyleH2Struct&) const = default;
|
|
929
|
+
|
|
930
|
+
folly::dynamic toDynamic() const {
|
|
931
|
+
folly::dynamic result = folly::dynamic::object();
|
|
932
|
+
result["fontSize"] = fontSize;
|
|
933
|
+
result["bold"] = bold;
|
|
934
|
+
return result;
|
|
935
|
+
}
|
|
936
|
+
#endif
|
|
937
|
+
};
|
|
938
|
+
|
|
939
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextViewHtmlStyleH2Struct &result) {
|
|
940
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
941
|
+
|
|
942
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
943
|
+
if (tmp_fontSize != map.end()) {
|
|
944
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
945
|
+
}
|
|
946
|
+
auto tmp_bold = map.find("bold");
|
|
947
|
+
if (tmp_bold != map.end()) {
|
|
948
|
+
fromRawValue(context, tmp_bold->second, result.bold);
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
static inline std::string toString(const EnrichedTextViewHtmlStyleH2Struct &value) {
|
|
953
|
+
return "[Object EnrichedTextViewHtmlStyleH2Struct]";
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
957
|
+
static inline folly::dynamic toDynamic(const EnrichedTextViewHtmlStyleH2Struct &value) {
|
|
958
|
+
return value.toDynamic();
|
|
959
|
+
}
|
|
960
|
+
#endif
|
|
961
|
+
|
|
962
|
+
struct EnrichedTextViewHtmlStyleH3Struct {
|
|
963
|
+
Float fontSize{0.0};
|
|
964
|
+
bool bold{false};
|
|
965
|
+
|
|
966
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
967
|
+
bool operator==(const EnrichedTextViewHtmlStyleH3Struct&) const = default;
|
|
968
|
+
|
|
969
|
+
folly::dynamic toDynamic() const {
|
|
970
|
+
folly::dynamic result = folly::dynamic::object();
|
|
971
|
+
result["fontSize"] = fontSize;
|
|
972
|
+
result["bold"] = bold;
|
|
973
|
+
return result;
|
|
974
|
+
}
|
|
975
|
+
#endif
|
|
976
|
+
};
|
|
977
|
+
|
|
978
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextViewHtmlStyleH3Struct &result) {
|
|
979
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
980
|
+
|
|
981
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
982
|
+
if (tmp_fontSize != map.end()) {
|
|
983
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
984
|
+
}
|
|
985
|
+
auto tmp_bold = map.find("bold");
|
|
986
|
+
if (tmp_bold != map.end()) {
|
|
987
|
+
fromRawValue(context, tmp_bold->second, result.bold);
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
static inline std::string toString(const EnrichedTextViewHtmlStyleH3Struct &value) {
|
|
992
|
+
return "[Object EnrichedTextViewHtmlStyleH3Struct]";
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
996
|
+
static inline folly::dynamic toDynamic(const EnrichedTextViewHtmlStyleH3Struct &value) {
|
|
997
|
+
return value.toDynamic();
|
|
998
|
+
}
|
|
999
|
+
#endif
|
|
1000
|
+
|
|
1001
|
+
struct EnrichedTextViewHtmlStyleH4Struct {
|
|
1002
|
+
Float fontSize{0.0};
|
|
1003
|
+
bool bold{false};
|
|
1004
|
+
|
|
1005
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1006
|
+
bool operator==(const EnrichedTextViewHtmlStyleH4Struct&) const = default;
|
|
1007
|
+
|
|
1008
|
+
folly::dynamic toDynamic() const {
|
|
1009
|
+
folly::dynamic result = folly::dynamic::object();
|
|
1010
|
+
result["fontSize"] = fontSize;
|
|
1011
|
+
result["bold"] = bold;
|
|
1012
|
+
return result;
|
|
1013
|
+
}
|
|
1014
|
+
#endif
|
|
1015
|
+
};
|
|
1016
|
+
|
|
1017
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextViewHtmlStyleH4Struct &result) {
|
|
1018
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
1019
|
+
|
|
1020
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
1021
|
+
if (tmp_fontSize != map.end()) {
|
|
1022
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
1023
|
+
}
|
|
1024
|
+
auto tmp_bold = map.find("bold");
|
|
1025
|
+
if (tmp_bold != map.end()) {
|
|
1026
|
+
fromRawValue(context, tmp_bold->second, result.bold);
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
static inline std::string toString(const EnrichedTextViewHtmlStyleH4Struct &value) {
|
|
1031
|
+
return "[Object EnrichedTextViewHtmlStyleH4Struct]";
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1035
|
+
static inline folly::dynamic toDynamic(const EnrichedTextViewHtmlStyleH4Struct &value) {
|
|
1036
|
+
return value.toDynamic();
|
|
1037
|
+
}
|
|
1038
|
+
#endif
|
|
1039
|
+
|
|
1040
|
+
struct EnrichedTextViewHtmlStyleH5Struct {
|
|
1041
|
+
Float fontSize{0.0};
|
|
1042
|
+
bool bold{false};
|
|
1043
|
+
|
|
1044
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1045
|
+
bool operator==(const EnrichedTextViewHtmlStyleH5Struct&) const = default;
|
|
1046
|
+
|
|
1047
|
+
folly::dynamic toDynamic() const {
|
|
1048
|
+
folly::dynamic result = folly::dynamic::object();
|
|
1049
|
+
result["fontSize"] = fontSize;
|
|
1050
|
+
result["bold"] = bold;
|
|
1051
|
+
return result;
|
|
1052
|
+
}
|
|
1053
|
+
#endif
|
|
1054
|
+
};
|
|
1055
|
+
|
|
1056
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextViewHtmlStyleH5Struct &result) {
|
|
1057
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
1058
|
+
|
|
1059
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
1060
|
+
if (tmp_fontSize != map.end()) {
|
|
1061
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
1062
|
+
}
|
|
1063
|
+
auto tmp_bold = map.find("bold");
|
|
1064
|
+
if (tmp_bold != map.end()) {
|
|
1065
|
+
fromRawValue(context, tmp_bold->second, result.bold);
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
static inline std::string toString(const EnrichedTextViewHtmlStyleH5Struct &value) {
|
|
1070
|
+
return "[Object EnrichedTextViewHtmlStyleH5Struct]";
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1074
|
+
static inline folly::dynamic toDynamic(const EnrichedTextViewHtmlStyleH5Struct &value) {
|
|
1075
|
+
return value.toDynamic();
|
|
1076
|
+
}
|
|
1077
|
+
#endif
|
|
1078
|
+
|
|
1079
|
+
struct EnrichedTextViewHtmlStyleH6Struct {
|
|
1080
|
+
Float fontSize{0.0};
|
|
1081
|
+
bool bold{false};
|
|
1082
|
+
|
|
1083
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1084
|
+
bool operator==(const EnrichedTextViewHtmlStyleH6Struct&) const = default;
|
|
1085
|
+
|
|
1086
|
+
folly::dynamic toDynamic() const {
|
|
1087
|
+
folly::dynamic result = folly::dynamic::object();
|
|
1088
|
+
result["fontSize"] = fontSize;
|
|
1089
|
+
result["bold"] = bold;
|
|
1090
|
+
return result;
|
|
1091
|
+
}
|
|
1092
|
+
#endif
|
|
1093
|
+
};
|
|
1094
|
+
|
|
1095
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextViewHtmlStyleH6Struct &result) {
|
|
1096
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
1097
|
+
|
|
1098
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
1099
|
+
if (tmp_fontSize != map.end()) {
|
|
1100
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
1101
|
+
}
|
|
1102
|
+
auto tmp_bold = map.find("bold");
|
|
1103
|
+
if (tmp_bold != map.end()) {
|
|
1104
|
+
fromRawValue(context, tmp_bold->second, result.bold);
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
static inline std::string toString(const EnrichedTextViewHtmlStyleH6Struct &value) {
|
|
1109
|
+
return "[Object EnrichedTextViewHtmlStyleH6Struct]";
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1113
|
+
static inline folly::dynamic toDynamic(const EnrichedTextViewHtmlStyleH6Struct &value) {
|
|
1114
|
+
return value.toDynamic();
|
|
1115
|
+
}
|
|
1116
|
+
#endif
|
|
1117
|
+
|
|
1118
|
+
struct EnrichedTextViewHtmlStyleBlockquoteStruct {
|
|
1119
|
+
SharedColor borderColor{};
|
|
1120
|
+
Float borderWidth{0.0};
|
|
1121
|
+
Float gapWidth{0.0};
|
|
1122
|
+
SharedColor color{};
|
|
1123
|
+
|
|
1124
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1125
|
+
bool operator==(const EnrichedTextViewHtmlStyleBlockquoteStruct&) const = default;
|
|
1126
|
+
|
|
1127
|
+
folly::dynamic toDynamic() const {
|
|
1128
|
+
folly::dynamic result = folly::dynamic::object();
|
|
1129
|
+
result["borderColor"] = ::facebook::react::toDynamic(borderColor);
|
|
1130
|
+
result["borderWidth"] = borderWidth;
|
|
1131
|
+
result["gapWidth"] = gapWidth;
|
|
1132
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
1133
|
+
return result;
|
|
1134
|
+
}
|
|
1135
|
+
#endif
|
|
1136
|
+
};
|
|
1137
|
+
|
|
1138
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextViewHtmlStyleBlockquoteStruct &result) {
|
|
1139
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
1140
|
+
|
|
1141
|
+
auto tmp_borderColor = map.find("borderColor");
|
|
1142
|
+
if (tmp_borderColor != map.end()) {
|
|
1143
|
+
fromRawValue(context, tmp_borderColor->second, result.borderColor);
|
|
1144
|
+
}
|
|
1145
|
+
auto tmp_borderWidth = map.find("borderWidth");
|
|
1146
|
+
if (tmp_borderWidth != map.end()) {
|
|
1147
|
+
fromRawValue(context, tmp_borderWidth->second, result.borderWidth);
|
|
1148
|
+
}
|
|
1149
|
+
auto tmp_gapWidth = map.find("gapWidth");
|
|
1150
|
+
if (tmp_gapWidth != map.end()) {
|
|
1151
|
+
fromRawValue(context, tmp_gapWidth->second, result.gapWidth);
|
|
1152
|
+
}
|
|
1153
|
+
auto tmp_color = map.find("color");
|
|
1154
|
+
if (tmp_color != map.end()) {
|
|
1155
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
static inline std::string toString(const EnrichedTextViewHtmlStyleBlockquoteStruct &value) {
|
|
1160
|
+
return "[Object EnrichedTextViewHtmlStyleBlockquoteStruct]";
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1164
|
+
static inline folly::dynamic toDynamic(const EnrichedTextViewHtmlStyleBlockquoteStruct &value) {
|
|
1165
|
+
return value.toDynamic();
|
|
1166
|
+
}
|
|
1167
|
+
#endif
|
|
1168
|
+
|
|
1169
|
+
struct EnrichedTextViewHtmlStyleCodeblockStruct {
|
|
1170
|
+
SharedColor color{};
|
|
1171
|
+
Float borderRadius{0.0};
|
|
1172
|
+
SharedColor backgroundColor{};
|
|
1173
|
+
|
|
1174
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1175
|
+
bool operator==(const EnrichedTextViewHtmlStyleCodeblockStruct&) const = default;
|
|
1176
|
+
|
|
1177
|
+
folly::dynamic toDynamic() const {
|
|
1178
|
+
folly::dynamic result = folly::dynamic::object();
|
|
1179
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
1180
|
+
result["borderRadius"] = borderRadius;
|
|
1181
|
+
result["backgroundColor"] = ::facebook::react::toDynamic(backgroundColor);
|
|
1182
|
+
return result;
|
|
1183
|
+
}
|
|
1184
|
+
#endif
|
|
1185
|
+
};
|
|
1186
|
+
|
|
1187
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextViewHtmlStyleCodeblockStruct &result) {
|
|
1188
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
1189
|
+
|
|
1190
|
+
auto tmp_color = map.find("color");
|
|
1191
|
+
if (tmp_color != map.end()) {
|
|
1192
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
1193
|
+
}
|
|
1194
|
+
auto tmp_borderRadius = map.find("borderRadius");
|
|
1195
|
+
if (tmp_borderRadius != map.end()) {
|
|
1196
|
+
fromRawValue(context, tmp_borderRadius->second, result.borderRadius);
|
|
1197
|
+
}
|
|
1198
|
+
auto tmp_backgroundColor = map.find("backgroundColor");
|
|
1199
|
+
if (tmp_backgroundColor != map.end()) {
|
|
1200
|
+
fromRawValue(context, tmp_backgroundColor->second, result.backgroundColor);
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
static inline std::string toString(const EnrichedTextViewHtmlStyleCodeblockStruct &value) {
|
|
1205
|
+
return "[Object EnrichedTextViewHtmlStyleCodeblockStruct]";
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1209
|
+
static inline folly::dynamic toDynamic(const EnrichedTextViewHtmlStyleCodeblockStruct &value) {
|
|
1210
|
+
return value.toDynamic();
|
|
1211
|
+
}
|
|
1212
|
+
#endif
|
|
1213
|
+
|
|
1214
|
+
struct EnrichedTextViewHtmlStyleCodeStruct {
|
|
1215
|
+
SharedColor color{};
|
|
1216
|
+
SharedColor backgroundColor{};
|
|
1217
|
+
|
|
1218
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1219
|
+
bool operator==(const EnrichedTextViewHtmlStyleCodeStruct&) const = default;
|
|
1220
|
+
|
|
1221
|
+
folly::dynamic toDynamic() const {
|
|
1222
|
+
folly::dynamic result = folly::dynamic::object();
|
|
1223
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
1224
|
+
result["backgroundColor"] = ::facebook::react::toDynamic(backgroundColor);
|
|
1225
|
+
return result;
|
|
1226
|
+
}
|
|
1227
|
+
#endif
|
|
1228
|
+
};
|
|
1229
|
+
|
|
1230
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextViewHtmlStyleCodeStruct &result) {
|
|
1231
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
1232
|
+
|
|
1233
|
+
auto tmp_color = map.find("color");
|
|
1234
|
+
if (tmp_color != map.end()) {
|
|
1235
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
1236
|
+
}
|
|
1237
|
+
auto tmp_backgroundColor = map.find("backgroundColor");
|
|
1238
|
+
if (tmp_backgroundColor != map.end()) {
|
|
1239
|
+
fromRawValue(context, tmp_backgroundColor->second, result.backgroundColor);
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
static inline std::string toString(const EnrichedTextViewHtmlStyleCodeStruct &value) {
|
|
1244
|
+
return "[Object EnrichedTextViewHtmlStyleCodeStruct]";
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1248
|
+
static inline folly::dynamic toDynamic(const EnrichedTextViewHtmlStyleCodeStruct &value) {
|
|
1249
|
+
return value.toDynamic();
|
|
1250
|
+
}
|
|
1251
|
+
#endif
|
|
1252
|
+
|
|
1253
|
+
struct EnrichedTextViewHtmlStyleAStruct {
|
|
1254
|
+
SharedColor color{};
|
|
1255
|
+
std::string textDecorationLine{};
|
|
1256
|
+
SharedColor pressColor{};
|
|
1257
|
+
std::string pressTextDecorationLine{};
|
|
1258
|
+
|
|
1259
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1260
|
+
bool operator==(const EnrichedTextViewHtmlStyleAStruct&) const = default;
|
|
1261
|
+
|
|
1262
|
+
folly::dynamic toDynamic() const {
|
|
1263
|
+
folly::dynamic result = folly::dynamic::object();
|
|
1264
|
+
result["color"] = ::facebook::react::toDynamic(color);
|
|
1265
|
+
result["textDecorationLine"] = textDecorationLine;
|
|
1266
|
+
result["pressColor"] = ::facebook::react::toDynamic(pressColor);
|
|
1267
|
+
result["pressTextDecorationLine"] = pressTextDecorationLine;
|
|
1268
|
+
return result;
|
|
1269
|
+
}
|
|
1270
|
+
#endif
|
|
1271
|
+
};
|
|
1272
|
+
|
|
1273
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextViewHtmlStyleAStruct &result) {
|
|
1274
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
1275
|
+
|
|
1276
|
+
auto tmp_color = map.find("color");
|
|
1277
|
+
if (tmp_color != map.end()) {
|
|
1278
|
+
fromRawValue(context, tmp_color->second, result.color);
|
|
1279
|
+
}
|
|
1280
|
+
auto tmp_textDecorationLine = map.find("textDecorationLine");
|
|
1281
|
+
if (tmp_textDecorationLine != map.end()) {
|
|
1282
|
+
fromRawValue(context, tmp_textDecorationLine->second, result.textDecorationLine);
|
|
1283
|
+
}
|
|
1284
|
+
auto tmp_pressColor = map.find("pressColor");
|
|
1285
|
+
if (tmp_pressColor != map.end()) {
|
|
1286
|
+
fromRawValue(context, tmp_pressColor->second, result.pressColor);
|
|
1287
|
+
}
|
|
1288
|
+
auto tmp_pressTextDecorationLine = map.find("pressTextDecorationLine");
|
|
1289
|
+
if (tmp_pressTextDecorationLine != map.end()) {
|
|
1290
|
+
fromRawValue(context, tmp_pressTextDecorationLine->second, result.pressTextDecorationLine);
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
static inline std::string toString(const EnrichedTextViewHtmlStyleAStruct &value) {
|
|
1295
|
+
return "[Object EnrichedTextViewHtmlStyleAStruct]";
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1299
|
+
static inline folly::dynamic toDynamic(const EnrichedTextViewHtmlStyleAStruct &value) {
|
|
1300
|
+
return value.toDynamic();
|
|
1301
|
+
}
|
|
1302
|
+
#endif
|
|
1303
|
+
|
|
1304
|
+
struct EnrichedTextViewHtmlStyleOlStruct {
|
|
1305
|
+
Float gapWidth{0.0};
|
|
1306
|
+
Float marginLeft{0.0};
|
|
1307
|
+
std::string markerFontWeight{};
|
|
1308
|
+
SharedColor markerColor{};
|
|
1309
|
+
|
|
1310
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1311
|
+
bool operator==(const EnrichedTextViewHtmlStyleOlStruct&) const = default;
|
|
1312
|
+
|
|
1313
|
+
folly::dynamic toDynamic() const {
|
|
1314
|
+
folly::dynamic result = folly::dynamic::object();
|
|
1315
|
+
result["gapWidth"] = gapWidth;
|
|
1316
|
+
result["marginLeft"] = marginLeft;
|
|
1317
|
+
result["markerFontWeight"] = markerFontWeight;
|
|
1318
|
+
result["markerColor"] = ::facebook::react::toDynamic(markerColor);
|
|
1319
|
+
return result;
|
|
1320
|
+
}
|
|
1321
|
+
#endif
|
|
1322
|
+
};
|
|
1323
|
+
|
|
1324
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextViewHtmlStyleOlStruct &result) {
|
|
1325
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
1326
|
+
|
|
1327
|
+
auto tmp_gapWidth = map.find("gapWidth");
|
|
1328
|
+
if (tmp_gapWidth != map.end()) {
|
|
1329
|
+
fromRawValue(context, tmp_gapWidth->second, result.gapWidth);
|
|
1330
|
+
}
|
|
1331
|
+
auto tmp_marginLeft = map.find("marginLeft");
|
|
1332
|
+
if (tmp_marginLeft != map.end()) {
|
|
1333
|
+
fromRawValue(context, tmp_marginLeft->second, result.marginLeft);
|
|
1334
|
+
}
|
|
1335
|
+
auto tmp_markerFontWeight = map.find("markerFontWeight");
|
|
1336
|
+
if (tmp_markerFontWeight != map.end()) {
|
|
1337
|
+
fromRawValue(context, tmp_markerFontWeight->second, result.markerFontWeight);
|
|
1338
|
+
}
|
|
1339
|
+
auto tmp_markerColor = map.find("markerColor");
|
|
1340
|
+
if (tmp_markerColor != map.end()) {
|
|
1341
|
+
fromRawValue(context, tmp_markerColor->second, result.markerColor);
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
static inline std::string toString(const EnrichedTextViewHtmlStyleOlStruct &value) {
|
|
1346
|
+
return "[Object EnrichedTextViewHtmlStyleOlStruct]";
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1350
|
+
static inline folly::dynamic toDynamic(const EnrichedTextViewHtmlStyleOlStruct &value) {
|
|
1351
|
+
return value.toDynamic();
|
|
1352
|
+
}
|
|
1353
|
+
#endif
|
|
1354
|
+
|
|
1355
|
+
struct EnrichedTextViewHtmlStyleUlStruct {
|
|
1356
|
+
SharedColor bulletColor{};
|
|
1357
|
+
Float bulletSize{0.0};
|
|
1358
|
+
Float marginLeft{0.0};
|
|
1359
|
+
Float gapWidth{0.0};
|
|
1360
|
+
|
|
1361
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1362
|
+
bool operator==(const EnrichedTextViewHtmlStyleUlStruct&) const = default;
|
|
1363
|
+
|
|
1364
|
+
folly::dynamic toDynamic() const {
|
|
1365
|
+
folly::dynamic result = folly::dynamic::object();
|
|
1366
|
+
result["bulletColor"] = ::facebook::react::toDynamic(bulletColor);
|
|
1367
|
+
result["bulletSize"] = bulletSize;
|
|
1368
|
+
result["marginLeft"] = marginLeft;
|
|
1369
|
+
result["gapWidth"] = gapWidth;
|
|
1370
|
+
return result;
|
|
1371
|
+
}
|
|
1372
|
+
#endif
|
|
1373
|
+
};
|
|
1374
|
+
|
|
1375
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextViewHtmlStyleUlStruct &result) {
|
|
1376
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
1377
|
+
|
|
1378
|
+
auto tmp_bulletColor = map.find("bulletColor");
|
|
1379
|
+
if (tmp_bulletColor != map.end()) {
|
|
1380
|
+
fromRawValue(context, tmp_bulletColor->second, result.bulletColor);
|
|
1381
|
+
}
|
|
1382
|
+
auto tmp_bulletSize = map.find("bulletSize");
|
|
1383
|
+
if (tmp_bulletSize != map.end()) {
|
|
1384
|
+
fromRawValue(context, tmp_bulletSize->second, result.bulletSize);
|
|
1385
|
+
}
|
|
1386
|
+
auto tmp_marginLeft = map.find("marginLeft");
|
|
1387
|
+
if (tmp_marginLeft != map.end()) {
|
|
1388
|
+
fromRawValue(context, tmp_marginLeft->second, result.marginLeft);
|
|
1389
|
+
}
|
|
1390
|
+
auto tmp_gapWidth = map.find("gapWidth");
|
|
1391
|
+
if (tmp_gapWidth != map.end()) {
|
|
1392
|
+
fromRawValue(context, tmp_gapWidth->second, result.gapWidth);
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
static inline std::string toString(const EnrichedTextViewHtmlStyleUlStruct &value) {
|
|
1397
|
+
return "[Object EnrichedTextViewHtmlStyleUlStruct]";
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1401
|
+
static inline folly::dynamic toDynamic(const EnrichedTextViewHtmlStyleUlStruct &value) {
|
|
1402
|
+
return value.toDynamic();
|
|
1403
|
+
}
|
|
1404
|
+
#endif
|
|
1405
|
+
|
|
1406
|
+
struct EnrichedTextViewHtmlStyleUlCheckboxStruct {
|
|
1407
|
+
Float gapWidth{0.0};
|
|
1408
|
+
Float boxSize{0.0};
|
|
1409
|
+
Float marginLeft{0.0};
|
|
1410
|
+
SharedColor boxColor{};
|
|
1411
|
+
|
|
1412
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1413
|
+
bool operator==(const EnrichedTextViewHtmlStyleUlCheckboxStruct&) const = default;
|
|
1414
|
+
|
|
1415
|
+
folly::dynamic toDynamic() const {
|
|
1416
|
+
folly::dynamic result = folly::dynamic::object();
|
|
1417
|
+
result["gapWidth"] = gapWidth;
|
|
1418
|
+
result["boxSize"] = boxSize;
|
|
1419
|
+
result["marginLeft"] = marginLeft;
|
|
1420
|
+
result["boxColor"] = ::facebook::react::toDynamic(boxColor);
|
|
1421
|
+
return result;
|
|
1422
|
+
}
|
|
1423
|
+
#endif
|
|
1424
|
+
};
|
|
1425
|
+
|
|
1426
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextViewHtmlStyleUlCheckboxStruct &result) {
|
|
1427
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
1428
|
+
|
|
1429
|
+
auto tmp_gapWidth = map.find("gapWidth");
|
|
1430
|
+
if (tmp_gapWidth != map.end()) {
|
|
1431
|
+
fromRawValue(context, tmp_gapWidth->second, result.gapWidth);
|
|
1432
|
+
}
|
|
1433
|
+
auto tmp_boxSize = map.find("boxSize");
|
|
1434
|
+
if (tmp_boxSize != map.end()) {
|
|
1435
|
+
fromRawValue(context, tmp_boxSize->second, result.boxSize);
|
|
1436
|
+
}
|
|
1437
|
+
auto tmp_marginLeft = map.find("marginLeft");
|
|
1438
|
+
if (tmp_marginLeft != map.end()) {
|
|
1439
|
+
fromRawValue(context, tmp_marginLeft->second, result.marginLeft);
|
|
1440
|
+
}
|
|
1441
|
+
auto tmp_boxColor = map.find("boxColor");
|
|
1442
|
+
if (tmp_boxColor != map.end()) {
|
|
1443
|
+
fromRawValue(context, tmp_boxColor->second, result.boxColor);
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
static inline std::string toString(const EnrichedTextViewHtmlStyleUlCheckboxStruct &value) {
|
|
1448
|
+
return "[Object EnrichedTextViewHtmlStyleUlCheckboxStruct]";
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1452
|
+
static inline folly::dynamic toDynamic(const EnrichedTextViewHtmlStyleUlCheckboxStruct &value) {
|
|
1453
|
+
return value.toDynamic();
|
|
1454
|
+
}
|
|
1455
|
+
#endif
|
|
1456
|
+
|
|
1457
|
+
struct EnrichedTextViewHtmlStyleStruct {
|
|
1458
|
+
EnrichedTextViewHtmlStyleH1Struct h1{};
|
|
1459
|
+
EnrichedTextViewHtmlStyleH2Struct h2{};
|
|
1460
|
+
EnrichedTextViewHtmlStyleH3Struct h3{};
|
|
1461
|
+
EnrichedTextViewHtmlStyleH4Struct h4{};
|
|
1462
|
+
EnrichedTextViewHtmlStyleH5Struct h5{};
|
|
1463
|
+
EnrichedTextViewHtmlStyleH6Struct h6{};
|
|
1464
|
+
EnrichedTextViewHtmlStyleBlockquoteStruct blockquote{};
|
|
1465
|
+
EnrichedTextViewHtmlStyleCodeblockStruct codeblock{};
|
|
1466
|
+
EnrichedTextViewHtmlStyleCodeStruct code{};
|
|
1467
|
+
EnrichedTextViewHtmlStyleAStruct a{};
|
|
1468
|
+
folly::dynamic mention{};
|
|
1469
|
+
EnrichedTextViewHtmlStyleOlStruct ol{};
|
|
1470
|
+
EnrichedTextViewHtmlStyleUlStruct ul{};
|
|
1471
|
+
EnrichedTextViewHtmlStyleUlCheckboxStruct ulCheckbox{};
|
|
1472
|
+
|
|
1473
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1474
|
+
bool operator==(const EnrichedTextViewHtmlStyleStruct&) const = default;
|
|
1475
|
+
|
|
1476
|
+
folly::dynamic toDynamic() const {
|
|
1477
|
+
folly::dynamic result = folly::dynamic::object();
|
|
1478
|
+
result["h1"] = ::facebook::react::toDynamic(h1);
|
|
1479
|
+
result["h2"] = ::facebook::react::toDynamic(h2);
|
|
1480
|
+
result["h3"] = ::facebook::react::toDynamic(h3);
|
|
1481
|
+
result["h4"] = ::facebook::react::toDynamic(h4);
|
|
1482
|
+
result["h5"] = ::facebook::react::toDynamic(h5);
|
|
1483
|
+
result["h6"] = ::facebook::react::toDynamic(h6);
|
|
1484
|
+
result["blockquote"] = ::facebook::react::toDynamic(blockquote);
|
|
1485
|
+
result["codeblock"] = ::facebook::react::toDynamic(codeblock);
|
|
1486
|
+
result["code"] = ::facebook::react::toDynamic(code);
|
|
1487
|
+
result["a"] = ::facebook::react::toDynamic(a);
|
|
1488
|
+
result["mention"] = mention;
|
|
1489
|
+
result["ol"] = ::facebook::react::toDynamic(ol);
|
|
1490
|
+
result["ul"] = ::facebook::react::toDynamic(ul);
|
|
1491
|
+
result["ulCheckbox"] = ::facebook::react::toDynamic(ulCheckbox);
|
|
1492
|
+
return result;
|
|
1493
|
+
}
|
|
1494
|
+
#endif
|
|
1495
|
+
};
|
|
1496
|
+
|
|
1497
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextViewHtmlStyleStruct &result) {
|
|
1498
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
1499
|
+
|
|
1500
|
+
auto tmp_h1 = map.find("h1");
|
|
1501
|
+
if (tmp_h1 != map.end()) {
|
|
1502
|
+
fromRawValue(context, tmp_h1->second, result.h1);
|
|
1503
|
+
}
|
|
1504
|
+
auto tmp_h2 = map.find("h2");
|
|
1505
|
+
if (tmp_h2 != map.end()) {
|
|
1506
|
+
fromRawValue(context, tmp_h2->second, result.h2);
|
|
1507
|
+
}
|
|
1508
|
+
auto tmp_h3 = map.find("h3");
|
|
1509
|
+
if (tmp_h3 != map.end()) {
|
|
1510
|
+
fromRawValue(context, tmp_h3->second, result.h3);
|
|
1511
|
+
}
|
|
1512
|
+
auto tmp_h4 = map.find("h4");
|
|
1513
|
+
if (tmp_h4 != map.end()) {
|
|
1514
|
+
fromRawValue(context, tmp_h4->second, result.h4);
|
|
1515
|
+
}
|
|
1516
|
+
auto tmp_h5 = map.find("h5");
|
|
1517
|
+
if (tmp_h5 != map.end()) {
|
|
1518
|
+
fromRawValue(context, tmp_h5->second, result.h5);
|
|
1519
|
+
}
|
|
1520
|
+
auto tmp_h6 = map.find("h6");
|
|
1521
|
+
if (tmp_h6 != map.end()) {
|
|
1522
|
+
fromRawValue(context, tmp_h6->second, result.h6);
|
|
1523
|
+
}
|
|
1524
|
+
auto tmp_blockquote = map.find("blockquote");
|
|
1525
|
+
if (tmp_blockquote != map.end()) {
|
|
1526
|
+
fromRawValue(context, tmp_blockquote->second, result.blockquote);
|
|
1527
|
+
}
|
|
1528
|
+
auto tmp_codeblock = map.find("codeblock");
|
|
1529
|
+
if (tmp_codeblock != map.end()) {
|
|
1530
|
+
fromRawValue(context, tmp_codeblock->second, result.codeblock);
|
|
1531
|
+
}
|
|
1532
|
+
auto tmp_code = map.find("code");
|
|
1533
|
+
if (tmp_code != map.end()) {
|
|
1534
|
+
fromRawValue(context, tmp_code->second, result.code);
|
|
1535
|
+
}
|
|
1536
|
+
auto tmp_a = map.find("a");
|
|
1537
|
+
if (tmp_a != map.end()) {
|
|
1538
|
+
fromRawValue(context, tmp_a->second, result.a);
|
|
1539
|
+
}
|
|
1540
|
+
auto tmp_mention = map.find("mention");
|
|
1541
|
+
if (tmp_mention != map.end()) {
|
|
1542
|
+
fromRawValue(context, tmp_mention->second, result.mention);
|
|
1543
|
+
}
|
|
1544
|
+
auto tmp_ol = map.find("ol");
|
|
1545
|
+
if (tmp_ol != map.end()) {
|
|
1546
|
+
fromRawValue(context, tmp_ol->second, result.ol);
|
|
1547
|
+
}
|
|
1548
|
+
auto tmp_ul = map.find("ul");
|
|
1549
|
+
if (tmp_ul != map.end()) {
|
|
1550
|
+
fromRawValue(context, tmp_ul->second, result.ul);
|
|
1551
|
+
}
|
|
1552
|
+
auto tmp_ulCheckbox = map.find("ulCheckbox");
|
|
1553
|
+
if (tmp_ulCheckbox != map.end()) {
|
|
1554
|
+
fromRawValue(context, tmp_ulCheckbox->second, result.ulCheckbox);
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
static inline std::string toString(const EnrichedTextViewHtmlStyleStruct &value) {
|
|
1559
|
+
return "[Object EnrichedTextViewHtmlStyleStruct]";
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1563
|
+
static inline folly::dynamic toDynamic(const EnrichedTextViewHtmlStyleStruct &value) {
|
|
1564
|
+
return value.toDynamic();
|
|
1565
|
+
}
|
|
1566
|
+
#endif
|
|
1567
|
+
class EnrichedTextViewProps final : public ViewProps {
|
|
1568
|
+
public:
|
|
1569
|
+
EnrichedTextViewProps() = default;
|
|
1570
|
+
EnrichedTextViewProps(const PropsParserContext& context, const EnrichedTextViewProps &sourceProps, const RawProps &rawProps);
|
|
1571
|
+
|
|
1572
|
+
#pragma mark - Props
|
|
1573
|
+
|
|
1574
|
+
std::string text{};
|
|
1575
|
+
EnrichedTextViewHtmlStyleStruct htmlStyle{};
|
|
1576
|
+
bool useHtmlNormalizer{false};
|
|
1577
|
+
bool allowFontScaling{false};
|
|
1578
|
+
std::string ellipsizeMode{};
|
|
1579
|
+
int numberOfLines{0};
|
|
1580
|
+
bool selectable{false};
|
|
1581
|
+
SharedColor selectionColor{};
|
|
1582
|
+
SharedColor color{};
|
|
1583
|
+
Float fontSize{0.0};
|
|
1584
|
+
std::string fontFamily{};
|
|
1585
|
+
std::string fontWeight{};
|
|
1586
|
+
std::string fontStyle{};
|
|
1587
|
+
|
|
1588
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
1589
|
+
ComponentName getDiffPropsImplementationTarget() const override;
|
|
1590
|
+
|
|
1591
|
+
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
|
1592
|
+
#endif
|
|
1593
|
+
};
|
|
1594
|
+
|
|
1595
|
+
} // namespace facebook::react
|