react-native-enriched 0.4.1 → 0.5.0
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/README.md +27 -2
- package/ReactNativeEnriched.podspec +5 -1
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedTextInputViewManagerDelegate.java +12 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedTextInputViewManagerInterface.java +4 -0
- package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/EventEmitters.cpp +149 -0
- package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/EventEmitters.h +146 -0
- package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/Props.cpp +16 -1
- package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/Props.h +46 -0
- package/android/src/main/java/com/swmansion/enriched/common/GumboNormalizer.kt +5 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedCheckboxListSpan.kt +3 -2
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedUnorderedListSpan.kt +2 -1
- package/android/src/main/java/com/swmansion/enriched/textinput/EnrichedTextInputView.kt +166 -20
- package/android/src/main/java/com/swmansion/enriched/textinput/EnrichedTextInputViewManager.kt +32 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/MeasurementStore.kt +19 -2
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnContextMenuItemPressEvent.kt +35 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedLineHeightSpan.kt +44 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/styles/ParametrizedStyles.kt +16 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/EnrichedSpanState.kt +18 -12
- package/android/src/main/new_arch/CMakeLists.txt +9 -13
- package/android/src/main/new_arch/GumboNormalizerJni.cpp +14 -0
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/conversions.h +2 -21
- package/cpp/CMakeLists.txt +50 -0
- package/cpp/GumboParser/GumboParser.h +34043 -0
- package/cpp/README.md +59 -0
- package/cpp/parser/GumboNormalizer.c +915 -0
- package/cpp/parser/GumboParser.cpp +16 -0
- package/cpp/parser/GumboParser.hpp +23 -0
- package/cpp/tests/GumboParserTest.cpp +457 -0
- package/ios/EnrichedTextInputView.h +2 -0
- package/ios/EnrichedTextInputView.mm +152 -2
- package/ios/config/InputConfig.h +3 -0
- package/ios/config/InputConfig.mm +15 -0
- package/ios/extensions/LayoutManagerExtension.mm +34 -11
- package/ios/generated/ReactNativeEnrichedSpec/EventEmitters.cpp +149 -0
- package/ios/generated/ReactNativeEnrichedSpec/EventEmitters.h +146 -0
- package/ios/generated/ReactNativeEnrichedSpec/Props.cpp +16 -1
- package/ios/generated/ReactNativeEnrichedSpec/Props.h +46 -0
- package/ios/generated/ReactNativeEnrichedSpec/RCTComponentViewHelpers.h +29 -0
- package/ios/inputParser/InputParser.mm +27 -0
- package/lib/module/EnrichedTextInput.js +43 -30
- package/lib/module/EnrichedTextInput.js.map +1 -1
- package/lib/module/spec/EnrichedTextInputNativeComponent.ts +118 -22
- package/lib/typescript/src/EnrichedTextInput.d.ts +24 -6
- package/lib/typescript/src/EnrichedTextInput.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/spec/EnrichedTextInputNativeComponent.d.ts +111 -21
- package/lib/typescript/src/spec/EnrichedTextInputNativeComponent.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/EnrichedTextInput.tsx +79 -40
- package/src/index.tsx +0 -1
- package/src/spec/EnrichedTextInputNativeComponent.ts +118 -22
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.14)
|
|
2
|
+
project(gumbo_parser_tests C CXX)
|
|
3
|
+
|
|
4
|
+
# ── Fetch Google Test ────────────────────────────────────────────────────────
|
|
5
|
+
include(FetchContent)
|
|
6
|
+
FetchContent_Declare(
|
|
7
|
+
googletest
|
|
8
|
+
GIT_REPOSITORY https://github.com/google/googletest.git
|
|
9
|
+
GIT_TAG v1.17.0
|
|
10
|
+
)
|
|
11
|
+
# For Windows: Prevent overriding the parent project's compiler/linker settings
|
|
12
|
+
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
|
13
|
+
FetchContent_MakeAvailable(googletest)
|
|
14
|
+
|
|
15
|
+
# ── Shared library: gumbo normalizer + C++ wrapper ──────────────────────────
|
|
16
|
+
add_library(gumbo_normalizer_lib SHARED
|
|
17
|
+
parser/GumboNormalizer.c
|
|
18
|
+
parser/GumboParser.cpp
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
target_include_directories(gumbo_normalizer_lib PUBLIC
|
|
22
|
+
${CMAKE_CURRENT_SOURCE_DIR}/GumboParser
|
|
23
|
+
${CMAKE_CURRENT_SOURCE_DIR}/parser
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
# Compile the C file as C99, C++ files as C++17
|
|
27
|
+
set_source_files_properties(
|
|
28
|
+
parser/GumboNormalizer.c
|
|
29
|
+
PROPERTIES LANGUAGE C
|
|
30
|
+
COMPILE_FLAGS "-std=c99"
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
target_compile_options(gumbo_normalizer_lib PRIVATE
|
|
34
|
+
$<$<COMPILE_LANGUAGE:CXX>:-std=c++17>
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
# ── Test executable ──────────────────────────────────────────────────────────
|
|
38
|
+
enable_testing()
|
|
39
|
+
|
|
40
|
+
add_executable(gumbo_parser_tests
|
|
41
|
+
tests/GumboParserTest.cpp
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
target_link_libraries(gumbo_parser_tests PRIVATE
|
|
45
|
+
gumbo_normalizer_lib
|
|
46
|
+
GTest::gtest_main
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
include(GoogleTest)
|
|
50
|
+
gtest_discover_tests(gumbo_parser_tests)
|