├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── config.yml │ └── feature_request.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .gitmodules ├── CONTRIBUTING.md ├── Hummer.podspec ├── LICENSE ├── README.md ├── android ├── .gitignore ├── README.md ├── ReleaseNotes.md ├── build.gradle ├── config.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── hermes-debugger │ ├── .gitignore │ ├── build.gradle │ ├── consumer-rules.pro │ ├── gradle.properties │ ├── proguard-rules.pro │ ├── src │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── assets │ │ │ ├── HummerDefinition_es5.js │ │ │ ├── babel.js │ │ │ ├── hummer_component.js │ │ │ └── hummer_sdk.js │ │ │ ├── java │ │ │ └── com │ │ │ │ └── didi │ │ │ │ └── hummer │ │ │ │ └── hermes │ │ │ │ ├── debugger │ │ │ │ └── DefaultHermesDebugger.java │ │ │ │ ├── inspector │ │ │ │ ├── Inspector.java │ │ │ │ └── InspectorPackagerConnection.java │ │ │ │ └── queue │ │ │ │ ├── MessageQueueThread.java │ │ │ │ ├── MessageQueueThreadHandler.java │ │ │ │ ├── MessageQueueThreadImpl.java │ │ │ │ ├── MessageQueueThreadPerfStats.java │ │ │ │ ├── MessageQueueThreadSpec.java │ │ │ │ ├── NativeRunnable.java │ │ │ │ ├── QueueThreadExceptionHandler.java │ │ │ │ ├── SimpleSettableFuture.java │ │ │ │ └── UiThreadUtil.java │ │ │ ├── native │ │ │ └── napi │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── fbjni │ │ │ │ └── fbjni │ │ │ │ │ ├── detail │ │ │ │ │ ├── Boxed.h │ │ │ │ │ ├── Common.h │ │ │ │ │ ├── CoreClasses-inl.h │ │ │ │ │ ├── CoreClasses.h │ │ │ │ │ ├── Environment.h │ │ │ │ │ ├── Exceptions.h │ │ │ │ │ ├── FbjniApi.h │ │ │ │ │ ├── Hybrid.h │ │ │ │ │ ├── Meta-forward.h │ │ │ │ │ ├── Meta-inl.h │ │ │ │ │ ├── Meta.h │ │ │ │ │ ├── MetaConvert.h │ │ │ │ │ ├── ReferenceAllocators-inl.h │ │ │ │ │ ├── ReferenceAllocators.h │ │ │ │ │ ├── References-forward.h │ │ │ │ │ ├── References-inl.h │ │ │ │ │ ├── References.h │ │ │ │ │ ├── Registration-inl.h │ │ │ │ │ ├── Registration.h │ │ │ │ │ ├── SimpleFixedString.h │ │ │ │ │ └── TypeTraits.h │ │ │ │ │ └── fbjni.h │ │ │ │ ├── jsinspector │ │ │ │ └── InspectorInterfaces.h │ │ │ │ ├── napi_hermes_cmake │ │ │ │ └── CMakeLists.txt │ │ │ │ └── reactjni │ │ │ │ ├── JInspector.cpp │ │ │ │ ├── JInspector.h │ │ │ │ ├── JMessageQueueThread.cpp │ │ │ │ ├── JMessageQueueThread.h │ │ │ │ ├── JNativeRunnable.h │ │ │ │ ├── OnLoad.cpp │ │ │ │ └── OnLoad.h │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── upload.gradle │ └── upload.sh ├── hummer-annotation │ ├── .gitignore │ ├── build.gradle │ ├── gradle.properties │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── didi │ │ │ └── hummer │ │ │ └── annotation │ │ │ ├── Component.java │ │ │ ├── JsAttribute.java │ │ │ ├── JsMethod.java │ │ │ ├── JsProperty.java │ │ │ ├── Module.java │ │ │ └── Nullable.java │ ├── upload.gradle │ └── upload.sh ├── hummer-compiler │ ├── build.gradle │ ├── gradle.properties │ ├── src │ │ └── main │ │ │ ├── java │ │ │ └── com │ │ │ │ └── didi │ │ │ │ └── hummer │ │ │ │ └── compiler │ │ │ │ ├── ComponentInvokerClassCreator.java │ │ │ │ ├── Constant.java │ │ │ │ ├── HummerExportProcessor.java │ │ │ │ ├── HummerRegisterClassCreator.java │ │ │ │ ├── Logger.java │ │ │ │ ├── ServiceFiles.java │ │ │ │ └── TypeUtil.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ └── javax.annotation.processing.Processor │ ├── upload.gradle │ └── upload.sh ├── hummer-component │ ├── .gitignore │ ├── build.gradle │ ├── gradle.properties │ ├── proguard-rules.pro │ ├── src │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── didi │ │ │ │ └── hummer │ │ │ │ └── component │ │ │ │ ├── anchor │ │ │ │ └── Anchor.java │ │ │ │ ├── button │ │ │ │ ├── Button.java │ │ │ │ └── ButtonStyleHelper.java │ │ │ │ ├── canvas │ │ │ │ ├── CanvasContext.java │ │ │ │ ├── CanvasDrawHelperView.java │ │ │ │ ├── CanvasPath.java │ │ │ │ └── CanvasView.java │ │ │ │ ├── dialog │ │ │ │ └── Dialog.java │ │ │ │ ├── imageview │ │ │ │ ├── Image.java │ │ │ │ ├── ImageRenderUtil.java │ │ │ │ └── RoundedImageView.java │ │ │ │ ├── input │ │ │ │ ├── FocusUtil.java │ │ │ │ ├── HMInputProperty.java │ │ │ │ ├── Input.java │ │ │ │ ├── KeyboardUtil.java │ │ │ │ ├── NJInputType.java │ │ │ │ ├── NJReturnKeyType.java │ │ │ │ ├── NJTextAlign.java │ │ │ │ └── TextArea.java │ │ │ │ ├── list │ │ │ │ ├── HMListAdapter.java │ │ │ │ ├── List.java │ │ │ │ ├── ListUtil.java │ │ │ │ ├── TopLinearSmoothScroller.java │ │ │ │ └── decoration │ │ │ │ │ ├── GridSpacingItemDecoration.java │ │ │ │ │ ├── LinearSpacingItemDecoration.java │ │ │ │ │ └── StaggeredGridSpacingItemDecoration.java │ │ │ │ ├── loading │ │ │ │ └── Loading.java │ │ │ │ ├── lottie │ │ │ │ └── LottieView.java │ │ │ │ ├── refresh │ │ │ │ ├── HummerFooter.java │ │ │ │ ├── HummerHeader.java │ │ │ │ ├── LoadMoreState.java │ │ │ │ └── PullRefreshState.java │ │ │ │ ├── scroller │ │ │ │ ├── HScrollView.java │ │ │ │ ├── HorizontalScroller.java │ │ │ │ ├── OnScrollListener.java │ │ │ │ ├── OnScrollToBottomListener.java │ │ │ │ ├── OnScrollToTopListener.java │ │ │ │ ├── ScrollViewStateObserver.java │ │ │ │ ├── Scroller.java │ │ │ │ └── VScrollView.java │ │ │ │ ├── switchview │ │ │ │ └── Switch.java │ │ │ │ ├── text │ │ │ │ ├── FontManager.java │ │ │ │ ├── ImageSpanEx.java │ │ │ │ ├── OnRichTextGenerateListener.java │ │ │ │ ├── RichTextHelper.java │ │ │ │ ├── Text.java │ │ │ │ ├── TypefaceSpanEx.java │ │ │ │ └── URLSpanEx.java │ │ │ │ ├── toast │ │ │ │ └── Toast.java │ │ │ │ ├── view │ │ │ │ └── View.java │ │ │ │ └── viewpager │ │ │ │ ├── CyclePagerAdapter.java │ │ │ │ ├── ReusePagerAdapter.java │ │ │ │ ├── ScaleAndAlphaTransformer.java │ │ │ │ └── ViewPager.java │ │ │ └── res │ │ │ ├── drawable │ │ │ ├── bg_loading_dialog.xml │ │ │ ├── ic_loading.png │ │ │ └── loading_anim.xml │ │ │ ├── layout │ │ │ ├── horizontal_scroll_view.xml │ │ │ ├── loading_dialog.xml │ │ │ ├── recycler_view.xml │ │ │ ├── scroll_view.xml │ │ │ └── viewpager_empty_view.xml │ │ │ └── values │ │ │ ├── ids.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ └── upload.sh ├── hummer-core │ ├── .gitignore │ ├── build.gradle │ ├── build_hermes.gradle │ ├── build_jsc.gradle │ ├── build_napi.gradle │ ├── build_quickjs.gradle │ ├── fetch_jsc_libs.gradle │ ├── fetch_napi_hermes_libs.gradle │ ├── fetch_napi_qjs_libs.gradle │ ├── gradle.properties │ ├── proguard-rules.pro │ ├── src │ │ ├── androidTest │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── didi │ │ │ │ └── hummer │ │ │ │ └── core │ │ │ │ └── engine │ │ │ │ ├── jsc │ │ │ │ └── JSEngineTest.java │ │ │ │ └── napi │ │ │ │ └── JSEngineTest.java │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── didi │ │ │ │ └── hummer │ │ │ │ ├── core │ │ │ │ ├── debug │ │ │ │ │ ├── DebugConfig.java │ │ │ │ │ └── Debuggable.java │ │ │ │ ├── engine │ │ │ │ │ ├── JSCallback.java │ │ │ │ │ ├── JSContext.java │ │ │ │ │ ├── JSValue.java │ │ │ │ │ ├── base │ │ │ │ │ │ ├── ICallback.java │ │ │ │ │ │ ├── IObjectOperator.java │ │ │ │ │ │ ├── IRecycler.java │ │ │ │ │ │ ├── IValueOperator.java │ │ │ │ │ │ ├── JSIdentify.java │ │ │ │ │ │ └── JSReleasable.java │ │ │ │ │ ├── jsc │ │ │ │ │ │ ├── JSCCallback.java │ │ │ │ │ │ ├── JSCContext.java │ │ │ │ │ │ ├── JSCUtils.java │ │ │ │ │ │ ├── JSCValue.java │ │ │ │ │ │ ├── base │ │ │ │ │ │ │ ├── CallbackImpl.java │ │ │ │ │ │ │ ├── ObjectOperator.java │ │ │ │ │ │ │ └── ValueOperator.java │ │ │ │ │ │ └── jni │ │ │ │ │ │ │ ├── HummerBridge.java │ │ │ │ │ │ │ ├── HummerException.java │ │ │ │ │ │ │ ├── HummerRecycler.java │ │ │ │ │ │ │ ├── JavaScriptRuntime.java │ │ │ │ │ │ │ └── TypeConvertor.java │ │ │ │ │ └── napi │ │ │ │ │ │ ├── NAPICallback.java │ │ │ │ │ │ ├── NAPIContext.java │ │ │ │ │ │ ├── NAPIValue.java │ │ │ │ │ │ └── jni │ │ │ │ │ │ ├── JSEngine.java │ │ │ │ │ │ └── JSException.java │ │ │ │ ├── exception │ │ │ │ │ ├── ExceptionCallback.java │ │ │ │ │ ├── JSException.java │ │ │ │ │ └── JSThreadCallException.java │ │ │ │ └── util │ │ │ │ │ ├── BytecodeCacheUtil.java │ │ │ │ │ ├── CustomizedObjectTypeAdapter.java │ │ │ │ │ ├── DebugUtil.java │ │ │ │ │ ├── ExceptionUtil.java │ │ │ │ │ ├── GsonTypeAdapterFactory.java │ │ │ │ │ ├── HMGsonUtil.java │ │ │ │ │ ├── HMJsonUtil.java │ │ │ │ │ └── HMLog.java │ │ │ │ └── utils │ │ │ │ └── UIThreadUtil.java │ │ │ └── jni │ │ │ ├── CMakeLists.txt │ │ │ ├── hermes │ │ │ ├── CMakeLists.txt │ │ │ ├── hermes │ │ │ │ └── include │ │ │ │ │ ├── hermes │ │ │ │ │ ├── Public │ │ │ │ │ │ ├── CrashManager.h │ │ │ │ │ │ ├── CtorConfig.h │ │ │ │ │ │ ├── GCConfig.h │ │ │ │ │ │ ├── GCTripwireContext.h │ │ │ │ │ │ └── RuntimeConfig.h │ │ │ │ │ └── hermes.h │ │ │ │ │ └── jsi │ │ │ │ │ ├── instrumentation.h │ │ │ │ │ ├── jsi-inl.h │ │ │ │ │ └── jsi.h │ │ │ └── hummer │ │ │ │ ├── HermesCache.cpp │ │ │ │ ├── HermesCache.h │ │ │ │ ├── HummerBridge.cpp │ │ │ │ ├── HummerJNI.cpp │ │ │ │ ├── HummerJNI.h │ │ │ │ ├── HummerRecycler.cpp │ │ │ │ ├── HummerRecycler.h │ │ │ │ ├── JSException.cpp │ │ │ │ ├── JSException.h │ │ │ │ ├── JavaScriptRuntime.cpp │ │ │ │ ├── TypeConvertor.cpp │ │ │ │ └── TypeConvertor.h │ │ │ ├── jsc │ │ │ ├── CMakeLists.txt │ │ │ ├── JavaScriptCore │ │ │ │ └── include │ │ │ │ │ ├── JSBase.h │ │ │ │ │ ├── JSContextRef.h │ │ │ │ │ ├── JSObjectRef.h │ │ │ │ │ ├── JSStringRef.h │ │ │ │ │ ├── JSValueRef.h │ │ │ │ │ ├── JavaScript.h │ │ │ │ │ └── WebKitAvailability.h │ │ │ └── hummer │ │ │ │ ├── HummerBridge.cpp │ │ │ │ ├── HummerJNI.cpp │ │ │ │ ├── HummerJNI.h │ │ │ │ ├── HummerRecycler.cpp │ │ │ │ ├── HummerRecycler.h │ │ │ │ ├── JSCCache.cpp │ │ │ │ ├── JSCCache.h │ │ │ │ ├── JSException.cpp │ │ │ │ ├── JSException.h │ │ │ │ ├── JavaScriptRuntime.cpp │ │ │ │ ├── TypeConvertor.cpp │ │ │ │ └── TypeConvertor.h │ │ │ ├── napi │ │ │ ├── CMakeLists.txt │ │ │ └── hummer │ │ │ │ ├── HummerJNI.cpp │ │ │ │ ├── HummerJNI.h │ │ │ │ ├── JSEngine.cpp │ │ │ │ ├── JSException.cpp │ │ │ │ ├── JSException.h │ │ │ │ ├── JSRecycler.cpp │ │ │ │ ├── JSRecycler.h │ │ │ │ ├── JSUtils.cpp │ │ │ │ └── JSUtils.h │ │ │ └── qjs │ │ │ ├── CMakeLists.txt │ │ │ ├── hummer │ │ │ ├── HummerBridge.cpp │ │ │ ├── HummerClassRegister.cpp │ │ │ ├── HummerClassRegister.h │ │ │ ├── HummerJNI.cpp │ │ │ ├── HummerJNI.h │ │ │ ├── HummerRecycler.cpp │ │ │ ├── HummerRecycler.h │ │ │ ├── JSException.cpp │ │ │ ├── JSException.h │ │ │ ├── JavaScriptRuntime.cpp │ │ │ ├── PromiseProcessor.cpp │ │ │ ├── PromiseProcessor.h │ │ │ ├── QuickJSCache.cpp │ │ │ ├── QuickJSCache.h │ │ │ ├── TypeConverter.cpp │ │ │ └── TypeConvertor.h │ │ │ └── quickjs │ │ │ └── include │ │ │ ├── cutils.h │ │ │ ├── libregexp-opcode.h │ │ │ ├── libregexp.h │ │ │ ├── libunicode-table.h │ │ │ ├── libunicode.h │ │ │ ├── list.h │ │ │ ├── quickjs-atom.h │ │ │ ├── quickjs-opcode.h │ │ │ └── quickjs.h │ └── upload.sh ├── hummer-demo-app │ ├── .gitignore │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── assets │ │ ├── HelloWorld.js │ │ └── fonts │ │ │ ├── Barlow_Medium.ttf │ │ │ ├── SourceSansPro-Bold.ttf │ │ │ ├── SourceSansPro-BoldItalic.ttf │ │ │ ├── SourceSansPro-Italic.ttf │ │ │ └── SourceSansPro-Regular.ttf │ │ ├── java │ │ └── com │ │ │ └── didi │ │ │ └── hummer │ │ │ └── demo │ │ │ ├── App.java │ │ │ ├── Constant.java │ │ │ ├── HummerDelegateImpl.java │ │ │ ├── HummerDelegatePageActivity.java │ │ │ ├── HummerDelegatePageFragment.java │ │ │ ├── HummerEmbeddedPageActivity.java │ │ │ ├── HummerSinglePageActivity.java │ │ │ ├── HummerSinglePageFragment.java │ │ │ ├── HummerSinglePageFragmentActivity.java │ │ │ ├── MainActivity.java │ │ │ ├── TestExportModel.java │ │ │ ├── TestExportStaticModel.java │ │ │ ├── TestFontAdapter.java │ │ │ └── TestView.java │ │ └── res │ │ ├── drawable-xxhdpi │ │ ├── loading.gif │ │ └── njimage_demo.png │ │ ├── layout │ │ ├── activity_hummer_embedded_page.xml │ │ ├── activity_hummer_single_page_fragment.xml │ │ └── activity_main.xml │ │ ├── menu │ │ └── setting_menu.xml │ │ ├── mipmap-hdpi │ │ └── ic_hummer.png │ │ ├── mipmap-mdpi │ │ └── ic_hummer.png │ │ ├── mipmap-xhdpi │ │ └── ic_hummer.png │ │ ├── mipmap-xxhdpi │ │ └── ic_hummer.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_hummer.png │ │ ├── values-en │ │ └── strings.xml │ │ ├── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ └── xml │ │ └── network_security_config.xml ├── hummer-dev-tools │ ├── .gitignore │ ├── build.gradle │ ├── gradle.properties │ ├── proguard-rules.pro │ ├── src │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── didi │ │ │ │ └── hummer │ │ │ │ ├── debug │ │ │ │ ├── HummerInvokerAnalyzer.java │ │ │ │ ├── InvokeTracker.java │ │ │ │ └── PerformanceTracker.java │ │ │ │ └── devtools │ │ │ │ ├── DefaultHummerDevTools.java │ │ │ │ ├── HummerDevToolsBindProvider.java │ │ │ │ ├── NopContentProvider.java │ │ │ │ ├── bean │ │ │ │ ├── LogBean.java │ │ │ │ ├── NetBean.java │ │ │ │ └── WSMsg.java │ │ │ │ ├── invoker │ │ │ │ ├── HummerInvokerWrapper.java │ │ │ │ └── RequestInvokerWrapper.java │ │ │ │ ├── manager │ │ │ │ ├── HummerLogManager.java │ │ │ │ └── HummerNetManager.java │ │ │ │ ├── qrcode │ │ │ │ ├── CacheUtils.java │ │ │ │ ├── CachesKey.java │ │ │ │ ├── QrcodeHistoriesManager.java │ │ │ │ └── QrcodeMainActivity.java │ │ │ │ ├── utils │ │ │ │ ├── CallStackFormat.java │ │ │ │ ├── ComponentTreeFormat.java │ │ │ │ ├── JSONFormat.java │ │ │ │ └── PerformanceListFormat.java │ │ │ │ ├── widget │ │ │ │ ├── ConsoleView.java │ │ │ │ ├── DevToolsEntrance.java │ │ │ │ └── FloatLayout.java │ │ │ │ ├── ws │ │ │ │ └── WebSocketManager.java │ │ │ │ └── zxing │ │ │ │ ├── activity │ │ │ │ └── CaptureActivity.java │ │ │ │ ├── camera │ │ │ │ ├── AutoFocusCallback.java │ │ │ │ ├── CameraConfigurationManager.java │ │ │ │ ├── CameraManager.java │ │ │ │ ├── FlashlightManager.java │ │ │ │ ├── PlanarYUVLuminanceSource.java │ │ │ │ └── PreviewCallback.java │ │ │ │ ├── decoding │ │ │ │ ├── CaptureActivityHandler.java │ │ │ │ ├── DecodeFormatManager.java │ │ │ │ ├── DecodeHandler.java │ │ │ │ ├── DecodeThread.java │ │ │ │ ├── FinishListener.java │ │ │ │ ├── InactivityTimer.java │ │ │ │ └── Intents.java │ │ │ │ └── view │ │ │ │ ├── QrcodeViewfinderView.java │ │ │ │ └── ViewfinderResultPointCallback.java │ │ │ └── res │ │ │ ├── color │ │ │ └── hummer_debug_tab_selector.xml │ │ │ ├── drawable-xxhdpi │ │ │ ├── icon_close_big.png │ │ │ └── icon_web_qrcode.png │ │ │ ├── drawable-xxxhdpi │ │ │ └── hummer_logo.png │ │ │ ├── drawable │ │ │ ├── btn_clear_console_log_bg.xml │ │ │ ├── btn_dev_tools_entrance_bg.xml │ │ │ ├── btn_dev_tools_js_engine_bg.xml │ │ │ ├── btn_refresh_bg.xml │ │ │ └── dk_divider.xml │ │ │ ├── layout │ │ │ ├── activity_qrcode_main.xml │ │ │ ├── activity_zxing_capture.xml │ │ │ ├── item_qrcode_history.xml │ │ │ ├── layout_console_container.xml │ │ │ ├── layout_console_item.xml │ │ │ ├── layout_devtools_btn.xml │ │ │ └── layout_refresh_btn.xml │ │ │ ├── values-en │ │ │ └── strings.xml │ │ │ └── values │ │ │ ├── attrs.xml │ │ │ ├── colors.xml │ │ │ └── strings.xml │ └── upload.sh ├── hummer-sdk │ ├── .gitignore │ ├── build.gradle │ ├── gradle.properties │ ├── proguard-rules.pro │ ├── src │ │ ├── androidTest │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── didi │ │ │ │ └── hummer │ │ │ │ └── context │ │ │ │ ├── jsc │ │ │ │ └── HummerContextTest.java │ │ │ │ └── napi │ │ │ │ └── HummerContextTest.java │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── assets │ │ │ └── res_guard_whitelist.txt │ │ │ ├── java │ │ │ └── com │ │ │ │ └── didi │ │ │ │ └── hummer │ │ │ │ ├── HummerConfig.java │ │ │ │ ├── HummerSDK.java │ │ │ │ ├── adapter │ │ │ │ ├── HummerAdapter.java │ │ │ │ ├── font │ │ │ │ │ ├── IFontAdapter.java │ │ │ │ │ └── impl │ │ │ │ │ │ └── DefaultFontAdapter.java │ │ │ │ ├── http │ │ │ │ │ ├── HttpCallback.java │ │ │ │ │ ├── HttpResponse.java │ │ │ │ │ ├── IHttpAdapter.java │ │ │ │ │ └── impl │ │ │ │ │ │ ├── DefaultHttpAdapter.java │ │ │ │ │ │ └── FakeX509TrustManager.java │ │ │ │ ├── imageloader │ │ │ │ │ ├── DrawableCallback.java │ │ │ │ │ ├── IImageLoaderAdapter.java │ │ │ │ │ ├── ImageSizeCallback.java │ │ │ │ │ └── impl │ │ │ │ │ │ └── DefaultImageLoaderAdapter.java │ │ │ │ ├── navigator │ │ │ │ │ ├── INavigatorAdapter.java │ │ │ │ │ ├── NavCallback.java │ │ │ │ │ ├── NavPage.java │ │ │ │ │ └── impl │ │ │ │ │ │ ├── ActivityStackManager.java │ │ │ │ │ │ ├── DefaultIntentCreator.java │ │ │ │ │ │ ├── DefaultNavigatorAdapter.java │ │ │ │ │ │ ├── IntentCreator.java │ │ │ │ │ │ └── router │ │ │ │ │ │ ├── ActivityLauncher.java │ │ │ │ │ │ ├── RouterFragment.java │ │ │ │ │ │ └── RouterFragmentV4.java │ │ │ │ ├── scriptloader │ │ │ │ │ ├── IScriptLoaderAdapter.java │ │ │ │ │ ├── ScriptLoadCallback.java │ │ │ │ │ └── impl │ │ │ │ │ │ └── DefaultScriptLoaderAdapter.java │ │ │ │ ├── storage │ │ │ │ │ ├── IStorageAdapter.java │ │ │ │ │ └── impl │ │ │ │ │ │ └── DefaultStorageAdapter.java │ │ │ │ └── tracker │ │ │ │ │ ├── BundleInfo.java │ │ │ │ │ ├── ITrackerAdapter.java │ │ │ │ │ ├── PerfCustomInfo.java │ │ │ │ │ ├── PerfInfo.java │ │ │ │ │ ├── SDKCustomInfo.java │ │ │ │ │ ├── SDKInfo.java │ │ │ │ │ └── impl │ │ │ │ │ └── EmptyTrackerAdapter.java │ │ │ │ ├── context │ │ │ │ ├── AutoBindHummerRegister.java │ │ │ │ ├── HummerContext.java │ │ │ │ ├── HummerContextFactory.java │ │ │ │ ├── HummerDefinition.java │ │ │ │ ├── HummerError.java │ │ │ │ ├── HummerInvoker.java │ │ │ │ ├── HummerModuleRegister.java │ │ │ │ ├── HummerRegister.java │ │ │ │ ├── jsc │ │ │ │ │ └── JSCHummerContext.java │ │ │ │ └── napi │ │ │ │ │ └── NAPIHummerContext.java │ │ │ │ ├── debug │ │ │ │ ├── Highlight.java │ │ │ │ ├── HummerInvokerAnalyzerFactory.java │ │ │ │ ├── InvokerAnalyzer.java │ │ │ │ ├── InvokerAnalyzerFactory.java │ │ │ │ └── plugin │ │ │ │ │ ├── IHermesDebugger.java │ │ │ │ │ └── IV8Debugger.java │ │ │ │ ├── lifecycle │ │ │ │ ├── IFullLifeCycle.java │ │ │ │ └── ILifeCycle.java │ │ │ │ ├── meta │ │ │ │ ├── ComponentInvokerIndex.java │ │ │ │ └── ComponentJsCodeInfo.java │ │ │ │ ├── module │ │ │ │ ├── Memory.java │ │ │ │ ├── Navigator.java │ │ │ │ ├── Request.java │ │ │ │ ├── Storage.java │ │ │ │ ├── Timer.java │ │ │ │ ├── Tracker.java │ │ │ │ ├── WebSocket.java │ │ │ │ └── notifycenter │ │ │ │ │ ├── NotifyCallback.java │ │ │ │ │ ├── NotifyCenter.java │ │ │ │ │ └── NotifyCenterInvoker.java │ │ │ │ ├── pool │ │ │ │ ├── ComponentPool.java │ │ │ │ └── ObjectPool.java │ │ │ │ ├── render │ │ │ │ ├── component │ │ │ │ │ ├── anim │ │ │ │ │ │ ├── AnimViewWrapper.java │ │ │ │ │ │ ├── BasicAnimation.java │ │ │ │ │ │ ├── HummerAnimationUtils.java │ │ │ │ │ │ ├── KeyframeAnimation.java │ │ │ │ │ │ └── Transition.java │ │ │ │ │ └── view │ │ │ │ │ │ ├── BackgroundDrawable.java │ │ │ │ │ │ ├── BackgroundHelper.java │ │ │ │ │ │ ├── BaseInvoker.java │ │ │ │ │ │ ├── FixedNoneBox.java │ │ │ │ │ │ ├── HMBase.java │ │ │ │ │ │ ├── HMGestureEventDetector.java │ │ │ │ │ │ ├── HummerLayoutExtendView.java │ │ │ │ │ │ ├── InlineBox.java │ │ │ │ │ │ └── Invoker.java │ │ │ │ ├── event │ │ │ │ │ ├── EventManager.java │ │ │ │ │ ├── IEventListener.java │ │ │ │ │ ├── base │ │ │ │ │ │ ├── Event.java │ │ │ │ │ │ └── TraceEvent.java │ │ │ │ │ ├── guesture │ │ │ │ │ │ ├── LongPressEvent.java │ │ │ │ │ │ ├── PanEvent.java │ │ │ │ │ │ ├── PinchEvent.java │ │ │ │ │ │ ├── SwipeEvent.java │ │ │ │ │ │ ├── TapEvent.java │ │ │ │ │ │ ├── TouchEvent.java │ │ │ │ │ │ └── common │ │ │ │ │ │ │ └── GestureUtils.java │ │ │ │ │ └── view │ │ │ │ │ │ ├── InputEvent.java │ │ │ │ │ │ ├── ScrollEvent.java │ │ │ │ │ │ └── SwitchEvent.java │ │ │ │ ├── style │ │ │ │ │ ├── HummerLayout.java │ │ │ │ │ ├── HummerLayoutExtendUtils.java │ │ │ │ │ ├── HummerNode.java │ │ │ │ │ └── HummerStyleUtils.java │ │ │ │ └── utility │ │ │ │ │ ├── DPUtil.java │ │ │ │ │ ├── RTLUtil.java │ │ │ │ │ ├── RemUtil.java │ │ │ │ │ ├── YogaAttrUtils.java │ │ │ │ │ ├── YogaColorUtils.java │ │ │ │ │ ├── YogaDrawableUtil.java │ │ │ │ │ ├── YogaNodeUtil.java │ │ │ │ │ └── YogaResUtils.java │ │ │ │ ├── thread │ │ │ │ └── JSThread.java │ │ │ │ ├── tools │ │ │ │ ├── EventTracer.java │ │ │ │ └── JSLogger.java │ │ │ │ └── utils │ │ │ │ ├── AppUtils.java │ │ │ │ ├── AssetsUtil.java │ │ │ │ ├── BarUtils.java │ │ │ │ ├── EnvUtil.java │ │ │ │ ├── FileUtil.java │ │ │ │ ├── JsSourceUtil.java │ │ │ │ ├── NavUtil.java │ │ │ │ ├── NetworkUtil.java │ │ │ │ ├── ScreenUtils.java │ │ │ │ └── blankj │ │ │ │ ├── IntentUtils.java │ │ │ │ ├── Utils.java │ │ │ │ └── UtilsTransActivity.java │ │ │ └── res │ │ │ ├── values-en │ │ │ └── strings.xml │ │ │ ├── values-v21 │ │ │ └── values-v21.xml │ │ │ └── values │ │ │ ├── strings.xml │ │ │ └── values.xml │ └── upload.sh ├── hummer │ ├── .gitignore │ ├── build.gradle │ ├── consumer-rules.pro │ ├── gradle.properties │ ├── proguard-rules.pro │ ├── src │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── didi │ │ │ │ └── hummer │ │ │ │ ├── Hummer.java │ │ │ │ ├── HummerActivity.java │ │ │ │ ├── HummerDebugger.java │ │ │ │ ├── HummerFragment.java │ │ │ │ ├── HummerPageTracker.java │ │ │ │ ├── HummerRender.java │ │ │ │ ├── delegate │ │ │ │ ├── AbsHummerDelegate.java │ │ │ │ ├── HummerDelegateActivity.java │ │ │ │ ├── HummerDelegateAdapter.java │ │ │ │ ├── HummerDelegateFragment.java │ │ │ │ └── IHummerDelegagte.java │ │ │ │ └── devtools │ │ │ │ ├── DevToolsConfig.java │ │ │ │ ├── DevToolsFactory.java │ │ │ │ ├── HummerDevTools.java │ │ │ │ └── HummerDevToolsFactory.java │ │ │ └── res │ │ │ ├── layout │ │ │ └── activity_hummer.xml │ │ │ └── values │ │ │ ├── colors.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ └── upload.sh ├── module.gradle ├── openTerminal.sh ├── settings.gradle ├── startServer.sh ├── upload.gradle ├── upload.sh ├── upload_jcenter.gradle ├── upload_maven.gradle ├── upload_maven.sh ├── upload_maven_central_aar.gradle └── upload_maven_central_jar.gradle ├── docs ├── CHANGELOG.md ├── FAQ.md ├── android_doc.md ├── cli_doc.md ├── ios_doc.md └── yoga.md ├── examples ├── hummer │ ├── playground │ │ ├── .gitignore │ │ ├── .vscode │ │ │ └── launch.json │ │ ├── README.md │ │ ├── hm.config.js │ │ ├── package.json │ │ └── src │ │ │ ├── best-practices │ │ │ ├── animation │ │ │ │ ├── animation_loading │ │ │ │ │ └── index.ts │ │ │ │ ├── animation_ripple │ │ │ │ │ └── index.ts │ │ │ │ └── index.ts │ │ │ ├── bottombar │ │ │ │ └── index.ts │ │ │ ├── marquee │ │ │ │ └── index.ts │ │ │ ├── price_flag │ │ │ │ └── index.ts │ │ │ ├── title_and_bottom_bar │ │ │ │ ├── index.ts │ │ │ │ ├── middle_scroller │ │ │ │ │ └── index.ts │ │ │ │ └── middle_view │ │ │ │ │ └── index.ts │ │ │ ├── titlebar │ │ │ │ └── index.ts │ │ │ └── verification_code │ │ │ │ └── index.ts │ │ │ ├── common │ │ │ ├── CommonColor.ts │ │ │ ├── CommonComponent.ts │ │ │ ├── CommonLayout.ts │ │ │ ├── CommonPage.ts │ │ │ ├── CommonResource.ts │ │ │ ├── CommonStyle.ts │ │ │ └── CommonUtils.ts │ │ │ ├── components │ │ │ ├── button │ │ │ │ └── index.ts │ │ │ ├── canvas │ │ │ │ └── index.ts │ │ │ ├── hscroller │ │ │ │ └── index.ts │ │ │ ├── image │ │ │ │ └── index.ts │ │ │ ├── input │ │ │ │ ├── InputPage.ts │ │ │ │ └── index.ts │ │ │ ├── list │ │ │ │ └── index.ts │ │ │ ├── scroller │ │ │ │ └── index.ts │ │ │ ├── switch │ │ │ │ └── index.ts │ │ │ ├── text │ │ │ │ └── index.ts │ │ │ ├── textarea │ │ │ │ └── index.ts │ │ │ ├── view │ │ │ │ └── index.ts │ │ │ └── view_pager │ │ │ │ └── index.ts │ │ │ ├── games │ │ │ ├── game_2048 │ │ │ │ └── index.ts │ │ │ ├── game_all │ │ │ │ └── index.ts │ │ │ ├── game_snake │ │ │ │ ├── GamePanel.ts │ │ │ │ └── index.ts │ │ │ └── game_tetris │ │ │ │ └── index.ts │ │ │ ├── global.d.ts │ │ │ ├── index │ │ │ └── index.ts │ │ │ ├── normal_styles │ │ │ ├── normal_layout_style │ │ │ │ └── index.ts │ │ │ └── normal_view_style │ │ │ │ └── index.ts │ │ │ └── res │ │ │ ├── hummer_logo.png │ │ │ ├── list_right_arrow.png │ │ │ ├── menu_icon.png │ │ │ └── navigator_back.png │ └── unit-test │ │ ├── .gitignore │ │ ├── .vscode │ │ └── launch.json │ │ ├── README.md │ │ ├── hm.config.js │ │ ├── package.json │ │ └── src │ │ ├── Comp_Animation.js │ │ ├── Comp_Button.js │ │ ├── Comp_Canvas.js │ │ ├── Comp_Dialog.js │ │ ├── Comp_HorizontalScroller.js │ │ ├── Comp_Image.js │ │ ├── Comp_Image_base64.js │ │ ├── Comp_Input.js │ │ ├── Comp_Input_Type.js │ │ ├── Comp_Layout.js │ │ ├── Comp_List.js │ │ ├── Comp_Loading.js │ │ ├── Comp_Navigator_New_Page1.js │ │ ├── Comp_Navigator_New_Page2.js │ │ ├── Comp_Navigator_New_Page3.js │ │ ├── Comp_Navigator_New_Page4.js │ │ ├── Comp_Navigator_New_Test.js │ │ ├── Comp_Navigator_New_Test2.js │ │ ├── Comp_Navigator_Page1.js │ │ ├── Comp_Navigator_Page2.js │ │ ├── Comp_Navigator_Page3.js │ │ ├── Comp_RichText.js │ │ ├── Comp_Scroller.js │ │ ├── Comp_Switch.js │ │ ├── Comp_Text.js │ │ ├── Comp_Toast.js │ │ ├── Comp_Transform.js │ │ ├── Comp_View.js │ │ ├── Comp_ViewPager.js │ │ ├── Comp_View_Child.js │ │ ├── Comp_View_Deg.js │ │ ├── Comp_View_Layout.js │ │ ├── Comp_View_Touch.js │ │ ├── HelloWorld.js │ │ ├── Module_Lifecycle.js │ │ ├── Module_Memory.js │ │ ├── Module_NotifyCenter.js │ │ ├── Module_Request.js │ │ ├── Module_Storage.js │ │ ├── Module_Timer.js │ │ ├── Module_WebSocket.js │ │ ├── Performance_1000_Views_add.js │ │ ├── TestStack.js │ │ ├── Test_Callback.js │ │ ├── Test_Env.js │ │ ├── Test_TestExportModel.js │ │ ├── Unit_Test_PageA.js │ │ ├── Unit_Test_PageB.js │ │ ├── Unit_Test_PageC.js │ │ ├── Unit_Test_PageD.js │ │ └── navigatorTest │ │ └── unitTest.js ├── tenon-react │ ├── .eslintrc │ ├── .gitignore │ ├── hm.config.js │ ├── package.json │ ├── playground │ │ └── index.html │ ├── script │ │ └── playground.js │ └── src │ │ ├── animation-basic │ │ ├── App.jsx │ │ ├── App.less │ │ ├── common │ │ │ └── animation.js │ │ └── entry.js │ │ ├── animation-keyframe │ │ ├── App.jsx │ │ ├── App.less │ │ ├── common │ │ │ └── animation.js │ │ └── entry.js │ │ ├── animation-steps │ │ ├── App.jsx │ │ ├── App.less │ │ ├── common │ │ │ └── animation.js │ │ └── entry.js │ │ ├── animation-transition │ │ ├── App.jsx │ │ ├── App.less │ │ └── entry.js │ │ ├── benchmark-scroller │ │ ├── App.css │ │ ├── App.jsx │ │ └── entry.js │ │ ├── common │ │ ├── assets │ │ │ └── css │ │ │ │ └── common.less │ │ └── components │ │ │ ├── DemoItem.jsx │ │ │ └── PageItem.jsx │ │ ├── component-button │ │ ├── App.jsx │ │ ├── App.less │ │ └── entry.js │ │ ├── component-image │ │ ├── App.jsx │ │ ├── App.less │ │ ├── assets │ │ │ └── headInfo.jpeg │ │ ├── components │ │ │ └── DemoItem.jsx │ │ └── entry.js │ │ ├── component-input │ │ ├── App.jsx │ │ ├── App.less │ │ └── entry.js │ │ ├── component-scroller │ │ ├── App.jsx │ │ ├── App.less │ │ └── entry.js │ │ ├── component-switch │ │ ├── App.jsx │ │ ├── App.less │ │ └── entry.js │ │ ├── component-text │ │ ├── App.jsx │ │ ├── App.less │ │ └── entry.js │ │ ├── component-textarea │ │ ├── App.jsx │ │ ├── App.less │ │ └── entry.js │ │ ├── component-view │ │ ├── App.jsx │ │ ├── App.less │ │ └── entry.js │ │ ├── ex-component-list │ │ ├── App.jsx │ │ ├── App.less │ │ ├── components │ │ │ └── list.jsx │ │ ├── entry.js │ │ └── native │ │ │ └── list.js │ │ ├── ex-component-popup │ │ ├── App.jsx │ │ ├── App.less │ │ └── entry.js │ │ ├── ex-component-test │ │ ├── App.jsx │ │ ├── App.less │ │ ├── entry.js │ │ └── native-components │ │ │ ├── attr-view.js │ │ │ ├── event-view.js │ │ │ ├── safe-view.js │ │ │ └── simple-view.js │ │ ├── ex-component-viewpager │ │ ├── App.jsx │ │ ├── App.less │ │ └── entry.js │ │ ├── grammar-style │ │ ├── App.jsx │ │ ├── App.less │ │ └── entry.js │ │ ├── grammar │ │ ├── App.jsx │ │ ├── App.less │ │ ├── components │ │ │ └── CreateRefComponent.jsx │ │ └── entry.js │ │ ├── hook-test │ │ ├── App.jsx │ │ ├── App.less │ │ ├── components │ │ │ ├── UseCallbackComponent.jsx │ │ │ ├── UseEffectComponent.jsx │ │ │ ├── UseReducerComponent.jsx │ │ │ └── UseStateComponent.jsx │ │ └── entry.js │ │ ├── index │ │ ├── App.css │ │ ├── App.jsx │ │ └── entry.js │ │ ├── lifecycle │ │ ├── App.jsx │ │ ├── App.less │ │ └── entry.js │ │ ├── main │ │ ├── App.jsx │ │ ├── App.less │ │ ├── assets │ │ │ └── menu.js │ │ ├── components │ │ │ └── ListItem.jsx │ │ └── entry.js │ │ ├── page-config │ │ ├── App.jsx │ │ ├── App.less │ │ └── entry.js │ │ ├── single-page │ │ ├── App.less │ │ └── entry.js │ │ └── test │ │ ├── App.css │ │ ├── App.jsx │ │ ├── basic-components │ │ ├── Image.jsx │ │ ├── Input.jsx │ │ └── Textarea.jsx │ │ ├── components │ │ ├── DynamicHello.jsx │ │ └── Hello.jsx │ │ └── entry.js ├── tenon-vue-playground │ ├── .gitignore │ ├── README.md │ ├── hm.config.js │ ├── package.json │ └── src │ │ ├── animation │ │ ├── app.vue │ │ └── entry.js │ │ ├── animation_basic │ │ ├── app.vue │ │ └── entry.js │ │ ├── animation_keyframe │ │ ├── app.vue │ │ └── entry.js │ │ ├── animation_loading │ │ ├── app.vue │ │ └── entry.js │ │ ├── animation_ripple │ │ ├── app.vue │ │ └── entry.js │ │ ├── animation_steps │ │ ├── app.vue │ │ └── entry.js │ │ ├── bottombar │ │ ├── app.vue │ │ └── entry.js │ │ ├── button │ │ ├── app.vue │ │ └── entry.js │ │ ├── canvas │ │ ├── app.vue │ │ └── entry.js │ │ ├── common │ │ ├── CommonColor.ts │ │ ├── CommonResource.ts │ │ ├── CommonStyle.ts │ │ └── CommonUtils.ts │ │ ├── component │ │ ├── CommonPage.vue │ │ ├── CommonViewOperation.vue │ │ ├── MainListItem.vue │ │ └── VerifyCodeView.vue │ │ ├── hscroller │ │ ├── app.vue │ │ └── entry.js │ │ ├── image │ │ ├── app.vue │ │ └── entry.js │ │ ├── index │ │ ├── app.vue │ │ └── entry.js │ │ ├── input │ │ ├── app.vue │ │ └── entry.js │ │ ├── list │ │ ├── app.vue │ │ └── entry.js │ │ ├── middle_scroller │ │ ├── app.vue │ │ └── entry.js │ │ ├── middle_view │ │ ├── app.vue │ │ └── entry.js │ │ ├── normal_layout_style │ │ ├── app.vue │ │ └── entry.js │ │ ├── normal_view_style │ │ ├── app.vue │ │ └── entry.js │ │ ├── popup │ │ ├── app.vue │ │ ├── components │ │ │ └── dialog.vue │ │ └── entry.js │ │ ├── price_flag │ │ ├── app.vue │ │ └── entry.js │ │ ├── scroller │ │ ├── app.vue │ │ └── entry.js │ │ ├── switch │ │ ├── app.vue │ │ └── entry.js │ │ ├── text │ │ ├── app.vue │ │ └── entry.js │ │ ├── textarea │ │ ├── app.vue │ │ └── entry.js │ │ ├── title_and_bottom_bar │ │ ├── app.vue │ │ └── entry.js │ │ ├── titlebar │ │ ├── app.vue │ │ └── entry.js │ │ ├── verification_code │ │ ├── app.vue │ │ └── entry.js │ │ ├── view │ │ ├── app.vue │ │ └── entry.js │ │ └── view_pager │ │ ├── app.vue │ │ └── entry.js └── tenon-vue │ ├── .gitignore │ ├── README.md │ ├── hm.config.js │ ├── package.json │ └── src │ ├── animation-basic │ ├── app.vue │ └── entry.js │ ├── animation-keyframe │ ├── app.vue │ └── entry.js │ ├── animation-steps │ ├── app.vue │ └── entry.js │ ├── animation-transition │ ├── app.vue │ └── entry.js │ ├── common │ ├── assets │ │ └── css │ │ │ └── common.less │ └── store │ │ ├── action.js │ │ ├── index.js │ │ ├── logger.js │ │ ├── mutation.js │ │ └── state.js │ ├── component-button │ ├── app.vue │ └── entry.js │ ├── component-image │ ├── app.vue │ └── entry.js │ ├── component-input │ ├── app.vue │ └── entry.js │ ├── component-scroller │ ├── app.vue │ └── entry.js │ ├── component-switch │ ├── app.vue │ └── entry.js │ ├── component-text │ ├── app.vue │ └── entry.js │ ├── component-textarea │ ├── app.vue │ └── entry.js │ ├── component-view │ ├── app.vue │ └── entry.js │ ├── directive-v-if │ ├── app.vue │ └── entry.js │ ├── directive-v-rtl │ ├── app.vue │ ├── directives │ │ └── v-rtl.js │ └── entry.js │ ├── directive-v-show │ ├── app.vue │ └── entry.js │ ├── event │ ├── app.vue │ └── entry.js │ ├── ex-component-canvas │ ├── app.vue │ └── entry.js │ ├── ex-component-image-plus │ ├── app.vue │ ├── entry.js │ └── imagePlus.js │ ├── ex-component-list │ ├── app.vue │ ├── components │ │ ├── album-list.vue │ │ ├── common-list.vue │ │ └── custom-list.vue │ ├── entry.js │ └── mixins │ │ └── base.js │ ├── ex-component-marquee │ ├── app.vue │ ├── entry.js │ └── hummerMarqueeView.js │ ├── ex-component-popup │ ├── app.vue │ ├── components │ │ └── dialog.vue │ └── entry.js │ ├── ex-component-scroller-plus │ ├── app.vue │ ├── entry.js │ └── scrollerPlus.js │ ├── ex-component-test │ ├── app.vue │ ├── entry.js │ ├── ex-component-guide.md │ └── plugin │ │ ├── index.js │ │ └── webView.js │ ├── ex-component-viewpager │ ├── app.vue │ └── entry.js │ ├── grammar-render │ ├── app.vue │ ├── components │ │ ├── demo-component.vue │ │ └── test.js │ └── entry.js │ ├── grammar-slot │ ├── app.vue │ ├── components │ │ └── button.vue │ └── entry.js │ ├── grammar-style │ ├── app.vue │ └── entry.js │ ├── index │ ├── app.vue │ └── entry.js │ ├── lifecycle │ ├── app.vue │ ├── entry.js │ ├── extends │ │ └── life-mxin.js │ └── mixins │ │ ├── life-mixin.js │ │ └── life-mixin1.js │ ├── main │ ├── app.vue │ ├── assets │ │ └── menu.js │ ├── components │ │ └── list-item.vue │ └── entry.js │ ├── page-config │ ├── app.vue │ └── entry.js │ ├── plugin-error │ ├── app.vue │ └── entry.js │ ├── store-demo │ ├── app.vue │ ├── entry.js │ └── store │ │ ├── index.js │ │ └── logger.js │ ├── store-muti-main-sub1 │ ├── app.vue │ └── entry.js │ ├── store-muti-main-sub2 │ ├── app.vue │ └── entry.js │ ├── store-muti-main │ ├── app.vue │ └── entry.js │ ├── style-basic │ ├── app.vue │ └── entry.js │ ├── style-layout │ ├── app.vue │ └── entry.js │ └── test │ ├── app.vue │ ├── directives │ └── v-rtl.js │ └── entry.js ├── iOS ├── .gitignore ├── App.xcodeproj │ └── project.pbxproj ├── App │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Base.lproj │ │ └── LaunchScreen.storyboard │ ├── Info.plist │ └── ViewController.swift ├── AppTests │ ├── HMShadowViewTests.swift │ └── Info.plist ├── Hermes │ ├── HMInspector.h │ ├── HMInspector.mm │ ├── HMInspectorPackagerConnection.h │ ├── HMInspectorPackagerConnection.m │ ├── RCTMessageThread.h │ └── RCTMessageThread.mm ├── Hummer │ ├── Assets │ │ └── Assets.xcassets │ │ │ ├── Contents.json │ │ │ └── builtin.dataset │ │ │ ├── Contents.json │ │ │ └── builtin.js │ └── Classes │ │ ├── Component │ │ ├── Animation │ │ │ ├── BasicAnimationImp │ │ │ │ ├── HMCABasicAnimation.h │ │ │ │ └── HMCABasicAnimation.m │ │ │ ├── HMAnimationConverter.h │ │ │ ├── HMAnimationConverter.m │ │ │ ├── HMAnimationManager.h │ │ │ ├── HMAnimationManager.m │ │ │ ├── HMAnimator.h │ │ │ ├── HMCAAnimation+Internal.h │ │ │ ├── HMCAAnimation.h │ │ │ ├── HMCAAnimation.m │ │ │ ├── HMViewAnimation.h │ │ │ ├── Keyframe │ │ │ │ ├── CAAnimation+Exp.h │ │ │ │ ├── CAAnimation+Exp.m │ │ │ │ ├── CAAnimation+Timing.h │ │ │ │ ├── CAAnimation+Timing.m │ │ │ │ ├── HMAnimation.h │ │ │ │ ├── HMAnimation.m │ │ │ │ ├── HMCAKeyframeAnimation.h │ │ │ │ └── HMCAKeyframeAnimation.m │ │ │ ├── Transform │ │ │ │ ├── HMTransform.h │ │ │ │ └── HMTransform.m │ │ │ ├── TransitionAnimation │ │ │ │ ├── HMTransitionAnimation.h │ │ │ │ ├── HMTransitionAnimation.m │ │ │ │ ├── HMTransitionAnimationConverter.h │ │ │ │ └── HMTransitionAnimationConverter.m │ │ │ ├── UIView+HMAnimation.h │ │ │ └── UIView+HMAnimation.m │ │ ├── Controller │ │ │ ├── HMRootViewLifeCycle.h │ │ │ ├── HMRootViewLifeCycle.m │ │ │ ├── HMViewController.h │ │ │ ├── HMViewController.m │ │ │ └── HummerContainerProtocol.h │ │ ├── Interface │ │ │ ├── HMJSLoaderProtocol.h │ │ │ ├── HMMemoryComponent.h │ │ │ ├── HMRequestComponent.h │ │ │ └── HMStorageProtocol.h │ │ ├── MemoryCache │ │ │ ├── HMMemCache.h │ │ │ └── HMMemCache.m │ │ ├── Navigator │ │ │ ├── HMNavigator.h │ │ │ ├── HMNavigator.m │ │ │ ├── HMNavigatorPageInfo.h │ │ │ ├── HMNavigatorPageInfo.m │ │ │ ├── HMNavigatorSchemes.h │ │ │ ├── HMNavigatorSchemes.m │ │ │ └── HMPageBuilder.h │ │ ├── Network │ │ │ ├── HMRequest.h │ │ │ ├── HMRequest.m │ │ │ ├── HMRequestCache.h │ │ │ └── HMRequestCache.m │ │ ├── NotifyCenter │ │ │ ├── HMNotificationCenter.h │ │ │ ├── HMNotificationCenter.m │ │ │ ├── HMNotifyCenter.h │ │ │ └── HMNotifyCenter.m │ │ ├── Storage │ │ │ ├── HMStorage.h │ │ │ └── HMStorage.m │ │ ├── Timer │ │ │ ├── HMTimer.h │ │ │ └── HMTimer.m │ │ ├── Views │ │ │ ├── Button │ │ │ │ ├── HMButton.h │ │ │ │ └── HMButton.m │ │ │ ├── Canvas │ │ │ │ ├── BridgeExport │ │ │ │ │ ├── HMCanvasView.h │ │ │ │ │ └── HMCanvasView.m │ │ │ │ ├── implementation │ │ │ │ │ └── coreGraphic │ │ │ │ │ │ ├── HMCanvasByGraphicInternelView.h │ │ │ │ │ │ ├── HMCanvasByGraphicInternelView.m │ │ │ │ │ │ ├── HMCanvasDrawCommand.h │ │ │ │ │ │ ├── HMCanvasDrawCommand.m │ │ │ │ │ │ ├── HMCanvasImplByCoreGraphic.h │ │ │ │ │ │ └── HMCanvasImplByCoreGraphic.m │ │ │ │ └── interface │ │ │ │ │ └── HMCanvasViewInterface.h │ │ │ ├── Color │ │ │ │ ├── HMGradientColor.h │ │ │ │ └── HMGradientColor.m │ │ │ ├── Dialog │ │ │ │ ├── HMDialog.h │ │ │ │ └── HMDialog.m │ │ │ ├── HMRootView │ │ │ │ ├── HMRootView.h │ │ │ │ └── HMRootView.m │ │ │ ├── ImageView │ │ │ │ ├── AnimatedImage │ │ │ │ │ ├── HMAnimatedImage.h │ │ │ │ │ └── HMAnimatedImage.m │ │ │ │ ├── HMImageLayer.h │ │ │ │ ├── HMImageLayer.m │ │ │ │ ├── HMImageView.h │ │ │ │ └── HMImageView.m │ │ │ ├── Label │ │ │ │ ├── HMAttributesBuilder.h │ │ │ │ ├── HMAttributesBuilder.m │ │ │ │ ├── HMLabel.h │ │ │ │ └── HMLabel.m │ │ │ ├── ListView │ │ │ │ ├── HMRecycleListView+CallJS.h │ │ │ │ ├── HMRecycleListView+CallJS.m │ │ │ │ ├── HMRecycleListView.h │ │ │ │ ├── HMRecycleListView.m │ │ │ │ ├── HMRefreshBaseView.h │ │ │ │ ├── HMRefreshBaseView.m │ │ │ │ └── Layout │ │ │ │ │ ├── HMListLayoutAttributes.h │ │ │ │ │ ├── HMListLayoutAttributes.m │ │ │ │ │ ├── HMRecycleListViewGridLayout.h │ │ │ │ │ ├── HMRecycleListViewGridLayout.m │ │ │ │ │ ├── HMRecycleListViewListLayout.h │ │ │ │ │ ├── HMRecycleListViewListLayout.m │ │ │ │ │ ├── HMRecycleListViewWaterfallLayout.h │ │ │ │ │ ├── HMRecycleListViewWaterfallLayout.m │ │ │ │ │ ├── HMWaterfallLayoutAttributes.h │ │ │ │ │ └── HMWaterfallLayoutAttributes.m │ │ │ ├── Loading │ │ │ │ ├── HMActivityIndicatorView.h │ │ │ │ └── HMActivityIndicatorView.m │ │ │ ├── Lottie │ │ │ │ ├── HMLottieView+ImageLoader.h │ │ │ │ ├── HMLottieView+ImageLoader.m │ │ │ │ ├── HMLottieView.h │ │ │ │ ├── HMLottieView.m │ │ │ │ ├── Loader │ │ │ │ │ ├── HMLocalImageLoader+Lottie.h │ │ │ │ │ ├── HMLocalImageLoader+Lottie.m │ │ │ │ │ ├── HMLottieLoader.h │ │ │ │ │ ├── HMWebImageLoader+Lottie.h │ │ │ │ │ └── HMWebImageLoader+Lottie.m │ │ │ │ ├── Manager │ │ │ │ │ ├── HMLottieLoaderManager.h │ │ │ │ │ ├── HMLottieLoaderManager.m │ │ │ │ │ ├── HMZipArchive.h │ │ │ │ │ └── HMZipArchive.m │ │ │ │ └── Swift │ │ │ │ │ └── CompatibleLottie.swift │ │ │ ├── Scroller │ │ │ │ ├── HMScrollView.h │ │ │ │ └── HMScrollView.m │ │ │ ├── Switch │ │ │ │ ├── HMSwitch.h │ │ │ │ └── HMSwitch.m │ │ │ ├── TextArea │ │ │ │ ├── HMTextArea.h │ │ │ │ └── HMTextArea.m │ │ │ ├── TextInput │ │ │ │ ├── HMInput.h │ │ │ │ └── HMInput.m │ │ │ ├── Toast │ │ │ │ ├── HMToast.h │ │ │ │ ├── HMToast.m │ │ │ │ ├── HMToastView.h │ │ │ │ ├── HMToastView.m │ │ │ │ ├── UIView+HMToast.h │ │ │ │ └── UIView+HMToast.m │ │ │ ├── View │ │ │ │ ├── HMAttributesItem.h │ │ │ │ ├── HMAttributesItem.m │ │ │ │ ├── HMBorderModel.h │ │ │ │ ├── HMBorderModel.m │ │ │ │ ├── HMBorderModelCollection.h │ │ │ │ ├── HMBorderModelCollection.m │ │ │ │ ├── HMCornerRadiusModel.h │ │ │ │ ├── HMCornerRadiusModel.m │ │ │ │ ├── HMRootViewProtocol.h │ │ │ │ ├── HMTransformResolver.h │ │ │ │ ├── HMTransformResolver.m │ │ │ │ ├── UIView+HMAttribute.h │ │ │ │ ├── UIView+HMAttribute.m │ │ │ │ ├── UIView+HMDom.h │ │ │ │ ├── UIView+HMDom.m │ │ │ │ ├── UIView+HMEvent.h │ │ │ │ ├── UIView+HMEvent.m │ │ │ │ ├── UIView+HMRootView.h │ │ │ │ ├── UIView+HMRootView.m │ │ │ │ ├── UIView+Hummer.h │ │ │ │ └── UIView+Hummer.m │ │ │ └── ViewPager │ │ │ │ ├── HMViewPager.h │ │ │ │ ├── HMViewPager.m │ │ │ │ ├── HMViewPagerCell.h │ │ │ │ ├── HMViewPagerCell.m │ │ │ │ ├── HMViewPagerLayout.h │ │ │ │ ├── HMViewPagerLayout.m │ │ │ │ ├── HMViewPagerLayoutAnimator.h │ │ │ │ ├── HMViewPagerLayoutAttributes.h │ │ │ │ ├── HMViewPagerLayoutAttributes.m │ │ │ │ ├── HMViewPagerLayoutCardAnimator.h │ │ │ │ ├── HMViewPagerLayoutCardAnimator.m │ │ │ │ ├── HMViewPagerPageAnimator.h │ │ │ │ └── HMViewPagerPageAnimator.m │ │ └── WebSocket │ │ │ ├── HMWebSocket.h │ │ │ └── HMWebSocket.m │ │ ├── Core │ │ ├── Bridge │ │ │ ├── HMDebug.h │ │ │ ├── HMJSContext+PrivateVariables.h │ │ │ ├── HMJSContext.h │ │ │ ├── HMJSContext.m │ │ │ ├── HMJSContextDefines.h │ │ │ ├── HMJSContextDefines.m │ │ │ ├── HMJSGlobal+Private.h │ │ │ ├── HMJSGlobal+Private.m │ │ │ ├── HMJSGlobal.h │ │ │ ├── HMJSGlobal.m │ │ │ ├── HMJSObject.h │ │ │ ├── JSValue+Hummer.h │ │ │ ├── NSObject+Hummer.h │ │ │ └── NSObject+Hummer.m │ │ ├── EventTrack │ │ │ ├── HMEventTrackManager.h │ │ │ ├── HMEventTrackManager.m │ │ │ ├── HMEventTrackUtils.h │ │ │ ├── HMEventTrackUtils.m │ │ │ ├── HMEventTrackViewProperty.h │ │ │ ├── UIView+HMEventTrack.h │ │ │ └── UIView+HMEventTrack.m │ │ ├── HMBorderDrawing.h │ │ ├── HMBorderDrawing.m │ │ ├── HMView.h │ │ ├── HMView.m │ │ ├── Layout │ │ │ ├── HMYogaConfig.h │ │ │ ├── HMYogaConfig.m │ │ │ ├── Manager │ │ │ │ ├── HMLayoutStyleProtocol.h │ │ │ │ ├── HMUIManager.h │ │ │ │ └── HMUIManager.m │ │ │ ├── RenderObject │ │ │ │ ├── HMCompatibleRenderObject.h │ │ │ │ ├── HMCompatibleRenderObject.m │ │ │ │ ├── HMLayout.h │ │ │ │ ├── HMLayout.m │ │ │ │ ├── HMMeasureRenderObject.h │ │ │ │ ├── HMMeasureRenderObject.m │ │ │ │ ├── HMRenderObject.h │ │ │ │ ├── HMRenderObject.m │ │ │ │ ├── HMRootRenderObject.h │ │ │ │ ├── HMRootRenderObject.m │ │ │ │ ├── HMTextRenderObject.h │ │ │ │ ├── HMTextRenderObject.m │ │ │ │ ├── HMYogaUtility.cpp │ │ │ │ └── HMYogaUtility.h │ │ │ ├── UIView+HMRenderObject.h │ │ │ └── UIView+HMRenderObject.m │ │ ├── Manager │ │ │ ├── HMAttrManager.h │ │ │ ├── HMAttrManager.m │ │ │ ├── HMFileManager.h │ │ │ ├── HMFileManager.m │ │ │ ├── HMImageManager.h │ │ │ ├── HMImageManager.m │ │ │ ├── HMViewManagerDTOModel.h │ │ │ ├── HMViewManagerDTOModel.m │ │ │ ├── HMViewManagerLoader.h │ │ │ ├── HMViewManagerLoader.m │ │ │ └── ImageLoader │ │ │ │ ├── Cache │ │ │ │ ├── HMImageCache.h │ │ │ │ ├── HMImageCache.m │ │ │ │ ├── HMImageCacheManager.h │ │ │ │ ├── HMImageCacheManager.m │ │ │ │ ├── HMImageDiskCache.h │ │ │ │ └── HMImageDiskCache.m │ │ │ │ ├── Category │ │ │ │ ├── HMAnimatedImage+Hummer.h │ │ │ │ ├── HMAnimatedImage+Hummer.m │ │ │ │ ├── HMImageCoderDefine.h │ │ │ │ ├── HMImageCoderDefine.m │ │ │ │ ├── NSData+Hummer.h │ │ │ │ ├── NSData+Hummer.m │ │ │ │ ├── NSURL+Hummer.h │ │ │ │ ├── NSURL+Hummer.m │ │ │ │ ├── UIImage+HMForceDecode.h │ │ │ │ ├── UIImage+HMForceDecode.m │ │ │ │ ├── UIImage+HMMetadata.h │ │ │ │ ├── UIImage+HMMetadata.m │ │ │ │ ├── UIImage+HMMultiFormat.h │ │ │ │ ├── UIImage+HMMultiFormat.m │ │ │ │ ├── UIImage+Hummer.h │ │ │ │ ├── UIImage+Hummer.m │ │ │ │ ├── UIImageView+HMImageLoader.h │ │ │ │ ├── UIImageView+HMImageLoader.m │ │ │ │ ├── UIView+HMImageLoader.h │ │ │ │ └── UIView+HMImageLoader.m │ │ │ │ ├── ConcreteLoader │ │ │ │ ├── HMBase64ImageLoader.h │ │ │ │ ├── HMBase64ImageLoader.m │ │ │ │ ├── HMLocalImageLoader.h │ │ │ │ ├── HMLocalImageLoader.m │ │ │ │ ├── HMWebImageLoader.h │ │ │ │ └── HMWebImageLoader.m │ │ │ │ ├── Decoder │ │ │ │ ├── ConcreteCoder │ │ │ │ │ ├── APNG │ │ │ │ │ │ ├── HMImageAPNGCoder.h │ │ │ │ │ │ └── HMImageAPNGCoder.m │ │ │ │ │ ├── HMGIFImageDecoder.h │ │ │ │ │ ├── HMGIFImageDecoder.m │ │ │ │ │ ├── HMImageFrame.h │ │ │ │ │ ├── HMImageFrame.m │ │ │ │ │ ├── IOImage │ │ │ │ │ │ ├── HMImageIOAnimatedCoder+Internal.h │ │ │ │ │ │ ├── HMImageIOAnimatedCoder.h │ │ │ │ │ │ ├── HMImageIOAnimatedCoder.m │ │ │ │ │ │ ├── HMImageIOCoder.h │ │ │ │ │ │ └── HMImageIOCoder.m │ │ │ │ │ └── Webp │ │ │ │ │ │ ├── HMWebPImageCoderDefine.h │ │ │ │ │ │ ├── HMWebPImageCoderDefine.m │ │ │ │ │ │ ├── HMWebpBuiltInImageCoder.h │ │ │ │ │ │ ├── HMWebpBuiltInImageCoder.m │ │ │ │ │ │ ├── HMWebpImageCoder.h │ │ │ │ │ │ └── HMWebpImageCoder.m │ │ │ │ ├── HMImageCoder.h │ │ │ │ ├── HMImageCoder.m │ │ │ │ ├── HMImageCoderHelper.h │ │ │ │ ├── HMImageCoderHelper.m │ │ │ │ ├── HMImageCoderManager.h │ │ │ │ └── HMImageCoderManager.m │ │ │ │ ├── HMImageLoader.h │ │ │ │ ├── HMImageLoaderDefine.h │ │ │ │ ├── HMImageLoaderDefine.m │ │ │ │ ├── HMImageLoaderManager.h │ │ │ │ ├── HMImageLoaderManager.m │ │ │ │ ├── HMURLConvertible.h │ │ │ │ └── Operation │ │ │ │ ├── HMImageDownLoadToken.h │ │ │ │ ├── HMImageDownLoadToken.m │ │ │ │ ├── HMImageDownloadOperation.h │ │ │ │ ├── HMImageDownloadOperation.m │ │ │ │ ├── HMImageLoaderOperation.h │ │ │ │ └── HMImageLoaderOperation.m │ │ ├── Proxy │ │ │ ├── HummerWeakProxy.h │ │ │ └── HummerWeakProxy.m │ │ └── Utility │ │ │ ├── Category │ │ │ ├── HMConvertibleProtocol.h │ │ │ ├── NSData+HMConvertible.h │ │ │ ├── NSData+HMConvertible.m │ │ │ ├── NSError+Hummer.h │ │ │ ├── NSError+Hummer.m │ │ │ ├── NSInvocation+Hummer.h │ │ │ ├── NSInvocation+Hummer.m │ │ │ ├── NSString+HMConvertible.h │ │ │ ├── NSString+HMConvertible.m │ │ │ ├── NSString+Hummer.h │ │ │ └── NSString+Hummer.m │ │ │ ├── HMConfig.h │ │ │ ├── HMConfig.m │ │ │ ├── HMContainerModel.h │ │ │ ├── HMContainerModel.m │ │ │ ├── HMConverter.h │ │ │ ├── HMConverter.m │ │ │ ├── HMDefines.h │ │ │ ├── HMDefines.m │ │ │ ├── HMEncoding.h │ │ │ ├── HMEncoding.m │ │ │ ├── HMJavaScriptLoader.h │ │ │ ├── HMJavaScriptLoader.m │ │ │ ├── HMLayoutUtils.h │ │ │ ├── HMLayoutUtils.m │ │ │ ├── HMLogger.h │ │ │ ├── HMLogger.m │ │ │ ├── HMReporter.h │ │ │ ├── HMReporter.m │ │ │ ├── HMSourceParser.h │ │ │ ├── HMSourceParser.m │ │ │ ├── HMUIUtility.h │ │ │ ├── HMUIUtility.m │ │ │ ├── HMURLUtility.h │ │ │ ├── HMURLUtility.m │ │ │ ├── HMUtility.h │ │ │ ├── HMUtility.m │ │ │ ├── WeakPointerWrapper.h │ │ │ └── WeakPointerWrapper.m │ │ ├── Dev │ │ ├── HMDebugService.h │ │ ├── HMDebugService.m │ │ ├── HMDevGlobalWebSocket.h │ │ ├── HMDevGlobalWebSocket.m │ │ ├── HMDevService.h │ │ ├── HMDevService.m │ │ └── ViewInspector │ │ │ ├── HMDescription.h │ │ │ ├── HMViewInspector.h │ │ │ ├── HMViewInspector.m │ │ │ └── View │ │ │ ├── NSObject+HMDescription.h │ │ │ ├── NSObject+HMDescription.m │ │ │ ├── UIView+HMDescription.h │ │ │ ├── UIView+HMDescription.m │ │ │ ├── UIView+HMInspector.h │ │ │ └── UIView+HMInspector.m │ │ ├── Engine │ │ ├── HMBaseExecutorProtocol.h │ │ ├── HMBaseExecutorProtocol.m │ │ ├── HMBaseValue.h │ │ ├── HMBaseValue.m │ │ ├── HMBaseWeakValueProtocol.h │ │ ├── HMExceptionModel.h │ │ ├── HMExceptionModel.m │ │ ├── JavaScriptCore │ │ │ ├── HMJSCExecutor+Internal.h │ │ │ ├── HMJSCExecutor+Internal.m │ │ │ ├── HMJSCExecutor+Private.h │ │ │ ├── HMJSCExecutor.h │ │ │ ├── HMJSCExecutor.m │ │ │ ├── HMJSCStrongValue.h │ │ │ ├── HMJSCStrongValue.m │ │ │ ├── HMJSCWeakValue.h │ │ │ └── HMJSCWeakValue.m │ │ └── N-API │ │ │ ├── HMBatchMainQueue.h │ │ │ ├── HMBatchMainQueue.m │ │ │ ├── HMJSExecutor+Private.h │ │ │ ├── HMJSExecutor.h │ │ │ ├── HMJSExecutor.m │ │ │ ├── HMJSStrongValue.h │ │ │ ├── HMJSStrongValue.m │ │ │ ├── HMJSValue.h │ │ │ ├── HMJSWeakValue.h │ │ │ ├── HMJSWeakValue.m │ │ │ ├── HMNAPIDebuggerHelper.h │ │ │ └── HMNAPIDebuggerHelper.mm │ │ ├── Entry │ │ ├── Hummer.h │ │ └── Hummer.m │ │ ├── Event │ │ └── Gesture │ │ │ ├── HMEventDefines.h │ │ │ ├── HMEventDefines.m │ │ │ ├── HMEventHandler.h │ │ │ ├── HMEventHandler.m │ │ │ ├── HMTouchGestureRecognizer.h │ │ │ └── HMTouchGestureRecognizer.m │ │ ├── Export │ │ ├── HMExportBaseClass.h │ │ ├── HMExportBaseClass.m │ │ ├── HMExportClass.h │ │ ├── HMExportClass.m │ │ ├── HMExportManager.h │ │ ├── HMExportManager.m │ │ ├── HMExportMethod.h │ │ ├── HMExportMethod.m │ │ ├── HMExportProperty.h │ │ └── HMExportProperty.m │ │ ├── Interceptor │ │ ├── HMApplicationRouterProtocol.h │ │ ├── HMEventTrackProtocol.h │ │ ├── HMFontProtocol.h │ │ ├── HMImageProtocol.h │ │ ├── HMInterceptor.h │ │ ├── HMInterceptor.m │ │ ├── HMJSCallerProtocol.h │ │ ├── HMLoggerProtocol.h │ │ ├── HMNetworkProtocol.h │ │ ├── HMPluginManager.h │ │ ├── HMPluginManager.m │ │ ├── HMReporterProtocol.h │ │ ├── HMRouterProtocol.h │ │ ├── HMWebImageProtocol.h │ │ └── Optimize │ │ │ ├── HMConfigEntryManager.h │ │ │ ├── HMConfigEntryManager.m │ │ │ ├── HMNamespaceScope.h │ │ │ └── HMNamespaceScope.m │ │ └── Version │ │ ├── HMUpgradeManager.h │ │ └── HMUpgradeManager.m ├── Podfile ├── Podfile.lock ├── README.md ├── builtin │ ├── .eslintignore │ ├── .eslintrc.js │ ├── .gitignore │ ├── @types │ │ └── index.d.ts │ ├── README.md │ ├── babel.config.json │ ├── hm.config.js │ ├── jest.config.js │ ├── package.json │ ├── src │ │ ├── .babelrc.json │ │ ├── HummerBase.ts │ │ ├── console.test.ts │ │ ├── console.ts │ │ ├── index.ts │ │ ├── injectClassModel.test.ts │ │ ├── injectClassModel.ts │ │ ├── utility.test.ts │ │ └── utility.ts │ └── tsconfig.json └── jsinspector │ └── InspectorInterfaces.h ├── market └── component_material_market.md └── tenon ├── .eslintrc.js ├── .gitignore ├── .prettierrc ├── CHANGELOG.md ├── README.md ├── __tests__ └── setup.js ├── jest.config.js ├── lerna.json ├── package.json ├── packages ├── global.d.ts ├── tenon-compiler │ ├── CHANGELOG.md │ ├── README.md │ ├── __tests__ │ │ └── index.test.ts │ ├── package.json │ ├── src │ │ ├── errors.ts │ │ ├── index.ts │ │ ├── parserOptions.ts │ │ ├── runtimeHelpers.ts │ │ ├── style.ts │ │ └── transforms │ │ │ ├── transformClass.ts │ │ │ ├── transformComment.ts │ │ │ ├── transformElement.ts │ │ │ ├── transformProps.ts │ │ │ ├── transformStyle.ts │ │ │ ├── vAnimation.ts │ │ │ ├── vModel.ts │ │ │ └── vShow.ts │ └── tsconfig.json ├── tenon-core │ ├── CHANGELOG.md │ ├── README.md │ ├── __tests__ │ │ └── index.test.ts │ ├── package.json │ ├── src │ │ ├── helper │ │ │ ├── animation-helper.ts │ │ │ ├── fixed-helper.ts │ │ │ ├── lifecycle-helper.ts │ │ │ └── page-helper.ts │ │ ├── index.ts │ │ ├── nodes │ │ │ ├── Base.ts │ │ │ ├── component.ts │ │ │ ├── components │ │ │ │ ├── anchor.ts │ │ │ │ ├── button.ts │ │ │ │ ├── comment.ts │ │ │ │ ├── extend │ │ │ │ │ ├── loadmore.ts │ │ │ │ │ └── refresh.ts │ │ │ │ ├── image.ts │ │ │ │ ├── input.ts │ │ │ │ ├── page.ts │ │ │ │ ├── scroller.ts │ │ │ │ ├── switch.ts │ │ │ │ ├── text.ts │ │ │ │ ├── textarea.ts │ │ │ │ └── view.ts │ │ │ ├── document.ts │ │ │ ├── index.ts │ │ │ └── types.ts │ │ └── utils │ │ │ └── style.ts │ └── tsconfig.json ├── tenon-dev-tool │ ├── CHANGELOG.md │ ├── README.md │ ├── __tests__ │ │ └── index.test.ts │ ├── package.json │ ├── src │ │ ├── index.ts │ │ ├── memoryintercept.ts │ │ ├── requestintercept.ts │ │ ├── socket.ts │ │ ├── storageintercept.ts │ │ └── utils.ts │ └── tsconfig.json ├── tenon-react │ ├── CHANGELOG.md │ ├── README.md │ ├── __tests__ │ │ └── index.test.ts │ ├── package.json │ ├── src │ │ ├── events │ │ │ ├── event.ts │ │ │ ├── index.ts │ │ │ └── listener.ts │ │ ├── hook │ │ │ └── index.ts │ │ ├── hostConfig │ │ │ ├── index.ts │ │ │ └── utils.ts │ │ ├── index.ts │ │ ├── lifecycle │ │ │ ├── global-lifecycle.ts │ │ │ └── index.ts │ │ └── render │ │ │ └── index.ts │ └── tsconfig.json ├── tenon-store │ ├── CHANGELOG.md │ ├── README.md │ ├── __tests__ │ │ └── index.test.ts │ ├── package.json │ ├── src │ │ ├── helpers.ts │ │ ├── index.ts │ │ ├── injectKey.ts │ │ ├── module │ │ │ ├── module-collection.ts │ │ │ └── module.ts │ │ ├── plugins │ │ │ ├── hummer.ts │ │ │ ├── logger.ts │ │ │ └── utils │ │ │ │ ├── index.ts │ │ │ │ └── types.ts │ │ ├── store.ts │ │ └── util.ts │ └── tsconfig.json ├── tenon-utils │ ├── CHANGELOG.md │ ├── README.md │ ├── __tests__ │ │ ├── index.test.ts │ │ └── style.test.ts │ ├── package.json │ ├── src │ │ ├── components │ │ │ ├── index.ts │ │ │ └── types.ts │ │ ├── index.ts │ │ ├── normalizeProp.ts │ │ ├── style │ │ │ ├── common │ │ │ │ ├── background.ts │ │ │ │ ├── color.ts │ │ │ │ ├── default-style.ts │ │ │ │ └── utils.ts │ │ │ ├── dynamic-transformer │ │ │ │ └── adapter.ts │ │ │ ├── index.ts │ │ │ └── transformer │ │ │ │ ├── adapter.ts │ │ │ │ ├── attrname.ts │ │ │ │ ├── background.ts │ │ │ │ ├── border.ts │ │ │ │ ├── break-token.ts │ │ │ │ ├── color.ts │ │ │ │ ├── flex.ts │ │ │ │ ├── shadow.ts │ │ │ │ ├── transform.ts │ │ │ │ ├── transition.ts │ │ │ │ └── unit.ts │ │ └── utils │ │ │ ├── api.ts │ │ │ └── index.ts │ └── tsconfig.json ├── tenon-vue │ ├── CHANGELOG.md │ ├── README.md │ ├── __tests__ │ │ └── index.test.ts │ ├── package.json │ ├── src │ │ ├── index.d.ts │ │ ├── index.ts │ │ ├── runtime │ │ │ ├── api.ts │ │ │ ├── directives │ │ │ │ ├── vAnimation.ts │ │ │ │ ├── vModel.ts │ │ │ │ └── vShow.ts │ │ │ ├── handlers │ │ │ │ ├── attrs.ts │ │ │ │ ├── class.ts │ │ │ │ ├── events.ts │ │ │ │ └── style.ts │ │ │ ├── helper │ │ │ │ ├── animation-helper.ts │ │ │ │ ├── fixed-helper.ts │ │ │ │ ├── lifecycle-helper.ts │ │ │ │ └── page-helper.ts │ │ │ ├── index.ts │ │ │ ├── nodeOps.ts │ │ │ ├── nodes │ │ │ │ ├── Base.ts │ │ │ │ ├── component.ts │ │ │ │ ├── components │ │ │ │ │ ├── anchor.ts │ │ │ │ │ ├── button.ts │ │ │ │ │ ├── comment.ts │ │ │ │ │ ├── extend │ │ │ │ │ │ ├── loadmore.ts │ │ │ │ │ │ └── refresh.ts │ │ │ │ │ ├── image.ts │ │ │ │ │ ├── input.ts │ │ │ │ │ ├── page.ts │ │ │ │ │ ├── scroller.ts │ │ │ │ │ ├── switch.ts │ │ │ │ │ ├── text.ts │ │ │ │ │ ├── textarea.ts │ │ │ │ │ └── view.ts │ │ │ │ ├── document.ts │ │ │ │ ├── index.ts │ │ │ │ └── types.ts │ │ │ └── patchProp.ts │ │ └── utils │ │ │ ├── adapter.ts │ │ │ ├── event.ts │ │ │ └── style.ts │ └── tsconfig.json └── tenon │ ├── CHANGELOG.md │ ├── README.md │ ├── __tests__ │ └── index.test.ts │ ├── package.json │ ├── src │ └── index.ts │ └── tsconfig.json ├── rollup.config.js ├── scripts ├── build.js └── dev.js └── tsconfig.json /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "\U0001F680 Feature Request" 3 | about: I have a specific suggestion for Hummer! 4 | title: '' 5 | labels: "Needs: Triage \U0001F50D, enhancement" 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## 功能请求 11 | 12 | - [ ] 我想要完成此功能 13 | 14 | **您的功能请求是否与一个问题有关?** 15 | 16 | 17 | **描述您希望的解决方案** 18 | 19 | **描述您考虑过的备选方案**. 20 | 21 | **文档、适配、迁移策略** 22 | 23 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | | Q | A 3 | | ------------------------ | --- 4 | | Fixed Issues? | `Fixes #1, Fixes #2` 5 | | Patch: Bug Fix? | 6 | | Major: Breaking Change? | 7 | | Minor: New Feature? | Yes 8 | | Tests Added + Pass? | Yes 9 | 10 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "iOS/N-API"] 2 | path = iOS/N-API 3 | url = git@github.com:OrangeLab/N-API.git 4 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/didi/Hummer/4b720e2319343321783ecbc664d946f3aa46ae79/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Jul 30 19:34:44 CST 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip 7 | -------------------------------------------------------------------------------- /android/hermes-debugger/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /android/hermes-debugger/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/didi/Hummer/4b720e2319343321783ecbc664d946f3aa46ae79/android/hermes-debugger/consumer-rules.pro -------------------------------------------------------------------------------- /android/hermes-debugger/gradle.properties: -------------------------------------------------------------------------------- 1 | ARTIFACT_ID=hermes-debugger 2 | VERSION=0.0.9 -------------------------------------------------------------------------------- /android/hermes-debugger/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /android/hermes-debugger/src/main/java/com/didi/hummer/hermes/queue/MessageQueueThreadPerfStats.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | package com.didi.hummer.hermes.queue; 9 | 10 | /** This class holds perf counters' values at the beginning of an RN startup. */ 11 | public class MessageQueueThreadPerfStats { 12 | public long wallTime; 13 | public long cpuTime; 14 | } 15 | -------------------------------------------------------------------------------- /android/hermes-debugger/src/main/native/napi/reactjni/OnLoad.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by XiaoFeng on 2020/12/21. 3 | // 4 | 5 | #include 6 | #include 7 | 8 | using namespace facebook::jni; 9 | using namespace facebook::react; 10 | 11 | JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) { 12 | JNIEnv *env; 13 | if (vm->GetEnv((void **) &env, JNI_VERSION_1_6) != JNI_OK) { 14 | return -1; 15 | } 16 | Environment::initialize(vm); 17 | JInspector::registerNatives(); 18 | return JNI_VERSION_1_6; 19 | } -------------------------------------------------------------------------------- /android/hermes-debugger/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /android/hermes-debugger/upload.gradle: -------------------------------------------------------------------------------- 1 | if (project.publishArchivesType == '1') { 2 | apply from: '../upload_maven.gradle' 3 | } else if (project.publishArchivesType == '2') { 4 | apply from: '../upload_jcenter.gradle' 5 | } else if (project.publishArchivesType == '3') { 6 | apply from: '../upload_maven_central_aar.gradle' 7 | } -------------------------------------------------------------------------------- /android/hermes-debugger/upload.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | echo -n "please enter bintray userid ->" 3 | read userid_bintray 4 | echo -n "please enter bintray apikey ->" 5 | read apikey_bintray 6 | ../gradlew clean build bintrayUpload -PbintrayUser=${userid_bintray} -PbintrayKey=${apikey_bintray} -PdryRun=false -------------------------------------------------------------------------------- /android/hummer-annotation/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /android/hummer-annotation/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java-library' 2 | apply from: 'upload.gradle' 3 | 4 | java { 5 | sourceCompatibility = JavaVersion.VERSION_1_8 6 | targetCompatibility = JavaVersion.VERSION_1_8 7 | } -------------------------------------------------------------------------------- /android/hummer-annotation/gradle.properties: -------------------------------------------------------------------------------- 1 | ARTIFACT_ID=hummer-annotation 2 | VERSION=0.2.3 -------------------------------------------------------------------------------- /android/hummer-annotation/src/main/java/com/didi/hummer/annotation/Component.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Target(ElementType.TYPE) 9 | @Retention(RetentionPolicy.RUNTIME) 10 | public @interface Component { 11 | String value() default ""; 12 | } 13 | -------------------------------------------------------------------------------- /android/hummer-annotation/src/main/java/com/didi/hummer/annotation/JsAttribute.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.annotation; 2 | 3 | 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | @Target(ElementType.METHOD) 10 | @Retention(RetentionPolicy.RUNTIME) 11 | public @interface JsAttribute { 12 | String[] value() default ""; 13 | } 14 | -------------------------------------------------------------------------------- /android/hummer-annotation/src/main/java/com/didi/hummer/annotation/JsMethod.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.annotation; 2 | 3 | 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | @Target(ElementType.METHOD) 10 | @Retention(RetentionPolicy.RUNTIME) 11 | public @interface JsMethod { 12 | String value() default ""; 13 | } 14 | -------------------------------------------------------------------------------- /android/hummer-annotation/src/main/java/com/didi/hummer/annotation/JsProperty.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Target({ElementType.METHOD,ElementType.FIELD}) 9 | @Retention(RetentionPolicy.RUNTIME) 10 | public @interface JsProperty { 11 | String value() default ""; 12 | } 13 | -------------------------------------------------------------------------------- /android/hummer-annotation/src/main/java/com/didi/hummer/annotation/Module.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Target(ElementType.TYPE) 9 | @Retention(RetentionPolicy.RUNTIME) 10 | public @interface Module { 11 | String value() default ""; 12 | } 13 | -------------------------------------------------------------------------------- /android/hummer-annotation/src/main/java/com/didi/hummer/annotation/Nullable.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | @Documented 10 | @Retention(RetentionPolicy.CLASS) 11 | @Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE}) 12 | public @interface Nullable { 13 | } 14 | 15 | 16 | -------------------------------------------------------------------------------- /android/hummer-annotation/upload.gradle: -------------------------------------------------------------------------------- 1 | if (project.publishArchivesType == '1') { 2 | apply from: '../upload_maven.gradle' 3 | } else if (project.publishArchivesType == '2') { 4 | apply from: '../upload_jcenter.gradle' 5 | } else if (project.publishArchivesType == '3') { 6 | apply from: '../upload_maven_central_jar.gradle' 7 | } -------------------------------------------------------------------------------- /android/hummer-annotation/upload.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | echo -n "please enter bintray userid ->" 3 | read userid_bintray 4 | echo -n "please enter bintray apikey ->" 5 | read apikey_bintray 6 | ../gradlew clean build bintrayUpload -PbintrayUser=${userid_bintray} -PbintrayKey=${apikey_bintray} -PdryRun=false -------------------------------------------------------------------------------- /android/hummer-compiler/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java-library' 2 | apply from: 'upload.gradle' 3 | 4 | java { 5 | sourceCompatibility = JavaVersion.VERSION_1_8 6 | targetCompatibility = JavaVersion.VERSION_1_8 7 | } 8 | 9 | dependencies { 10 | implementation 'com.squareup:javapoet:1.11.1' 11 | 12 | if (project.publishArchivesType == '3') { 13 | implementation 'io.github.didi.hummer:hummer-annotation:0.2.3' 14 | } else { 15 | implementation 'com.didi.hummer:hummer-annotation:0.2.2' 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /android/hummer-compiler/gradle.properties: -------------------------------------------------------------------------------- 1 | ARTIFACT_ID=hummer-compiler 2 | VERSION=0.3.1 -------------------------------------------------------------------------------- /android/hummer-compiler/src/main/resources/META-INF/services/javax.annotation.processing.Processor: -------------------------------------------------------------------------------- 1 | com.didi.hummer.compiler.HummerExportProcessor -------------------------------------------------------------------------------- /android/hummer-compiler/upload.gradle: -------------------------------------------------------------------------------- 1 | if (project.publishArchivesType == '1') { 2 | apply from: '../upload_maven.gradle' 3 | } else if (project.publishArchivesType == '2') { 4 | apply from: '../upload_jcenter.gradle' 5 | } else if (project.publishArchivesType == '3') { 6 | apply from: '../upload_maven_central_jar.gradle' 7 | } -------------------------------------------------------------------------------- /android/hummer-compiler/upload.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | echo -n "please enter bintray userid ->" 3 | read userid_bintray 4 | echo -n "please enter bintray apikey ->" 5 | read apikey_bintray 6 | ../gradlew clean build bintrayUpload -PbintrayUser=${userid_bintray} -PbintrayKey=${apikey_bintray} -PdryRun=false -------------------------------------------------------------------------------- /android/hummer-component/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /android/hummer-component/gradle.properties: -------------------------------------------------------------------------------- 1 | ARTIFACT_ID=hummer-component 2 | -------------------------------------------------------------------------------- /android/hummer-component/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /android/hummer-component/src/main/java/com/didi/hummer/component/input/NJInputType.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.component.input; 2 | 3 | 4 | import androidx.annotation.StringDef; 5 | 6 | /** 7 | * @author: linjizong 8 | * @date: 2019/3/28 9 | * @desc: 10 | */ 11 | @StringDef 12 | public @interface NJInputType { 13 | String DEFAULT = "default"; 14 | String NUMBER = "number"; 15 | String TEL = "tel"; 16 | String EMAIL = "email"; 17 | String PASSWORD = "password"; 18 | } 19 | -------------------------------------------------------------------------------- /android/hummer-component/src/main/java/com/didi/hummer/component/input/NJReturnKeyType.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.component.input; 2 | 3 | 4 | import androidx.annotation.StringDef; 5 | 6 | /** 7 | * @author: linjizong 8 | * @date: 2019/3/28 9 | * @desc: 10 | */ 11 | @StringDef 12 | public @interface NJReturnKeyType { 13 | String DONE = "done"; 14 | String GO = "go"; 15 | String NEXT = "next"; 16 | String SEARCH = "search"; 17 | String SEND = "send"; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /android/hummer-component/src/main/java/com/didi/hummer/component/input/NJTextAlign.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.component.input; 2 | 3 | 4 | import androidx.annotation.StringDef; 5 | 6 | /** 7 | * @author: linjizong 8 | * @date: 2019/3/28 9 | * @desc: 10 | */ 11 | @StringDef 12 | public @interface NJTextAlign { 13 | String LEFT = "left"; 14 | String CENTER = "center"; 15 | String RIGHT = "right"; 16 | } 17 | -------------------------------------------------------------------------------- /android/hummer-component/src/main/java/com/didi/hummer/component/refresh/LoadMoreState.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.component.refresh; 2 | 3 | 4 | import androidx.annotation.IntDef; 5 | 6 | /** 7 | * Created by XiaoFeng on 2020/10/10. 8 | */ 9 | @IntDef 10 | public @interface LoadMoreState { 11 | /** 12 | * 初始状态/结束加载 13 | */ 14 | int IDLE = 0; 15 | /** 16 | * 正在加载 17 | */ 18 | int LOADING = 1; 19 | /** 20 | * 无更多数据 21 | */ 22 | int NO_MORE_DATA = 2; 23 | } 24 | -------------------------------------------------------------------------------- /android/hummer-component/src/main/java/com/didi/hummer/component/refresh/PullRefreshState.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.component.refresh; 2 | 3 | 4 | import androidx.annotation.IntDef; 5 | 6 | /** 7 | * Created by XiaoFeng on 2020/10/10. 8 | */ 9 | @IntDef 10 | public @interface PullRefreshState { 11 | /** 12 | * 初始状态/结束刷新 13 | */ 14 | int IDLE = 0; 15 | /** 16 | * 开始下拉 17 | */ 18 | int START_PULL_DOWN = 1; 19 | /** 20 | * 正在刷新 21 | */ 22 | int REFRESHING = 2; 23 | } 24 | -------------------------------------------------------------------------------- /android/hummer-component/src/main/java/com/didi/hummer/component/scroller/OnScrollToBottomListener.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.component.scroller; 2 | 3 | /** 4 | * Created by XiaoFeng on 2019-12-25. 5 | */ 6 | public interface OnScrollToBottomListener { 7 | 8 | void onScrollToBottom(); 9 | } 10 | -------------------------------------------------------------------------------- /android/hummer-component/src/main/java/com/didi/hummer/component/scroller/OnScrollToTopListener.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.component.scroller; 2 | 3 | /** 4 | * Created by XiaoFeng on 2019-12-25. 5 | */ 6 | public interface OnScrollToTopListener { 7 | 8 | void onScrollToTop(); 9 | } 10 | -------------------------------------------------------------------------------- /android/hummer-component/src/main/java/com/didi/hummer/component/text/OnRichTextGenerateListener.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.component.text; 2 | 3 | /** 4 | * 富文本解析监听器 5 | * 6 | * Created by XiaoFeng on 2020-02-09. 7 | */ 8 | public interface OnRichTextGenerateListener { 9 | 10 | /** 11 | * 生成文本回调(由于有远程图片,这个回调可能会回调多次,前一次的普通文字,后一次是远程图片下载完后的文字) 12 | * 13 | * @param text 14 | */ 15 | void onGenerated(CharSequence text); 16 | } 17 | -------------------------------------------------------------------------------- /android/hummer-component/src/main/res/drawable/bg_loading_dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /android/hummer-component/src/main/res/drawable/ic_loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/didi/Hummer/4b720e2319343321783ecbc664d946f3aa46ae79/android/hummer-component/src/main/res/drawable/ic_loading.png -------------------------------------------------------------------------------- /android/hummer-component/src/main/res/drawable/loading_anim.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /android/hummer-component/src/main/res/layout/horizontal_scroll_view.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /android/hummer-component/src/main/res/layout/recycler_view.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /android/hummer-component/src/main/res/layout/scroll_view.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /android/hummer-component/src/main/res/layout/viewpager_empty_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /android/hummer-component/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /android/hummer-component/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /android/hummer-component/upload.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | echo -n "please enter bintray userid ->" 3 | read userid_bintray 4 | echo -n "please enter bintray apikey ->" 5 | read apikey_bintray 6 | ../gradlew clean build bintrayUpload -PbintrayUser=${userid_bintray} -PbintrayKey=${apikey_bintray} -PdryRun=false -------------------------------------------------------------------------------- /android/hummer-core/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /src/main/jni/jsc/JavaScriptCore/libs 3 | /src/main/jni/napi/napi 4 | -------------------------------------------------------------------------------- /android/hummer-core/build_jsc.gradle: -------------------------------------------------------------------------------- 1 | android { 2 | 3 | defaultConfig { 4 | externalNativeBuild { 5 | cmake { 6 | arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=c++_shared' 7 | } 8 | } 9 | } 10 | 11 | sourceSets { 12 | main { 13 | jniLibs.srcDirs = ['src/main/jni/jsc/JavaScriptCore/libs'] 14 | } 15 | } 16 | 17 | externalNativeBuild { 18 | cmake { 19 | path "src/main/jni/jsc/CMakeLists.txt" 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /android/hummer-core/gradle.properties: -------------------------------------------------------------------------------- 1 | ARTIFACT_ID=hummer-core -------------------------------------------------------------------------------- /android/hummer-core/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/hummer-core/src/main/java/com/didi/hummer/core/engine/JSCallback.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.core.engine; 2 | 3 | import com.didi.hummer.core.engine.base.ICallback; 4 | 5 | /** 6 | * Created by XiaoFeng on 2019-11-01. 7 | */ 8 | public interface JSCallback extends JSValue, ICallback { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /android/hummer-core/src/main/java/com/didi/hummer/core/engine/JSValue.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.core.engine; 2 | 3 | import com.didi.hummer.core.engine.base.IObjectOperator; 4 | import com.didi.hummer.core.engine.base.IValueOperator; 5 | import com.didi.hummer.core.engine.base.JSIdentify; 6 | import com.didi.hummer.core.engine.base.JSReleasable; 7 | 8 | /** 9 | * Created by XiaoFeng on 2019-11-01. 10 | */ 11 | public interface JSValue extends IValueOperator, IObjectOperator, JSReleasable, JSIdentify { 12 | 13 | JSContext getJSContext(); 14 | 15 | boolean isValid(); 16 | } 17 | -------------------------------------------------------------------------------- /android/hummer-core/src/main/java/com/didi/hummer/core/engine/base/ICallback.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.core.engine.base; 2 | 3 | /** 4 | * JSValue相关的回调接口类 5 | * 6 | * Created by XiaoFeng on 2019-09-25. 7 | */ 8 | public interface ICallback { 9 | 10 | Object call(Object... params); 11 | } 12 | -------------------------------------------------------------------------------- /android/hummer-core/src/main/java/com/didi/hummer/core/engine/base/IRecycler.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.core.engine.base; 2 | 3 | /** 4 | * Created by XiaoFeng on 2021/8/4. 5 | */ 6 | public interface IRecycler { 7 | void onRecycle(long objId); 8 | } 9 | -------------------------------------------------------------------------------- /android/hummer-core/src/main/java/com/didi/hummer/core/engine/base/JSIdentify.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.core.engine.base; 2 | 3 | /** 4 | * Created by XiaoFeng on 2019-11-01. 5 | */ 6 | public interface JSIdentify { 7 | 8 | long getIdentify(); 9 | } 10 | -------------------------------------------------------------------------------- /android/hummer-core/src/main/java/com/didi/hummer/core/engine/base/JSReleasable.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.core.engine.base; 2 | 3 | /** 4 | * Created by XiaoFeng on 2019-11-01. 5 | */ 6 | public interface JSReleasable { 7 | 8 | void release(); 9 | } 10 | -------------------------------------------------------------------------------- /android/hummer-core/src/main/java/com/didi/hummer/core/exception/ExceptionCallback.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.core.exception; 2 | 3 | /** 4 | * Created by XiaoFeng on 2019-09-26. 5 | */ 6 | public interface ExceptionCallback { 7 | 8 | void onException(Exception e); 9 | } 10 | -------------------------------------------------------------------------------- /android/hummer-core/src/main/jni/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # For more information about using CMake with Android Studio, read the 2 | # documentation: https://d.android.com/studio/projects/add-native-code.html 3 | 4 | # Sets the minimum version of CMake required to build the native library. 5 | 6 | cmake_minimum_required(VERSION 3.4.1) 7 | 8 | ADD_SUBDIRECTORY(jsc) 9 | ADD_SUBDIRECTORY(qjs) 10 | ADD_SUBDIRECTORY(hermes) 11 | ADD_SUBDIRECTORY(napi) -------------------------------------------------------------------------------- /android/hummer-core/src/main/jni/hermes/hummer/HummerRecycler.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "HummerJNI.h" 3 | #include "HummerRecycler.h" 4 | 5 | extern "C" 6 | JNIEXPORT void JNICALL 7 | Java_com_didi_hummer_core_engine_jsc_jni_HummerRecycler_init(JNIEnv *env, jobject thiz, jlong js_context) { 8 | 9 | } 10 | 11 | extern "C" 12 | JNIEXPORT void JNICALL 13 | Java_com_didi_hummer_core_engine_jsc_jni_HummerRecycler_release(JNIEnv *env, jobject thiz, jlong js_context) { 14 | 15 | } -------------------------------------------------------------------------------- /android/hummer-core/src/main/jni/hermes/hummer/HummerRecycler.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by XiaoFeng on 2020/6/17. 3 | // 4 | 5 | #ifndef NATIVE_JS_ANDROID_HUMMERRECYCLER_H 6 | #define NATIVE_JS_ANDROID_HUMMERRECYCLER_H 7 | 8 | class HummerRecycler { 9 | public: 10 | }; 11 | 12 | #endif //NATIVE_JS_ANDROID_HUMMERRECYCLER_H 13 | -------------------------------------------------------------------------------- /android/hummer-core/src/main/jni/hermes/hummer/JSException.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by XiaoFeng on 2020-08-21. 3 | // 4 | 5 | #ifndef NATIVE_JS_ANDROID_JSEXCEPTION_H 6 | #define NATIVE_JS_ANDROID_JSEXCEPTION_H 7 | 8 | #include 9 | #include 10 | #include 11 | #include "HummerJNI.h" 12 | #include "TypeConvertor.h" 13 | 14 | using namespace facebook::hermes; 15 | using namespace facebook::jsi; 16 | 17 | extern "C" 18 | void reportException(std::shared_ptr runtime, const char* exception); 19 | 20 | #endif //NATIVE_JS_ANDROID_JSEXCEPTION_H -------------------------------------------------------------------------------- /android/hummer-core/src/main/jni/hermes/hummer/TypeConvertor.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by XiaoFeng on 2020-08-21. 3 | // 4 | 5 | #ifndef NATIVE_JS_ANDROID_TYPECONVERTOR_H 6 | #define NATIVE_JS_ANDROID_TYPECONVERTOR_H 7 | 8 | 9 | #include 10 | #include "HummerJNI.h" 11 | #include 12 | #include 13 | #include 14 | #include "JSException.h" 15 | #include "HermesCache.h" 16 | 17 | using namespace facebook::hermes; 18 | using namespace facebook::jsi; 19 | 20 | class TypeConvertor { 21 | }; 22 | 23 | 24 | #endif //NATIVE_JS_ANDROID_TYPECONVERTOR_H 25 | -------------------------------------------------------------------------------- /android/hummer-core/src/main/jni/jsc/hummer/HummerRecycler.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "HummerJNI.h" 3 | #include "HummerRecycler.h" 4 | 5 | extern "C" 6 | JNIEXPORT void JNICALL 7 | Java_com_didi_hummer_core_engine_jsc_jni_HummerRecycler_init(JNIEnv *env, jobject thiz, jlong js_context) { 8 | 9 | } 10 | 11 | extern "C" 12 | JNIEXPORT void JNICALL 13 | Java_com_didi_hummer_core_engine_jsc_jni_HummerRecycler_release(JNIEnv *env, jobject thiz, jlong js_context) { 14 | 15 | } -------------------------------------------------------------------------------- /android/hummer-core/src/main/jni/jsc/hummer/HummerRecycler.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by XiaoFeng on 2020/6/17. 3 | // 4 | 5 | #ifndef NATIVE_JS_ANDROID_HUMMERRECYCLER_H 6 | #define NATIVE_JS_ANDROID_HUMMERRECYCLER_H 7 | 8 | class HummerRecycler { 9 | public: 10 | }; 11 | 12 | #endif //NATIVE_JS_ANDROID_HUMMERRECYCLER_H 13 | -------------------------------------------------------------------------------- /android/hummer-core/src/main/jni/jsc/hummer/JSException.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by XiaoFeng on 2019-09-26. 3 | // 4 | 5 | #ifndef NATIVE_JS_ANDROID_JSEXCEPTION_H 6 | #define NATIVE_JS_ANDROID_JSEXCEPTION_H 7 | 8 | #include 9 | #include "../JavaScriptCore/include/JavaScript.h" 10 | #include "HummerJNI.h" 11 | 12 | extern "C" 13 | void reportException(JSContextRef jsContext, JSValueRef exception); 14 | 15 | #endif //NATIVE_JS_ANDROID_JSEXCEPTION_H -------------------------------------------------------------------------------- /android/hummer-core/src/main/jni/napi/hummer/JSException.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by XiaoFeng on 2021/6/22. 3 | // 4 | 5 | #ifndef ANDROID_JSEXCEPTION_H 6 | #define ANDROID_JSEXCEPTION_H 7 | 8 | #include 9 | 10 | extern "C" 11 | void reportExceptionIfNeed(NAPIEnv globalEnv); 12 | 13 | #endif //ANDROID_JSEXCEPTION_H -------------------------------------------------------------------------------- /android/hummer-core/src/main/jni/napi/hummer/JSRecycler.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by XiaoFeng on 2021/6/29. 3 | // 4 | 5 | #ifndef ANDROID_JSRECYCLER_H 6 | #define ANDROID_JSRECYCLER_H 7 | 8 | #include 9 | 10 | class JSRecycler { 11 | public: 12 | static void registerClass(NAPIEnv env); 13 | }; 14 | 15 | 16 | #endif //ANDROID_JSRECYCLER_H 17 | -------------------------------------------------------------------------------- /android/hummer-core/src/main/jni/qjs/hummer/HummerClassRegister.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by XiaoFeng on 2020/6/17. 3 | // 4 | 5 | #ifndef NATIVE_JS_ANDROID_HUMMERCLASSREGISTER_H 6 | #define NATIVE_JS_ANDROID_HUMMERCLASSREGISTER_H 7 | 8 | #include 9 | 10 | class HummerClassRegister { 11 | public: 12 | static void init(JSRuntime *rt, JSContext *ctx); 13 | }; 14 | 15 | 16 | #endif //NATIVE_JS_ANDROID_HUMMERCLASSREGISTER_H 17 | -------------------------------------------------------------------------------- /android/hummer-core/src/main/jni/qjs/hummer/HummerRecycler.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by XiaoFeng on 2020/6/17. 3 | // 4 | 5 | #ifndef NATIVE_JS_ANDROID_HUMMERRECYCLER_H 6 | #define NATIVE_JS_ANDROID_HUMMERRECYCLER_H 7 | 8 | class HummerRecycler { 9 | public: 10 | static void recycle(long ctxId, int64_t objId); 11 | }; 12 | 13 | #endif //NATIVE_JS_ANDROID_HUMMERRECYCLER_H 14 | -------------------------------------------------------------------------------- /android/hummer-core/src/main/jni/qjs/hummer/JSException.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by XiaoFeng on 2019-09-26. 3 | // 4 | 5 | #ifndef NATIVE_JS_ANDROID_JSEXCEPTION_H 6 | #define NATIVE_JS_ANDROID_JSEXCEPTION_H 7 | 8 | #include 9 | #include 10 | #include "HummerJNI.h" 11 | #include "TypeConvertor.h" 12 | 13 | extern "C" 14 | void reportExceptionIfNeed(JSContext *context); 15 | 16 | #endif //NATIVE_JS_ANDROID_JSEXCEPTION_H -------------------------------------------------------------------------------- /android/hummer-core/src/main/jni/qjs/hummer/PromiseProcessor.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by XiaoFeng on 2020-02-19. 3 | // 4 | 5 | #include "PromiseProcessor.h" 6 | 7 | void processJsAsyncTasksLoop(JSContext *ctx) { 8 | JSContext *ctx1; 9 | int err; 10 | 11 | /* execute the pending jobs */ 12 | for(;;) { 13 | err = JS_ExecutePendingJob(JS_GetRuntime(ctx), &ctx1); 14 | if (err <= 0) { 15 | break; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /android/hummer-core/src/main/jni/qjs/hummer/PromiseProcessor.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by XiaoFeng on 2020-02-19. 3 | // 4 | 5 | #ifndef NATIVE_JS_ANDROID_PROMISEPROCESSOR_H 6 | #define NATIVE_JS_ANDROID_PROMISEPROCESSOR_H 7 | 8 | 9 | #include 10 | 11 | // 处理Promise等异步任务的消息队列 12 | void processJsAsyncTasksLoop(JSContext *context); 13 | 14 | 15 | #endif //NATIVE_JS_ANDROID_PROMISEPROCESSOR_H 16 | -------------------------------------------------------------------------------- /android/hummer-core/src/main/jni/qjs/hummer/TypeConvertor.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by maxiee on 2019-08-05. 3 | // 4 | 5 | #ifndef NATIVE_JS_ANDROID_TYPECONVERTOR_H 6 | #define NATIVE_JS_ANDROID_TYPECONVERTOR_H 7 | 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | 14 | class TypeConvertor { 15 | public: 16 | static jstring JSString2JavaString(JSContext* ctx, JSValue value); 17 | }; 18 | 19 | 20 | #endif //NATIVE_JS_ANDROID_TYPECONVERTOR_H 21 | -------------------------------------------------------------------------------- /android/hummer-core/upload.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | echo -n "please enter bintray userid ->" 3 | read userid_bintray 4 | echo -n "please enter bintray apikey ->" 5 | read apikey_bintray 6 | ../gradlew clean build bintrayUpload -PbintrayUser=${userid_bintray} -PbintrayKey=${apikey_bintray} -PdryRun=false -------------------------------------------------------------------------------- /android/hummer-demo-app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /android/hummer-demo-app/src/main/assets/fonts/Barlow_Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/didi/Hummer/4b720e2319343321783ecbc664d946f3aa46ae79/android/hummer-demo-app/src/main/assets/fonts/Barlow_Medium.ttf -------------------------------------------------------------------------------- /android/hummer-demo-app/src/main/assets/fonts/SourceSansPro-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/didi/Hummer/4b720e2319343321783ecbc664d946f3aa46ae79/android/hummer-demo-app/src/main/assets/fonts/SourceSansPro-Bold.ttf -------------------------------------------------------------------------------- /android/hummer-demo-app/src/main/assets/fonts/SourceSansPro-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/didi/Hummer/4b720e2319343321783ecbc664d946f3aa46ae79/android/hummer-demo-app/src/main/assets/fonts/SourceSansPro-BoldItalic.ttf -------------------------------------------------------------------------------- /android/hummer-demo-app/src/main/assets/fonts/SourceSansPro-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/didi/Hummer/4b720e2319343321783ecbc664d946f3aa46ae79/android/hummer-demo-app/src/main/assets/fonts/SourceSansPro-Italic.ttf -------------------------------------------------------------------------------- /android/hummer-demo-app/src/main/assets/fonts/SourceSansPro-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/didi/Hummer/4b720e2319343321783ecbc664d946f3aa46ae79/android/hummer-demo-app/src/main/assets/fonts/SourceSansPro-Regular.ttf -------------------------------------------------------------------------------- /android/hummer-demo-app/src/main/java/com/didi/hummer/demo/Constant.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.demo; 2 | 3 | /** 4 | * Created by XiaoFeng on 2019/4/22. 5 | */ 6 | public class Constant { 7 | 8 | public static final String HOST = "http://" + BuildConfig.MOCK_HOST + ":8000/"; 9 | } 10 | -------------------------------------------------------------------------------- /android/hummer-demo-app/src/main/java/com/didi/hummer/demo/HummerDelegatePageActivity.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.demo; 2 | 3 | import com.didi.hummer.adapter.navigator.NavPage; 4 | import com.didi.hummer.delegate.HummerDelegateActivity; 5 | import com.didi.hummer.delegate.IHummerDelegagte; 6 | 7 | /** 8 | * 使用代理类的单个页面 9 | */ 10 | public class HummerDelegatePageActivity extends HummerDelegateActivity { 11 | @Override 12 | protected IHummerDelegagte createHummerDelegate(NavPage page) { 13 | return new HummerDelegateImpl(this, page); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/hummer-demo-app/src/main/java/com/didi/hummer/demo/HummerDelegatePageFragment.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.demo; 2 | 3 | import com.didi.hummer.adapter.navigator.NavPage; 4 | import com.didi.hummer.delegate.HummerDelegateFragment; 5 | import com.didi.hummer.delegate.IHummerDelegagte; 6 | 7 | /** 8 | * 使用代理类的单个页面 9 | */ 10 | public class HummerDelegatePageFragment extends HummerDelegateFragment { 11 | @Override 12 | protected IHummerDelegagte createHummerDelegate(NavPage page) { 13 | return new HummerDelegateImpl(this, page); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/hummer-demo-app/src/main/res/drawable-xxhdpi/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/didi/Hummer/4b720e2319343321783ecbc664d946f3aa46ae79/android/hummer-demo-app/src/main/res/drawable-xxhdpi/loading.gif -------------------------------------------------------------------------------- /android/hummer-demo-app/src/main/res/drawable-xxhdpi/njimage_demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/didi/Hummer/4b720e2319343321783ecbc664d946f3aa46ae79/android/hummer-demo-app/src/main/res/drawable-xxhdpi/njimage_demo.png -------------------------------------------------------------------------------- /android/hummer-demo-app/src/main/res/layout/activity_hummer_single_page_fragment.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | -------------------------------------------------------------------------------- /android/hummer-demo-app/src/main/res/menu/setting_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | 10 | -------------------------------------------------------------------------------- /android/hummer-demo-app/src/main/res/mipmap-hdpi/ic_hummer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/didi/Hummer/4b720e2319343321783ecbc664d946f3aa46ae79/android/hummer-demo-app/src/main/res/mipmap-hdpi/ic_hummer.png -------------------------------------------------------------------------------- /android/hummer-demo-app/src/main/res/mipmap-mdpi/ic_hummer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/didi/Hummer/4b720e2319343321783ecbc664d946f3aa46ae79/android/hummer-demo-app/src/main/res/mipmap-mdpi/ic_hummer.png -------------------------------------------------------------------------------- /android/hummer-demo-app/src/main/res/mipmap-xhdpi/ic_hummer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/didi/Hummer/4b720e2319343321783ecbc664d946f3aa46ae79/android/hummer-demo-app/src/main/res/mipmap-xhdpi/ic_hummer.png -------------------------------------------------------------------------------- /android/hummer-demo-app/src/main/res/mipmap-xxhdpi/ic_hummer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/didi/Hummer/4b720e2319343321783ecbc664d946f3aa46ae79/android/hummer-demo-app/src/main/res/mipmap-xxhdpi/ic_hummer.png -------------------------------------------------------------------------------- /android/hummer-demo-app/src/main/res/mipmap-xxxhdpi/ic_hummer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/didi/Hummer/4b720e2319343321783ecbc664d946f3aa46ae79/android/hummer-demo-app/src/main/res/mipmap-xxxhdpi/ic_hummer.png -------------------------------------------------------------------------------- /android/hummer-demo-app/src/main/res/values-en/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | HummerDemo 4 | -------------------------------------------------------------------------------- /android/hummer-demo-app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #008577 4 | #00574B 5 | #D81B60 6 | 7 | -------------------------------------------------------------------------------- /android/hummer-demo-app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | HummerDemo 4 | 5 | -------------------------------------------------------------------------------- /android/hummer-demo-app/src/main/res/xml/network_security_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /android/hummer-dev-tools/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /android/hummer-dev-tools/gradle.properties: -------------------------------------------------------------------------------- 1 | ARTIFACT_ID=hummer-dev-tools 2 | VERSION=0.4.9 3 | -------------------------------------------------------------------------------- /android/hummer-dev-tools/src/main/java/com/didi/hummer/devtools/qrcode/CachesKey.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.devtools.qrcode; 2 | 3 | /** 4 | * didi Create on 2023/4/25 . 5 | *

