react-native-enriched-markdown-scaffold 0.6.0-scaffold.8 → 0.7.4-scaffold.10
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/ReactNativeEnrichedMarkdown.podspec +62 -11
- package/android/build.gradle +5 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownManagerDelegate.java +3 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownManagerInterface.java +1 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownTextInputManagerDelegate.java +12 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownTextInputManagerInterface.java +4 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownTextManagerDelegate.java +3 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownTextManagerInterface.java +1 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/Props.cpp +25 -0
- package/android/generated/jni/react/renderer/components/EnrichedMarkdownTextSpec/Props.h +793 -0
- package/android/src/main/baseline-prof.txt +75 -2
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdown.kt +62 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownInternalText.kt +10 -2
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownManager.kt +10 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownText.kt +9 -2
- package/android/src/main/java/com/swmansion/enriched/markdown/EnrichedMarkdownTextManager.kt +10 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/MeasurementStore.kt +6 -4
- package/android/src/main/java/com/swmansion/enriched/markdown/accessibility/AccessibilityLabels.kt +15 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/accessibility/MarkdownAccessibilityHelper.kt +44 -7
- package/android/src/main/java/com/swmansion/enriched/markdown/input/EnrichedMarkdownTextInputManager.kt +72 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/EnrichedMarkdownTextInputView.kt +110 -12
- package/android/src/main/java/com/swmansion/enriched/markdown/input/formatting/BlockSyntaxSentinel.kt +69 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/formatting/FormattingStore.kt +19 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/formatting/InputParser.kt +84 -6
- package/android/src/main/java/com/swmansion/enriched/markdown/input/formatting/InputRemend.kt +1 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/layout/InputLayoutManager.kt +30 -2
- package/android/src/main/java/com/swmansion/enriched/markdown/input/layout/InputMeasurementStore.kt +13 -2
- package/android/src/main/java/com/swmansion/enriched/markdown/input/model/MathChipStyle.kt +3 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/input/toolbar/InputContextMenu.kt +54 -13
- package/android/src/main/java/com/swmansion/enriched/markdown/parser/MarkdownASTNode.kt +17 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/HeadingRenderer.kt +1 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/renderer/SpanStyleCache.kt +4 -4
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/HeadingSpan.kt +8 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/spans/LineHeightSpan.kt +27 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/InlineMathStyle.kt +5 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/MathFontWeight.kt +25 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/styles/MathStyle.kt +12 -1
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/common/MarkdownViewManagerUtils.kt +37 -7
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/input/MarkdownStyleParser.kt +10 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/extensions/SpannableExtensions.kt +12 -4
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/view/LinkEvents.kt +22 -0
- package/android/src/main/java/com/swmansion/enriched/markdown/utils/text/view/SelectionActionMode.kt +36 -7
- package/android/src/main/java/com/swmansion/enriched/markdown/views/TableContainerView.kt +74 -4
- package/android/src/main/jni/CMakeLists.txt +15 -1
- package/android/src/math/java/com/swmansion/enriched/markdown/renderer/MathInlineRenderer.kt +2 -0
- package/android/src/math/java/com/swmansion/enriched/markdown/spans/MathChipSpan.kt +1 -1
- package/android/src/math/java/com/swmansion/enriched/markdown/spans/MathInlinePlaceholderSpan.kt +7 -3
- package/android/src/math/java/com/swmansion/enriched/markdown/spans/MathInlineSpan.kt +8 -5
- package/android/src/math/java/com/swmansion/enriched/markdown/spans/MathTypeface.kt +30 -0
- package/android/src/math/java/com/swmansion/enriched/markdown/views/MathContainerView.kt +27 -3
- package/app.plugin.js +2 -1
- package/cpp/parser/MD4CParser.cpp +1 -1
- package/cpp/wasm/build.sh +9 -9
- package/docs/ACCESSIBILITY.md +172 -0
- package/docs/API_REFERENCE.md +957 -0
- package/docs/COPY_OPTIONS.md +127 -0
- package/docs/ELEMENTS_STRUCTURE.md +112 -0
- package/docs/IMAGE_CACHING.md +25 -0
- package/docs/INPUT.md +281 -0
- package/docs/LATEX_MATH.md +198 -0
- package/docs/MACOS.md +19 -0
- package/docs/MARKDOWN_STREAMING.md +36 -0
- package/docs/MENTIONS.md +97 -0
- package/docs/RTL.md +82 -0
- package/docs/STYLES.md +522 -0
- package/docs/TEXT.md +110 -0
- package/docs/WEB.md +49 -0
- package/ios/EnrichedMarkdown.mm +126 -37
- package/ios/EnrichedMarkdownText.mm +84 -16
- package/ios/attachments/ENRMMathInlineAttachment+macOS.m +5 -1
- package/ios/attachments/ENRMMathInlineAttachment.h +3 -0
- package/ios/attachments/ENRMMathInlineAttachment.m +2 -1
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/Props.cpp +25 -0
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/Props.h +793 -0
- package/ios/generated/ReactCodegen/EnrichedMarkdownTextSpec/RCTComponentViewHelpers.h +15 -0
- package/ios/input/ENRMBlockSyntaxSentinel.h +25 -0
- package/ios/input/ENRMBlockSyntaxSentinel.mm +80 -0
- package/ios/input/ENRMFormattingStore.h +5 -0
- package/ios/input/ENRMFormattingStore.mm +34 -0
- package/ios/input/ENRMInputFormatter.h +4 -0
- package/ios/input/ENRMInputFormatter.mm +2 -0
- package/ios/input/ENRMInputParser.h +5 -0
- package/ios/input/ENRMInputParser.mm +79 -6
- package/ios/input/ENRMInputTextView.h +2 -0
- package/ios/input/ENRMInputTextView.mm +8 -17
- package/ios/input/ENRMMarkdownSerializer.mm +1 -1
- package/ios/input/EnrichedMarkdownTextInput+ContextMenu.mm +71 -53
- package/ios/input/EnrichedMarkdownTextInput+Internal.h +26 -0
- package/ios/input/EnrichedMarkdownTextInput.h +1 -0
- package/ios/input/EnrichedMarkdownTextInput.mm +249 -31
- package/ios/input/InputStylePropsUtils.h +13 -0
- package/ios/input/styles/ENRMBoldStyleHandler.mm +3 -2
- package/ios/input/styles/ENRMItalicStyleHandler.mm +3 -2
- package/ios/internals/MeasurementCache.h +1 -0
- package/ios/math/ENRMRaTeXBridge.swift +52 -3
- package/ios/parser/ENRMMarkdownParser.h +8 -0
- package/ios/parser/ENRMMarkdownParser.mm +11 -0
- package/ios/renderer/AttributedRenderer.m +51 -6
- package/ios/renderer/ENRMMathInlineRenderer.m +8 -1
- package/ios/renderer/ListItemRenderer.m +8 -5
- package/ios/styles/ENRMFontSlot.h +1 -1
- package/ios/styles/StyleConfig.h +6 -0
- package/ios/styles/StyleConfig.mm +36 -0
- package/ios/utils/ENRMAccessibilityLabels.h +36 -0
- package/ios/utils/ENRMAccessibilityLabels.m +5 -0
- package/ios/utils/ENRMMathFontWeight.h +18 -0
- package/ios/utils/EditMenuUtils+macOS.m +4 -5
- package/ios/utils/EditMenuUtils.h +70 -0
- package/ios/utils/EditMenuUtils.m +14 -11
- package/ios/utils/LastElementUtils.h +39 -2
- package/ios/utils/MarkdownAccessibilityElementBuilder.h +18 -16
- package/ios/utils/MarkdownAccessibilityElementBuilder.m +64 -32
- package/ios/utils/ParagraphStyleUtils.m +21 -2
- package/ios/utils/StylePropsUtils.h +21 -0
- package/ios/views/ENRMMathContainerView.h +8 -0
- package/ios/views/ENRMMathContainerView.m +10 -6
- package/ios/views/ENRMTableIOSGridView.h +40 -0
- package/ios/views/ENRMTableIOSGridView.m +216 -0
- package/ios/views/EnrichedMarkdownInternalText.h +2 -0
- package/ios/views/EnrichedMarkdownInternalText.m +2 -0
- package/ios/views/TableContainerView.h +8 -0
- package/ios/views/TableContainerView.m +72 -128
- package/lib/module/EnrichedMarkdownNativeComponent.ts +40 -0
- package/lib/module/EnrichedMarkdownTextInput.js +50 -1
- package/lib/module/EnrichedMarkdownTextInput.js.map +1 -1
- package/lib/module/EnrichedMarkdownTextInputNativeComponent.ts +47 -0
- package/lib/module/EnrichedMarkdownTextNativeComponent.ts +40 -0
- package/lib/module/accessibilityLabelDefaults.js +64 -0
- package/lib/module/accessibilityLabelDefaults.js.map +1 -0
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/native/EnrichedMarkdownText.js +72 -4
- package/lib/module/native/EnrichedMarkdownText.js.map +1 -1
- package/lib/module/normalizeMarkdownStyle.js +5 -2
- package/lib/module/normalizeMarkdownStyle.js.map +1 -1
- package/lib/module/normalizeMarkdownStyle.web.js +5 -2
- package/lib/module/normalizeMarkdownStyle.web.js.map +1 -1
- package/lib/module/normalizeMarkdownTextInputStyle.js +7 -3
- package/lib/module/normalizeMarkdownTextInputStyle.js.map +1 -1
- package/lib/module/normalizeMenuItem.js +38 -0
- package/lib/module/normalizeMenuItem.js.map +1 -0
- package/lib/module/types/AccessibilityLabels.js +2 -0
- package/lib/module/types/AccessibilityLabels.js.map +1 -0
- package/lib/module/web/globalStyles.js +8 -1
- package/lib/module/web/globalStyles.js.map +1 -1
- package/lib/module/web/styles.js +3 -1
- package/lib/module/web/styles.js.map +1 -1
- package/lib/typescript/src/EnrichedMarkdownNativeComponent.d.ts +37 -0
- package/lib/typescript/src/EnrichedMarkdownNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/EnrichedMarkdownTextInput.d.ts +57 -1
- package/lib/typescript/src/EnrichedMarkdownTextInput.d.ts.map +1 -1
- package/lib/typescript/src/EnrichedMarkdownTextInputNativeComponent.d.ts +42 -0
- package/lib/typescript/src/EnrichedMarkdownTextInputNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/EnrichedMarkdownTextNativeComponent.d.ts +37 -0
- package/lib/typescript/src/EnrichedMarkdownTextNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/accessibilityLabelDefaults.d.ts +16 -0
- package/lib/typescript/src/accessibilityLabelDefaults.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +4 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/native/EnrichedMarkdownText.d.ts +3 -3
- package/lib/typescript/src/native/EnrichedMarkdownText.d.ts.map +1 -1
- package/lib/typescript/src/normalizeMarkdownStyle.d.ts.map +1 -1
- package/lib/typescript/src/normalizeMarkdownStyle.web.d.ts.map +1 -1
- package/lib/typescript/src/normalizeMarkdownTextInputStyle.d.ts +1 -0
- package/lib/typescript/src/normalizeMarkdownTextInputStyle.d.ts.map +1 -1
- package/lib/typescript/src/normalizeMenuItem.d.ts +7 -0
- package/lib/typescript/src/normalizeMenuItem.d.ts.map +1 -0
- package/lib/typescript/src/types/AccessibilityLabels.d.ts +114 -0
- package/lib/typescript/src/types/AccessibilityLabels.d.ts.map +1 -0
- package/lib/typescript/src/types/MarkdownStyle.d.ts +32 -0
- package/lib/typescript/src/types/MarkdownStyle.d.ts.map +1 -1
- package/lib/typescript/src/types/MarkdownStyleInternal.d.ts +3 -0
- package/lib/typescript/src/types/MarkdownStyleInternal.d.ts.map +1 -1
- package/lib/typescript/src/types/MarkdownTextProps.d.ts +78 -9
- package/lib/typescript/src/types/MarkdownTextProps.d.ts.map +1 -1
- package/lib/typescript/src/web/styles.d.ts.map +1 -1
- package/package.json +4 -2
- package/plugin/build/withAndroidMath.js +19 -0
- package/plugin/build/withIosMath.js +28 -0
- package/plugin/build/withReactNativeEnrichedMarkdown.js +11 -0
- package/plugin/tsconfig.build.json +16 -0
- package/src/EnrichedMarkdownNativeComponent.ts +40 -0
- package/src/EnrichedMarkdownTextInput.tsx +121 -1
- package/src/EnrichedMarkdownTextInputNativeComponent.ts +47 -0
- package/src/EnrichedMarkdownTextNativeComponent.ts +40 -0
- package/src/accessibilityLabelDefaults.ts +83 -0
- package/src/index.tsx +11 -0
- package/src/native/EnrichedMarkdownText.tsx +120 -6
- package/src/normalizeMarkdownStyle.ts +6 -1
- package/src/normalizeMarkdownStyle.web.ts +6 -1
- package/src/normalizeMarkdownTextInputStyle.ts +5 -0
- package/src/normalizeMenuItem.ts +52 -0
- package/src/types/AccessibilityLabels.ts +118 -0
- package/src/types/MarkdownStyle.ts +32 -0
- package/src/types/MarkdownStyleInternal.ts +3 -0
- package/src/types/MarkdownTextProps.ts +74 -9
- package/src/web/globalStyles.ts +7 -0
- package/src/web/styles.ts +5 -1
- package/lib/module/plugin/withAndroidMath.js +0 -20
- package/lib/module/plugin/withAndroidMath.js.map +0 -1
- package/lib/module/plugin/withIosMath.js +0 -23
- package/lib/module/plugin/withIosMath.js.map +0 -1
- package/lib/module/plugin/withReactNativeEnrichedMarkdown.js +0 -16
- package/lib/module/plugin/withReactNativeEnrichedMarkdown.js.map +0 -1
- package/lib/typescript/src/plugin/withAndroidMath.d.ts +0 -5
- package/lib/typescript/src/plugin/withAndroidMath.d.ts.map +0 -1
- package/lib/typescript/src/plugin/withIosMath.d.ts +0 -5
- package/lib/typescript/src/plugin/withIosMath.d.ts.map +0 -1
- package/lib/typescript/src/plugin/withReactNativeEnrichedMarkdown.d.ts +0 -6
- package/lib/typescript/src/plugin/withReactNativeEnrichedMarkdown.d.ts.map +0 -1
- /package/{src/plugin → plugin/src}/withAndroidMath.ts +0 -0
- /package/{src/plugin → plugin/src}/withIosMath.ts +0 -0
- /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
|
-
|
|
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
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
40
|
-
'HEADER_SEARCH_PATHS' =>
|
|
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
|
package/android/build.gradle
CHANGED
|
@@ -67,6 +67,10 @@ android {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
+
|
|
71
|
+
testOptions {
|
|
72
|
+
unitTests.includeAndroidResources = true
|
|
73
|
+
}
|
|
70
74
|
}
|
|
71
75
|
|
|
72
76
|
repositories {
|
|
@@ -85,6 +89,7 @@ dependencies {
|
|
|
85
89
|
if (enableMath) {
|
|
86
90
|
implementation("io.github.erweixin:ratex-android:0.1.10")
|
|
87
91
|
}
|
|
92
|
+
testImplementation "junit:junit:4.13.2"
|
|
88
93
|
}
|
|
89
94
|
|
|
90
95
|
react {
|
package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownManagerDelegate.java
CHANGED
|
@@ -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;
|
package/android/generated/java/com/facebook/react/viewmanagers/EnrichedMarkdownManagerInterface.java
CHANGED
|
@@ -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);
|
|
@@ -44,6 +44,9 @@ public class EnrichedMarkdownTextInputManagerDelegate<T extends View, U extends
|
|
|
44
44
|
case "scrollEnabled":
|
|
45
45
|
mViewManager.setScrollEnabled(view, value == null ? false : (boolean) value);
|
|
46
46
|
break;
|
|
47
|
+
case "blockSyntax":
|
|
48
|
+
mViewManager.setBlockSyntax(view, value == null ? false : (boolean) value);
|
|
49
|
+
break;
|
|
47
50
|
case "autoCapitalize":
|
|
48
51
|
mViewManager.setAutoCapitalize(view, value == null ? null : (String) value);
|
|
49
52
|
break;
|
|
@@ -80,6 +83,12 @@ public class EnrichedMarkdownTextInputManagerDelegate<T extends View, U extends
|
|
|
80
83
|
case "contextMenuItems":
|
|
81
84
|
mViewManager.setContextMenuItems(view, (ReadableArray) value);
|
|
82
85
|
break;
|
|
86
|
+
case "selectionMenuConfig":
|
|
87
|
+
mViewManager.setSelectionMenuConfig(view, (ReadableMap) value);
|
|
88
|
+
break;
|
|
89
|
+
case "formatMenuConfig":
|
|
90
|
+
mViewManager.setFormatMenuConfig(view, (ReadableMap) value);
|
|
91
|
+
break;
|
|
83
92
|
case "linkRegex":
|
|
84
93
|
mViewManager.setLinkRegex(view, (ReadableMap) value);
|
|
85
94
|
break;
|
|
@@ -148,6 +157,9 @@ public class EnrichedMarkdownTextInputManagerDelegate<T extends View, U extends
|
|
|
148
157
|
case "removeMath":
|
|
149
158
|
mViewManager.removeMath(view, args.getInt(0));
|
|
150
159
|
break;
|
|
160
|
+
case "copyToClipboard":
|
|
161
|
+
mViewManager.copyToClipboard(view);
|
|
162
|
+
break;
|
|
151
163
|
case "requestMarkdown":
|
|
152
164
|
mViewManager.requestMarkdown(view, args.getInt(0));
|
|
153
165
|
break;
|
|
@@ -22,6 +22,7 @@ public interface EnrichedMarkdownTextInputManagerInterface<T extends View> exten
|
|
|
22
22
|
void setEditable(T view, boolean value);
|
|
23
23
|
void setAutoFocus(T view, boolean value);
|
|
24
24
|
void setScrollEnabled(T view, boolean value);
|
|
25
|
+
void setBlockSyntax(T view, boolean value);
|
|
25
26
|
void setAutoCapitalize(T view, @Nullable String value);
|
|
26
27
|
void setMultiline(T view, boolean value);
|
|
27
28
|
void setCursorColor(T view, @Nullable Integer value);
|
|
@@ -34,6 +35,8 @@ public interface EnrichedMarkdownTextInputManagerInterface<T extends View> exten
|
|
|
34
35
|
void setFontWeight(T view, @Nullable String value);
|
|
35
36
|
void setIsOnChangeMarkdownSet(T view, boolean value);
|
|
36
37
|
void setContextMenuItems(T view, @Nullable ReadableArray value);
|
|
38
|
+
void setSelectionMenuConfig(T view, @Nullable ReadableMap value);
|
|
39
|
+
void setFormatMenuConfig(T view, @Nullable ReadableMap value);
|
|
37
40
|
void setLinkRegex(T view, @Nullable ReadableMap value);
|
|
38
41
|
void setMentionIndicators(T view, @Nullable ReadableArray value);
|
|
39
42
|
void setWritingDirection(T view, @Nullable String value);
|
|
@@ -54,6 +57,7 @@ public interface EnrichedMarkdownTextInputManagerInterface<T extends View> exten
|
|
|
54
57
|
void insertMath(T view, String latex, boolean displayMode);
|
|
55
58
|
void updateMath(T view, int start, String latex, boolean displayMode);
|
|
56
59
|
void removeMath(T view, int start);
|
|
60
|
+
void copyToClipboard(T view);
|
|
57
61
|
void requestMarkdown(T view, int requestId);
|
|
58
62
|
void requestCaretRect(T view, int requestId);
|
|
59
63
|
}
|
|
@@ -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
|
}
|
|
@@ -139,6 +144,7 @@ EnrichedMarkdownTextInputProps::EnrichedMarkdownTextInputProps(
|
|
|
139
144
|
editable(convertRawProp(context, rawProps, "editable", sourceProps.editable, {false})),
|
|
140
145
|
autoFocus(convertRawProp(context, rawProps, "autoFocus", sourceProps.autoFocus, {false})),
|
|
141
146
|
scrollEnabled(convertRawProp(context, rawProps, "scrollEnabled", sourceProps.scrollEnabled, {false})),
|
|
147
|
+
blockSyntax(convertRawProp(context, rawProps, "blockSyntax", sourceProps.blockSyntax, {false})),
|
|
142
148
|
autoCapitalize(convertRawProp(context, rawProps, "autoCapitalize", sourceProps.autoCapitalize, {})),
|
|
143
149
|
multiline(convertRawProp(context, rawProps, "multiline", sourceProps.multiline, {false})),
|
|
144
150
|
cursorColor(convertRawProp(context, rawProps, "cursorColor", sourceProps.cursorColor, {})),
|
|
@@ -151,6 +157,8 @@ EnrichedMarkdownTextInputProps::EnrichedMarkdownTextInputProps(
|
|
|
151
157
|
fontWeight(convertRawProp(context, rawProps, "fontWeight", sourceProps.fontWeight, {})),
|
|
152
158
|
isOnChangeMarkdownSet(convertRawProp(context, rawProps, "isOnChangeMarkdownSet", sourceProps.isOnChangeMarkdownSet, {false})),
|
|
153
159
|
contextMenuItems(convertRawProp(context, rawProps, "contextMenuItems", sourceProps.contextMenuItems, {})),
|
|
160
|
+
selectionMenuConfig(convertRawProp(context, rawProps, "selectionMenuConfig", sourceProps.selectionMenuConfig, {})),
|
|
161
|
+
formatMenuConfig(convertRawProp(context, rawProps, "formatMenuConfig", sourceProps.formatMenuConfig, {})),
|
|
154
162
|
linkRegex(convertRawProp(context, rawProps, "linkRegex", sourceProps.linkRegex, {})),
|
|
155
163
|
mentionIndicators(convertRawProp(context, rawProps, "mentionIndicators", sourceProps.mentionIndicators, {})),
|
|
156
164
|
writingDirection(convertRawProp(context, rawProps, "writingDirection", sourceProps.writingDirection, {std::string{"first-strong"}})) {}
|
|
@@ -195,6 +203,10 @@ folly::dynamic EnrichedMarkdownTextInputProps::getDiffProps(
|
|
|
195
203
|
result["scrollEnabled"] = scrollEnabled;
|
|
196
204
|
}
|
|
197
205
|
|
|
206
|
+
if (blockSyntax != oldProps->blockSyntax) {
|
|
207
|
+
result["blockSyntax"] = blockSyntax;
|
|
208
|
+
}
|
|
209
|
+
|
|
198
210
|
if (autoCapitalize != oldProps->autoCapitalize) {
|
|
199
211
|
result["autoCapitalize"] = autoCapitalize;
|
|
200
212
|
}
|
|
@@ -243,6 +255,14 @@ folly::dynamic EnrichedMarkdownTextInputProps::getDiffProps(
|
|
|
243
255
|
result["contextMenuItems"] = toDynamic(contextMenuItems);
|
|
244
256
|
}
|
|
245
257
|
|
|
258
|
+
if (selectionMenuConfig != oldProps->selectionMenuConfig) {
|
|
259
|
+
result["selectionMenuConfig"] = toDynamic(selectionMenuConfig);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
if (formatMenuConfig != oldProps->formatMenuConfig) {
|
|
263
|
+
result["formatMenuConfig"] = toDynamic(formatMenuConfig);
|
|
264
|
+
}
|
|
265
|
+
|
|
246
266
|
if (linkRegex != oldProps->linkRegex) {
|
|
247
267
|
result["linkRegex"] = toDynamic(linkRegex);
|
|
248
268
|
}
|
|
@@ -277,6 +297,7 @@ EnrichedMarkdownTextProps::EnrichedMarkdownTextProps(
|
|
|
277
297
|
spoilerOverlay(convertRawProp(context, rawProps, "spoilerOverlay", sourceProps.spoilerOverlay, {std::string{"particles"}})),
|
|
278
298
|
contextMenuItems(convertRawProp(context, rawProps, "contextMenuItems", sourceProps.contextMenuItems, {})),
|
|
279
299
|
selectionMenuConfig(convertRawProp(context, rawProps, "selectionMenuConfig", sourceProps.selectionMenuConfig, {})),
|
|
300
|
+
accessibilityLabels(convertRawProp(context, rawProps, "accessibilityLabels", sourceProps.accessibilityLabels, {})),
|
|
280
301
|
textBreakStrategy(convertRawProp(context, rawProps, "textBreakStrategy", sourceProps.textBreakStrategy, {std::string{"highQuality"}})),
|
|
281
302
|
lineBreakStrategyIOS(convertRawProp(context, rawProps, "lineBreakStrategyIOS", sourceProps.lineBreakStrategyIOS, {std::string{"none"}})),
|
|
282
303
|
writingDirection(convertRawProp(context, rawProps, "writingDirection", sourceProps.writingDirection, {std::string{"first-strong"}})) {}
|
|
@@ -357,6 +378,10 @@ folly::dynamic EnrichedMarkdownTextProps::getDiffProps(
|
|
|
357
378
|
result["selectionMenuConfig"] = toDynamic(selectionMenuConfig);
|
|
358
379
|
}
|
|
359
380
|
|
|
381
|
+
if (accessibilityLabels != oldProps->accessibilityLabels) {
|
|
382
|
+
result["accessibilityLabels"] = toDynamic(accessibilityLabels);
|
|
383
|
+
}
|
|
384
|
+
|
|
360
385
|
if (textBreakStrategy != oldProps->textBreakStrategy) {
|
|
361
386
|
result["textBreakStrategy"] = textBreakStrategy;
|
|
362
387
|
}
|