react-native-enriched-html 0.0.0 → 1.0.1
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/EnrichedSpanFlags.kt +39 -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 +1057 -0
- package/android/src/main/java/com/swmansion/enriched/common/parser/EnrichedSpanFactory.kt +83 -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 +84 -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 +362 -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 +86 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/EnrichedTextInputView.kt +1144 -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 +65 -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 +40 -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 +366 -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 +244 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/styles/ListStyles.kt +261 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/styles/ParagraphStyles.kt +440 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/styles/ParametrizedStyles.kt +435 -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 +342 -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 +157 -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 +107 -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 +973 -0
- package/cpp/parser/GumboParser.cpp +16 -0
- package/cpp/parser/GumboParser.hpp +23 -0
- package/cpp/tests/GumboParserTest.cpp +511 -0
- package/ios/EnrichedTextInputView.h +54 -0
- package/ios/EnrichedTextInputView.mm +2182 -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 +465 -0
- package/ios/extensions/StringExtension.h +15 -0
- package/ios/extensions/StringExtension.mm +144 -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 +14 -0
- package/ios/htmlParser/HtmlParser.mm +1486 -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 +228 -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 +114 -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 +518 -0
- package/ios/styles/MentionStyle.mm +592 -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 +182 -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 +296 -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 +5 -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 +14 -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/EnrichedText.css +343 -0
- package/lib/module/web/EnrichedText.js +55 -0
- package/lib/module/web/EnrichedText.js.map +1 -0
- package/lib/module/web/EnrichedTextInput.js +316 -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/constants/brokenImageGlyph.js +9 -0
- package/lib/module/web/constants/brokenImageGlyph.js.map +1 -0
- package/lib/module/web/constants/classNames.js +5 -0
- package/lib/module/web/constants/classNames.js.map +1 -0
- package/lib/module/web/emitLinkDetected.js +12 -0
- package/lib/module/web/emitLinkDetected.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 +180 -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/EnrichedTextAlign.js +82 -0
- package/lib/module/web/formats/EnrichedTextAlign.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 +64 -0
- package/lib/module/web/formats/applyWrappingListToSelection.js.map +1 -0
- package/lib/module/web/formats/formatRules.js +84 -0
- package/lib/module/web/formats/formatRules.js.map +1 -0
- package/lib/module/web/formats/listKeyboard.js +53 -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/normalization/checkboxHtmlNormalizer.js +54 -0
- package/lib/module/web/normalization/checkboxHtmlNormalizer.js.map +1 -0
- package/lib/module/web/normalization/htmlNormalizer.js +514 -0
- package/lib/module/web/normalization/htmlNormalizer.js.map +1 -0
- package/lib/module/web/normalization/prepareHtmlForWeb.js +78 -0
- package/lib/module/web/normalization/prepareHtmlForWeb.js.map +1 -0
- package/lib/module/web/normalization/tiptapHtmlNormalizer.js +34 -0
- package/lib/module/web/normalization/tiptapHtmlNormalizer.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/AutolinkPlugin/autolinkRegex.js +27 -0
- package/lib/module/web/pmPlugins/AutolinkPlugin/autolinkRegex.js.map +1 -0
- package/lib/module/web/pmPlugins/AutolinkPlugin/index.js +178 -0
- package/lib/module/web/pmPlugins/AutolinkPlugin/index.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 +86 -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 +57 -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/types.js +4 -0
- package/lib/module/web/pmPlugins/MentionPlugin/types.js.map +1 -0
- package/lib/module/web/pmPlugins/MentionPlugin/useMentionEvents.js +105 -0
- package/lib/module/web/pmPlugins/MentionPlugin/useMentionEvents.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 +134 -0
- package/lib/module/web/pmPlugins/ShortcutPlugin.js.map +1 -0
- package/lib/module/web/pmPlugins/StrictMarksPlugin.js +100 -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/sanitization/htmlSanitizer.js +10 -0
- package/lib/module/web/sanitization/htmlSanitizer.js.map +1 -0
- package/lib/module/web/styleConversion/buildMentionRulesCSS.js +39 -0
- package/lib/module/web/styleConversion/buildMentionRulesCSS.js.map +1 -0
- package/lib/module/web/styleConversion/enrichedBaseStyleToCSSProperties.js +159 -0
- package/lib/module/web/styleConversion/enrichedBaseStyleToCSSProperties.js.map +1 -0
- package/lib/module/web/styleConversion/enrichedInputStyleToCSSProperties.js +7 -0
- package/lib/module/web/styleConversion/enrichedInputStyleToCSSProperties.js.map +1 -0
- package/lib/module/web/styleConversion/enrichedTextStyleToCSSProperties.js +44 -0
- package/lib/module/web/styleConversion/enrichedTextStyleToCSSProperties.js.map +1 -0
- package/lib/module/web/styleConversion/enrichedThemingToCSSProperties.js +18 -0
- package/lib/module/web/styleConversion/enrichedThemingToCSSProperties.js.map +1 -0
- package/lib/module/web/styleConversion/htmlStyleToCSSVariables.js +168 -0
- package/lib/module/web/styleConversion/htmlStyleToCSSVariables.js.map +1 -0
- package/lib/module/web/styleConversion/inlineImageCSSVariables.js +7 -0
- package/lib/module/web/styleConversion/inlineImageCSSVariables.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/useImageErrorFallback.js +33 -0
- package/lib/module/web/useImageErrorFallback.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 +91 -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 +55 -0
- package/lib/module/web/useOnLinkDetected.js.map +1 -0
- package/lib/module/web/usePressInteractions.js +19 -0
- package/lib/module/web/usePressInteractions.js.map +1 -0
- package/lib/module/web/useStableRef.js +13 -0
- package/lib/module/web/useStableRef.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/index.d.ts +4 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/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/EnrichedText.d.ts +4 -0
- package/lib/typescript/src/web/EnrichedText.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/constants/brokenImageGlyph.d.ts +3 -0
- package/lib/typescript/src/web/constants/brokenImageGlyph.d.ts.map +1 -0
- package/lib/typescript/src/web/constants/classNames.d.ts +3 -0
- package/lib/typescript/src/web/constants/classNames.d.ts.map +1 -0
- package/lib/typescript/src/web/emitLinkDetected.d.ts +10 -0
- package/lib/typescript/src/web/emitLinkDetected.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 +8 -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/EnrichedTextAlign.d.ts +2 -0
- package/lib/typescript/src/web/formats/EnrichedTextAlign.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 +12 -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/normalization/checkboxHtmlNormalizer.d.ts +3 -0
- package/lib/typescript/src/web/normalization/checkboxHtmlNormalizer.d.ts.map +1 -0
- package/lib/typescript/src/web/normalization/htmlNormalizer.d.ts +2 -0
- package/lib/typescript/src/web/normalization/htmlNormalizer.d.ts.map +1 -0
- package/lib/typescript/src/web/normalization/prepareHtmlForWeb.d.ts +2 -0
- package/lib/typescript/src/web/normalization/prepareHtmlForWeb.d.ts.map +1 -0
- package/lib/typescript/src/web/normalization/tiptapHtmlNormalizer.d.ts +3 -0
- package/lib/typescript/src/web/normalization/tiptapHtmlNormalizer.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/AutolinkPlugin/autolinkRegex.d.ts +7 -0
- package/lib/typescript/src/web/pmPlugins/AutolinkPlugin/autolinkRegex.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/AutolinkPlugin/index.d.ts +8 -0
- package/lib/typescript/src/web/pmPlugins/AutolinkPlugin/index.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/types.d.ts +20 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/types.d.ts.map +1 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/useMentionEvents.d.ts +4 -0
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/useMentionEvents.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 +15 -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/sanitization/htmlSanitizer.d.ts +2 -0
- package/lib/typescript/src/web/sanitization/htmlSanitizer.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/enrichedBaseStyleToCSSProperties.d.ts +8 -0
- package/lib/typescript/src/web/styleConversion/enrichedBaseStyleToCSSProperties.d.ts.map +1 -0
- package/lib/typescript/src/web/styleConversion/enrichedInputStyleToCSSProperties.d.ts +5 -0
- package/lib/typescript/src/web/styleConversion/enrichedInputStyleToCSSProperties.d.ts.map +1 -0
- package/lib/typescript/src/web/styleConversion/enrichedTextStyleToCSSProperties.d.ts +4 -0
- package/lib/typescript/src/web/styleConversion/enrichedTextStyleToCSSProperties.d.ts.map +1 -0
- package/lib/typescript/src/web/styleConversion/enrichedThemingToCSSProperties.d.ts +9 -0
- package/lib/typescript/src/web/styleConversion/enrichedThemingToCSSProperties.d.ts.map +1 -0
- package/lib/typescript/src/web/styleConversion/htmlStyleToCSSVariables.d.ts +11 -0
- package/lib/typescript/src/web/styleConversion/htmlStyleToCSSVariables.d.ts.map +1 -0
- package/lib/typescript/src/web/styleConversion/inlineImageCSSVariables.d.ts +3 -0
- package/lib/typescript/src/web/styleConversion/inlineImageCSSVariables.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/useImageErrorFallback.d.ts +3 -0
- package/lib/typescript/src/web/useImageErrorFallback.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/lib/typescript/src/web/usePressInteractions.d.ts +2 -0
- package/lib/typescript/src/web/usePressInteractions.d.ts.map +1 -0
- package/lib/typescript/src/web/useStableRef.d.ts +3 -0
- package/lib/typescript/src/web/useStableRef.d.ts.map +1 -0
- package/package.json +258 -1
- package/react-native.config.js +16 -0
- package/src/index.native.tsx +34 -0
- package/src/index.tsx +25 -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 +866 -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 +182 -0
- package/src/utils/nullthrows.ts +7 -0
- package/src/utils/regexParser.ts +56 -0
- package/src/web/EnrichedText.css +343 -0
- package/src/web/EnrichedText.tsx +82 -0
- package/src/web/EnrichedTextInput.tsx +417 -0
- package/src/web/adaptWebToNativeEvent.ts +37 -0
- package/src/web/constants/brokenImageGlyph.ts +7 -0
- package/src/web/constants/classNames.ts +2 -0
- package/src/web/emitLinkDetected.ts +29 -0
- package/src/web/formats/EnrichedBlockquote.ts +37 -0
- package/src/web/formats/EnrichedBold.ts +16 -0
- package/src/web/formats/EnrichedCheckboxItem.ts +35 -0
- package/src/web/formats/EnrichedCheckboxList.ts +50 -0
- package/src/web/formats/EnrichedCode.ts +13 -0
- package/src/web/formats/EnrichedCodeBlock.ts +54 -0
- package/src/web/formats/EnrichedHeading.ts +37 -0
- package/src/web/formats/EnrichedImage.ts +59 -0
- package/src/web/formats/EnrichedImageNodeView.tsx +87 -0
- package/src/web/formats/EnrichedItalic.ts +16 -0
- package/src/web/formats/EnrichedLink.ts +204 -0
- package/src/web/formats/EnrichedListItem.ts +17 -0
- package/src/web/formats/EnrichedMention.ts +55 -0
- package/src/web/formats/EnrichedOrderedList.ts +43 -0
- package/src/web/formats/EnrichedStrike.ts +16 -0
- package/src/web/formats/EnrichedTextAlign.ts +88 -0
- package/src/web/formats/EnrichedUnderline.ts +16 -0
- package/src/web/formats/EnrichedUnorderedList.ts +53 -0
- package/src/web/formats/applyWrappingListToSelection.ts +76 -0
- package/src/web/formats/formatRules.ts +128 -0
- package/src/web/formats/listKeyboard.ts +63 -0
- package/src/web/formats/wrappedBlockKeyboard.ts +76 -0
- package/src/web/normalization/checkboxHtmlNormalizer.ts +62 -0
- package/src/web/normalization/htmlNormalizer.ts +656 -0
- package/src/web/normalization/prepareHtmlForWeb.ts +93 -0
- package/src/web/normalization/tiptapHtmlNormalizer.ts +43 -0
- package/src/web/pasteImages.ts +96 -0
- package/src/web/pastedImageDimensions.ts +40 -0
- package/src/web/pmPlugins/AutolinkPlugin/autolinkRegex.ts +43 -0
- package/src/web/pmPlugins/AutolinkPlugin/index.ts +274 -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 +102 -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 +73 -0
- package/src/web/pmPlugins/MentionPlugin/startMention.ts +14 -0
- package/src/web/pmPlugins/MentionPlugin/stripPartialMentionMarks.ts +20 -0
- package/src/web/pmPlugins/MentionPlugin/types.ts +22 -0
- package/src/web/pmPlugins/MentionPlugin/useMentionEvents.ts +114 -0
- package/src/web/pmPlugins/MergeAdjacentSameKindBlocksPlugin.ts +57 -0
- package/src/web/pmPlugins/ShortcutPlugin.ts +105 -0
- package/src/web/pmPlugins/StrictMarksPlugin.ts +134 -0
- package/src/web/pmPlugins/StripBoldInStyledHeadingsPlugin.ts +84 -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/sanitization/htmlSanitizer.ts +8 -0
- package/src/web/styleConversion/buildMentionRulesCSS.ts +61 -0
- package/src/web/styleConversion/enrichedBaseStyleToCSSProperties.ts +228 -0
- package/src/web/styleConversion/enrichedInputStyleToCSSProperties.ts +13 -0
- package/src/web/styleConversion/enrichedTextStyleToCSSProperties.ts +53 -0
- package/src/web/styleConversion/enrichedThemingToCSSProperties.ts +34 -0
- package/src/web/styleConversion/htmlStyleToCSSVariables.ts +277 -0
- package/src/web/styleConversion/inlineImageCSSVariables.ts +6 -0
- package/src/web/styleConversion/mentionIndicatorCssKey.ts +14 -0
- package/src/web/styleConversion/toColor.ts +17 -0
- package/src/web/useImageErrorFallback.ts +37 -0
- package/src/web/useOnChangeHtml.ts +14 -0
- package/src/web/useOnChangeState.ts +127 -0
- package/src/web/useOnChangeText.ts +15 -0
- package/src/web/useOnEditorChange.ts +33 -0
- package/src/web/useOnLinkDetected.ts +70 -0
- package/src/web/usePressInteractions.tsx +22 -0
- package/src/web/useStableRef.ts +12 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export const DEFAULT_HTML_STYLE = {
|
|
4
|
+
h1: {
|
|
5
|
+
fontSize: 32,
|
|
6
|
+
bold: false
|
|
7
|
+
},
|
|
8
|
+
h2: {
|
|
9
|
+
fontSize: 24,
|
|
10
|
+
bold: false
|
|
11
|
+
},
|
|
12
|
+
h3: {
|
|
13
|
+
fontSize: 20,
|
|
14
|
+
bold: false
|
|
15
|
+
},
|
|
16
|
+
h4: {
|
|
17
|
+
fontSize: 16,
|
|
18
|
+
bold: false
|
|
19
|
+
},
|
|
20
|
+
h5: {
|
|
21
|
+
fontSize: 14,
|
|
22
|
+
bold: false
|
|
23
|
+
},
|
|
24
|
+
h6: {
|
|
25
|
+
fontSize: 12,
|
|
26
|
+
bold: false
|
|
27
|
+
},
|
|
28
|
+
blockquote: {
|
|
29
|
+
borderColor: 'darkgray',
|
|
30
|
+
borderWidth: 4,
|
|
31
|
+
gapWidth: 16,
|
|
32
|
+
color: undefined
|
|
33
|
+
},
|
|
34
|
+
codeblock: {
|
|
35
|
+
color: 'black',
|
|
36
|
+
borderRadius: 8,
|
|
37
|
+
backgroundColor: 'darkgray'
|
|
38
|
+
},
|
|
39
|
+
code: {
|
|
40
|
+
color: 'red',
|
|
41
|
+
backgroundColor: 'darkgray'
|
|
42
|
+
},
|
|
43
|
+
a: {
|
|
44
|
+
color: 'blue',
|
|
45
|
+
textDecorationLine: 'underline'
|
|
46
|
+
},
|
|
47
|
+
mention: {
|
|
48
|
+
color: 'blue',
|
|
49
|
+
backgroundColor: 'yellow',
|
|
50
|
+
textDecorationLine: 'underline'
|
|
51
|
+
},
|
|
52
|
+
ol: {
|
|
53
|
+
gapWidth: 16,
|
|
54
|
+
marginLeft: 16,
|
|
55
|
+
markerFontWeight: undefined,
|
|
56
|
+
markerColor: undefined
|
|
57
|
+
},
|
|
58
|
+
ul: {
|
|
59
|
+
bulletColor: 'black',
|
|
60
|
+
bulletSize: 8,
|
|
61
|
+
marginLeft: 16,
|
|
62
|
+
gapWidth: 16
|
|
63
|
+
},
|
|
64
|
+
ulCheckbox: {
|
|
65
|
+
boxSize: 24,
|
|
66
|
+
gapWidth: 16,
|
|
67
|
+
marginLeft: 16,
|
|
68
|
+
boxColor: 'blue'
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
export const DEFAULT_ENRICHED_TEXT_STYLE = {
|
|
72
|
+
...DEFAULT_HTML_STYLE,
|
|
73
|
+
a: {
|
|
74
|
+
...DEFAULT_HTML_STYLE.a,
|
|
75
|
+
pressColor: 'darkblue'
|
|
76
|
+
},
|
|
77
|
+
mention: {
|
|
78
|
+
...DEFAULT_HTML_STYLE.mention,
|
|
79
|
+
pressColor: 'darkblue',
|
|
80
|
+
pressBackgroundColor: 'yellow'
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=defaultHtmlStyle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DEFAULT_HTML_STYLE","h1","fontSize","bold","h2","h3","h4","h5","h6","blockquote","borderColor","borderWidth","gapWidth","color","undefined","codeblock","borderRadius","backgroundColor","code","a","textDecorationLine","mention","ol","marginLeft","markerFontWeight","markerColor","ul","bulletColor","bulletSize","ulCheckbox","boxSize","boxColor","DEFAULT_ENRICHED_TEXT_STYLE","pressColor","pressBackgroundColor"],"sourceRoot":"../../../src","sources":["utils/defaultHtmlStyle.ts"],"mappings":";;AAEA,OAAO,MAAMA,kBAAuC,GAAG;EACrDC,EAAE,EAAE;IACFC,QAAQ,EAAE,EAAE;IACZC,IAAI,EAAE;EACR,CAAC;EACDC,EAAE,EAAE;IACFF,QAAQ,EAAE,EAAE;IACZC,IAAI,EAAE;EACR,CAAC;EACDE,EAAE,EAAE;IACFH,QAAQ,EAAE,EAAE;IACZC,IAAI,EAAE;EACR,CAAC;EACDG,EAAE,EAAE;IACFJ,QAAQ,EAAE,EAAE;IACZC,IAAI,EAAE;EACR,CAAC;EACDI,EAAE,EAAE;IACFL,QAAQ,EAAE,EAAE;IACZC,IAAI,EAAE;EACR,CAAC;EACDK,EAAE,EAAE;IACFN,QAAQ,EAAE,EAAE;IACZC,IAAI,EAAE;EACR,CAAC;EACDM,UAAU,EAAE;IACVC,WAAW,EAAE,UAAU;IACvBC,WAAW,EAAE,CAAC;IACdC,QAAQ,EAAE,EAAE;IACZC,KAAK,EAAEC;EACT,CAAC;EACDC,SAAS,EAAE;IACTF,KAAK,EAAE,OAAO;IACdG,YAAY,EAAE,CAAC;IACfC,eAAe,EAAE;EACnB,CAAC;EACDC,IAAI,EAAE;IACJL,KAAK,EAAE,KAAK;IACZI,eAAe,EAAE;EACnB,CAAC;EACDE,CAAC,EAAE;IACDN,KAAK,EAAE,MAAM;IACbO,kBAAkB,EAAE;EACtB,CAAC;EACDC,OAAO,EAAE;IACPR,KAAK,EAAE,MAAM;IACbI,eAAe,EAAE,QAAQ;IACzBG,kBAAkB,EAAE;EACtB,CAAC;EACDE,EAAE,EAAE;IACFV,QAAQ,EAAE,EAAE;IACZW,UAAU,EAAE,EAAE;IACdC,gBAAgB,EAAEV,SAAS;IAC3BW,WAAW,EAAEX;EACf,CAAC;EACDY,EAAE,EAAE;IACFC,WAAW,EAAE,OAAO;IACpBC,UAAU,EAAE,CAAC;IACbL,UAAU,EAAE,EAAE;IACdX,QAAQ,EAAE;EACZ,CAAC;EACDiB,UAAU,EAAE;IACVC,OAAO,EAAE,EAAE;IACXlB,QAAQ,EAAE,EAAE;IACZW,UAAU,EAAE,EAAE;IACdQ,QAAQ,EAAE;EACZ;AACF,CAAC;AAED,OAAO,MAAMC,2BAA4D,GAAG;EAC1E,GAAGhC,kBAAkB;EACrBmB,CAAC,EAAE;IACD,GAAGnB,kBAAkB,CAACmB,CAAC;IACvBc,UAAU,EAAE;EACd,CAAC;EACDZ,OAAO,EAAE;IACP,GAAGrB,kBAAkB,CAACqB,OAAO;IAC7BY,UAAU,EAAE,UAAU;IACtBC,oBAAoB,EAAE;EACxB;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { isMentionStyleRecord } from "./isMentionStyleRecord.js";
|
|
4
|
+
export function expandMentionStylesForIndicators(mention, indicators, htmlStyleToMergeWith) {
|
|
5
|
+
const out = {};
|
|
6
|
+
for (const indicator of indicators) {
|
|
7
|
+
out[indicator] = {
|
|
8
|
+
...htmlStyleToMergeWith.mention,
|
|
9
|
+
...(isMentionStyleRecord(mention) ? mention[indicator] ?? mention.default ?? {} : mention)
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
return out;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=expandMentionStylesForIndicators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isMentionStyleRecord","expandMentionStylesForIndicators","mention","indicators","htmlStyleToMergeWith","out","indicator","default"],"sourceRoot":"../../../src","sources":["utils/expandMentionStylesForIndicators.ts"],"mappings":";;AACA,SAASA,oBAAoB,QAAQ,2BAAwB;AAE7D,OAAO,SAASC,gCAAgCA,CAC9CC,OAAyC,EACzCC,UAAoB,EACpBC,oBAA+B,EACS;EACxC,MAAMC,GAA2C,GAAG,CAAC,CAAC;EACtD,KAAK,MAAMC,SAAS,IAAIH,UAAU,EAAE;IAClCE,GAAG,CAACC,SAAS,CAAC,GAAG;MACf,GAAGF,oBAAoB,CAACF,OAAO;MAC/B,IAAIF,oBAAoB,CAACE,OAAO,CAAC,GAC5BA,OAAO,CAACI,SAAS,CAAC,IAAIJ,OAAO,CAACK,OAAO,IAAI,CAAC,CAAC,GAC5CL,OAAO;IACb,CAAC;EACH;EACA,OAAOG,GAAG;AACZ","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export function isMentionStyleRecord(mentionStyle) {
|
|
4
|
+
if (mentionStyle && typeof mentionStyle === 'object' && !Array.isArray(mentionStyle)) {
|
|
5
|
+
const keys = Object.keys(mentionStyle);
|
|
6
|
+
return keys.length > 0 && keys.every(key => typeof mentionStyle[key] === 'object' && mentionStyle[key] !== null);
|
|
7
|
+
}
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=isMentionStyleRecord.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isMentionStyleRecord","mentionStyle","Array","isArray","keys","Object","length","every","key"],"sourceRoot":"../../../src","sources":["utils/isMentionStyleRecord.ts"],"mappings":";;AAEA,OAAO,SAASA,oBAAoBA,CAClCC,YAAkC,EACsB;EACxD,IACEA,YAAY,IACZ,OAAOA,YAAY,KAAK,QAAQ,IAChC,CAACC,KAAK,CAACC,OAAO,CAACF,YAAY,CAAC,EAC5B;IACA,MAAMG,IAAI,GAAGC,MAAM,CAACD,IAAI,CAACH,YAAY,CAAC;IACtC,OACEG,IAAI,CAACE,MAAM,GAAG,CAAC,IACfF,IAAI,CAACG,KAAK,CACPC,GAAG,IACF,OAAQP,YAAY,CAA6BO,GAAG,CAAC,KAAK,QAAQ,IACjEP,YAAY,CAA6BO,GAAG,CAAC,KAAK,IACvD,CAAC;EAEL;EACA,OAAO,KAAK;AACd","ignoreList":[]}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { processColor } from 'react-native';
|
|
4
|
+
import { DEFAULT_HTML_STYLE, DEFAULT_ENRICHED_TEXT_STYLE } from "./defaultHtmlStyle.js";
|
|
5
|
+
import { expandMentionStylesForIndicators } from "./expandMentionStylesForIndicators.js";
|
|
6
|
+
const MENTION_DEFAULT_KEY = '_default';
|
|
7
|
+
const parseOlStyles = style => {
|
|
8
|
+
let markerFontWeight;
|
|
9
|
+
if (style.ol?.markerFontWeight) {
|
|
10
|
+
if (typeof style.ol?.markerFontWeight === 'number') {
|
|
11
|
+
markerFontWeight = String(style.ol?.markerFontWeight);
|
|
12
|
+
} else if (typeof style.ol?.markerFontWeight === 'string') {
|
|
13
|
+
markerFontWeight = style.ol?.markerFontWeight;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
...style.ol,
|
|
18
|
+
markerFontWeight: markerFontWeight
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
const convertToHtmlStyleInternal = (style, mentionIndicators) => {
|
|
22
|
+
const mentionStyles = expandMentionStylesForIndicators(style.mention, mentionIndicators, DEFAULT_HTML_STYLE);
|
|
23
|
+
let markerFontWeight;
|
|
24
|
+
if (style.ol?.markerFontWeight) {
|
|
25
|
+
if (typeof style.ol?.markerFontWeight === 'number') {
|
|
26
|
+
markerFontWeight = String(style.ol?.markerFontWeight);
|
|
27
|
+
} else if (typeof style.ol?.markerFontWeight === 'string') {
|
|
28
|
+
markerFontWeight = style.ol?.markerFontWeight;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
const olStyles = {
|
|
32
|
+
...style.ol,
|
|
33
|
+
markerFontWeight: markerFontWeight
|
|
34
|
+
};
|
|
35
|
+
return {
|
|
36
|
+
...style,
|
|
37
|
+
mention: mentionStyles,
|
|
38
|
+
ol: olStyles
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
const convertToEnrichedTextHtmlStyleInternal = style => {
|
|
42
|
+
const mentionStyles = {};
|
|
43
|
+
const mention = style.mention;
|
|
44
|
+
if (mention && typeof mention === 'object' && !Array.isArray(mention)) {
|
|
45
|
+
for (const key of Object.keys(mention)) {
|
|
46
|
+
const value = mention[key];
|
|
47
|
+
if (typeof value === 'object' && value !== null) {
|
|
48
|
+
mentionStyles[key] = {
|
|
49
|
+
...DEFAULT_ENRICHED_TEXT_STYLE.mention,
|
|
50
|
+
...value
|
|
51
|
+
};
|
|
52
|
+
} else {
|
|
53
|
+
mentionStyles[MENTION_DEFAULT_KEY] = {
|
|
54
|
+
...DEFAULT_ENRICHED_TEXT_STYLE.mention,
|
|
55
|
+
...mention
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
if (mentionStyles[MENTION_DEFAULT_KEY] === undefined) {
|
|
61
|
+
mentionStyles[MENTION_DEFAULT_KEY] = {
|
|
62
|
+
...DEFAULT_ENRICHED_TEXT_STYLE.mention
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
...style,
|
|
67
|
+
mention: mentionStyles,
|
|
68
|
+
ol: parseOlStyles(style)
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
const assignDefaultValues = (style, base) => {
|
|
72
|
+
const merged = {
|
|
73
|
+
...base
|
|
74
|
+
};
|
|
75
|
+
for (const key in style) {
|
|
76
|
+
if (key === 'mention') {
|
|
77
|
+
merged[key] = {
|
|
78
|
+
...style.mention
|
|
79
|
+
};
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
merged[key] = {
|
|
83
|
+
...(base[key] ?? {}),
|
|
84
|
+
...style[key]
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
return merged;
|
|
88
|
+
};
|
|
89
|
+
const parseStyle = (name, value) => {
|
|
90
|
+
if (name !== 'color' && !name.endsWith('Color')) {
|
|
91
|
+
return value;
|
|
92
|
+
}
|
|
93
|
+
return processColor(value);
|
|
94
|
+
};
|
|
95
|
+
const parseColors = style => {
|
|
96
|
+
const finalStyle = {};
|
|
97
|
+
for (const [tagName, tagStyle] of Object.entries(style)) {
|
|
98
|
+
const tagStyles = {};
|
|
99
|
+
if (tagName === 'mention') {
|
|
100
|
+
for (const [indicator, mentionStyle] of Object.entries(tagStyle)) {
|
|
101
|
+
tagStyles[indicator] = {};
|
|
102
|
+
for (const [styleName, styleValue] of Object.entries(mentionStyle)) {
|
|
103
|
+
tagStyles[indicator][styleName] = parseStyle(styleName, styleValue);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
finalStyle[tagName] = tagStyles;
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
for (const [styleName, styleValue] of Object.entries(tagStyle)) {
|
|
110
|
+
tagStyles[styleName] = parseStyle(styleName, styleValue);
|
|
111
|
+
}
|
|
112
|
+
finalStyle[tagName] = tagStyles;
|
|
113
|
+
}
|
|
114
|
+
return finalStyle;
|
|
115
|
+
};
|
|
116
|
+
export const normalizeHtmlStyle = (style, mentionIndicators) => {
|
|
117
|
+
const converted = convertToHtmlStyleInternal(style, mentionIndicators);
|
|
118
|
+
const withDefaults = assignDefaultValues(converted, DEFAULT_HTML_STYLE);
|
|
119
|
+
return parseColors(withDefaults);
|
|
120
|
+
};
|
|
121
|
+
export const normalizeEnrichedTextHtmlStyle = style => {
|
|
122
|
+
const converted = convertToEnrichedTextHtmlStyleInternal(style);
|
|
123
|
+
const withDefaults = assignDefaultValues(converted, DEFAULT_ENRICHED_TEXT_STYLE);
|
|
124
|
+
return parseColors(withDefaults);
|
|
125
|
+
};
|
|
126
|
+
//# sourceMappingURL=normalizeHtmlStyle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["processColor","DEFAULT_HTML_STYLE","DEFAULT_ENRICHED_TEXT_STYLE","expandMentionStylesForIndicators","MENTION_DEFAULT_KEY","parseOlStyles","style","markerFontWeight","ol","String","convertToHtmlStyleInternal","mentionIndicators","mentionStyles","mention","olStyles","convertToEnrichedTextHtmlStyleInternal","Array","isArray","key","Object","keys","value","undefined","assignDefaultValues","base","merged","parseStyle","name","endsWith","parseColors","finalStyle","tagName","tagStyle","entries","tagStyles","indicator","mentionStyle","styleName","styleValue","normalizeHtmlStyle","converted","withDefaults","normalizeEnrichedTextHtmlStyle"],"sourceRoot":"../../../src","sources":["utils/normalizeHtmlStyle.ts"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["nullthrows","value","Error"],"sourceRoot":"../../../src","sources":["utils/nullthrows.ts"],"mappings":";;AAAA,OAAO,MAAMA,UAAU,GAAOC,KAA2B,IAAQ;EAC/D,IAAIA,KAAK,IAAI,IAAI,EAAE;IACjB,MAAM,IAAIC,KAAK,CAAC,oCAAoC,CAAC;EACvD;EAEA,OAAOD,KAAK;AACd,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const DISABLED_REGEX = {
|
|
4
|
+
pattern: '',
|
|
5
|
+
caseInsensitive: false,
|
|
6
|
+
dotAll: false,
|
|
7
|
+
isDisabled: true,
|
|
8
|
+
isDefault: false
|
|
9
|
+
};
|
|
10
|
+
const DEFAULT_REGEX = {
|
|
11
|
+
pattern: '',
|
|
12
|
+
caseInsensitive: false,
|
|
13
|
+
dotAll: false,
|
|
14
|
+
isDisabled: false,
|
|
15
|
+
isDefault: true
|
|
16
|
+
};
|
|
17
|
+
export const toNativeRegexConfig = regex => {
|
|
18
|
+
if (regex === null) {
|
|
19
|
+
return DISABLED_REGEX;
|
|
20
|
+
}
|
|
21
|
+
if (regex === undefined) {
|
|
22
|
+
return DEFAULT_REGEX;
|
|
23
|
+
}
|
|
24
|
+
const source = regex.source;
|
|
25
|
+
|
|
26
|
+
// iOS fails on variable-width lookbehinds like (?<=a+)
|
|
27
|
+
const hasLookbehind = source.includes('(?<=') || source.includes('(?<!');
|
|
28
|
+
if (hasLookbehind) {
|
|
29
|
+
// Basic detection for quantifiers inside a group
|
|
30
|
+
const lookbehindContent = source.match(/\(\?<[=!](.*?)\)/)?.[1] || '';
|
|
31
|
+
if (/[*+{]/.test(lookbehindContent)) {
|
|
32
|
+
if (__DEV__) {
|
|
33
|
+
console.error('Variable-width lookbehinds are not supported. Using default link regex.');
|
|
34
|
+
}
|
|
35
|
+
return DEFAULT_REGEX;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
pattern: source,
|
|
40
|
+
caseInsensitive: regex.ignoreCase,
|
|
41
|
+
dotAll: regex.dotAll,
|
|
42
|
+
isDisabled: false,
|
|
43
|
+
isDefault: false
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=regexParser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DISABLED_REGEX","pattern","caseInsensitive","dotAll","isDisabled","isDefault","DEFAULT_REGEX","toNativeRegexConfig","regex","undefined","source","hasLookbehind","includes","lookbehindContent","match","test","__DEV__","console","error","ignoreCase"],"sourceRoot":"../../../src","sources":["utils/regexParser.ts"],"mappings":";;AAEA,MAAMA,cAA+B,GAAG;EACtCC,OAAO,EAAE,EAAE;EACXC,eAAe,EAAE,KAAK;EACtBC,MAAM,EAAE,KAAK;EACbC,UAAU,EAAE,IAAI;EAChBC,SAAS,EAAE;AACb,CAAC;AAED,MAAMC,aAA8B,GAAG;EACrCL,OAAO,EAAE,EAAE;EACXC,eAAe,EAAE,KAAK;EACtBC,MAAM,EAAE,KAAK;EACbC,UAAU,EAAE,KAAK;EACjBC,SAAS,EAAE;AACb,CAAC;AAED,OAAO,MAAME,mBAAmB,GAC9BC,KAAgC,IACZ;EACpB,IAAIA,KAAK,KAAK,IAAI,EAAE;IAClB,OAAOR,cAAc;EACvB;EAEA,IAAIQ,KAAK,KAAKC,SAAS,EAAE;IACvB,OAAOH,aAAa;EACtB;EAEA,MAAMI,MAAM,GAAGF,KAAK,CAACE,MAAM;;EAE3B;EACA,MAAMC,aAAa,GAAGD,MAAM,CAACE,QAAQ,CAAC,MAAM,CAAC,IAAIF,MAAM,CAACE,QAAQ,CAAC,MAAM,CAAC;EAExE,IAAID,aAAa,EAAE;IACjB;IACA,MAAME,iBAAiB,GAAGH,MAAM,CAACI,KAAK,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE;IACrE,IAAI,OAAO,CAACC,IAAI,CAACF,iBAAiB,CAAC,EAAE;MACnC,IAAIG,OAAO,EAAE;QACXC,OAAO,CAACC,KAAK,CACX,yEACF,CAAC;MACH;MAEA,OAAOZ,aAAa;IACtB;EACF;EAEA,OAAO;IACLL,OAAO,EAAES,MAAM;IACfR,eAAe,EAAEM,KAAK,CAACW,UAAU;IACjChB,MAAM,EAAEK,KAAK,CAACL,MAAM;IACpBC,UAAU,EAAE,KAAK;IACjBC,SAAS,EAAE;EACb,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
.tiptap.ProseMirror p {
|
|
2
|
+
margin-top: 0;
|
|
3
|
+
margin-bottom: 0;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.tiptap.ProseMirror-focused {
|
|
7
|
+
outline: none;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.et-view {
|
|
11
|
+
white-space: pre-wrap;
|
|
12
|
+
overflow-wrap: anywhere;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.et-view p {
|
|
16
|
+
margin-top: 0;
|
|
17
|
+
margin-bottom: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.eti-editor p.is-editor-empty:first-child::before {
|
|
21
|
+
color: var(--et-placeholder-text-color, #adb5bd);
|
|
22
|
+
content: attr(data-placeholder);
|
|
23
|
+
float: left;
|
|
24
|
+
height: 0;
|
|
25
|
+
pointer-events: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.eti-editor ::selection,
|
|
29
|
+
.et-view ::selection {
|
|
30
|
+
background-color: var(--et-selection-color, Highlight);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.eti-editor code,
|
|
34
|
+
.et-view code {
|
|
35
|
+
font-family: monospace;
|
|
36
|
+
background-color: var(--et-code-bg-color);
|
|
37
|
+
color: var(--et-code-color);
|
|
38
|
+
display: inline;
|
|
39
|
+
padding: 0;
|
|
40
|
+
line-height: inherit;
|
|
41
|
+
vertical-align: baseline;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.eti-editor h1,
|
|
45
|
+
.et-view h1 {
|
|
46
|
+
font-size: var(--et-h1-font-size);
|
|
47
|
+
font-weight: var(--et-h1-font-weight);
|
|
48
|
+
margin: 0;
|
|
49
|
+
line-height: normal;
|
|
50
|
+
}
|
|
51
|
+
.eti-editor h2,
|
|
52
|
+
.et-view h2 {
|
|
53
|
+
font-size: var(--et-h2-font-size);
|
|
54
|
+
font-weight: var(--et-h2-font-weight);
|
|
55
|
+
margin: 0;
|
|
56
|
+
line-height: normal;
|
|
57
|
+
}
|
|
58
|
+
.eti-editor h3,
|
|
59
|
+
.et-view h3 {
|
|
60
|
+
font-size: var(--et-h3-font-size);
|
|
61
|
+
font-weight: var(--et-h3-font-weight);
|
|
62
|
+
margin: 0;
|
|
63
|
+
line-height: normal;
|
|
64
|
+
}
|
|
65
|
+
.eti-editor h4,
|
|
66
|
+
.et-view h4 {
|
|
67
|
+
font-size: var(--et-h4-font-size);
|
|
68
|
+
font-weight: var(--et-h4-font-weight);
|
|
69
|
+
margin: 0;
|
|
70
|
+
line-height: normal;
|
|
71
|
+
}
|
|
72
|
+
.eti-editor h5,
|
|
73
|
+
.et-view h5 {
|
|
74
|
+
font-size: var(--et-h5-font-size);
|
|
75
|
+
font-weight: var(--et-h5-font-weight);
|
|
76
|
+
margin: 0;
|
|
77
|
+
line-height: normal;
|
|
78
|
+
}
|
|
79
|
+
.eti-editor h6,
|
|
80
|
+
.et-view h6 {
|
|
81
|
+
font-size: var(--et-h6-font-size);
|
|
82
|
+
font-weight: var(--et-h6-font-weight);
|
|
83
|
+
margin: 0;
|
|
84
|
+
line-height: normal;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.eti-editor blockquote,
|
|
88
|
+
.et-view blockquote {
|
|
89
|
+
border-left: var(--et-blockquote-border-width) solid
|
|
90
|
+
var(--et-blockquote-border-color);
|
|
91
|
+
padding-left: var(--et-blockquote-gap-width);
|
|
92
|
+
margin: 0;
|
|
93
|
+
color: var(--et-blockquote-color);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.eti-editor blockquote p,
|
|
97
|
+
.et-view blockquote p {
|
|
98
|
+
margin: 0;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.eti-editor codeblock,
|
|
102
|
+
.et-view codeblock {
|
|
103
|
+
display: block;
|
|
104
|
+
font-family: monospace;
|
|
105
|
+
background-color: var(--et-codeblock-bg-color);
|
|
106
|
+
color: var(--et-codeblock-color);
|
|
107
|
+
border-radius: var(--et-codeblock-border-radius);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.eti-editor codeblock p,
|
|
111
|
+
.et-view codeblock p {
|
|
112
|
+
margin: 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.eti-editor a,
|
|
116
|
+
.et-view a {
|
|
117
|
+
color: var(--et-link-color);
|
|
118
|
+
text-decoration-line: var(--et-link-text-decoration-line);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.eti-editor li,
|
|
122
|
+
.et-view li {
|
|
123
|
+
margin: 0;
|
|
124
|
+
min-height: 1.2em;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@supports (min-height: 1lh) {
|
|
128
|
+
.eti-editor li,
|
|
129
|
+
.et-view li {
|
|
130
|
+
min-height: 1lh;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/* Zero-width space to correctly display empty list elements */
|
|
135
|
+
.eti-editor ul:not([data-type]) > li > p:empty::after,
|
|
136
|
+
.et-view ul:not([data-type]) > li > p:empty::after,
|
|
137
|
+
.eti-editor ol > li > p:empty::after,
|
|
138
|
+
.et-view ol > li > p:empty::after,
|
|
139
|
+
.eti-editor ul[data-type='checkboxList'] > li > div:empty::after,
|
|
140
|
+
.et-view ul[data-type="checkbox"] > li > label:empty::after {
|
|
141
|
+
content: '\200b';
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.eti-editor ul:not([data-type]),
|
|
145
|
+
.et-view ul:not([data-type]) {
|
|
146
|
+
margin: 0;
|
|
147
|
+
list-style: none;
|
|
148
|
+
padding-left: calc(var(--et-ul-margin-left, 16px) + var(--et-ul-gap-width, 16px));
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.eti-editor ul:not([data-type]) > li,
|
|
152
|
+
.et-view ul:not([data-type]) > li {
|
|
153
|
+
margin: 0;
|
|
154
|
+
display: flex;
|
|
155
|
+
align-items: baseline;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.eti-editor ul:not([data-type]) > li::before,
|
|
159
|
+
.et-view ul:not([data-type]) > li::before {
|
|
160
|
+
content: '';
|
|
161
|
+
flex-shrink: 0;
|
|
162
|
+
width: var(--et-ul-bullet-size, 8px);
|
|
163
|
+
height: var(--et-ul-bullet-size, 8px);
|
|
164
|
+
border-radius: 50%;
|
|
165
|
+
background-color: var(--et-ul-bullet-color, currentColor);
|
|
166
|
+
|
|
167
|
+
margin-left: calc(-1 * (var(--et-ul-bullet-size, 8px) + var(--et-ul-gap-width, 16px)));
|
|
168
|
+
margin-right: var(--et-ul-gap-width, 16px);
|
|
169
|
+
|
|
170
|
+
position: relative;
|
|
171
|
+
top: -0.1em;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.eti-editor ol,
|
|
175
|
+
.et-view ol {
|
|
176
|
+
margin: 0;
|
|
177
|
+
list-style: none;
|
|
178
|
+
padding-left: calc(var(--et-ol-margin-left, 16px) + var(--et-ol-gap-width, 16px));
|
|
179
|
+
counter-reset: et-ol;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.eti-editor ol > li,
|
|
183
|
+
.et-view ol > li {
|
|
184
|
+
margin: 0;
|
|
185
|
+
counter-increment: et-ol;
|
|
186
|
+
display: flex;
|
|
187
|
+
align-items: baseline;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.eti-editor ol > li::before,
|
|
191
|
+
.et-view ol > li::before {
|
|
192
|
+
content: counter(et-ol) '.';
|
|
193
|
+
flex-shrink: 0;
|
|
194
|
+
width: var(--et-ol-margin-left, 16px);
|
|
195
|
+
text-align: right;
|
|
196
|
+
margin-right: calc(var(--et-ol-gap-width, 16px) / 2);
|
|
197
|
+
margin-left: calc(-1 * (var(--et-ol-margin-left, 16px) + (var(--et-ol-gap-width, 16px) / 2)));
|
|
198
|
+
|
|
199
|
+
color: var(--et-ol-marker-color, currentColor);
|
|
200
|
+
font-weight: var(--et-ol-marker-font-weight, inherit);
|
|
201
|
+
white-space: nowrap;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.eti-editor ul:not([data-type]) > li > p,
|
|
205
|
+
.et-view ul:not([data-type]) > li > p,
|
|
206
|
+
.eti-editor ol > li > p,
|
|
207
|
+
.et-view ol > li > p {
|
|
208
|
+
display: block;
|
|
209
|
+
flex: 1 1 auto;
|
|
210
|
+
min-width: 0;
|
|
211
|
+
margin: 0;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.eti-editor li p,
|
|
215
|
+
.et-view li p {
|
|
216
|
+
margin: 0;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.eti-editor .eti-inline-image {
|
|
220
|
+
vertical-align: text-bottom;
|
|
221
|
+
line-height: 0;
|
|
222
|
+
display: inline-block;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.eti-editor .eti-inline-image-img {
|
|
226
|
+
object-fit: contain;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.eti-editor .eti-inline-image--placeholder {
|
|
230
|
+
display: inline-block;
|
|
231
|
+
overflow: hidden;
|
|
232
|
+
color: inherit;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.eti-editor .eti-inline-image-broken-glyph {
|
|
236
|
+
display: block;
|
|
237
|
+
width: 100%;
|
|
238
|
+
height: 100%;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.eti-editor
|
|
242
|
+
.react-renderer.node-image.ProseMirror-selectednode
|
|
243
|
+
.eti-inline-image {
|
|
244
|
+
box-shadow: inset 0 0 0 999px Highlight;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.eti-editor ul[data-type='checkboxList'] {
|
|
248
|
+
margin: 0;
|
|
249
|
+
list-style: none;
|
|
250
|
+
padding-left: calc(var(--et-checkbox-margin-left, 16px) + var(--et-checkbox-gap-width, 16px));
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.eti-editor ul[data-type='checkboxList'] > li {
|
|
254
|
+
margin: 0;
|
|
255
|
+
display: flex;
|
|
256
|
+
align-items: baseline;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.eti-editor ul[data-type='checkboxList'] > li > label {
|
|
260
|
+
display: inline-flex;
|
|
261
|
+
align-items: center;
|
|
262
|
+
flex-shrink: 0;
|
|
263
|
+
width: var(--et-checkbox-box-size, 24px);
|
|
264
|
+
height: var(--et-checkbox-box-size, 24px);
|
|
265
|
+
|
|
266
|
+
margin-left: calc(-1 * (var(--et-checkbox-box-size, 24px) + var(--et-checkbox-gap-width, 16px)));
|
|
267
|
+
margin-right: var(--et-checkbox-gap-width, 16px);
|
|
268
|
+
|
|
269
|
+
margin-top: 0;
|
|
270
|
+
position: relative;
|
|
271
|
+
top: 0.15em;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.eti-editor ul[data-type='checkboxList'] > li > label input[type='checkbox'] {
|
|
275
|
+
width: 100%;
|
|
276
|
+
height: 100%;
|
|
277
|
+
margin: 0;
|
|
278
|
+
flex-shrink: 0;
|
|
279
|
+
accent-color: var(--et-checkbox-box-color, #0000ff);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.eti-editor ul[data-type='checkboxList'] > li > div {
|
|
283
|
+
display: block;
|
|
284
|
+
flex: 1 1 auto;
|
|
285
|
+
min-width: 0;
|
|
286
|
+
margin: 0;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.et-view ul[data-type="checkbox"] {
|
|
290
|
+
margin: 0;
|
|
291
|
+
list-style: none;
|
|
292
|
+
padding-left: calc(
|
|
293
|
+
var(--et-checkbox-margin-left, 16px) + var(--et-checkbox-gap-width, 16px)
|
|
294
|
+
);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.et-view ul[data-type="checkbox"] > li {
|
|
298
|
+
margin: 0;
|
|
299
|
+
display: flex;
|
|
300
|
+
align-items: baseline;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.et-view ul[data-type="checkbox"] > li > input[type='checkbox'] {
|
|
304
|
+
flex-shrink: 0;
|
|
305
|
+
|
|
306
|
+
margin-left: calc(-1 * (var(--et-checkbox-box-size, 24px) + var(--et-checkbox-gap-width, 16px)));
|
|
307
|
+
margin-right: var(--et-checkbox-gap-width, 16px);
|
|
308
|
+
margin-bottom: 0;
|
|
309
|
+
|
|
310
|
+
width: var(--et-checkbox-box-size, 24px);
|
|
311
|
+
height: var(--et-checkbox-box-size, 24px);
|
|
312
|
+
accent-color: var(--et-checkbox-box-color, #0000ff);
|
|
313
|
+
|
|
314
|
+
/* disable checkbox press style as it's read-only */
|
|
315
|
+
pointer-events: none;
|
|
316
|
+
-webkit-tap-highlight-color: transparent;
|
|
317
|
+
|
|
318
|
+
margin-top: 0;
|
|
319
|
+
position: relative;
|
|
320
|
+
top: 0.15em;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.et-view ul[data-type="checkbox"] > li > label {
|
|
324
|
+
display: block;
|
|
325
|
+
flex: 1 1 auto;
|
|
326
|
+
min-width: 0;
|
|
327
|
+
margin: 0;
|
|
328
|
+
padding: 0;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.et-view img {
|
|
332
|
+
display: inline-block;
|
|
333
|
+
position: relative;
|
|
334
|
+
overflow: hidden;
|
|
335
|
+
vertical-align: text-bottom;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.et-view img.error {
|
|
339
|
+
content: linear-gradient(transparent, transparent);
|
|
340
|
+
background-color: currentColor;
|
|
341
|
+
-webkit-mask: var(--et-broken-image-glyph) no-repeat center / contain;
|
|
342
|
+
mask: var(--et-broken-image-glyph) no-repeat center / contain;
|
|
343
|
+
}
|