react-native-enriched 0.4.1 → 0.5.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.
Files changed (53) hide show
  1. package/README.md +27 -2
  2. package/ReactNativeEnriched.podspec +5 -1
  3. package/android/generated/java/com/facebook/react/viewmanagers/EnrichedTextInputViewManagerDelegate.java +12 -0
  4. package/android/generated/java/com/facebook/react/viewmanagers/EnrichedTextInputViewManagerInterface.java +4 -0
  5. package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/EventEmitters.cpp +149 -0
  6. package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/EventEmitters.h +146 -0
  7. package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/Props.cpp +16 -1
  8. package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/Props.h +46 -0
  9. package/android/src/main/java/com/swmansion/enriched/common/GumboNormalizer.kt +5 -0
  10. package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedCheckboxListSpan.kt +3 -2
  11. package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedUnorderedListSpan.kt +2 -1
  12. package/android/src/main/java/com/swmansion/enriched/textinput/EnrichedTextInputView.kt +166 -20
  13. package/android/src/main/java/com/swmansion/enriched/textinput/EnrichedTextInputViewManager.kt +32 -0
  14. package/android/src/main/java/com/swmansion/enriched/textinput/MeasurementStore.kt +19 -2
  15. package/android/src/main/java/com/swmansion/enriched/textinput/events/OnContextMenuItemPressEvent.kt +35 -0
  16. package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedLineHeightSpan.kt +44 -0
  17. package/android/src/main/java/com/swmansion/enriched/textinput/styles/ParametrizedStyles.kt +16 -0
  18. package/android/src/main/java/com/swmansion/enriched/textinput/utils/EnrichedSpanState.kt +18 -12
  19. package/android/src/main/new_arch/CMakeLists.txt +9 -13
  20. package/android/src/main/new_arch/GumboNormalizerJni.cpp +14 -0
  21. package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/conversions.h +2 -21
  22. package/cpp/CMakeLists.txt +50 -0
  23. package/cpp/GumboParser/GumboParser.h +34043 -0
  24. package/cpp/README.md +59 -0
  25. package/cpp/parser/GumboNormalizer.c +915 -0
  26. package/cpp/parser/GumboParser.cpp +16 -0
  27. package/cpp/parser/GumboParser.hpp +23 -0
  28. package/cpp/tests/GumboParserTest.cpp +457 -0
  29. package/ios/EnrichedTextInputView.h +2 -0
  30. package/ios/EnrichedTextInputView.mm +152 -2
  31. package/ios/config/InputConfig.h +3 -0
  32. package/ios/config/InputConfig.mm +15 -0
  33. package/ios/extensions/LayoutManagerExtension.mm +34 -11
  34. package/ios/generated/ReactNativeEnrichedSpec/EventEmitters.cpp +149 -0
  35. package/ios/generated/ReactNativeEnrichedSpec/EventEmitters.h +146 -0
  36. package/ios/generated/ReactNativeEnrichedSpec/Props.cpp +16 -1
  37. package/ios/generated/ReactNativeEnrichedSpec/Props.h +46 -0
  38. package/ios/generated/ReactNativeEnrichedSpec/RCTComponentViewHelpers.h +29 -0
  39. package/ios/inputParser/InputParser.mm +27 -0
  40. package/ios/inputTextView/InputTextView.mm +3 -3
  41. package/lib/module/EnrichedTextInput.js +43 -30
  42. package/lib/module/EnrichedTextInput.js.map +1 -1
  43. package/lib/module/spec/EnrichedTextInputNativeComponent.ts +118 -22
  44. package/lib/typescript/src/EnrichedTextInput.d.ts +24 -6
  45. package/lib/typescript/src/EnrichedTextInput.d.ts.map +1 -1
  46. package/lib/typescript/src/index.d.ts +1 -1
  47. package/lib/typescript/src/index.d.ts.map +1 -1
  48. package/lib/typescript/src/spec/EnrichedTextInputNativeComponent.d.ts +111 -21
  49. package/lib/typescript/src/spec/EnrichedTextInputNativeComponent.d.ts.map +1 -1
  50. package/package.json +5 -5
  51. package/src/EnrichedTextInput.tsx +79 -40
  52. package/src/index.tsx +0 -1
  53. 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)