react-native-enriched-markdown-scaffold 0.6.0-scaffold.8 → 0.7.4-scaffold.2

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.
Files changed (150) hide show
  1. package/ReactNativeEnrichedMarkdown.podspec +62 -11
  2. package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownManagerDelegate.java +3 -0
  3. package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownManagerInterface.java +1 -0
  4. package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownTextInputManagerDelegate.java +9 -0
  5. package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownTextInputManagerInterface.java +3 -0
  6. package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownTextManagerDelegate.java +3 -0
  7. package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownTextManagerInterface.java +1 -0
  8. package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/Props.cpp +20 -0
  9. package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/Props.h +744 -0
  10. package/android/src/main/baseline-prof.txt +75 -2
  11. package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdown.kt +62 -0
  12. package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownInternalText.kt +10 -2
  13. package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownManager.kt +10 -0
  14. package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownText.kt +9 -2
  15. package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownTextManager.kt +10 -0
  16. package/android/src/main/java/com/swmansion/enriched/markdown/accessibility/AccessibilityLabels.kt +15 -0
  17. package/android/src/main/java/com/swmansion/enriched/markdown/accessibility/MarkdownAccessibilityHelper.kt +44 -7
  18. package/android/src/main/java/com/swmansion/enriched/markdown/input/EnrichedMarkdownTextInputManager.kt +52 -0
  19. package/android/src/main/java/com/swmansion/enriched/markdown/input/EnrichedMarkdownTextInputView.kt +89 -11
  20. package/android/src/main/java/com/swmansion/enriched/markdown/input/formatting/FormattingStore.kt +19 -0
  21. package/android/src/main/java/com/swmansion/enriched/markdown/input/formatting/InputParser.kt +22 -3
  22. package/android/src/main/java/com/swmansion/enriched/markdown/input/formatting/InputRemend.kt +1 -0
  23. package/android/src/main/java/com/swmansion/enriched/markdown/input/layout/InputMeasurementStore.kt +7 -1
  24. package/android/src/main/java/com/swmansion/enriched/markdown/input/toolbar/InputContextMenu.kt +54 -13
  25. package/android/src/main/java/com/swmansion/enriched/markdown/parser/MarkdownASTNode.kt +17 -0
  26. package/android/src/main/java/com/swmansion/enriched/markdown/renderer/SpanStyleCache.kt +4 -4
  27. package/android/src/main/java/com/swmansion/enriched/markdown/utils/common/MarkdownViewManagerUtils.kt +30 -0
  28. package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/view/LinkEvents.kt +22 -0
  29. package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/view/SelectionActionMode.kt +36 -7
  30. package/android/src/main/java/com/swmansion/enriched/markdown/views/TableContainerView.kt +73 -3
  31. package/android/src/main/jni/CMakeLists.txt +15 -1
  32. package/android/src/math/java/com/swmansion/enriched/markdown/views/MathContainerView.kt +24 -2
  33. package/app.plugin.js +2 -1
  34. package/cpp/parser/MD4CParser.cpp +1 -1
  35. package/cpp/wasm/build.sh +9 -9
  36. package/docs/ACCESSIBILITY.md +172 -0
  37. package/docs/API_REFERENCE.md +948 -0
  38. package/docs/COPY_OPTIONS.md +127 -0
  39. package/docs/ELEMENTS_STRUCTURE.md +112 -0
  40. package/docs/IMAGE_CACHING.md +25 -0
  41. package/docs/INPUT.md +233 -0
  42. package/docs/LATEX_MATH.md +136 -0
  43. package/docs/MACOS.md +19 -0
  44. package/docs/MARKDOWN_STREAMING.md +36 -0
  45. package/docs/MENTIONS.md +97 -0
  46. package/docs/RTL.md +82 -0
  47. package/docs/STYLES.md +519 -0
  48. package/docs/TEXT.md +110 -0
  49. package/docs/WEB.md +49 -0
  50. package/ios/EnrichedMarkdown.mm +82 -25
  51. package/ios/EnrichedMarkdownText.mm +37 -5
  52. package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/Props.cpp +20 -0
  53. package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/Props.h +744 -0
  54. package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/RCTComponentViewHelpers.h +15 -0
  55. package/ios/input/ENRMFormattingStore.h +5 -0
  56. package/ios/input/ENRMFormattingStore.mm +34 -0
  57. package/ios/input/ENRMInputTextView.h +2 -0
  58. package/ios/input/ENRMInputTextView.mm +8 -17
  59. package/ios/input/ENRMMarkdownSerializer.mm +1 -1
  60. package/ios/input/EnrichedMarkdownTextInput+ContextMenu.mm +71 -53
  61. package/ios/input/EnrichedMarkdownTextInput+Internal.h +26 -0
  62. package/ios/input/EnrichedMarkdownTextInput.h +1 -0
  63. package/ios/input/EnrichedMarkdownTextInput.mm +230 -29
  64. package/ios/input/styles/ENRMBoldStyleHandler.mm +3 -2
  65. package/ios/input/styles/ENRMItalicStyleHandler.mm +3 -2
  66. package/ios/renderer/AttributedRenderer.m +51 -6
  67. package/ios/renderer/ENRMMathInlineRenderer.m +5 -1
  68. package/ios/styles/ENRMFontSlot.h +1 -1
  69. package/ios/utils/ENRMAccessibilityLabels.h +36 -0
  70. package/ios/utils/ENRMAccessibilityLabels.m +5 -0
  71. package/ios/utils/EditMenuUtils+macOS.m +4 -5
  72. package/ios/utils/EditMenuUtils.h +70 -0
  73. package/ios/utils/EditMenuUtils.m +14 -11
  74. package/ios/utils/LastElementUtils.h +39 -2
  75. package/ios/utils/MarkdownAccessibilityElementBuilder.h +18 -16
  76. package/ios/utils/MarkdownAccessibilityElementBuilder.m +64 -32
  77. package/ios/utils/ParagraphStyleUtils.m +21 -2
  78. package/ios/views/ENRMMathContainerView.h +8 -0
  79. package/ios/views/ENRMMathContainerView.m +7 -5
  80. package/ios/views/ENRMTableIOSGridView.h +40 -0
  81. package/ios/views/ENRMTableIOSGridView.m +216 -0
  82. package/ios/views/EnrichedMarkdownInternalText.h +2 -0
  83. package/ios/views/EnrichedMarkdownInternalText.m +2 -0
  84. package/ios/views/TableContainerView.h +8 -0
  85. package/ios/views/TableContainerView.m +72 -128
  86. package/lib/module/EnrichedMarkdownNativeComponent.ts +37 -0
  87. package/lib/module/EnrichedMarkdownTextInput.js +48 -1
  88. package/lib/module/EnrichedMarkdownTextInput.js.map +1 -1
  89. package/lib/module/EnrichedMarkdownTextInputNativeComponent.ts +35 -0
  90. package/lib/module/EnrichedMarkdownTextNativeComponent.ts +37 -0
  91. package/lib/module/accessibilityLabelDefaults.js +64 -0
  92. package/lib/module/accessibilityLabelDefaults.js.map +1 -0
  93. package/lib/module/index.js +1 -0
  94. package/lib/module/index.js.map +1 -1
  95. package/lib/module/native/EnrichedMarkdownText.js +72 -4
  96. package/lib/module/native/EnrichedMarkdownText.js.map +1 -1
  97. package/lib/module/normalizeMenuItem.js +38 -0
  98. package/lib/module/normalizeMenuItem.js.map +1 -0
  99. package/lib/module/types/AccessibilityLabels.js +2 -0
  100. package/lib/module/types/AccessibilityLabels.js.map +1 -0
  101. package/lib/typescript/src/EnrichedMarkdownNativeComponent.d.ts +34 -0
  102. package/lib/typescript/src/EnrichedMarkdownNativeComponent.d.ts.map +1 -1
  103. package/lib/typescript/src/EnrichedMarkdownTextInput.d.ts +55 -1
  104. package/lib/typescript/src/EnrichedMarkdownTextInput.d.ts.map +1 -1
  105. package/lib/typescript/src/EnrichedMarkdownTextInputNativeComponent.d.ts +30 -0
  106. package/lib/typescript/src/EnrichedMarkdownTextInputNativeComponent.d.ts.map +1 -1
  107. package/lib/typescript/src/EnrichedMarkdownTextNativeComponent.d.ts +34 -0
  108. package/lib/typescript/src/EnrichedMarkdownTextNativeComponent.d.ts.map +1 -1
  109. package/lib/typescript/src/accessibilityLabelDefaults.d.ts +16 -0
  110. package/lib/typescript/src/accessibilityLabelDefaults.d.ts.map +1 -0
  111. package/lib/typescript/src/index.d.ts +4 -2
  112. package/lib/typescript/src/index.d.ts.map +1 -1
  113. package/lib/typescript/src/native/EnrichedMarkdownText.d.ts +3 -3
  114. package/lib/typescript/src/native/EnrichedMarkdownText.d.ts.map +1 -1
  115. package/lib/typescript/src/normalizeMenuItem.d.ts +7 -0
  116. package/lib/typescript/src/normalizeMenuItem.d.ts.map +1 -0
  117. package/lib/typescript/src/types/AccessibilityLabels.d.ts +114 -0
  118. package/lib/typescript/src/types/AccessibilityLabels.d.ts.map +1 -0
  119. package/lib/typescript/src/types/MarkdownTextProps.d.ts +78 -9
  120. package/lib/typescript/src/types/MarkdownTextProps.d.ts.map +1 -1
  121. package/package.json +4 -2
  122. package/plugin/build/withAndroidMath.js +19 -0
  123. package/plugin/build/withIosMath.js +28 -0
  124. package/plugin/build/withReactNativeEnrichedMarkdown.js +11 -0
  125. package/plugin/tsconfig.build.json +16 -0
  126. package/src/EnrichedMarkdownNativeComponent.ts +37 -0
  127. package/src/EnrichedMarkdownTextInput.tsx +117 -1
  128. package/src/EnrichedMarkdownTextInputNativeComponent.ts +35 -0
  129. package/src/EnrichedMarkdownTextNativeComponent.ts +37 -0
  130. package/src/accessibilityLabelDefaults.ts +83 -0
  131. package/src/index.tsx +11 -0
  132. package/src/native/EnrichedMarkdownText.tsx +120 -6
  133. package/src/normalizeMenuItem.ts +52 -0
  134. package/src/types/AccessibilityLabels.ts +118 -0
  135. package/src/types/MarkdownTextProps.ts +74 -9
  136. package/lib/module/plugin/withAndroidMath.js +0 -20
  137. package/lib/module/plugin/withAndroidMath.js.map +0 -1
  138. package/lib/module/plugin/withIosMath.js +0 -23
  139. package/lib/module/plugin/withIosMath.js.map +0 -1
  140. package/lib/module/plugin/withReactNativeEnrichedMarkdown.js +0 -16
  141. package/lib/module/plugin/withReactNativeEnrichedMarkdown.js.map +0 -1
  142. package/lib/typescript/src/plugin/withAndroidMath.d.ts +0 -5
  143. package/lib/typescript/src/plugin/withAndroidMath.d.ts.map +0 -1
  144. package/lib/typescript/src/plugin/withIosMath.d.ts +0 -5
  145. package/lib/typescript/src/plugin/withIosMath.d.ts.map +0 -1
  146. package/lib/typescript/src/plugin/withReactNativeEnrichedMarkdown.d.ts +0 -6
  147. package/lib/typescript/src/plugin/withReactNativeEnrichedMarkdown.d.ts.map +0 -1
  148. /package/{src/plugin → plugin/src}/withAndroidMath.ts +0 -0
  149. /package/{src/plugin → plugin/src}/withIosMath.ts +0 -0
  150. /package/{src/plugin → plugin/src}/withReactNativeEnrichedMarkdown.ts +0 -0
