@react-native-ohos/react-native-svg 15.0.2-rc.5 → 15.12.1-rc.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.
Files changed (548) hide show
  1. package/README.OpenSource +11 -0
  2. package/README.md +13 -0
  3. package/harmony/svg/BuildProfile.ets +17 -0
  4. package/harmony/svg/build/default/cache/default/default@HarCompileArkTS/esmodule/.ts_checker_cache +3052 -0
  5. package/harmony/svg/build/default/cache/default/default@HarCompileArkTS/esmodule/.tsbuildinfo +1 -0
  6. package/harmony/svg/build/default/cache/default/default@HarCompileArkTS/esmodule/.tsbuildinfo.linter +1 -0
  7. package/harmony/svg/build/default/cache/default/default@HarCompileArkTS/esmodule/compileInfo.json +1 -0
  8. package/harmony/svg/build/default/cache/default/default@HarCompileArkTS/esmodule/debug/compiler.cache/modules/RNSVGImageModule.ts-7c464e69f4a700eeeaae44cf66ca5fd3b3e84299010d5c3a5643612ba1a48d70.msgpack +0 -0
  9. package/harmony/svg/build/default/cache/default/default@HarCompileArkTS/esmodule/debug/compiler.cache/modules/RNSVGRenderableModule.ts-c2df5206c2aa9e868b7f24f706a131fff1236faaff78688ffdeec3ce25bf5d91.msgpack +0 -0
  10. package/harmony/svg/build/default/cache/default/default@HarCompileArkTS/esmodule/debug/compiler.cache/modules/RNSVGSvgViewModule.ts-b9a699770b693eeaa2eb98307323dc9087e44afc9c01b08d222555636b3fac0d.msgpack +0 -0
  11. package/harmony/svg/build/default/cache/default/default@HarCompileArkTS/esmodule/debug/compiler.cache/modules/SvgPackage.ts-08ac57d81b1742792af8813eac27abe5eca1a5714b1a5b76f97436b13abe48e4.msgpack +0 -0
  12. package/harmony/svg/build/default/cache/default/default@HarCompileArkTS/esmodule/debug/compiler.cache/modules/index.ets-0e520bf323178f6f973ec12f44622042dcdd19e5032efd9bd02ac5606fb58275.msgpack +0 -0
  13. package/harmony/svg/build/default/cache/default/default@HarCompileArkTS/esmodule/debug/compiler.cache/modules/ts.ts-1d50b47087f159616212dd3c5ecd04a204a5be09940b7dbba77a59e3a66499c2.msgpack +0 -0
  14. package/harmony/svg/build/default/cache/default/default@HarCompileArkTS/esmodule/debug/compiler.cache/other/pkgName2SourceRoots.msgpack +1 -0
  15. package/harmony/svg/build/default/cache/default/default@HarCompileArkTS/esmodule/debug/compiler.cache/plugins/plugins.msgpack +0 -0
  16. package/harmony/svg/build/default/cache/default/default@HarCompileArkTS/esmodule/debug/dep_info.json +1 -0
  17. package/harmony/svg/build/default/cache/default/default@PackageHar/BuildProfile.ets +17 -0
  18. package/harmony/svg/build/default/cache/default/default@PackageHar/ResourceTable.txt +1 -0
  19. package/harmony/svg/build/default/cache/default/default@PackageHar/build-profile.json5 +9 -0
  20. package/harmony/svg/build/default/cache/default/default@PackageHar/hvigorfile.ts +2 -0
  21. package/harmony/svg/build/default/cache/default/default@PackageHar/index.ets +7 -0
  22. package/harmony/svg/build/default/cache/default/default@PackageHar/oh-package-lock.json5 +19 -0
  23. package/harmony/svg/build/default/cache/default/default@PackageHar/oh-package.json5 +1 -0
  24. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/Attribute.h +52 -0
  25. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/CMakeLists.txt +32 -0
  26. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/FallbackProps.h +0 -0
  27. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/FontHolderBase.cpp +22 -0
  28. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/FontHolderBase.h +54 -0
  29. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SVGPackage.cpp +135 -0
  30. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SVGPackage.h +157 -0
  31. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgArkUINode.cpp +78 -0
  32. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgArkUINode.h +51 -0
  33. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgBaseAttribute.h +83 -0
  34. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgCircle.cpp +29 -0
  35. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgCircle.h +29 -0
  36. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgClipPath.h +22 -0
  37. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgContext.cpp +56 -0
  38. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgContext.h +71 -0
  39. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgDefs.h +46 -0
  40. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgEllipse.cpp +32 -0
  41. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgEllipse.h +34 -0
  42. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgFilter.cpp +505 -0
  43. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgFilter.h +112 -0
  44. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgForeignObjectNode.cpp +86 -0
  45. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgForeignObjectNode.h +81 -0
  46. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgForeignObjectNodeDelegate.h +30 -0
  47. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgForeignProps.h +39 -0
  48. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgGradient.cpp +117 -0
  49. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgGradient.h +49 -0
  50. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgGraphic.cpp +553 -0
  51. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgGraphic.h +77 -0
  52. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgGroup.cpp +93 -0
  53. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgGroup.h +41 -0
  54. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgHost.cpp +27 -0
  55. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgHost.h +38 -0
  56. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgImage.cpp +168 -0
  57. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgImage.h +52 -0
  58. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgLine.cpp +28 -0
  59. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgLine.h +32 -0
  60. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgMarker.cpp +61 -0
  61. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgMarker.h +86 -0
  62. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgMask.cpp +72 -0
  63. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgMask.h +68 -0
  64. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgNode.cpp +395 -0
  65. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgNode.h +377 -0
  66. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgPath.cpp +42 -0
  67. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgPath.h +29 -0
  68. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgPattern.cpp +77 -0
  69. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgPattern.h +64 -0
  70. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgQuote.h +87 -0
  71. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgRect.cpp +58 -0
  72. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgRect.h +33 -0
  73. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgSvg.cpp +83 -0
  74. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgSvg.h +52 -0
  75. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgSymbol.cpp +25 -0
  76. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgSymbol.h +37 -0
  77. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgTSpan.cpp +501 -0
  78. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgTSpan.h +101 -0
  79. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgText.cpp +48 -0
  80. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgText.h +29 -0
  81. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgTextPath.cpp +35 -0
  82. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgTextPath.h +51 -0
  83. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgUse.cpp +65 -0
  84. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgUse.h +46 -0
  85. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgViewManager.cpp +36 -0
  86. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/SvgViewManager.h +37 -0
  87. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/TextBase.cpp +20 -0
  88. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/TextBase.h +114 -0
  89. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGBaseComponentInstance.h +212 -0
  90. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGCircleComponentInstance.cpp +31 -0
  91. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGCircleComponentInstance.h +27 -0
  92. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGClipPathComponentInstance.cpp +23 -0
  93. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGClipPathComponentInstance.h +27 -0
  94. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGDefsComponentInstance.cpp +23 -0
  95. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGDefsComponentInstance.h +28 -0
  96. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGEllipseComponentInstance.cpp +27 -0
  97. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGEllipseComponentInstance.h +27 -0
  98. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGFeBlendComponentInstance.cpp +40 -0
  99. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGFeBlendComponentInstance.h +48 -0
  100. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGFeColorMatrixComponentInstance.cpp +33 -0
  101. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGFeColorMatrixComponentInstance.h +48 -0
  102. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGFeCompositeComponentInstance.cpp +39 -0
  103. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGFeCompositeComponentInstance.h +55 -0
  104. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGFeFloodComponentInstance.cpp +33 -0
  105. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGFeFloodComponentInstance.h +49 -0
  106. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGFeGaussianBlurComponentInstance.cpp +34 -0
  107. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGFeGaussianBlurComponentInstance.h +48 -0
  108. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGFeOffsetComponentInstance.cpp +35 -0
  109. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGFeOffsetComponentInstance.h +46 -0
  110. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGFilterComponentInstance.cpp +199 -0
  111. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGFilterComponentInstance.h +48 -0
  112. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGForeignObjectComponentInstance.cpp +93 -0
  113. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGForeignObjectComponentInstance.h +55 -0
  114. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGGroupComponentInstance.cpp +32 -0
  115. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGGroupComponentInstance.h +31 -0
  116. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGImageComponentInstance.cpp +103 -0
  117. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGImageComponentInstance.h +43 -0
  118. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGLineComponentInstance.cpp +27 -0
  119. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGLineComponentInstance.h +27 -0
  120. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGLinearGradientComponentInstance.cpp +30 -0
  121. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGLinearGradientComponentInstance.h +28 -0
  122. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGMarkerComponentInstance.cpp +35 -0
  123. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGMarkerComponentInstance.h +27 -0
  124. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGMaskComponentInstance.cpp +30 -0
  125. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGMaskComponentInstance.h +27 -0
  126. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGPathComponentInstance.cpp +33 -0
  127. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGPathComponentInstance.h +29 -0
  128. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGPatternComponentInstance.cpp +40 -0
  129. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGPatternComponentInstance.h +27 -0
  130. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGRadialGradientComponentInstance.cpp +32 -0
  131. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGRadialGradientComponentInstance.h +28 -0
  132. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGRectComponentInstance.cpp +36 -0
  133. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGRectComponentInstance.h +27 -0
  134. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGSvgViewComponentInstance.cpp +124 -0
  135. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGSvgViewComponentInstance.h +56 -0
  136. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGSymbolComponentInstance.cpp +30 -0
  137. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGSymbolComponentInstance.h +27 -0
  138. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGTSpanComponentInstance.cpp +27 -0
  139. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGTSpanComponentInstance.h +27 -0
  140. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGTextComponentInstance.cpp +25 -0
  141. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGTextComponentInstance.h +27 -0
  142. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGTextPathComponentInstance.cpp +32 -0
  143. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGTextPathComponentInstance.h +27 -0
  144. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGUseComponentInstance.cpp +32 -0
  145. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/componentInstances/RNSVGUseComponentInstance.h +32 -0
  146. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/downloadUtils/HttpTaskProcessor.cpp +266 -0
  147. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/downloadUtils/HttpTaskProcessor.h +88 -0
  148. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/downloadUtils/ImageSourceResolver.cpp +134 -0
  149. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/downloadUtils/ImageSourceResolver.h +93 -0
  150. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/downloadUtils/LRUCache.h +98 -0
  151. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/drawing/Brush.cpp +50 -0
  152. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/drawing/Brush.h +52 -0
  153. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/drawing/GlyPathBag.cpp +20 -0
  154. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/drawing/GlyPathBag.h +31 -0
  155. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/drawing/Matrix.cpp +100 -0
  156. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/drawing/Matrix.h +68 -0
  157. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/drawing/Path.cpp +173 -0
  158. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/drawing/Path.h +127 -0
  159. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/drawing/Pen.cpp +57 -0
  160. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/drawing/Pen.h +59 -0
  161. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/drawing/Rect.cpp +47 -0
  162. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/drawing/Rect.h +56 -0
  163. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/drawing/RoundRect.cpp +24 -0
  164. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/drawing/RoundRect.h +39 -0
  165. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/drawing/ShaderEffect.cpp +37 -0
  166. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/drawing/ShaderEffect.h +51 -0
  167. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/drawing/TextStyle.cpp +49 -0
  168. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/drawing/TextStyle.h +41 -0
  169. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/drawing/Typography.cpp +9 -0
  170. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/drawing/Typography.h +25 -0
  171. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/drawing/TypographyStyle.cpp +31 -0
  172. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/drawing/TypographyStyle.h +41 -0
  173. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGCircleJSIBinder.h +54 -0
  174. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGClipPathJSIBinder.h +54 -0
  175. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGDefsJSIBinder.h +38 -0
  176. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGEllipseJSIBinder.h +55 -0
  177. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGFeBlendJSIBinder.h +26 -0
  178. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGFeColorMatrixJSIBinder.h +26 -0
  179. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGFeCompositeJSIBinder.h +30 -0
  180. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGFeFloodJSIBinder.h +26 -0
  181. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGFeGaussianBlurJSIBinder.h +27 -0
  182. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGFeOffsetJSIBinder.h +26 -0
  183. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGFilterJSIBinder.h +44 -0
  184. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGForeignObjectJSIBinder.h +57 -0
  185. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGGroupJSIBinder.h +54 -0
  186. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGImageJSIBinder.h +58 -0
  187. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGLineJSIBinder.h +55 -0
  188. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGLinearGradientJSIBinder.h +45 -0
  189. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGMarkerJSIBinder.h +66 -0
  190. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGMaskJSIBinder.h +60 -0
  191. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGPathJSIBinder.h +52 -0
  192. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGPatternJSIBinder.h +67 -0
  193. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGRadialGradientJSIBinder.h +47 -0
  194. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGRectJSIBinder.h +57 -0
  195. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGSvgViewAndroidJSIBinder.h +67 -0
  196. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGSvgViewJSIBinder.h +36 -0
  197. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGSymbolJSIBinder.h +60 -0
  198. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGTSpanJSIBinder.h +66 -0
  199. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGTextJSIBinder.h +65 -0
  200. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGTextPathJSIBinder.h +71 -0
  201. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/RNOH/generated/components/RNSVGUseJSIBinder.h +56 -0
  202. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/react/renderer/components/react_native_svg/ComponentDescriptors.h +48 -0
  203. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/react/renderer/components/react_native_svg/EventEmitters.cpp +20 -0
  204. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/react/renderer/components/react_native_svg/EventEmitters.h +253 -0
  205. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/react/renderer/components/react_native_svg/Props.cpp +977 -0
  206. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/react/renderer/components/react_native_svg/Props.h +1280 -0
  207. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/react/renderer/components/react_native_svg/ShadowNodes.cpp +45 -0
  208. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/react/renderer/components/react_native_svg/ShadowNodes.h +331 -0
  209. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/react/renderer/components/react_native_svg/States.cpp +18 -0
  210. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/generated/react/renderer/components/react_native_svg/States.h +441 -0
  211. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/properties/Color.cpp +458 -0
  212. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/properties/Color.h +144 -0
  213. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/properties/Decoration.cpp +41 -0
  214. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/properties/Decoration.h +483 -0
  215. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/properties/Dimension.cpp +64 -0
  216. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/properties/Dimension.h +257 -0
  217. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/properties/Font.cpp +166 -0
  218. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/properties/Font.h +163 -0
  219. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/properties/Offset.h +119 -0
  220. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/properties/PaintState.h +240 -0
  221. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/properties/Rect.h +423 -0
  222. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/properties/Size.h +246 -0
  223. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/properties/SvgPaintState.h +452 -0
  224. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/properties/TextProperties.cpp +91 -0
  225. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/properties/TextProperties.h +56 -0
  226. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/properties/ViewBox.h +108 -0
  227. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/svgImage/RNSVGImageComponentDescriptor.h +41 -0
  228. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/svgImage/RNSVGImageShadowNode.cpp +62 -0
  229. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/svgImage/RNSVGImageShadowNode.h +63 -0
  230. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/svgImage/RNSVGImageState.cpp +17 -0
  231. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/svgImage/RNSVGImageState.h +58 -0
  232. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/turboModules/RNSVGImageModule.cpp +83 -0
  233. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/turboModules/RNSVGImageModule.h +32 -0
  234. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/turboModules/RNSVGRenderableModule.cpp +101 -0
  235. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/turboModules/RNSVGRenderableModule.h +32 -0
  236. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/turboModules/RNSVGSvgViewModule.cpp +71 -0
  237. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/turboModules/RNSVGSvgViewModule.h +32 -0
  238. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/utils/DynamicUtils.h +55 -0
  239. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/utils/FilterManager.h +190 -0
  240. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/utils/GlyphContext.cpp +221 -0
  241. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/utils/GlyphContext.h +106 -0
  242. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/utils/LinearMap.h +69 -0
  243. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/utils/PathParserUtils.cpp +591 -0
  244. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/utils/PathParserUtils.h +93 -0
  245. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/utils/StringUtils.cpp +134 -0
  246. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/utils/StringUtils.h +644 -0
  247. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/utils/SvgAttributesParser.cpp +239 -0
  248. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/utils/SvgAttributesParser.h +277 -0
  249. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/utils/SvgMarkerPositionUtils.h +200 -0
  250. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/utils/SvgUtils.h +176 -0
  251. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/utils/TextPathHelper.cpp +94 -0
  252. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/cpp/utils/TextPathHelper.h +61 -0
  253. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/ets/RNSVGImageModule.ts +21 -0
  254. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/ets/RNSVGRenderableModule.ts +16 -0
  255. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/ets/RNSVGSvgViewModule.ts +18 -0
  256. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/ets/SvgPackage.ts +58 -0
  257. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/module.json +30 -0
  258. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/resources/base/element/string.json +8 -0
  259. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/resources/en_US/element/string.json +8 -0
  260. package/harmony/svg/build/default/cache/default/default@PackageHar/src/main/resources/zh_CN/element/string.json +8 -0
  261. package/harmony/svg/build/default/cache/default/default@PackageHar/ts.ts +8 -0
  262. package/harmony/svg/build/default/generated/pm/default/oh-package.json5 +1 -0
  263. package/harmony/svg/build/default/generated/r/default/ResourceTable.h +24 -0
  264. package/harmony/svg/build/default/intermediates/loader/default/loader.json +26 -0
  265. package/harmony/svg/build/default/intermediates/merge_profile/default/module.json +27 -0
  266. package/harmony/svg/build/default/intermediates/patch/default/base_native_libs.json +1 -0
  267. package/harmony/svg/build/default/intermediates/process_profile/default/module.json +30 -0
  268. package/harmony/svg/build/default/intermediates/res/default/ResourceTable.txt +1 -0
  269. package/harmony/svg/build/default/intermediates/res/default/ark_module.json +1 -0
  270. package/harmony/svg/build/default/intermediates/res/default/ids_map/id_defined.json +7 -0
  271. package/harmony/svg/build/default/intermediates/res/default/module.json +28 -0
  272. package/harmony/svg/build/default/intermediates/res/default/opt-compression.json +1 -0
  273. package/harmony/svg/build/default/intermediates/res/default/resConfig.json +1 -0
  274. package/harmony/svg/build/default/intermediates/res/default/resources/rawfile/rnoh.profdata +0 -0
  275. package/harmony/svg/build/default/intermediates/res/default/resources.index +0 -0
  276. package/harmony/svg/build/default/outputs/default/svg.har +0 -0
  277. package/harmony/svg/build-profile.json5 +9 -0
  278. package/harmony/svg/hvigorfile.ts +2 -0
  279. package/harmony/svg/index.ets +7 -0
  280. package/harmony/svg/oh-package.json5 +13 -0
  281. package/harmony/svg/src/main/cpp/Attribute.h +52 -0
  282. package/harmony/svg/src/main/cpp/CMakeLists.txt +32 -0
  283. package/harmony/svg/src/main/cpp/FallbackProps.h +0 -0
  284. package/harmony/svg/src/main/cpp/FontHolderBase.cpp +22 -0
  285. package/harmony/svg/src/main/cpp/FontHolderBase.h +54 -0
  286. package/harmony/svg/src/main/cpp/SVGPackage.cpp +135 -0
  287. package/harmony/svg/src/main/cpp/SVGPackage.h +157 -0
  288. package/harmony/svg/src/main/cpp/SvgArkUINode.cpp +78 -0
  289. package/harmony/svg/src/main/cpp/SvgArkUINode.h +51 -0
  290. package/harmony/svg/src/main/cpp/SvgBaseAttribute.h +83 -0
  291. package/harmony/svg/src/main/cpp/SvgCircle.cpp +29 -0
  292. package/harmony/svg/src/main/cpp/SvgCircle.h +29 -0
  293. package/harmony/svg/src/main/cpp/SvgClipPath.h +22 -0
  294. package/harmony/svg/src/main/cpp/SvgContext.cpp +56 -0
  295. package/harmony/svg/src/main/cpp/SvgContext.h +71 -0
  296. package/harmony/svg/src/main/cpp/SvgDefs.h +46 -0
  297. package/harmony/svg/src/main/cpp/SvgEllipse.cpp +32 -0
  298. package/harmony/svg/src/main/cpp/SvgEllipse.h +34 -0
  299. package/harmony/svg/src/main/cpp/SvgFilter.cpp +505 -0
  300. package/harmony/svg/src/main/cpp/SvgFilter.h +112 -0
  301. package/harmony/svg/src/main/cpp/SvgForeignObjectNode.cpp +86 -0
  302. package/harmony/svg/src/main/cpp/SvgForeignObjectNode.h +81 -0
  303. package/harmony/svg/src/main/cpp/SvgForeignObjectNodeDelegate.h +30 -0
  304. package/harmony/svg/src/main/cpp/SvgForeignProps.h +39 -0
  305. package/harmony/svg/src/main/cpp/SvgGradient.cpp +117 -0
  306. package/harmony/svg/src/main/cpp/SvgGradient.h +49 -0
  307. package/harmony/svg/src/main/cpp/SvgGraphic.cpp +553 -0
  308. package/harmony/svg/src/main/cpp/SvgGraphic.h +77 -0
  309. package/harmony/svg/src/main/cpp/SvgGroup.cpp +93 -0
  310. package/harmony/svg/src/main/cpp/SvgGroup.h +41 -0
  311. package/harmony/svg/src/main/cpp/SvgHost.cpp +27 -0
  312. package/harmony/svg/src/main/cpp/SvgHost.h +38 -0
  313. package/harmony/svg/src/main/cpp/SvgImage.cpp +168 -0
  314. package/harmony/svg/src/main/cpp/SvgImage.h +52 -0
  315. package/harmony/svg/src/main/cpp/SvgLine.cpp +28 -0
  316. package/harmony/svg/src/main/cpp/SvgLine.h +32 -0
  317. package/harmony/svg/src/main/cpp/SvgMarker.cpp +61 -0
  318. package/harmony/svg/src/main/cpp/SvgMarker.h +86 -0
  319. package/harmony/svg/src/main/cpp/SvgMask.cpp +72 -0
  320. package/harmony/svg/src/main/cpp/SvgMask.h +68 -0
  321. package/harmony/svg/src/main/cpp/SvgNode.cpp +395 -0
  322. package/harmony/svg/src/main/cpp/SvgNode.h +377 -0
  323. package/harmony/svg/src/main/cpp/SvgPath.cpp +42 -0
  324. package/harmony/svg/src/main/cpp/SvgPath.h +29 -0
  325. package/harmony/svg/src/main/cpp/SvgPattern.cpp +77 -0
  326. package/harmony/svg/src/main/cpp/SvgPattern.h +64 -0
  327. package/harmony/svg/src/main/cpp/SvgQuote.h +87 -0
  328. package/harmony/svg/src/main/cpp/SvgRect.cpp +58 -0
  329. package/harmony/svg/src/main/cpp/SvgRect.h +33 -0
  330. package/harmony/svg/src/main/cpp/SvgSvg.cpp +83 -0
  331. package/harmony/svg/src/main/cpp/SvgSvg.h +52 -0
  332. package/harmony/svg/src/main/cpp/SvgSymbol.cpp +25 -0
  333. package/harmony/svg/src/main/cpp/SvgSymbol.h +37 -0
  334. package/harmony/svg/src/main/cpp/SvgTSpan.cpp +501 -0
  335. package/harmony/svg/src/main/cpp/SvgTSpan.h +101 -0
  336. package/harmony/svg/src/main/cpp/SvgText.cpp +48 -0
  337. package/harmony/svg/src/main/cpp/SvgText.h +29 -0
  338. package/harmony/svg/src/main/cpp/SvgTextPath.cpp +35 -0
  339. package/harmony/svg/src/main/cpp/SvgTextPath.h +51 -0
  340. package/harmony/svg/src/main/cpp/SvgUse.cpp +65 -0
  341. package/harmony/svg/src/main/cpp/SvgUse.h +46 -0
  342. package/harmony/svg/src/main/cpp/SvgViewManager.cpp +36 -0
  343. package/harmony/svg/src/main/cpp/SvgViewManager.h +37 -0
  344. package/harmony/svg/src/main/cpp/TextBase.cpp +20 -0
  345. package/harmony/svg/src/main/cpp/TextBase.h +114 -0
  346. package/harmony/svg/src/main/cpp/componentInstances/RNSVGBaseComponentInstance.h +212 -0
  347. package/harmony/svg/src/main/cpp/componentInstances/RNSVGCircleComponentInstance.cpp +31 -0
  348. package/harmony/svg/src/main/cpp/componentInstances/RNSVGCircleComponentInstance.h +27 -0
  349. package/harmony/svg/src/main/cpp/componentInstances/RNSVGClipPathComponentInstance.cpp +23 -0
  350. package/harmony/svg/src/main/cpp/componentInstances/RNSVGClipPathComponentInstance.h +27 -0
  351. package/harmony/svg/src/main/cpp/componentInstances/RNSVGDefsComponentInstance.cpp +23 -0
  352. package/harmony/svg/src/main/cpp/componentInstances/RNSVGDefsComponentInstance.h +28 -0
  353. package/harmony/svg/src/main/cpp/componentInstances/RNSVGEllipseComponentInstance.cpp +27 -0
  354. package/harmony/svg/src/main/cpp/componentInstances/RNSVGEllipseComponentInstance.h +27 -0
  355. package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeBlendComponentInstance.cpp +40 -0
  356. package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeBlendComponentInstance.h +48 -0
  357. package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeColorMatrixComponentInstance.cpp +33 -0
  358. package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeColorMatrixComponentInstance.h +48 -0
  359. package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeCompositeComponentInstance.cpp +39 -0
  360. package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeCompositeComponentInstance.h +55 -0
  361. package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeFloodComponentInstance.cpp +33 -0
  362. package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeFloodComponentInstance.h +49 -0
  363. package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeGaussianBlurComponentInstance.cpp +34 -0
  364. package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeGaussianBlurComponentInstance.h +48 -0
  365. package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeOffsetComponentInstance.cpp +35 -0
  366. package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeOffsetComponentInstance.h +46 -0
  367. package/harmony/svg/src/main/cpp/componentInstances/RNSVGFilterComponentInstance.cpp +199 -0
  368. package/harmony/svg/src/main/cpp/componentInstances/RNSVGFilterComponentInstance.h +48 -0
  369. package/harmony/svg/src/main/cpp/componentInstances/RNSVGForeignObjectComponentInstance.cpp +93 -0
  370. package/harmony/svg/src/main/cpp/componentInstances/RNSVGForeignObjectComponentInstance.h +55 -0
  371. package/harmony/svg/src/main/cpp/componentInstances/RNSVGGroupComponentInstance.cpp +32 -0
  372. package/harmony/svg/src/main/cpp/componentInstances/RNSVGGroupComponentInstance.h +31 -0
  373. package/harmony/svg/src/main/cpp/componentInstances/RNSVGImageComponentInstance.cpp +103 -0
  374. package/harmony/svg/src/main/cpp/componentInstances/RNSVGImageComponentInstance.h +43 -0
  375. package/harmony/svg/src/main/cpp/componentInstances/RNSVGLineComponentInstance.cpp +27 -0
  376. package/harmony/svg/src/main/cpp/componentInstances/RNSVGLineComponentInstance.h +27 -0
  377. package/harmony/svg/src/main/cpp/componentInstances/RNSVGLinearGradientComponentInstance.cpp +30 -0
  378. package/harmony/svg/src/main/cpp/componentInstances/RNSVGLinearGradientComponentInstance.h +28 -0
  379. package/harmony/svg/src/main/cpp/componentInstances/RNSVGMarkerComponentInstance.cpp +35 -0
  380. package/harmony/svg/src/main/cpp/componentInstances/RNSVGMarkerComponentInstance.h +27 -0
  381. package/harmony/svg/src/main/cpp/componentInstances/RNSVGMaskComponentInstance.cpp +30 -0
  382. package/harmony/svg/src/main/cpp/componentInstances/RNSVGMaskComponentInstance.h +27 -0
  383. package/harmony/svg/src/main/cpp/componentInstances/RNSVGPathComponentInstance.cpp +33 -0
  384. package/harmony/svg/src/main/cpp/componentInstances/RNSVGPathComponentInstance.h +29 -0
  385. package/harmony/svg/src/main/cpp/componentInstances/RNSVGPatternComponentInstance.cpp +40 -0
  386. package/harmony/svg/src/main/cpp/componentInstances/RNSVGPatternComponentInstance.h +27 -0
  387. package/harmony/svg/src/main/cpp/componentInstances/RNSVGRadialGradientComponentInstance.cpp +32 -0
  388. package/harmony/svg/src/main/cpp/componentInstances/RNSVGRadialGradientComponentInstance.h +28 -0
  389. package/harmony/svg/src/main/cpp/componentInstances/RNSVGRectComponentInstance.cpp +36 -0
  390. package/harmony/svg/src/main/cpp/componentInstances/RNSVGRectComponentInstance.h +27 -0
  391. package/harmony/svg/src/main/cpp/componentInstances/RNSVGSvgViewComponentInstance.cpp +124 -0
  392. package/harmony/svg/src/main/cpp/componentInstances/RNSVGSvgViewComponentInstance.h +56 -0
  393. package/harmony/svg/src/main/cpp/componentInstances/RNSVGSymbolComponentInstance.cpp +30 -0
  394. package/harmony/svg/src/main/cpp/componentInstances/RNSVGSymbolComponentInstance.h +27 -0
  395. package/harmony/svg/src/main/cpp/componentInstances/RNSVGTSpanComponentInstance.cpp +27 -0
  396. package/harmony/svg/src/main/cpp/componentInstances/RNSVGTSpanComponentInstance.h +27 -0
  397. package/harmony/svg/src/main/cpp/componentInstances/RNSVGTextComponentInstance.cpp +25 -0
  398. package/harmony/svg/src/main/cpp/componentInstances/RNSVGTextComponentInstance.h +27 -0
  399. package/harmony/svg/src/main/cpp/componentInstances/RNSVGTextPathComponentInstance.cpp +32 -0
  400. package/harmony/svg/src/main/cpp/componentInstances/RNSVGTextPathComponentInstance.h +27 -0
  401. package/harmony/svg/src/main/cpp/componentInstances/RNSVGUseComponentInstance.cpp +32 -0
  402. package/harmony/svg/src/main/cpp/componentInstances/RNSVGUseComponentInstance.h +32 -0
  403. package/harmony/svg/src/main/cpp/downloadUtils/HttpTaskProcessor.cpp +266 -0
  404. package/harmony/svg/src/main/cpp/downloadUtils/HttpTaskProcessor.h +88 -0
  405. package/harmony/svg/src/main/cpp/downloadUtils/ImageSourceResolver.cpp +134 -0
  406. package/harmony/svg/src/main/cpp/downloadUtils/ImageSourceResolver.h +93 -0
  407. package/harmony/svg/src/main/cpp/downloadUtils/LRUCache.h +98 -0
  408. package/harmony/svg/src/main/cpp/drawing/Brush.cpp +50 -0
  409. package/harmony/svg/src/main/cpp/drawing/Brush.h +52 -0
  410. package/harmony/svg/src/main/cpp/drawing/GlyPathBag.cpp +20 -0
  411. package/harmony/svg/src/main/cpp/drawing/GlyPathBag.h +31 -0
  412. package/harmony/svg/src/main/cpp/drawing/Matrix.cpp +100 -0
  413. package/harmony/svg/src/main/cpp/drawing/Matrix.h +68 -0
  414. package/harmony/svg/src/main/cpp/drawing/Path.cpp +173 -0
  415. package/harmony/svg/src/main/cpp/drawing/Path.h +127 -0
  416. package/harmony/svg/src/main/cpp/drawing/Pen.cpp +57 -0
  417. package/harmony/svg/src/main/cpp/drawing/Pen.h +59 -0
  418. package/harmony/svg/src/main/cpp/drawing/Rect.cpp +47 -0
  419. package/harmony/svg/src/main/cpp/drawing/Rect.h +56 -0
  420. package/harmony/svg/src/main/cpp/drawing/RoundRect.cpp +24 -0
  421. package/harmony/svg/src/main/cpp/drawing/RoundRect.h +39 -0
  422. package/harmony/svg/src/main/cpp/drawing/ShaderEffect.cpp +37 -0
  423. package/harmony/svg/src/main/cpp/drawing/ShaderEffect.h +51 -0
  424. package/harmony/svg/src/main/cpp/drawing/TextStyle.cpp +49 -0
  425. package/harmony/svg/src/main/cpp/drawing/TextStyle.h +41 -0
  426. package/harmony/svg/src/main/cpp/drawing/Typography.cpp +9 -0
  427. package/harmony/svg/src/main/cpp/drawing/Typography.h +25 -0
  428. package/harmony/svg/src/main/cpp/drawing/TypographyStyle.cpp +31 -0
  429. package/harmony/svg/src/main/cpp/drawing/TypographyStyle.h +41 -0
  430. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGCircleJSIBinder.h +54 -0
  431. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGClipPathJSIBinder.h +54 -0
  432. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGDefsJSIBinder.h +38 -0
  433. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGEllipseJSIBinder.h +55 -0
  434. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGFeBlendJSIBinder.h +26 -0
  435. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGFeColorMatrixJSIBinder.h +26 -0
  436. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGFeCompositeJSIBinder.h +30 -0
  437. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGFeFloodJSIBinder.h +26 -0
  438. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGFeGaussianBlurJSIBinder.h +27 -0
  439. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGFeOffsetJSIBinder.h +26 -0
  440. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGFilterJSIBinder.h +44 -0
  441. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGForeignObjectJSIBinder.h +57 -0
  442. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGGroupJSIBinder.h +54 -0
  443. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGImageJSIBinder.h +58 -0
  444. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGLineJSIBinder.h +55 -0
  445. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGLinearGradientJSIBinder.h +45 -0
  446. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGMarkerJSIBinder.h +66 -0
  447. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGMaskJSIBinder.h +60 -0
  448. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGPathJSIBinder.h +52 -0
  449. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGPatternJSIBinder.h +67 -0
  450. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGRadialGradientJSIBinder.h +47 -0
  451. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGRectJSIBinder.h +57 -0
  452. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGSvgViewAndroidJSIBinder.h +67 -0
  453. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGSvgViewJSIBinder.h +36 -0
  454. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGSymbolJSIBinder.h +60 -0
  455. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGTSpanJSIBinder.h +66 -0
  456. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGTextJSIBinder.h +65 -0
  457. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGTextPathJSIBinder.h +71 -0
  458. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGUseJSIBinder.h +56 -0
  459. package/harmony/svg/src/main/cpp/generated/react/renderer/components/react_native_svg/ComponentDescriptors.h +48 -0
  460. package/harmony/svg/src/main/cpp/generated/react/renderer/components/react_native_svg/EventEmitters.cpp +20 -0
  461. package/harmony/svg/src/main/cpp/generated/react/renderer/components/react_native_svg/EventEmitters.h +253 -0
  462. package/harmony/svg/src/main/cpp/generated/react/renderer/components/react_native_svg/Props.cpp +977 -0
  463. package/harmony/svg/src/main/cpp/generated/react/renderer/components/react_native_svg/Props.h +1280 -0
  464. package/harmony/svg/src/main/cpp/generated/react/renderer/components/react_native_svg/ShadowNodes.cpp +45 -0
  465. package/harmony/svg/src/main/cpp/generated/react/renderer/components/react_native_svg/ShadowNodes.h +331 -0
  466. package/harmony/svg/src/main/cpp/generated/react/renderer/components/react_native_svg/States.cpp +18 -0
  467. package/harmony/svg/src/main/cpp/generated/react/renderer/components/react_native_svg/States.h +441 -0
  468. package/harmony/svg/src/main/cpp/properties/Color.cpp +458 -0
  469. package/harmony/svg/src/main/cpp/properties/Color.h +144 -0
  470. package/harmony/svg/src/main/cpp/properties/Decoration.cpp +41 -0
  471. package/harmony/svg/src/main/cpp/properties/Decoration.h +483 -0
  472. package/harmony/svg/src/main/cpp/properties/Dimension.cpp +64 -0
  473. package/harmony/svg/src/main/cpp/properties/Dimension.h +257 -0
  474. package/harmony/svg/src/main/cpp/properties/Font.cpp +166 -0
  475. package/harmony/svg/src/main/cpp/properties/Font.h +163 -0
  476. package/harmony/svg/src/main/cpp/properties/Offset.h +119 -0
  477. package/harmony/svg/src/main/cpp/properties/PaintState.h +240 -0
  478. package/harmony/svg/src/main/cpp/properties/Rect.h +423 -0
  479. package/harmony/svg/src/main/cpp/properties/Size.h +246 -0
  480. package/harmony/svg/src/main/cpp/properties/SvgPaintState.h +452 -0
  481. package/harmony/svg/src/main/cpp/properties/TextProperties.cpp +91 -0
  482. package/harmony/svg/src/main/cpp/properties/TextProperties.h +56 -0
  483. package/harmony/svg/src/main/cpp/properties/ViewBox.h +108 -0
  484. package/harmony/svg/src/main/cpp/svgImage/RNSVGImageComponentDescriptor.h +41 -0
  485. package/harmony/svg/src/main/cpp/svgImage/RNSVGImageShadowNode.cpp +62 -0
  486. package/harmony/svg/src/main/cpp/svgImage/RNSVGImageShadowNode.h +63 -0
  487. package/harmony/svg/src/main/cpp/svgImage/RNSVGImageState.cpp +17 -0
  488. package/harmony/svg/src/main/cpp/svgImage/RNSVGImageState.h +58 -0
  489. package/harmony/svg/src/main/cpp/turboModules/RNSVGImageModule.cpp +83 -0
  490. package/harmony/svg/src/main/cpp/turboModules/RNSVGImageModule.h +32 -0
  491. package/harmony/svg/src/main/cpp/turboModules/RNSVGRenderableModule.cpp +101 -0
  492. package/harmony/svg/src/main/cpp/turboModules/RNSVGRenderableModule.h +32 -0
  493. package/harmony/svg/src/main/cpp/turboModules/RNSVGSvgViewModule.cpp +71 -0
  494. package/harmony/svg/src/main/cpp/turboModules/RNSVGSvgViewModule.h +32 -0
  495. package/harmony/svg/src/main/cpp/utils/DynamicUtils.h +55 -0
  496. package/harmony/svg/src/main/cpp/utils/FilterManager.h +190 -0
  497. package/harmony/svg/src/main/cpp/utils/GlyphContext.cpp +221 -0
  498. package/harmony/svg/src/main/cpp/utils/GlyphContext.h +106 -0
  499. package/harmony/svg/src/main/cpp/utils/LinearMap.h +69 -0
  500. package/harmony/svg/src/main/cpp/utils/PathParserUtils.cpp +591 -0
  501. package/harmony/svg/src/main/cpp/utils/PathParserUtils.h +93 -0
  502. package/harmony/svg/src/main/cpp/utils/StringUtils.cpp +134 -0
  503. package/harmony/svg/src/main/cpp/utils/StringUtils.h +644 -0
  504. package/harmony/svg/src/main/cpp/utils/SvgAttributesParser.cpp +239 -0
  505. package/harmony/svg/src/main/cpp/utils/SvgAttributesParser.h +277 -0
  506. package/harmony/svg/src/main/cpp/utils/SvgMarkerPositionUtils.h +200 -0
  507. package/harmony/svg/src/main/cpp/utils/SvgUtils.h +176 -0
  508. package/harmony/svg/src/main/cpp/utils/TextPathHelper.cpp +94 -0
  509. package/harmony/svg/src/main/cpp/utils/TextPathHelper.h +61 -0
  510. package/harmony/svg/src/main/ets/RNSVGImageModule.ts +21 -0
  511. package/harmony/svg/src/main/ets/RNSVGRenderableModule.ts +16 -0
  512. package/harmony/svg/src/main/ets/RNSVGSvgViewModule.ts +18 -0
  513. package/harmony/svg/src/main/ets/SvgPackage.ts +58 -0
  514. package/harmony/svg/src/main/module.json5 +7 -0
  515. package/harmony/svg/src/main/resources/base/element/string.json +8 -0
  516. package/harmony/svg/src/main/resources/en_US/element/string.json +8 -0
  517. package/harmony/svg/src/main/resources/zh_CN/element/string.json +8 -0
  518. package/harmony/svg/ts.ts +8 -0
  519. package/harmony/svg.har +0 -0
  520. package/lib/typescript/babel.config.d.ts +8 -0
  521. package/lib/typescript/babel.config.d.ts.map +1 -0
  522. package/lib/typescript/example/babel.config.d.ts +3 -0
  523. package/lib/typescript/example/babel.config.d.ts.map +1 -0
  524. package/lib/typescript/example/contexts.d.ts +3 -0
  525. package/lib/typescript/example/contexts.d.ts.map +1 -0
  526. package/lib/typescript/example/harmony/entry/hvigorfile.d.ts +2 -0
  527. package/lib/typescript/example/harmony/entry/hvigorfile.d.ts.map +1 -0
  528. package/lib/typescript/example/harmony/hvigorfile.d.ts +2 -0
  529. package/lib/typescript/example/harmony/hvigorfile.d.ts.map +1 -0
  530. package/lib/typescript/example/index.d.ts +2 -0
  531. package/lib/typescript/example/index.d.ts.map +1 -0
  532. package/lib/typescript/example/jest.config.d.ts +3 -0
  533. package/lib/typescript/example/jest.config.d.ts.map +1 -0
  534. package/lib/typescript/example/metro.config.d.ts +3 -0
  535. package/lib/typescript/example/metro.config.d.ts.map +1 -0
  536. package/lib/typescript/example/react-native.config.d.ts +3 -0
  537. package/lib/typescript/example/react-native.config.d.ts.map +1 -0
  538. package/lib/typescript/example/scripts/create-build-profile.d.ts +2 -0
  539. package/lib/typescript/example/scripts/create-build-profile.d.ts.map +1 -0
  540. package/lib/typescript/example/src/index.d.ts +3 -0
  541. package/lib/typescript/example/src/index.d.ts.map +1 -0
  542. package/lib/typescript/src/css/index.d.ts.map +1 -0
  543. package/lib/typescript/src/index.d.ts.map +1 -0
  544. package/package.json +10 -15
  545. package/lib/typescript/css/index.d.ts.map +0 -1
  546. package/lib/typescript/index.d.ts.map +0 -1
  547. /package/lib/typescript/{css → src/css}/index.d.ts +0 -0
  548. /package/lib/typescript/{index.d.ts → src/index.d.ts} +0 -0
