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,727 @@
|
|
|
1
|
+
#import <EnrichedConfig.h>
|
|
2
|
+
#import <React/RCTFont.h>
|
|
3
|
+
|
|
4
|
+
@implementation EnrichedConfig {
|
|
5
|
+
// shared (text and input)
|
|
6
|
+
UIColor *_primaryColor;
|
|
7
|
+
NSNumber *_primaryFontSize;
|
|
8
|
+
CGFloat _primaryLineHeight;
|
|
9
|
+
NSString *_primaryFontWeight;
|
|
10
|
+
NSString *_primaryFontFamily;
|
|
11
|
+
UIFont *_primaryFont;
|
|
12
|
+
UIFont *_monospacedFont;
|
|
13
|
+
BOOL _primaryFontNeedsRecreation;
|
|
14
|
+
BOOL _monospacedFontNeedsRecreation;
|
|
15
|
+
BOOL _allowFontScaling;
|
|
16
|
+
NSSet<NSNumber *> *_mentionIndicators;
|
|
17
|
+
CGFloat _h1FontSize;
|
|
18
|
+
BOOL _h1Bold;
|
|
19
|
+
CGFloat _h2FontSize;
|
|
20
|
+
BOOL _h2Bold;
|
|
21
|
+
CGFloat _h3FontSize;
|
|
22
|
+
BOOL _h3Bold;
|
|
23
|
+
CGFloat _h4FontSize;
|
|
24
|
+
BOOL _h4Bold;
|
|
25
|
+
CGFloat _h5FontSize;
|
|
26
|
+
BOOL _h5Bold;
|
|
27
|
+
CGFloat _h6FontSize;
|
|
28
|
+
BOOL _h6Bold;
|
|
29
|
+
UIColor *_blockquoteBorderColor;
|
|
30
|
+
CGFloat _blockquoteBorderWidth;
|
|
31
|
+
CGFloat _blockquoteGapWidth;
|
|
32
|
+
UIColor *_blockquoteColor;
|
|
33
|
+
UIColor *_inlineCodeFgColor;
|
|
34
|
+
UIColor *_inlineCodeBgColor;
|
|
35
|
+
CGFloat _orderedListGapWidth;
|
|
36
|
+
CGFloat _orderedListMarginLeft;
|
|
37
|
+
NSString *_orderedListMarkerFontWeight;
|
|
38
|
+
UIColor *_orderedListMarkerColor;
|
|
39
|
+
UIFont *_orderedListMarkerFont;
|
|
40
|
+
BOOL _olMarkerFontNeedsRecreation;
|
|
41
|
+
UIColor *_unorderedListBulletColor;
|
|
42
|
+
CGFloat _unorderedListBulletSize;
|
|
43
|
+
CGFloat _unorderedListGapWidth;
|
|
44
|
+
CGFloat _unorderedListMarginLeft;
|
|
45
|
+
UIColor *_linkColor;
|
|
46
|
+
TextDecorationLineEnum _linkDecorationLine;
|
|
47
|
+
NSDictionary *_mentionProperties;
|
|
48
|
+
UIColor *_codeBlockFgColor;
|
|
49
|
+
CGFloat _codeBlockBorderRadius;
|
|
50
|
+
UIColor *_codeBlockBgColor;
|
|
51
|
+
CGFloat _checkboxListBoxSize;
|
|
52
|
+
CGFloat _checkboxListGapWidth;
|
|
53
|
+
CGFloat _checkboxListMarginLeft;
|
|
54
|
+
UIColor *_checkboxListBoxColor;
|
|
55
|
+
UIImage *_checkboxCheckedImage;
|
|
56
|
+
UIImage *_checkboxUncheckedImage;
|
|
57
|
+
|
|
58
|
+
// input only
|
|
59
|
+
LinkRegexConfig *_linkRegexConfig;
|
|
60
|
+
NSRegularExpression *_parsedLinkRegex;
|
|
61
|
+
|
|
62
|
+
// text only
|
|
63
|
+
UIColor *_linkPressColor;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
- (instancetype)init {
|
|
67
|
+
self = [super init];
|
|
68
|
+
_primaryFontNeedsRecreation = YES;
|
|
69
|
+
_monospacedFontNeedsRecreation = YES;
|
|
70
|
+
_olMarkerFontNeedsRecreation = YES;
|
|
71
|
+
return self;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
- (id)copyWithZone:(NSZone *)zone {
|
|
75
|
+
EnrichedConfig *copy = [[[self class] allocWithZone:zone] init];
|
|
76
|
+
// shared (text and input)
|
|
77
|
+
copy->_primaryColor = [_primaryColor copy];
|
|
78
|
+
copy->_primaryFontSize = [_primaryFontSize copy];
|
|
79
|
+
copy->_primaryLineHeight = _primaryLineHeight;
|
|
80
|
+
copy->_primaryFontWeight = [_primaryFontWeight copy];
|
|
81
|
+
copy->_primaryFontFamily = [_primaryFontFamily copy];
|
|
82
|
+
copy->_primaryFont = [_primaryFont copy];
|
|
83
|
+
copy->_monospacedFont = [_monospacedFont copy];
|
|
84
|
+
copy->_allowFontScaling = _allowFontScaling;
|
|
85
|
+
copy->_mentionIndicators = [_mentionIndicators copy];
|
|
86
|
+
copy->_h1FontSize = _h1FontSize;
|
|
87
|
+
copy->_h1Bold = _h1Bold;
|
|
88
|
+
copy->_h2FontSize = _h2FontSize;
|
|
89
|
+
copy->_h2Bold = _h2Bold;
|
|
90
|
+
copy->_h3FontSize = _h3FontSize;
|
|
91
|
+
copy->_h3Bold = _h3Bold;
|
|
92
|
+
copy->_h4FontSize = _h4FontSize;
|
|
93
|
+
copy->_h4Bold = _h4Bold;
|
|
94
|
+
copy->_h5FontSize = _h5FontSize;
|
|
95
|
+
copy->_h5Bold = _h5Bold;
|
|
96
|
+
copy->_h6FontSize = _h6FontSize;
|
|
97
|
+
copy->_h6Bold = _h6Bold;
|
|
98
|
+
copy->_blockquoteBorderColor = [_blockquoteBorderColor copy];
|
|
99
|
+
copy->_blockquoteBorderWidth = _blockquoteBorderWidth;
|
|
100
|
+
copy->_blockquoteGapWidth = _blockquoteGapWidth;
|
|
101
|
+
copy->_blockquoteColor = [_blockquoteColor copy];
|
|
102
|
+
copy->_inlineCodeFgColor = [_inlineCodeFgColor copy];
|
|
103
|
+
copy->_inlineCodeBgColor = [_inlineCodeBgColor copy];
|
|
104
|
+
copy->_orderedListGapWidth = _orderedListGapWidth;
|
|
105
|
+
copy->_orderedListMarginLeft = _orderedListMarginLeft;
|
|
106
|
+
copy->_orderedListMarkerFontWeight = [_orderedListMarkerFontWeight copy];
|
|
107
|
+
copy->_orderedListMarkerColor = [_orderedListMarkerColor copy];
|
|
108
|
+
copy->_orderedListMarkerFont = [_orderedListMarkerFont copy];
|
|
109
|
+
copy->_unorderedListBulletColor = [_unorderedListBulletColor copy];
|
|
110
|
+
copy->_unorderedListBulletSize = _unorderedListBulletSize;
|
|
111
|
+
copy->_unorderedListGapWidth = _unorderedListGapWidth;
|
|
112
|
+
copy->_unorderedListMarginLeft = _unorderedListMarginLeft;
|
|
113
|
+
copy->_linkColor = [_linkColor copy];
|
|
114
|
+
copy->_linkDecorationLine = [_linkDecorationLine copy];
|
|
115
|
+
copy->_mentionProperties = [_mentionProperties mutableCopy];
|
|
116
|
+
copy->_codeBlockFgColor = [_codeBlockFgColor copy];
|
|
117
|
+
copy->_codeBlockBgColor = [_codeBlockBgColor copy];
|
|
118
|
+
copy->_codeBlockBorderRadius = _codeBlockBorderRadius;
|
|
119
|
+
copy->_checkboxListBoxSize = _checkboxListBoxSize;
|
|
120
|
+
copy->_checkboxListGapWidth = _checkboxListGapWidth;
|
|
121
|
+
copy->_checkboxListMarginLeft = _checkboxListMarginLeft;
|
|
122
|
+
copy->_checkboxListBoxColor = [_checkboxListBoxColor copy];
|
|
123
|
+
copy->_checkboxCheckedImage = _checkboxCheckedImage;
|
|
124
|
+
copy->_checkboxUncheckedImage = _checkboxUncheckedImage;
|
|
125
|
+
|
|
126
|
+
// input only
|
|
127
|
+
copy->_linkRegexConfig = [_linkRegexConfig copy];
|
|
128
|
+
copy->_parsedLinkRegex = [_parsedLinkRegex copy];
|
|
129
|
+
|
|
130
|
+
// text only
|
|
131
|
+
copy->_linkPressColor = [_linkPressColor copy];
|
|
132
|
+
return copy;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// MARK: - Shared props (Text and input)
|
|
136
|
+
|
|
137
|
+
- (UIColor *)primaryColor {
|
|
138
|
+
return _primaryColor != nullptr ? _primaryColor : UIColor.blackColor;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
- (void)setPrimaryColor:(UIColor *)newValue {
|
|
142
|
+
_primaryColor = newValue;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
- (NSNumber *)primaryFontSize {
|
|
146
|
+
return _primaryFontSize != nullptr ? _primaryFontSize : @(14);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
- (void)setPrimaryFontSize:(NSNumber *)newValue {
|
|
150
|
+
_primaryFontSize = newValue;
|
|
151
|
+
_primaryFontNeedsRecreation = YES;
|
|
152
|
+
_monospacedFontNeedsRecreation = YES;
|
|
153
|
+
_olMarkerFontNeedsRecreation = YES;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
- (CGFloat)primaryLineHeight {
|
|
157
|
+
return _primaryLineHeight;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
- (void)setPrimaryLineHeight:(CGFloat)newValue {
|
|
161
|
+
_primaryLineHeight = newValue;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
- (CGFloat)scaledPrimaryLineHeight {
|
|
165
|
+
if (!_allowFontScaling) {
|
|
166
|
+
return [self primaryLineHeight];
|
|
167
|
+
}
|
|
168
|
+
return [[UIFontMetrics defaultMetrics]
|
|
169
|
+
scaledValueForValue:[self primaryLineHeight]];
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
- (NSString *)primaryFontWeight {
|
|
173
|
+
return _primaryFontWeight != nullptr
|
|
174
|
+
? _primaryFontWeight
|
|
175
|
+
: [NSString stringWithFormat:@"%@", @(UIFontWeightRegular)];
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
- (void)setPrimaryFontWeight:(NSString *)newValue {
|
|
179
|
+
_primaryFontWeight = newValue;
|
|
180
|
+
_primaryFontNeedsRecreation = YES;
|
|
181
|
+
_monospacedFontNeedsRecreation = YES;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
- (NSString *)primaryFontFamily {
|
|
185
|
+
return _primaryFontFamily;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
- (void)setPrimaryFontFamily:(NSString *)newValue {
|
|
189
|
+
_primaryFontFamily = newValue;
|
|
190
|
+
_primaryFontNeedsRecreation = YES;
|
|
191
|
+
_olMarkerFontNeedsRecreation = YES;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
- (UIFont *)primaryFont {
|
|
195
|
+
if (_primaryFontNeedsRecreation) {
|
|
196
|
+
_primaryFontNeedsRecreation = NO;
|
|
197
|
+
|
|
198
|
+
NSString *newFontWeight = [self primaryFontWeight];
|
|
199
|
+
// fix RCTFontWeight conversion warnings:
|
|
200
|
+
// sometimes changing font family comes with weight '0' if not specified
|
|
201
|
+
// RCTConvert doesn't recognize this value so we just nullify it and it gets
|
|
202
|
+
// a default value
|
|
203
|
+
if ([newFontWeight isEqualToString:@"0"]) {
|
|
204
|
+
newFontWeight = nullptr;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
_primaryFont = [RCTFont updateFont:nullptr
|
|
208
|
+
withFamily:[self primaryFontFamily]
|
|
209
|
+
size:[self scaledPrimaryFontSize]
|
|
210
|
+
weight:newFontWeight
|
|
211
|
+
style:nullptr
|
|
212
|
+
variant:nullptr
|
|
213
|
+
scaleMultiplier:1];
|
|
214
|
+
}
|
|
215
|
+
return _primaryFont;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
- (UIFont *)monospacedFont {
|
|
219
|
+
if (_monospacedFontNeedsRecreation) {
|
|
220
|
+
_monospacedFontNeedsRecreation = NO;
|
|
221
|
+
_monospacedFont = [UIFont
|
|
222
|
+
monospacedSystemFontOfSize:[[self scaledPrimaryFontSize] floatValue]
|
|
223
|
+
weight:[[self primaryFontWeight] floatValue]];
|
|
224
|
+
}
|
|
225
|
+
return _monospacedFont;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
- (NSSet<NSNumber *> *)mentionIndicators {
|
|
229
|
+
return _mentionIndicators != nullptr ? _mentionIndicators
|
|
230
|
+
: [[NSSet alloc] init];
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
- (void)setMentionIndicators:(NSSet<NSNumber *> *)newValue {
|
|
234
|
+
_mentionIndicators = newValue;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
- (CGFloat)h1FontSize {
|
|
238
|
+
if (!_allowFontScaling) {
|
|
239
|
+
return _h1FontSize;
|
|
240
|
+
}
|
|
241
|
+
return [[UIFontMetrics defaultMetrics] scaledValueForValue:_h1FontSize];
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
- (void)setH1FontSize:(CGFloat)newValue {
|
|
245
|
+
_h1FontSize = newValue;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
- (BOOL)h1Bold {
|
|
249
|
+
return _h1Bold;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
- (void)setH1Bold:(BOOL)newValue {
|
|
253
|
+
_h1Bold = newValue;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
- (CGFloat)h2FontSize {
|
|
257
|
+
if (!_allowFontScaling) {
|
|
258
|
+
return _h2FontSize;
|
|
259
|
+
}
|
|
260
|
+
return [[UIFontMetrics defaultMetrics] scaledValueForValue:_h2FontSize];
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
- (void)setH2FontSize:(CGFloat)newValue {
|
|
264
|
+
_h2FontSize = newValue;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
- (BOOL)h2Bold {
|
|
268
|
+
return _h2Bold;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
- (void)setH2Bold:(BOOL)newValue {
|
|
272
|
+
_h2Bold = newValue;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
- (CGFloat)h3FontSize {
|
|
276
|
+
if (!_allowFontScaling) {
|
|
277
|
+
return _h3FontSize;
|
|
278
|
+
}
|
|
279
|
+
return [[UIFontMetrics defaultMetrics] scaledValueForValue:_h3FontSize];
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
- (void)setH3FontSize:(CGFloat)newValue {
|
|
283
|
+
_h3FontSize = newValue;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
- (BOOL)h3Bold {
|
|
287
|
+
return _h3Bold;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
- (void)setH3Bold:(BOOL)newValue {
|
|
291
|
+
_h3Bold = newValue;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
- (CGFloat)h4FontSize {
|
|
295
|
+
if (!_allowFontScaling) {
|
|
296
|
+
return _h4FontSize;
|
|
297
|
+
}
|
|
298
|
+
return [[UIFontMetrics defaultMetrics] scaledValueForValue:_h4FontSize];
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
- (void)setH4FontSize:(CGFloat)newValue {
|
|
302
|
+
_h4FontSize = newValue;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
- (BOOL)h4Bold {
|
|
306
|
+
return _h4Bold;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
- (void)setH4Bold:(BOOL)newValue {
|
|
310
|
+
_h4Bold = newValue;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
- (CGFloat)h5FontSize {
|
|
314
|
+
if (!_allowFontScaling) {
|
|
315
|
+
return _h5FontSize;
|
|
316
|
+
}
|
|
317
|
+
return [[UIFontMetrics defaultMetrics] scaledValueForValue:_h5FontSize];
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
- (void)setH5FontSize:(CGFloat)newValue {
|
|
321
|
+
_h5FontSize = newValue;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
- (BOOL)h5Bold {
|
|
325
|
+
return _h5Bold;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
- (void)setH5Bold:(BOOL)newValue {
|
|
329
|
+
_h5Bold = newValue;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
- (CGFloat)h6FontSize {
|
|
333
|
+
if (!_allowFontScaling) {
|
|
334
|
+
return _h6FontSize;
|
|
335
|
+
}
|
|
336
|
+
return [[UIFontMetrics defaultMetrics] scaledValueForValue:_h6FontSize];
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
- (void)setH6FontSize:(CGFloat)newValue {
|
|
340
|
+
_h6FontSize = newValue;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
- (BOOL)h6Bold {
|
|
344
|
+
return _h6Bold;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
- (void)setH6Bold:(BOOL)newValue {
|
|
348
|
+
_h6Bold = newValue;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
- (UIColor *)blockquoteBorderColor {
|
|
352
|
+
return _blockquoteBorderColor;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
- (void)setBlockquoteBorderColor:(UIColor *)newValue {
|
|
356
|
+
_blockquoteBorderColor = newValue;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
- (CGFloat)blockquoteBorderWidth {
|
|
360
|
+
return _blockquoteBorderWidth;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
- (void)setBlockquoteBorderWidth:(CGFloat)newValue {
|
|
364
|
+
_blockquoteBorderWidth = newValue;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
- (CGFloat)blockquoteGapWidth {
|
|
368
|
+
return _blockquoteGapWidth;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
- (void)setBlockquoteGapWidth:(CGFloat)newValue {
|
|
372
|
+
_blockquoteGapWidth = newValue;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
- (UIColor *)blockquoteColor {
|
|
376
|
+
return _blockquoteColor;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
- (void)setBlockquoteColor:(UIColor *)newValue {
|
|
380
|
+
_blockquoteColor = newValue;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
- (UIColor *)inlineCodeFgColor {
|
|
384
|
+
return _inlineCodeFgColor;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
- (void)setInlineCodeFgColor:(UIColor *)newValue {
|
|
388
|
+
_inlineCodeFgColor = newValue;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
- (UIColor *)inlineCodeBgColor {
|
|
392
|
+
return _inlineCodeBgColor;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
- (void)setInlineCodeBgColor:(UIColor *)newValue {
|
|
396
|
+
_inlineCodeBgColor = newValue;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
- (CGFloat)orderedListGapWidth {
|
|
400
|
+
return _orderedListGapWidth;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
- (void)setOrderedListGapWidth:(CGFloat)newValue {
|
|
404
|
+
_orderedListGapWidth = newValue;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
- (CGFloat)orderedListMarginLeft {
|
|
408
|
+
return _orderedListMarginLeft;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
- (void)setOrderedListMarginLeft:(CGFloat)newValue {
|
|
412
|
+
_orderedListMarginLeft = newValue;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
- (NSString *)orderedListMarkerFontWeight {
|
|
416
|
+
return _orderedListMarkerFontWeight;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
- (void)setOrderedListMarkerFontWeight:(NSString *)newValue {
|
|
420
|
+
_orderedListMarkerFontWeight = newValue;
|
|
421
|
+
_olMarkerFontNeedsRecreation = YES;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
- (UIColor *)orderedListMarkerColor {
|
|
425
|
+
return _orderedListMarkerColor;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
- (void)setOrderedListMarkerColor:(UIColor *)newValue {
|
|
429
|
+
_orderedListMarkerColor = newValue;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
- (UIFont *)orderedListMarkerFont {
|
|
433
|
+
if (_olMarkerFontNeedsRecreation) {
|
|
434
|
+
_olMarkerFontNeedsRecreation = NO;
|
|
435
|
+
|
|
436
|
+
NSString *newFontWeight = [self orderedListMarkerFontWeight];
|
|
437
|
+
// fix RCTFontWeight conversion warnings:
|
|
438
|
+
// sometimes changing font family comes with weight '0' if not specified
|
|
439
|
+
// RCTConvert doesn't recognize this value so we just nullify it and it gets
|
|
440
|
+
// a default value
|
|
441
|
+
if ([newFontWeight isEqualToString:@"0"]) {
|
|
442
|
+
newFontWeight = nullptr;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
_orderedListMarkerFont = [RCTFont updateFont:nullptr
|
|
446
|
+
withFamily:[self primaryFontFamily]
|
|
447
|
+
size:[self scaledPrimaryFontSize]
|
|
448
|
+
weight:newFontWeight
|
|
449
|
+
style:nullptr
|
|
450
|
+
variant:nullptr
|
|
451
|
+
scaleMultiplier:1];
|
|
452
|
+
}
|
|
453
|
+
return _orderedListMarkerFont;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
- (UIColor *)unorderedListBulletColor {
|
|
457
|
+
return _unorderedListBulletColor;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
- (void)setUnorderedListBulletColor:(UIColor *)newValue {
|
|
461
|
+
_unorderedListBulletColor = newValue;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
- (CGFloat)unorderedListBulletSize {
|
|
465
|
+
return _unorderedListBulletSize;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
- (void)setUnorderedListBulletSize:(CGFloat)newValue {
|
|
469
|
+
_unorderedListBulletSize = newValue;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
- (CGFloat)unorderedListGapWidth {
|
|
473
|
+
return _unorderedListGapWidth;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
- (void)setUnorderedListGapWidth:(CGFloat)newValue {
|
|
477
|
+
_unorderedListGapWidth = newValue;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
- (CGFloat)unorderedListMarginLeft {
|
|
481
|
+
return _unorderedListMarginLeft;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
- (void)setUnorderedListMarginLeft:(CGFloat)newValue {
|
|
485
|
+
_unorderedListMarginLeft = newValue;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
- (UIColor *)linkColor {
|
|
489
|
+
return _linkColor;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
- (void)setLinkColor:(UIColor *)newValue {
|
|
493
|
+
_linkColor = newValue;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
- (TextDecorationLineEnum)linkDecorationLine {
|
|
497
|
+
return _linkDecorationLine;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
- (void)setLinkDecorationLine:(TextDecorationLineEnum)newValue {
|
|
501
|
+
_linkDecorationLine = newValue;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
- (void)setMentionStyleProps:(NSDictionary *)newValue {
|
|
505
|
+
_mentionProperties = [newValue mutableCopy];
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
- (MentionStyleProps *)mentionStylePropsForIndicator:(NSString *)indicator {
|
|
509
|
+
if (_mentionProperties.count == 1 && _mentionProperties[@"all"] != nullptr) {
|
|
510
|
+
// single props for all the indicators
|
|
511
|
+
return _mentionProperties[@"all"];
|
|
512
|
+
} else if (_mentionProperties[indicator] != nullptr) {
|
|
513
|
+
return _mentionProperties[indicator];
|
|
514
|
+
}
|
|
515
|
+
MentionStyleProps *fallbackProps = [[MentionStyleProps alloc] init];
|
|
516
|
+
fallbackProps.color = [UIColor blueColor];
|
|
517
|
+
fallbackProps.backgroundColor = [UIColor yellowColor];
|
|
518
|
+
fallbackProps.decorationLine = DecorationUnderline;
|
|
519
|
+
return fallbackProps;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
- (UIColor *)codeBlockFgColor {
|
|
523
|
+
return _codeBlockFgColor;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
- (void)setCodeBlockFgColor:(UIColor *)newValue {
|
|
527
|
+
_codeBlockFgColor = newValue;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
- (UIColor *)codeBlockBgColor {
|
|
531
|
+
return _codeBlockBgColor;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
- (void)setCodeBlockBgColor:(UIColor *)newValue {
|
|
535
|
+
_codeBlockBgColor = newValue;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
- (CGFloat)codeBlockBorderRadius {
|
|
539
|
+
return _codeBlockBorderRadius;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
- (void)setCodeBlockBorderRadius:(CGFloat)newValue {
|
|
543
|
+
_codeBlockBorderRadius = newValue;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
- (void)invalidateFonts {
|
|
547
|
+
_primaryFontNeedsRecreation = YES;
|
|
548
|
+
_monospacedFontNeedsRecreation = YES;
|
|
549
|
+
_olMarkerFontNeedsRecreation = YES;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
- (BOOL)allowFontScaling {
|
|
553
|
+
return _allowFontScaling;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
- (void)setAllowFontScaling:(BOOL)newValue {
|
|
557
|
+
if (_allowFontScaling != newValue) {
|
|
558
|
+
_allowFontScaling = newValue;
|
|
559
|
+
[self invalidateFonts];
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
- (NSNumber *)scaledPrimaryFontSize {
|
|
564
|
+
if (!_allowFontScaling) {
|
|
565
|
+
return [self primaryFontSize];
|
|
566
|
+
}
|
|
567
|
+
CGFloat scaledSize = [[UIFontMetrics defaultMetrics]
|
|
568
|
+
scaledValueForValue:[[self primaryFontSize] floatValue]];
|
|
569
|
+
return @(scaledSize);
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
- (CGFloat)checkboxListBoxSize {
|
|
573
|
+
return _checkboxListBoxSize;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
- (void)setCheckboxListBoxSize:(CGFloat)newValue {
|
|
577
|
+
if (_checkboxListBoxSize != newValue) {
|
|
578
|
+
_checkboxListBoxSize = newValue;
|
|
579
|
+
// Invalidate checkbox images because box size changed
|
|
580
|
+
_checkboxCheckedImage = nil;
|
|
581
|
+
_checkboxUncheckedImage = nil;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
- (CGFloat)checkboxListGapWidth {
|
|
586
|
+
return _checkboxListGapWidth;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
- (void)setCheckboxListGapWidth:(CGFloat)newValue {
|
|
590
|
+
_checkboxListGapWidth = newValue;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
- (CGFloat)checkboxListMarginLeft {
|
|
594
|
+
return _checkboxListMarginLeft;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
- (void)setCheckboxListMarginLeft:(CGFloat)newValue {
|
|
598
|
+
_checkboxListMarginLeft = newValue;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
- (UIColor *)checkboxListBoxColor {
|
|
602
|
+
return _checkboxListBoxColor;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
- (void)setCheckboxListBoxColor:(UIColor *)newValue {
|
|
606
|
+
if (_checkboxListBoxColor != newValue) {
|
|
607
|
+
_checkboxListBoxColor = newValue;
|
|
608
|
+
// Invalidate checkbox images because color changed
|
|
609
|
+
_checkboxCheckedImage = nil;
|
|
610
|
+
_checkboxUncheckedImage = nil;
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
- (UIImage *)checkboxCheckedImage {
|
|
615
|
+
if (!_checkboxCheckedImage) {
|
|
616
|
+
_checkboxCheckedImage = [self generateCheckboxImage:YES];
|
|
617
|
+
}
|
|
618
|
+
return _checkboxCheckedImage;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
- (UIImage *)checkboxUncheckedImage {
|
|
622
|
+
if (!_checkboxUncheckedImage) {
|
|
623
|
+
_checkboxUncheckedImage = [self generateCheckboxImage:NO];
|
|
624
|
+
}
|
|
625
|
+
return _checkboxUncheckedImage;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
- (UIImage *)generateCheckboxImage:(BOOL)isChecked {
|
|
629
|
+
CGFloat boxSize = self.checkboxListBoxSize;
|
|
630
|
+
UIColor *boxColor = self.checkboxListBoxColor ?: [UIColor blackColor];
|
|
631
|
+
|
|
632
|
+
UIGraphicsBeginImageContextWithOptions(CGSizeMake(boxSize, boxSize), NO, 0.0);
|
|
633
|
+
CGRect localRect = CGRectMake(0, 0, boxSize, boxSize);
|
|
634
|
+
CGFloat cornerRadius = boxSize * 0.15f;
|
|
635
|
+
CGFloat strokeWidth = boxSize * 0.1f;
|
|
636
|
+
CGRect insetRect =
|
|
637
|
+
CGRectInset(localRect, strokeWidth / 2.0, strokeWidth / 2.0);
|
|
638
|
+
|
|
639
|
+
// Draw Box
|
|
640
|
+
UIBezierPath *boxPath = [UIBezierPath bezierPathWithRoundedRect:insetRect
|
|
641
|
+
cornerRadius:cornerRadius];
|
|
642
|
+
[boxPath setLineWidth:strokeWidth];
|
|
643
|
+
|
|
644
|
+
if (isChecked) {
|
|
645
|
+
[[boxColor colorWithAlphaComponent:1.0] setFill];
|
|
646
|
+
[boxPath fill];
|
|
647
|
+
[[boxColor colorWithAlphaComponent:1.0] setStroke];
|
|
648
|
+
[boxPath stroke];
|
|
649
|
+
|
|
650
|
+
// Draw Checkmark
|
|
651
|
+
UIBezierPath *checkPath = [UIBezierPath bezierPath];
|
|
652
|
+
CGFloat startX = insetRect.origin.x + insetRect.size.width * 0.25;
|
|
653
|
+
CGFloat startY = insetRect.origin.y + insetRect.size.height * 0.5;
|
|
654
|
+
CGFloat midX = insetRect.origin.x + insetRect.size.width * 0.45;
|
|
655
|
+
CGFloat midY = insetRect.origin.y + insetRect.size.height * 0.65;
|
|
656
|
+
CGFloat endX = insetRect.origin.x + insetRect.size.width * 0.75;
|
|
657
|
+
CGFloat endY = insetRect.origin.y + insetRect.size.height * 0.35;
|
|
658
|
+
|
|
659
|
+
[checkPath moveToPoint:CGPointMake(startX, startY)];
|
|
660
|
+
[checkPath addLineToPoint:CGPointMake(midX, midY)];
|
|
661
|
+
[checkPath addLineToPoint:CGPointMake(endX, endY)];
|
|
662
|
+
|
|
663
|
+
[checkPath setLineWidth:strokeWidth * 1.5];
|
|
664
|
+
[[UIColor whiteColor] setStroke];
|
|
665
|
+
[checkPath setLineCapStyle:kCGLineCapRound];
|
|
666
|
+
[checkPath setLineJoinStyle:kCGLineJoinRound];
|
|
667
|
+
[checkPath stroke];
|
|
668
|
+
} else {
|
|
669
|
+
[[boxColor colorWithAlphaComponent:1.0] setStroke];
|
|
670
|
+
[boxPath stroke];
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
UIImage *result = UIGraphicsGetImageFromCurrentImageContext();
|
|
674
|
+
UIGraphicsEndImageContext();
|
|
675
|
+
|
|
676
|
+
return result;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
// MARK: - Input only props
|
|
680
|
+
|
|
681
|
+
- (LinkRegexConfig *)linkRegexConfig {
|
|
682
|
+
return _linkRegexConfig;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
- (void)setLinkRegexConfig:(LinkRegexConfig *)newValue {
|
|
686
|
+
_linkRegexConfig = newValue;
|
|
687
|
+
|
|
688
|
+
// try initializing the native regular expression if it applies
|
|
689
|
+
if (_linkRegexConfig.isDefault || _linkRegexConfig.isDisabled) {
|
|
690
|
+
return;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
NSError *regexInitError;
|
|
694
|
+
NSRegularExpressionOptions options =
|
|
695
|
+
(_linkRegexConfig.caseInsensitive ? NSRegularExpressionCaseInsensitive
|
|
696
|
+
: 0) |
|
|
697
|
+
(_linkRegexConfig.dotAll ? NSRegularExpressionDotMatchesLineSeparators
|
|
698
|
+
: 0);
|
|
699
|
+
NSRegularExpression *userRegex =
|
|
700
|
+
[NSRegularExpression regularExpressionWithPattern:_linkRegexConfig.pattern
|
|
701
|
+
options:options
|
|
702
|
+
error:®exInitError];
|
|
703
|
+
|
|
704
|
+
if (regexInitError) {
|
|
705
|
+
RCTLogWarn(@"[EnrichedTextInput]: Couldn't parse the user-defined link "
|
|
706
|
+
@"regex, falling back to a default regex.");
|
|
707
|
+
_parsedLinkRegex = nullptr;
|
|
708
|
+
} else {
|
|
709
|
+
_parsedLinkRegex = userRegex;
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
- (NSRegularExpression *)parsedLinkRegex {
|
|
714
|
+
return _parsedLinkRegex;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
// MARK: - Text only props
|
|
718
|
+
|
|
719
|
+
- (UIColor *)linkPressColor {
|
|
720
|
+
return _linkPressColor;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
- (void)setLinkPressColor:(UIColor *)newValue {
|
|
724
|
+
_linkPressColor = newValue;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
@end
|