From 14201f6e4b98f5078d01bdd89c2bf33313072893 Mon Sep 17 00:00:00 2001 From: wuya_smile Date: Fri, 19 Apr 2024 11:44:44 +0800 Subject: [PATCH 01/16] =?UTF-8?q?react-native-image-sequence=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0harmony=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “leehom6666” --- android/build.gradle | 41 --- android/gradle.properties | 6 - android/gradle/wrapper/gradle-wrapper.jar | Bin 54329 -> 0 bytes .../gradle/wrapper/gradle-wrapper.properties | 6 - android/gradlew | 172 ------------ android/gradlew.bat | 84 ------ android/src/main/AndroidManifest.xml | 3 - .../RCTImageSequenceManager.java | 89 ------ .../RCTImageSequencePackage.java | 29 -- .../imageSequence/RCTImageSequenceView.java | 265 ------------------ .../RCTResourceDrawableIdHelper.java | 51 ---- harmony/image_sequence/.gitignore | 6 + harmony/image_sequence/Index.ets | 1 + harmony/image_sequence/build-profile.json5 | 28 ++ harmony/image_sequence/consumer-rules.txt | 0 harmony/image_sequence/hvigorfile.ts | 1 + harmony/image_sequence/obfuscation-rules.txt | 18 ++ harmony/image_sequence/oh-package-lock.json5 | 13 + harmony/image_sequence/oh-package.json5 | 14 + .../src/main/cpp/CMakeLists.txt | 8 + .../src/main/cpp/ComponentDescriptors.h | 21 ++ .../src/main/cpp/EventEmitters.cpp | 17 ++ .../src/main/cpp/EventEmitters.h | 25 ++ .../src/main/cpp/ImageSequenceJSIBinder.h | 17 ++ .../src/main/cpp/ImageSequenceNapiBinder.h | 31 ++ .../src/main/cpp/ImageSequencePackage.h | 24 ++ .../cpp/ImageSequenceSpecsJSI-generated.cpp | 19 ++ .../src/main/cpp/ImageSequenceSpecsJSI.h | 21 ++ harmony/image_sequence/src/main/cpp/Props.cpp | 30 ++ harmony/image_sequence/src/main/cpp/Props.h | 34 +++ .../src/main/cpp/ShadowNodes.cpp | 20 ++ .../image_sequence/src/main/cpp/ShadowNodes.h | 34 +++ .../image_sequence/src/main/cpp/States.cpp | 18 ++ harmony/image_sequence/src/main/cpp/States.h | 36 +++ .../src/main/ets/RNImageSequence.ets | 155 ++++++++++ harmony/image_sequence/src/main/module.json5 | 11 + .../main/resources/base/element/string.json | 8 + .../main/resources/en_US/element/string.json | 8 + .../main/resources/zh_CN/element/string.json | 8 + harmony/image_sequence/src/test/List.test.ets | 5 + .../src/test/LocalUnit.test.ets | 33 +++ index.js | 61 ---- index.tsx | 52 ++++ .../project.pbxproj | 262 ----------------- .../RCTImageSequenceManager.h | 11 - .../RCTImageSequenceManager.m | 23 -- ios/RCTImageSequence/RCTImageSequenceView.h | 11 - ios/RCTImageSequence/RCTImageSequenceView.m | 140 --------- package.json | 53 ++-- .../ImageSequenceNativeComponent.ts | 31 +- 50 files changed, 770 insertions(+), 1284 deletions(-) delete mode 100644 android/build.gradle delete mode 100644 android/gradle.properties delete mode 100644 android/gradle/wrapper/gradle-wrapper.jar delete mode 100644 android/gradle/wrapper/gradle-wrapper.properties delete mode 100755 android/gradlew delete mode 100644 android/gradlew.bat delete mode 100644 android/src/main/AndroidManifest.xml delete mode 100644 android/src/main/java/dk/madslee/imageSequence/RCTImageSequenceManager.java delete mode 100644 android/src/main/java/dk/madslee/imageSequence/RCTImageSequencePackage.java delete mode 100644 android/src/main/java/dk/madslee/imageSequence/RCTImageSequenceView.java delete mode 100644 android/src/main/java/dk/madslee/imageSequence/RCTResourceDrawableIdHelper.java create mode 100644 harmony/image_sequence/.gitignore create mode 100644 harmony/image_sequence/Index.ets create mode 100644 harmony/image_sequence/build-profile.json5 create mode 100644 harmony/image_sequence/consumer-rules.txt create mode 100644 harmony/image_sequence/hvigorfile.ts create mode 100644 harmony/image_sequence/obfuscation-rules.txt create mode 100644 harmony/image_sequence/oh-package-lock.json5 create mode 100644 harmony/image_sequence/oh-package.json5 create mode 100644 harmony/image_sequence/src/main/cpp/CMakeLists.txt create mode 100644 harmony/image_sequence/src/main/cpp/ComponentDescriptors.h create mode 100644 harmony/image_sequence/src/main/cpp/EventEmitters.cpp create mode 100644 harmony/image_sequence/src/main/cpp/EventEmitters.h create mode 100644 harmony/image_sequence/src/main/cpp/ImageSequenceJSIBinder.h create mode 100644 harmony/image_sequence/src/main/cpp/ImageSequenceNapiBinder.h create mode 100644 harmony/image_sequence/src/main/cpp/ImageSequencePackage.h create mode 100644 harmony/image_sequence/src/main/cpp/ImageSequenceSpecsJSI-generated.cpp create mode 100644 harmony/image_sequence/src/main/cpp/ImageSequenceSpecsJSI.h create mode 100644 harmony/image_sequence/src/main/cpp/Props.cpp create mode 100644 harmony/image_sequence/src/main/cpp/Props.h create mode 100644 harmony/image_sequence/src/main/cpp/ShadowNodes.cpp create mode 100644 harmony/image_sequence/src/main/cpp/ShadowNodes.h create mode 100644 harmony/image_sequence/src/main/cpp/States.cpp create mode 100644 harmony/image_sequence/src/main/cpp/States.h create mode 100644 harmony/image_sequence/src/main/ets/RNImageSequence.ets create mode 100644 harmony/image_sequence/src/main/module.json5 create mode 100644 harmony/image_sequence/src/main/resources/base/element/string.json create mode 100644 harmony/image_sequence/src/main/resources/en_US/element/string.json create mode 100644 harmony/image_sequence/src/main/resources/zh_CN/element/string.json create mode 100644 harmony/image_sequence/src/test/List.test.ets create mode 100644 harmony/image_sequence/src/test/LocalUnit.test.ets delete mode 100644 index.js create mode 100644 index.tsx delete mode 100644 ios/RCTImageSequence.xcodeproj/project.pbxproj delete mode 100644 ios/RCTImageSequence/RCTImageSequenceManager.h delete mode 100644 ios/RCTImageSequence/RCTImageSequenceManager.m delete mode 100644 ios/RCTImageSequence/RCTImageSequenceView.h delete mode 100644 ios/RCTImageSequence/RCTImageSequenceView.m rename typings/index.d.ts => src/ImageSequenceNativeComponent.ts (47%) diff --git a/android/build.gradle b/android/build.gradle deleted file mode 100644 index 77c1891..0000000 --- a/android/build.gradle +++ /dev/null @@ -1,41 +0,0 @@ -buildscript { - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.5.2' - } -} - -def getExtOrDefault(name, fallback) { - return rootProject.ext.has(name) ? rootProject.ext.get(name) : fallback -} - -apply plugin: 'com.android.library' - -android { - compileSdkVersion getExtOrDefault('compileSdkVersion', 28) - buildToolsVersion getExtOrDefault('buildToolsVersion', "28.0.3") - - defaultConfig { - minSdkVersion 16 - targetSdkVersion getExtOrDefault('targetSdkVersion', 28) - versionCode 1 - versionName "1.0" - } - lintOptions { - abortOnError false - } -} - -repositories { - google() - jcenter() - mavenCentral() -} - -dependencies { - api 'com.facebook.react:react-native:+' -} diff --git a/android/gradle.properties b/android/gradle.properties deleted file mode 100644 index 289b49d..0000000 --- a/android/gradle.properties +++ /dev/null @@ -1,6 +0,0 @@ -# AndroidX package structure to make it clearer which packages are bundled with the -# Android operating system, and which are packaged with your app's APK -# https://developer.android.com/topic/libraries/support-library/androidx-rn -android.useAndroidX=true -# Automatically convert third-party libraries to use AndroidX -android.enableJetifier=true \ No newline at end of file diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 01b8bf6b1f99cad9213fc495b33ad5bbab8efd20..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 54329 zcmagFV|ZrKvM!pAZQHhO+qP}9lTNj?q^^Y^VFp)SH8qbSJ)2BQ2giqeFT zAwqu@)c?v~^Z#E_K}1nTQbJ9gQ9<%vVRAxVj)8FwL5_iTdUB>&m3fhE=kRWl;g`&m z!W5kh{WsV%fO*%je&j+Lv4xxK~zsEYQls$Q-p&dwID|A)!7uWtJF-=Tm1{V@#x*+kUI$=%KUuf2ka zjiZ{oiL1MXE2EjciJM!jrjFNwCh`~hL>iemrqwqnX?T*MX;U>>8yRcZb{Oy+VKZos zLiFKYPw=LcaaQt8tj=eoo3-@bG_342HQ%?jpgAE?KCLEHC+DmjxAfJ%Og^$dpC8Xw zAcp-)tfJm}BPNq_+6m4gBgBm3+CvmL>4|$2N$^Bz7W(}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iMb2Qk2^-fHr0VWM=p)9vIcH@vQ6}bS*6Yn+<0` zHS-Vv-qdTr#{}n3wF3e|XZ$C;U)Qd{m8L}r&_O_ewZqTP@pJJM`6Zf!wef%L?Uz~3 zpTS_ne+l+mInQ6()XNOo&n#$?|C{C4&G0hQ=rg7e;4A)%PJcP|_)Ff=moW%6^ug z8A_gu6#(#0?fWxw=jFpM^OZb5obmUE|C2J}zt06c~G6javMT=uh?kFRJn{;a>`(Kf~)={S*9)sq#zMmpb6ju-(@G1p8+%!%NJUqO#AJ zLyrH1`9}=EfBQ1Nly7}TZE*Sx)c-E#`m*{jB`KeY#NB?E=#S?4w?O4ff|v4t&jdW4 zzd`U1Vt_B1UW$Z0Gx_`c2GegzhP~u`sr&TIN$CF@od2W(^^)qPP{uQrcGz!F{ex`A zOQx5i1kX&Gk-x$8hdJ>6Qlj7`)yr7$XDZp4-=+e5Uu^!Y>-Li5WoYd)iE;dIll<|% z{z+`)CCkeg&Sw^b#NTH5b42G$f|v1g&jg|=|DOc^tHoYMG(A({rT+%i|7@$5p)Jq& zu9?4q|IdLgFWc>9B)~ISBVax9V!-~>SoO!R`1K^~<^J \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn () { - echo "$*" -} - -die () { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=$(save "$@") - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - -exec "$JAVACMD" "$@" diff --git a/android/gradlew.bat b/android/gradlew.bat deleted file mode 100644 index e95643d..0000000 --- a/android/gradlew.bat +++ /dev/null @@ -1,84 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml deleted file mode 100644 index 6d68eae..0000000 --- a/android/src/main/AndroidManifest.xml +++ /dev/null @@ -1,3 +0,0 @@ - - diff --git a/android/src/main/java/dk/madslee/imageSequence/RCTImageSequenceManager.java b/android/src/main/java/dk/madslee/imageSequence/RCTImageSequenceManager.java deleted file mode 100644 index 06000e2..0000000 --- a/android/src/main/java/dk/madslee/imageSequence/RCTImageSequenceManager.java +++ /dev/null @@ -1,89 +0,0 @@ -package dk.madslee.imageSequence; - -import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; -import com.facebook.react.uimanager.SimpleViewManager; -import com.facebook.react.uimanager.ThemedReactContext; -import com.facebook.react.uimanager.annotations.ReactProp; - -import java.util.ArrayList; - - -public class RCTImageSequenceManager extends SimpleViewManager { - @Override - public String getName() { - return "RCTImageSequence"; - } - - @Override - protected RCTImageSequenceView createViewInstance(ThemedReactContext reactContext) { - return new RCTImageSequenceView(reactContext); - } - - /** - * sets the speed of the animation. - * - * @param view - * @param framesPerSecond - */ - @ReactProp(name = "framesPerSecond") - public void setFramesPerSecond(final RCTImageSequenceView view, Integer framesPerSecond) { - view.setFramesPerSecond(framesPerSecond); - } - - /** - * @param view - * @param images an array of ReadableMap's {uri: "http://...."} return value of the resolveAssetSource(....) - */ - @ReactProp(name = "images") - public void setImages(final RCTImageSequenceView view, ReadableArray images) { - ArrayList uris = new ArrayList<>(); - for (int index = 0; index < images.size(); index++) { - ReadableMap map = images.getMap(index); - uris.add(map.getString("uri")); - } - - view.setImages(uris); - } - - /** - * sets if animations is looped indefinitely. - * - * @param view - * @param loop - */ - @ReactProp(name = "loop") - public void setLoop(final RCTImageSequenceView view, Boolean loop) { - view.setLoop(loop); - } - - /** - * sets if the animation is currently playing or not - */ - @ReactProp(name = "animate") - public void setAnimate(final RCTImageSequenceView view, Boolean animate) { - view.setAnimate(animate); - } - - /** - * sets the width for optional downsampling. - * - * @param view - * @param downsampleWidth - */ - @ReactProp(name = "downsampleWidth") - public void setDownsampleWidth(final RCTImageSequenceView view, Integer downsampleWidth) { - view.setDownsampleWidth(downsampleWidth); - } - - /** - * sets the height for optional downsampling. - * - * @param view - * @param downsampleHeight - */ - @ReactProp(name = "downsampleHeight") - public void setDownsampleHeight(final RCTImageSequenceView view, Integer downsampleHeight) { - view.setDownsampleHeight(downsampleHeight); - } -} diff --git a/android/src/main/java/dk/madslee/imageSequence/RCTImageSequencePackage.java b/android/src/main/java/dk/madslee/imageSequence/RCTImageSequencePackage.java deleted file mode 100644 index 7f9c9e2..0000000 --- a/android/src/main/java/dk/madslee/imageSequence/RCTImageSequencePackage.java +++ /dev/null @@ -1,29 +0,0 @@ -package dk.madslee.imageSequence; - -import com.facebook.react.ReactPackage; -import com.facebook.react.bridge.JavaScriptModule; -import com.facebook.react.bridge.NativeModule; -import com.facebook.react.bridge.ReactApplicationContext; -import com.facebook.react.uimanager.ViewManager; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -public class RCTImageSequencePackage implements ReactPackage { - - @Override - public List createNativeModules(ReactApplicationContext reactContext) { - return Collections.emptyList(); - } - - // Deprecated RN 0.47 - public List> createJSModules() { - return Collections.emptyList(); - } - - @Override - public List createViewManagers(ReactApplicationContext reactContext) { - return Arrays.asList(new RCTImageSequenceManager()); - } -} diff --git a/android/src/main/java/dk/madslee/imageSequence/RCTImageSequenceView.java b/android/src/main/java/dk/madslee/imageSequence/RCTImageSequenceView.java deleted file mode 100644 index 5fc79c9..0000000 --- a/android/src/main/java/dk/madslee/imageSequence/RCTImageSequenceView.java +++ /dev/null @@ -1,265 +0,0 @@ -package dk.madslee.imageSequence; - -import android.content.Context; -import android.content.res.Resources; -import android.graphics.Bitmap; -import android.graphics.BitmapFactory; -import android.graphics.drawable.AnimationDrawable; -import android.graphics.drawable.BitmapDrawable; -import android.graphics.drawable.Drawable; -import android.util.Log; -import android.os.AsyncTask; -import android.os.Handler; -import android.util.SparseArray; - -import java.io.File; -import java.io.InputStream; -import java.net.URI; -import java.net.URL; -import java.util.ArrayList; -import java.util.concurrent.RejectedExecutionException; -import androidx.appcompat.widget.AppCompatImageView; - - -public class RCTImageSequenceView extends AppCompatImageView { - private static final String TAG = RCTImageSequenceView.class.getName(); - - private final Handler handler = new Handler(); - - private Integer framesPerSecond = 24; - private Boolean loop = true; - private Integer downsampleWidth = -1; - private Integer downsampleHeight = -1; - private ArrayList activeTasks = null; - private SparseArray bitmaps = null; - private RCTResourceDrawableIdHelper resourceDrawableIdHelper; - private Boolean animate = true; - - public RCTImageSequenceView(Context context) { - super(context); - - resourceDrawableIdHelper = new RCTResourceDrawableIdHelper(); - } - - private class DownloadImageTask extends AsyncTask { - private final Integer index; - private final String uri; - private final Context context; - - public DownloadImageTask(Integer index, String uri, Context context) { - this.index = index; - this.uri = uri; - this.context = context; - } - - @Override - protected Bitmap doInBackground(String... params) { - try { - if (this.uri.startsWith("http")) { - return this.loadBitmapByExternalURL(this.uri); - } else if (this.uri.startsWith("file://")) { - File file = new File(new URI(this.uri)); - return BitmapFactory.decodeFile(file.getAbsolutePath()); - } - - return this.loadBitmapByLocalResource(this.uri); - } catch (Exception e) { - - } - return null; - } - - private Bitmap loadBitmapByLocalResource(String uri) { - Resources res = this.context.getResources(); - int resId = resourceDrawableIdHelper.getResourceDrawableId(this.context, uri); - - if (downsampleWidth <= 0 || downsampleHeight <= 0) { - // Downsampling is not set so just decode normally - return BitmapFactory.decodeResource(res, resId); - } - - // First decode with inJustDecodeBounds=true to check dimensions - final BitmapFactory.Options options = new BitmapFactory.Options(); - options.inJustDecodeBounds = true; - BitmapFactory.decodeResource(res, resId, options); - - // Calculate inSampleSize - options.inSampleSize = RCTImageSequenceView.calculateInSampleSize(options, downsampleWidth, downsampleHeight); - - // Decode bitmap with inSampleSize set - options.inJustDecodeBounds = false; - return BitmapFactory.decodeResource(res, resId, options); - } - - private Bitmap loadBitmapByExternalURL(String uri) { - Bitmap bitmap = null; - InputStream in = null; - - try { - in = new URL(uri).openStream(); - bitmap = BitmapFactory.decodeStream(in); - } catch (Exception e) { - e.printStackTrace(); - } finally { - try { - if (in != null) { - in.close(); - } - } catch (Exception e) { - } - } - - return bitmap; - } - - @Override - protected void onPostExecute(Bitmap bitmap) { - if (!isCancelled() && bitmap != null) { - onTaskCompleted(this, index, bitmap); - } - } - } - - private void onTaskCompleted(DownloadImageTask downloadImageTask, Integer index, Bitmap bitmap) { - if (index == 0) { - // first image should be displayed as soon as possible. - this.setImageBitmap(bitmap); - } - - bitmaps.put(index, bitmap); - activeTasks.remove(downloadImageTask); - - if (activeTasks.isEmpty()) { - setupAnimationDrawable(); - } - } - - public static int calculateInSampleSize(BitmapFactory.Options options, int reqWidth, int reqHeight) { - // Raw height and width of image - final int height = options.outHeight; - final int width = options.outWidth; - int inSampleSize = 1; - - if (height > reqHeight || width > reqWidth) { - final int halfHeight = height / 2; - final int halfWidth = width / 2; - - // Calculate the largest inSampleSize value that is a power of 2 and keeps both - // height and width larger than the requested height and width. - while ((halfHeight / inSampleSize) >= reqHeight - && (halfWidth / inSampleSize) >= reqWidth) { - inSampleSize *= 2; - } - } - - return inSampleSize; - } - - public void setImages(final ArrayList uris) { - // Cancel any previously queued Runnables - handler.removeCallbacksAndMessages(null); - - Drawable drawable = getDrawable(); - if(drawable instanceof AnimationDrawable){ - ((AnimationDrawable)drawable).stop(); - } - - if (isLoading()) { - // Cancel ongoing tasks (if still loading previous images) - for (int index = 0; index < activeTasks.size(); index++) { - activeTasks.get(index).cancel(true); - } - } - - activeTasks = null; - bitmaps = null; - - final Runnable r = new Runnable() { - public void run() { - activeTasks = new ArrayList<>(uris.size()); - bitmaps = new SparseArray<>(uris.size()); - - for (int index = 0; index < uris.size(); index++) { - DownloadImageTask task = new DownloadImageTask(index, uris.get(index), getContext()); - activeTasks.add(task); - - try { - task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); - } catch (RejectedExecutionException e){ - Log.e(TAG, "DownloadImageTask failed" + e.getMessage()); - break; - } - } - } - }; - - // Delay for 1ms to make sure that all the props have been set properly before starting processing - final boolean added = handler.postDelayed(r, 1); - if (!added) { - Log.e(TAG, "Failed to place Runnable in to the message queue"); - } - } - - public void setFramesPerSecond(Integer framesPerSecond) { - this.framesPerSecond = framesPerSecond; - - // updating frames per second, results in building a new AnimationDrawable (because we cant alter frame duration) - if (isLoaded()) { - setupAnimationDrawable(); - } - } - - public void setLoop(Boolean loop) { - this.loop = loop; - - // updating looping, results in building a new AnimationDrawable - if (isLoaded()) { - setupAnimationDrawable(); - } - } - - public void setDownsampleWidth(Integer downsampleWidth) { - this.downsampleWidth = downsampleWidth; - } - - public void setDownsampleHeight(Integer downsampleHeight) { - this.downsampleHeight = downsampleHeight; - } - - public void setAnimate(Boolean animate) { - Drawable drawable = getDrawable(); - if(drawable instanceof AnimationDrawable){ - AnimationDrawable animationDrawable = (AnimationDrawable)drawable; - if (animate && !animationDrawable.isRunning()) { - animationDrawable.start(); - } else if (!animate && animationDrawable.isRunning()) { - animationDrawable.stop(); - animationDrawable.selectDrawable(0); - } - } - this.animate = animate; - } - - private boolean isLoaded() { - return !isLoading() && bitmaps != null && bitmaps.size() > 0; - } - - private boolean isLoading() { - return activeTasks != null && !activeTasks.isEmpty(); - } - - private void setupAnimationDrawable() { - AnimationDrawable animationDrawable = new AnimationDrawable(); - for (int index = 0; index < bitmaps.size(); index++) { - BitmapDrawable drawable = new BitmapDrawable(this.getResources(), bitmaps.get(index)); - animationDrawable.addFrame(drawable, 1000 / framesPerSecond); - } - - animationDrawable.setOneShot(!this.loop); - - this.setImageDrawable(animationDrawable); - if (this.animate) { - animationDrawable.start(); - } - } -} diff --git a/android/src/main/java/dk/madslee/imageSequence/RCTResourceDrawableIdHelper.java b/android/src/main/java/dk/madslee/imageSequence/RCTResourceDrawableIdHelper.java deleted file mode 100644 index f3b12a0..0000000 --- a/android/src/main/java/dk/madslee/imageSequence/RCTResourceDrawableIdHelper.java +++ /dev/null @@ -1,51 +0,0 @@ -package dk.madslee.imageSequence; - -import android.content.Context; -import android.graphics.drawable.Drawable; -import android.net.Uri; -import androidx.core.content.ContextCompat; - -import java.util.HashMap; -import java.util.Map; -import javax.annotation.Nullable; - -import com.facebook.common.util.UriUtil; - - -public class RCTResourceDrawableIdHelper { - - private Map mResourceDrawableIdMap; - - public RCTResourceDrawableIdHelper() { - mResourceDrawableIdMap = new HashMap<>(); - } - - public int getResourceDrawableId(Context context, @Nullable String name) { - if (name == null || name.isEmpty()) { - return 0; - } - name = name.toLowerCase().replace("-", "_"); - if (mResourceDrawableIdMap.containsKey(name)) { - return mResourceDrawableIdMap.get(name); - } - int id = context.getResources().getIdentifier( - name, - "drawable", - context.getPackageName()); - mResourceDrawableIdMap.put(name, id); - return id; - } - - public @Nullable Drawable getResourceDrawable(Context context, @Nullable String name) { - int resId = getResourceDrawableId(context, name); - return resId > 0 ? ContextCompat.getDrawable(context, resId) : null; - } - - public Uri getResourceDrawableUri(Context context, @Nullable String name) { - int resId = getResourceDrawableId(context, name); - return resId > 0 ? new Uri.Builder() - .scheme(UriUtil.LOCAL_RESOURCE_SCHEME) - .path(String.valueOf(resId)) - .build() : Uri.EMPTY; - } -} diff --git a/harmony/image_sequence/.gitignore b/harmony/image_sequence/.gitignore new file mode 100644 index 0000000..e2713a2 --- /dev/null +++ b/harmony/image_sequence/.gitignore @@ -0,0 +1,6 @@ +/node_modules +/oh_modules +/.preview +/build +/.cxx +/.test \ No newline at end of file diff --git a/harmony/image_sequence/Index.ets b/harmony/image_sequence/Index.ets new file mode 100644 index 0000000..d4b69c8 --- /dev/null +++ b/harmony/image_sequence/Index.ets @@ -0,0 +1 @@ +export * from './src/main/ets/RNImageSequence' diff --git a/harmony/image_sequence/build-profile.json5 b/harmony/image_sequence/build-profile.json5 new file mode 100644 index 0000000..312d38e --- /dev/null +++ b/harmony/image_sequence/build-profile.json5 @@ -0,0 +1,28 @@ +{ + "apiType": "stageMode", + "buildOption": { + }, + "buildOptionSet": [ + { + "name": "release", + "arkOptions": { + "obfuscation": { + "ruleOptions": { + "enable": true, + "files": [ + "./obfuscation-rules.txt" + ] + }, + "consumerFiles": [ + "./consumer-rules.txt" + ] + } + }, + }, + ], + "targets": [ + { + "name": "default" + } + ] +} diff --git a/harmony/image_sequence/consumer-rules.txt b/harmony/image_sequence/consumer-rules.txt new file mode 100644 index 0000000..e69de29 diff --git a/harmony/image_sequence/hvigorfile.ts b/harmony/image_sequence/hvigorfile.ts new file mode 100644 index 0000000..43bd551 --- /dev/null +++ b/harmony/image_sequence/hvigorfile.ts @@ -0,0 +1 @@ +import { harTasks } from '@ohos/hvigor-ohos-plugin'; diff --git a/harmony/image_sequence/obfuscation-rules.txt b/harmony/image_sequence/obfuscation-rules.txt new file mode 100644 index 0000000..985b2ae --- /dev/null +++ b/harmony/image_sequence/obfuscation-rules.txt @@ -0,0 +1,18 @@ +# Define project specific obfuscation rules here. +# You can include the obfuscation configuration files in the current module's build-profile.json5. +# +# For more details, see +# https://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md + +# Obfuscation options: +# -disable-obfuscation: disable all obfuscations +# -enable-property-obfuscation: obfuscate the property names +# -enable-toplevel-obfuscation: obfuscate the names in the global scope +# -compact: remove unnecessary blank spaces and all line feeds +# -remove-log: remove all console.* statements +# -print-namecache: print the name cache that contains the mapping from the old names to new names +# -apply-namecache: reuse the given cache file + +# Keep options: +# -keep-property-name: specifies property names that you want to keep +# -keep-global-name: specifies names that you want to keep in the global scope \ No newline at end of file diff --git a/harmony/image_sequence/oh-package-lock.json5 b/harmony/image_sequence/oh-package-lock.json5 new file mode 100644 index 0000000..5948273 --- /dev/null +++ b/harmony/image_sequence/oh-package-lock.json5 @@ -0,0 +1,13 @@ +{ + "lockfileVersion": 3, + "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", + "specifiers": { + "rnoh@../rnoh": "rnoh@../rnoh" + }, + "packages": { + "rnoh@../rnoh": { + "mtime": "1708999669308.7947", + "resolved": "../rnoh" + } + } +} \ No newline at end of file diff --git a/harmony/image_sequence/oh-package.json5 b/harmony/image_sequence/oh-package.json5 new file mode 100644 index 0000000..8c4668e --- /dev/null +++ b/harmony/image_sequence/oh-package.json5 @@ -0,0 +1,14 @@ +{ + "name": "rnoh_image_sequence", + "version": "1.0.0", + "description": "Please describe the basic information.", + "main": "Index.ets", + "author": "", + "license": "Apache-2.0", + "dependencies": { + "@rnoh/react-native-openharmony": "file:../react_native_openharmony" + }, + "overrides": { + "@rnoh/react-native-openharmony": "file:../react_native_openharmony" + } +} diff --git a/harmony/image_sequence/src/main/cpp/CMakeLists.txt b/harmony/image_sequence/src/main/cpp/CMakeLists.txt new file mode 100644 index 0000000..6bedddf --- /dev/null +++ b/harmony/image_sequence/src/main/cpp/CMakeLists.txt @@ -0,0 +1,8 @@ +# the minimum version of CMake +cmake_minimum_required(VERSION 3.13) +set(CMAKE_VERBOSE_MAKEFILE on) + +file(GLOB rnoh_image_sequence_SRC CONFIGURE_DEPENDS *.cpp) +add_library(rnoh_image_sequence SHARED ${rnoh_image_sequence_SRC}) +target_include_directories(rnoh_image_sequence PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +target_link_libraries(rnoh_image_sequence PUBLIC rnoh) \ No newline at end of file diff --git a/harmony/image_sequence/src/main/cpp/ComponentDescriptors.h b/harmony/image_sequence/src/main/cpp/ComponentDescriptors.h new file mode 100644 index 0000000..1c4ede4 --- /dev/null +++ b/harmony/image_sequence/src/main/cpp/ComponentDescriptors.h @@ -0,0 +1,21 @@ + +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * @generated by codegen project: GenerateComponentDescriptorH.js + */ + +#pragma once +#include "ShadowNodes.h" +#include + +namespace facebook { +namespace react { + +using ImageSequenceComponentDescriptor = ConcreteComponentDescriptor; + +} // namespace react +} // namespace facebook diff --git a/harmony/image_sequence/src/main/cpp/EventEmitters.cpp b/harmony/image_sequence/src/main/cpp/EventEmitters.cpp new file mode 100644 index 0000000..74b7928 --- /dev/null +++ b/harmony/image_sequence/src/main/cpp/EventEmitters.cpp @@ -0,0 +1,17 @@ + +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * @generated by codegen project: GenerateEventEmitterCpp.js + */ + +#include "EventEmitters.h" + +namespace facebook { +namespace react { + +} // namespace react +} // namespace facebook diff --git a/harmony/image_sequence/src/main/cpp/EventEmitters.h b/harmony/image_sequence/src/main/cpp/EventEmitters.h new file mode 100644 index 0000000..982f60f --- /dev/null +++ b/harmony/image_sequence/src/main/cpp/EventEmitters.h @@ -0,0 +1,25 @@ + +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * @generated by codegen project: GenerateEventEmitterH.js + */ +#pragma once + +#include + + +namespace facebook { +namespace react { +class ImageSequenceEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; +} // namespace react +} // namespace facebook diff --git a/harmony/image_sequence/src/main/cpp/ImageSequenceJSIBinder.h b/harmony/image_sequence/src/main/cpp/ImageSequenceJSIBinder.h new file mode 100644 index 0000000..c591ef3 --- /dev/null +++ b/harmony/image_sequence/src/main/cpp/ImageSequenceJSIBinder.h @@ -0,0 +1,17 @@ +#include "RNOHCorePackage/ComponentBinders/ViewComponentJSIBinder.h" + +namespace rnoh { + +class ImageSequenceJSIBinder : public ViewComponentJSIBinder { + facebook::jsi::Object createNativeProps(facebook::jsi::Runtime &rt) override { + auto object = ViewComponentJSIBinder::createNativeProps(rt); + object.setProperty(rt, "loop", "boolean"); + object.setProperty(rt, "images", "array"); + object.setProperty(rt, "startFrameIndex", "int"); + object.setProperty(rt, "framesPerSecond", "int"); + object.setProperty(rt, "downsampleWidth", "int"); + object.setProperty(rt, "downsampleHeight", "int"); + return object; + } +}; +} // namespace rnoh \ No newline at end of file diff --git a/harmony/image_sequence/src/main/cpp/ImageSequenceNapiBinder.h b/harmony/image_sequence/src/main/cpp/ImageSequenceNapiBinder.h new file mode 100644 index 0000000..e4c9dee --- /dev/null +++ b/harmony/image_sequence/src/main/cpp/ImageSequenceNapiBinder.h @@ -0,0 +1,31 @@ +#include "RNOHCorePackage/ComponentBinders/ViewComponentNapiBinder.h" +#include "Props.h" + +namespace rnoh { + +class ImageSequenceNapiBinder : public ViewComponentNapiBinder { +public: + napi_value createProps(napi_env env, facebook::react::ShadowView const shadowView) override { + napi_value napiViewProps = ViewComponentNapiBinder::createProps(env, shadowView); + if (auto props = std::dynamic_pointer_cast(shadowView.props)) { + auto images = std::vector(); + auto imageRaw = props->images; + for (auto imagesItem : imageRaw) { + auto imagesItemInt = ArkJS(env).createString(imagesItem); + images.push_back(imagesItemInt); + } + auto viewBoxArray = ArkJS(env).createArray(images); + return ArkJS(env) + .getObjectBuilder(napiViewProps) + .addProperty("images", viewBoxArray) + .addProperty("loop", props->loop) + .addProperty("startFrameIndex", props->startFrameIndex) + .addProperty("framesPerSecond", props->framesPerSecond) + .addProperty("downsampleWidth", props->downsampleWidth) + .addProperty("downsampleHeight", props->downsampleHeight) + .build(); + } + return napiViewProps; + }; +}; +} //namespace rnoh \ No newline at end of file diff --git a/harmony/image_sequence/src/main/cpp/ImageSequencePackage.h b/harmony/image_sequence/src/main/cpp/ImageSequencePackage.h new file mode 100644 index 0000000..3b6d49e --- /dev/null +++ b/harmony/image_sequence/src/main/cpp/ImageSequencePackage.h @@ -0,0 +1,24 @@ +#include "RNOH/Package.h" +#include "ComponentDescriptors.h" +#include "ImageSequenceJSIBinder.h" +#include "ImageSequenceNapiBinder.h" + +namespace rnoh { + +class ImageSequencePackage : public Package { +public: + ImageSequencePackage(Package::Context ctx) : Package(ctx) {} + + std::vector createComponentDescriptorProviders() override { + return {facebook::react::concreteComponentDescriptorProvider()}; + } + + ComponentNapiBinderByString createComponentNapiBinderByName() override { + return {{"ImageSequenceView", std::make_shared()}}; + } + + ComponentJSIBinderByString createComponentJSIBinderByName() override { + return {{"ImageSequenceView", std::make_shared()}}; + } +}; +} // namespace rnoh \ No newline at end of file diff --git a/harmony/image_sequence/src/main/cpp/ImageSequenceSpecsJSI-generated.cpp b/harmony/image_sequence/src/main/cpp/ImageSequenceSpecsJSI-generated.cpp new file mode 100644 index 0000000..397d300 --- /dev/null +++ b/harmony/image_sequence/src/main/cpp/ImageSequenceSpecsJSI-generated.cpp @@ -0,0 +1,19 @@ +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * @generated by codegen project: GenerateModuleCpp.js + */ + +#include "ImageSequenceSpecsJSI.h" + +namespace facebook { +namespace react { + + + + +} // namespace react +} // namespace facebook diff --git a/harmony/image_sequence/src/main/cpp/ImageSequenceSpecsJSI.h b/harmony/image_sequence/src/main/cpp/ImageSequenceSpecsJSI.h new file mode 100644 index 0000000..b301476 --- /dev/null +++ b/harmony/image_sequence/src/main/cpp/ImageSequenceSpecsJSI.h @@ -0,0 +1,21 @@ +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * @generated by codegen project: GenerateModuleH.js + */ + +#pragma once + +#include +#include + +namespace facebook { +namespace react { + + + +} // namespace react +} // namespace facebook diff --git a/harmony/image_sequence/src/main/cpp/Props.cpp b/harmony/image_sequence/src/main/cpp/Props.cpp new file mode 100644 index 0000000..916afa4 --- /dev/null +++ b/harmony/image_sequence/src/main/cpp/Props.cpp @@ -0,0 +1,30 @@ + +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * @generated by codegen project: GeneratePropsCpp.js + */ + +#include "Props.h" +#include +#include + +namespace facebook { +namespace react { + + ImageSequenceProps::ImageSequenceProps(const PropsParserContext &context, const ImageSequenceProps &sourceProps, + const RawProps &rawProps) + : ViewProps(context, sourceProps, rawProps), + + loop(convertRawProp(context, rawProps, "loop", sourceProps.loop, {true})), + startFrameIndex(convertRawProp(context, rawProps, "startFrameIndex", sourceProps.startFrameIndex, {0})), + framesPerSecond(convertRawProp(context, rawProps, "framesPerSecond", sourceProps.framesPerSecond, {24})), + downsampleWidth(convertRawProp(context, rawProps, "downsampleWidth", sourceProps.downsampleWidth, {-1})), + downsampleHeight(convertRawProp(context, rawProps, "downsampleHeight", sourceProps.downsampleHeight, {-1})), + images(convertRawProp(context, rawProps, "images", sourceProps.images, {})) {} + +} // namespace react +} // namespace facebook diff --git a/harmony/image_sequence/src/main/cpp/Props.h b/harmony/image_sequence/src/main/cpp/Props.h new file mode 100644 index 0000000..d13aeb2 --- /dev/null +++ b/harmony/image_sequence/src/main/cpp/Props.h @@ -0,0 +1,34 @@ + +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * @generated by codegen project: GeneratePropsH.js + */ +#pragma once + +#include +#include + +namespace facebook { +namespace react { + +class ImageSequenceProps final : public ViewProps { + public: + ImageSequenceProps() = default; + ImageSequenceProps(const PropsParserContext& context, const ImageSequenceProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + std::vector images{}; + bool loop{true}; + int startFrameIndex{0}; + int framesPerSecond{24}; + int downsampleWidth{-1}; + int downsampleHeight{-1}; +}; + +} // namespace react +} // namespace facebook diff --git a/harmony/image_sequence/src/main/cpp/ShadowNodes.cpp b/harmony/image_sequence/src/main/cpp/ShadowNodes.cpp new file mode 100644 index 0000000..305c8ca --- /dev/null +++ b/harmony/image_sequence/src/main/cpp/ShadowNodes.cpp @@ -0,0 +1,20 @@ + +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * @generated by codegen project: GenerateShadowNodeCpp.js + */ + +#include "Props.h" +#include "ShadowNodes.h" + +namespace facebook { +namespace react { + +extern const char ImageSequenceComponentName[] = "ImageSequenceView"; + +} // namespace react +} // namespace facebook diff --git a/harmony/image_sequence/src/main/cpp/ShadowNodes.h b/harmony/image_sequence/src/main/cpp/ShadowNodes.h new file mode 100644 index 0000000..144aefd --- /dev/null +++ b/harmony/image_sequence/src/main/cpp/ShadowNodes.h @@ -0,0 +1,34 @@ + +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * @generated by codegen project: GenerateShadowNodeH.js + */ + +#pragma once + +#include "EventEmitters.h" +#include "Props.h" +#include "States.h" +#include +#include + +namespace facebook { +namespace react { + +JSI_EXPORT extern const char ImageSequenceComponentName[]; + +/* + * `ShadowNode` for component. + */ +using ImageSequenceShadowNode = ConcreteViewShadowNode< + ImageSequenceComponentName, + ImageSequenceProps, + ImageSequenceEventEmitter, + ImageSequenceState>; + +} // namespace react +} // namespace facebook diff --git a/harmony/image_sequence/src/main/cpp/States.cpp b/harmony/image_sequence/src/main/cpp/States.cpp new file mode 100644 index 0000000..62a093d --- /dev/null +++ b/harmony/image_sequence/src/main/cpp/States.cpp @@ -0,0 +1,18 @@ + +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * @generated by codegen project: GenerateStateCpp.js + */ +#include "States.h" + +namespace facebook { +namespace react { + + + +} // namespace react +} // namespace facebook diff --git a/harmony/image_sequence/src/main/cpp/States.h b/harmony/image_sequence/src/main/cpp/States.h new file mode 100644 index 0000000..315f60c --- /dev/null +++ b/harmony/image_sequence/src/main/cpp/States.h @@ -0,0 +1,36 @@ +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * @generated by codegen project: GenerateStateH.js + */ +#pragma once + +#ifdef ANDROID +#include +#include +#include +#endif + +namespace facebook { +namespace react { + +class ImageSequenceState { +public: + ImageSequenceState() = default; + +#ifdef ANDROID + ImageSequenceState(ImageSequenceState const &previousState, folly::dynamic data){}; + folly::dynamic getDynamic() const { + return {}; + }; + MapBuffer getMapBuffer() const { + return MapBufferBuilder::EMPTY(); + }; +#endif +}; + +} // namespace react +} // namespace facebook \ No newline at end of file diff --git a/harmony/image_sequence/src/main/ets/RNImageSequence.ets b/harmony/image_sequence/src/main/ets/RNImageSequence.ets new file mode 100644 index 0000000..865df67 --- /dev/null +++ b/harmony/image_sequence/src/main/ets/RNImageSequence.ets @@ -0,0 +1,155 @@ +import { Descriptor, ComponentBuilderContext, ViewRawrawProps, Tag } from '@rnoh/react-native-openharmony'; +import { RNComponentFactory, RNOHContext, RNViewBase } from '@rnoh/react-native-openharmony'; +// import { ImageLoaderTurboModule } from '@rnoh/react-native-openharmony/src/main/ets/RNOHCorePackage/turboModules'; +import image from '@ohos.multimedia.image'; +import resourceManager from '@ohos.resourceManager'; +import { BusinessError } from '@ohos.base'; + +export const IMAGE_SEQUENCE_TYPE: string = "ImageSequenceView" + +export interface ImageSequencerawProps extends ViewRawrawProps { + loop: boolean, + images: Array, + startFrameIndex: number, + framesPerSecond: number, + downsampleWidth: number, + downsampleHeight: number +} + +// export type ImageSequenceDescriptor = Descriptor<"ImageSequenceView", ImageSequencerawProps> +export type ImageSequenceDescriptor = Descriptor<"ImageSequenceView", ViewRawrawProps, [], ImageSequencerawProps> +export interface ImageData { + src: string | Resource, + width: number +} + +const context: Context = getContext(this); +const resourceMgr: resourceManager.ResourceManager = context.resourceManager; + +@Component +export struct RNImageSequence { + ctx!: RNOHContext; + tag: number = 0; + @BuilderParam buildCustomComponent: (componentBuilderContext: ComponentBuilderContext) => void; + @State descriptor: ImageSequenceDescriptor = {} as ImageSequenceDescriptor; + private unregisterDescriptorChangesListener?: () => void = undefined; + @State ImageList: (Resource | string | PixelMap)[] = []; + @State duration: number = 0; + @State timer: number = 0; + @State num: number = 0; + @State isLocalResource: boolean = false; + @State finishCount: number = 0; + @State localIndex: number[] = []; + + aboutToAppear() { + this.descriptor = this.ctx.descriptorRegistry.getDescriptor(this.tag); + this.unregisterDescriptorChangesListener = this.ctx.descriptorRegistry.subscribeToDescriptorChanges(this.tag, + (newDescriptor) => { + this.descriptor = (newDescriptor as ImageSequenceDescriptor) + } + ) + + this.duration = 1000 / this.descriptor.rawProps.framesPerSecond; + const sourceList = this.descriptor.rawProps.images; + this.ImageList.length = sourceList.length; + + sourceList.forEach((item, index)=>{ + if (item.startsWith("asset://")) { + this.getRawFileContent(item.replace("asset://", "assets/"), index) + } else { + this.ImageList[index] = this.getSource(item); + this.finishCount +=1 + } + }) + if (this.descriptor.rawProps.loop) { + this.num = 0; + this.timer = setInterval(()=>{ + this.num++; + if (this.num > this.ImageList.length) { + this.num = 0; + } + },this.duration) + } else { + this.num = 0; + clearInterval(this.timer); + } + } + + getRawFileContent(img:string, index:number) { + resourceMgr.getRawFileContent(img).then((fileData: Uint8Array) => { + const buffer = fileData.buffer.slice(0); + this.imageEdit(buffer, index); + }).catch((err: BusinessError) => { + console.error(`getRawFileContent failed: ${err.code}`) + }) + } + + getSource(source:string) { + if (source.startsWith("asset://")) { + return $rawfile(source.replace("asset://", "assets/")) + } + if (source.startsWith("file://assets/src/assets/")) { + return $rawfile(source.replace("file://assets/src/assets/", "assets/")); + } + // const filePath = this.ctx.rnInstance.getTurboModule("ImageLoader").getCachedImage(source); + // return filePath ?? source; + return source; + } + + calculateInSampleSize(width: number, height: number):number { + let inSampleSize = 1; + let reqWidth: number = this.descriptor.rawProps.downsampleWidth; + let reqHeight: number = this.descriptor.rawProps.downsampleHeight; + + if (height > reqHeight || width > reqWidth) { + let halfHeight = height / 2; + let halWidth = width/ 2; + while ((halfHeight / inSampleSize) >= reqHeight && (halWidth / inSampleSize) >= reqWidth) { + inSampleSize *= 2; + } + } + return inSampleSize; + } + + async imageEdit(imageData:ArrayBuffer, index:number) { + let imageSourceApi:image.ImageSource = image.createImageSource(imageData); + let pixelMap = await imageSourceApi.createPixelMap(); + const imageInfo = await pixelMap.getImageInfo(); + const width = imageInfo.size.width; + const height = imageInfo.size.height; + const sampleSize = this.calculateInSampleSize(width, height); + const decodeOptions:image.DecodingOptions = { + desiredSize: { + width: width / sampleSize, + height: height / sampleSize + } + } + + pixelMap = await imageSourceApi.createPixelMap(decodeOptions); + this.isLocalResource = true; + this.ImageList[index] = pixelMap; + this.finishCount +=1; + this.localIndex.push(index); + imageSourceApi.release(); + } + aboutToDisappear() { + this.unregisterDescriptorChangesListener?.() + clearInterval(this.timer); + if (this.isLocalResource) { + this.localIndex.forEach(lIndex => { + const item: PixelMap = this.ImageList[lIndex] as PixelMap; + item.release(); + }) + } + } + + build() { + RNViewBase({ctx: this.ctx, tag: this.tag}) { + if (this.finishCount === this.ImageList.length) { + Image(this.ImageList[this.num]).objectFit(ImageFit.Fill).draggable(false).width('100%').height('100%').onComplete(()=>{ + console.log(`加载完成:${new Date().getTime()}`) + }) + } + } + } +} \ No newline at end of file diff --git a/harmony/image_sequence/src/main/module.json5 b/harmony/image_sequence/src/main/module.json5 new file mode 100644 index 0000000..72cc27f --- /dev/null +++ b/harmony/image_sequence/src/main/module.json5 @@ -0,0 +1,11 @@ +{ + "module": { + "name": "image_sequence", + "type": "har", + "deviceTypes": [ + "default", + "tablet", + "2in1" + ] + } +} diff --git a/harmony/image_sequence/src/main/resources/base/element/string.json b/harmony/image_sequence/src/main/resources/base/element/string.json new file mode 100644 index 0000000..f51a9c8 --- /dev/null +++ b/harmony/image_sequence/src/main/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "page_show", + "value": "page from package" + } + ] +} diff --git a/harmony/image_sequence/src/main/resources/en_US/element/string.json b/harmony/image_sequence/src/main/resources/en_US/element/string.json new file mode 100644 index 0000000..f51a9c8 --- /dev/null +++ b/harmony/image_sequence/src/main/resources/en_US/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "page_show", + "value": "page from package" + } + ] +} diff --git a/harmony/image_sequence/src/main/resources/zh_CN/element/string.json b/harmony/image_sequence/src/main/resources/zh_CN/element/string.json new file mode 100644 index 0000000..f51a9c8 --- /dev/null +++ b/harmony/image_sequence/src/main/resources/zh_CN/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "page_show", + "value": "page from package" + } + ] +} diff --git a/harmony/image_sequence/src/test/List.test.ets b/harmony/image_sequence/src/test/List.test.ets new file mode 100644 index 0000000..bb5b5c3 --- /dev/null +++ b/harmony/image_sequence/src/test/List.test.ets @@ -0,0 +1,5 @@ +import localUnitTest from './LocalUnit.test'; + +export default function testsuite() { + localUnitTest(); +} \ No newline at end of file diff --git a/harmony/image_sequence/src/test/LocalUnit.test.ets b/harmony/image_sequence/src/test/LocalUnit.test.ets new file mode 100644 index 0000000..ed22d4d --- /dev/null +++ b/harmony/image_sequence/src/test/LocalUnit.test.ets @@ -0,0 +1,33 @@ +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; + +export default function localUnitTest() { + describe('localUnitTest',() => { + // Defines a test suite. Two parameters are supported: test suite name and test suite function. + beforeAll(() => { + // Presets an action, which is performed only once before all test cases of the test suite start. + // This API supports only one parameter: preset action function. + }); + beforeEach(() => { + // Presets an action, which is performed before each unit test case starts. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: preset action function. + }); + afterEach(() => { + // Presets a clear action, which is performed after each unit test case ends. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: clear action function. + }); + afterAll(() => { + // Presets a clear action, which is performed after all test cases of the test suite end. + // This API supports only one parameter: clear action function. + }); + it('assertContain', 0, () => { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + let a = 'abc'; + let b = 'b'; + // Defines a variety of assertion methods, which are used to declare expected boolean conditions. + expect(a).assertContain(b); + expect(a).assertEqual(a); + }); + }); +} \ No newline at end of file diff --git a/index.js b/index.js deleted file mode 100644 index 3180e5c..0000000 --- a/index.js +++ /dev/null @@ -1,61 +0,0 @@ -import React, { Component } from 'react'; -import { requireNativeComponent } from 'react-native'; -import { ViewPropTypes } from 'deprecated-react-native-prop-types'; -import { bool, string, number, array, shape, arrayOf } from 'prop-types'; -import resolveAssetSource from 'react-native/Libraries/Image/resolveAssetSource'; - -class ImageSequence extends Component { - render() { - const { - startFrameIndex, - images, - ...otherProps - } = this.props; - - let normalized = images.map(resolveAssetSource); - - // reorder elements if start-index is different from 0 (beginning) - if (startFrameIndex !== 0) { - normalized = [...normalized.slice(startFrameIndex), ...normalized.slice(0, startFrameIndex)]; - } - - return ( - - ); - } -} - -ImageSequence.defaultProps = { - startFrameIndex: 0, - framesPerSecond: 24, - loop: true, - downsampleWidth: -1, - downsampleHeight: -1 -}; - -ImageSequence.propTypes = { - ...ViewPropTypes, - startFrameIndex: number, - images: array.isRequired, - framesPerSecond: number, - loop: bool, - downsampleWidth: number, - downsampleHeight: number -}; - -const RCTImageSequence = requireNativeComponent('RCTImageSequence', { - propTypes: { - ...ViewPropTypes, - images: arrayOf(shape({ - uri: string.isRequired - })).isRequired, - framesPerSecond: number, - loop: bool, - downsampleWidth: number, - downsampleHeight: number - }, -}); - -export default ImageSequence; diff --git a/index.tsx b/index.tsx new file mode 100644 index 0000000..369a16d --- /dev/null +++ b/index.tsx @@ -0,0 +1,52 @@ +import { forwardRef, memo } from 'react'; +import { View, Image } from 'react-native'; +import ImagesequenceView, { NativeProps } from './src/ImageSequenceNativeComponent' +function ImageSequenceBase({ + images, + startFrameIndex, + framesPerSecond, + loop, + downsampleHeight, + downsampleWidth, + forwardRef, + style, + ...props +}: NativeProps & { forwardRef: React.Ref }) { + let images2: any[] = []; + images.forEach(item => { + if (item.uri) { + images2.push(item); + } else { + let resolvedSource = Image.resolveAssetSource(item); + images.push(resolvedSource.uri); + } + }) + if (startFrameIndex !== 0) { + images2 = [...images2.slice(startFrameIndex), ...images2.slice(0, startFrameIndex)]; + } + return ( + + + + ) +} + +const ImageSequenceMemo = memo(ImageSequenceBase) + +const ImageSequenceComponent: React.ComponentType = forwardRef( + (props: NativeProps, ref: React.Ref) => ( + + ), +) +ImageSequenceComponent.displayName = 'ImageSequence'; +const ImageSequence: React.ComponentType = ImageSequenceComponent as any; +export default ImageSequence; \ No newline at end of file diff --git a/ios/RCTImageSequence.xcodeproj/project.pbxproj b/ios/RCTImageSequence.xcodeproj/project.pbxproj deleted file mode 100644 index dc841d6..0000000 --- a/ios/RCTImageSequence.xcodeproj/project.pbxproj +++ /dev/null @@ -1,262 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - C75D3D5D1D3671B500B6F44B /* RCTImageSequenceView.m in Sources */ = {isa = PBXBuildFile; fileRef = C75D3D591D3671B500B6F44B /* RCTImageSequenceView.m */; }; - C75D3D5E1D3671B500B6F44B /* RCTImageSequenceManager.m in Sources */ = {isa = PBXBuildFile; fileRef = C75D3D5B1D3671B500B6F44B /* RCTImageSequenceManager.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - C75D3D4B1D36714700B6F44B /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = "include/$(PRODUCT_NAME)"; - dstSubfolderSpec = 16; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - C75D3D4D1D36714700B6F44B /* libRCTImageSequence.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRCTImageSequence.a; sourceTree = BUILT_PRODUCTS_DIR; }; - C75D3D591D3671B500B6F44B /* RCTImageSequenceView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTImageSequenceView.m; sourceTree = ""; }; - C75D3D5A1D3671B500B6F44B /* RCTImageSequenceView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTImageSequenceView.h; sourceTree = ""; }; - C75D3D5B1D3671B500B6F44B /* RCTImageSequenceManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTImageSequenceManager.m; sourceTree = ""; }; - C75D3D5C1D3671B500B6F44B /* RCTImageSequenceManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTImageSequenceManager.h; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - C75D3D4A1D36714700B6F44B /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - C75D3D441D36714700B6F44B = { - isa = PBXGroup; - children = ( - C75D3D4F1D36714700B6F44B /* RCTImageSequence */, - C75D3D4E1D36714700B6F44B /* Products */, - ); - sourceTree = ""; - }; - C75D3D4E1D36714700B6F44B /* Products */ = { - isa = PBXGroup; - children = ( - C75D3D4D1D36714700B6F44B /* libRCTImageSequence.a */, - ); - name = Products; - sourceTree = ""; - }; - C75D3D4F1D36714700B6F44B /* RCTImageSequence */ = { - isa = PBXGroup; - children = ( - C75D3D591D3671B500B6F44B /* RCTImageSequenceView.m */, - C75D3D5A1D3671B500B6F44B /* RCTImageSequenceView.h */, - C75D3D5B1D3671B500B6F44B /* RCTImageSequenceManager.m */, - C75D3D5C1D3671B500B6F44B /* RCTImageSequenceManager.h */, - ); - path = RCTImageSequence; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - C75D3D4C1D36714700B6F44B /* RCTImageSequence */ = { - isa = PBXNativeTarget; - buildConfigurationList = C75D3D561D36714700B6F44B /* Build configuration list for PBXNativeTarget "RCTImageSequence" */; - buildPhases = ( - C75D3D491D36714700B6F44B /* Sources */, - C75D3D4A1D36714700B6F44B /* Frameworks */, - C75D3D4B1D36714700B6F44B /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = RCTImageSequence; - productName = RCTImageSequence; - productReference = C75D3D4D1D36714700B6F44B /* libRCTImageSequence.a */; - productType = "com.apple.product-type.library.static"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - C75D3D451D36714700B6F44B /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0730; - ORGANIZATIONNAME = "Mads Lee Jensen"; - TargetAttributes = { - C75D3D4C1D36714700B6F44B = { - CreatedOnToolsVersion = 7.3.1; - }; - }; - }; - buildConfigurationList = C75D3D481D36714700B6F44B /* Build configuration list for PBXProject "RCTImageSequence" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = C75D3D441D36714700B6F44B; - productRefGroup = C75D3D4E1D36714700B6F44B /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - C75D3D4C1D36714700B6F44B /* RCTImageSequence */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - C75D3D491D36714700B6F44B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - C75D3D5E1D3671B500B6F44B /* RCTImageSequenceManager.m in Sources */, - C75D3D5D1D3671B500B6F44B /* RCTImageSequenceView.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - C75D3D541D36714700B6F44B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - }; - name = Debug; - }; - C75D3D551D36714700B6F44B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - C75D3D571D36714700B6F44B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - HEADER_SEARCH_PATHS = "$(SRCROOT)/../../react-native/React/**"; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - }; - name = Debug; - }; - C75D3D581D36714700B6F44B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - HEADER_SEARCH_PATHS = "$(SRCROOT)/../../react-native/React/**"; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - C75D3D481D36714700B6F44B /* Build configuration list for PBXProject "RCTImageSequence" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C75D3D541D36714700B6F44B /* Debug */, - C75D3D551D36714700B6F44B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C75D3D561D36714700B6F44B /* Build configuration list for PBXNativeTarget "RCTImageSequence" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C75D3D571D36714700B6F44B /* Debug */, - C75D3D581D36714700B6F44B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = C75D3D451D36714700B6F44B /* Project object */; -} diff --git a/ios/RCTImageSequence/RCTImageSequenceManager.h b/ios/RCTImageSequence/RCTImageSequenceManager.h deleted file mode 100644 index 964a3a7..0000000 --- a/ios/RCTImageSequence/RCTImageSequenceManager.h +++ /dev/null @@ -1,11 +0,0 @@ -// -// Created by Mads Lee Jensen on 07/07/16. -// Copyright (c) 2016 Facebook. All rights reserved. -// - -#import - -@interface RCTImageSequenceManager : RCTViewManager - - -@end \ No newline at end of file diff --git a/ios/RCTImageSequence/RCTImageSequenceManager.m b/ios/RCTImageSequence/RCTImageSequenceManager.m deleted file mode 100644 index 36a93e2..0000000 --- a/ios/RCTImageSequence/RCTImageSequenceManager.m +++ /dev/null @@ -1,23 +0,0 @@ -// -// Created by Mads Lee Jensen on 07/07/16. -// Copyright (c) 2016 Facebook. All rights reserved. -// - -#import "RCTImageSequenceManager.h" -#import "RCTImageSequenceView.h" - -@implementation RCTImageSequenceManager { -} - -RCT_EXPORT_MODULE(); -RCT_EXPORT_VIEW_PROPERTY(images, NSArray); -RCT_EXPORT_VIEW_PROPERTY(framesPerSecond, NSUInteger); -RCT_EXPORT_VIEW_PROPERTY(loop, BOOL); -RCT_EXPORT_VIEW_PROPERTY(downsampleWidth, NSInteger); -RCT_EXPORT_VIEW_PROPERTY(downsampleHeight, NSInteger); - -- (UIView *)view { - return [RCTImageSequenceView new]; -} - -@end diff --git a/ios/RCTImageSequence/RCTImageSequenceView.h b/ios/RCTImageSequence/RCTImageSequenceView.h deleted file mode 100644 index c63899a..0000000 --- a/ios/RCTImageSequence/RCTImageSequenceView.h +++ /dev/null @@ -1,11 +0,0 @@ -// -// Created by Mads Lee Jensen on 07/07/16. -// Copyright (c) 2016 Facebook. All rights reserved. -// - -#import - -@interface RCTImageSequenceView : UIImageView - - -@end \ No newline at end of file diff --git a/ios/RCTImageSequence/RCTImageSequenceView.m b/ios/RCTImageSequence/RCTImageSequenceView.m deleted file mode 100644 index e80330c..0000000 --- a/ios/RCTImageSequence/RCTImageSequenceView.m +++ /dev/null @@ -1,140 +0,0 @@ -// -// Created by Mads Lee Jensen on 07/07/16. -// Copyright (c) 2016 Facebook. All rights reserved. -// - -#import "RCTImageSequenceView.h" - -#import -#import - -@implementation RCTImageSequenceView { - NSUInteger _framesPerSecond; - NSMutableDictionary *_activeTasks; - NSMutableDictionary *_imagesLoaded; - BOOL _loop; - NSInteger _downsampleWidth; - NSInteger _downsampleHeight; -} - -- (void)setImages:(NSArray *)images { - __weak RCTImageSequenceView *weakSelf = self; - - self.animationImages = nil; - - _activeTasks = [NSMutableDictionary new]; - _imagesLoaded = [NSMutableDictionary new]; - - for (NSUInteger index = 0; index < images.count; index++) { - NSDictionary *item = images[index]; - -#ifdef DEBUG - NSString *urlString = item[@"uri"]; -#else - // when not in debug, the paths are "local paths" (because resources are bundled in app) - NSString *urlString = [NSString stringWithFormat:@"file://%@", item[@"uri"]]; -#endif - - dispatch_async(dispatch_queue_create("dk.mads-lee.ImageSequence.Downloader", NULL), ^{ - // Sleep for 1ms to make sure that all the props have been set properly before starting processing - [NSThread sleepForTimeInterval:0.001]; - - NSURL *url = [NSURL URLWithString:urlString]; - - if (_downsampleWidth <= 0 || _downsampleHeight <= 0) { - // Downsampling is not set so just return normally - UIImage *image = [UIImage imageWithData:[NSData dataWithContentsOfURL:url]]; - dispatch_async(dispatch_get_main_queue(), ^{ - [weakSelf onImageLoadTaskAtIndex:index image:image]; - }); - } else { - // Downsampling is set so we need to downsample - UIImage *image = [weakSelf resizedImage:url width:_downsampleWidth height:_downsampleHeight]; - dispatch_async(dispatch_get_main_queue(), ^{ - [weakSelf onImageLoadTaskAtIndex:index image:image]; - }); - } - }); - - _activeTasks[@(index)] = urlString; - } -} - -- (UIImage *)resizedImage:(NSURL *)url width:(NSInteger)width height:(NSInteger)height { - CFURLRef cfurl = (__bridge CFURLRef)url; - CGImageSourceRef imageSourceRef = CGImageSourceCreateWithURL(cfurl, nil); - if (!imageSourceRef) { - return nil; - } - - NSDictionary* d = @{ - (id)kCGImageSourceShouldAllowFloat: (id)kCFBooleanTrue, - (id)kCGImageSourceCreateThumbnailWithTransform: (id)kCFBooleanTrue, - (id)kCGImageSourceCreateThumbnailFromImageAlways: (id)kCFBooleanTrue, - (id)kCGImageSourceThumbnailMaxPixelSize: @((int)(width > height ? width : height)) - }; - CGImageRef imageRef = CGImageSourceCreateThumbnailAtIndex(imageSourceRef, 0, (__bridge CFDictionaryRef)d); - CFRelease(imageSourceRef); - if (!imageRef) { - return nil; - } - - UIImage* scaledImage = [UIImage imageWithCGImage:imageRef scale:1 orientation:UIImageOrientationUp]; - CFRelease(imageRef); - - return scaledImage; -} - -- (void)onImageLoadTaskAtIndex:(NSUInteger)index image:(UIImage *)image { - if (index == 0) { - self.image = image; - } - - [_activeTasks removeObjectForKey:@(index)]; - - _imagesLoaded[@(index)] = image; - - if (_activeTasks.allValues.count == 0) { - [self onImagesLoaded]; - } -} - -- (void)onImagesLoaded { - NSMutableArray *images = [NSMutableArray new]; - for (NSUInteger index = 0; index < _imagesLoaded.allValues.count; index++) { - UIImage *image = _imagesLoaded[@(index)]; - [images addObject:image]; - } - - [_imagesLoaded removeAllObjects]; - - self.image = nil; - self.animationDuration = images.count * (1.0f / _framesPerSecond); - self.animationImages = images; - self.animationRepeatCount = _loop ? 0 : 1; - [self startAnimating]; -} - -- (void)setFramesPerSecond:(NSUInteger)framesPerSecond { - _framesPerSecond = framesPerSecond; - - if (self.animationImages.count > 0) { - self.animationDuration = self.animationImages.count * (1.0f / _framesPerSecond); - } -} - -- (void)setLoop:(NSUInteger)loop { - _loop = loop; - - self.animationRepeatCount = _loop ? 0 : 1; -} - -- (void)setDownsampleWidth:(NSInteger)downsampleWidth { - _downsampleWidth = downsampleWidth; -} - -- (void)setDownsampleHeight:(NSInteger)downsampleHeight { - _downsampleHeight = downsampleHeight; -} - -@end diff --git a/package.json b/package.json index b691a6f..eea897e 100644 --- a/package.json +++ b/package.json @@ -1,28 +1,35 @@ { "name": "react-native-image-sequence-2", - "repository": { - "type": "git", - "url": "https://github.com/bwindsor/react-native-image-sequence.git" + "version": "0.9.1-0.0.1", + "description": "Showcase a Fabric component with a image sequence", + "react-native": "index", + "source": "index", + "files": [ + "src", + "harmony", + "react-native-image-sequence-2.podspec", + "!android/build", + "!ios/build", + "!**/__tests__", + "!**/__fixtures__", + "!**/__mocks__" + ], + "keywords": ["react-native", "ios", "android", "harmony"], + "repository": "https://github.com//react-native-image-sequence-2", + "author": " (https://github.com/)", + "license": "MIT", + "bugs": { + "url": "https://github.com//react-native-image-sequence-2/issues" }, - "version": "0.9.1", - "description": "A component for react-native", + "homepage": "https://github.com//react-native-image-sequence-2#readme", + "devDependencies": {}, "peerDependencies": { - "react-native": ">=0.47.0", - "prop-types": ">=15.5.0", - "deprecated-react-native-prop-types": "^2.3.0" + "react": "*", + "react-native": "*" }, - "license": "MIT", - "homepage": "https://github.com/bwindsor/react-native-image-sequence", - "main": "index.js", - "types": "typings/index.d.ts", - "keywords": [ - "react-native", - "native", - "sequence", - "imagesequence", - "frames", - "frame-animation", - "animation", - "animationImages" - ] -} + "codegenConfig": { + "name": "ImageSequenceSpecs", + "type": "components", + "jsSrcsDir": "src" + } +} \ No newline at end of file diff --git a/typings/index.d.ts b/src/ImageSequenceNativeComponent.ts similarity index 47% rename from typings/index.d.ts rename to src/ImageSequenceNativeComponent.ts index d24591b..4d15a47 100644 --- a/typings/index.d.ts +++ b/src/ImageSequenceNativeComponent.ts @@ -1,7 +1,24 @@ -import { Component } from 'react'; -import { ViewProps } from 'react-native'; +import type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes'; +import { FlexStyle, HostComponent, ShadowStyleIOS, TransformsStyle } from 'react-native'; +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; -interface ImageSequenceProps extends ViewProps { +export interface ImageStyle extends FlexStyle, TransformsStyle, ShadowStyleIOS { + backfaceVisibility?: 'visible' | 'hidden'; + borderBottomLeftRadius?: number; + borderBottomRightRadius?: number; + backgroundColor?: string; + borderColor?: string; + borderWidth?: number; + borderRadius?: number; + borderTopLeftRadius?: number; + borderTopRightRadius?: number; + overlayColor?: string; + opacity?: number; + width?: number; + height?: number; +} + +export interface NativeProps extends ViewProps { /** An array of source images. Each element of the array should be the result of a call to require(imagePath). */ images: any[]; /** Which index of the images array should the sequence start at. Default: 0 */ @@ -14,9 +31,9 @@ interface ImageSequenceProps extends ViewProps { downsampleWidth?: number; /** The height to use for optional downsampling. Both `downsampleWidth` and `downsampleHeight` must be set to a positive number to enable downsampling. Default: -1 */ downsampleHeight?: number; + style?: ImageStyle; } -declare class ImageSequence extends Component { -} - -export default ImageSequence; +export default codegenNativeComponent( + 'ImageSequenceView', +) as HostComponent; -- Gitee From f32c52b6e8f179da17f5ed69f72d441a58226d41 Mon Sep 17 00:00:00 2001 From: wuya_smile Date: Mon, 22 Apr 2024 10:44:24 +0800 Subject: [PATCH 02/16] =?UTF-8?q?=E6=B7=BB=E5=8A=A0harmony=E6=89=93?= =?UTF-8?q?=E5=8C=85=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “leehom6666” --- package.json | 44 +++++++++++++++++++++++++++++++++++--------- tsconfig.build.json | 4 ++++ tsconfig.json | 16 ++++++++++++++++ 3 files changed, 55 insertions(+), 9 deletions(-) create mode 100644 tsconfig.build.json create mode 100644 tsconfig.json diff --git a/package.json b/package.json index eea897e..6b70b29 100644 --- a/package.json +++ b/package.json @@ -1,28 +1,37 @@ { - "name": "react-native-image-sequence-2", + "name": "@react-native-oh-tpl/react-native-image-sequence-2", "version": "0.9.1-0.0.1", "description": "Showcase a Fabric component with a image sequence", "react-native": "index", "source": "index", + "main": "lib/commonjs/index", + "typings": "lib/typescript/index.d.ts", "files": [ "src", "harmony", "react-native-image-sequence-2.podspec", - "!android/build", - "!ios/build", + "index.tsx", "!**/__tests__", "!**/__fixtures__", "!**/__mocks__" ], - "keywords": ["react-native", "ios", "android", "harmony"], - "repository": "https://github.com//react-native-image-sequence-2", - "author": " (https://github.com/)", + "scripts": { + "bob": "bob build", + "prepare": "npm run bob" + }, + "keywords": ["react-native", "harmony"], + "repository": "https://github.com/bwindsor/react-native-image-sequence", + "author": "bwindsor", "license": "MIT", "bugs": { - "url": "https://github.com//react-native-image-sequence-2/issues" + "url": "https://github.com/bwindsor/react-native-image-sequence/issues" + }, + "homepage": "https://github.com/bwindsor/react-native-image-sequence#readme", + "devDependencies": { + "@types/react": "^18.2.12", + "react-native-builder-bob": "^0.20.4", + "typescript": "^5.0.4" }, - "homepage": "https://github.com//react-native-image-sequence-2#readme", - "devDependencies": {}, "peerDependencies": { "react": "*", "react-native": "*" @@ -31,5 +40,22 @@ "name": "ImageSequenceSpecs", "type": "components", "jsSrcsDir": "src" + }, + "harmony": { + "alias": "react-native-image-sequence-2" + }, + "react-native-builder-bob": { + "source": "src", + "output": "lib", + "targets": [ + "commonjs", + "module", + [ + "typescript", + { + "project": "tsconfig.build.json" + } + ] + ] } } \ No newline at end of file diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 0000000..c2ada1e --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig", + "exclude": ["harmony"] +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..5c8e828 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "declaration": true, + "module": "commonjs", + "strict": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "jsx": "react-native", + "lib": ["dom", "es5", "es6", "scripthost"], + "target": "es5", + "outDir": "built", + "sourceMap": true, + "skipLibCheck": true + }, + "exclude": ["node_modules"] + } \ No newline at end of file -- Gitee From c09fca33efeda657a4f38a75518b8f8c46df6d6d Mon Sep 17 00:00:00 2001 From: wuya_smile Date: Thu, 25 Apr 2024 10:48:59 +0800 Subject: [PATCH 03/16] =?UTF-8?q?capi=E7=9B=B8=E5=85=B3=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “leehom6666” --- harmony/image_sequence.har | Bin 0 -> 3921 bytes harmony/image_sequence/build-profile.json5 | 5 +- harmony/image_sequence/consumer-rules.txt | 0 harmony/image_sequence/oh-package-lock.json5 | 13 +++-- .../src/main/cpp/CMakeLists.txt | 8 --- .../src/main/cpp/ComponentDescriptors.h | 21 -------- .../src/main/cpp/EventEmitters.cpp | 17 ------ .../src/main/cpp/EventEmitters.h | 25 --------- .../src/main/cpp/ImageSequenceJSIBinder.h | 17 ------ .../src/main/cpp/ImageSequenceNapiBinder.h | 31 ----------- .../src/main/cpp/ImageSequencePackage.h | 24 --------- .../cpp/ImageSequenceSpecsJSI-generated.cpp | 19 ------- .../src/main/cpp/ImageSequenceSpecsJSI.h | 21 -------- harmony/image_sequence/src/main/cpp/Props.cpp | 30 ----------- harmony/image_sequence/src/main/cpp/Props.h | 34 ------------ .../src/main/cpp/ShadowNodes.cpp | 20 ------- .../image_sequence/src/main/cpp/ShadowNodes.h | 34 ------------ .../image_sequence/src/main/cpp/States.cpp | 18 ------- harmony/image_sequence/src/main/cpp/States.h | 36 ------------- .../src/main/ets/ImageSequencePackage.ts | 13 +++++ .../src/main/ets/RNImageSequence.ets | 51 +++++++++++------- harmony/image_sequence/src/main/module.json5 | 5 ++ harmony/image_sequence/src/test/List.test.ets | 5 -- .../src/test/LocalUnit.test.ets | 33 ------------ harmony/image_sequence/ts.ts | 1 + index.tsx | 16 +++++- package.json | 21 +++----- src/ImageSequenceNativeComponent.ts | 43 +++++++-------- tsconfig.build.json | 4 -- tsconfig.json | 16 ------ 30 files changed, 107 insertions(+), 474 deletions(-) create mode 100644 harmony/image_sequence.har delete mode 100644 harmony/image_sequence/consumer-rules.txt delete mode 100644 harmony/image_sequence/src/main/cpp/CMakeLists.txt delete mode 100644 harmony/image_sequence/src/main/cpp/ComponentDescriptors.h delete mode 100644 harmony/image_sequence/src/main/cpp/EventEmitters.cpp delete mode 100644 harmony/image_sequence/src/main/cpp/EventEmitters.h delete mode 100644 harmony/image_sequence/src/main/cpp/ImageSequenceJSIBinder.h delete mode 100644 harmony/image_sequence/src/main/cpp/ImageSequenceNapiBinder.h delete mode 100644 harmony/image_sequence/src/main/cpp/ImageSequencePackage.h delete mode 100644 harmony/image_sequence/src/main/cpp/ImageSequenceSpecsJSI-generated.cpp delete mode 100644 harmony/image_sequence/src/main/cpp/ImageSequenceSpecsJSI.h delete mode 100644 harmony/image_sequence/src/main/cpp/Props.cpp delete mode 100644 harmony/image_sequence/src/main/cpp/Props.h delete mode 100644 harmony/image_sequence/src/main/cpp/ShadowNodes.cpp delete mode 100644 harmony/image_sequence/src/main/cpp/ShadowNodes.h delete mode 100644 harmony/image_sequence/src/main/cpp/States.cpp delete mode 100644 harmony/image_sequence/src/main/cpp/States.h create mode 100644 harmony/image_sequence/src/main/ets/ImageSequencePackage.ts delete mode 100644 harmony/image_sequence/src/test/List.test.ets delete mode 100644 harmony/image_sequence/src/test/LocalUnit.test.ets create mode 100644 harmony/image_sequence/ts.ts delete mode 100644 tsconfig.build.json delete mode 100644 tsconfig.json diff --git a/harmony/image_sequence.har b/harmony/image_sequence.har new file mode 100644 index 0000000000000000000000000000000000000000..b9f1d84a4c0a4cd5272956e930410a6d4932d6c6 GIT binary patch literal 3921 zcmV-X53cYZiwFP!000003hf-*ZsW#vU)R9?!$e49sgWt_>OfvQ>x*_*!1_{Kn;Y9is~YfPd?+aEyoazZ&!Z4bcBaxn9onKP}Am|BYB3&nK2M zKx2@BOK<4jApKUa@Hu=Wsx$Z{LF#{(hI|`ikpO(>xlaAz#!JEj`roLQh5nc8mAX#- zf1}#S;{VhzrT>DzD%`(VLnvpAt=@ufw}*2@hGK$oJoYWu0W_;VnZlf5 zACTv?81Xt3a*i=#eG+VA!xKF+j6tq=OHXzx5N@|0c&4Ea7ve}@7l23 z$uAaYN&Pp0slf=7hy$w|<01dA>!JQvtCcF#|9Texr-m8&&-kl?T>s&k{&$at2I&~ym4_xG6@29mT~Elx27TTb+rhwc z*0-`G@b?2!|81-5l|IlIpbwjyn@iY#A**`1+R(vXtS$mw0RK<=FP>G9>+cRX#N&qT znpZ2$02bT-vQBYPeyUUdU(fRY^e{XBkI$6H|0C=hQAka500^azNe>e!?Hjg-mAIeE z2MrXy!o=fYdX*z~JDt{1r+s`x1KZBq_8EeIyGLmEedqX1>!@|Q+i4x3*X?&L4ILb# zqvH;09ke@$Ri(w~pnclf@4Wj)6Um1+#-`P`U?7FMSHy9LC4vpp-*6yozs4Kx7(3v= zMy_-BO4B&*lH)EF9HlEoYlR0wS5`*WbYif$J0+F64woUP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SBT}zzy`%_J7+9?J+pqm`B;8dM8jB0TM*hJ8ERvi1V*i? z8{CRe1b-h(mmhL$i7Y$bQ#`p|zAN4?^nO%)_@uzdhTWncf8?1dFJ!|jVnaz78g^e) z-WF^DcVF2`)L~7b2J215-wf$T((-wwpHhr@1+=rRQ1sbnC?EDWyJnJ16km)#ZY#r2 zVj?SqLanZfhT+{gCW=gvCDZ#RGjn^YWl9=QCKJrCGl|C;-N+0pUx)=(tZv)syJ2hD9o4P2#3owZh;-!WKl{JUb*U^9u~np+H34X z7(&Z$gm6WKDc{48svpXFRBKwO_`@UDDK?pc8qg*ZSNXNSSs`x}4a(8gYKiDiMMc>x z&rf20HbJ=fFo}?niIVIdSe`K_-(6iDkqur#Qpocghp2l6x#@kI367Y z>Z+CJuL12Qy73J=zoQlW%{2EGX2lsAy_*8 f`-Sztn(2RP$n-yh3^K?dgL&{j6^ - -namespace facebook { -namespace react { - -using ImageSequenceComponentDescriptor = ConcreteComponentDescriptor; - -} // namespace react -} // namespace facebook diff --git a/harmony/image_sequence/src/main/cpp/EventEmitters.cpp b/harmony/image_sequence/src/main/cpp/EventEmitters.cpp deleted file mode 100644 index 74b7928..0000000 --- a/harmony/image_sequence/src/main/cpp/EventEmitters.cpp +++ /dev/null @@ -1,17 +0,0 @@ - -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * @generated by codegen project: GenerateEventEmitterCpp.js - */ - -#include "EventEmitters.h" - -namespace facebook { -namespace react { - -} // namespace react -} // namespace facebook diff --git a/harmony/image_sequence/src/main/cpp/EventEmitters.h b/harmony/image_sequence/src/main/cpp/EventEmitters.h deleted file mode 100644 index 982f60f..0000000 --- a/harmony/image_sequence/src/main/cpp/EventEmitters.h +++ /dev/null @@ -1,25 +0,0 @@ - -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * @generated by codegen project: GenerateEventEmitterH.js - */ -#pragma once - -#include - - -namespace facebook { -namespace react { -class ImageSequenceEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - - -}; -} // namespace react -} // namespace facebook diff --git a/harmony/image_sequence/src/main/cpp/ImageSequenceJSIBinder.h b/harmony/image_sequence/src/main/cpp/ImageSequenceJSIBinder.h deleted file mode 100644 index c591ef3..0000000 --- a/harmony/image_sequence/src/main/cpp/ImageSequenceJSIBinder.h +++ /dev/null @@ -1,17 +0,0 @@ -#include "RNOHCorePackage/ComponentBinders/ViewComponentJSIBinder.h" - -namespace rnoh { - -class ImageSequenceJSIBinder : public ViewComponentJSIBinder { - facebook::jsi::Object createNativeProps(facebook::jsi::Runtime &rt) override { - auto object = ViewComponentJSIBinder::createNativeProps(rt); - object.setProperty(rt, "loop", "boolean"); - object.setProperty(rt, "images", "array"); - object.setProperty(rt, "startFrameIndex", "int"); - object.setProperty(rt, "framesPerSecond", "int"); - object.setProperty(rt, "downsampleWidth", "int"); - object.setProperty(rt, "downsampleHeight", "int"); - return object; - } -}; -} // namespace rnoh \ No newline at end of file diff --git a/harmony/image_sequence/src/main/cpp/ImageSequenceNapiBinder.h b/harmony/image_sequence/src/main/cpp/ImageSequenceNapiBinder.h deleted file mode 100644 index e4c9dee..0000000 --- a/harmony/image_sequence/src/main/cpp/ImageSequenceNapiBinder.h +++ /dev/null @@ -1,31 +0,0 @@ -#include "RNOHCorePackage/ComponentBinders/ViewComponentNapiBinder.h" -#include "Props.h" - -namespace rnoh { - -class ImageSequenceNapiBinder : public ViewComponentNapiBinder { -public: - napi_value createProps(napi_env env, facebook::react::ShadowView const shadowView) override { - napi_value napiViewProps = ViewComponentNapiBinder::createProps(env, shadowView); - if (auto props = std::dynamic_pointer_cast(shadowView.props)) { - auto images = std::vector(); - auto imageRaw = props->images; - for (auto imagesItem : imageRaw) { - auto imagesItemInt = ArkJS(env).createString(imagesItem); - images.push_back(imagesItemInt); - } - auto viewBoxArray = ArkJS(env).createArray(images); - return ArkJS(env) - .getObjectBuilder(napiViewProps) - .addProperty("images", viewBoxArray) - .addProperty("loop", props->loop) - .addProperty("startFrameIndex", props->startFrameIndex) - .addProperty("framesPerSecond", props->framesPerSecond) - .addProperty("downsampleWidth", props->downsampleWidth) - .addProperty("downsampleHeight", props->downsampleHeight) - .build(); - } - return napiViewProps; - }; -}; -} //namespace rnoh \ No newline at end of file diff --git a/harmony/image_sequence/src/main/cpp/ImageSequencePackage.h b/harmony/image_sequence/src/main/cpp/ImageSequencePackage.h deleted file mode 100644 index 3b6d49e..0000000 --- a/harmony/image_sequence/src/main/cpp/ImageSequencePackage.h +++ /dev/null @@ -1,24 +0,0 @@ -#include "RNOH/Package.h" -#include "ComponentDescriptors.h" -#include "ImageSequenceJSIBinder.h" -#include "ImageSequenceNapiBinder.h" - -namespace rnoh { - -class ImageSequencePackage : public Package { -public: - ImageSequencePackage(Package::Context ctx) : Package(ctx) {} - - std::vector createComponentDescriptorProviders() override { - return {facebook::react::concreteComponentDescriptorProvider()}; - } - - ComponentNapiBinderByString createComponentNapiBinderByName() override { - return {{"ImageSequenceView", std::make_shared()}}; - } - - ComponentJSIBinderByString createComponentJSIBinderByName() override { - return {{"ImageSequenceView", std::make_shared()}}; - } -}; -} // namespace rnoh \ No newline at end of file diff --git a/harmony/image_sequence/src/main/cpp/ImageSequenceSpecsJSI-generated.cpp b/harmony/image_sequence/src/main/cpp/ImageSequenceSpecsJSI-generated.cpp deleted file mode 100644 index 397d300..0000000 --- a/harmony/image_sequence/src/main/cpp/ImageSequenceSpecsJSI-generated.cpp +++ /dev/null @@ -1,19 +0,0 @@ -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * @generated by codegen project: GenerateModuleCpp.js - */ - -#include "ImageSequenceSpecsJSI.h" - -namespace facebook { -namespace react { - - - - -} // namespace react -} // namespace facebook diff --git a/harmony/image_sequence/src/main/cpp/ImageSequenceSpecsJSI.h b/harmony/image_sequence/src/main/cpp/ImageSequenceSpecsJSI.h deleted file mode 100644 index b301476..0000000 --- a/harmony/image_sequence/src/main/cpp/ImageSequenceSpecsJSI.h +++ /dev/null @@ -1,21 +0,0 @@ -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * @generated by codegen project: GenerateModuleH.js - */ - -#pragma once - -#include -#include - -namespace facebook { -namespace react { - - - -} // namespace react -} // namespace facebook diff --git a/harmony/image_sequence/src/main/cpp/Props.cpp b/harmony/image_sequence/src/main/cpp/Props.cpp deleted file mode 100644 index 916afa4..0000000 --- a/harmony/image_sequence/src/main/cpp/Props.cpp +++ /dev/null @@ -1,30 +0,0 @@ - -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * @generated by codegen project: GeneratePropsCpp.js - */ - -#include "Props.h" -#include -#include - -namespace facebook { -namespace react { - - ImageSequenceProps::ImageSequenceProps(const PropsParserContext &context, const ImageSequenceProps &sourceProps, - const RawProps &rawProps) - : ViewProps(context, sourceProps, rawProps), - - loop(convertRawProp(context, rawProps, "loop", sourceProps.loop, {true})), - startFrameIndex(convertRawProp(context, rawProps, "startFrameIndex", sourceProps.startFrameIndex, {0})), - framesPerSecond(convertRawProp(context, rawProps, "framesPerSecond", sourceProps.framesPerSecond, {24})), - downsampleWidth(convertRawProp(context, rawProps, "downsampleWidth", sourceProps.downsampleWidth, {-1})), - downsampleHeight(convertRawProp(context, rawProps, "downsampleHeight", sourceProps.downsampleHeight, {-1})), - images(convertRawProp(context, rawProps, "images", sourceProps.images, {})) {} - -} // namespace react -} // namespace facebook diff --git a/harmony/image_sequence/src/main/cpp/Props.h b/harmony/image_sequence/src/main/cpp/Props.h deleted file mode 100644 index d13aeb2..0000000 --- a/harmony/image_sequence/src/main/cpp/Props.h +++ /dev/null @@ -1,34 +0,0 @@ - -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * @generated by codegen project: GeneratePropsH.js - */ -#pragma once - -#include -#include - -namespace facebook { -namespace react { - -class ImageSequenceProps final : public ViewProps { - public: - ImageSequenceProps() = default; - ImageSequenceProps(const PropsParserContext& context, const ImageSequenceProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - std::vector images{}; - bool loop{true}; - int startFrameIndex{0}; - int framesPerSecond{24}; - int downsampleWidth{-1}; - int downsampleHeight{-1}; -}; - -} // namespace react -} // namespace facebook diff --git a/harmony/image_sequence/src/main/cpp/ShadowNodes.cpp b/harmony/image_sequence/src/main/cpp/ShadowNodes.cpp deleted file mode 100644 index 305c8ca..0000000 --- a/harmony/image_sequence/src/main/cpp/ShadowNodes.cpp +++ /dev/null @@ -1,20 +0,0 @@ - -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * @generated by codegen project: GenerateShadowNodeCpp.js - */ - -#include "Props.h" -#include "ShadowNodes.h" - -namespace facebook { -namespace react { - -extern const char ImageSequenceComponentName[] = "ImageSequenceView"; - -} // namespace react -} // namespace facebook diff --git a/harmony/image_sequence/src/main/cpp/ShadowNodes.h b/harmony/image_sequence/src/main/cpp/ShadowNodes.h deleted file mode 100644 index 144aefd..0000000 --- a/harmony/image_sequence/src/main/cpp/ShadowNodes.h +++ /dev/null @@ -1,34 +0,0 @@ - -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * @generated by codegen project: GenerateShadowNodeH.js - */ - -#pragma once - -#include "EventEmitters.h" -#include "Props.h" -#include "States.h" -#include -#include - -namespace facebook { -namespace react { - -JSI_EXPORT extern const char ImageSequenceComponentName[]; - -/* - * `ShadowNode` for component. - */ -using ImageSequenceShadowNode = ConcreteViewShadowNode< - ImageSequenceComponentName, - ImageSequenceProps, - ImageSequenceEventEmitter, - ImageSequenceState>; - -} // namespace react -} // namespace facebook diff --git a/harmony/image_sequence/src/main/cpp/States.cpp b/harmony/image_sequence/src/main/cpp/States.cpp deleted file mode 100644 index 62a093d..0000000 --- a/harmony/image_sequence/src/main/cpp/States.cpp +++ /dev/null @@ -1,18 +0,0 @@ - -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * @generated by codegen project: GenerateStateCpp.js - */ -#include "States.h" - -namespace facebook { -namespace react { - - - -} // namespace react -} // namespace facebook diff --git a/harmony/image_sequence/src/main/cpp/States.h b/harmony/image_sequence/src/main/cpp/States.h deleted file mode 100644 index 315f60c..0000000 --- a/harmony/image_sequence/src/main/cpp/States.h +++ /dev/null @@ -1,36 +0,0 @@ -/** - * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). - * - * Do not edit this file as changes may cause incorrect behavior and will be lost - * once the code is regenerated. - * - * @generated by codegen project: GenerateStateH.js - */ -#pragma once - -#ifdef ANDROID -#include -#include -#include -#endif - -namespace facebook { -namespace react { - -class ImageSequenceState { -public: - ImageSequenceState() = default; - -#ifdef ANDROID - ImageSequenceState(ImageSequenceState const &previousState, folly::dynamic data){}; - folly::dynamic getDynamic() const { - return {}; - }; - MapBuffer getMapBuffer() const { - return MapBufferBuilder::EMPTY(); - }; -#endif -}; - -} // namespace react -} // namespace facebook \ No newline at end of file diff --git a/harmony/image_sequence/src/main/ets/ImageSequencePackage.ts b/harmony/image_sequence/src/main/ets/ImageSequencePackage.ts new file mode 100644 index 0000000..f50b377 --- /dev/null +++ b/harmony/image_sequence/src/main/ets/ImageSequencePackage.ts @@ -0,0 +1,13 @@ +import { RNPackage } from '@rnoh/react-native-openharmony/ts'; +import type {DescriptorWrapperFactoryByDescriptorTypeCtx, DescriptorWrapperFactoryByDescriptorType} from '@rnoh/react-native-openharmony/ts'; +import { RNC } from '@rnoh/react-native-openharmony/generated/ts' + +export class ImageSequencePackage extends RNPackage { + createDescriptorWrapperFactoryByDescriptorType(ctx: + DescriptorWrapperFactoryByDescriptorTypeCtx): + DescriptorWrapperFactoryByDescriptorType { + return { + [RNC.ImageSequenceView.NAME]: (ctx) => new RNC.ImageSequenceView.DescriptorWrapper(ctx.descriptor) + } + } +} \ No newline at end of file diff --git a/harmony/image_sequence/src/main/ets/RNImageSequence.ets b/harmony/image_sequence/src/main/ets/RNImageSequence.ets index 865df67..e9d88e6 100644 --- a/harmony/image_sequence/src/main/ets/RNImageSequence.ets +++ b/harmony/image_sequence/src/main/ets/RNImageSequence.ets @@ -1,13 +1,14 @@ -import { Descriptor, ComponentBuilderContext, ViewRawrawProps, Tag } from '@rnoh/react-native-openharmony'; +import { Descriptor, ComponentBuilderContext, ViewRawProps, Tag } from '@rnoh/react-native-openharmony'; import { RNComponentFactory, RNOHContext, RNViewBase } from '@rnoh/react-native-openharmony'; // import { ImageLoaderTurboModule } from '@rnoh/react-native-openharmony/src/main/ets/RNOHCorePackage/turboModules'; import image from '@ohos.multimedia.image'; import resourceManager from '@ohos.resourceManager'; import { BusinessError } from '@ohos.base'; +import { RNC } from '@rnoh/react-native-openharmony/generated/ts' export const IMAGE_SEQUENCE_TYPE: string = "ImageSequenceView" -export interface ImageSequencerawProps extends ViewRawrawProps { +export interface ImageSequencerawProps extends ViewRawProps { loop: boolean, images: Array, startFrameIndex: number, @@ -17,7 +18,7 @@ export interface ImageSequencerawProps extends ViewRawrawProps { } // export type ImageSequenceDescriptor = Descriptor<"ImageSequenceView", ImageSequencerawProps> -export type ImageSequenceDescriptor = Descriptor<"ImageSequenceView", ViewRawrawProps, [], ImageSequencerawProps> +// export type ImageSequenceDescriptor = Descriptor<"ImageSequenceView", ViewRawProps, [], ImageSequencerawProps> export interface ImageData { src: string | Resource, width: number @@ -28,11 +29,14 @@ const resourceMgr: resourceManager.ResourceManager = context.resourceManager; @Component export struct RNImageSequence { + public static readonly NAME: string = RNC.ImageSequenceView.NAME; ctx!: RNOHContext; tag: number = 0; @BuilderParam buildCustomComponent: (componentBuilderContext: ComponentBuilderContext) => void; - @State descriptor: ImageSequenceDescriptor = {} as ImageSequenceDescriptor; - private unregisterDescriptorChangesListener?: () => void = undefined; + // @State descriptor: ImageSequenceDescriptor = {} as ImageSequenceDescriptor; + // private unregisterDescriptorChangesListener?: () => void = undefined; + @State descriptorWrapper: RNC.ImageSequenceView.DescriptorWrapper = {} as RNC.ImageSequenceView.DescriptorWrapper; + @State cleanUpCallbacks: (()=>void)[]=[] @State ImageList: (Resource | string | PixelMap)[] = []; @State duration: number = 0; @State timer: number = 0; @@ -42,15 +46,20 @@ export struct RNImageSequence { @State localIndex: number[] = []; aboutToAppear() { - this.descriptor = this.ctx.descriptorRegistry.getDescriptor(this.tag); - this.unregisterDescriptorChangesListener = this.ctx.descriptorRegistry.subscribeToDescriptorChanges(this.tag, - (newDescriptor) => { - this.descriptor = (newDescriptor as ImageSequenceDescriptor) - } - ) + // this.descriptor = this.ctx.descriptorRegistry.getDescriptor(this.tag); + // this.unregisterDescriptorChangesListener = this.ctx.descriptorRegistry.subscribeToDescriptorChanges(this.tag, + // (newDescriptor) => { + // this.descriptor = (newDescriptor as ImageSequenceDescriptor) + // } + // ) + this.onDescriptorWrapperChange(this.ctx.descriptorRegistry.findDescriptorWrapperByTag(this.tag)!) + this.cleanUpCallbacks.push(this.ctx.descriptorRegistry.subscribeToDescriptorChanges(this.tag, + (descriptor) => { + this.onDescriptorWrapperChange(new RNC.ImageSequenceView.DescriptorWrapper(descriptor)) + })) - this.duration = 1000 / this.descriptor.rawProps.framesPerSecond; - const sourceList = this.descriptor.rawProps.images; + this.duration = 1000 / this.descriptorWrapper.props.framesPerSecond; + const sourceList = this.descriptorWrapper.props.images; this.ImageList.length = sourceList.length; sourceList.forEach((item, index)=>{ @@ -61,7 +70,7 @@ export struct RNImageSequence { this.finishCount +=1 } }) - if (this.descriptor.rawProps.loop) { + if (this.descriptorWrapper.props.loop) { this.num = 0; this.timer = setInterval(()=>{ this.num++; @@ -75,6 +84,10 @@ export struct RNImageSequence { } } + private onDescriptorWrapperChange(descriptorWrapper: RNC.ImageSequenceView.DescriptorWrapper) { + this.descriptorWrapper = descriptorWrapper + } + getRawFileContent(img:string, index:number) { resourceMgr.getRawFileContent(img).then((fileData: Uint8Array) => { const buffer = fileData.buffer.slice(0); @@ -98,8 +111,8 @@ export struct RNImageSequence { calculateInSampleSize(width: number, height: number):number { let inSampleSize = 1; - let reqWidth: number = this.descriptor.rawProps.downsampleWidth; - let reqHeight: number = this.descriptor.rawProps.downsampleHeight; + let reqWidth: number = this.descriptorWrapper.props.downsampleWidth; + let reqHeight: number = this.descriptorWrapper.props.downsampleHeight; if (height > reqHeight || width > reqWidth) { let halfHeight = height / 2; @@ -133,7 +146,8 @@ export struct RNImageSequence { imageSourceApi.release(); } aboutToDisappear() { - this.unregisterDescriptorChangesListener?.() + // this.unregisterDescriptorChangesListener?.() + this.cleanUpCallbacks.forEach(cb => cb()) clearInterval(this.timer); if (this.isLocalResource) { this.localIndex.forEach(lIndex => { @@ -141,6 +155,7 @@ export struct RNImageSequence { item.release(); }) } + this.ImageList.length = 0; } build() { @@ -148,7 +163,7 @@ export struct RNImageSequence { if (this.finishCount === this.ImageList.length) { Image(this.ImageList[this.num]).objectFit(ImageFit.Fill).draggable(false).width('100%').height('100%').onComplete(()=>{ console.log(`加载完成:${new Date().getTime()}`) - }) + }).key('image_sequence') } } } diff --git a/harmony/image_sequence/src/main/module.json5 b/harmony/image_sequence/src/main/module.json5 index 72cc27f..856861a 100644 --- a/harmony/image_sequence/src/main/module.json5 +++ b/harmony/image_sequence/src/main/module.json5 @@ -6,6 +6,11 @@ "default", "tablet", "2in1" + ], + "requestPermissions": [ + { + "name": "ohos.permission.INTERNET" + } ] } } diff --git a/harmony/image_sequence/src/test/List.test.ets b/harmony/image_sequence/src/test/List.test.ets deleted file mode 100644 index bb5b5c3..0000000 --- a/harmony/image_sequence/src/test/List.test.ets +++ /dev/null @@ -1,5 +0,0 @@ -import localUnitTest from './LocalUnit.test'; - -export default function testsuite() { - localUnitTest(); -} \ No newline at end of file diff --git a/harmony/image_sequence/src/test/LocalUnit.test.ets b/harmony/image_sequence/src/test/LocalUnit.test.ets deleted file mode 100644 index ed22d4d..0000000 --- a/harmony/image_sequence/src/test/LocalUnit.test.ets +++ /dev/null @@ -1,33 +0,0 @@ -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; - -export default function localUnitTest() { - describe('localUnitTest',() => { - // Defines a test suite. Two parameters are supported: test suite name and test suite function. - beforeAll(() => { - // Presets an action, which is performed only once before all test cases of the test suite start. - // This API supports only one parameter: preset action function. - }); - beforeEach(() => { - // Presets an action, which is performed before each unit test case starts. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: preset action function. - }); - afterEach(() => { - // Presets a clear action, which is performed after each unit test case ends. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: clear action function. - }); - afterAll(() => { - // Presets a clear action, which is performed after all test cases of the test suite end. - // This API supports only one parameter: clear action function. - }); - it('assertContain', 0, () => { - // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. - let a = 'abc'; - let b = 'b'; - // Defines a variety of assertion methods, which are used to declare expected boolean conditions. - expect(a).assertContain(b); - expect(a).assertEqual(a); - }); - }); -} \ No newline at end of file diff --git a/harmony/image_sequence/ts.ts b/harmony/image_sequence/ts.ts new file mode 100644 index 0000000..7b6b357 --- /dev/null +++ b/harmony/image_sequence/ts.ts @@ -0,0 +1 @@ +export * from './src/main/ets/ImageSequencePackage' \ No newline at end of file diff --git a/index.tsx b/index.tsx index 369a16d..7acd51c 100644 --- a/index.tsx +++ b/index.tsx @@ -1,6 +1,20 @@ import { forwardRef, memo } from 'react'; import { View, Image } from 'react-native'; import ImagesequenceView, { NativeProps } from './src/ImageSequenceNativeComponent' + +interface ImageProps { + images: any[], + startFrameIndex?: number, + framesPerSecond?: number, + loop?: boolean, + downsampleWidth?: number, + downsampleHeight?: number, + style?:{ + width?: number, + height?: number + } +} + function ImageSequenceBase({ images, startFrameIndex, @@ -11,7 +25,7 @@ function ImageSequenceBase({ forwardRef, style, ...props -}: NativeProps & { forwardRef: React.Ref }) { +}: ImageProps & { forwardRef: React.Ref }) { let images2: any[] = []; images.forEach(item => { if (item.uri) { diff --git a/package.json b/package.json index 6b70b29..49885fb 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "react-native": "index", "source": "index", "main": "lib/commonjs/index", + "module": "lib/module/index", "typings": "lib/typescript/index.d.ts", "files": [ "src", @@ -36,26 +37,20 @@ "react": "*", "react-native": "*" }, - "codegenConfig": { - "name": "ImageSequenceSpecs", - "type": "components", - "jsSrcsDir": "src" - }, "harmony": { - "alias": "react-native-image-sequence-2" + "alias": "react-native-image-sequence-2", + "codegenConfig": { + "specPaths": [ + "./src" + ] + } }, "react-native-builder-bob": { "source": "src", "output": "lib", "targets": [ "commonjs", - "module", - [ - "typescript", - { - "project": "tsconfig.build.json" - } - ] + "module" ] } } \ No newline at end of file diff --git a/src/ImageSequenceNativeComponent.ts b/src/ImageSequenceNativeComponent.ts index 4d15a47..f0b3871 100644 --- a/src/ImageSequenceNativeComponent.ts +++ b/src/ImageSequenceNativeComponent.ts @@ -1,37 +1,38 @@ import type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes'; import { FlexStyle, HostComponent, ShadowStyleIOS, TransformsStyle } from 'react-native'; import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; +import type { Int32 } from 'react-native/Libraries/Types/CodegenTypes'; -export interface ImageStyle extends FlexStyle, TransformsStyle, ShadowStyleIOS { - backfaceVisibility?: 'visible' | 'hidden'; - borderBottomLeftRadius?: number; - borderBottomRightRadius?: number; - backgroundColor?: string; - borderColor?: string; - borderWidth?: number; - borderRadius?: number; - borderTopLeftRadius?: number; - borderTopRightRadius?: number; - overlayColor?: string; - opacity?: number; - width?: number; - height?: number; -} +// export interface ImageStyle extends FlexStyle, TransformsStyle, ShadowStyleIOS { +// backfaceVisibility?: 'visible' | 'hidden'; +// borderBottomLeftRadius?: number; +// borderBottomRightRadius?: number; +// backgroundColor?: string; +// borderColor?: string; +// borderWidth?: number; +// borderRadius?: number; +// borderTopLeftRadius?: number; +// borderTopRightRadius?: number; +// overlayColor?: string; +// opacity?: number; +// width?: number; +// height?: number; +// } export interface NativeProps extends ViewProps { /** An array of source images. Each element of the array should be the result of a call to require(imagePath). */ - images: any[]; + images: string[]; /** Which index of the images array should the sequence start at. Default: 0 */ - startFrameIndex?: number; + startFrameIndex?: Int32; /** Playback speed of the image sequence. Default: 24 */ - framesPerSecond?: number; + framesPerSecond?: Int32; /** Should the sequence loop. Default: true */ loop?: boolean; /** The width to use for optional downsampling. Both `downsampleWidth` and `downsampleHeight` must be set to a positive number to enable downsampling. Default: -1 */ - downsampleWidth?: number; + downsampleWidth?: Int32; /** The height to use for optional downsampling. Both `downsampleWidth` and `downsampleHeight` must be set to a positive number to enable downsampling. Default: -1 */ - downsampleHeight?: number; - style?: ImageStyle; + downsampleHeight?: Int32; + style?: {width?: Int32, height?: Int32}; } export default codegenNativeComponent( diff --git a/tsconfig.build.json b/tsconfig.build.json deleted file mode 100644 index c2ada1e..0000000 --- a/tsconfig.build.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "./tsconfig", - "exclude": ["harmony"] -} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index 5c8e828..0000000 --- a/tsconfig.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "compilerOptions": { - "declaration": true, - "module": "commonjs", - "strict": true, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "jsx": "react-native", - "lib": ["dom", "es5", "es6", "scripthost"], - "target": "es5", - "outDir": "built", - "sourceMap": true, - "skipLibCheck": true - }, - "exclude": ["node_modules"] - } \ No newline at end of file -- Gitee From df45165ec08929ecd3d17b4d6e14766e35473732 Mon Sep 17 00:00:00 2001 From: wuya_smile Date: Sun, 28 Apr 2024 16:05:40 +0800 Subject: [PATCH 04/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E6=95=B0=E7=BB=84=E4=BC=A0=E5=85=A5=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “leehom6666” --- harmony/image_sequence/src/main/ets/RNImageSequence.ets | 4 ++++ index.tsx | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/harmony/image_sequence/src/main/ets/RNImageSequence.ets b/harmony/image_sequence/src/main/ets/RNImageSequence.ets index e9d88e6..4101c13 100644 --- a/harmony/image_sequence/src/main/ets/RNImageSequence.ets +++ b/harmony/image_sequence/src/main/ets/RNImageSequence.ets @@ -114,6 +114,10 @@ export struct RNImageSequence { let reqWidth: number = this.descriptorWrapper.props.downsampleWidth; let reqHeight: number = this.descriptorWrapper.props.downsampleHeight; + if (reqHeight <= 0 || reqWidth <= 0) { + return inSampleSize; + } + if (height > reqHeight || width > reqWidth) { let halfHeight = height / 2; let halWidth = width/ 2; diff --git a/index.tsx b/index.tsx index 7acd51c..c0d2338 100644 --- a/index.tsx +++ b/index.tsx @@ -29,10 +29,10 @@ function ImageSequenceBase({ let images2: any[] = []; images.forEach(item => { if (item.uri) { - images2.push(item); + images2.push(item.uri); } else { let resolvedSource = Image.resolveAssetSource(item); - images.push(resolvedSource.uri); + images2.push(resolvedSource.uri); } }) if (startFrameIndex !== 0) { -- Gitee From e4cbd2dd810981b6f3b77cc73800431de7433136 Mon Sep 17 00:00:00 2001 From: wuya_smile Date: Sun, 28 Apr 2024 16:06:57 +0800 Subject: [PATCH 05/16] =?UTF-8?q?package.json=E6=B7=BB=E5=8A=A0lib?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “leehom6666” --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 49885fb..1e6fb0a 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "files": [ "src", "harmony", + "lib", "react-native-image-sequence-2.podspec", "index.tsx", "!**/__tests__", -- Gitee From 98e4328bebfd09cdeb98aece74e6182ac8810594 Mon Sep 17 00:00:00 2001 From: wuya_smile Date: Wed, 15 May 2024 09:11:37 +0800 Subject: [PATCH 06/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9hvigorfile=E5=AF=BC?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “leehom6666” --- harmony/image_sequence.har | Bin 3921 -> 3975 bytes harmony/image_sequence/hvigorfile.ts | 2 +- .../src/main/ets/ImageSequencePackage.ts | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/harmony/image_sequence.har b/harmony/image_sequence.har index b9f1d84a4c0a4cd5272956e930410a6d4932d6c6..448662467274888ac7462c624368507d087b91f0 100644 GIT binary patch literal 3975 zcmV;24|wn&iwFP!000003hf-*ZsW#vUu|IjVIril)W{TdvjaJH))(!rfc2%eHbGz* z4ke8wW+_q`lD@>zdr|bE&wc6_^b4BLNzu3dLeJdDAw^wmYO~3f2a7c|XD(;Xoa@Yx zW25`d7~s-@Z(6-G;`B`mYuIz2tq^ow-`d(j^e;gCuU^%w=vle8RjyR4Ta|MCnO?4M z*D8QtB@wg0cRhmuDQWwOPwqDWz|%@u*Xy;~R)oJQ;JdLyJk-N|!?!%twG7uqsxY7j zw7v#B^2{zG*yuU7b&p=}pI?97Jiln2o}gW{QPy-#-`JV1cks6L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87=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “leehom6666” --- harmony/image_sequence.har | Bin 3975 -> 4016 bytes harmony/image_sequence/BuildProfile.ets | 6 ++++++ harmony/image_sequence/consumer-rules.txt | 0 .../src/main/ets/ImageSequencePackage.ts | 2 +- .../src/main/ets/RNImageSequence.ets | 10 ++++------ 5 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 harmony/image_sequence/BuildProfile.ets create mode 100644 harmony/image_sequence/consumer-rules.txt diff --git a/harmony/image_sequence.har b/harmony/image_sequence.har index 448662467274888ac7462c624368507d087b91f0..d2268ecdde77b13517102caccade936a905f2641 100644 GIT binary patch literal 4016 zcmV;h4^QwPiwFP!000003hf-*a@)q$uhNYFVZ%uyvY|lmstjc*)`gBaV_hoI$z(hl z1tgawVh~^!pe|AP-s$wA&wc6_^b4BLNvCi9g`T})0bXU$apK~P$0GLZ3QiTsR!tPWPO6J=?(s4*Vx;1k*HYwHl&-0pfqnvROt?ij`WiR4&&_#p)BYSly}6 z`s*ZO9*q6KB0x&ge&Un+4FK>I*jWW`ni2l$fbT{g2~ZdJtg#cIj$`>g(uDy%pv?{7 zQDAov!B*FEoqP21;Ntr0#>Hjx>=f;xt)gKX=GN|Xy~EedSI5^UXUC1}(}R-+t=q-z zaer3bj-4KcXJ-hG@$u_@q-9TDDsNStwkbHisY` zm-vSE;KTN(%1@r2b!E-y4$-Zdq*z0D`+P94^KA{%2*@2bw9$HI?4b$`uN1_;!K{Q zm|&cZ0^4%|&8knPFqb$0{8bS2%13TV@N91en_H*F$&s{+jIz@y1z`c;+6h52_MwYi5QXpz2Y1K z$?8KGwTLw$j}gPM?qICRuNG)Y{qF!%$3sj)4ysKeiSGZDcS`B{Cxuz-Px-5Z$p0SDz#=Wnf9s=( zNClsJ1J4(7u}yz(kDPJecDHuZB=F+_ssE1M_6zT64A6(2ot>rjU*#%hv0N)c{I|Xc zbOH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f|%f4Xg>xKCv&PVdIA{s_g+Jev)$xsW^Brt4E z-QZ4$BKU_$y1dA-#j@;ZPtoLh`L1}o!2410;gbR*8+40)`iW+yC^h8rcCb}%*-9AmMLyPnM^Rl&LnPsY&O_WVeNTdw9Bh#{1imN zghLgSaU6RT3d16D8R_GF@XvzPrrchnAn4ILQFL+o8U_+sR93xF|jgqRAL1;~}iV z1UVM}8Oy7LDnWqV2zD~05Qj^_n_kgm_AI&>j3%B6sGMZd6ZP-25*l4KP;4VCZjM8wy-zK?ev%z7Pa=oafp*e4pQlUPjv}Oe?l>2s`Kg4?R#= z$t9r2-~ZXJ>e>50so_cYf5P?0_VwF~RS3Wn*1x7__rFs^%Ju(oczt;Cf!4peovnXr zNV)#Z{)1;9VcSb329I9yIc#t|6bXu)9*i3s^#qa@9817{sDhgcvxrOd!mcWUMQj&;)6&S zgLjI8uS4gG5_Mx(et_eb%!DZAc$NwOUuEz7{N`b4|DVDDJVE~})ca+lI007!>>s|l= diff --git a/harmony/image_sequence/BuildProfile.ets b/harmony/image_sequence/BuildProfile.ets new file mode 100644 index 0000000..f05d220 --- /dev/null +++ b/harmony/image_sequence/BuildProfile.ets @@ -0,0 +1,6 @@ +export default class BuildProfile { + static readonly HAR_VERSION = '1.0.0'; + static readonly BUILD_MODE_NAME = 'debug'; + static readonly DEBUG = true; + static readonly TARGET_NAME = 'default'; +} \ No newline at end of file diff --git a/harmony/image_sequence/consumer-rules.txt b/harmony/image_sequence/consumer-rules.txt new file mode 100644 index 0000000..e69de29 diff --git a/harmony/image_sequence/src/main/ets/ImageSequencePackage.ts b/harmony/image_sequence/src/main/ets/ImageSequencePackage.ts index 2b7fc55..f50b377 100644 --- a/harmony/image_sequence/src/main/ets/ImageSequencePackage.ts +++ b/harmony/image_sequence/src/main/ets/ImageSequencePackage.ts @@ -1,6 +1,6 @@ import { RNPackage } from '@rnoh/react-native-openharmony/ts'; import type {DescriptorWrapperFactoryByDescriptorTypeCtx, DescriptorWrapperFactoryByDescriptorType} from '@rnoh/react-native-openharmony/ts'; -import { RNC } from '@rnoh/react-native-openharmony/generated' +import { RNC } from '@rnoh/react-native-openharmony/generated/ts' export class ImageSequencePackage extends RNPackage { createDescriptorWrapperFactoryByDescriptorType(ctx: diff --git a/harmony/image_sequence/src/main/ets/RNImageSequence.ets b/harmony/image_sequence/src/main/ets/RNImageSequence.ets index 4101c13..536a23a 100644 --- a/harmony/image_sequence/src/main/ets/RNImageSequence.ets +++ b/harmony/image_sequence/src/main/ets/RNImageSequence.ets @@ -4,7 +4,7 @@ import { RNComponentFactory, RNOHContext, RNViewBase } from '@rnoh/react-native- import image from '@ohos.multimedia.image'; import resourceManager from '@ohos.resourceManager'; import { BusinessError } from '@ohos.base'; -import { RNC } from '@rnoh/react-native-openharmony/generated/ts' +import { RNC } from '@rnoh/react-native-openharmony/generated' export const IMAGE_SEQUENCE_TYPE: string = "ImageSequenceView" @@ -113,11 +113,9 @@ export struct RNImageSequence { let inSampleSize = 1; let reqWidth: number = this.descriptorWrapper.props.downsampleWidth; let reqHeight: number = this.descriptorWrapper.props.downsampleHeight; - - if (reqHeight <= 0 || reqWidth <= 0) { - return inSampleSize; - } - + if (width<=0 || height<=0) { + return inSampleSize; + } if (height > reqHeight || width > reqWidth) { let halfHeight = height / 2; let halWidth = width/ 2; -- Gitee From 2ca99da3c2df8bfb2defe7c40dc8631616f692a2 Mon Sep 17 00:00:00 2001 From: wuya_smile Date: Sat, 18 May 2024 11:42:39 +0800 Subject: [PATCH 08/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “leehom6666” --- harmony/image_sequence/src/main/ets/RNImageSequence.ets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/harmony/image_sequence/src/main/ets/RNImageSequence.ets b/harmony/image_sequence/src/main/ets/RNImageSequence.ets index 536a23a..a56ef21 100644 --- a/harmony/image_sequence/src/main/ets/RNImageSequence.ets +++ b/harmony/image_sequence/src/main/ets/RNImageSequence.ets @@ -113,7 +113,7 @@ export struct RNImageSequence { let inSampleSize = 1; let reqWidth: number = this.descriptorWrapper.props.downsampleWidth; let reqHeight: number = this.descriptorWrapper.props.downsampleHeight; - if (width<=0 || height<=0) { + if (reqWidth <= 0 || reqHeight <= 0) { return inSampleSize; } if (height > reqHeight || width > reqWidth) { -- Gitee From e1cd9bc517a0174a9c18d2b7970742d916906b33 Mon Sep 17 00:00:00 2001 From: wuya_smile Date: Thu, 23 May 2024 15:05:16 +0800 Subject: [PATCH 09/16] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “leehom6666” --- .../src/main/ets/RNImageSequence.ets | 41 +++++++------------ 1 file changed, 15 insertions(+), 26 deletions(-) diff --git a/harmony/image_sequence/src/main/ets/RNImageSequence.ets b/harmony/image_sequence/src/main/ets/RNImageSequence.ets index a56ef21..5aed4a3 100644 --- a/harmony/image_sequence/src/main/ets/RNImageSequence.ets +++ b/harmony/image_sequence/src/main/ets/RNImageSequence.ets @@ -17,8 +17,6 @@ export interface ImageSequencerawProps extends ViewRawProps { downsampleHeight: number } -// export type ImageSequenceDescriptor = Descriptor<"ImageSequenceView", ImageSequencerawProps> -// export type ImageSequenceDescriptor = Descriptor<"ImageSequenceView", ViewRawProps, [], ImageSequencerawProps> export interface ImageData { src: string | Resource, width: number @@ -33,8 +31,6 @@ export struct RNImageSequence { ctx!: RNOHContext; tag: number = 0; @BuilderParam buildCustomComponent: (componentBuilderContext: ComponentBuilderContext) => void; - // @State descriptor: ImageSequenceDescriptor = {} as ImageSequenceDescriptor; - // private unregisterDescriptorChangesListener?: () => void = undefined; @State descriptorWrapper: RNC.ImageSequenceView.DescriptorWrapper = {} as RNC.ImageSequenceView.DescriptorWrapper; @State cleanUpCallbacks: (()=>void)[]=[] @State ImageList: (Resource | string | PixelMap)[] = []; @@ -46,12 +42,6 @@ export struct RNImageSequence { @State localIndex: number[] = []; aboutToAppear() { - // this.descriptor = this.ctx.descriptorRegistry.getDescriptor(this.tag); - // this.unregisterDescriptorChangesListener = this.ctx.descriptorRegistry.subscribeToDescriptorChanges(this.tag, - // (newDescriptor) => { - // this.descriptor = (newDescriptor as ImageSequenceDescriptor) - // } - // ) this.onDescriptorWrapperChange(this.ctx.descriptorRegistry.findDescriptorWrapperByTag(this.tag)!) this.cleanUpCallbacks.push(this.ctx.descriptorRegistry.subscribeToDescriptorChanges(this.tag, (descriptor) => { @@ -59,10 +49,10 @@ export struct RNImageSequence { })) this.duration = 1000 / this.descriptorWrapper.props.framesPerSecond; - const sourceList = this.descriptorWrapper.props.images; + const sourceList: string[] = this.descriptorWrapper.props.images; this.ImageList.length = sourceList.length; - sourceList.forEach((item, index)=>{ + sourceList.forEach((item: string, index: number)=>{ if (item.startsWith("asset://")) { this.getRawFileContent(item.replace("asset://", "assets/"), index) } else { @@ -88,16 +78,16 @@ export struct RNImageSequence { this.descriptorWrapper = descriptorWrapper } - getRawFileContent(img:string, index:number) { + getRawFileContent(img:string, index:number): void { resourceMgr.getRawFileContent(img).then((fileData: Uint8Array) => { - const buffer = fileData.buffer.slice(0); + const buffer: ArrayBuffer = fileData.buffer.slice(0); this.imageEdit(buffer, index); }).catch((err: BusinessError) => { console.error(`getRawFileContent failed: ${err.code}`) }) } - getSource(source:string) { + getSource(source: string) { if (source.startsWith("asset://")) { return $rawfile(source.replace("asset://", "assets/")) } @@ -109,16 +99,16 @@ export struct RNImageSequence { return source; } - calculateInSampleSize(width: number, height: number):number { - let inSampleSize = 1; + calculateInSampleSize(width: number, height: number): number { + let inSampleSize: number = 1; let reqWidth: number = this.descriptorWrapper.props.downsampleWidth; let reqHeight: number = this.descriptorWrapper.props.downsampleHeight; if (reqWidth <= 0 || reqHeight <= 0) { return inSampleSize; } if (height > reqHeight || width > reqWidth) { - let halfHeight = height / 2; - let halWidth = width/ 2; + let halfHeight: number = height / 2; + let halWidth: number = width/ 2; while ((halfHeight / inSampleSize) >= reqHeight && (halWidth / inSampleSize) >= reqWidth) { inSampleSize *= 2; } @@ -128,11 +118,11 @@ export struct RNImageSequence { async imageEdit(imageData:ArrayBuffer, index:number) { let imageSourceApi:image.ImageSource = image.createImageSource(imageData); - let pixelMap = await imageSourceApi.createPixelMap(); - const imageInfo = await pixelMap.getImageInfo(); - const width = imageInfo.size.width; - const height = imageInfo.size.height; - const sampleSize = this.calculateInSampleSize(width, height); + let pixelMap: image.PixelMap = await imageSourceApi.createPixelMap(); + const imageInfo: image.ImageInfo = await pixelMap.getImageInfo(); + const width: number = imageInfo.size.width; + const height: number = imageInfo.size.height; + const sampleSize: number = this.calculateInSampleSize(width, height); const decodeOptions:image.DecodingOptions = { desiredSize: { width: width / sampleSize, @@ -148,11 +138,10 @@ export struct RNImageSequence { imageSourceApi.release(); } aboutToDisappear() { - // this.unregisterDescriptorChangesListener?.() this.cleanUpCallbacks.forEach(cb => cb()) clearInterval(this.timer); if (this.isLocalResource) { - this.localIndex.forEach(lIndex => { + this.localIndex.forEach((lIndex: number) => { const item: PixelMap = this.ImageList[lIndex] as PixelMap; item.release(); }) -- Gitee From 86dafaa58f3ad06546842a21ac5e6bef6d506530 Mon Sep 17 00:00:00 2001 From: wuya_smile Date: Thu, 30 May 2024 09:58:44 +0800 Subject: [PATCH 10/16] refactor:Remove style and change ts to js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “leehom6666” --- index.tsx => index.js | 27 ++++++--------------------- package.json | 2 +- src/ImageSequenceNativeComponent.ts | 3 +-- 3 files changed, 8 insertions(+), 24 deletions(-) rename index.tsx => index.js (63%) diff --git a/index.tsx b/index.js similarity index 63% rename from index.tsx rename to index.js index c0d2338..95f3ce0 100644 --- a/index.tsx +++ b/index.js @@ -1,19 +1,6 @@ import { forwardRef, memo } from 'react'; import { View, Image } from 'react-native'; -import ImagesequenceView, { NativeProps } from './src/ImageSequenceNativeComponent' - -interface ImageProps { - images: any[], - startFrameIndex?: number, - framesPerSecond?: number, - loop?: boolean, - downsampleWidth?: number, - downsampleHeight?: number, - style?:{ - width?: number, - height?: number - } -} +import ImagesequenceView from './src/ImageSequenceNativeComponent' function ImageSequenceBase({ images, @@ -23,10 +10,9 @@ function ImageSequenceBase({ downsampleHeight, downsampleWidth, forwardRef, - style, ...props -}: ImageProps & { forwardRef: React.Ref }) { - let images2: any[] = []; +}) { + let images2 = []; images.forEach(item => { if (item.uri) { images2.push(item.uri); @@ -48,7 +34,6 @@ function ImageSequenceBase({ downsampleWidth={downsampleWidth} downsampleHeight={downsampleHeight} images={images2} - style={style} /> ) @@ -56,11 +41,11 @@ function ImageSequenceBase({ const ImageSequenceMemo = memo(ImageSequenceBase) -const ImageSequenceComponent: React.ComponentType = forwardRef( - (props: NativeProps, ref: React.Ref) => ( +const ImageSequenceComponent = forwardRef( + (props, ref) => ( ), ) ImageSequenceComponent.displayName = 'ImageSequence'; -const ImageSequence: React.ComponentType = ImageSequenceComponent as any; +const ImageSequence = ImageSequenceComponent; export default ImageSequence; \ No newline at end of file diff --git a/package.json b/package.json index 1e6fb0a..0c42fea 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "harmony", "lib", "react-native-image-sequence-2.podspec", - "index.tsx", + "index.js", "!**/__tests__", "!**/__fixtures__", "!**/__mocks__" diff --git a/src/ImageSequenceNativeComponent.ts b/src/ImageSequenceNativeComponent.ts index f0b3871..f0c0f29 100644 --- a/src/ImageSequenceNativeComponent.ts +++ b/src/ImageSequenceNativeComponent.ts @@ -31,8 +31,7 @@ export interface NativeProps extends ViewProps { /** The width to use for optional downsampling. Both `downsampleWidth` and `downsampleHeight` must be set to a positive number to enable downsampling. Default: -1 */ downsampleWidth?: Int32; /** The height to use for optional downsampling. Both `downsampleWidth` and `downsampleHeight` must be set to a positive number to enable downsampling. Default: -1 */ - downsampleHeight?: Int32; - style?: {width?: Int32, height?: Int32}; + downsampleHeight?: Int32 } export default codegenNativeComponent( -- Gitee From 61da47f6527c3d0a898daf9c1cf276700dcc30dd Mon Sep 17 00:00:00 2001 From: wuya_smile Date: Mon, 17 Jun 2024 15:15:39 +0800 Subject: [PATCH 11/16] =?UTF-8?q?refactor:=20=E6=B7=BB=E5=8A=A0logger.ets?= =?UTF-8?q?=E6=96=87=E4=BB=B6=EF=BC=8C=E4=BF=AE=E6=94=B9RNImageSequence.et?= =?UTF-8?q?s=E5=86=85=E6=97=A5=E5=BF=97=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “leehom6666” --- .../image_sequence/src/main/ets/Logger.ets | 60 +++++++++++++++++++ .../src/main/ets/RNImageSequence.ets | 6 +- 2 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 harmony/image_sequence/src/main/ets/Logger.ets diff --git a/harmony/image_sequence/src/main/ets/Logger.ets b/harmony/image_sequence/src/main/ets/Logger.ets new file mode 100644 index 0000000..e48ab8e --- /dev/null +++ b/harmony/image_sequence/src/main/ets/Logger.ets @@ -0,0 +1,60 @@ +/** + * MIT License + * + * Copyright (C) 2023 Huawei Device Co., Ltd. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import hilog from '@ohos.hilog'; +class Logger +{ + private domain : number; + private prefix : string; + private format : string = '%{public}s, %{public}s'; + private isDebug : boolean; + /** + * constructor. + * @param Prefix Identifies the log tag. + * @param domain Domain Indicates the service domain, which is a hexadecimal integer ranging from 0x0 to 0xFFFFF. + * */ + constructor(prefix + : string = 'MyApp', domain + : number = 0xFF00, isDebug = false) + { + this.prefix = prefix; + this.domain = domain; + this.isDebug = isDebug; + } + debug(... args + : string[]) : void + { + if (this.isDebug) + { + hilog.debug(this.domain, this.prefix, this.format, args); + } + } + info(... args + : string[]) : void { hilog.info(this.domain, this.prefix, this.format, args); } + warn(... args + : string[]) : void { hilog.warn(this.domain, this.prefix, this.format, args); } + error(... args + : string[]) : void { hilog.error(this.domain, this.prefix, this.format, args); } +} +export default new Logger('HarmonyPicker', 0xFF00, true) \ No newline at end of file diff --git a/harmony/image_sequence/src/main/ets/RNImageSequence.ets b/harmony/image_sequence/src/main/ets/RNImageSequence.ets index 5aed4a3..a921d65 100644 --- a/harmony/image_sequence/src/main/ets/RNImageSequence.ets +++ b/harmony/image_sequence/src/main/ets/RNImageSequence.ets @@ -5,6 +5,7 @@ import image from '@ohos.multimedia.image'; import resourceManager from '@ohos.resourceManager'; import { BusinessError } from '@ohos.base'; import { RNC } from '@rnoh/react-native-openharmony/generated' +import Logger from './Logger'; export const IMAGE_SEQUENCE_TYPE: string = "ImageSequenceView" @@ -22,6 +23,7 @@ export interface ImageData { width: number } +const TAG: string = "[RNOH] RNImageSequence" const context: Context = getContext(this); const resourceMgr: resourceManager.ResourceManager = context.resourceManager; @@ -83,7 +85,7 @@ export struct RNImageSequence { const buffer: ArrayBuffer = fileData.buffer.slice(0); this.imageEdit(buffer, index); }).catch((err: BusinessError) => { - console.error(`getRawFileContent failed: ${err.code}`) + Logger.error(TAG, `getRawFileContent failed: ${err.code}`); }) } @@ -153,7 +155,7 @@ export struct RNImageSequence { RNViewBase({ctx: this.ctx, tag: this.tag}) { if (this.finishCount === this.ImageList.length) { Image(this.ImageList[this.num]).objectFit(ImageFit.Fill).draggable(false).width('100%').height('100%').onComplete(()=>{ - console.log(`加载完成:${new Date().getTime()}`) + Logger.debug(TAG, `加载完成:${new Date().getTime()}`); }).key('image_sequence') } } -- Gitee From a2b4eff80d208166d253c4e2ce3f16dd42204cf2 Mon Sep 17 00:00:00 2001 From: wuya_smile Date: Mon, 17 Jun 2024 18:18:54 +0800 Subject: [PATCH 12/16] =?UTF-8?q?refactor:=20=E9=87=8D=E6=96=B0=E6=9E=84?= =?UTF-8?q?=E5=BB=BAhar=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “leehom6666” --- harmony/image_sequence.har | Bin 4016 -> 6062 bytes .../src/main/ets/RNImageSequence.ets | 2 +- package.json | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/harmony/image_sequence.har b/harmony/image_sequence.har index d2268ecdde77b13517102caccade936a905f2641..8157d15454b998007dfc222eb831976ebd304b2b 100644 GIT binary patch literal 6062 zcmV;f7g6XRiwFP!000003hg~zb0f!bdOcR%e;6aO2uR@Kiv(rzcoGg=9wCDO1AuqF zTwT$N-2t%XVi(?B@WUs*r7EdZ9`fL%QqD^rl1iTZluA|XxbkNr$$rXTNcYU_?(702 zK?0|<ICgJP*t-P$A{Y`q(D;%VynnhT^X3n$sRKY}FlRQ@cdi5UN9Q`0hzU1wlgRH44N zN;-fa)oS&|@vjss()e$cVf^6_%F8N=xGDXqjX&^LPV{o(xIQuHK$}`V(JjsMh%5}` zEm?a6Jn~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NImvE8`uT^goG=;ckzTc<8W-Sr4iW~4j@QqA_sd`Y@t>c6{^g&4{r8{$_TPW~ z{nH1UDT56KF0;4=1S6YM@ge8A@fP1_x1#siwsO;oou1=<9I)X27d=o~%O$YK-~ZYv zSJL}miQ%2@e~0Uj-Rswv>kxo@aXj~LH%mF{z+ji_J0im@c8vFnmeigPYi3Z{~u`mYw7wYhIQJ1em?MSuLYWm z-~TUG)c5~OwJQDoXQ^CFzyF^cV(YK?tHZ-4``#B_T=qg4P46E>wy)kPQ(p(qfeBFBu9^%J3}$`2Q+>=j%5QEBpTh2H+j^zf?`X|B)C{{ZC;TtQ`OS%KD#v|1CMB W`kz7yDWs6XJoq2RFA4PkbN~RK(ic, startFrameIndex: number, - framesPerSecond: number, + framesPerSecond: number,e downsampleWidth: number, downsampleHeight: number } diff --git a/package.json b/package.json index 0c42fea..1c08b60 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@react-native-oh-tpl/react-native-image-sequence-2", - "version": "0.9.1-0.0.1", + "version": "0.9.1-0.0.2", "description": "Showcase a Fabric component with a image sequence", "react-native": "index", "source": "index", -- Gitee From 94127d93ec12fc523fb76f5ea213dc87edbc8da4 Mon Sep 17 00:00:00 2001 From: wuya_smile Date: Mon, 17 Jun 2024 18:37:45 +0800 Subject: [PATCH 13/16] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=94=B9=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=AC=A6=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “leehom6666” --- harmony/image_sequence/src/main/ets/RNImageSequence.ets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/harmony/image_sequence/src/main/ets/RNImageSequence.ets b/harmony/image_sequence/src/main/ets/RNImageSequence.ets index e7193e0..a921d65 100644 --- a/harmony/image_sequence/src/main/ets/RNImageSequence.ets +++ b/harmony/image_sequence/src/main/ets/RNImageSequence.ets @@ -13,7 +13,7 @@ export interface ImageSequencerawProps extends ViewRawProps { loop: boolean, images: Array, startFrameIndex: number, - framesPerSecond: number,e + framesPerSecond: number, downsampleWidth: number, downsampleHeight: number } -- Gitee From f8c0a80b99f3dc7d358c63e0b5eddd7a3b7f6890 Mon Sep 17 00:00:00 2001 From: D786565784 Date: Wed, 26 Jun 2024 17:47:56 +0800 Subject: [PATCH 14/16] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8Dios=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=E6=96=87=E4=BB=B6=E5=AF=BC=E8=87=B4=E7=9A=84=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E7=BC=96=E8=AF=91=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “leehom6666” --- react-native-image-sequence-2.podspec | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 react-native-image-sequence-2.podspec diff --git a/react-native-image-sequence-2.podspec b/react-native-image-sequence-2.podspec deleted file mode 100644 index 309181b..0000000 --- a/react-native-image-sequence-2.podspec +++ /dev/null @@ -1,16 +0,0 @@ -require "json" - - package = JSON.parse(File.read(File.join(__dir__, "package.json"))) - - Pod::Spec.new do |s| - s.name = package["name"] - s.version = package["version"] - s.summary = package["description"] - s.author = "Mads Lee Jensen " - s.homepage = package["homepage"] - s.license = package["license"] - s.platform = :ios, "10.0" - s.source = {:git => "https://github.com/bwindsor/react-native-image-sequence.git" } - s.source_files = "ios/RCTImageSequence/*.{h,m}" - s.dependency "React" -end -- Gitee From 96d2b15f2089a60ab88e3e2c2d07738233d0e241 Mon Sep 17 00:00:00 2001 From: D786565784 Date: Wed, 26 Jun 2024 18:26:14 +0800 Subject: [PATCH 15/16] release:@react-native-oh-tpl/react-native-image-sequence-2@0.9.1-0.0.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “leehom6666” --- harmony/image_sequence.har | Bin 6062 -> 4852 bytes harmony/image_sequence/oh-package.json5 | 2 +- package.json | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/harmony/image_sequence.har b/harmony/image_sequence.har index 8157d15454b998007dfc222eb831976ebd304b2b..9e57a737bc56ce39b968a0bf54c0f1760caf105e 100644 GIT binary patch literal 4852 zcmVq3hT;^r1``FL61hJJMZ7JB$>PM0+IYu&ecUjf4j20(XTiM!uMnMwU`IzxKBX~mc2 z5&bXj6+`_mRmw%s|J~jFQmX&!mL>Yn`KuPG|38osbEjlmD|pN-ObyE^fGiZct>zS@ zqeuTdr;bUtUv7P+sifr#l|cWy)N|*|qp8)oJ-9OQ8P)bopM*WB~9d&vhyr!|{mz zgHxK^|MzywssF!rS!MsfeYr(Q#+X_Cn;FeiNe0+4rf2SuX7ap=3r2h9Tdo7my!+ik zOON`{_z|m#=z}HW7*h_DQJWf`gveVA_DPKN0-&WR1a%dWbbLj*;j% zIKXxHi#b|>{+qzm`INGV1DnI~*#2K!@c%*o)BS(#vWor(>p%Hyja|l#|Hfm$N8`V} zl@xDkKD;n@QpihJt-Hj@b{~kJs(@n_CXp2emf=5f7=>( zg)f8y^kIL0exq}qRo zPxo;D-`lOE_J7^7JpSK{^%4I6l=?>GQezANu5_CXDTCUPVS7~Z`%ym7QFuq0C*1TM z(NOF6^;W;xZlPn_KWX*|{8wv{+IheIR&VLuT3>IFyTotrnBCfY7V+ojTm zbgeO3;ephZjghq&7(5J438g-V%aAE*`(>?MR2mueT>CQ}V(UW`s3XRf=d+t29)#64 zY&ATA|D{JR-%MGw{~J#JeD|pTUny3S`QOTZDb4?^T~^8e-b#a$L349yO?e(z9`|JO zk#WiJGhV0}QqN?T%m-yUJh4MW<$w}@Ldn4JER$Hy$YoQWRRL?B!6PN;A09J8l`;1x zE^IIv_-$Jzbv&e_24Xm&ugVe`*r*}UVxg(Meat9Ud7h{GkfFQFXIz*RvxXakc=u}# z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bgQ~LFINs`lF5|mk;Enr<)b>;d4*i1kS+0RhVR+MA;m191nNmVlSjVSQ!X5Bt!pW zo=lI2ImI7QJDbG?e)OVt$O-sXpE74JZmqc9_ossacAHgr#=hVbB3diFSn+TbK3mMi zC5q|4YM6eOR}1td7>b;tYd&fhFN8WHb12`##g-_;3i%+u|sUVZXR&{)u)L_|y z;(!7`ExHuq{_Ha`73{_~-K9J+u;8NTQwub@VRu0*Mv9L5`5xHyh;m{G^$ z5}7?rB;r2BP0?0SHdk!bCSqf>TAY20C+fl}KhIZyfDEoK0WEKLI55x z{+pHb{^!zZ$?^Zi=(OH?U*lg+$A9Ux8hEbXukT=X(tgdlsU2`}?1zt>o{2mn)^M^!I<3PK(_C z Date: Wed, 20 Nov 2024 15:52:21 +0800 Subject: [PATCH 16/16] refactor: Generate scaffolding code using codegen lib script and embed it into third-party libraries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: “leehom6666” --- OAT.xml | 60 ++++++++ harmony/image_sequence.har | Bin 4852 -> 0 bytes harmony/image_sequence/BuildProfile.ets | 6 - harmony/image_sequence/Index.ets | 6 + harmony/image_sequence/build-profile.json5 | 13 -- harmony/image_sequence/consumer-rules.txt | 0 harmony/image_sequence/obfuscation-rules.txt | 18 --- harmony/image_sequence/oh-package-lock.json5 | 18 --- harmony/image_sequence/oh-package.json5 | 11 +- .../src/main/cpp/CMakeLists.txt | 9 ++ .../src/main/cpp/ImageSequence2Package.h | 16 +++ .../BaseReactNativeImageSequence2Package.h | 65 +++++++++ .../components/ImageSequenceViewJSIBinder.h | 32 +++++ .../ComponentDescriptors.h | 22 +++ .../EventEmitters.cpp | 17 +++ .../EventEmitters.h | 25 ++++ .../react_native_image_sequence_2/Props.cpp | 32 +++++ .../react_native_image_sequence_2/Props.h | 35 +++++ .../ShadowNodes.cpp | 19 +++ .../ShadowNodes.h | 34 +++++ .../react_native_image_sequence_2/States.cpp | 17 +++ .../react_native_image_sequence_2/States.h | 36 +++++ .../src/main/ets/ImageSequencePackage.ts | 8 +- .../image_sequence/src/main/ets/Logger.ets | 60 -------- .../src/main/ets/RNImageSequence.ets | 33 ++--- .../generated/components/ImageSequenceView.ts | 134 ++++++++++++++++++ .../src/main/ets/generated/components/ts.ts | 5 + .../src/main/ets/generated/index.ets | 5 + .../src/main/ets/generated/ts.ts | 6 + .../src/main/ets/generated/turboModules/ts.ts | 5 + harmony/image_sequence/ts.ts | 6 + index.js | 12 +- package.json | 19 ++- src/ImageSequenceNativeComponent.ts | 22 +-- 34 files changed, 633 insertions(+), 173 deletions(-) create mode 100644 OAT.xml delete mode 100644 harmony/image_sequence.har delete mode 100644 harmony/image_sequence/BuildProfile.ets delete mode 100644 harmony/image_sequence/consumer-rules.txt delete mode 100644 harmony/image_sequence/obfuscation-rules.txt delete mode 100644 harmony/image_sequence/oh-package-lock.json5 create mode 100644 harmony/image_sequence/src/main/cpp/CMakeLists.txt create mode 100644 harmony/image_sequence/src/main/cpp/ImageSequence2Package.h create mode 100644 harmony/image_sequence/src/main/cpp/generated/RNOH/generated/BaseReactNativeImageSequence2Package.h create mode 100644 harmony/image_sequence/src/main/cpp/generated/RNOH/generated/components/ImageSequenceViewJSIBinder.h create mode 100644 harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/ComponentDescriptors.h create mode 100644 harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/EventEmitters.cpp create mode 100644 harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/EventEmitters.h create mode 100644 harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/Props.cpp create mode 100644 harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/Props.h create mode 100644 harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/ShadowNodes.cpp create mode 100644 harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/ShadowNodes.h create mode 100644 harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/States.cpp create mode 100644 harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/States.h delete mode 100644 harmony/image_sequence/src/main/ets/Logger.ets create mode 100644 harmony/image_sequence/src/main/ets/generated/components/ImageSequenceView.ts create mode 100644 harmony/image_sequence/src/main/ets/generated/components/ts.ts create mode 100644 harmony/image_sequence/src/main/ets/generated/index.ets create mode 100644 harmony/image_sequence/src/main/ets/generated/ts.ts create mode 100644 harmony/image_sequence/src/main/ets/generated/turboModules/ts.ts diff --git a/OAT.xml b/OAT.xml new file mode 100644 index 0000000..3fda8f3 --- /dev/null +++ b/OAT.xml @@ -0,0 +1,60 @@ + + + + LICENSE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/harmony/image_sequence.har b/harmony/image_sequence.har deleted file mode 100644 index 9e57a737bc56ce39b968a0bf54c0f1760caf105e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4852 zcmVq3hT;^r1``FL61hJJMZ7JB$>PM0+IYu&ecUjf4j20(XTiM!uMnMwU`IzxKBX~mc2 z5&bXj6+`_mRmw%s|J~jFQmX&!mL>Yn`KuPG|38osbEjlmD|pN-ObyE^fGiZct>zS@ zqeuTdr;bUtUv7P+sifr#l|cWy)N|*|qp8)oJ-9OQ8P)bopM*WB~9d&vhyr!|{mz zgHxK^|MzywssF!rS!MsfeYr(Q#+X_Cn;FeiNe0+4rf2SuX7ap=3r2h9Tdo7my!+ik zOON`{_z|m#=z}HW7*h_DQJWf`gveVA_DPKN0-&WR1a%dWbbLj*;j% zIKXxHi#b|>{+qzm`INGV1DnI~*#2K!@c%*o)BS(#vWor(>p%Hyja|l#|Hfm$N8`V} zl@xDkKD;n@QpihJt-Hj@b{~kJs(@n_CXp2emf=5f7=>( zg)f8y^kIL0exq}qRo zPxo;D-`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f>@8lX3%C5d$N&X_?w!JjkXP!uA08&>v@8q|yMJQtflq&t(_DVP z;uy>*Z-yTlxO;X^8!}@&#{2zQaRMrAMs^!Q+~02Jq&)~9@pTGRBcCRtnb5BkN0Gv> z{M*0$$N&8GuYdc`fBo-&{psrmJF6*tYwf=kQ`mbHqTz_u=!DYkiwQGsNlh?moDwZqh`mb9yV*fWF0MA(eQu_U$ z^~*-=|5sZ7Qo8 +#include "RNOH/Package.h" +#include "RNOH/ArkTSTurboModule.h" +#include "RNOH/generated/components/ImageSequenceViewJSIBinder.h" + +namespace rnoh { + +class BaseReactNativeImageSequence2PackageTurboModuleFactoryDelegate : public TurboModuleFactoryDelegate { + public: + SharedTurboModule createTurboModule(Context ctx, const std::string &name) const override { + return nullptr; + }; +}; + +class BaseReactNativeImageSequence2PackageEventEmitRequestHandler : public EventEmitRequestHandler { + public: + void handleEvent(Context const &ctx) override { + auto eventEmitter = ctx.shadowViewRegistry->getEventEmitter(ctx.tag); + if (eventEmitter == nullptr) { + return; + } + + std::vector supportedEventNames = { + }; + if (std::find(supportedEventNames.begin(), supportedEventNames.end(), ctx.eventName) != supportedEventNames.end()) { + eventEmitter->dispatchEvent(ctx.eventName, ArkJS(ctx.env).getDynamic(ctx.payload)); + } + } +}; + + +class BaseReactNativeImageSequence2Package : public Package { + public: + BaseReactNativeImageSequence2Package(Package::Context ctx) : Package(ctx){}; + + std::unique_ptr createTurboModuleFactoryDelegate() override { + return std::make_unique(); + } + + std::vector createComponentDescriptorProviders() override { + return { + facebook::react::concreteComponentDescriptorProvider(), + }; + } + + ComponentJSIBinderByString createComponentJSIBinderByName() override { + return { + {"ImageSequenceView", std::make_shared()}, + }; + }; + + EventEmitRequestHandlers createEventEmitRequestHandlers() override { + return { + std::make_shared(), + }; + } +}; + +} // namespace rnoh diff --git a/harmony/image_sequence/src/main/cpp/generated/RNOH/generated/components/ImageSequenceViewJSIBinder.h b/harmony/image_sequence/src/main/cpp/generated/RNOH/generated/components/ImageSequenceViewJSIBinder.h new file mode 100644 index 0000000..c9bd94c --- /dev/null +++ b/harmony/image_sequence/src/main/cpp/generated/RNOH/generated/components/ImageSequenceViewJSIBinder.h @@ -0,0 +1,32 @@ +/** + * This code was generated by "react-native codegen-lib-harmony" + */ + +#pragma once +#include "RNOHCorePackage/ComponentBinders/ViewComponentJSIBinder.h" + +namespace rnoh { +class ImageSequenceViewJSIBinder : public ViewComponentJSIBinder { + protected: + facebook::jsi::Object createNativeProps(facebook::jsi::Runtime &rt) override { + auto object = ViewComponentJSIBinder::createNativeProps(rt); + object.setProperty(rt, "images", true); + object.setProperty(rt, "startFrameIndex", true); + object.setProperty(rt, "framesPerSecond", true); + object.setProperty(rt, "loop", true); + object.setProperty(rt, "downsampleWidth", true); + object.setProperty(rt, "downsampleHeight", true); + return object; + } + + facebook::jsi::Object createBubblingEventTypes(facebook::jsi::Runtime &rt) override { + facebook::jsi::Object events(rt); + return events; + } + + facebook::jsi::Object createDirectEventTypes(facebook::jsi::Runtime &rt) override { + facebook::jsi::Object events(rt); + return events; + } +}; +} // namespace rnoh diff --git a/harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/ComponentDescriptors.h b/harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/ComponentDescriptors.h new file mode 100644 index 0000000..bd3e779 --- /dev/null +++ b/harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/ComponentDescriptors.h @@ -0,0 +1,22 @@ + +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * @generated by codegen project: GenerateComponentDescriptorH.js + */ + +#pragma once + +#include +#include + +namespace facebook { +namespace react { + +using ImageSequenceViewComponentDescriptor = ConcreteComponentDescriptor; + +} // namespace react +} // namespace facebook diff --git a/harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/EventEmitters.cpp b/harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/EventEmitters.cpp new file mode 100644 index 0000000..e4154a9 --- /dev/null +++ b/harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/EventEmitters.cpp @@ -0,0 +1,17 @@ + +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * @generated by codegen project: GenerateEventEmitterCpp.js + */ + +#include + +namespace facebook { +namespace react { + +} // namespace react +} // namespace facebook diff --git a/harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/EventEmitters.h b/harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/EventEmitters.h new file mode 100644 index 0000000..81da52a --- /dev/null +++ b/harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/EventEmitters.h @@ -0,0 +1,25 @@ + +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * @generated by codegen project: GenerateEventEmitterH.js + */ +#pragma once + +#include + + +namespace facebook { +namespace react { +class ImageSequenceViewEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + +}; +} // namespace react +} // namespace facebook diff --git a/harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/Props.cpp b/harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/Props.cpp new file mode 100644 index 0000000..ceceeeb --- /dev/null +++ b/harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/Props.cpp @@ -0,0 +1,32 @@ + +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * @generated by codegen project: GeneratePropsCpp.js + */ + +#include +#include +#include + +namespace facebook { +namespace react { + +ImageSequenceViewProps::ImageSequenceViewProps( + const PropsParserContext &context, + const ImageSequenceViewProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), + + images(convertRawProp(context, rawProps, "images", sourceProps.images, {})), + startFrameIndex(convertRawProp(context, rawProps, "startFrameIndex", sourceProps.startFrameIndex, {0})), + framesPerSecond(convertRawProp(context, rawProps, "framesPerSecond", sourceProps.framesPerSecond, {0})), + loop(convertRawProp(context, rawProps, "loop", sourceProps.loop, {false})), + downsampleWidth(convertRawProp(context, rawProps, "downsampleWidth", sourceProps.downsampleWidth, {0})), + downsampleHeight(convertRawProp(context, rawProps, "downsampleHeight", sourceProps.downsampleHeight, {0})) + {} + +} // namespace react +} // namespace facebook diff --git a/harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/Props.h b/harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/Props.h new file mode 100644 index 0000000..3c5066d --- /dev/null +++ b/harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/Props.h @@ -0,0 +1,35 @@ + +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * @generated by codegen project: GeneratePropsH.js + */ +#pragma once + +#include +#include +#include + +namespace facebook { +namespace react { + +class ImageSequenceViewProps final : public ViewProps { + public: + ImageSequenceViewProps() = default; + ImageSequenceViewProps(const PropsParserContext& context, const ImageSequenceViewProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + std::vector images{}; + int startFrameIndex{0}; + int framesPerSecond{0}; + bool loop{false}; + int downsampleWidth{0}; + int downsampleHeight{0}; +}; + +} // namespace react +} // namespace facebook diff --git a/harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/ShadowNodes.cpp b/harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/ShadowNodes.cpp new file mode 100644 index 0000000..7e4a469 --- /dev/null +++ b/harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/ShadowNodes.cpp @@ -0,0 +1,19 @@ + +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * @generated by codegen project: GenerateShadowNodeCpp.js + */ + +#include + +namespace facebook { +namespace react { + +extern const char ImageSequenceViewComponentName[] = "ImageSequenceView"; + +} // namespace react +} // namespace facebook diff --git a/harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/ShadowNodes.h b/harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/ShadowNodes.h new file mode 100644 index 0000000..841e31f --- /dev/null +++ b/harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/ShadowNodes.h @@ -0,0 +1,34 @@ + +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * @generated by codegen project: GenerateShadowNodeH.js + */ + +#pragma once + +#include +#include +#include +#include +#include + +namespace facebook { +namespace react { + +JSI_EXPORT extern const char ImageSequenceViewComponentName[]; + +/* + * `ShadowNode` for component. + */ +using ImageSequenceViewShadowNode = ConcreteViewShadowNode< + ImageSequenceViewComponentName, + ImageSequenceViewProps, + ImageSequenceViewEventEmitter, + ImageSequenceViewState>; + +} // namespace react +} // namespace facebook diff --git a/harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/States.cpp b/harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/States.cpp new file mode 100644 index 0000000..437b772 --- /dev/null +++ b/harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/States.cpp @@ -0,0 +1,17 @@ + +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * @generated by codegen project: GenerateStateCpp.js + */ +#include +namespace facebook { +namespace react { + + + +} // namespace react +} // namespace facebook diff --git a/harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/States.h b/harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/States.h new file mode 100644 index 0000000..e2b7532 --- /dev/null +++ b/harmony/image_sequence/src/main/cpp/generated/react/renderer/components/react_native_image_sequence_2/States.h @@ -0,0 +1,36 @@ +/** + * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). + * + * Do not edit this file as changes may cause incorrect behavior and will be lost + * once the code is regenerated. + * + * @generated by codegen project: GenerateStateH.js + */ +#pragma once + +#ifdef ANDROID +#include +#include +#include +#endif + +namespace facebook { +namespace react { + +class ImageSequenceViewState { +public: + ImageSequenceViewState() = default; + +#ifdef ANDROID + ImageSequenceViewState(ImageSequenceViewState const &previousState, folly::dynamic data){}; + folly::dynamic getDynamic() const { + return {}; + }; + MapBuffer getMapBuffer() const { + return MapBufferBuilder::EMPTY(); + }; +#endif +}; + +} // namespace react +} // namespace facebook \ No newline at end of file diff --git a/harmony/image_sequence/src/main/ets/ImageSequencePackage.ts b/harmony/image_sequence/src/main/ets/ImageSequencePackage.ts index f50b377..4f2eda0 100644 --- a/harmony/image_sequence/src/main/ets/ImageSequencePackage.ts +++ b/harmony/image_sequence/src/main/ets/ImageSequencePackage.ts @@ -1,6 +1,12 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved + * Use of this source code is governed by a MIT license that can be + * found in the LICENSE file. + */ + import { RNPackage } from '@rnoh/react-native-openharmony/ts'; import type {DescriptorWrapperFactoryByDescriptorTypeCtx, DescriptorWrapperFactoryByDescriptorType} from '@rnoh/react-native-openharmony/ts'; -import { RNC } from '@rnoh/react-native-openharmony/generated/ts' +import { RNC } from './generated/ts'; export class ImageSequencePackage extends RNPackage { createDescriptorWrapperFactoryByDescriptorType(ctx: diff --git a/harmony/image_sequence/src/main/ets/Logger.ets b/harmony/image_sequence/src/main/ets/Logger.ets deleted file mode 100644 index e48ab8e..0000000 --- a/harmony/image_sequence/src/main/ets/Logger.ets +++ /dev/null @@ -1,60 +0,0 @@ -/** - * MIT License - * - * Copyright (C) 2023 Huawei Device Co., Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import hilog from '@ohos.hilog'; -class Logger -{ - private domain : number; - private prefix : string; - private format : string = '%{public}s, %{public}s'; - private isDebug : boolean; - /** - * constructor. - * @param Prefix Identifies the log tag. - * @param domain Domain Indicates the service domain, which is a hexadecimal integer ranging from 0x0 to 0xFFFFF. - * */ - constructor(prefix - : string = 'MyApp', domain - : number = 0xFF00, isDebug = false) - { - this.prefix = prefix; - this.domain = domain; - this.isDebug = isDebug; - } - debug(... args - : string[]) : void - { - if (this.isDebug) - { - hilog.debug(this.domain, this.prefix, this.format, args); - } - } - info(... args - : string[]) : void { hilog.info(this.domain, this.prefix, this.format, args); } - warn(... args - : string[]) : void { hilog.warn(this.domain, this.prefix, this.format, args); } - error(... args - : string[]) : void { hilog.error(this.domain, this.prefix, this.format, args); } -} -export default new Logger('HarmonyPicker', 0xFF00, true) \ No newline at end of file diff --git a/harmony/image_sequence/src/main/ets/RNImageSequence.ets b/harmony/image_sequence/src/main/ets/RNImageSequence.ets index a921d65..8127a47 100644 --- a/harmony/image_sequence/src/main/ets/RNImageSequence.ets +++ b/harmony/image_sequence/src/main/ets/RNImageSequence.ets @@ -1,23 +1,18 @@ -import { Descriptor, ComponentBuilderContext, ViewRawProps, Tag } from '@rnoh/react-native-openharmony'; -import { RNComponentFactory, RNOHContext, RNViewBase } from '@rnoh/react-native-openharmony'; -// import { ImageLoaderTurboModule } from '@rnoh/react-native-openharmony/src/main/ets/RNOHCorePackage/turboModules'; +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved + * Use of this source code is governed by a MIT license that can be + * found in the LICENSE file. + */ + +import { Descriptor, ComponentBuilderContext, } from '@rnoh/react-native-openharmony'; +import { RNOHContext, RNViewBase } from '@rnoh/react-native-openharmony'; import image from '@ohos.multimedia.image'; import resourceManager from '@ohos.resourceManager'; import { BusinessError } from '@ohos.base'; -import { RNC } from '@rnoh/react-native-openharmony/generated' -import Logger from './Logger'; - +import { RNOHLogger} from "@rnoh/react-native-openharmony/ts"; +import { RNC } from './generated'; export const IMAGE_SEQUENCE_TYPE: string = "ImageSequenceView" -export interface ImageSequencerawProps extends ViewRawProps { - loop: boolean, - images: Array, - startFrameIndex: number, - framesPerSecond: number, - downsampleWidth: number, - downsampleHeight: number -} - export interface ImageData { src: string | Resource, width: number @@ -26,9 +21,9 @@ export interface ImageData { const TAG: string = "[RNOH] RNImageSequence" const context: Context = getContext(this); const resourceMgr: resourceManager.ResourceManager = context.resourceManager; - @Component export struct RNImageSequence { + private logger!: RNOHLogger public static readonly NAME: string = RNC.ImageSequenceView.NAME; ctx!: RNOHContext; tag: number = 0; @@ -43,7 +38,9 @@ export struct RNImageSequence { @State finishCount: number = 0; @State localIndex: number[] = []; + aboutToAppear() { + this.logger = this.ctx!.logger.clone("Index") this.onDescriptorWrapperChange(this.ctx.descriptorRegistry.findDescriptorWrapperByTag(this.tag)!) this.cleanUpCallbacks.push(this.ctx.descriptorRegistry.subscribeToDescriptorChanges(this.tag, (descriptor) => { @@ -85,7 +82,7 @@ export struct RNImageSequence { const buffer: ArrayBuffer = fileData.buffer.slice(0); this.imageEdit(buffer, index); }).catch((err: BusinessError) => { - Logger.error(TAG, `getRawFileContent failed: ${err.code}`); + this.logger.error(TAG,`getRawFileContent failed: ${err.code}`) }) } @@ -155,7 +152,7 @@ export struct RNImageSequence { RNViewBase({ctx: this.ctx, tag: this.tag}) { if (this.finishCount === this.ImageList.length) { Image(this.ImageList[this.num]).objectFit(ImageFit.Fill).draggable(false).width('100%').height('100%').onComplete(()=>{ - Logger.debug(TAG, `加载完成:${new Date().getTime()}`); + this.logger.debug(TAG,`加载完成:${new Date().getTime()}`) }).key('image_sequence') } } diff --git a/harmony/image_sequence/src/main/ets/generated/components/ImageSequenceView.ts b/harmony/image_sequence/src/main/ets/generated/components/ImageSequenceView.ts new file mode 100644 index 0000000..6d8cad7 --- /dev/null +++ b/harmony/image_sequence/src/main/ets/generated/components/ImageSequenceView.ts @@ -0,0 +1,134 @@ +/** + * This code was generated by "react-native codegen-lib-harmony" + */ + +import { + Descriptor as ComponentDescriptor, + ViewBaseProps, + ViewRawProps, + ViewDescriptorWrapperBase, + ColorValue, + Color, + RNInstance, + Tag, + RNComponentCommandReceiver, + ViewPropsSelector, +} from '@rnoh/react-native-openharmony/ts'; + + +export namespace ImageSequenceView { + export const NAME = "ImageSequenceView" as const + + export interface DirectRawProps { + images: string[]; + startFrameIndex?: number; + framesPerSecond?: number; + loop?: boolean; + downsampleWidth?: number; + downsampleHeight?: number; + } + + export interface Props extends ViewBaseProps {} + + export interface State {} + + export interface RawProps extends ViewRawProps, DirectRawProps {} + + export class PropsSelector extends ViewPropsSelector { + get images() { + return this.rawProps.images; + } + + get startFrameIndex() { + return this.rawProps.startFrameIndex ?? 0; + } + + get framesPerSecond() { + return this.rawProps.framesPerSecond ?? 0; + } + + get loop() { + return this.rawProps.loop ?? false; + } + + get downsampleWidth() { + return this.rawProps.downsampleWidth ?? 0; + } + + get downsampleHeight() { + return this.rawProps.downsampleHeight ?? 0; + } + + + } + + export type Descriptor = ComponentDescriptor< + typeof NAME, + Props, + State, + RawProps + >; + + export class DescriptorWrapper extends ViewDescriptorWrapperBase< + typeof NAME, + Props, + State, + RawProps, + PropsSelector + > { + protected createPropsSelector() { + return new PropsSelector(this.descriptor.props, this.descriptor.rawProps) + } + } + + export interface EventPayloadByName { + } + + export class EventEmitter { + constructor(private rnInstance: RNInstance, private tag: Tag) {} + + emit(eventName: TEventName, payload: EventPayloadByName[TEventName]) { + this.rnInstance.emitComponentEvent(this.tag, eventName, payload) + } + } + + export interface CommandArgvByName { + } + + export class CommandReceiver { + private listenersByCommandName = new Map void>>() + private cleanUp: (() => void) | undefined = undefined + + constructor(private componentCommandReceiver: RNComponentCommandReceiver, private tag: Tag) { + } + + subscribe(commandName: TCommandName, listener: (argv: CommandArgvByName[TCommandName]) => void) { + if (!this.listenersByCommandName.has(commandName)) { + this.listenersByCommandName.set(commandName, new Set()) + } + this.listenersByCommandName.get(commandName)!.add(listener) + const hasRegisteredCommandReceiver = !!this.cleanUp + if (!hasRegisteredCommandReceiver) { + this.cleanUp = this.componentCommandReceiver.registerCommandCallback(this.tag, (commandName: string, argv: any[]) => { + if (this.listenersByCommandName.has(commandName)) { + const listeners = this.listenersByCommandName.get(commandName)! + listeners.forEach(listener => { + listener(argv) + }) + } + }) + } + + return () => { + this.listenersByCommandName.get(commandName)?.delete(listener) + if (this.listenersByCommandName.get(commandName)?.size ?? 0 === 0) { + this.listenersByCommandName.delete(commandName) + } + if (this.listenersByCommandName.size === 0) { + this.cleanUp?.() + } + } + } + } + +} diff --git a/harmony/image_sequence/src/main/ets/generated/components/ts.ts b/harmony/image_sequence/src/main/ets/generated/components/ts.ts new file mode 100644 index 0000000..3595925 --- /dev/null +++ b/harmony/image_sequence/src/main/ets/generated/components/ts.ts @@ -0,0 +1,5 @@ +/** + * This code was generated by "react-native codegen-lib-harmony" + */ + +export * from "./ImageSequenceView" diff --git a/harmony/image_sequence/src/main/ets/generated/index.ets b/harmony/image_sequence/src/main/ets/generated/index.ets new file mode 100644 index 0000000..041b7ed --- /dev/null +++ b/harmony/image_sequence/src/main/ets/generated/index.ets @@ -0,0 +1,5 @@ +/** + * This code was generated by "react-native codegen-lib-harmony" + */ + +export * from "./ts" diff --git a/harmony/image_sequence/src/main/ets/generated/ts.ts b/harmony/image_sequence/src/main/ets/generated/ts.ts new file mode 100644 index 0000000..4c568a8 --- /dev/null +++ b/harmony/image_sequence/src/main/ets/generated/ts.ts @@ -0,0 +1,6 @@ +/** + * This code was generated by "react-native codegen-lib-harmony" + */ + +export * as RNC from "./components/ts" +export * as TM from "./turboModules/ts" diff --git a/harmony/image_sequence/src/main/ets/generated/turboModules/ts.ts b/harmony/image_sequence/src/main/ets/generated/turboModules/ts.ts new file mode 100644 index 0000000..d1dae56 --- /dev/null +++ b/harmony/image_sequence/src/main/ets/generated/turboModules/ts.ts @@ -0,0 +1,5 @@ + +/** + */ + +export {} diff --git a/harmony/image_sequence/ts.ts b/harmony/image_sequence/ts.ts index 7b6b357..e681383 100644 --- a/harmony/image_sequence/ts.ts +++ b/harmony/image_sequence/ts.ts @@ -1 +1,7 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved + * Use of this source code is governed by a MIT license that can be + * found in the LICENSE file. + */ + export * from './src/main/ets/ImageSequencePackage' \ No newline at end of file diff --git a/index.js b/index.js index 95f3ce0..4833233 100644 --- a/index.js +++ b/index.js @@ -1,8 +1,8 @@ import { forwardRef, memo } from 'react'; import { View, Image } from 'react-native'; -import ImagesequenceView from './src/ImageSequenceNativeComponent' +import ImagesequenceView from './src/ImageSequenceNativeComponent'; -function ImageSequenceBase({ +function imageSequenceBase({ images, startFrameIndex, framesPerSecond, @@ -20,7 +20,7 @@ function ImageSequenceBase({ let resolvedSource = Image.resolveAssetSource(item); images2.push(resolvedSource.uri); } - }) + }); if (startFrameIndex !== 0) { images2 = [...images2.slice(startFrameIndex), ...images2.slice(0, startFrameIndex)]; } @@ -36,16 +36,16 @@ function ImageSequenceBase({ images={images2} /> - ) + ); } -const ImageSequenceMemo = memo(ImageSequenceBase) +const ImageSequenceMemo = memo(imageSequenceBase); const ImageSequenceComponent = forwardRef( (props, ref) => ( ), -) +); ImageSequenceComponent.displayName = 'ImageSequence'; const ImageSequence = ImageSequenceComponent; export default ImageSequence; \ No newline at end of file diff --git a/package.json b/package.json index 0969591..59bf83b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "@react-native-oh-tpl/react-native-image-sequence-2", - "version": "0.9.1-0.0.3", + "name": "@react-native-ohos/react-native-image-sequence-2", + "version": "0.9.2-rc1", "description": "Showcase a Fabric component with a image sequence", "react-native": "index", "source": "index", @@ -19,7 +19,8 @@ ], "scripts": { "bob": "bob build", - "prepare": "npm run bob" + "prepare": "npm run bob", + "codegen-lib": "react-native codegen-lib-harmony --no-safety-check --npm-package-name react-native-image-sequence-2 --cpp-output-path ./harmony/image_sequence/src/main/cpp/generated --ets-output-path ./harmony/image_sequence/src/main/ets/generated --arkts-components-spec-paths ./src/ImageSequenceNativeComponent.ts" }, "keywords": ["react-native", "harmony"], "repository": "https://github.com/bwindsor/react-native-image-sequence", @@ -32,19 +33,17 @@ "devDependencies": { "@types/react": "^18.2.12", "react-native-builder-bob": "^0.20.4", - "typescript": "^5.0.4" + "typescript": "^5.0.4", + "@react-native-community/cli": "11.3.6", + "react-native-harmony-cli": "npm:@react-native-oh/react-native-harmony-cli@^0.0.27" }, "peerDependencies": { "react": "*", "react-native": "*" }, "harmony": { - "alias": "react-native-image-sequence-2", - "codegenConfig": { - "specPaths": [ - "./src" - ] - } + "alias": "react-native-image-sequence-2" + }, "react-native-builder-bob": { "source": "src", diff --git a/src/ImageSequenceNativeComponent.ts b/src/ImageSequenceNativeComponent.ts index f0c0f29..b2eb35c 100644 --- a/src/ImageSequenceNativeComponent.ts +++ b/src/ImageSequenceNativeComponent.ts @@ -1,24 +1,14 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved + * Use of this source code is governed by a MIT license that can be + * found in the LICENSE file. + */ + import type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes'; import { FlexStyle, HostComponent, ShadowStyleIOS, TransformsStyle } from 'react-native'; import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; import type { Int32 } from 'react-native/Libraries/Types/CodegenTypes'; -// export interface ImageStyle extends FlexStyle, TransformsStyle, ShadowStyleIOS { -// backfaceVisibility?: 'visible' | 'hidden'; -// borderBottomLeftRadius?: number; -// borderBottomRightRadius?: number; -// backgroundColor?: string; -// borderColor?: string; -// borderWidth?: number; -// borderRadius?: number; -// borderTopLeftRadius?: number; -// borderTopRightRadius?: number; -// overlayColor?: string; -// opacity?: number; -// width?: number; -// height?: number; -// } - export interface NativeProps extends ViewProps { /** An array of source images. Each element of the array should be the result of a call to require(imagePath). */ images: string[]; -- Gitee