react-native-enriched-html 1.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/android/src/main/java/com/swmansion/enriched/common/EnrichedSpanFlags.kt +39 -0
- package/android/src/main/java/com/swmansion/enriched/common/parser/EnrichedParser.java +43 -20
- package/android/src/main/java/com/swmansion/enriched/common/parser/EnrichedSpanFactory.kt +1 -0
- package/android/src/main/java/com/swmansion/enriched/text/EnrichedTextSpanFactory.kt +1 -0
- package/android/src/main/java/com/swmansion/enriched/text/EnrichedTextView.kt +2 -1
- package/android/src/main/java/com/swmansion/enriched/textinput/EnrichedTextInputSpannableFactory.kt +2 -1
- package/android/src/main/java/com/swmansion/enriched/textinput/EnrichedTextInputView.kt +8 -5
- package/android/src/main/java/com/swmansion/enriched/textinput/events/MentionHandler.kt +12 -2
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnMentionEvent.kt +6 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/styles/AlignmentStyles.kt +6 -7
- package/android/src/main/java/com/swmansion/enriched/textinput/styles/InlineStyles.kt +13 -1
- package/android/src/main/java/com/swmansion/enriched/textinput/styles/ListStyles.kt +4 -3
- package/android/src/main/java/com/swmansion/enriched/textinput/styles/ParagraphStyles.kt +4 -3
- package/android/src/main/java/com/swmansion/enriched/textinput/styles/ParametrizedStyles.kt +38 -11
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/EnrichedSelection.kt +2 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/EnrichedSpannable.kt +2 -1
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/Utils.kt +2 -1
- package/cpp/parser/GumboNormalizer.c +61 -3
- package/cpp/tests/GumboParserTest.cpp +54 -0
- package/ios/EnrichedTextInputView.mm +37 -25
- package/ios/extensions/LayoutManagerExtension.mm +73 -62
- package/ios/extensions/StringExtension.mm +75 -0
- package/ios/htmlParser/HtmlParser.h +4 -1
- package/ios/htmlParser/HtmlParser.mm +23 -5
- package/ios/inputHtmlParser/InputHtmlParser.mm +6 -3
- package/ios/interfaces/StyleHeaders.h +4 -0
- package/ios/styles/LinkStyle.mm +20 -34
- package/ios/styles/MentionStyle.mm +55 -4
- package/ios/textHtmlParser/TextHtmlParser.mm +2 -1
- package/ios/utils/ParagraphAttributesUtils.mm +7 -0
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils/expandMentionStylesForIndicators.js +2 -3
- package/lib/module/utils/expandMentionStylesForIndicators.js.map +1 -1
- package/lib/module/utils/normalizeHtmlStyle.js +1 -1
- package/lib/module/utils/normalizeHtmlStyle.js.map +1 -1
- 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 +54 -52
- package/lib/module/web/EnrichedTextInput.js.map +1 -1
- 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 +1 -1
- package/lib/module/web/formats/EnrichedBlockquote.js.map +1 -1
- package/lib/module/web/formats/EnrichedCheckboxList.js +2 -2
- package/lib/module/web/formats/EnrichedCheckboxList.js.map +1 -1
- package/lib/module/web/formats/EnrichedCodeBlock.js +1 -1
- package/lib/module/web/formats/EnrichedCodeBlock.js.map +1 -1
- package/lib/module/web/formats/EnrichedHeading.js +1 -1
- package/lib/module/web/formats/EnrichedHeading.js.map +1 -1
- package/lib/module/web/formats/EnrichedImageNodeView.js +1 -1
- package/lib/module/web/formats/EnrichedImageNodeView.js.map +1 -1
- package/lib/module/web/formats/EnrichedLink.js +43 -3
- package/lib/module/web/formats/EnrichedLink.js.map +1 -1
- package/lib/module/web/formats/EnrichedOrderedList.js +2 -2
- package/lib/module/web/formats/EnrichedOrderedList.js.map +1 -1
- package/lib/module/web/formats/EnrichedTextAlign.js +82 -0
- package/lib/module/web/formats/EnrichedTextAlign.js.map +1 -0
- package/lib/module/web/formats/EnrichedUnorderedList.js +2 -2
- package/lib/module/web/formats/EnrichedUnorderedList.js.map +1 -1
- package/lib/module/web/formats/applyWrappingListToSelection.js +3 -2
- package/lib/module/web/formats/applyWrappingListToSelection.js.map +1 -1
- package/lib/module/web/formats/formatRules.js +39 -3
- package/lib/module/web/formats/formatRules.js.map +1 -1
- package/lib/module/web/formats/listKeyboard.js +4 -1
- package/lib/module/web/formats/listKeyboard.js.map +1 -1
- 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/{tiptapHtmlNormalizer.js → normalization/tiptapHtmlNormalizer.js} +6 -2
- package/lib/module/web/normalization/tiptapHtmlNormalizer.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 +1 -1
- package/lib/module/web/pmPlugins/MentionPlugin/index.js.map +1 -1
- package/lib/module/web/pmPlugins/MentionPlugin/makeMentionPluginState.js +23 -4
- package/lib/module/web/pmPlugins/MentionPlugin/makeMentionPluginState.js.map +1 -1
- package/lib/module/web/pmPlugins/MentionPlugin/setMention.js +17 -18
- package/lib/module/web/pmPlugins/MentionPlugin/setMention.js.map +1 -1
- 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/ShortcutPlugin.js +11 -0
- package/lib/module/web/pmPlugins/ShortcutPlugin.js.map +1 -1
- package/lib/module/web/pmPlugins/StrictMarksPlugin.js +2 -0
- package/lib/module/web/pmPlugins/StrictMarksPlugin.js.map +1 -1
- package/lib/module/web/pmPlugins/StripBoldInStyledHeadingsPlugin.js.map +1 -1
- 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 +12 -6
- package/lib/module/web/styleConversion/buildMentionRulesCSS.js.map +1 -1
- 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 +3 -155
- package/lib/module/web/styleConversion/enrichedInputStyleToCSSProperties.js.map +1 -1
- package/lib/module/web/styleConversion/enrichedTextStyleToCSSProperties.js +44 -0
- package/lib/module/web/styleConversion/enrichedTextStyleToCSSProperties.js.map +1 -0
- package/lib/module/web/styleConversion/{enrichedInputThemingToCSSProperties.js → enrichedThemingToCSSProperties.js} +3 -3
- package/lib/module/web/styleConversion/enrichedThemingToCSSProperties.js.map +1 -0
- package/lib/module/web/styleConversion/htmlStyleToCSSVariables.js +87 -64
- package/lib/module/web/styleConversion/htmlStyleToCSSVariables.js.map +1 -1
- package/lib/module/web/styleConversion/inlineImageCSSVariables.js +7 -0
- package/lib/module/web/styleConversion/inlineImageCSSVariables.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 +1 -1
- package/lib/module/web/useOnChangeHtml.js.map +1 -1
- package/lib/module/web/useOnChangeState.js +6 -3
- package/lib/module/web/useOnChangeState.js.map +1 -1
- package/lib/module/web/useOnLinkDetected.js +32 -45
- package/lib/module/web/useOnLinkDetected.js.map +1 -1
- 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/src/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/native/EnrichedText.d.ts +1 -1
- package/lib/typescript/src/native/EnrichedText.d.ts.map +1 -1
- package/lib/typescript/src/native/EnrichedTextInput.d.ts +1 -1
- package/lib/typescript/src/native/EnrichedTextInput.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +1 -1
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/utils/expandMentionStylesForIndicators.d.ts +1 -1
- package/lib/typescript/src/utils/expandMentionStylesForIndicators.d.ts.map +1 -1
- package/lib/typescript/src/utils/normalizeHtmlStyle.d.ts.map +1 -1
- 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 +2 -2
- package/lib/typescript/src/web/EnrichedTextInput.d.ts.map +1 -1
- 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.map +1 -1
- package/lib/typescript/src/web/formats/EnrichedCheckboxList.d.ts.map +1 -1
- package/lib/typescript/src/web/formats/EnrichedCodeBlock.d.ts.map +1 -1
- package/lib/typescript/src/web/formats/EnrichedHeading.d.ts.map +1 -1
- package/lib/typescript/src/web/formats/EnrichedImageNodeView.d.ts +1 -1
- package/lib/typescript/src/web/formats/EnrichedImageNodeView.d.ts.map +1 -1
- package/lib/typescript/src/web/formats/EnrichedLink.d.ts +4 -1
- package/lib/typescript/src/web/formats/EnrichedLink.d.ts.map +1 -1
- package/lib/typescript/src/web/formats/EnrichedOrderedList.d.ts.map +1 -1
- 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/EnrichedUnorderedList.d.ts.map +1 -1
- package/lib/typescript/src/web/formats/applyWrappingListToSelection.d.ts.map +1 -1
- package/lib/typescript/src/web/formats/formatRules.d.ts +3 -1
- package/lib/typescript/src/web/formats/formatRules.d.ts.map +1 -1
- package/lib/typescript/src/web/formats/listKeyboard.d.ts.map +1 -1
- 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/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 +1 -1
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/index.d.ts.map +1 -1
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/makeMentionPluginState.d.ts.map +1 -1
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/setMention.d.ts.map +1 -1
- 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/ShortcutPlugin.d.ts.map +1 -1
- package/lib/typescript/src/web/pmPlugins/StrictMarksPlugin.d.ts.map +1 -1
- package/lib/typescript/src/web/pmPlugins/StripBoldInStyledHeadingsPlugin.d.ts +6 -1
- package/lib/typescript/src/web/pmPlugins/StripBoldInStyledHeadingsPlugin.d.ts.map +1 -1
- 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 +2 -2
- package/lib/typescript/src/web/styleConversion/buildMentionRulesCSS.d.ts.map +1 -1
- 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 +2 -5
- package/lib/typescript/src/web/styleConversion/enrichedInputStyleToCSSProperties.d.ts.map +1 -1
- 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/{enrichedInputThemingToCSSProperties.d.ts → enrichedThemingToCSSProperties.d.ts} +1 -1
- package/lib/typescript/src/web/styleConversion/enrichedThemingToCSSProperties.d.ts.map +1 -0
- package/lib/typescript/src/web/styleConversion/htmlStyleToCSSVariables.d.ts +5 -4
- package/lib/typescript/src/web/styleConversion/htmlStyleToCSSVariables.d.ts.map +1 -1
- 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/useImageErrorFallback.d.ts +3 -0
- package/lib/typescript/src/web/useImageErrorFallback.d.ts.map +1 -0
- package/lib/typescript/src/web/useOnChangeState.d.ts.map +1 -1
- package/lib/typescript/src/web/useOnLinkDetected.d.ts +2 -2
- package/lib/typescript/src/web/useOnLinkDetected.d.ts.map +1 -1
- 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 +54 -28
- package/src/index.tsx +1 -0
- package/src/types.ts +5 -3
- package/src/utils/expandMentionStylesForIndicators.ts +3 -3
- package/src/utils/normalizeHtmlStyle.ts +2 -1
- package/src/web/EnrichedText.css +343 -0
- package/src/web/EnrichedText.tsx +82 -0
- package/src/web/EnrichedTextInput.tsx +69 -55
- 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 +2 -1
- package/src/web/formats/EnrichedCheckboxList.ts +5 -2
- package/src/web/formats/EnrichedCodeBlock.ts +2 -1
- package/src/web/formats/EnrichedHeading.ts +2 -1
- package/src/web/formats/EnrichedImageNodeView.tsx +1 -3
- package/src/web/formats/EnrichedLink.ts +59 -4
- package/src/web/formats/EnrichedOrderedList.ts +5 -2
- package/src/web/formats/EnrichedTextAlign.ts +88 -0
- package/src/web/formats/EnrichedUnorderedList.ts +5 -2
- package/src/web/formats/applyWrappingListToSelection.ts +4 -4
- package/src/web/formats/formatRules.ts +48 -4
- package/src/web/formats/listKeyboard.ts +6 -1
- package/src/web/normalization/htmlNormalizer.ts +656 -0
- package/src/web/normalization/prepareHtmlForWeb.ts +93 -0
- package/src/web/{tiptapHtmlNormalizer.ts → normalization/tiptapHtmlNormalizer.ts} +12 -2
- 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 +1 -1
- package/src/web/pmPlugins/MentionPlugin/makeMentionPluginState.ts +32 -5
- package/src/web/pmPlugins/MentionPlugin/setMention.ts +19 -29
- package/src/web/pmPlugins/MentionPlugin/useMentionEvents.ts +114 -0
- package/src/web/pmPlugins/ShortcutPlugin.ts +7 -0
- package/src/web/pmPlugins/StrictMarksPlugin.ts +3 -0
- package/src/web/pmPlugins/StripBoldInStyledHeadingsPlugin.ts +41 -36
- package/src/web/sanitization/htmlSanitizer.ts +8 -0
- package/src/web/styleConversion/buildMentionRulesCSS.ts +30 -11
- package/src/web/styleConversion/enrichedBaseStyleToCSSProperties.ts +228 -0
- package/src/web/styleConversion/enrichedInputStyleToCSSProperties.ts +6 -217
- package/src/web/styleConversion/enrichedTextStyleToCSSProperties.ts +53 -0
- package/src/web/styleConversion/{enrichedInputThemingToCSSProperties.ts → enrichedThemingToCSSProperties.ts} +4 -4
- package/src/web/styleConversion/htmlStyleToCSSVariables.ts +121 -70
- package/src/web/styleConversion/inlineImageCSSVariables.ts +6 -0
- package/src/web/useImageErrorFallback.ts +37 -0
- package/src/web/useOnChangeHtml.ts +1 -1
- package/src/web/useOnChangeState.ts +7 -5
- package/src/web/useOnLinkDetected.ts +38 -50
- package/src/web/usePressInteractions.tsx +22 -0
- package/src/web/useStableRef.ts +12 -0
- package/lib/module/web/EnrichedTextInput.css +0 -201
- package/lib/module/web/checkboxHtmlNormalizer.js.map +0 -1
- package/lib/module/web/pmPlugins/MentionPlugin/subscribeMentionEvents.js +0 -100
- package/lib/module/web/pmPlugins/MentionPlugin/subscribeMentionEvents.js.map +0 -1
- package/lib/module/web/styleConversion/enrichedInputThemingToCSSProperties.js.map +0 -1
- package/lib/module/web/tiptapHtmlNormalizer.js.map +0 -1
- package/lib/typescript/src/web/checkboxHtmlNormalizer.d.ts.map +0 -1
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/subscribeMentionEvents.d.ts +0 -4
- package/lib/typescript/src/web/pmPlugins/MentionPlugin/subscribeMentionEvents.d.ts.map +0 -1
- package/lib/typescript/src/web/styleConversion/enrichedInputThemingToCSSProperties.d.ts.map +0 -1
- package/lib/typescript/src/web/tiptapHtmlNormalizer.d.ts +0 -3
- package/lib/typescript/src/web/tiptapHtmlNormalizer.d.ts.map +0 -1
- package/src/web/EnrichedTextInput.css +0 -201
- package/src/web/pmPlugins/MentionPlugin/subscribeMentionEvents.ts +0 -105
- /package/lib/module/web/{checkboxHtmlNormalizer.js → normalization/checkboxHtmlNormalizer.js} +0 -0
- /package/lib/typescript/src/web/{checkboxHtmlNormalizer.d.ts → normalization/checkboxHtmlNormalizer.d.ts} +0 -0
- /package/src/web/{checkboxHtmlNormalizer.ts → normalization/checkboxHtmlNormalizer.ts} +0 -0
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
#import "MentionParams.h"
|
|
5
5
|
#import "StyleBase.h"
|
|
6
6
|
|
|
7
|
+
@class EnrichedConfig;
|
|
8
|
+
|
|
7
9
|
@interface BoldStyle : StyleBase
|
|
8
10
|
@end
|
|
9
11
|
|
|
@@ -28,6 +30,8 @@
|
|
|
28
30
|
- (void)handleAutomaticLinks:(NSString *)word inRange:(NSRange)wordRange;
|
|
29
31
|
- (void)handleManualLinks:(NSString *)word inRange:(NSRange)wordRange;
|
|
30
32
|
- (void)applyLinkMetaWithData:(LinkData *)linkData range:(NSRange)range;
|
|
33
|
+
+ (BOOL)matchesLinkRegexWithConfig:(NSString *)url
|
|
34
|
+
config:(EnrichedConfig *)config;
|
|
31
35
|
@end
|
|
32
36
|
|
|
33
37
|
@interface MentionStyle : StyleBase
|
package/ios/styles/LinkStyle.mm
CHANGED
|
@@ -326,28 +326,10 @@ static NSString *const AutomaticLinkAttributeName = @"EnrichedAutomaticLink";
|
|
|
326
326
|
}
|
|
327
327
|
|
|
328
328
|
// all conditions are met; try matching the word to a proper regex
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
if (linkRegexConfig.isDefault) {
|
|
334
|
-
// use default regex
|
|
335
|
-
regexPassedUrl = [self tryMatchingDefaultLinkRegex:word
|
|
336
|
-
matchRange:matchingRange];
|
|
337
|
-
} else {
|
|
338
|
-
// use user defined regex if it exists
|
|
339
|
-
NSRegularExpression *userRegex = [self.host.config parsedLinkRegex];
|
|
340
|
-
|
|
341
|
-
if (userRegex == nullptr) {
|
|
342
|
-
// fallback to default regex
|
|
343
|
-
regexPassedUrl = [self tryMatchingDefaultLinkRegex:word
|
|
344
|
-
matchRange:matchingRange];
|
|
345
|
-
} else if ([userRegex numberOfMatchesInString:word
|
|
346
|
-
options:0
|
|
347
|
-
range:matchingRange]) {
|
|
348
|
-
regexPassedUrl = word;
|
|
349
|
-
}
|
|
350
|
-
}
|
|
329
|
+
NSString *regexPassedUrl =
|
|
330
|
+
[LinkStyle matchesLinkRegexWithConfig:word config:self.host.config]
|
|
331
|
+
? word
|
|
332
|
+
: nullptr;
|
|
351
333
|
|
|
352
334
|
if (regexPassedUrl != nullptr) {
|
|
353
335
|
// add style only if needed
|
|
@@ -378,21 +360,25 @@ static NSString *const AutomaticLinkAttributeName = @"EnrichedAutomaticLink";
|
|
|
378
360
|
}
|
|
379
361
|
}
|
|
380
362
|
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
363
|
+
+ (BOOL)matchesLinkRegexWithConfig:(NSString *)url
|
|
364
|
+
config:(EnrichedConfig *)config {
|
|
365
|
+
LinkRegexConfig *linkRegexConfig = [config linkRegexConfig];
|
|
366
|
+
if (linkRegexConfig == nullptr || linkRegexConfig.isDisabled) {
|
|
367
|
+
return NO;
|
|
368
|
+
}
|
|
369
|
+
NSRange range = NSMakeRange(0, url.length);
|
|
370
|
+
NSRegularExpression *userRegex = [config parsedLinkRegex];
|
|
371
|
+
if (linkRegexConfig.isDefault || userRegex == nullptr) {
|
|
372
|
+
return [[self fullRegex] numberOfMatchesInString:url
|
|
384
373
|
options:0
|
|
385
|
-
range:range] ||
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
[[LinkStyle bareRegex] numberOfMatchesInString:word
|
|
374
|
+
range:range] > 0 ||
|
|
375
|
+
[[self wwwRegex] numberOfMatchesInString:url options:0
|
|
376
|
+
range:range] > 0 ||
|
|
377
|
+
[[self bareRegex] numberOfMatchesInString:url
|
|
390
378
|
options:0
|
|
391
|
-
range:range]
|
|
392
|
-
return word;
|
|
379
|
+
range:range] > 0;
|
|
393
380
|
}
|
|
394
|
-
|
|
395
|
-
return nullptr;
|
|
381
|
+
return [userRegex numberOfMatchesInString:url options:0 range:range] > 0;
|
|
396
382
|
}
|
|
397
383
|
|
|
398
384
|
// handles refreshing manual links
|
|
@@ -13,6 +13,8 @@ static NSString *const MentionAttributeName = @"EnrichedMention";
|
|
|
13
13
|
NSValue *_activeMentionRange;
|
|
14
14
|
NSString *_activeMentionIndicator;
|
|
15
15
|
BOOL _blockMentionEditing;
|
|
16
|
+
NSString *_lastEmittedMentionIndicator;
|
|
17
|
+
NSString *_lastEmittedMentionText;
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
+ (StyleType)getType {
|
|
@@ -156,15 +158,38 @@ static NSString *const MentionAttributeName = @"EnrichedMention";
|
|
|
156
158
|
params.indicator = indicator;
|
|
157
159
|
params.attributes = attributes;
|
|
158
160
|
|
|
159
|
-
// add a single space after the mention
|
|
160
|
-
NSString *newText = [NSString stringWithFormat:@"%@ ", text];
|
|
161
161
|
NSRange rangeToBeReplaced = [_activeMentionRange rangeValue];
|
|
162
|
+
|
|
163
|
+
// add a single space after the mention if there isn't one already
|
|
164
|
+
BOOL hasSpaceAfter = NO;
|
|
165
|
+
NSUInteger nextCharIndex =
|
|
166
|
+
rangeToBeReplaced.location + rangeToBeReplaced.length;
|
|
167
|
+
|
|
168
|
+
if (nextCharIndex < self.host.textView.textStorage.string.length) {
|
|
169
|
+
unichar nextChar =
|
|
170
|
+
[self.host.textView.textStorage.string characterAtIndex:nextCharIndex];
|
|
171
|
+
if ([[NSCharacterSet whitespaceCharacterSet] characterIsMember:nextChar]) {
|
|
172
|
+
hasSpaceAfter = YES;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
NSString *newText =
|
|
177
|
+
hasSpaceAfter ? text : [NSString stringWithFormat:@"%@ ", text];
|
|
178
|
+
|
|
162
179
|
[TextInsertionUtils replaceText:newText
|
|
163
180
|
at:rangeToBeReplaced
|
|
164
181
|
additionalAttributes:nullptr
|
|
165
182
|
host:self.host
|
|
166
183
|
withSelection:YES];
|
|
167
184
|
|
|
185
|
+
// we always want the cursor to end up after the trailing space, so when we
|
|
186
|
+
// reused an existing space (and didn't insert our own) move it one to the
|
|
187
|
+
// right
|
|
188
|
+
if (hasSpaceAfter) {
|
|
189
|
+
NSRange selection = self.host.textView.selectedRange;
|
|
190
|
+
self.host.textView.selectedRange = NSMakeRange(selection.location + 1, 0);
|
|
191
|
+
}
|
|
192
|
+
|
|
168
193
|
// THEN, add the attributes to not apply them on the space
|
|
169
194
|
NSRange mentionRange = NSMakeRange(rangeToBeReplaced.location, text.length);
|
|
170
195
|
[self applyMentionMeta:params range:mentionRange];
|
|
@@ -522,9 +547,24 @@ static NSString *const MentionAttributeName = @"EnrichedMention";
|
|
|
522
547
|
[NSString stringWithFormat:@"%C", [text characterAtIndex:0]];
|
|
523
548
|
NSString *textString =
|
|
524
549
|
[text substringWithRange:NSMakeRange(1, text.length - 1)];
|
|
550
|
+
|
|
551
|
+
BOOL startMention = NO;
|
|
552
|
+
|
|
553
|
+
// switching directly to an active mention
|
|
554
|
+
if (![_activeMentionIndicator isEqualToString:indicatorString]) {
|
|
555
|
+
startMention = YES;
|
|
556
|
+
[self removeActiveMentionRange];
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
// explicit startMention event before changeMention event
|
|
560
|
+
if (startMention && textString.length > 0) {
|
|
561
|
+
[self emitOnMentionEvent:indicatorString text:@""];
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
[self emitOnMentionEvent:indicatorString text:textString];
|
|
565
|
+
|
|
525
566
|
_activeMentionIndicator = indicatorString;
|
|
526
567
|
_activeMentionRange = [NSValue valueWithRange:range];
|
|
527
|
-
[self.host emitOnMentionEvent:indicatorString text:textString];
|
|
528
568
|
}
|
|
529
569
|
|
|
530
570
|
// removes stored mention range + indicator, which means that we no longer edit
|
|
@@ -534,7 +574,18 @@ static NSString *const MentionAttributeName = @"EnrichedMention";
|
|
|
534
574
|
NSString *indicatorCopy = [_activeMentionIndicator copy];
|
|
535
575
|
_activeMentionIndicator = nullptr;
|
|
536
576
|
_activeMentionRange = nullptr;
|
|
537
|
-
[self
|
|
577
|
+
[self emitOnMentionEvent:indicatorCopy text:nullptr];
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
- (void)emitOnMentionEvent:(NSString *)indicator text:(NSString *)text {
|
|
582
|
+
BOOL sameText = (_lastEmittedMentionText == nullptr && text == nullptr) ||
|
|
583
|
+
[_lastEmittedMentionText isEqualToString:text];
|
|
584
|
+
|
|
585
|
+
if (![_lastEmittedMentionIndicator isEqualToString:indicator] || !sameText) {
|
|
586
|
+
[self.host emitOnMentionEvent:indicator text:text];
|
|
587
|
+
_lastEmittedMentionIndicator = indicator;
|
|
588
|
+
_lastEmittedMentionText = text;
|
|
538
589
|
}
|
|
539
590
|
}
|
|
540
591
|
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
NSArray *result = [HtmlParser getTextAndStylesFromHtml:normalized
|
|
34
|
+
NSArray *result = [HtmlParser getTextAndStylesFromHtml:normalized
|
|
35
|
+
config:nil];
|
|
35
36
|
NSString *plainText = result[0];
|
|
36
37
|
NSArray *processedStyles = result[1];
|
|
37
38
|
NSArray *alignments = result[2];
|
|
@@ -20,6 +20,13 @@
|
|
|
20
20
|
return NO;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
// Do not manually intervene if the user is in the middle of IME
|
|
24
|
+
// composition. Let the iOS system handle the backspace natively to prevent
|
|
25
|
+
// state desync.
|
|
26
|
+
if (typedInput->textView.markedTextRange != nullptr) {
|
|
27
|
+
return NO;
|
|
28
|
+
}
|
|
29
|
+
|
|
23
30
|
// we make sure it was a backspace (text with 0 length) and it deleted
|
|
24
31
|
// something (range longer than 0)
|
|
25
32
|
if (text.length > 0 || range.length == 0) {
|
package/lib/module/index.js
CHANGED
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["EnrichedTextInput"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,iBAAiB,QAAQ,4BAAyB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["EnrichedTextInput","EnrichedText"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,iBAAiB,QAAQ,4BAAyB;AAC3D,SAASC,YAAY,QAAQ,uBAAoB","ignoreList":[]}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { DEFAULT_HTML_STYLE } from "./defaultHtmlStyle.js";
|
|
4
3
|
import { isMentionStyleRecord } from "./isMentionStyleRecord.js";
|
|
5
|
-
export function expandMentionStylesForIndicators(mention, indicators) {
|
|
4
|
+
export function expandMentionStylesForIndicators(mention, indicators, htmlStyleToMergeWith) {
|
|
6
5
|
const out = {};
|
|
7
6
|
for (const indicator of indicators) {
|
|
8
7
|
out[indicator] = {
|
|
9
|
-
...
|
|
8
|
+
...htmlStyleToMergeWith.mention,
|
|
10
9
|
...(isMentionStyleRecord(mention) ? mention[indicator] ?? mention.default ?? {} : mention)
|
|
11
10
|
};
|
|
12
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
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":[]}
|
|
@@ -19,7 +19,7 @@ const parseOlStyles = style => {
|
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
21
|
const convertToHtmlStyleInternal = (style, mentionIndicators) => {
|
|
22
|
-
const mentionStyles = expandMentionStylesForIndicators(style.mention, mentionIndicators);
|
|
22
|
+
const mentionStyles = expandMentionStylesForIndicators(style.mention, mentionIndicators, DEFAULT_HTML_STYLE);
|
|
23
23
|
let markerFontWeight;
|
|
24
24
|
if (style.ol?.markerFontWeight) {
|
|
25
25
|
if (typeof style.ol?.markerFontWeight === 'number') {
|
|
@@ -1 +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":";;AAAA,SAA0BA,YAAY,QAAQ,cAAc;AAQ5D,SACEC,kBAAkB,EAClBC,2BAA2B,QACtB,uBAAoB;AAC3B,SAASC,gCAAgC,QAAQ,uCAAoC;AAErF,MAAMC,mBAAmB,GAAG,UAAU;AAEtC,MAAMC,aAAa,GAAIC,KAAgB,IAAK;EAC1C,IAAIC,gBAAoC;EACxC,IAAID,KAAK,CAACE,EAAE,EAAED,gBAAgB,EAAE;IAC9B,IAAI,OAAOD,KAAK,CAACE,EAAE,EAAED,gBAAgB,KAAK,QAAQ,EAAE;MAClDA,gBAAgB,GAAGE,MAAM,CAACH,KAAK,CAACE,EAAE,EAAED,gBAAgB,CAAC;IACvD,CAAC,MAAM,IAAI,OAAOD,KAAK,CAACE,EAAE,EAAED,gBAAgB,KAAK,QAAQ,EAAE;MACzDA,gBAAgB,GAAGD,KAAK,CAACE,EAAE,EAAED,gBAAgB;IAC/C;EACF;EAEA,OAAO;IACL,GAAGD,KAAK,CAACE,EAAE;IACXD,gBAAgB,EAAEA;EACpB,CAAC;AACH,CAAC;AAED,MAAMG,0BAA0B,GAAGA,CACjCJ,KAAgB,EAChBK,iBAA2B,KACL;EACtB,MAAMC,aAAa,GAAGT,gCAAgC,CACpDG,KAAK,CAACO,OAAO,EACbF,
|
|
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":";;AAAA,SAA0BA,YAAY,QAAQ,cAAc;AAQ5D,SACEC,kBAAkB,EAClBC,2BAA2B,QACtB,uBAAoB;AAC3B,SAASC,gCAAgC,QAAQ,uCAAoC;AAErF,MAAMC,mBAAmB,GAAG,UAAU;AAEtC,MAAMC,aAAa,GAAIC,KAAgB,IAAK;EAC1C,IAAIC,gBAAoC;EACxC,IAAID,KAAK,CAACE,EAAE,EAAED,gBAAgB,EAAE;IAC9B,IAAI,OAAOD,KAAK,CAACE,EAAE,EAAED,gBAAgB,KAAK,QAAQ,EAAE;MAClDA,gBAAgB,GAAGE,MAAM,CAACH,KAAK,CAACE,EAAE,EAAED,gBAAgB,CAAC;IACvD,CAAC,MAAM,IAAI,OAAOD,KAAK,CAACE,EAAE,EAAED,gBAAgB,KAAK,QAAQ,EAAE;MACzDA,gBAAgB,GAAGD,KAAK,CAACE,EAAE,EAAED,gBAAgB;IAC/C;EACF;EAEA,OAAO;IACL,GAAGD,KAAK,CAACE,EAAE;IACXD,gBAAgB,EAAEA;EACpB,CAAC;AACH,CAAC;AAED,MAAMG,0BAA0B,GAAGA,CACjCJ,KAAgB,EAChBK,iBAA2B,KACL;EACtB,MAAMC,aAAa,GAAGT,gCAAgC,CACpDG,KAAK,CAACO,OAAO,EACbF,iBAAiB,EACjBV,kBACF,CAAC;EAED,IAAIM,gBAAoC;EACxC,IAAID,KAAK,CAACE,EAAE,EAAED,gBAAgB,EAAE;IAC9B,IAAI,OAAOD,KAAK,CAACE,EAAE,EAAED,gBAAgB,KAAK,QAAQ,EAAE;MAClDA,gBAAgB,GAAGE,MAAM,CAACH,KAAK,CAACE,EA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ACF,CAAC,EAAE;UACDF,SAAS,CAACC,SAAS,CAAC,CAACE,SAAS,CAAC,GAAGX,UAAU,CAACW,SAAS,EAAEC,UAAU,CAAC;QACrE;MACF;MAEAR,UAAU,CAACC,OAAO,CAAC,GAAGG,SAAS;MAC/B;IACF;IAEA,KAAK,MAAM,CAACG,SAAS,EAAEC,UAAU,CAAC,IAAInB,MAAM,CAACc,OAAO,CAACD,QAAQ,CAAC,EAAE;MAC9DE,SAAS,CAACG,SAAS,CAAC,GAAGX,UAAU,CAACW,SAAS,EAAEC,UAAU,CAAC;IAC1D;IAEAR,UAAU,CAACC,OAAO,CAAC,GAAGG,SAAS;EACjC;EAEA,OAAOJ,UAAU;AACnB,CAAC;AAED,OAAO,MAAMS,kBAAkB,GAAGA,CAChCjC,KAAgB,EAChBK,iBAA2B,KACL;EACtB,MAAM6B,SAAS,GAAG9B,0BAA0B,CAACJ,KAAK,EAAEK,iBAAiB,CAAC;EACtE,MAAM8B,YAAY,GAAGlB,mBAAmB,CAACiB,SAAS,EAAEvC,kBAAkB,CAAC;EACvE,OAAO4B,WAAW,CAACY,YAAY,CAAC;AAClC,CAAC;AAED,OAAO,MAAMC,8BAA8B,GACzCpC,KAA4B,IACM;EAClC,MAAMkC,SAAS,GAAGzB,sCAAsC,CAACT,KAAK,CAAC;EAC/D,MAAMmC,YAAY,GAAGlB,mBAAmB,CACtCiB,SAAS,EACTtC,2BACF,CAAC;EACD,OAAO2B,WAAW,CAACY,YAAY,CAAC;AAClC,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
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { memo, useMemo, useRef } from 'react';
|
|
4
|
+
import './EnrichedText.css';
|
|
5
|
+
import { enrichedTextStyleToCSSProperties } from "./styleConversion/enrichedTextStyleToCSSProperties.js";
|
|
6
|
+
import { htmlStyleToCSSVariables, mergeWithDefaultEnrichedTextHtmlStyle } from "./styleConversion/htmlStyleToCSSVariables.js";
|
|
7
|
+
import { ENRICHED_TEXT_CLASSNAME } from "./constants/classNames.js";
|
|
8
|
+
import { enrichedInputThemingToCSSProperties } from "./styleConversion/enrichedThemingToCSSProperties.js";
|
|
9
|
+
import { buildMentionRulesCSS } from "./styleConversion/buildMentionRulesCSS.js";
|
|
10
|
+
import { sanitizeHtml } from "./sanitization/htmlSanitizer.js";
|
|
11
|
+
import { prepareHtmlForWeb } from "./normalization/prepareHtmlForWeb.js";
|
|
12
|
+
import { INLINE_IMAGE_CSS_VARIABLES } from "./styleConversion/inlineImageCSSVariables.js";
|
|
13
|
+
import { useImageErrorFallback } from "./useImageErrorFallback.js";
|
|
14
|
+
import { usePressInteractions } from "./usePressInteractions.js";
|
|
15
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
export const EnrichedText = /*#__PURE__*/memo(({
|
|
17
|
+
children,
|
|
18
|
+
htmlStyle,
|
|
19
|
+
style,
|
|
20
|
+
selectionColor
|
|
21
|
+
}) => {
|
|
22
|
+
const containerRef = useRef(null);
|
|
23
|
+
const sanitizedHtml = useMemo(() => sanitizeHtml(children), [children]);
|
|
24
|
+
const finalHtml = useMemo(() => prepareHtmlForWeb(sanitizedHtml), [sanitizedHtml]);
|
|
25
|
+
const resolvedHtmlStyle = useMemo(() => mergeWithDefaultEnrichedTextHtmlStyle(htmlStyle), [htmlStyle]);
|
|
26
|
+
const textStyle = useMemo(() => enrichedTextStyleToCSSProperties(style ?? {}), [style]);
|
|
27
|
+
const cssVars = useMemo(() => ({
|
|
28
|
+
...htmlStyleToCSSVariables(resolvedHtmlStyle),
|
|
29
|
+
...INLINE_IMAGE_CSS_VARIABLES
|
|
30
|
+
}), [resolvedHtmlStyle]);
|
|
31
|
+
const themingStyle = useMemo(() => enrichedInputThemingToCSSProperties({
|
|
32
|
+
selectionColor
|
|
33
|
+
}), [selectionColor]);
|
|
34
|
+
const mentionRulesCSS = useMemo(() => buildMentionRulesCSS(resolvedHtmlStyle), [resolvedHtmlStyle]);
|
|
35
|
+
const finalStyle = useMemo(() => ({
|
|
36
|
+
...textStyle,
|
|
37
|
+
...themingStyle,
|
|
38
|
+
...cssVars
|
|
39
|
+
}), [textStyle, themingStyle, cssVars]);
|
|
40
|
+
usePressInteractions(containerRef);
|
|
41
|
+
useImageErrorFallback(containerRef);
|
|
42
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
43
|
+
children: [mentionRulesCSS ? /*#__PURE__*/_jsx("style", {
|
|
44
|
+
children: mentionRulesCSS
|
|
45
|
+
}) : null, /*#__PURE__*/_jsx("div", {
|
|
46
|
+
ref: containerRef,
|
|
47
|
+
style: finalStyle,
|
|
48
|
+
className: ENRICHED_TEXT_CLASSNAME,
|
|
49
|
+
dangerouslySetInnerHTML: {
|
|
50
|
+
__html: finalHtml
|
|
51
|
+
}
|
|
52
|
+
})]
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=EnrichedText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["memo","useMemo","useRef","enrichedTextStyleToCSSProperties","htmlStyleToCSSVariables","mergeWithDefaultEnrichedTextHtmlStyle","ENRICHED_TEXT_CLASSNAME","enrichedInputThemingToCSSProperties","buildMentionRulesCSS","sanitizeHtml","prepareHtmlForWeb","INLINE_IMAGE_CSS_VARIABLES","useImageErrorFallback","usePressInteractions","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","EnrichedText","children","htmlStyle","style","selectionColor","containerRef","sanitizedHtml","finalHtml","resolvedHtmlStyle","textStyle","cssVars","themingStyle","mentionRulesCSS","finalStyle","ref","className","dangerouslySetInnerHTML","__html"],"sourceRoot":"../../../src","sources":["web/EnrichedText.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,OAAO,EAAEC,MAAM,QAA4B,OAAO;AAEjE,OAAO,oBAAoB;AAC3B,SAASC,gCAAgC,QAAQ,uDAAoD;AACrG,SACEC,uBAAuB,EACvBC,qCAAqC,QAChC,8CAA2C;AAClD,SAASC,uBAAuB,QAAQ,2BAAwB;AAChE,SAASC,mCAAmC,QAAQ,qDAAkD;AACtG,SAASC,oBAAoB,QAAQ,2CAAwC;AAC7E,SAASC,YAAY,QAAQ,iCAA8B;AAC3D,SAASC,iBAAiB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