@@ -2,6 +2,9 @@ require "json"
2
2
 
3
3
  package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
4
 
5
+ monorepo = File.exist?(File.expand_path("../core/EnrichedMarkdownCore.podspec", __dir__))
6
+ cpp_root = monorepo ? "$(PODS_TARGET_SRCROOT)/../core/cpp" : "$(PODS_TARGET_SRCROOT)/cpp"
7
+
5
8
  Pod::Spec.new do |s|
6
9
  s.name = "ReactNativeEnrichedMarkdown"
7
10
  s.version = package["version"]
@@ -13,13 +16,30 @@ Pod::Spec.new do |s|
13
16
  s.platforms = { :ios => min_ios_version_supported, :osx => '14.0' }
14
17
  s.source = { :git => "https://github.com/software-mansion/react-native-enriched-markdown.git", :tag => "#{s.version}" }
15
18
 
16
- s.private_header_files = "ios/**/*.h", "cpp/**/*.{h,hpp}"
19
+ if monorepo
20
+ s.private_header_files = "ios/**/*.h"
21
+ s.source_files = "ios/**/*.{h,m,mm,cpp,swift}"
22
+ s.dependency "EnrichedMarkdownCore"
23
+ else
24
+ s.private_header_files = "ios/**/*.h", "cpp/**/*.{h,hpp}"
25
+ s.source_files = "ios/**/*.{h,m,mm,cpp,swift}", "cpp/md4c/*.{c,h}", "cpp/parser/*.{hpp,cpp}"
26
+ end
17
27
 