6 | * Copyright (c) 2023/4/25 by didiglobal.com. 7 | * 8 | * @author zhangjun 9 | * @version 1.0 10 | * @Date 2023/4/25 4:37 下午 11 | * @Description 用一句话说明文件功能 12 | */ 13 | 14 | public class CachesKey { 15 | 16 | public static final String QRCODE_HISTORY_HUMMER = "QRCODE_HISTORY_HUMMER"; 17 | } 18 | -------------------------------------------------------------------------------- /android/hummer-dev-tools/src/main/res/color/hummer_debug_tab_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /android/hummer-dev-tools/src/main/res/drawable-xxhdpi/icon_close_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/didi/Hummer/4b720e2319343321783ecbc664d946f3aa46ae79/android/hummer-dev-tools/src/main/res/drawable-xxhdpi/icon_close_big.png -------------------------------------------------------------------------------- /android/hummer-dev-tools/src/main/res/drawable-xxhdpi/icon_web_qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/didi/Hummer/4b720e2319343321783ecbc664d946f3aa46ae79/android/hummer-dev-tools/src/main/res/drawable-xxhdpi/icon_web_qrcode.png -------------------------------------------------------------------------------- /android/hummer-dev-tools/src/main/res/drawable-xxxhdpi/hummer_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/didi/Hummer/4b720e2319343321783ecbc664d946f3aa46ae79/android/hummer-dev-tools/src/main/res/drawable-xxxhdpi/hummer_logo.png -------------------------------------------------------------------------------- /android/hummer-dev-tools/src/main/res/drawable/btn_clear_console_log_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/hummer-dev-tools/src/main/res/drawable/btn_dev_tools_entrance_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/hummer-dev-tools/src/main/res/drawable/btn_dev_tools_js_engine_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/hummer-dev-tools/src/main/res/drawable/btn_refresh_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/hummer-dev-tools/src/main/res/drawable/dk_divider.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /android/hummer-dev-tools/src/main/res/layout/layout_refresh_btn.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /android/hummer-dev-tools/src/main/res/values-en/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 请进行授权才可以使用该功能 3 | 4 | -------------------------------------------------------------------------------- /android/hummer-dev-tools/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #90FFFFFF 5 | #333333 6 | #337CC4 7 | #60000000 8 | #000000 9 | #ffffffff 10 | #ffe5e5e5 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /android/hummer-dev-tools/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 请进行授权才可以使用该功能 3 | 4 | -------------------------------------------------------------------------------- /android/hummer-dev-tools/upload.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | echo -n "please enter bintray userid ->" 3 | read userid_bintray 4 | echo -n "please enter bintray apikey ->" 5 | read apikey_bintray 6 | ../gradlew clean build bintrayUpload -PbintrayUser=${userid_bintray} -PbintrayKey=${apikey_bintray} -PdryRun=false -------------------------------------------------------------------------------- /android/hummer-sdk/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /android/hummer-sdk/gradle.properties: -------------------------------------------------------------------------------- 1 | ARTIFACT_ID=hummer-sdk -------------------------------------------------------------------------------- /android/hummer-sdk/src/main/assets/res_guard_whitelist.txt: -------------------------------------------------------------------------------- 1 | android.R.dimen.status_bar_height 2 | android.R.dimen.navigation_bar_height -------------------------------------------------------------------------------- /android/hummer-sdk/src/main/java/com/didi/hummer/adapter/http/HttpCallback.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.adapter.http; 2 | 3 | /** 4 | * 网络请求回调(主线程中使用) 5 | * 6 | * Created by XiaoFeng on 2019-12-27. 7 | */ 8 | public interface HttpCallback { 9 | 10 | void onResult(HttpResponse response); 11 | } 12 | -------------------------------------------------------------------------------- /android/hummer-sdk/src/main/java/com/didi/hummer/adapter/imageloader/DrawableCallback.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.adapter.imageloader; 2 | 3 | import android.graphics.drawable.Drawable; 4 | 5 | /** 6 | * Drawable加载接口类 7 | * 8 | * Created by XiaoFeng on 2020-02-07. 9 | */ 10 | public interface DrawableCallback { 11 | 12 | void onDrawableLoaded(Drawable drawable); 13 | } 14 | -------------------------------------------------------------------------------- /android/hummer-sdk/src/main/java/com/didi/hummer/adapter/imageloader/ImageSizeCallback.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.adapter.imageloader; 2 | 3 | /** 4 | * Drawable加载接口类 5 | * 6 | * Created by XiaoFeng on 2020-02-07. 7 | */ 8 | public interface ImageSizeCallback { 9 | 10 | void onSizeReady(int width, int height); 11 | } 12 | -------------------------------------------------------------------------------- /android/hummer-sdk/src/main/java/com/didi/hummer/adapter/navigator/NavCallback.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.adapter.navigator; 2 | 3 | import java.util.Map; 4 | 5 | /** 6 | * Created by XiaoFeng on 2019-12-24. 7 | */ 8 | public interface NavCallback { 9 | 10 | void onResult(Map data); 11 | } 12 | -------------------------------------------------------------------------------- /android/hummer-sdk/src/main/java/com/didi/hummer/adapter/scriptloader/ScriptLoadCallback.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.adapter.scriptloader; 2 | 3 | /** 4 | * 脚本加载结果回调 5 | * 6 | * Created by XiaoFeng on 2021/2/16. 7 | */ 8 | public interface ScriptLoadCallback { 9 | 10 | void onScriptLoad(String script, int errCode, String errMsg); 11 | } 12 | -------------------------------------------------------------------------------- /android/hummer-sdk/src/main/java/com/didi/hummer/context/HummerError.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.context; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * 执行JS之后返回的错误信息 7 | * 8 | * Created by XiaoFeng on 2021/4/6. 9 | */ 10 | public class HummerError implements Serializable { 11 | 12 | public int errCode; 13 | public String errMsg; 14 | 15 | public HummerError(int errCode, String errMsg) { 16 | this.errCode = errCode; 17 | this.errMsg = errMsg; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /android/hummer-sdk/src/main/java/com/didi/hummer/context/HummerModuleRegister.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.context; 2 | 3 | /** 4 | * didi Create on 2023/3/15 . 5 | *