@@ -0,0 +1,91 @@
1
+ /*
2
+ * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
3
+ * Use of this source code is governed by a MIT license that can be
4
+ * found in the LICENSE file.
5
+ */
6
+
7
+ #include "TextProperties.h"
8
+
9
+ namespace rnoh {
10
+ namespace svg {
11
+
12
+ TextPathMethod textPathMethodFromStr(const std::string &str) {
13
+ if (str == "stretch") {
14
+ return TextPathMethod::stretch;
15
+ } else {
16
+ return TextPathMethod::align;
17
+ }
18
+ }
19
+
20
+ TextPathSide textPathSideFromStr(const std::string &str) {
21
+ if (str == "right") {
22
+ return TextPathSide::right;
23
+ } else {
24
+ return TextPathSide::left;
25
+ }
26
+ }
27
+
28
+ TextPathMidLine textPathMidLineFromStr(const std::string &str) {
29
+ if (str == "sharp") {
30
+ return TextPathMidLine::sharp;
31
+ } else {
32
+ return TextPathMidLine::smooth;
33
+ }
34
+ }
35
+
36
+ TextPathSpacing textPathSpacingFromStr(const std::string &str) {
37
+ if (str == "auto") {
38
+ return TextPathSpacing::Auto;
39
+ } else {
40
+ return TextPathSpacing::Exact;
41
+ }
42
+ }
43
+
44
+ TextLengthAdjust textLengthAdjustFromStr(const std::string &str) {
45
+ if (str == "spacing") {
46
+ return TextLengthAdjust::spacing;
47
+ } else {
48
+ return TextLengthAdjust::spacingAndGlyphs;
49
+ }
50
+ }
51
+
52
+ AlignmentBaseline alignmentBaselineFromStr(const std::string &str) {
53
+ if (str == "baseline") {
54
+ return AlignmentBaseline::baseline;
55
+ } else if (str == "text-bottom") {
56
+ return AlignmentBaseline::textBottom;
57
+ } else if (str == "alphabetic") {
58
+ return AlignmentBaseline::alphabetic;
59
+ } else if (str == "ideographic") {
60
+ return AlignmentBaseline::ideographic;
61
+ } else if (str == "middle") {
62
+ return AlignmentBaseline::middle;
63
+ } else if (str == "central") {
64
+ return AlignmentBaseline::central;
65
+ } else if (str == "mathematical") {
66
+ return AlignmentBaseline::mathematical;
67
+ } else if (str == "text-top") {
68
+ return AlignmentBaseline::textTop;
69
+ } else if (str == "bottom") {
70
+ return AlignmentBaseline::bottom;
71
+ } else if (str == "center") {
72
+ return AlignmentBaseline::center;
73
+ } else if (str == "top") {
74
+ return AlignmentBaseline::top;
75
+ } else if (str == "text-before-edge") {
76
+ return AlignmentBaseline::textBeforeEdge;
77
+ } else if (str == "text-after-edge") {
78
+ return AlignmentBaseline::textAfterEdge;
79
+ } else if (str == "before-edge") {
80
+ return AlignmentBaseline::beforeEdge;
81
+ } else if (str == "after-edge") {
82
+ return AlignmentBaseline::afterEdge;
83
+ } else if (str == "hanging") {
84
+ return AlignmentBaseline::hanging;
85
+ } else {
86
+ return AlignmentBaseline::baseline;
87
+ }
88
+ }
89
+
90
+ } // namespace svg
91
+ } // namespace rnoh
@@ -0,0 +1,56 @@
1
+ /*
2
+ * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
3
+ * Use of this source code is governed by a MIT license that can be
4
+ * found in the LICENSE file.
5
+ */
6
+
7
+ #pragma once
8
+
9
+ #include <string>
10
+
11
+ namespace rnoh {
12
+ namespace svg {
13
+
14
+ enum class AlignmentBaseline {
15
+ baseline,
16
+ textBottom,
17
+ alphabetic,
18
+ ideographic,
19
+ middle,
20
+ central,
21
+ mathematical,
22
+ textTop,
23
+ bottom,
24
+ center,
25
+ top,
26
+ /*
27
+ SVG implementations may support the following aliases in order to support legacy content:
28
+
29
+ text-before-edge = text-top
30
+ text-after-edge = text-bottom
31
+ */
32
+ textBeforeEdge,
33
+ textAfterEdge,
34
+ // SVG 1.1
35
+ beforeEdge,
36
+ afterEdge,
37
+ hanging,
38
+ };
39
+
40
+ enum class TextLengthAdjust { spacing, spacingAndGlyphs };
41
+
42
+ enum class TextPathMethod { align, stretch };
43
+ enum class TextPathMidLine { sharp, smooth };
44
+ enum class TextPathSide { left, right };
45
+ enum class TextPathSpacing { Auto, Exact };
46
+
47
+ AlignmentBaseline alignmentBaselineFromStr(const std::string &str);
48
+ TextLengthAdjust textLengthAdjustFromStr(const std::string &str);
49
+
50
+ TextPathMethod textPathMethodFromStr(const std::string &str);
51
+ TextPathSide textPathSideFromStr(const std::string &str);
52
+ TextPathMidLine textPathMidLineFromStr(const std::string &str);
53
+ TextPathSpacing textPathSpacingFromStr(const std::string &str);
54
+
55
+ } // namespace svg
56
+ } // namespace rnoh
@@ -0,0 +1,108 @@
1
+ /*
2
+ * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
3
+ * Use of this source code is governed by a MIT license that can be
4
+ * found in the LICENSE file.
5
+ */
6
+
7
+ // based on https://svgwg.org/svg2-draft/coords.html#ComputingAViewportsTransform
8
+ #pragma once
9
+
10
+ #include "Rect.h"
11
+ #include "drawing/Matrix.h"
12
+ #include <string>
13
+ #include <glog/logging.h>
14
+
15
+ namespace rnoh {
16
+ namespace svg {
17
+
18
+ class ViewBox {
19
+ private:
20
+ static const int MOS_MEET = 0;
21
+ static const int MOS_SLICE = 1;
22
+ static const int MOS_NONE = 2;
23
+
24
+ public:
25
+ static drawing::Matrix getTransform(const Rect &vbRect, const Rect &eRect, const std::string &align, const int &meetOrSlice) {
26
+ // Let vb-x, vb-y, vb-width, vb-height be the min-x, min-y, width and height values of the
27
+ // viewBox attribute respectively.
28
+ double vbX = vbRect.Left();
29
+ double vbY = vbRect.Top();
30
+ double vbWidth = vbRect.Width();
31
+ double vbHeight = vbRect.Height();
32
+
33
+ // Let e-x, e-y, e-width, e-height be the position and size of the element respectively.
34
+ double eX = eRect.Left();
35
+ double eY = eRect.Top();
36
+ double eWidth = eRect.Width();
37
+ double eHeight = eRect.Height();
38
+
39
+ // Initialize scale-x to e-width/vb-width.
40
+ double scaleX = (vbWidth != 0) ? eWidth / vbWidth : 0.0;
41
+
42
+ // Initialize scale-y to e-height/vb-height.
43
+ double scaleY = (vbHeight != 0) ? eHeight / vbHeight : 0.0;
44
+
45
+ // Initialize translate-x to e-x - (vb-x * scale-x).
46
+ // Initialize translate-y to e-y - (vb-y * scale-y).
47
+ double translateX = eX - (vbX * scaleX);
48
+ double translateY = eY - (vbY * scaleY);
49
+
50
+ // If meetOrSlice is 'none'
51
+ if (meetOrSlice == MOS_NONE) {
52
+ // Let scale be set the smaller value of scale-x and scale-y.
53
+ // Assign scale-x and scale-y to scale.
54
+ double scale = scaleX = scaleY = std::min(scaleX, scaleY);
55
+
56
+ // If scale is greater than 1
57
+ if (scale > 1) {
58
+ // Minus translateX by (eWidth / scale - vbWidth) / 2
59
+ // Minus translateY by (eHeight / scale - vbHeight) / 2
60
+ translateX -= (eWidth / scale - vbWidth) / 2;
61
+ translateY -= (eHeight / scale - vbHeight) / 2;
62
+ } else {
63
+ translateX -= (eWidth - vbWidth * scale) / 2;
64
+ translateY -= (eHeight - vbHeight * scale) / 2;
65
+ }
66
+ } else {
67
+ // If align is not 'none' and meetOrSlice is 'meet', set the larger of scale-x and scale-y to
68
+ // the smaller.
69
+ // Otherwise, if align is not 'none' and meetOrSlice is 'slice', set the smaller of scale-x
70
+ // and scale-y to the larger.
71
+ if (align != "none" && meetOrSlice == MOS_MEET) {
72
+ scaleX = scaleY = std::min(scaleX, scaleY);
73
+ } else if (align != "none" && meetOrSlice == MOS_SLICE) {
74
+ scaleX = scaleY = std::max(scaleX, scaleY);
75
+ }
76
+
77
+ // If align contains 'xMid', add (e-width - vb-width * scale-x) / 2 to translate-x.
78
+ if (align.find("xMid") != std::string::npos) {
79
+ translateX += (eWidth - vbWidth * scaleX) / 2.0;
80
+ }
81
+
82
+ // If align contains 'xMax', add (e-width - vb-width * scale-x) to translate-x.
83
+ if (align.find("xMax") != std::string::npos) {
84
+ translateX += (eWidth - vbWidth * scaleX);
85
+ }
86
+
87
+ // If align contains 'yMid', add (e-height - vb-height * scale-y) / 2 to translate-y.
88
+ if (align.find("YMid") != std::string::npos) {
89
+ translateY += (eHeight - vbHeight * scaleY) / 2.0;
90
+ }
91
+
92
+ // If align contains 'yMax', add (e-height - vb-height * scale-y) to translate-y.
93
+ if (align.find("YMax") != std::string::npos) {
94
+ translateY += (eHeight - vbHeight * scaleY);
95
+ }
96
+ }
97
+
98
+ // The transform applied to content contained by the element is given by
99
+ // translate(translate-x, translate-y) scale(scale-x, scale-y).
100
+ drawing::Matrix transform;
101
+ transform.PostTranslate(static_cast<float>(translateX), static_cast<float>(translateY));
102
+ transform.PreScale(static_cast<float>(scaleX), static_cast<float>(scaleY), 0, 0);
103
+ return transform;
104
+ }
105
+ };
106
+
107
+ } // namespace svg
108
+ } // namespace rnoh
@@ -0,0 +1,41 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #pragma once
9
+
10
+ #include <react/renderer/core/ConcreteComponentDescriptor.h>
11
+ #include <react/renderer/imagemanager/ImageManager.h>
12
+ #include <react/utils/ContextContainer.h>
13
+
14
+ #include "RNSVGImageShadowNode.h"
15
+
16
+ namespace facebook {
17
+ namespace react {
18
+
19
+ /*
20
+ * Descriptor for <RNSVGImage> component.
21
+ */
22
+ class RNSVGImageComponentDescriptor final : public ConcreteComponentDescriptor<RNSVGImageShadowNode> {
23
+ public:
24
+ RNSVGImageComponentDescriptor(ComponentDescriptorParameters const &parameters)
25
+ : ConcreteComponentDescriptor(parameters), imageManager_(std::make_shared<ImageManager>(contextContainer_)){};
26
+
27
+ void adopt(ShadowNode &shadowNode) const override {
28
+ ConcreteComponentDescriptor::adopt(shadowNode);
29
+
30
+ auto &imageShadowNode = static_cast<RNSVGImageShadowNode&>(shadowNode);
31
+ // `RNSVGImageShadowNode` uses `ImageManager` to initiate image loading and
32
+ // communicate the loading state and results to mounting layer.
33
+ imageShadowNode.setImageManager(imageManager_);
34
+ }
35
+
36
+ private:
37
+ const SharedImageManager imageManager_;
38
+ };
39
+
40
+ } // namespace react
41
+ } // namespace facebook
@@ -0,0 +1,62 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #include <cstdlib>
9
+ #include <limits>
10
+
11
+ #include <react/renderer/core/LayoutContext.h>
12
+
13
+ #include "RNSVGImageShadowNode.h"
14
+
15
+ namespace facebook {
16
+ namespace react {
17
+
18
+ const char RNSVGImageComponentName[] = "RNSVGImage";
19
+
20
+ void RNSVGImageShadowNode::setImageManager(const SharedImageManager &imageManager) {
21
+ ensureUnsealed();
22
+ imageManager_ = imageManager;
23
+ }
24
+
25
+ ImageSource RNSVGImageShadowNode::getImageSource() const {
26
+ auto source = getConcreteProps().src;
27
+
28
+ auto layoutMetrics = getLayoutMetrics();
29
+ auto size = layoutMetrics.getContentFrame().size;
30
+ auto scale = layoutMetrics.pointScaleFactor;
31
+ source.size = size;
32
+ source.scale = scale;
33
+ return source;
34
+ }
35
+
36
+ void RNSVGImageShadowNode::updateStateIfNeeded() {
37
+ ensureUnsealed();
38
+
39
+ auto imageSource = getImageSource();
40
+ auto const &currentState = getStateData();
41
+ bool hasSameImageSource = currentState.getImageSource() == imageSource;
42
+
43
+ if (hasSameImageSource) {
44
+ return;
45
+ }
46
+
47
+ auto state = RNSVGImageState{
48
+ imageSource,
49
+ imageManager_->requestImage(imageSource, getSurfaceId()),
50
+ };
51
+ setStateData(std::move(state));
52
+ }
53
+
54
+ #pragma mark - LayoutableShadowNode
55
+
56
+ void RNSVGImageShadowNode::layout(LayoutContext layoutContext) {
57
+ updateStateIfNeeded();
58
+ ConcreteViewShadowNode::layout(layoutContext);
59
+ }
60
+
61
+ } // namespace react
62
+ } // namespace facebook
@@ -0,0 +1,63 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #pragma once
9
+
10
+ #include <jsi/jsi.h>
11
+ #include <react/renderer/components/react_native_svg/EventEmitters.h>
12
+ #include <react/renderer/components/react_native_svg/Props.h>
13
+ #include <react/renderer/components/view/ConcreteViewShadowNode.h>
14
+ #include <react/renderer/imagemanager/ImageManager.h>
15
+ #include <react/renderer/imagemanager/primitives.h>
16
+
17
+ #include "RNSVGImageState.h"
18
+
19
+ namespace facebook {
20
+ namespace react {
21
+
22
+ JSI_EXPORT extern const char RNSVGImageComponentName[];
23
+
24
+ /*
25
+ * `ShadowNode` for <RNSVGImage> component.
26
+ */
27
+ class JSI_EXPORT RNSVGImageShadowNode final
28
+ : public ConcreteViewShadowNode<RNSVGImageComponentName, RNSVGImageProps, ViewEventEmitter, RNSVGImageState> {
29
+ public:
30
+ using ConcreteViewShadowNode::ConcreteViewShadowNode;
31
+
32
+ static ShadowNodeTraits BaseTraits() {
33
+ auto traits = ConcreteViewShadowNode::BaseTraits();
34
+ traits.set(ShadowNodeTraits::Trait::LeafYogaNode);
35
+ return traits;
36
+ }
37
+
38
+ /*
39
+ * Associates a shared `ImageManager` with the node.
40
+ */
41
+ void setImageManager(const SharedImageManager &imageManager);
42
+
43
+ static RNSVGImageState initialStateData(Props::Shared const &props,
44
+ ShadowNodeFamily::Shared const &family,
45
+ ComponentDescriptor const &componentDescriptor) {
46
+ auto imageSource = ImageSource{ImageSource::Type::Invalid};
47
+ return {imageSource, {imageSource, nullptr, {}}};
48
+ }
49
+
50
+ #pragma mark - LayoutableShadowNode
51
+
52
+ void layout(LayoutContext layoutContext) override;
53
+
54
+ private:
55
+ ImageSource getImageSource() const;
56
+
57
+ SharedImageManager imageManager_;
58
+
59
+ void updateStateIfNeeded();
60
+ };
61
+
62
+ } // namespace react
63
+ } // namespace facebook
@@ -0,0 +1,17 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #include "RNSVGImageState.h"
9
+
10
+ namespace facebook {
11
+ namespace react {
12
+
13
+ ImageSource RNSVGImageState::getImageSource() const { return imageSource_; }
14
+
15
+ ImageRequest const &RNSVGImageState::getImageRequest() const { return *imageRequest_; }
16
+ } // namespace react
17
+ } // namespace facebook
@@ -0,0 +1,58 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #pragma once
9
+
10
+ #include <jsi/jsi.h>
11
+ #include <react/renderer/imagemanager/ImageRequest.h>
12
+ #include <react/renderer/imagemanager/primitives.h>
13
+
14
+ #ifdef ANDROID
15
+ #include <react/renderer/mapbuffer/MapBuffer.h>
16
+ #include <react/renderer/mapbuffer/MapBufferBuilder.h>
17
+ #endif
18
+
19
+ namespace facebook {
20
+ namespace react {
21
+
22
+ /*
23
+ * State for <Image> component.
24
+ */
25
+ class JSI_EXPORT RNSVGImageState final {
26
+ public:
27
+ RNSVGImageState(ImageSource const &imageSource, ImageRequest imageRequest)
28
+ : imageSource_(imageSource), imageRequest_(std::make_shared<ImageRequest>(std::move(imageRequest))){};
29
+
30
+ /*
31
+ * Returns stored ImageSource object.
32
+ */
33
+ ImageSource getImageSource() const;
34
+
35
+ /*
36
+ * Exposes for reading stored `ImageRequest` object.
37
+ * `ImageRequest` object cannot be copied or moved from `ImageLocalData`.
38
+ */
39
+ ImageRequest const &getImageRequest() const;
40
+
41
+ #ifdef ANDROID
42
+ RNSVGImageState(RNSVGImageState const &previousState, folly::dynamic data){};
43
+
44
+ /*
45
+ * Empty implementation for Android because it doesn't use this class.
46
+ */
47
+ folly::dynamic getDynamic() const { return {}; };
48
+
49
+ MapBuffer getMapBuffer() const { return MapBufferBuilder::EMPTY(); };
50
+ #endif
51
+
52
+ private:
53
+ ImageSource imageSource_;
54
+ std::shared_ptr<ImageRequest> imageRequest_;
55
+ };
56
+
57
+ } // namespace react
58
+ } // namespace facebook
@@ -0,0 +1,83 @@
1
+ /*
2
+ * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
3
+ * Use of this source code is governed by a MIT license that can be
4
+ * found in the LICENSE file.
5
+ */
6
+
7
+ #include "RNSVGImageModule.h"
8
+ #include "utils/StringUtils.h"
9
+
10
+ using namespace facebook;
11
+
12
+ namespace rnoh {
13
+ namespace svg {
14
+ RNSVGImageModule::RNSVGImageModule(const ArkTSTurboModule::Context ctx, const std::string name)
15
+ : ArkTSTurboModule(ctx, name) {
16
+ methodMap_ = {
17
+ ARK_ASYNC_METHOD_METADATA(getCacheDir, 0),
18
+ };
19
+
20
+ // 获取缓存路径前缀
21
+ auto cache = this->callSync("getCacheDir", {});
22
+ m_fileCacheDir = cache.asString() + "/";
23
+
24
+ // 确保缓存目录存在
25
+ try {
26
+ fs::path cachePath(m_fileCacheDir);
27
+ if (!fs::exists(cachePath)) {
28
+ if (auto result = fs::create_directories(cachePath)) {
29
+ LOG(INFO) << "[SVGImage] Created cache directory: " << m_fileCacheDir;
30
+ } else {
31
+ LOG(WARNING) << "[SVGImage] Failed to create cache directory: " << m_fileCacheDir;
32
+ }
33
+ } else if (!fs::is_directory(cachePath)) {
34
+ LOG(ERROR) << "[SVGImage] Cache path exists but is not a directory: " << m_fileCacheDir;
35
+ // 尝试创建备份目录
36
+ std::string backupDir = m_fileCacheDir + "_backup";
37
+ fs::create_directories(backupDir);
38
+ m_fileCacheDir = backupDir + "/";
39
+ LOG(INFO) << "[SVGImage] Using backup cache directory: " << m_fileCacheDir;
40
+ }
41
+ } catch (const std::exception& e) {
42
+ LOG(ERROR) << "[SVGImage] Error creating/validating cache directory: " << e.what();
43
+ // 使用临时目录作为后备方案
44
+ m_fileCacheDir = "/data/local/tmp/rnsvg_cache/";
45
+ try {
46
+ fs::create_directories(m_fileCacheDir);
47
+ } catch (...) {
48
+ LOG(ERROR) << "[SVGImage] Failed to create temp cache directory";
49
+ }
50
+ }
51
+
52
+ m_imageSourceResolver = std::make_shared<ImageSourceResolver>(m_fileCacheDir);
53
+
54
+ fs::path directoryPath = m_fileCacheDir;
55
+ // 将已有的缓存文件名放入remoteImageSourceMap
56
+ if (fs::exists(directoryPath) && fs::is_directory(directoryPath)) {
57
+ for (const auto &entry : fs::directory_iterator(directoryPath)) {
58
+ if (fs::is_regular_file(entry.path())) {
59
+ m_imageSourceResolver->remoteImageSourceMap_.put(entry.path().filename(), true);
60
+ }
61
+ }
62
+ }
63
+ }
64
+
65
+ /**
66
+ *
67
+ * @param uri 图片uri
68
+ * @param headers 请求头
69
+ */
70
+ void RNSVGImageModule::downloadImage(const std::string &uri, const std::map<std::string, std::string> &headers) {
71
+ HttpTaskProcessor *processor = new HttpTaskProcessor();
72
+ processor->instance_ = m_imageSourceResolver;
73
+ processor->filePath_ = m_fileCacheDir + StringUtils::generateHash(uri);
74
+
75
+ if (headers.empty()) {
76
+ processor->launchHttpRequest(uri.c_str());
77
+ } else {
78
+ processor->launchHttpRequestWithHeaders(uri.c_str(), headers);
79
+ }
80
+ }
81
+
82
+ } // namespace svg
83
+ } // namespace rnoh
@@ -0,0 +1,32 @@
1
+ /*
2
+ * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
3
+ * Use of this source code is governed by a MIT license that can be
4
+ * found in the LICENSE file.
5
+ */
6
+
7
+ #pragma once
8
+
9
+ #include <ReactCommon/TurboModule.h>
10
+ #include "RNOH/ArkTSTurboModule.h"
11
+ #include "downloadUtils/ImageSourceResolver.h"
12
+ #include "downloadUtils/HttpTaskProcessor.h"
13
+
14
+ namespace rnoh {
15
+ namespace svg {
16
+
17
+ class JSI_EXPORT RNSVGImageModule : public ArkTSTurboModule {
18
+ public:
19
+ RNSVGImageModule(const ArkTSTurboModule::Context ctx, const std::string name);
20
+
21
+ ~RNSVGImageModule() { HttpTaskProcessor::destroyAllTask(); }
22
+
23
+ void downloadImage(const std::string &uri, const std::map<std::string, std::string> &headers);
24
+
25
+ std::shared_ptr<ImageSourceResolver> getImageSourceResolver() { return m_imageSourceResolver; }
26
+
27
+ private:
28
+ std::string m_fileCacheDir;
29
+ std::shared_ptr<ImageSourceResolver> m_imageSourceResolver = nullptr;
30
+ };
31
+ } // namespace svg
32
+ } // namespace rnoh