18
28
  # To disable LaTeX math rendering (RaTeX, iOS only), add ENV['ENRICHED_MARKDOWN_ENABLE_MATH'] = '0' to your Podfile.
19
29
  # When math is enabled, consumers must use `use_frameworks! :linkage => :dynamic` (required for SPM interop).
20
30
  enable_math = ENV['ENRICHED_MARKDOWN_ENABLE_MATH'] != '0'
21
31
 
22
- s.source_files = "ios/**/*.{h,m,mm,cpp,swift}", "cpp/md4c/*.{c,h}", "cpp/parser/*.{hpp,cpp}"
32
+ # RaTeX is wired in through React Native's `spm_dependency` helper (SPM interop).
33
+ # On React Native versions that don't provide it, disable math entirely so the
34
+ # RaTeX-importing sources under ios/math are excluded from the build. Otherwise
35
+ # the failure would just move from `pod install` to a build-time
36
+ # "missing module 'RaTeX'" error.
37
+ if enable_math && !defined?(spm_dependency)
38
+ Pod::UI.warn '[ReactNativeEnrichedMarkdown] `spm_dependency` is unavailable in this ' \
39
+ 'React Native version; disabling LaTeX math (RaTeX). Upgrade React Native to enable it.'
40
+ enable_math = false
41
+ end
42
+
23
43
  unless enable_math