6 | * Copyright (c) 2023/3/15 by didiglobal.com. 7 | * 8 | * @author zhangjun 9 | * @version 1.0 10 | * @Date 2023/3/15 8:29 下午 11 | * @Description Hummer 模块注册器 12 | */ 13 | 14 | public interface HummerModuleRegister { 15 | 16 | String getModuleName(); 17 | 18 | void register(HummerContext hummerContext); 19 | } 20 | -------------------------------------------------------------------------------- /android/hummer-sdk/src/main/java/com/didi/hummer/context/HummerRegister.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.context; 2 | 3 | 4 | /** 5 | * didi Create on 2023/3/15 . 6 | *

7 | * Copyright (c) 2023/3/15 by didiglobal.com. 8 | * 9 | * @author zhangjun 10 | * @version 1.0 11 | * @Date 2023/3/15 4:59 下午 12 | * @Description 组件注册器, 注册Hummer导出组件 13 | */ 14 | 15 | public interface HummerRegister { 16 | 17 | void register(HummerContext hummerContext); 18 | } 19 | -------------------------------------------------------------------------------- /android/hummer-sdk/src/main/java/com/didi/hummer/debug/InvokerAnalyzerFactory.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.debug; 2 | 3 | /** 4 | * didi Create on 2023/3/7 . 5 | *

6 | * Copyright (c) 2023/3/7 by didiglobal.com. 7 | * 8 | * @author zhangjun 9 | * @version 1.0 10 | * @Date 2023/3/7 5:08 下午 11 | * @Description InvokerAnalyzer 工厂 12 | */ 13 | 14 | public interface InvokerAnalyzerFactory { 15 | 16 | InvokerAnalyzer create(); 17 | } 18 | -------------------------------------------------------------------------------- /android/hummer-sdk/src/main/java/com/didi/hummer/debug/plugin/IHermesDebugger.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.debug.plugin; 2 | 3 | /** 4 | * Created by XiaoFeng on 2020/9/7. 5 | */ 6 | public interface IHermesDebugger { 7 | 8 | void enableDebugging(long runtimeId, String jsSourcePath); 9 | 10 | void disableDebugging(long runtimeId); 11 | } 12 | -------------------------------------------------------------------------------- /android/hummer-sdk/src/main/java/com/didi/hummer/debug/plugin/IV8Debugger.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.debug.plugin; 2 | 3 | /** 4 | * Created by XiaoFeng on 2019-11-07. 5 | */ 6 | public interface IV8Debugger { 7 | 8 | void addScriptSource(String scriptId); 9 | 10 | void addScriptSource(String scriptId, String scriptSource); 11 | } 12 | -------------------------------------------------------------------------------- /android/hummer-sdk/src/main/java/com/didi/hummer/lifecycle/IFullLifeCycle.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.lifecycle; 2 | 3 | public interface IFullLifeCycle extends ILifeCycle { 4 | void onStart(); 5 | void onResume(); 6 | void onPause(); 7 | void onStop(); 8 | } 9 | -------------------------------------------------------------------------------- /android/hummer-sdk/src/main/java/com/didi/hummer/lifecycle/ILifeCycle.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.lifecycle; 2 | 3 | public interface ILifeCycle { 4 | void onCreate(); 5 | void onDestroy(); 6 | } 7 | -------------------------------------------------------------------------------- /android/hummer-sdk/src/main/java/com/didi/hummer/meta/ComponentInvokerIndex.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.meta; 2 | 3 | import java.util.Set; 4 | 5 | /** 6 | * Created by Xingjm on 2022-01-19. 7 | * Interface for generated indexes. 8 | */ 9 | @Deprecated 10 | public interface ComponentInvokerIndex { 11 | Set getInvokerSet(); 12 | ComponentJsCodeInfo getJsCodeInfo(); 13 | } 14 | -------------------------------------------------------------------------------- /android/hummer-sdk/src/main/java/com/didi/hummer/pool/ObjectPool.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.pool; 2 | 3 | public interface ObjectPool { 4 | 5 | void put(long objId, Object value); 6 | 7 | T get(long objId); 8 | 9 | T remove(long objId); 10 | 11 | } -------------------------------------------------------------------------------- /android/hummer-sdk/src/main/java/com/didi/hummer/render/component/view/Invoker.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.render.component.view; 2 | 3 | import com.didi.hummer.context.HummerContext; 4 | 5 | public interface Invoker { 6 | 7 | String getName(); 8 | 9 | Object onInvoke(HummerContext hummerContext, long objectID, String methodName, Object... params); 10 | } 11 | -------------------------------------------------------------------------------- /android/hummer-sdk/src/main/java/com/didi/hummer/render/event/IEventListener.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.render.event; 2 | 3 | import com.didi.hummer.core.engine.JSCallback; 4 | 5 | public interface IEventListener { 6 | 7 | void addEventListener(String eventName, JSCallback callback); 8 | 9 | void removeEventListener(String eventName, JSCallback callback); 10 | 11 | void clearEventListeners(String eventName); 12 | } 13 | -------------------------------------------------------------------------------- /android/hummer-sdk/src/main/java/com/didi/hummer/render/event/guesture/LongPressEvent.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.render.event.guesture; 2 | 3 | import com.didi.hummer.render.event.base.Event; 4 | 5 | import java.util.Map; 6 | 7 | /** 8 | * 长按事件 9 | */ 10 | public class LongPressEvent extends Event { 11 | 12 | private Map position; 13 | 14 | public void setPosition(Map point) { 15 | this.position = point; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /android/hummer-sdk/src/main/java/com/didi/hummer/render/event/guesture/PanEvent.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.render.event.guesture; 2 | 3 | import com.didi.hummer.render.event.base.Event; 4 | 5 | import java.util.HashMap; 6 | 7 | /** 8 | * 平移手势事件 9 | */ 10 | public class PanEvent extends Event { 11 | 12 | private HashMap translation; 13 | 14 | public void setTranslation(HashMap translation) { 15 | this.translation = translation; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /android/hummer-sdk/src/main/java/com/didi/hummer/render/event/guesture/PinchEvent.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.render.event.guesture; 2 | 3 | import com.didi.hummer.render.event.base.Event; 4 | 5 | /** 6 | * 捏合手势事件 7 | */ 8 | public class PinchEvent extends Event { 9 | 10 | private float scale; 11 | 12 | public void setScale(float scale) { 13 | this.scale = scale; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/hummer-sdk/src/main/java/com/didi/hummer/render/event/guesture/TapEvent.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.render.event.guesture; 2 | 3 | import com.didi.hummer.render.event.base.Event; 4 | 5 | import java.util.Map; 6 | 7 | /** 8 | * 单击事件 9 | */ 10 | public class TapEvent extends Event { 11 | 12 | private Map position; 13 | 14 | public void setPosition(Map point) { 15 | this.position = point; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /android/hummer-sdk/src/main/java/com/didi/hummer/render/event/guesture/TouchEvent.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.render.event.guesture; 2 | 3 | import com.didi.hummer.render.event.base.Event; 4 | 5 | import java.util.Map; 6 | 7 | /** 8 | * 触摸事件 9 | */ 10 | public class TouchEvent extends Event { 11 | 12 | private Map position; 13 | 14 | public void setPosition(Map point) { 15 | this.position = point; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /android/hummer-sdk/src/main/java/com/didi/hummer/render/event/view/SwitchEvent.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.render.event.view; 2 | 3 | import com.didi.hummer.render.event.base.Event; 4 | 5 | public class SwitchEvent extends Event { 6 | 7 | public static final String HM_EVENT_TYPE_SWITCH = "switch"; 8 | 9 | public void setState(boolean checked) { 10 | super.setState(checked ? 1 : 0); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /android/hummer-sdk/upload.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | echo -n "please enter bintray userid ->" 3 | read userid_bintray 4 | echo -n "please enter bintray apikey ->" 5 | read apikey_bintray 6 | ../gradlew clean build bintrayUpload -PbintrayUser=${userid_bintray} -PbintrayKey=${apikey_bintray} -PdryRun=false -------------------------------------------------------------------------------- /android/hummer/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /android/hummer/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply from: '../module.gradle' 3 | apply from: '../upload.gradle' 4 | 5 | android { 6 | 7 | buildTypes { 8 | release { 9 | minifyEnabled false 10 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 11 | } 12 | } 13 | } 14 | 15 | dependencies { 16 | 17 | api project(':hummer-component') 18 | } 19 | 20 | uploadArchives.dependsOn(':hummer-component:uploadArchives') 21 | -------------------------------------------------------------------------------- /android/hummer/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/didi/Hummer/4b720e2319343321783ecbc664d946f3aa46ae79/android/hummer/consumer-rules.pro -------------------------------------------------------------------------------- /android/hummer/gradle.properties: -------------------------------------------------------------------------------- 1 | ARTIFACT_ID=hummer -------------------------------------------------------------------------------- /android/hummer/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /android/hummer/src/main/java/com/didi/hummer/devtools/DevToolsFactory.java: -------------------------------------------------------------------------------- 1 | package com.didi.hummer.devtools; 2 | 3 | import com.didi.hummer.context.HummerContext; 4 | 5 | /** 6 | * didi Create on 2023/3/7 . 7 | *

8 | * Copyright (c) 2023/3/7 by didiglobal.com. 9 | * 10 | * @author zhangjun 11 | * @version 1.0 12 | * @Date 2023/3/7 11:03 上午 13 | * @Description HummerDevTools 构建工厂 14 | */ 15 | 16 | public interface DevToolsFactory { 17 | 18 | HummerDevTools create(HummerContext context, DevToolsConfig config); 19 | } 20 | -------------------------------------------------------------------------------- /android/hummer/src/main/res/layout/activity_hummer.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /android/hummer/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #008577 4 | #00574B 5 | #D81B60 6 | 7 | -------------------------------------------------------------------------------- /android/hummer/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /android/hummer/upload.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | echo -n "please enter bintray userid ->" 3 | read userid_bintray 4 | echo -n "please enter bintray apikey ->" 5 | read apikey_bintray 6 | ../gradlew clean build bintrayUpload -PbintrayUser=${userid_bintray} -PbintrayKey=${apikey_bintray} -PdryRun=false -------------------------------------------------------------------------------- /android/openTerminal.sh: -------------------------------------------------------------------------------- 1 | pwd 2 | ps |grep "startServer" |grep -v grep 3 | if [ $? -ne 0 ] 4 | then 5 | open -a Terminal "../startServer.sh" 6 | fi -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = "Hummer-Android" 2 | include ':hummer-demo-app', ':hummer-core', ':hummer-compiler', ':hummer-annotation', ':hummer-sdk', ':hummer-component', ':hummer', ':hummer-dev-tools' 3 | include ':hermes-debugger' 4 | -------------------------------------------------------------------------------- /android/startServer.sh: -------------------------------------------------------------------------------- 1 | echo "######## start hummer local server ########" 2 | 3 | work_path=$(dirname $0) 4 | server_dir=$work_path/../examples/hummer/unit-test 5 | cd $server_dir 6 | hummer dev 7 | -------------------------------------------------------------------------------- /android/upload.gradle: -------------------------------------------------------------------------------- 1 | if (project.publishArchivesType == '1') { 2 | apply from: '../upload_maven.gradle' 3 | } else if (project.publishArchivesType == '2') { 4 | apply from: '../upload_jcenter.gradle' 5 | } else if (project.publishArchivesType == '3') { 6 | apply from: '../upload_maven_central_aar.gradle' 7 | } -------------------------------------------------------------------------------- /android/upload.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | echo -n "please enter bintray userid ->" 3 | read userid_bintray 4 | echo -n "please enter bintray apikey ->" 5 | read apikey_bintray 6 | ./gradlew clean build bintrayUpload -PbintrayUser=${userid_bintray} -PbintrayKey=${apikey_bintray} -PdryRun=false -------------------------------------------------------------------------------- /android/upload_jcenter.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.novoda.bintray-release' 2 | 3 | publish { 4 | userOrg = 'hummer' 5 | repoName = 'Hummer' 6 | groupId = project.GROUP_ID 7 | artifactId = project.ARTIFACT_ID 8 | publishVersion = project.VERSION 9 | desc = '{library description}' 10 | website = '{github_url}' 11 | } -------------------------------------------------------------------------------- /examples/hummer/playground/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /node_modules 3 | /dist 4 | /dist/*.map 5 | /package-lock.json -------------------------------------------------------------------------------- /examples/hummer/playground/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // 使用 IntelliSense 了解相关属性。 3 | // 悬停以查看现有属性的描述。 4 | // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 5 | "configurations": [{ 6 | "name": "HummerDebugger", 7 | "type": "hummerdirect", 8 | "workspaceRoot": "${workspaceFolder}", 9 | "request": "attach", 10 | }] 11 | } -------------------------------------------------------------------------------- /examples/hummer/playground/README.md: -------------------------------------------------------------------------------- 1 | ### Hummer Playground Examples 2 | 原生组件示例工程 3 | -------------------------------------------------------------------------------- /examples/hummer/playground/hm.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | module.exports = { 3 | type: 'hummer', 4 | webpack: { 5 | entries: "src/**/index.ts", 6 | output: { 7 | path: path.resolve(__dirname, './dist'), 8 | filename: "[name].js" 9 | }, 10 | plugins: [] 11 | } 12 | } -------------------------------------------------------------------------------- /examples/hummer/playground/src/common/CommonColor.ts: -------------------------------------------------------------------------------- 1 | export const Color = { 2 | hm_linear_gradient: 'linear-gradient(90deg #15D0B4 #E2ED00)', 3 | hm_yellow: '#E2ED00', 4 | hm_green: '#15D0B4', 5 | hm_blue: '#4A90E2', 6 | hm_orange: '#F1CA19', 7 | hm_purple: '#8484FF', 8 | transparent: '#00000000', 9 | black: '#000000', 10 | white: '#FFFFFF', 11 | red: '#FF0000', 12 | green: '#00FF00', 13 | blue: '#0000FF', 14 | grey: '#808080', 15 | light_grey: '#CCCCCC', 16 | dark_grey: '#333333', 17 | transparent_grey: '#00000060', 18 | } -------------------------------------------------------------------------------- /examples/hummer/playground/src/global.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 用于描述拓展组件定义 3 | * 下面是一个定义示例 4 | * declare class Demo { 5 | * name: string; 6 | * sayName(): void; 7 | * } 8 | * 9 | * 使用如下: 10 | * 使用global.d.ts 声明的类 11 | * let demo = new Demo() 12 | * demo.sayName() 13 | */ 14 | declare module '*.png' 15 | declare module '*.jpeg' 16 | declare module '*.jpg' 17 | declare module '*.gif' 18 | -------------------------------------------------------------------------------- /examples/hummer/playground/src/res/hummer_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/didi/Hummer/4b720e2319343321783ecbc664d946f3aa46ae79/examples/hummer/playground/src/res/hummer_logo.png -------------------------------------------------------------------------------- /examples/hummer/playground/src/res/list_right_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/didi/Hummer/4b720e2319343321783ecbc664d946f3aa46ae79/examples/hummer/playground/src/res/list_right_arrow.png -------------------------------------------------------------------------------- /examples/hummer/playground/src/res/menu_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/didi/Hummer/4b720e2319343321783ecbc664d946f3aa46ae79/examples/hummer/playground/src/res/menu_icon.png -------------------------------------------------------------------------------- /examples/hummer/playground/src/res/navigator_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/didi/Hummer/4b720e2319343321783ecbc664d946f3aa46ae79/examples/hummer/playground/src/res/navigator_back.png -------------------------------------------------------------------------------- /examples/hummer/unit-test/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | node_modules/ 4 | dist/ 5 | package-lock.json -------------------------------------------------------------------------------- /examples/hummer/unit-test/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // 使用 IntelliSense 了解相关属性。 3 | // 悬停以查看现有属性的描述。 4 | // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 5 | "configurations": [{ 6 | "name": "HummerDebugger", 7 | "type": "hummerdirect", 8 | "workspaceRoot": "${workspaceFolder}", 9 | "request": "attach", 10 | "port": 8000 11 | }] 12 | } -------------------------------------------------------------------------------- /examples/hummer/unit-test/README.md: -------------------------------------------------------------------------------- 1 | ### Hummer Unit Test 2 | 原生 Hummer API 对应的单元测试用例项目 -------------------------------------------------------------------------------- /examples/hummer/unit-test/hm.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | module.exports = { 3 | type: 'hummer', 4 | webpack: { 5 | entries: "src/*.js", 6 | output: { 7 | path: path.resolve(__dirname, './dist'), 8 | filename: "[name].js" 9 | }, 10 | plugins: [] 11 | } 12 | } -------------------------------------------------------------------------------- /examples/hummer/unit-test/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hm_hello", 3 | "version": "1.0.0", 4 | "description": "Hummer Project", 5 | "scripts": { 6 | "build": "hummer build", 7 | "dev": "hummer dev", 8 | "debug": "npm run dev & hummer debug" 9 | }, 10 | "dependencies": { 11 | "@hummer/hummer-front": "^1.0.0", 12 | "@hummer/tenon-dev-tool": "^0.2.2" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/tenon-react/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | // ... 4 | "react-hooks" 5 | ], 6 | "rules": { 7 | // ... 8 | "react-hooks/rules-of-hooks": "error", // 检查 Hook 的规则 9 | "react-hooks/exhaustive-deps": "warn" // 检查 effect 的依赖 10 | } -------------------------------------------------------------------------------- /examples/tenon-react/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .history/ 3 | dump.rdb 4 | package-lock.json 5 | coverage/ 6 | .DS_Store 7 | .idea 8 | dist 9 | -------------------------------------------------------------------------------- /examples/tenon-react/hm.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | 3 | module.exports = { 4 | type: 'react', 5 | webpack: { 6 | entries: "src/*/entry.js", 7 | output: { 8 | path: path.resolve(__dirname, './dist'), 9 | filename: "[name].js" 10 | }, 11 | resolve: { 12 | alias: { 13 | "@common": path.join(__dirname, './src/common') 14 | } 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /examples/tenon-react/script/playground.js: -------------------------------------------------------------------------------- 1 | const http = require('http'); 2 | const serveHandler = require('serve-handler'); 3 | const open = require('open'); 4 | 5 | run(); 6 | function run(){ 7 | const server = http.createServer((request, response) => { 8 | return serveHandler(request, response); 9 | }) 10 | server.listen(5000, () => { 11 | console.log('Dev Server Running at http://localhost:5000'); 12 | open('http://localhost:5000/playground'); 13 | }) 14 | } 15 | -------------------------------------------------------------------------------- /examples/tenon-react/src/animation-basic/App.less: -------------------------------------------------------------------------------- 1 | @import "../common/assets/css/common.less"; 2 | 3 | .box { 4 | width: 1rem; 5 | height: 1rem; 6 | margin: 0.1rem; 7 | background-color: #fa9153; 8 | } 9 | .box-opacity-hide { 10 | opacity: 0; 11 | } -------------------------------------------------------------------------------- /examples/tenon-react/src/animation-basic/entry.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import App from "./App" 3 | import * as Tenon from "@hummer/tenon-react" 4 | 5 | import "./App.less" 6 | 7 | Tenon.render() -------------------------------------------------------------------------------- /examples/tenon-react/src/animation-keyframe/App.less: -------------------------------------------------------------------------------- 1 | @import "../common/assets/css/common.less"; 2 | 3 | .box { 4 | width: 1rem; 5 | height: 1rem; 6 | margin: 0.1rem; 7 | background-color: #fa9153; 8 | } -------------------------------------------------------------------------------- /examples/tenon-react/src/animation-keyframe/entry.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import App from "./App" 3 | import * as Tenon from "@hummer/tenon-react" 4 | 5 | import "./App.less" 6 | 7 | Tenon.render() -------------------------------------------------------------------------------- /examples/tenon-react/src/animation-steps/App.less: -------------------------------------------------------------------------------- 1 | @import "../common/assets/css/common.less"; 2 | 3 | .box { 4 | width: 1rem; 5 | height: 1rem; 6 | margin: 0.1rem; 7 | background-color: #fa9153; 8 | } -------------------------------------------------------------------------------- /examples/tenon-react/src/animation-steps/entry.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import App from "./App" 3 | import * as Tenon from "@hummer/tenon-react" 4 | 5 | import "./App.less" 6 | 7 | Tenon.render() -------------------------------------------------------------------------------- /examples/tenon-react/src/animation-transition/entry.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import App from "./App" 3 | import * as Tenon from "@hummer/tenon-react" 4 | 5 | import "./App.less" 6 | 7 | Tenon.render() -------------------------------------------------------------------------------- /examples/tenon-react/src/benchmark-scroller/App.css: -------------------------------------------------------------------------------- 1 | .cube-wrapper{ 2 | width: 100%; 3 | display: flex; 4 | margin-top: 10; 5 | padding: 10 0; 6 | background-color: #dcf5f1; 7 | } 8 | .cube-text{ 9 | width: 34; 10 | height: 34; 11 | margin: 0 12; 12 | background-color: #132266; 13 | text-align:center; 14 | } -------------------------------------------------------------------------------- /examples/tenon-react/src/benchmark-scroller/entry.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import App from "./App" 3 | import * as Tenon from "@hummer/tenon-react" 4 | 5 | import "./App.css" 6 | 7 | Tenon.render() -------------------------------------------------------------------------------- /examples/tenon-react/src/common/components/PageItem.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | 4 | function PageItem(props){ 5 | let {title, children} = props 6 | return ( 7 | 8 | 9 | {title} 10 | 11 | 12 | {children} 13 | 14 | 15 | ) 16 | } 17 | 18 | export default PageItem -------------------------------------------------------------------------------- /examples/tenon-react/src/component-button/App.less: -------------------------------------------------------------------------------- 1 | @import "../common/assets/css/common.less"; -------------------------------------------------------------------------------- /examples/tenon-react/src/component-button/entry.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import App from "./App" 3 | import * as Tenon from "@hummer/tenon-react" 4 | 5 | import "./App.less" 6 | 7 | Tenon.render() -------------------------------------------------------------------------------- /examples/tenon-react/src/component-image/App.less: -------------------------------------------------------------------------------- 1 | @import "../common/assets/css/common.less"; 2 | .image-item { 3 | width: 2rem; 4 | height: 2rem; 5 | background-color: red; 6 | } 7 | .box-container { 8 | display: flex; 9 | justify-content: center; 10 | } 11 | .border-item { 12 | width: 2rem; 13 | height: 2rem; 14 | border-radius: 50%; 15 | } -------------------------------------------------------------------------------- /examples/tenon-react/src/component-image/assets/headInfo.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/didi/Hummer/4b720e2319343321783ecbc664d946f3aa46ae79/examples/tenon-react/src/component-image/assets/headInfo.jpeg -------------------------------------------------------------------------------- /examples/tenon-react/src/component-image/entry.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import App from "./App" 3 | import * as Tenon from "@hummer/tenon-react" 4 | 5 | import "./App.less" 6 | 7 | Tenon.render() -------------------------------------------------------------------------------- /examples/tenon-react/src/component-input/App.less: -------------------------------------------------------------------------------- 1 | @import "../common/assets/css/common.less"; 2 | 3 | .input { 4 | width: 100%; 5 | background-color: #eeffee; 6 | height: 0.5rem; 7 | } 8 | .input-place { 9 | placeholder-color: blue; 10 | cursor-color: #eedeee; 11 | placeholder-font-size: 0.24rem; 12 | } -------------------------------------------------------------------------------- /examples/tenon-react/src/component-input/entry.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import App from "./App" 3 | import * as Tenon from "@hummer/tenon-react" 4 | 5 | import "./App.less" 6 | 7 | Tenon.render() -------------------------------------------------------------------------------- /examples/tenon-react/src/component-scroller/entry.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import App from "./App" 3 | import * as Tenon from "@hummer/tenon-react" 4 | 5 | import "./App.less" 6 | 7 | Tenon.render() -------------------------------------------------------------------------------- /examples/tenon-react/src/component-switch/App.less: -------------------------------------------------------------------------------- 1 | @import "../common/assets/css/common.less"; -------------------------------------------------------------------------------- /examples/tenon-react/src/component-switch/entry.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import App from "./App" 3 | import * as Tenon from "@hummer/tenon-react" 4 | 5 | import "./App.less" 6 | 7 | Tenon.render() -------------------------------------------------------------------------------- /examples/tenon-react/src/component-text/App.less: -------------------------------------------------------------------------------- 1 | @import "../common/assets/css/common.less"; 2 | .demo-box { 3 | margin-top: 0.2rem; 4 | width: 2rem; 5 | height: 2rem; 6 | background-color: #fa9153; 7 | } 8 | .border-box { 9 | border-radius: 0.1rem; 10 | border: 0.2rem solid blue; 11 | } 12 | .border-top-box{ 13 | border-top: 0.2rem solid #444444; 14 | } 15 | .background-box { 16 | background-image: url("https://dpubstatic.udache.com/static/dpubimg/RJ4ZZ_M5ie/WechatIMG24764.jpeg"); 17 | } -------------------------------------------------------------------------------- /examples/tenon-react/src/component-text/entry.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import App from "./App" 3 | import * as Tenon from "@hummer/tenon-react" 4 | 5 | import "./App.less" 6 | 7 | Tenon.render() -------------------------------------------------------------------------------- /examples/tenon-react/src/component-textarea/App.less: -------------------------------------------------------------------------------- 1 | @import "../common/assets/css/common.less"; 2 | .textarea { 3 | width: 100%; 4 | background-color: #eeffee; 5 | height: 0.5rem; 6 | } 7 | .textarea-place { 8 | placeholder-color: blue; 9 | cursor-color: #eedeee; 10 | placeholder-font-size: 0.24rem; 11 | } -------------------------------------------------------------------------------- /examples/tenon-react/src/component-textarea/entry.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import App from "./App" 3 | import * as Tenon from "@hummer/tenon-react" 4 | 5 | import "./App.less" 6 | 7 | Tenon.render() -------------------------------------------------------------------------------- /examples/tenon-react/src/component-view/App.less: -------------------------------------------------------------------------------- 1 | @import "../common/assets/css/common.less"; 2 | .demo-box { 3 | margin-top: 0.2rem; 4 | width: 2rem; 5 | height: 2rem; 6 | background-color: #fa9153; 7 | } 8 | .border-box { 9 | border-radius: 0.1rem; 10 | border: 0.2rem solid blue; 11 | } 12 | .border-top-box{ 13 | border-top: 0.2rem solid #444444; 14 | } 15 | .background-box { 16 | background-image: url("https://dpubstatic.udache.com/static/dpubimg/RJ4ZZ_M5ie/WechatIMG24764.jpeg"); 17 | } -------------------------------------------------------------------------------- /examples/tenon-react/src/component-view/entry.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import App from "./App" 3 | import * as Tenon from "@hummer/tenon-react" 4 | 5 | import "./App.less" 6 | 7 | Tenon.render() -------------------------------------------------------------------------------- /examples/tenon-react/src/ex-component-list/App.less: -------------------------------------------------------------------------------- 1 | @import "../common/assets/css/common.less"; 2 | .demo-box { 3 | margin-top: 0.2rem; 4 | width: 2rem; 5 | height: 2rem; 6 | background-color: #fa9153; 7 | } 8 | .border-box { 9 | border-radius: 0.1rem; 10 | border: 0.2rem solid blue; 11 | } 12 | .border-top-box{ 13 | border-top: 0.2rem solid #444444; 14 | } 15 | .background-box { 16 | background-image: url("https://dpubstatic.udache.com/static/dpubimg/RJ4ZZ_M5ie/WechatIMG24764.jpeg"); 17 | } -------------------------------------------------------------------------------- /examples/tenon-react/src/ex-component-list/components/list.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | 4 | {/* 5 | 9 | */} 10 | class List extends React.Component{ 11 | constructor(props){ 12 | super(props) 13 | } 14 | 15 | render(){ 16 | return ( 17 | 18 | 19 | 20 | ) 21 | } 22 | } 23 | 24 | 25 | export default List -------------------------------------------------------------------------------- /examples/tenon-react/src/ex-component-list/entry.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import App from "./App" 3 | import * as Tenon from "@hummer/tenon-react" 4 | 5 | import "./App.less" 6 | 7 | Tenon.render() -------------------------------------------------------------------------------- /examples/tenon-react/src/ex-component-popup/App.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import PageItem from '@common/components/PageItem'; 4 | import DemoItem from '@common/components/DemoItem'; 5 | 6 | function App() { 7 | return ( 8 | 9 | 10 | Component List 11 | 12 | 13 | ); 14 | } 15 | 16 | export default App; 17 | -------------------------------------------------------------------------------- /examples/tenon-react/src/ex-component-popup/App.less: -------------------------------------------------------------------------------- 1 | @import "../common/assets/css/common.less"; 2 | .demo-box { 3 | margin-top: 0.2rem; 4 | width: 2rem; 5 | height: 2rem; 6 | background-color: #fa9153; 7 | } 8 | .border-box { 9 | border-radius: 0.1rem; 10 | border: 0.2rem solid blue; 11 | } 12 | .border-top-box{ 13 | border-top: 0.2rem solid #444444; 14 | } 15 | .background-box { 16 | background-image: url("https://dpubstatic.udache.com/static/dpubimg/RJ4ZZ_M5ie/WechatIMG24764.jpeg"); 17 | } -------------------------------------------------------------------------------- /examples/tenon-react/src/ex-component-popup/entry.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import App from "./App" 3 | import * as Tenon from "@hummer/tenon-react" 4 | 5 | import "./App.less" 6 | 7 | Tenon.render() -------------------------------------------------------------------------------- /examples/tenon-react/src/ex-component-test/App.less: -------------------------------------------------------------------------------- 1 | @import "../common/assets/css/common.less"; 2 | 3 | // Simple View 4 | .simple-view{ 5 | color: red; 6 | } 7 | 8 | // Attr View 9 | .attr-view{ 10 | padding: 0.2rem; 11 | color: red; 12 | } 13 | 14 | 15 | // Safe View 16 | .view-container{ 17 | display: flex; 18 | justify-content: center; 19 | } 20 | .safe-view{ 21 | width: 80%; 22 | } 23 | .safe-view-content{ 24 | padding: .2rem; 25 | } -------------------------------------------------------------------------------- /examples/tenon-react/src/ex-component-test/entry.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import Tenon from "@hummer/tenon-react" 3 | 4 | import App from "./App" 5 | import "./App.less" 6 | 7 | import SimpleView from './native-components/simple-view' 8 | import AttrView from './native-components/attr-view' 9 | import EventView from './native-components/event-view' 10 | import SafeView from './native-components/safe-view' 11 | 12 | 13 | Tenon.register(AttrView) 14 | Tenon.register(SimpleView) 15 | Tenon.register(EventView) 16 | Tenon.register(SafeView) 17 | Tenon.render() -------------------------------------------------------------------------------- /examples/tenon-react/src/ex-component-viewpager/App.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import PageItem from '@common/components/PageItem'; 4 | import DemoItem from '@common/components/DemoItem'; 5 | 6 | function App() { 7 | return ( 8 | 9 | 10 | Component List 11 | 12 | 13 | ); 14 | } 15 | 16 | export default App; 17 | -------------------------------------------------------------------------------- /examples/tenon-react/src/ex-component-viewpager/App.less: -------------------------------------------------------------------------------- 1 | @import "../common/assets/css/common.less"; 2 | .demo-box { 3 | margin-top: 0.2rem; 4 | width: 2rem; 5 | height: 2rem; 6 | background-color: #fa9153; 7 | } 8 | .border-box { 9 | border-radius: 0.1rem; 10 | border: 0.2rem solid blue; 11 | } 12 | .border-top-box{ 13 | border-top: 0.2rem solid #444444; 14 | } 15 | .background-box { 16 | background-image: url("https://dpubstatic.udache.com/static/dpubimg/RJ4ZZ_M5ie/WechatIMG24764.jpeg"); 17 | } -------------------------------------------------------------------------------- /examples/tenon-react/src/ex-component-viewpager/entry.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import App from "./App" 3 | import * as Tenon from "@hummer/tenon-react" 4 | 5 | import "./App.less" 6 | 7 | Tenon.render() -------------------------------------------------------------------------------- /examples/tenon-react/src/grammar-style/entry.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import App from "./App" 3 | import * as Tenon from "@hummer/tenon-react" 4 | 5 | import "./App.less" 6 | 7 | Tenon.render() -------------------------------------------------------------------------------- /examples/tenon-react/src/grammar/App.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import PageItem from '@common/components/PageItem'; 4 | import DemoItem from '@common/components/DemoItem'; 5 | 6 | import CreateRefComponent from './components/CreateRefComponent'; 7 | 8 | function App() { 9 | return ( 10 | 11 | 12 | 13 | 14 | 15 | ); 16 | } 17 | 18 | export default App; 19 | -------------------------------------------------------------------------------- /examples/tenon-react/src/grammar/App.less: -------------------------------------------------------------------------------- 1 | @import "../common/assets/css/common.less"; 2 | .demo-box { 3 | margin-top: 0.2rem; 4 | width: 2rem; 5 | height: 2rem; 6 | background-color: #fa9153; 7 | } 8 | .border-box { 9 | border-radius: 0.1rem; 10 | border: 0.2rem solid blue; 11 | } 12 | .border-top-box{ 13 | border-top: 0.2rem solid #444444; 14 | } 15 | .background-box { 16 | background-image: url("https://dpubstatic.udache.com/static/dpubimg/RJ4ZZ_M5ie/WechatIMG24764.jpeg"); 17 | } -------------------------------------------------------------------------------- /examples/tenon-react/src/grammar/components/CreateRefComponent.jsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect } from 'react' 2 | 3 | /** 4 | * 使用 createRef 的测试用例 5 | */ 6 | function CreateRefComponent({initialCount}){ 7 | const ref = React.createRef(); 8 | 9 | useEffect(() => { 10 | ref.current.getRect((obj) => { 11 | console.log('Get Rect', obj) 12 | }) 13 | }, []) 14 | return ( 15 | 16 | Ref Get Rect 17 | 18 | ) 19 | } 20 | 21 | 22 | export default CreateRefComponent -------------------------------------------------------------------------------- /examples/tenon-react/src/grammar/entry.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import App from "./App" 3 | import * as Tenon from "@hummer/tenon-react" 4 | 5 | import "./App.less" 6 | 7 | Tenon.render() -------------------------------------------------------------------------------- /examples/tenon-react/src/hook-test/App.less: -------------------------------------------------------------------------------- 1 | @import "../common/assets/css/common.less"; 2 | .demo-box { 3 | margin-top: 0.2rem; 4 | width: 2rem; 5 | height: 2rem; 6 | background-color: #fa9153; 7 | } 8 | .border-box { 9 | border-radius: 0.1rem; 10 | border: 0.2rem solid blue; 11 | } 12 | .border-top-box{ 13 | border-top: 0.2rem solid #444444; 14 | } 15 | .background-box { 16 | background-image: url("https://dpubstatic.udache.com/static/dpubimg/RJ4ZZ_M5ie/WechatIMG24764.jpeg"); 17 | } -------------------------------------------------------------------------------- /examples/tenon-react/src/hook-test/entry.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import App from "./App" 3 | import * as Tenon from "@hummer/tenon-react" 4 | 5 | import "./App.less" 6 | 7 | Tenon.render() -------------------------------------------------------------------------------- /examples/tenon-react/src/index/App.css: -------------------------------------------------------------------------------- 1 | .message{ 2 | color: red; 3 | font-size: .36rem; 4 | } -------------------------------------------------------------------------------- /examples/tenon-react/src/index/App.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | function App() { 4 | const message = 'Hello Tenon' 5 | return ( 6 | 7 | {message} 8 | 9 | ); 10 | } 11 | 12 | export default App; 13 | -------------------------------------------------------------------------------- /examples/tenon-react/src/index/entry.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import App from "./App" 3 | import * as Tenon from "@hummer/tenon-react" 4 | 5 | import "./App.css" 6 | 7 | Tenon.render() -------------------------------------------------------------------------------- /examples/tenon-react/src/lifecycle/App.less: -------------------------------------------------------------------------------- 1 | @import "../common/assets/css/common.less"; -------------------------------------------------------------------------------- /examples/tenon-react/src/lifecycle/entry.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import App from "./App" 3 | import * as Tenon from "@hummer/tenon-react" 4 | 5 | import "./App.less" 6 | 7 | Tenon.render() -------------------------------------------------------------------------------- /examples/tenon-react/src/main/entry.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import App from "./App" 3 | import Tenon from "@hummer/tenon-react" 4 | 5 | import "./App.less" 6 | 7 | Tenon.render() -------------------------------------------------------------------------------- /examples/tenon-react/src/page-config/App.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import PageItem from '@common/components/PageItem'; 4 | import DemoItem from '@common/components/DemoItem'; 5 | 6 | 7 | function App() { 8 | return ( 9 | 10 | 11 | LifeCycle 12 | 13 | 14 | ); 15 | } 16 | 17 | export default App; 18 | -------------------------------------------------------------------------------- /examples/tenon-react/src/page-config/App.less: -------------------------------------------------------------------------------- 1 | @import "../common/assets/css/common.less"; -------------------------------------------------------------------------------- /examples/tenon-react/src/page-config/entry.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import * as Tenon from "@hummer/tenon-react" 3 | 4 | import App from "./App" 5 | import "./App.less" 6 | 7 | Tenon.render(, { 8 | canScroll: false, // 禁止滚动 9 | pageStyle: { // 全局页面样式 10 | backgroundColor: '#f3ffff' 11 | } 12 | }) -------------------------------------------------------------------------------- /examples/tenon-react/src/single-page/App.less: -------------------------------------------------------------------------------- 1 | @import "../common/assets/css/common.less"; -------------------------------------------------------------------------------- /examples/tenon-react/src/single-page/entry.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | 3 | import Tenon from "@hummer/tenon-react" 4 | 5 | function App() { 6 | function handleTouch(){ 7 | Toast.show('Touch') 8 | } 9 | return ( 10 | 11 | Touch Demo 12 | 13 | ); 14 | } 15 | 16 | Tenon.render() -------------------------------------------------------------------------------- /examples/tenon-react/src/test/App.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/didi/Hummer/4b720e2319343321783ecbc664d946f3aa46ae79/examples/tenon-react/src/test/App.css -------------------------------------------------------------------------------- /examples/tenon-react/src/test/basic-components/Image.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | function Image(props) { 4 | let {src} = props 5 | return ( 6 | 7 | ); 8 | } 9 | 10 | export default Image; 11 | -------------------------------------------------------------------------------- /examples/tenon-react/src/test/basic-components/Input.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | function Input() { 4 | return ( 5 | 6 | ); 7 | } 8 | 9 | export default Input; 10 | -------------------------------------------------------------------------------- /examples/tenon-react/src/test/basic-components/Textarea.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | function Textarea() { 4 | return ( 5 | 6 | ); 7 | } 8 | 9 | export default Textarea; 10 | -------------------------------------------------------------------------------- /examples/tenon-react/src/test/components/Hello.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | function Hello() { 4 | return ( 5 | 6 | Hello 7 | 8 | ); 9 | } 10 | 11 | export default Hello; 12 | -------------------------------------------------------------------------------- /examples/tenon-react/src/test/entry.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import App from "./App" 3 | import * as Tenon from "@hummer/tenon-react" 4 | 5 | // import "./App.css" 6 | 7 | Tenon.render() -------------------------------------------------------------------------------- /examples/tenon-vue-playground/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /node_modules 3 | /dist 4 | /dist/*.map 5 | /package-lock.json -------------------------------------------------------------------------------- /examples/tenon-vue-playground/README.md: -------------------------------------------------------------------------------- 1 | ### Tenon Template Vue仓库 -------------------------------------------------------------------------------- /examples/tenon-vue-playground/hm.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | module.exports = { 3 | type: 'tenon', 4 | webpack: { 5 | entries: "src/*/entry.js", 6 | output: { 7 | path: path.resolve(__dirname, './dist'), 8 | filename: "[name].js" 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/animation/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/animation_basic/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/animation_keyframe/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/animation_loading/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/animation_ripple/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/animation_steps/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/bottombar/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/button/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/canvas/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import ExCanvas from '@hummer/vue-plugin-canvas'; 3 | import app from './app'; 4 | 5 | Tenon.register(ExCanvas); 6 | Tenon.render(app); 7 | -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/common/CommonColor.ts: -------------------------------------------------------------------------------- 1 | export const Color = { 2 | hm_linear_gradient: 'linear-gradient(90deg #15D0B4 #E2ED00)', 3 | hm_yellow: '#E2ED00', 4 | hm_green: '#15D0B4', 5 | hm_blue: '#4A90E2', 6 | hm_orange: '#F1CA19', 7 | hm_purple: '#8484FF', 8 | transparent: '#00000000', 9 | black: '#000000', 10 | white: '#FFFFFF', 11 | red: '#FF0000', 12 | green: '#00FF00', 13 | blue: '#0000FF', 14 | grey: '#808080', 15 | light_grey: '#CCCCCC', 16 | dark_grey: '#333333', 17 | transparent_grey: '#00000060', 18 | } -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/hscroller/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/image/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/index/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/input/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/list/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app'; 3 | import List from '@hummer/vue-plugin-list'; 4 | Tenon.register(List); 5 | Tenon.render(app); 6 | -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/middle_scroller/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/middle_view/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/normal_layout_style/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/normal_view_style/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/popup/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import ExPopup from '@hummer/vue-plugin-popup'; 3 | import app from './app.vue'; 4 | 5 | Tenon.register(ExPopup); 6 | Tenon.render(app); 7 | -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/price_flag/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/scroller/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/switch/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/text/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/textarea/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/title_and_bottom_bar/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/titlebar/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/verification_code/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/view/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue-playground/src/view_pager/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app'; 3 | import ViewPager from '@hummer/vue-plugin-viewpager' 4 | 5 | Tenon.register(ViewPager); 6 | Tenon.render(app); 7 | -------------------------------------------------------------------------------- /examples/tenon-vue/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .history/ 3 | dump.rdb 4 | package-lock.json 5 | coverage/ 6 | .DS_Store 7 | .idea 8 | dist 9 | -------------------------------------------------------------------------------- /examples/tenon-vue/README.md: -------------------------------------------------------------------------------- 1 | ### Tenon Vue Demo 2 | 在这里你能找到常用的组件的示例用法 3 | > 持续迭代中 -------------------------------------------------------------------------------- /examples/tenon-vue/hm.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | module.exports = { 3 | type: 'tenon', 4 | webpack: { 5 | entries: "src/*/entry.js", 6 | resolve: { 7 | alias: { 8 | "@common": path.join(__dirname, './src/common') 9 | } 10 | }, 11 | output: { 12 | path: path.resolve(__dirname, './dist'), 13 | filename: "[name].js" 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /examples/tenon-vue/src/animation-basic/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/animation-keyframe/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/animation-steps/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/animation-transition/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/common/store/action.js: -------------------------------------------------------------------------------- 1 | export default { 2 | increment ({commit}) { 3 | commit('increment') 4 | } 5 | } -------------------------------------------------------------------------------- /examples/tenon-vue/src/common/store/index.js: -------------------------------------------------------------------------------- 1 | import {createStore, createHummerPlugin} from '@hummer/tenon-store' 2 | import {createLoggerPlugin} from './logger' 3 | 4 | import State from './state' 5 | import Mutation from './mutation' 6 | import Action from './action' 7 | 8 | export default createStore({ 9 | state: State, 10 | mutations: Mutation, 11 | actions: Action, 12 | plugins: [createLoggerPlugin(), createHummerPlugin()] 13 | }) -------------------------------------------------------------------------------- /examples/tenon-vue/src/common/store/mutation.js: -------------------------------------------------------------------------------- 1 | export default { 2 | increment (state) { 3 | state.count++ 4 | } 5 | } -------------------------------------------------------------------------------- /examples/tenon-vue/src/common/store/state.js: -------------------------------------------------------------------------------- 1 | export default { 2 | count: 0, 3 | name: undefined, 4 | nullName: null 5 | } -------------------------------------------------------------------------------- /examples/tenon-vue/src/component-button/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/component-image/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/component-input/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/component-scroller/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/component-switch/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/component-text/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/component-textarea/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/component-view/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/directive-v-if/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/directive-v-rtl/directives/v-rtl.js: -------------------------------------------------------------------------------- 1 | const vRtl = { 2 | beforeMount(el, {value}) { 3 | if(true){ 4 | // 需要 RTL 翻转 5 | if(value === 'text'){ 6 | el.style = { 7 | transform: "scaleX(-1)", 8 | textAlign: 'right' 9 | } 10 | }else { 11 | el.style = { 12 | transform: "scaleX(-1)" 13 | } 14 | } 15 | } 16 | 17 | }, 18 | mounted(el, {value}) { 19 | } 20 | } 21 | 22 | export default vRtl -------------------------------------------------------------------------------- /examples/tenon-vue/src/directive-v-rtl/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | import VRtl from './directives/v-rtl'; 5 | 6 | Tenon.directive('rtl', VRtl); 7 | 8 | Tenon.render(app); 9 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/directive-v-show/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/event/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/ex-component-canvas/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import ExCanvas from '@hummer/vue-plugin-canvas'; 3 | import app from './app'; 4 | 5 | Tenon.register(ExCanvas); 6 | Tenon.render(app); 7 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/ex-component-image-plus/app.vue: -------------------------------------------------------------------------------- 1 | 6 | 12 | 13 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/ex-component-image-plus/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app'; 3 | 4 | import ImagePlus from './imagePlus.js'; 5 | Tenon.register(ImagePlus); 6 | 7 | Tenon.render(app); 8 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/ex-component-list/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | import List from '@hummer/vue-plugin-list'; 4 | Tenon.register(List); 5 | 6 | Tenon.render(app); 7 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/ex-component-marquee/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app'; 3 | 4 | import MarqueeView from './hummerMarqueeView.js'; 5 | Tenon.register(MarqueeView); 6 | 7 | Tenon.render(app); 8 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/ex-component-popup/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import ExPopup from '@hummer/vue-plugin-popup'; 3 | import app from './app.vue'; 4 | 5 | Tenon.register(ExPopup); 6 | Tenon.render(app); 7 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/ex-component-scroller-plus/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app'; 3 | 4 | import ScrollerPlus from './scrollerPlus.js'; 5 | Tenon.register(ScrollerPlus); 6 | 7 | Tenon.render(app); 8 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/ex-component-test/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | import ExWebview from './plugin/webView'; 5 | Tenon.register(ExWebview); 6 | 7 | Tenon.render(app); 8 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/ex-component-viewpager/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import ViewPager from '@hummer/vue-plugin-viewpager' 3 | 4 | import app from './app.vue'; 5 | 6 | Tenon.register(ViewPager); 7 | Tenon.render(app); 8 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/grammar-render/components/demo-component.vue: -------------------------------------------------------------------------------- 1 | 4 | 9 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/grammar-render/components/test.js: -------------------------------------------------------------------------------- 1 | import {h} from '@hummer/tenon-vue' 2 | import DemoComponent from './demo-component' 3 | export default{ 4 | name: 'test', 5 | render(){ 6 | return h("view", [h("text", "test"), h(DemoComponent)]) 7 | } 8 | } -------------------------------------------------------------------------------- /examples/tenon-vue/src/grammar-render/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | import DemoComponent from './components/demo-component'; 4 | 5 | Tenon.component("DemoComponent", DemoComponent); 6 | 7 | Tenon.render(app); 8 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/grammar-slot/app.vue: -------------------------------------------------------------------------------- 1 | 8 | 20 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/grammar-slot/components/button.vue: -------------------------------------------------------------------------------- 1 | 6 | 11 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/grammar-slot/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/grammar-style/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/index/app.vue: -------------------------------------------------------------------------------- 1 | 6 | 18 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/index/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/lifecycle/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | import LifeMixin1 from "./mixins/life-mixin1"; 4 | 5 | Tenon.mixin(LifeMixin1); 6 | Tenon.render(app); 7 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/lifecycle/extends/life-mxin.js: -------------------------------------------------------------------------------- 1 | export default { 2 | name: "Name", 3 | onShow(){ 4 | console.log('Extends LifeCycle OnShow') 5 | }, 6 | onLoad(){ 7 | console.log('Extends LifeCycle onLoad') 8 | }, 9 | onBack(){ 10 | // On Back LifeCycle 11 | console.log('Extends onBack LifeCycle') 12 | // return true 13 | } 14 | } -------------------------------------------------------------------------------- /examples/tenon-vue/src/lifecycle/mixins/life-mixin.js: -------------------------------------------------------------------------------- 1 | export default { 2 | onShow(){ 3 | console.log('Base Lifecycle Mixin On Show!') 4 | }, 5 | onHide(){ 6 | console.log('Base Lifecycle Mixin On Hide!') 7 | }, 8 | onBack(){ 9 | // On Back LifeCycle 10 | console.log('Base Lifecycle Mixin On Back!') 11 | // return true 12 | } 13 | } -------------------------------------------------------------------------------- /examples/tenon-vue/src/lifecycle/mixins/life-mixin1.js: -------------------------------------------------------------------------------- 1 | export default { 2 | onShow(){ 3 | console.log('Base Lifecycle Mixin1 On Show!') 4 | }, 5 | onHide(){ 6 | console.log('Base Lifecycle Mixin1 On Hide!') 7 | }, 8 | onBack(){ 9 | // On Back LifeCycle 10 | console.log('Base Lifecycle Mixin1 On Back!') 11 | // return true 12 | } 13 | } -------------------------------------------------------------------------------- /examples/tenon-vue/src/main/entry.js: -------------------------------------------------------------------------------- 1 | import Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/page-config/app.vue: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/page-config/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/plugin-error/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | import ErrorHandler from '@hummer/vue-plugin-error-handler'; 4 | 5 | Tenon.use(ErrorHandler); 6 | Tenon.render(app); 7 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/store-demo/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | import store from './store'; 4 | 5 | Tenon.use(store); 6 | Tenon.render(app); 7 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/store-demo/store/index.js: -------------------------------------------------------------------------------- 1 | import {createStore} from '@hummer/tenon-store' 2 | import {createLoggerPlugin} from './logger' 3 | export default createStore({ 4 | state: { 5 | count: 0 6 | }, 7 | mutations: { 8 | increment (state) { 9 | state.count++ 10 | } 11 | }, 12 | actions: { 13 | increment ({commit}) { 14 | commit('increment') 15 | } 16 | }, 17 | plugins: [createLoggerPlugin()] 18 | }) -------------------------------------------------------------------------------- /examples/tenon-vue/src/store-muti-main-sub1/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | import store from '@common/store'; 4 | 5 | Tenon.use(store); 6 | Tenon.render(app); 7 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/store-muti-main-sub2/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | import store from '@common/store'; 4 | 5 | Tenon.use(store); 6 | Tenon.render(app); 7 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/store-muti-main/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | import store from '@common/store'; 4 | 5 | Tenon.use(store); 6 | Tenon.render(app); 7 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/style-basic/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/style-layout/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | Tenon.render(app); 5 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/test/app.vue: -------------------------------------------------------------------------------- 1 | 6 | 11 | 12 | -------------------------------------------------------------------------------- /examples/tenon-vue/src/test/entry.js: -------------------------------------------------------------------------------- 1 | import * as Tenon from '@hummer/tenon-vue'; 2 | import app from './app.vue'; 3 | 4 | import VRtl from './directives/v-rtl' 5 | 6 | Tenon.directive('rtl', VRtl) 7 | 8 | Tenon.render(app); 9 | -------------------------------------------------------------------------------- /iOS/App/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /iOS/App/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOS/App/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // App 4 | // 5 | // Created by 唐佳诚 on 2021/8/17. 6 | // 7 | 8 | import UIKit 9 | import Hummer 10 | 11 | class ViewController: HMViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | // Do any additional setup after loading the view. 16 | } 17 | 18 | 19 | } 20 | 21 | -------------------------------------------------------------------------------- /iOS/Hummer/Assets/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOS/Hummer/Assets/Assets.xcassets/builtin.dataset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "data" : [ 3 | { 4 | "filename" : "builtin.js", 5 | "idiom" : "universal", 6 | "universal-type-identifier" : "com.netscape.javascript-source" 7 | } 8 | ], 9 | "info" : { 10 | "author" : "xcode", 11 | "version" : 1 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Animation/Keyframe/CAAnimation+Exp.h: -------------------------------------------------------------------------------- 1 | // 2 | // CAAnimation+Exp.h 3 | // Hummer 4 | // 5 | // Copyright © 2019年 didi. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface CAAnimation (Base) 11 | 12 | @property (nonatomic, copy, nullable) void(^onEnding)(CAAnimation *anim, BOOL flag); 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Animation/Keyframe/CAAnimation+Timing.h: -------------------------------------------------------------------------------- 1 | // 2 | // CAAnimation+Timing.h 3 | // Hummer 4 | // 5 | // Copyright © 2019年 didi. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface CAAnimation (Timing) 11 | 12 | 13 | @property (nonatomic, strong, nullable) NSNumber *facadeDuration; 14 | @end 15 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Animation/Keyframe/HMAnimation.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMAnimation.h 3 | // Hummer 4 | // 5 | // Copyright © 2019年 didi. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | 11 | @interface HMKeyframeAnimation : CAKeyframeAnimation 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Navigator/HMNavigatorPageInfo.m: -------------------------------------------------------------------------------- 1 | // 2 | // HMNavigatorPageInfo.m 3 | // Hummer 4 | // 5 | // Created by didi on 2020/7/13. 6 | // 7 | 8 | #import "HMNavigatorPageInfo.h" 9 | 10 | @implementation HMNavigatorPageInfo 11 | 12 | - (instancetype)init 13 | { 14 | self = [super init]; 15 | if (self) { 16 | _animated = YES; 17 | } 18 | return self; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Network/HMRequest.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMNetworking.h 3 | // Hummer 4 | // 5 | // Copyright © 2019年 didi. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | @interface HMRequest : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/Button/HMButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMButton.h 3 | // Hummer 4 | // 5 | // Copyright © 2019年 didi. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface HMButton : UIButton 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/Canvas/BridgeExport/HMCanvasView.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMCanvasView.h 3 | // Hummer 4 | // 5 | // Created by litianhao on 2021/6/30. 6 | // 7 | 8 | #import 9 | 10 | 11 | @interface HMCanvasView : UIView 12 | 13 | @end 14 | 15 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/Canvas/implementation/coreGraphic/HMCanvasByGraphicInternelView.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMCanvasByGraphicInternelView.h 3 | // Hummer 4 | // 5 | // Created by litianhao on 2021/8/2. 6 | // 7 | 8 | #import 9 | #import "HMCanvasViewInterface.h" 10 | 11 | 12 | @interface HMCanvasByGraphicInternelView : UIView 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/Canvas/implementation/coreGraphic/HMCanvasImplByCoreGraphic.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMCanvasImplByCoreGraphic.h 3 | // Hummer 4 | // 5 | // Created by litianhao on 2021/8/2. 6 | // 7 | 8 | #import 9 | #import "HMCanvasViewInterface.h" 10 | 11 | @interface HMCanvasImplByCoreGraphic : NSObject 12 | 13 | @end 14 | 15 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/Color/HMGradientColor.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMGradientColor.h 3 | // Hummer 4 | // 5 | // Copyright © 2019年 didi. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMGradientColor : UIColor 13 | 14 | @property (nonatomic, copy) UIColor *beginColor; 15 | @property (nonatomic, copy) UIColor *endColor; 16 | @property (nonatomic, assign) CGPoint beginPoint; 17 | @property (nonatomic, assign) CGPoint endPoint; 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/Color/HMGradientColor.m: -------------------------------------------------------------------------------- 1 | // 2 | // HMGradientColor.m 3 | // Hummer 4 | // 5 | // Copyright © 2019年 didi. All rights reserved. 6 | // 7 | 8 | #import "HMGradientColor.h" 9 | 10 | @implementation HMGradientColor 11 | 12 | // TODO(唐佳诚): 处理模型 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/ImageView/HMImageLayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMImageView.m 3 | // Hummer 4 | // 5 | // Copyright © 2019年 didi. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMImageLayer : CALayer 13 | 14 | @property (nonatomic, copy) NSString *imageURL; 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/Label/HMLabel.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMLabel.h 3 | // Hummer 4 | // 5 | // Copyright © 2019年 didi. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface HMLabel : UILabel 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/ListView/HMRecycleListView.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMRecycleListView.h 3 | // Hummer 4 | // 5 | // Copyright © 2019年 didi. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMRecycleListView : UICollectionView 13 | 14 | - (instancetype)initWithFrame:(CGRect)frame NS_DESIGNATED_INITIALIZER; 15 | 16 | - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER; 17 | 18 | @end 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/ListView/Layout/HMListLayoutAttributes.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMListLayoutAttributes.h 3 | // Hummer 4 | // 5 | // Copyright © 2019年 didi. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMListLayoutAttributes : UICollectionViewLayoutAttributes 13 | 14 | @property (nonatomic) UICollectionViewScrollDirection scrollDirection; 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/ListView/Layout/HMListLayoutAttributes.m: -------------------------------------------------------------------------------- 1 | // 2 | // HMListLayoutAttributes.m 3 | // Hummer 4 | // 5 | // Copyright © 2019年 didi. All rights reserved. 6 | // 7 | 8 | #import "HMListLayoutAttributes.h" 9 | 10 | @implementation HMListLayoutAttributes 11 | 12 | - (instancetype)copy { 13 | HMListLayoutAttributes *attributes = [super copy]; 14 | attributes.scrollDirection = self.scrollDirection; 15 | return attributes; 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/ListView/Layout/HMRecycleListViewGridLayout.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMRecycleListViewGridLayout.h 3 | // Hummer 4 | // 5 | // Copyright © 2019年 didi. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMRecycleListViewGridLayout : UICollectionViewFlowLayout 13 | 14 | @property (nonatomic, assign) NSUInteger numberOfColumns; 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/ListView/Layout/HMWaterfallLayoutAttributes.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMWaterfallLayoutAttributes.h 3 | // Hummer 4 | // 5 | // Copyright © 2019年 didi. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMWaterfallLayoutAttributes : UICollectionViewLayoutAttributes 13 | 14 | @property (nonatomic, assign) CGFloat columnWidth; 15 | @property (nonatomic, assign) CGFloat rowWidth; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/ListView/Layout/HMWaterfallLayoutAttributes.m: -------------------------------------------------------------------------------- 1 | // 2 | // HMWaterfallLayoutAttributes.m 3 | // Hummer 4 | // 5 | // Copyright © 2019年 didi. All rights reserved. 6 | // 7 | 8 | #import "HMWaterfallLayoutAttributes.h" 9 | 10 | @implementation HMWaterfallLayoutAttributes 11 | 12 | - (instancetype)copy { 13 | HMWaterfallLayoutAttributes *attributes = [super copy]; 14 | attributes.rowWidth = self.rowWidth; 15 | attributes.columnWidth = self.columnWidth; 16 | return attributes; 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/Loading/HMActivityIndicatorView.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMActivityIndicatorView.h 3 | // Hummer 4 | // 5 | // Copyright © 2019 didi. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface HMActivityIndicatorView : UIActivityIndicatorView 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/Lottie/HMLottieView.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMOCLottieView.h 3 | // DCPTrack 4 | // 5 | // Created by didi on 2022/12/21. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMLottieView : UIView 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/Lottie/Loader/HMLocalImageLoader+Lottie.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMLocalImageLoader+Lottie.h 3 | // Hummer 4 | // 5 | // Created by didi on 2022/12/28. 6 | // 7 | 8 | #import "HMLocalImageLoader.h" 9 | #import "HMLottieLoader.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface HMLocalImageLoader (Lottie) 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/Lottie/Loader/HMWebImageLoader+Lottie.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMWebImageLoader+Lottie.h 3 | // Hummer 4 | // 5 | // Created by didi on 2022/12/28. 6 | // 7 | 8 | #import "HMWebImageLoader.h" 9 | #import "HMLottieLoader.h" 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMWebImageLoader (Lottie) 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/Lottie/Manager/HMZipArchive.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMZipArchive.h 3 | // Hummer 4 | // 5 | // Created by didi on 2022/12/23. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMZipArchive : NSObject 13 | 14 | + (HMZipArchive *)sharedInstance; 15 | 16 | - (void)unzipFileAtPath:(NSString *)path toDestination:(NSString *)destination overwrite:(BOOL)overwrite password:(nullable NSString *)password result:(void(^)(BOOL))result; 17 | 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/Switch/HMSwitch.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMSwitch.h 3 | // Hummer 4 | // 5 | // Copyright © 2019年 didi. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMSwitch : UISwitch 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/TextArea/HMTextArea.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMTextArea.h 3 | // Hummer 4 | // 5 | // Copyright © 2019年 didi. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMTextArea : UITextView 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/TextInput/HMInput.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMInput.h 3 | // Hummer 4 | // 5 | // Copyright © 2019年 didi. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface HMInput : UITextField 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/Toast/HMToast.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMToast.h 3 | // Pods 4 | // 5 | // Copyright © 2019年 didi. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMToast : NSObject 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/View/HMCornerRadiusModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMCornerRadiusModel.h 3 | // Hummer 4 | // 5 | // Created by 唐佳诚 on 2020/4/16. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMCornerRadiusModel : NSObject 13 | 14 | @property (nonatomic, assign) double topLeft; 15 | 16 | @property (nonatomic, assign) double topRight; 17 | 18 | @property (nonatomic, assign) double bottomLeft; 19 | 20 | @property (nonatomic, assign) double bottomRight; 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/View/HMRootViewProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMRootViewProtocol.h 3 | // Hummer 4 | // 5 | // Created by didi on 2023/6/13. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @protocol HMRootViewProtocol 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/View/HMTransformResolver.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMTransformResolver.h 3 | // Hummer 4 | // 5 | // Created by didi on 2020/12/10. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @class HMTransform; 12 | @interface HMTransformResolver : NSObject 13 | 14 | + (CATransform3D)resolverTransformValue:(id)value view:(UIView *)view; 15 | + (HMTransform *)applyTransformValues:(NSDictionary *)transformValues defaultValue:(HMTransform *)defaultTransform; 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/View/UIView+HMRootView.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+HMRootView.h 3 | // Hummer 4 | // 5 | // Created by didi on 2023/6/13. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface UIView (HMRootView) 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/View/UIView+HMRootView.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+HMRootView.m 3 | // Hummer 4 | // 5 | // Created by didi on 2023/6/13. 6 | // 7 | 8 | #import "UIView+HMRootView.h" 9 | 10 | @implementation UIView (HMRootView) 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/View/UIView+Hummer.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Hummer.h 3 | // Hummer 4 | // 5 | // Copyright © 2019年 didi. All rights reserved. 6 | // 7 | 8 | #import 9 | #import "HMJSObject.h" 10 | 11 | @interface UIView(Hummer) 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/ViewPager/HMViewPager.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMViewPager.h 3 | // Hummer 4 | // 5 | // Created by didi on 2020/10/14. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMViewPager : UIView 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/ViewPager/HMViewPagerCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMViewPagerCell.h 3 | // Hummer 4 | // 5 | // Created by didi on 2020/10/14. 6 | // 7 | 8 | #import 9 | 10 | @class HMBaseValue; 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface HMViewPagerCell : UICollectionViewCell 15 | 16 | @property (nonatomic, nullable, strong) HMBaseValue *contentViewValue; 17 | @property (nonatomic, copy) NSIndexPath *indexPath; 18 | 19 | - (void)setImageURL:(NSString *)url; 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/ViewPager/HMViewPagerLayoutCardAnimator.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMViewPagerLayoutCardAnimator.h 3 | // Hummer 4 | // 5 | // Created by didi on 2020/10/14. 6 | // 7 | 8 | #import 9 | #import "HMViewPagerLayoutAnimator.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface HMViewPagerLayoutCardAnimator : NSObject 14 | 15 | @property (nonatomic) CGFloat minScale; 16 | 17 | @property (nonatomic) CGFloat minAlpha; 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/Views/ViewPager/HMViewPagerPageAnimator.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMViewPagerPageAnimator.h 3 | // Hummer 4 | // 5 | // Created by didi on 2020/10/14. 6 | // 7 | 8 | #import 9 | #import "HMViewPagerLayoutAnimator.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface HMViewPagerPageAnimator : NSObject 14 | 15 | @property (nonatomic) CGFloat scaleRate; 16 | 17 | @property (nonatomic) CGFloat minAlpha; 18 | 19 | @property (nonatomic) CGFloat itemSpacing; 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Component/WebSocket/HMWebSocket.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface HMWebSocket : NSObject 6 | 7 | - (void)close; 8 | 9 | - (instancetype)init NS_UNAVAILABLE; 10 | 11 | @end 12 | 13 | NS_ASSUME_NONNULL_END 14 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Bridge/HMDebug.h: -------------------------------------------------------------------------------- 1 | #if defined(DEBUG) && !defined(HMDEBUG) 2 | #define HMDEBUG 3 | #endif 4 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Bridge/HMJSContextDefines.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMJSContextDefines.h 3 | // Hummer 4 | // 5 | // Created by didi on 2022/3/29. 6 | // 7 | 8 | #import 9 | 10 | FOUNDATION_EXPORT NSErrorDomain const _Nonnull HMJSContextErrorDomain; 11 | 12 | /// HMJSContext error domain and codes 13 | typedef NS_ERROR_ENUM(HMJSContextErrorDomain, HMJSContextError) { 14 | HMJSContextErrorNotCallRender = 1000, // 没有调用render 15 | HMJSContextErrorRenderWithInvalidArg = 1001, // render 方法参数错误。 16 | }; 17 | 18 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Bridge/HMJSContextDefines.m: -------------------------------------------------------------------------------- 1 | // 2 | // HMJSContextDefines.m 3 | // Hummer 4 | // 5 | // Created by didi on 2022/3/29. 6 | // 7 | 8 | #import "HMJSContextDefines.h" 9 | 10 | NSErrorDomain const _Nonnull HMJSContextErrorDomain = @"HMJSContextErrorDomain"; 11 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Bridge/HMJSGlobal+Private.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMJSGlobal+Private.h 3 | // Hummer 4 | // 5 | // Created by didi on 2021/4/6. 6 | // 7 | 8 | #import "HMJSGlobal.h" 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMJSGlobal (Private) 13 | /// 必须在 js 上下文中执行 14 | + (HMExceptionModel *)_evaluateString:(nonnull NSString *)jsString fileName:(nullable NSString *)fileName; 15 | + (HMExceptionModel *)_evaluateString:(nonnull NSString *)jsString fileName:(nullable NSString *)fileName inContext:(HMJSContext *)context; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/EventTrack/HMEventTrackManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMEventTrackManager.h 3 | // AFDownloadRequestOperation 4 | // 5 | // Created by didi on 2020/8/13. 6 | // 7 | 8 | #import 9 | #import "HMEventTrackViewProperty.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface HMEventTrackManager : NSObject 14 | 15 | + (void)trackWithEventName:(NSString *)eventName view:(UIView *)view params:(NSDictionary *)params namespace:(NSString *)namespace; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/EventTrack/HMEventTrackUtils.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMEventTrackUtils.h 3 | // AFDownloadRequestOperation 4 | // 5 | // Created by didi on 2020/8/13. 6 | // 7 | 8 | #import 9 | #import "HMEventTrackViewProperty.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface HMEventTrackUtils : NSObject 14 | 15 | + (NSMutableDictionary *)propertiesWithTrackObject:(id)object; 16 | + (long long)getCurrentTime; 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Layout/HMYogaConfig.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMYogaConfig.h 3 | // Hummer 4 | // 5 | // Copyright © 2019年 didi. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface HMYogaConfig : NSObject 11 | 12 | + (instancetype)defaulfConfig; 13 | 14 | - (NSString *)ygPropertyWithCSSAttr:(NSString *)cssAttr; 15 | 16 | - (SEL)converterWithCSSAttr:(NSString *)cssAttr; 17 | 18 | - (NSArray *)yogaProperties; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Layout/RenderObject/HMMeasureRenderObject.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMMeasureRenderObject.h 3 | // Hummer 4 | // 5 | // Created by didi on 2020/10/14. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMMeasureRenderObject : HMRenderObject 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Layout/RenderObject/HMTextRenderObject.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMTextRenderObject.h 3 | // Hummer 4 | // 5 | // Created by 唐佳诚 on 2020/10/23. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMTextRenderObject : HMRenderObject 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Manager/ImageLoader/Category/HMAnimatedImage+Hummer.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMAnimatedImage+Hummer.h 3 | // Hummer 4 | // 5 | // Created by didi on 2020/12/3. 6 | // 7 | 8 | #import "HMAnimatedImage.h" 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMAnimatedImage (Hummer) 13 | 14 | - (NSTimeInterval)hm_animatedDuration; 15 | - (NSArray *)hm_animatedImages; 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Manager/ImageLoader/Category/HMImageCoderDefine.m: -------------------------------------------------------------------------------- 1 | // 2 | // HMImageCoderDefine.m 3 | // Hummer 4 | // 5 | // Created by didi on 2021/9/1. 6 | // 7 | 8 | #import "HMImageCoderDefine.h" 9 | 10 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Manager/ImageLoader/Category/NSData+Hummer.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+Hummer.h 3 | // Hummer 4 | // 5 | // Created by didi on 2020/11/19. 6 | // 7 | 8 | #import 9 | #import "HMImageCoderDefine.h" 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSData (Hummer) 13 | 14 | + (HMImageFormat)hm_imageFormatForImageData:(nullable NSData *)data; 15 | + (nonnull CFStringRef)hm_UTTypeFromImageFormat:(HMImageFormat)format; 16 | + (HMImageFormat)hm_imageFormatFromUTType:(CFStringRef)uttype; 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Manager/ImageLoader/Category/NSURL+Hummer.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSURL+Hummer.h 3 | // Hummer 4 | // 5 | // Created by didi on 2020/11/18. 6 | // 7 | 8 | #import 9 | #import "HMURLConvertible.h" 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface NSURL (Hummer) 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Manager/ImageLoader/Category/UIImage+HMMetadata.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+HMMetadata.h 3 | // Hummer 4 | // 5 | // Created by didi on 2021/9/1. 6 | // 7 | 8 | #import 9 | #import "HMImageCoderDefine.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface UIImage (HMMetadata) 14 | 15 | @property (nonatomic, assign) HMImageFormat hm_imageFormat; 16 | 17 | @property (nonatomic, assign) NSUInteger hm_imageLoopCount; 18 | 19 | @property (nonatomic, assign, readonly) BOOL hm_isAnimated; 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Manager/ImageLoader/Category/UIImage+Hummer.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+Hummer.h 3 | // Hummer 4 | // 5 | // Created by didi on 2020/11/19. 6 | // 7 | 8 | #import 9 | #import "HMImageCoder.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface UIImage (Hummer) 14 | 15 | 16 | 17 | + (UIImage *)hm_decodeImageWithData:(NSData *)data size:(CGSize)destSize scale:(CGFloat)destScale resizeMode:(HMResizeMode)resizeMode; 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Manager/ImageLoader/ConcreteLoader/HMBase64ImageLoader.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMBase64ImageLoader.h 3 | // Hummer 4 | // 5 | // Created by didi on 2020/11/17. 6 | // 7 | 8 | #import 9 | #import "HMImageLoader.h" 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMBase64ImageLoader : NSObject 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Manager/ImageLoader/ConcreteLoader/HMLocalImageLoader.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMLocalImageLoader.h 3 | // Hummer 4 | // 5 | // Created by didi on 2020/11/18. 6 | // 7 | 8 | #import 9 | #import "HMImageLoader.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface HMLocalImageLoader : NSObject 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Manager/ImageLoader/ConcreteLoader/HMWebImageLoader.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMWebImageLoader.h 3 | // Hummer 4 | // 5 | // Created by didi on 2020/11/18. 6 | // 7 | 8 | #import 9 | #import "HMImageLoader.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface HMWebImageLoader : NSObject 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Manager/ImageLoader/Decoder/ConcreteCoder/APNG/HMImageAPNGCoder.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMImageAPNGCoder.h 3 | // Expecta 4 | // 5 | // Created by didi on 2021/9/6. 6 | // 7 | 8 | #import 9 | #import "HMImageIOAnimatedCoder.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /** 14 | Built in coder using ImageIO that supports APNG encoding/decoding 15 | */ 16 | @interface HMImageAPNGCoder : HMImageIOAnimatedCoder 17 | 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Manager/ImageLoader/Decoder/ConcreteCoder/HMGIFImageDecoder.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMGIFImageDecoder.h 3 | // Hummer 4 | // 5 | // Created by didi on 2020/11/25. 6 | // 7 | 8 | #import 9 | #import "HMImageIOAnimatedCoder.h" 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMGIFImageDecoder : HMImageIOAnimatedCoder 13 | 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Manager/ImageLoader/Decoder/ConcreteCoder/IOImage/HMImageIOAnimatedCoder.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMIOImageAnimatedCoder.h 3 | // Hummer 4 | // 5 | // Created by didi on 2021/9/3. 6 | // 7 | 8 | #import 9 | #import "HMImageCoder.h" 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMImageIOAnimatedCoder : NSObject 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Manager/ImageLoader/Decoder/ConcreteCoder/IOImage/HMImageIOCoder.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMIOImageCoder.h 3 | // Hummer 4 | // 5 | // Created by didi on 2021/9/3. 6 | // 7 | 8 | #import 9 | #import "HMImageCoder.h" 10 | #import "HMImageIOAnimatedCoder.h" 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface HMImageIOCoder : HMImageIOAnimatedCoder 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Manager/ImageLoader/Decoder/ConcreteCoder/Webp/HMWebpBuiltInImageCoder.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMWebpBuiltInImageCoder.h 3 | // Hummer 4 | // 5 | // Created by didi on 2021/9/1. 6 | // 7 | 8 | #import 9 | #import "HMImageIOAnimatedCoder.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface HMWebpBuiltInImageCoder : HMImageIOAnimatedCoder 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Manager/ImageLoader/Decoder/ConcreteCoder/Webp/HMWebpImageCoder.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMWebpImageCoder.h 3 | // Hummer 4 | // 5 | // Created by didi on 2021/9/1. 6 | // 7 | 8 | #import 9 | #import "HMImageCoder.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface HMWebpImageCoder : NSObject 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Proxy/HummerWeakProxy.h: -------------------------------------------------------------------------------- 1 | // 2 | // HummerWeakProxy.h 3 | // Expecta 4 | // 5 | // Created by didi on 2020/11/30. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HummerWeakProxy : NSProxy 13 | + (instancetype)weakProxyForObject:(id)targetObject; 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Utility/Category/NSData+HMConvertible.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+HMConvertible.h 3 | // WebSocket 4 | // 5 | // Created by didi on 2020/10/12. 6 | // 7 | 8 | #import 9 | #import "HMConvertibleProtocol.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface NSData (HMConvertible) 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Utility/Category/NSData+HMConvertible.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+HMConvertible.m 3 | // WebSocket 4 | // 5 | // Created by didi on 2020/10/12. 6 | // 7 | 8 | #import "NSData+HMConvertible.h" 9 | 10 | @implementation NSData (HMConvertible) 11 | 12 | 13 | - (nullable NSString *)hm_asString { 14 | return [[NSString alloc] initWithData:self encoding:NSUTF8StringEncoding]; 15 | } 16 | 17 | - (nullable NSData *)hm_asData { 18 | return self; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Utility/Category/NSInvocation+Hummer.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSInvocation+Hummer.h 3 | // AfantySDK 4 | // 5 | // Created by didi on 2020/9/9. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface NSInvocation (Hummer) 14 | 15 | - (void)hm_setArgument:(nullable id)argumentLocation atIndex:(NSInteger)idx encodingType:(HMEncodingType)type; 16 | 17 | - (nullable id)hm_getReturnValueObject; 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Utility/Category/NSString+HMConvertible.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+HMConvertible.h 3 | // WebSocket 4 | // 5 | // Created by didi on 2020/10/12. 6 | // 7 | 8 | #import 9 | #import "HMConvertibleProtocol.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface NSString (HMConvertible) 14 | 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Utility/Category/NSString+HMConvertible.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+HMConvertible.m 3 | // WebSocket 4 | // 5 | // Created by didi on 2020/10/12. 6 | // 7 | 8 | #import "NSString+HMConvertible.h" 9 | 10 | @implementation NSString (HMConvertible) 11 | 12 | - (nullable NSData *)hm_asData{ 13 | return [self dataUsingEncoding:NSUTF8StringEncoding]; 14 | } 15 | - (nullable NSString *)hm_asString { 16 | return self; 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Utility/HMContainerModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // HMContainerModel.m 3 | // Hummer 4 | // 5 | // Created by 唐佳诚 on 2020/9/24. 6 | // 7 | 8 | #import "HMContainerModel.h" 9 | 10 | @implementation HMContainerModel 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Utility/HMDefines.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMDefines.h 3 | // Hummer 4 | // 5 | // Created by didi on 2021/12/24. 6 | // 7 | 8 | #import 9 | #define HM_SafeRunBlock(block,...) ((block)?(block(__VA_ARGS__)):nil) 10 | 11 | 12 | FOUNDATION_EXPORT NSErrorDomain const _Nonnull HMUrlSessionErrorDomain; 13 | 14 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Utility/HMDefines.m: -------------------------------------------------------------------------------- 1 | // 2 | // HMDefines.m 3 | // Hummer 4 | // 5 | // Created by didi on 2021/12/24. 6 | // 7 | 8 | #import "HMDefines.h" 9 | 10 | NSErrorDomain const _Nonnull HMUrlSessionErrorDomain = @"HMUrlSessionErrorDomain"; 11 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Utility/HMLayoutUtils.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMLayoutUtils.h 3 | // Hummer 4 | // 5 | // Created by didi on 2020/10/26. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMLayoutUtils : NSObject 13 | + (NSDictionary *)rectForView:(UIView *)view; 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Utility/HMReporter.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMReporter.h 3 | // Hummer 4 | // 5 | // Copyright © 2019年 didi. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMReporter : NSObject 13 | 14 | + (void)reportPerformanceWithBlock:(void (^)(dispatch_block_t finishBlock))excuteBlock forKey:(NSString *)reportKey namespace:(NSString *)namespace; 15 | + (void)reportValue:(id)value forKey:(NSString *)reportKey namespace:(NSString *)namespace; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Utility/HMURLUtility.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMURLUtility.h 3 | // Hummer 4 | // 5 | // Created by didi on 2021/3/15. 6 | // 7 | 8 | #import 9 | 10 | NSString * HMQueryStringFromParameters(NSDictionary *parameters); 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface HMURLUtility : NSObject 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Utility/WeakPointerWrapper.h: -------------------------------------------------------------------------------- 1 | // 2 | // WeakPointerWrapper.h 3 | // Hummer 4 | // 5 | // Created by 唐佳诚 on 2020/4/23. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface WeakPointerWrapper<__covariant ObjectType> : NSObject 13 | 14 | @property (nonatomic, nullable, weak) ObjectType value; 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Core/Utility/WeakPointerWrapper.m: -------------------------------------------------------------------------------- 1 | // 2 | // WeakPointerWrapper.m 3 | // Hummer 4 | // 5 | // Created by 唐佳诚 on 2020/4/23. 6 | // 7 | 8 | #import "WeakPointerWrapper.h" 9 | 10 | @implementation WeakPointerWrapper 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Dev/ViewInspector/HMViewInspector.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMViewInspector.h 3 | // Expecta 4 | // 5 | // Created by didi on 2021/8/5. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | 14 | 15 | 16 | @interface HMViewInspector : NSObject 17 | + (void)highlightView:(nullable UIView *)view; 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Dev/ViewInspector/View/NSObject+HMDescription.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+HMDescriptor.h 3 | // Hummer 4 | // 5 | // Created by didi on 2021/11/3. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface NSObject (HMDescription) 14 | 15 | @property (nonatomic, strong, nullable) NSNumber *hummerId; 16 | 17 | - (NSString *)hm_description; 18 | 19 | /// 标准容器展开 20 | - (NSString *)hm_devDescription; 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Dev/ViewInspector/View/UIView+HMDescription.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+HMDescriptor.h 3 | // Hummer 4 | // 5 | // Created by didi on 2021/11/3. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface UIView (HMDescription) 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Dev/ViewInspector/View/UIView+HMInspector.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+HMInspector.h 3 | // Hummer 4 | // 5 | // Created by didi on 2021/8/6. 6 | // 7 | 8 | #import 9 | #import 10 | #import 11 | 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface UIView (HMInspector) 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Engine/HMBaseWeakValueProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMBaseWeakValueProtocol.h 3 | // Hummer 4 | // 5 | // Created by 唐佳诚 on 2020/8/3. 6 | // 7 | 8 | #import 9 | 10 | @class HMBaseValue; 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @protocol HMBaseWeakValueProtocol 15 | 16 | @required 17 | 18 | @property (readonly, strong, nullable, nonatomic) HMBaseValue *value; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Engine/JavaScriptCore/HMJSCExecutor+Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMJSCExecutor+Internal.h 3 | // Hummer 4 | // 5 | // Created by didi on 2021/2/25. 6 | // 7 | 8 | #import "HMJSCExecutor.h" 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMJSCExecutor (Internal) 13 | 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Engine/JavaScriptCore/HMJSCExecutor.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMJSCExecutor.h 3 | // Hummer 4 | // 5 | // Created by 唐佳诚 on 2021/1/13. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMJSCExecutor : NSObject 13 | 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Engine/N-API/HMBatchMainQueue.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMBatchMainQueue.h 3 | // Hummer 4 | // 5 | // Created by didi on 2023/4/6. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMBatchMainQueue : NSObject 13 | 14 | + (void)run:(dispatch_block_t)block; 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Engine/N-API/HMJSExecutor.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface HMJSExecutor : NSObject 6 | 7 | 8 | - (nullable instancetype)init NS_DESIGNATED_INITIALIZER; 9 | 10 | - (void)enableDebuggerWithTitle:(nullable NSString *)title; 11 | 12 | @end 13 | 14 | NS_ASSUME_NONNULL_END 15 | 16 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Engine/N-API/HMJSStrongValue.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | @interface HMJSStrongValue : HMBaseValue 8 | 9 | @property (nonatomic, assign, readonly) NAPIRef reference; 10 | 11 | - (nullable instancetype)initWithValueRef:(nullable NAPIValue)valueRef executor:(nullable id )executor NS_DESIGNATED_INITIALIZER; 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Engine/N-API/HMJSValue.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMJSValue.h 3 | // Pods 4 | // 5 | // Created by 唐佳诚 on 2021/8/9. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @protocol HMJSValue 14 | 15 | @required 16 | 17 | @property (nonatomic, nullable, assign, readonly) NAPIValue valueRef; 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Engine/N-API/HMNAPIDebuggerHelper.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMHermesCppHelper.h 3 | // Hummer 4 | // 5 | // Created by didi on 2021/10/12. 6 | // 7 | 8 | #import 9 | #import "HMJSExecutor+Private.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface HMNAPIDebuggerHelper : NSObject 14 | 15 | - (void)napiCall_enableDebuggerAndMessageThread:(NAPIEnv)env title:(nullable NSString *)title; 16 | - (void)napiCall_disableDebugger; 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Event/Gesture/HMTouchGestureRecognizer.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMTouchGestureRecognizer.h 3 | // Hummer 4 | // 5 | // Created by didi on 2023/3/10. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | @class HMEventHandler; 12 | 13 | @interface HMTouchGestureRecognizer : UIGestureRecognizer 14 | - (instancetype)initWithHandler:(HMEventHandler *)eventHandler; 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Export/HMExportBaseClass.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMExportBaseClass.h 3 | // Hummer 4 | // 5 | // Created by 唐佳诚 on 2020/6/28. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMExportBaseClass : NSObject 13 | 14 | @property (nonatomic, nullable, copy) NSString *jsFieldName; 15 | 16 | - (nullable SEL)getTestSelector; 17 | 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Export/HMExportBaseClass.m: -------------------------------------------------------------------------------- 1 | // 2 | // HMExportBaseClass.m 3 | // Hummer 4 | // 5 | // Created by 唐佳诚 on 2020/6/28. 6 | // 7 | 8 | #import "HMExportBaseClass.h" 9 | 10 | @implementation HMExportBaseClass 11 | 12 | - (SEL)getTestSelector { 13 | return nil; 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Export/HMExportMethod.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMExportMethod.h 3 | // Hummer 4 | // 5 | // Copyright © 2019年 didi. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMExportMethod : HMExportBaseClass 13 | 14 | @property (nonatomic, assign, nullable) SEL selector; 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Export/HMExportMethod.m: -------------------------------------------------------------------------------- 1 | // 2 | // HMExportMethod.m 3 | // Hummer 4 | // 5 | // Copyright © 2019年 didi. All rights reserved. 6 | // 7 | 8 | #import "HMExportMethod.h" 9 | 10 | @implementation HMExportMethod 11 | 12 | - (SEL)getTestSelector { 13 | return self.selector; 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Export/HMExportProperty.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMExportProperty.h 3 | // Hummer 4 | // 5 | // Copyright © 2019年 didi. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMExportProperty : HMExportBaseClass 13 | 14 | @property (nonatomic, assign, nullable) SEL propertyGetterSelector; 15 | 16 | @property (nonatomic, assign, nullable) SEL propertySetterSelector; 17 | 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Export/HMExportProperty.m: -------------------------------------------------------------------------------- 1 | // 2 | // HMExportProperty.m 3 | // Hummer 4 | // 5 | // Copyright © 2019年 didi. All rights reserved. 6 | // 7 | 8 | #import "HMExportProperty.h" 9 | 10 | @implementation HMExportProperty 11 | 12 | - (SEL)getTestSelector { 13 | return self.propertyGetterSelector; 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Interceptor/HMApplicationRouterProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMApplicationRouterProtocol.h 3 | // Hummer 4 | // 5 | // Created by didi on 2023/5/24. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | /// 应用间跳转 12 | @protocol HMApplicationRouterProtocol 13 | 14 | /// 拦截 UIApplication openUrl, return YES 则不使用系统跳转行为 15 | - (BOOL)handleOpenUrl:(NSURL *)url; 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Interceptor/HMEventTrackProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMEventTrackProtocol.h 3 | // AFDownloadRequestOperation 4 | // 5 | // Created by didi on 2020/8/13. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @protocol HMEventTrackProtocol 13 | @optional 14 | - (void)asyncHandleTrackEvent:(NSDictionary *)event; 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Interceptor/HMFontProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMFontProtocol.h 3 | // Hummer 4 | // 5 | // Created by didi on 2022/10/8. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @protocol HMFontProtocol 13 | 14 | @property (nonatomic ,copy) NSString *defaultFontFamily; 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Interceptor/HMImageProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMImageProtocol.h 3 | // Hummer 4 | // 5 | // Created by didi on 2020/5/21. 6 | // 7 | 8 | #ifndef HMImageProtocol_h 9 | #define HMImageProtocol_h 10 | 11 | @class UIImage; 12 | 13 | @protocol HMImageProtocol 14 | @optional 15 | 16 | /// If a nonull image returned, it will be used. 17 | - (UIImage *)imageView:(id)imgView willSetImage:(UIImage *)image src:(NSString *)src; 18 | 19 | @end 20 | 21 | #endif /* HMImageProtocol_h */ 22 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Interceptor/HMLoggerProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMLoggerProtocol.h 3 | // Hummer 4 | // 5 | // Copyright © 2019年 didi. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @protocol HMLoggerProtocol 14 | @optional 15 | 16 | - (BOOL)handleJSLog:(NSString *)log level:(HMLogLevel)level; 17 | - (BOOL)handleNativeLog:(NSString *)log level:(HMLogLevel)level DEPRECATED_MSG_ATTRIBUTE("违背 namespace 设计");; 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Interceptor/HMWebImageProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMWebImageProtocol.h 3 | // Hummer 4 | // 5 | // Copyright © 2019年 didi. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @protocol HMWebImageProtocol 13 | @optional 14 | 15 | - (void)setImageView:(id)imgView 16 | withURL:(NSURL *)url 17 | placeholderImage:(id)placeholder; 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /iOS/Hummer/Classes/Version/HMUpgradeManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // HMUpgradeManager.h 3 | // Expecta 4 | // 5 | // Created by didi on 2021/7/8. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface HMUpgradeManager : NSObject 13 | + (void)upgrageStorageForNamespace:(NSString *)namespace; 14 | + (void)upgrageStorageForDefaultNamespace; 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /iOS/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | platform :ios, '9.0' 3 | 4 | target 'App' do 5 | # Comment the next line if you don't want to use dynamic frameworks 6 | #use_frameworks! 7 | 8 | # Pods for Example 9 | pod 'Hummer', :path => '..', :subspecs => ["OSSYoga"] 10 | pod 'Yoga' 11 | 12 | target 'AppTests' do 13 | inherit! :search_paths 14 | # Pods for testing 15 | pod 'Quick', '~> 4.0' 16 | pod 'Nimble', '~> 9.0' 17 | end 18 | 19 | end 20 | -------------------------------------------------------------------------------- /iOS/builtin/.eslintignore: -------------------------------------------------------------------------------- 1 | # don't ever lint node_modules 2 | node_modules 3 | # don't lint build output (make sure it's set to your correct build folder name) 4 | dist 5 | # don't lint nyc coverage output 6 | coverage 7 | -------------------------------------------------------------------------------- /iOS/builtin/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | parser: '@typescript-eslint/parser', 4 | plugins: [ 5 | '@typescript-eslint', 6 | ], 7 | extends: [ 8 | 'eslint:recommended', 9 | 'plugin:@typescript-eslint/recommended', 10 | ], 11 | }; 12 | -------------------------------------------------------------------------------- /iOS/builtin/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /iOS/builtin/README.md: -------------------------------------------------------------------------------- 1 | ## 打包流程 2 | 1. npm install 3 | 2. npm run build 4 | 3. cp dist/main.js ../Hummer/Assets/Assets.xcassets/builtin.dataset/builtin.js -------------------------------------------------------------------------------- /iOS/builtin/babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | [ 4 | "babel-plugin-polyfill-corejs3", 5 | { 6 | "method": "usage-pure", 7 | "targets": { 8 | "ios": 9 9 | }, 10 | "shippedProposals": true 11 | } 12 | ] 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /iOS/builtin/hm.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | type: 'library' 3 | } 4 | -------------------------------------------------------------------------------- /iOS/builtin/src/.babelrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/preset-env", 5 | { 6 | "targets": { 7 | "ios": 9 8 | }, 9 | "shippedProposals": true 10 | } 11 | ], 12 | "@babel/preset-typescript" 13 | ], 14 | "plugins": [ 15 | "@babel/plugin-transform-runtime" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /iOS/builtin/src/console.test.ts: -------------------------------------------------------------------------------- 1 | import { getNativeLogFunction, LogLevel } from "./console" 2 | 3 | test('console', () => { 4 | globalThis.nativeLoggingHook = jest.fn() 5 | getNativeLogFunction(LogLevel.info)({}) 6 | expect(globalThis.nativeLoggingHook.mock.calls.length).toBe(1) 7 | expect(globalThis.nativeLoggingHook.mock.calls[0][0]).toBe('{}') 8 | globalThis.nativeLoggingHook = undefined 9 | }) -------------------------------------------------------------------------------- /iOS/builtin/src/utility.ts: -------------------------------------------------------------------------------- 1 | export function isNotEmptyString(value: unknown): value is string { 2 | return typeof value === 'string' && value.length > 0 3 | } 4 | 5 | export function isOfType(varToBeChecked: unknown, propertyToCheckFor: keyof T): varToBeChecked is T { 6 | return (varToBeChecked as (T | undefined | null))?.[propertyToCheckFor] !== undefined 7 | } -------------------------------------------------------------------------------- /market/component_material_market.md: -------------------------------------------------------------------------------- 1 | # 组件物料市场 2 | 3 | | 组件名 | 组件仓库 | 作者 | 描述 | 4 | | ---- | ---- | ---- | ---- | 5 | | checkbox | https://xxx/xxx | 测试 | 复选框组件 | -------------------------------------------------------------------------------- /tenon/.gitignore: -------------------------------------------------------------------------------- 1 | # log 2 | *.log 3 | 4 | # Editor 5 | .DS_Store 6 | .idea 7 | # Common 8 | node_modules 9 | coverage 10 | explorations 11 | packages/*/dist/* 12 | package-lock.json 13 | report.*.json -------------------------------------------------------------------------------- /tenon/.prettierrc: -------------------------------------------------------------------------------- 1 | semi: false 2 | singleQuote: true 3 | printWidth: 80 4 | -------------------------------------------------------------------------------- /tenon/README.md: -------------------------------------------------------------------------------- 1 | # Tenon 2 | > MVVM For Hummer 3 | 针对 Hummer 的 MVVM 框架 4 | 5 | ## Tenon Vue 架构图 6 | ![img](https://dpubstatic.udache.com/static/dpubimg/QGHZeNfJ1b/Tenon.png) 7 | 8 | ## Tenon React 开发中,敬请期待 9 | ## [官方文档](https://hummer.didi.cn/doc-tenon#/zh-CN/) 10 | 11 | -------------------------------------------------------------------------------- /tenon/__tests__/setup.js: -------------------------------------------------------------------------------- 1 | globalThis.Hummer = { 2 | env: { 3 | namespace: 'Hummer' 4 | } 5 | } -------------------------------------------------------------------------------- /tenon/lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "tagVersionPrefix": "tenon_", 3 | "packages": [ 4 | "packages/*" 5 | ], 6 | "version": "independent", 7 | "npmClient": "npm", 8 | "command": { 9 | "publish": { 10 | "message": "chore(release): tenon publish", 11 | "allowBranch": [ 12 | "master", 13 | "release" 14 | ], 15 | "ignoreChanges": [ 16 | "*.md", 17 | "lerna.json" 18 | ], 19 | "registry": "https://registry.npmjs.org/" 20 | }, 21 | "npmClientArgs": [ 22 | "--no-package-lock" 23 | ] 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /tenon/packages/global.d.ts: -------------------------------------------------------------------------------- 1 | declare var __GLOBAL__: any 2 | declare var __DEV__: Boolean 3 | declare const Hummer: any 4 | declare const Memory:any; 5 | declare const NODE_DEBUG_ENV: Boolean -------------------------------------------------------------------------------- /tenon/packages/tenon-compiler/README.md: -------------------------------------------------------------------------------- 1 | # `runtime` 2 | 3 | > TODO: description 4 | 5 | ## Usage 6 | 7 | ``` 8 | const runtime = require('runtime'); 9 | 10 | // TODO: DEMONSTRATE API 11 | ``` 12 | -------------------------------------------------------------------------------- /tenon/packages/tenon-compiler/src/parserOptions.ts: -------------------------------------------------------------------------------- 1 | import {isCustomNativeTag, isNativeTags} from '@hummer/tenon-utils' 2 | 3 | 4 | 5 | export const parserOptions = { 6 | isNativeTag: (tag:string) => { 7 | return isNativeTags(tag) || isCustomNativeTag(tag) 8 | }, 9 | isBuiltInComponent: () => {} 10 | } -------------------------------------------------------------------------------- /tenon/packages/tenon-compiler/src/transforms/transformComment.ts: -------------------------------------------------------------------------------- 1 | import { NodeTransform, NodeTypes } from '@vue/compiler-core' 2 | 3 | /** 4 | * 去除Comment节点 5 | * @param node 当前节点 6 | * @param context 上下文 7 | */ 8 | export const transformComment: NodeTransform = (node, context) => { 9 | if(node.type === NodeTypes.COMMENT){ 10 | context.removeNode(node) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /tenon/packages/tenon-compiler/src/transforms/vShow.ts: -------------------------------------------------------------------------------- 1 | import { DirectiveTransform } from '@vue/compiler-core' 2 | import { createDOMCompilerError, DOMErrorCodes } from '../errors' 3 | import { V_SHOW } from '../runtimeHelpers' 4 | 5 | export const transformShow: DirectiveTransform = (dir, node, context) => { 6 | const { exp, loc } = dir 7 | if (!exp) { 8 | context.onError( 9 | createDOMCompilerError(DOMErrorCodes.X_V_SHOW_NO_EXPRESSION, loc) 10 | ) 11 | } 12 | 13 | return { 14 | props: [], 15 | needRuntime: context.helper(V_SHOW) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /tenon/packages/tenon-core/README.md: -------------------------------------------------------------------------------- 1 | # Tenon Core 2 | 3 | Tenon Driver For Hummer 4 | -------------------------------------------------------------------------------- /tenon/packages/tenon-core/__tests__/index.test.ts: -------------------------------------------------------------------------------- 1 | describe('base', () => { 2 | test('base render', () => { 3 | 4 | }) 5 | }) 6 | -------------------------------------------------------------------------------- /tenon/packages/tenon-core/src/helper/page-helper.ts: -------------------------------------------------------------------------------- 1 | export type PageConfig = { 2 | canScroll: Boolean 3 | } 4 | 5 | 6 | export interface PageComponent { 7 | onLoad: Function | null, 8 | onShow: Function | null, 9 | onHide: Function | null, 10 | onUnload: Function | null, 11 | onBack: Function | null, 12 | pageConfig: PageConfig | null 13 | } -------------------------------------------------------------------------------- /tenon/packages/tenon-core/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './nodes/index' 2 | export * from './utils/style' 3 | 4 | 5 | import {Document} from './nodes/document' 6 | 7 | export const document = new Document(); 8 | 9 | -------------------------------------------------------------------------------- /tenon/packages/tenon-core/src/nodes/components/anchor.ts: -------------------------------------------------------------------------------- 1 | import {View as ViewComponent} from '@hummer/hummer-front' 2 | import {Base} from '../Base' 3 | import {NODE_ANCHOR} from '@hummer/tenon-utils' 4 | 5 | export class Anchor extends Base{ 6 | __NAME = NODE_ANCHOR 7 | 8 | constructor(){ 9 | super(); 10 | this.element = new ViewComponent(); 11 | this.element.style = { 12 | display: "none" 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tenon/packages/tenon-core/src/nodes/components/extend/loadmore.ts: -------------------------------------------------------------------------------- 1 | import {View} from '../view' 2 | import {NODE_LOADMORE} from '@hummer/tenon-utils' 3 | 4 | export class LoadMore extends View{ 5 | __NAME = NODE_LOADMORE 6 | } 7 | -------------------------------------------------------------------------------- /tenon/packages/tenon-core/src/nodes/components/extend/refresh.ts: -------------------------------------------------------------------------------- 1 | import {View} from '../view' 2 | import {NODE_REFRESH} from '@hummer/tenon-utils' 3 | 4 | export class Refresh extends View{ 5 | __NAME = NODE_REFRESH 6 | } 7 | -------------------------------------------------------------------------------- /tenon/packages/tenon-core/src/nodes/components/view.ts: -------------------------------------------------------------------------------- 1 | import {View as ViewComponent} from '@hummer/hummer-front' 2 | import {Base} from '../Base' 3 | import {NODE_VIEW} from '@hummer/tenon-utils' 4 | 5 | export class View extends Base{ 6 | __NAME = NODE_VIEW 7 | 8 | constructor(isView:boolean = true){ 9 | super(); 10 | if(!isView){ 11 | return 12 | } 13 | this.element = new ViewComponent(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tenon/packages/tenon-core/src/nodes/index.ts: -------------------------------------------------------------------------------- 1 | export * from './Base' 2 | export * from './component' 3 | export * from './types' 4 | 5 | export * from './components/image' 6 | export * from './components/input' 7 | export * from './components/text' 8 | export * from './components/view' 9 | export * from './components/textarea' 10 | export * from './components/page' 11 | export * from './components/button' 12 | export * from './components/switch' -------------------------------------------------------------------------------- /tenon/packages/tenon-dev-tool/README.md: -------------------------------------------------------------------------------- 1 | # Tenon DevTool -------------------------------------------------------------------------------- /tenon/packages/tenon-dev-tool/__tests__/index.test.ts: -------------------------------------------------------------------------------- 1 | describe('base', () => { 2 | 3 | test('base devtool', () => { 4 | 5 | }) 6 | 7 | }) 8 | -------------------------------------------------------------------------------- /tenon/packages/tenon-dev-tool/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@hummer/tenon-dev-tool", 3 | "version": "0.2.6", 4 | "description": "Tenon Dev Tool", 5 | "author": "duanlikang", 6 | "homepage": "", 7 | "license": "ISC", 8 | "main": "dist/tenon-dev-tool.cjs.js", 9 | "types": "dist/types/index.d.ts", 10 | "typings": "dist/types/index.d.ts", 11 | "publishConfig": { 12 | "access": "public" 13 | }, 14 | "files": [ 15 | "dist" 16 | ], 17 | "scripts": { 18 | "test": "echo \"Error: run tests from root\" && exit 1" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tenon/packages/tenon-react/__tests__/index.test.ts: -------------------------------------------------------------------------------- 1 | describe('base', () => { 2 | test('base render', () => { 3 | 4 | }) 5 | }) 6 | -------------------------------------------------------------------------------- /tenon/packages/tenon-react/src/events/event.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 获取标准的 Event 对象,进行事件逻辑的抽象 3 | */ 4 | export function getEvent(event:any){ 5 | // TODO 增加 Event 统一处理 6 | return event 7 | } -------------------------------------------------------------------------------- /tenon/packages/tenon-react/src/events/listener.ts: -------------------------------------------------------------------------------- 1 | import {Base as Element} from "@hummer/tenon-core" 2 | import {getFiberCurrentPropsFromNode} from '../hostConfig/utils' 3 | /** 4 | * 获取标准的 Listener函数 5 | */ 6 | export function getListener(node: Element, propName: string, func:Function){ 7 | return function(...args: Array){ 8 | let props = getFiberCurrentPropsFromNode(node); 9 | let originFunc = props[propName]; 10 | originFunc.apply(null, args) 11 | } 12 | } -------------------------------------------------------------------------------- /tenon/packages/tenon-react/src/index.ts: -------------------------------------------------------------------------------- 1 | import {render} from './render' 2 | import {register as registerComponent} from '@hummer/tenon-core' 3 | 4 | export * from '@hummer/tenon-core' 5 | export * from './render' 6 | export * from './hook' 7 | 8 | export default { 9 | render, 10 | register: registerComponent 11 | } -------------------------------------------------------------------------------- /tenon/packages/tenon-react/src/lifecycle/global-lifecycle.ts: -------------------------------------------------------------------------------- 1 | import {LifeCycle, lifeCycles, triggerLifeCycle} from './index' 2 | 3 | export const GlobalLifeCycles:Record = initGlobalLifeCycle() 4 | 5 | function initGlobalLifeCycle():Record{ 6 | let globalLifeCycle:any= {} 7 | lifeCycles.forEach((lifecycle: LifeCycle) => { 8 | globalLifeCycle[lifecycle] = function(){ 9 | return triggerLifeCycle(lifecycle) 10 | } 11 | }) 12 | 13 | return globalLifeCycle 14 | } -------------------------------------------------------------------------------- /tenon/packages/tenon-store/src/injectKey.ts: -------------------------------------------------------------------------------- 1 | import { inject } from '@hummer/tenon-vue' 2 | 3 | export const storeKey = 'store' 4 | 5 | export function useStore (key?:string) { 6 | return inject(key || storeKey) 7 | } 8 | -------------------------------------------------------------------------------- /tenon/packages/tenon-store/src/plugins/utils/types.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Store的数据操作类型 3 | */ 4 | export enum OperationType { 5 | ADD, 6 | DELETE, 7 | UPDATE 8 | } 9 | 10 | export interface Operation{ 11 | type: OperationType, 12 | key: Array, 13 | value: any 14 | } 15 | 16 | export type Operations = Array -------------------------------------------------------------------------------- /tenon/packages/tenon-utils/README.md: -------------------------------------------------------------------------------- 1 | # `runtime` 2 | 3 | > TODO: description 4 | 5 | > FIXME: asd 6 | > DK: asd 7 | ## Usage 8 | 9 | ``` 10 | const runtime = require('runtime'); 11 | 12 | // TODO: DEMONSTRATE API 13 | ``` 14 | -------------------------------------------------------------------------------- /tenon/packages/tenon-utils/__tests__/index.test.ts: -------------------------------------------------------------------------------- 1 | describe('base', () => { 2 | 3 | test('base render', () => { 4 | 5 | }) 6 | 7 | }) 8 | -------------------------------------------------------------------------------- /tenon/packages/tenon-utils/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@hummer/tenon-utils", 3 | "version": "1.2.15", 4 | "description": "Tenon工具库", 5 | "author": "duanlikang", 6 | "homepage": "", 7 | "license": "ISC", 8 | "main": "dist/tenon-utils.cjs.js", 9 | "types": "dist/types/index.d.ts", 10 | "typings": "dist/types/index.d.ts", 11 | "publishConfig": { 12 | "access": "public" 13 | }, 14 | "files": [ 15 | "dist", 16 | "src" 17 | ], 18 | "scripts": { 19 | "test": "echo \"Error: run tests from root\" && exit 1" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tenon/packages/tenon-utils/src/components/index.ts: -------------------------------------------------------------------------------- 1 | import {makeMap} from '../utils' 2 | const isNativeTagReg = /^ex-/ 3 | 4 | export const NativeTags = "view,text,image,input,textarea,button,scroller,switch,refresh,loadmore,list,viewpager" 5 | export const isNativeTags = makeMap(NativeTags) 6 | export const isCustomNativeTag = (tag:string) => { 7 | return isNativeTagReg.test(tag) 8 | } 9 | 10 | export * from './types' -------------------------------------------------------------------------------- /tenon/packages/tenon-utils/src/index.ts: -------------------------------------------------------------------------------- 1 | export const extend = Object.assign 2 | export * from './normalizeProp' 3 | export * from './style' 4 | export * from './utils' 5 | export * from './components' -------------------------------------------------------------------------------- /tenon/packages/tenon-utils/src/normalizeProp.ts: -------------------------------------------------------------------------------- 1 | const listDelimiterRE = /;(?![^(]*\))/g 2 | const propertyDelimiterRE = /:(.+)/ 3 | export type NormalizedStyle = Record 4 | 5 | export function parseStringStyle(cssText: string): NormalizedStyle { 6 | const ret: NormalizedStyle = {} 7 | cssText.split(listDelimiterRE).forEach(item => { 8 | if (item) { 9 | const tmp = item.split(propertyDelimiterRE) 10 | tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()) 11 | } 12 | }) 13 | return ret 14 | } 15 | -------------------------------------------------------------------------------- /tenon/packages/tenon-utils/src/style/common/background.ts: -------------------------------------------------------------------------------- 1 | export const CLIP_LIST = [ 2 | 'border-box', 3 | 'padding-box', 4 | 'content-box', 5 | 'text' 6 | ] 7 | 8 | export const REPEAT_LIST = [ 9 | 'repeat-x', 10 | 'repeat-y', 11 | 'repeat', 12 | 'space', 13 | 'round', 14 | 'no-repeat' 15 | ] 16 | 17 | export const SIZE_LIST = [ 18 | 'contain', 19 | 'cover' 20 | ] -------------------------------------------------------------------------------- /tenon/packages/tenon-utils/src/style/common/default-style.ts: -------------------------------------------------------------------------------- 1 | export const DefaultStyle = { 2 | "view": { 3 | "backgroundColor": "inherit" 4 | }, 5 | "text":{ 6 | "color": "inherit" 7 | } 8 | } 9 | 10 | 11 | /** 12 | * 根据Tag,获取默认样式 13 | * @param tag 14 | */ 15 | export function getDefaultStyleByTag(tag: string):Record{ 16 | let style = {} 17 | switch(tag){ 18 | case 'view': 19 | style = DefaultStyle['view'] 20 | break; 21 | case 'text': 22 | style = DefaultStyle['text'] 23 | break; 24 | } 25 | return style 26 | } -------------------------------------------------------------------------------- /tenon/packages/tenon-utils/src/style/transformer/attrname.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 属性名驼峰转换 3 | * @param style 待转换的Style值 4 | */ 5 | export function transformAttr(style:Record){ 6 | let tempStyle:Record = {} 7 | Object.keys(style).forEach(key => { 8 | let humpKey = transformHumpKey(key) 9 | tempStyle[humpKey] = style[key] 10 | }) 11 | return tempStyle 12 | } 13 | 14 | function transformHumpKey(key: string):string{ 15 | let humpKey = key.replace(/-(\w)/g, ($0, $1) => { 16 | return $1.toUpperCase() 17 | }) 18 | return humpKey 19 | } -------------------------------------------------------------------------------- /tenon/packages/tenon-vue/__tests__/index.test.ts: -------------------------------------------------------------------------------- 1 | describe('base', () => { 2 | 3 | test('base render', () => { 4 | 5 | }) 6 | 7 | }) 8 | -------------------------------------------------------------------------------- /tenon/packages/tenon-vue/src/index.d.ts: -------------------------------------------------------------------------------- 1 | declare var __GLOBAL__: any 2 | declare var __DEV__: Boolean 3 | export * from './index' -------------------------------------------------------------------------------- /tenon/packages/tenon-vue/src/index.ts: -------------------------------------------------------------------------------- 1 | import {render} from './runtime' 2 | 3 | export * from './runtime' 4 | export * from './utils/style' 5 | 6 | export default { 7 | render 8 | } 9 | -------------------------------------------------------------------------------- /tenon/packages/tenon-vue/src/runtime/handlers/attrs.ts: -------------------------------------------------------------------------------- 1 | import { Base } from '../nodes/Base' 2 | 3 | export function patchAttrs( 4 | el: Base, 5 | key: string, 6 | prevValue: any, 7 | nextValue: any){ 8 | 9 | el.setAttribute(key, nextValue); 10 | } -------------------------------------------------------------------------------- /tenon/packages/tenon-vue/src/runtime/handlers/class.ts: -------------------------------------------------------------------------------- 1 | import { Base } from '../nodes/Base' 2 | export function patchClass( 3 | el: Base, 4 | key: string, 5 | prevValue: any, 6 | nextValue: any){ 7 | // 处理Class的绑定 8 | el.setAttribute(key, nextValue); 9 | } 10 | -------------------------------------------------------------------------------- /tenon/packages/tenon-vue/src/runtime/handlers/style.ts: -------------------------------------------------------------------------------- 1 | import { Base } from '../nodes/Base' 2 | import {parseStringStyle, styleTransformer} from '@hummer/tenon-utils' 3 | export function patchStyle( 4 | el: Base, 5 | key: string, 6 | prevValue: any, 7 | nextValue: any){ 8 | 9 | let style = nextValue 10 | if(typeof nextValue === 'string'){ 11 | style = parseStringStyle(nextValue) 12 | } 13 | // 样式转换为 Hummer 特有样式 14 | style = styleTransformer.transformStyle(style, el); 15 | 16 | el.setStyle(style, true) 17 | } 18 | -------------------------------------------------------------------------------- /tenon/packages/tenon-vue/src/runtime/helper/page-helper.ts: -------------------------------------------------------------------------------- 1 | export type PageConfig = { 2 | canScroll: Boolean 3 | } 4 | 5 | 6 | export interface PageComponent { 7 | onLoad: Function | null, 8 | onReady: Function | null, 9 | onShow: Function | null, 10 | onHide: Function | null, 11 | onUnload: Function | null, 12 | onBack: Function | null, 13 | pageConfig: PageConfig | null 14 | } -------------------------------------------------------------------------------- /tenon/packages/tenon-vue/src/runtime/nodes/components/anchor.ts: -------------------------------------------------------------------------------- 1 | import {View as ViewComponent} from '@hummer/hummer-front' 2 | import {Base} from '../Base' 3 | import {NODE_ANCHOR} from '@hummer/tenon-utils' 4 | 5 | export class Anchor extends Base{ 6 | __NAME = NODE_ANCHOR 7 | 8 | constructor(){ 9 | super(); 10 | this.element = new ViewComponent(); 11 | this.element.style = { 12 | display: "none" 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tenon/packages/tenon-vue/src/runtime/nodes/components/extend/loadmore.ts: -------------------------------------------------------------------------------- 1 | import {View} from '../view' 2 | import {NODE_LOADMORE} from '@hummer/tenon-utils' 3 | 4 | export class LoadMore extends View{ 5 | __NAME = NODE_LOADMORE 6 | } 7 | -------------------------------------------------------------------------------- /tenon/packages/tenon-vue/src/runtime/nodes/components/extend/refresh.ts: -------------------------------------------------------------------------------- 1 | import {View} from '../view' 2 | import {NODE_REFRESH} from '@hummer/tenon-utils' 3 | 4 | export class Refresh extends View{ 5 | __NAME = NODE_REFRESH 6 | } 7 | -------------------------------------------------------------------------------- /tenon/packages/tenon-vue/src/runtime/nodes/components/view.ts: -------------------------------------------------------------------------------- 1 | import {View as ViewComponent} from '@hummer/hummer-front' 2 | import {Base} from '../Base' 3 | import {NODE_VIEW} from '@hummer/tenon-utils' 4 | 5 | export class View extends Base{ 6 | __NAME = NODE_VIEW 7 | 8 | constructor(isView:boolean = true){ 9 | super(); 10 | if(!isView){ 11 | return 12 | } 13 | this.element = new ViewComponent(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tenon/packages/tenon-vue/src/runtime/nodes/index.ts: -------------------------------------------------------------------------------- 1 | export * from './Base' 2 | export * from './component' 3 | 4 | export * from './components/image' 5 | export * from './components/input' 6 | 7 | // FIXME: Text组件命令与RuntimeCore命名冲突,暂时不导出Text组件 8 | // export * from './components/text' 9 | export * from './components/view' 10 | export * from './components/textarea' 11 | export * from './components/page' 12 | export * from './components/button' 13 | export * from './components/switch' -------------------------------------------------------------------------------- /tenon/packages/tenon-vue/src/utils/adapter.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 全局适配Api 3 | */ 4 | export function adapterApi(){ 5 | adapterTimeInterval() 6 | } 7 | 8 | /** 9 | * 适配Time Interval 10 | */ 11 | function adapterTimeInterval(){ 12 | let _interval = __GLOBAL__.setInterval 13 | __GLOBAL__.setInterval = function(...args:any){ 14 | let intervalHandler = _interval(args) 15 | return intervalHandler 16 | } 17 | } -------------------------------------------------------------------------------- /tenon/packages/tenon/README.md: -------------------------------------------------------------------------------- 1 | # `@hummer/Tenon` 2 | > 针对 Tenon Vue的包含 Tenon Vue 运行时 和 Tenon Compiler 编译时代码。 3 | > 允许代码使用 render 函数。 -------------------------------------------------------------------------------- /tenon/packages/tenon/__tests__/index.test.ts: -------------------------------------------------------------------------------- 1 | describe('base', () => { 2 | 3 | test('base render', () => { 4 | 5 | }) 6 | 7 | }) 8 | --------------------------------------------------------------------------------