24
44
  s.exclude_files = "ios/math/**/*.swift"
25
45
  end
@@ -27,22 +47,39 @@ Pod::Spec.new do |s|
27
47
  preprocessor_defs = '$(inherited) MD4C_USE_UTF8=1'
28
48
  if enable_math
29
49
  preprocessor_defs += ' ENRICHED_MARKDOWN_MATH=1'
30
- if defined?(:spm_dependency)
31
- spm_dependency(s,
32
- url: 'https://github.com/erweixin/RaTeX.git',
33
- requirement: {kind: 'upToNextMajorVersion', minimumVersion: '0.1.9'},
34
- products: ['RaTeX']
35
- )
36
- end
50
+ spm_dependency(s,
51
+ url: 'https://github.com/erweixin/RaTeX.git',
52
+ requirement: {kind: 'upToNextMajorVersion', minimumVersion: '0.1.12'},
53
+ products: ['RaTeX']
54
+ )
37
55
  end
38
56
 
39
- s.pod_target_xcconfig = {
40
- 'HEADER_SEARCH_PATHS' => '"$(PODS_TARGET_SRCROOT)/cpp/md4c" "$(PODS_TARGET_SRCROOT)/cpp/parser" "$(PODS_TARGET_SRCROOT)/ios/internals" "$(PODS_TARGET_SRCROOT)/ios/input/internals"',
57
+ pod_xcconfig = {
58
+ 'HEADER_SEARCH_PATHS' => "\"#{cpp_root}/md4c\" \"#{cpp_root}/parser\" \"$(PODS_TARGET_SRCROOT)/ios/internals\" \"$(PODS_TARGET_SRCROOT)/ios/input/internals\"",
41
59
  'GCC_PREPROCESSOR_DEFINITIONS' => preprocessor_defs,
42
60
  'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17',
43
61
  'DEFINES_MODULE' => 'YES'
44
62
  }
45
63
 
64
+ # Detect Apple Silicon on the host running `pod install`. `sysctl hw.optional.arm64`
65
+ # reports the real hardware even under a Rosetta-translated Ruby, unlike `uname -m`.
66
+ apple_silicon = `sysctl -n hw.optional.arm64 2>/dev/null`.strip == '1'
67
+
68
+ if enable_math && apple_silicon
69
+ # RaTeX's Swift wrapper is compiled from SPM source, so its RaTeX.swiftmodule
70
+ # is emitted only for the arch(es) the build requests. Under ONLY_ACTIVE_ARCH
71
+ # on Apple Silicon that is arm64 only, but universal simulator builds (archive,
72
+ # "Any iOS Simulator Device", Release) also compile this pod for x86_64 and then
73
+ # fail with "could not find module 'RaTeX' for target 'x86_64-apple-ios-simulator'".
74
+ # Excluding x86_64 for the simulator keeps the pod and the app target arch sets in
75
+ # sync. Guarded to Apple Silicon so Intel Macs (which build x86_64 simulator slices)
76
+ # are unaffected; `$(inherited)` preserves exclusions from the user project / other pods.
77
+ pod_xcconfig['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = '$(inherited) x86_64'
78
+ s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => '$(inherited) x86_64' }
79
+ end
80
+
81
+ s.pod_target_xcconfig = pod_xcconfig
82
+
46
83
  if enable_math
47
84
  # React Native's spm_dependency generates a module.modulemap at
48
85
  # ${BUILT_PRODUCTS_DIR}/include/ that re-declares RaTeXFFI, but the RaTeX
@@ -59,6 +96,20 @@ Pod::Spec.new do |s|
59
96
  sed -i '' -E '/^(framework )?module RaTeXFFI /,/^\}/d' "$MODULEMAP"
60
97
  SCRIPT
61
98
  execution_position: :before_compile
99
+ },
100
+ {
101
+ name: 'Dedupe RaTeX XCFramework Signature',
102
+ script: <<~'SCRIPT',
103
+ # Xcode 26 generates a .signature file for each signed XCFramework.
104
+ # When the RaTeX XCFramework is consumed via spm_dependency inside a
105
+ # CocoaPods target, both the SPM product and the pod target produce a
106
+ # copy. During archive assembly Xcode copies all signatures into a flat
107
+ # Signatures/ directory, and the second copy collides with the first.
108
+ # Removing the pod-target copy prevents the collision. This is a no-op
109
+ # on older Xcode versions or simulator builds where the file is absent.
110
+ rm -f "${CONFIGURATION_BUILD_DIR}/RaTeX.xcframework-ios.signature"
111
+ SCRIPT
112
+ execution_position: :after_compile
62
113
  }
63
114
  ]
64
115
  end
@@ -71,6 +71,9 @@ public class EnrichedMarkdownManagerDelegate<T extends View, U extends BaseViewM
71
71
  case "selectionMenuConfig":
72
72
  mViewManager.setSelectionMenuConfig(view, (ReadableMap) value);
73
73
  break;
74
+ case "accessibilityLabels":
75
+ mViewManager.setAccessibilityLabels(view, (ReadableMap) value);
76
+ break;
74
77
  case "textBreakStrategy":
75
78
  mViewManager.setTextBreakStrategy(view, value == null ? "highQuality" : (String) value);
76
79
  break;
@@ -31,6 +31,7 @@ public interface EnrichedMarkdownManagerInterface<T extends View> extends ViewMa
31
31
  void setSpoilerOverlay(T view, @Nullable String value);
32
32
  void setContextMenuItems(T view, @Nullable ReadableArray value);
33
33
  void setSelectionMenuConfig(T view, @Nullable ReadableMap value);
34
+ void setAccessibilityLabels(T view, @Nullable ReadableMap value);
34
35
  void setTextBreakStrategy(T view, @Nullable String value);
35
36
  void setLineBreakStrategyIOS(T view, @Nullable String value);
36
37
  void setWritingDirection(T view, @Nullable String value);
@@ -80,6 +80,12 @@ public class EnrichedMarkdownTextInputManagerDelegate<T extends View, U extends
80
80
  case "contextMenuItems":
81
81
  mViewManager.setContextMenuItems(view, (ReadableArray) value);
82
82
  break;
83
+ case "selectionMenuConfig":
84
+ mViewManager.setSelectionMenuConfig(view, (ReadableMap) value);
85
+ break;
86
+ case "formatMenuConfig":
87
+ mViewManager.setFormatMenuConfig(view, (ReadableMap) value);
88
+ break;
83
89
  case "linkRegex":
84
90
  mViewManager.setLinkRegex(view, (ReadableMap) value);
85
91
  break;
@@ -148,6 +154,9 @@ public class EnrichedMarkdownTextInputManagerDelegate<T extends View, U extends
148
154
  case "removeMath":
149
155
  mViewManager.removeMath(view, args.getInt(0));
150
156
  break;
157
+ case "copyToClipboard":
158
+ mViewManager.copyToClipboard(view);
159
+ break;
151
160
  case "requestMarkdown":
152
161
  mViewManager.requestMarkdown(view, args.getInt(0));
153
162
  break;
@@ -34,6 +34,8 @@ public interface EnrichedMarkdownTextInputManagerInterface<T extends View> exten
34
34
  void setFontWeight(T view, @Nullable String value);
35
35
  void setIsOnChangeMarkdownSet(T view, boolean value);
36
36
  void setContextMenuItems(T view, @Nullable ReadableArray value);
37
+ void setSelectionMenuConfig(T view, @Nullable ReadableMap value);
38
+ void setFormatMenuConfig(T view, @Nullable ReadableMap value);
37
39
  void setLinkRegex(T view, @Nullable ReadableMap value);
38
40
  void setMentionIndicators(T view, @Nullable ReadableArray value);
39
41
  void setWritingDirection(T view, @Nullable String value);
@@ -54,6 +56,7 @@ public interface EnrichedMarkdownTextInputManagerInterface<T extends View> exten
54
56
  void insertMath(T view, String latex, boolean displayMode);
55
57
  void updateMath(T view, int start, String latex, boolean displayMode);
56
58
  void removeMath(T view, int start);
59
+ void copyToClipboard(T view);
57
60
  void requestMarkdown(T view, int requestId);
58
61
  void requestCaretRect(T view, int requestId);
59
62
  }
@@ -71,6 +71,9 @@ public class EnrichedMarkdownTextManagerDelegate<T extends View, U extends BaseV
71
71
  case "selectionMenuConfig":
72
72
  mViewManager.setSelectionMenuConfig(view, (ReadableMap) value);
73
73
  break;
74
+ case "accessibilityLabels":
75
+ mViewManager.setAccessibilityLabels(view, (ReadableMap) value);
76
+ break;
74
77
  case "textBreakStrategy":
75
78
  mViewManager.setTextBreakStrategy(view, value == null ? "highQuality" : (String) value);
76
79
  break;
@@ -31,6 +31,7 @@ public interface EnrichedMarkdownTextManagerInterface<T extends View> extends Vi
31
31
  void setSpoilerOverlay(T view, @Nullable String value);
32
32
  void setContextMenuItems(T view, @Nullable ReadableArray value);
33
33
  void setSelectionMenuConfig(T view, @Nullable ReadableMap value);
34
+ void setAccessibilityLabels(T view, @Nullable ReadableMap value);
34
35
  void setTextBreakStrategy(T view, @Nullable String value);
35
36
  void setLineBreakStrategyIOS(T view, @Nullable String value);
36
37
  void setWritingDirection(T view, @Nullable String value);
@@ -34,6 +34,7 @@ EnrichedMarkdownProps::EnrichedMarkdownProps(
34
34
  spoilerOverlay(convertRawProp(context, rawProps, "spoilerOverlay", sourceProps.spoilerOverlay, {std::string{"particles"}})),
35
35
  contextMenuItems(convertRawProp(context, rawProps, "contextMenuItems", sourceProps.contextMenuItems, {})),
36
36
  selectionMenuConfig(convertRawProp(context, rawProps, "selectionMenuConfig", sourceProps.selectionMenuConfig, {})),
37
+ accessibilityLabels(convertRawProp(context, rawProps, "accessibilityLabels", sourceProps.accessibilityLabels, {})),
37
38
  textBreakStrategy(convertRawProp(context, rawProps, "textBreakStrategy", sourceProps.textBreakStrategy, {std::string{"highQuality"}})),
38
39
  lineBreakStrategyIOS(convertRawProp(context, rawProps, "lineBreakStrategyIOS", sourceProps.lineBreakStrategyIOS, {std::string{"none"}})),
39
40
  writingDirection(convertRawProp(context, rawProps, "writingDirection", sourceProps.writingDirection, {std::string{"first-strong"}})) {}
@@ -114,6 +115,10 @@ folly::dynamic EnrichedMarkdownProps::getDiffProps(
114
115
  result["selectionMenuConfig"] = toDynamic(selectionMenuConfig);
115
116
  }
116
117
 
118
+ if (accessibilityLabels != oldProps->accessibilityLabels) {
119
+ result["accessibilityLabels"] = toDynamic(accessibilityLabels);
120
+ }
121
+
117
122
  if (textBreakStrategy != oldProps->textBreakStrategy) {
118
123
  result["textBreakStrategy"] = textBreakStrategy;
119
124
  }
@@ -151,6 +156,8 @@ EnrichedMarkdownTextInputProps::EnrichedMarkdownTextInputProps(
151
156
  fontWeight(convertRawProp(context, rawProps, "fontWeight", sourceProps.fontWeight, {})),
152
157
  isOnChangeMarkdownSet(convertRawProp(context, rawProps, "isOnChangeMarkdownSet", sourceProps.isOnChangeMarkdownSet, {false})),
153
158
  contextMenuItems(convertRawProp(context, rawProps, "contextMenuItems", sourceProps.contextMenuItems, {})),
159
+ selectionMenuConfig(convertRawProp(context, rawProps, "selectionMenuConfig", sourceProps.selectionMenuConfig, {})),
160
+ formatMenuConfig(convertRawProp(context, rawProps, "formatMenuConfig", sourceProps.formatMenuConfig, {})),
154
161
  linkRegex(convertRawProp(context, rawProps, "linkRegex", sourceProps.linkRegex, {})),
155
162
  mentionIndicators(convertRawProp(context, rawProps, "mentionIndicators", sourceProps.mentionIndicators, {})),
156
163
  writingDirection(convertRawProp(context, rawProps, "writingDirection", sourceProps.writingDirection, {std::string{"first-strong"}})) {}
@@ -243,6 +250,14 @@ folly::dynamic EnrichedMarkdownTextInputProps::getDiffProps(
243
250
  result["contextMenuItems"] = toDynamic(contextMenuItems);
244
251
  }
245
252
 
253
+ if (selectionMenuConfig != oldProps->selectionMenuConfig) {
254
+ result["selectionMenuConfig"] = toDynamic(selectionMenuConfig);
255
+ }
256
+
257
+ if (formatMenuConfig != oldProps->formatMenuConfig) {
258
+ result["formatMenuConfig"] = toDynamic(formatMenuConfig);
259
+ }
260
+
246
261
  if (linkRegex != oldProps->linkRegex) {
247
262
  result["linkRegex"] = toDynamic(linkRegex);
248
263
  }
@@ -277,6 +292,7 @@ EnrichedMarkdownTextProps::EnrichedMarkdownTextProps(
277
292
  spoilerOverlay(convertRawProp(context, rawProps, "spoilerOverlay", sourceProps.spoilerOverlay, {std::string{"particles"}})),
278
293
  contextMenuItems(convertRawProp(context, rawProps, "contextMenuItems", sourceProps.contextMenuItems, {})),
279
294
  selectionMenuConfig(convertRawProp(context, rawProps, "selectionMenuConfig", sourceProps.selectionMenuConfig, {})),
295
+ accessibilityLabels(convertRawProp(context, rawProps, "accessibilityLabels", sourceProps.accessibilityLabels, {})),
280
296
  textBreakStrategy(convertRawProp(context, rawProps, "textBreakStrategy", sourceProps.textBreakStrategy, {std::string{"highQuality"}})),
281
297
  lineBreakStrategyIOS(convertRawProp(context, rawProps, "lineBreakStrategyIOS", sourceProps.lineBreakStrategyIOS, {std::string{"none"}})),
282
298
  writingDirection(convertRawProp(context, rawProps, "writingDirection", sourceProps.writingDirection, {std::string{"first-strong"}})) {}
@@ -357,6 +373,10 @@ folly::dynamic EnrichedMarkdownTextProps::getDiffProps(
357
373
  result["selectionMenuConfig"] = toDynamic(selectionMenuConfig);
358
374
  }
359
375
 
376
+ if (accessibilityLabels != oldProps->accessibilityLabels) {
377
+ result["accessibilityLabels"] = toDynamic(accessibilityLabels);
378
+ }
379
+
360
380
  if (textBreakStrategy != oldProps->textBreakStrategy) {
361
381
  result["textBreakStrategy"] = textBreakStrategy;
362
382
  }