├── .gitignore ├── JYMagicCube.podspec ├── JYWKJSEngine.podspec ├── LICENSE ├── README.md ├── android ├── .gitignore ├── README.md ├── app │ ├── .gitignore │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ ├── androidTest │ │ └── java │ │ │ └── com │ │ │ └── hellobike │ │ │ └── magiccube │ │ │ └── ExampleInstrumentedTest.kt │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── assets │ │ │ └── DIN-Alternate.ttf │ │ ├── java │ │ │ └── com │ │ │ │ └── hellobike │ │ │ │ └── magiccube │ │ │ │ └── demo │ │ │ │ ├── CoroutineSupport.kt │ │ │ │ ├── MagicListActivity.kt │ │ │ │ ├── MainActivity.kt │ │ │ │ ├── MyApp.kt │ │ │ │ ├── TestTemplate1.kt │ │ │ │ ├── TestTemplate2.kt │ │ │ │ ├── bridges │ │ │ │ └── MyCustomBridge01.kt │ │ │ │ ├── configs │ │ │ │ └── GlobalConfig.kt │ │ │ │ ├── logcat │ │ │ │ ├── MonitorLogcat.java │ │ │ │ └── WSLog.java │ │ │ │ ├── logger.kt │ │ │ │ └── preview │ │ │ │ ├── PreviewActivity.kt │ │ │ │ ├── PreviewListActivity.kt │ │ │ │ └── controller │ │ │ │ ├── IPreviewCallback.kt │ │ │ │ ├── PreviewCache.kt │ │ │ │ └── PreviewController.kt │ │ └── res │ │ │ ├── drawable-v24 │ │ │ └── ic_launcher_foreground.xml │ │ │ ├── drawable │ │ │ ├── aaa.png │ │ │ ├── ic_launcher_background.xml │ │ │ ├── task_btn_bg.webp │ │ │ ├── task_btn_bg_png.9.png │ │ │ └── task_btn_bg_png2.png │ │ │ ├── layout │ │ │ ├── activity_gradient.xml │ │ │ ├── activity_magic_card.xml │ │ │ ├── activity_main.xml │ │ │ ├── activity_nine_path.xml │ │ │ ├── activity_preview.xml │ │ │ ├── activity_preview_list.xml │ │ │ ├── activity_quickjs.xml │ │ │ ├── activity_recyclerview.xml │ │ │ ├── activity_release_case.xml │ │ │ ├── activity_test.xml │ │ │ ├── activity_test2.xml │ │ │ ├── item_button.xml │ │ │ ├── item_demo.xml │ │ │ └── item_magic_cube.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher2.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher2.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher2.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── check.png │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher2.png │ │ │ ├── ic_launcher_round.png │ │ │ ├── test.png │ │ │ └── test2.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher2.png │ │ │ └── ic_launcher_round.png │ │ │ ├── values-night │ │ │ └── themes.xml │ │ │ ├── values │ │ │ ├── colors.xml │ │ │ ├── strings.xml │ │ │ └── themes.xml │ │ │ └── xml │ │ │ ├── network_security_config.xml │ │ │ └── template1.xml │ │ └── test │ │ └── java │ │ └── com │ │ └── hellobike │ │ └── magiccube │ │ └── ExampleUnitTest.kt ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── library-magiccube │ ├── .gitignore │ ├── build.gradle │ ├── consumer-rules.pro │ ├── proguard-rules.pro │ └── src │ │ ├── androidTest │ │ └── java │ │ │ └── com │ │ │ └── hellobike │ │ │ └── library_magiccube │ │ │ └── ExampleInstrumentedTest.kt │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── hellobike │ │ │ │ └── magiccube │ │ │ │ ├── LoadStyleParams.kt │ │ │ │ ├── StyleManager.kt │ │ │ │ ├── cache │ │ │ │ ├── DiskLruCache.java │ │ │ │ ├── StrictLineReader.java │ │ │ │ ├── StyleCache.kt │ │ │ │ └── Utils.java │ │ │ │ ├── loader │ │ │ │ ├── WKLoaderCenter.kt │ │ │ │ ├── WKLoaderParam.kt │ │ │ │ └── insert │ │ │ │ │ ├── IWKInsert.kt │ │ │ │ │ ├── IWKInsertDialogListener.kt │ │ │ │ │ ├── IWKInsertLoader.kt │ │ │ │ │ ├── IWKInsertLoaderListener.kt │ │ │ │ │ ├── MagicBoxEventHandler.kt │ │ │ │ │ ├── WKDialog.kt │ │ │ │ │ ├── WKInsertImpl.kt │ │ │ │ │ └── WKInsertLoaderImpl.kt │ │ │ │ ├── model │ │ │ │ ├── MagicValue.kt │ │ │ │ ├── PropertyModel.kt │ │ │ │ ├── ScanUtils.kt │ │ │ │ ├── StyleModel.kt │ │ │ │ ├── TargetParser.kt │ │ │ │ ├── TypeName.kt │ │ │ │ ├── TypeNames.kt │ │ │ │ ├── contractmodel │ │ │ │ │ ├── ActionViewModel.kt │ │ │ │ │ ├── ActiveStyleViewModel.kt │ │ │ │ │ ├── BaseViewModel.kt │ │ │ │ │ ├── ClickActionModel.kt │ │ │ │ │ ├── CustomerViewModel.kt │ │ │ │ │ ├── ExposeActionModel.kt │ │ │ │ │ ├── ImageViewModel.kt │ │ │ │ │ ├── LayoutViewModel.kt │ │ │ │ │ ├── LottieViewModel.kt │ │ │ │ │ ├── ProgressViewModel.kt │ │ │ │ │ ├── ReportModel.kt │ │ │ │ │ ├── RichTextModel.kt │ │ │ │ │ ├── SpanViewModel.kt │ │ │ │ │ ├── SpecialLayoutViewModel.kt │ │ │ │ │ ├── StyleViewModel.kt │ │ │ │ │ ├── TextViewModel.kt │ │ │ │ │ └── configs │ │ │ │ │ │ ├── MagicGravity.kt │ │ │ │ │ │ └── MagicPosition.kt │ │ │ │ ├── property │ │ │ │ │ ├── BooleanProperty.kt │ │ │ │ │ ├── EnumProperty.kt │ │ │ │ │ ├── IntProperty.kt │ │ │ │ │ ├── ListProperty.kt │ │ │ │ │ ├── MapProperty.kt │ │ │ │ │ └── StringProperty.kt │ │ │ │ └── rule │ │ │ │ │ ├── BaseRuleModel.kt │ │ │ │ │ └── FontSizeRuleModel.kt │ │ │ │ ├── net │ │ │ │ ├── CoroutineSupport.kt │ │ │ │ ├── FileDownloader.kt │ │ │ │ └── NetCore.kt │ │ │ │ ├── parser │ │ │ │ ├── ActionParser.kt │ │ │ │ ├── ActiveStyleParser.kt │ │ │ │ ├── BaseParser.kt │ │ │ │ ├── CustomerParser.kt │ │ │ │ ├── DSLParser.kt │ │ │ │ ├── ImageParser.kt │ │ │ │ ├── LayoutParser.kt │ │ │ │ ├── LottieParser.kt │ │ │ │ ├── ProgressParser.kt │ │ │ │ ├── RichTextParser.kt │ │ │ │ ├── SpanParser.kt │ │ │ │ ├── SpecialLayoutParser.kt │ │ │ │ ├── StyleParser.kt │ │ │ │ ├── TextParser.kt │ │ │ │ ├── engine │ │ │ │ │ ├── ColorParser.kt │ │ │ │ │ ├── Configs.kt │ │ │ │ │ ├── GradientParser.kt │ │ │ │ │ ├── INodeAdapter.kt │ │ │ │ │ ├── IViewEngine.kt │ │ │ │ │ ├── ViewEngineManager.kt │ │ │ │ │ ├── YogaEngine.kt │ │ │ │ │ ├── YogaFlexConfigs.kt │ │ │ │ │ └── YogaFlexViewEngine.kt │ │ │ │ ├── spans │ │ │ │ │ ├── CustomTypefaceSpan.java │ │ │ │ │ ├── LineThroughSpan.kt │ │ │ │ │ ├── MTCustomerDrawableSpan.kt │ │ │ │ │ ├── WKAlignMiddleImageSpan.java │ │ │ │ │ ├── WKMarginImageSpan.java │ │ │ │ │ └── WKMarginImageUrlSpan.kt │ │ │ │ ├── timer │ │ │ │ │ ├── CountDownTimerHelper.kt │ │ │ │ │ └── MCCountDownTimer.java │ │ │ │ └── widget │ │ │ │ │ ├── BaseWidget.kt │ │ │ │ │ ├── ContainerWidget.kt │ │ │ │ │ ├── CountDownWidget.kt │ │ │ │ │ ├── CustomerWidget.kt │ │ │ │ │ ├── IWidget.kt │ │ │ │ │ ├── ImageWidget.kt │ │ │ │ │ ├── ListItemViewHolder.kt │ │ │ │ │ ├── ListViewWidget.kt │ │ │ │ │ ├── LottieWidget.kt │ │ │ │ │ ├── ProgressWidget.kt │ │ │ │ │ ├── RecyclerViewAdapter.kt │ │ │ │ │ ├── TagWidget.kt │ │ │ │ │ ├── TextWidget.kt │ │ │ │ │ └── WKLinearLayoutManager.kt │ │ │ │ ├── share │ │ │ │ ├── ILifecycleData.kt │ │ │ │ └── WKLifecycleCore.kt │ │ │ │ ├── utils │ │ │ │ ├── BorderHelper.kt │ │ │ │ ├── EncryptUtils.kt │ │ │ │ ├── LottieHelper.kt │ │ │ │ ├── String.kt │ │ │ │ ├── Toasts.kt │ │ │ │ ├── TypefaceUtils.kt │ │ │ │ ├── UIUtils.kt │ │ │ │ └── YogaUtils.kt │ │ │ │ ├── v2 │ │ │ │ ├── AsyncTaskQueue.kt │ │ │ │ ├── CardContext.kt │ │ │ │ ├── CardService.kt │ │ │ │ ├── MagicCard.kt │ │ │ │ ├── OnLoadStateListener.kt │ │ │ │ ├── PreloadCardService.kt │ │ │ │ ├── RenderReason.kt │ │ │ │ ├── StyleModelCache.kt │ │ │ │ ├── WidgetFactory.kt │ │ │ │ ├── click │ │ │ │ │ ├── ICountDownResultAdapter.kt │ │ │ │ │ ├── ILoading.kt │ │ │ │ │ ├── IOnCardClickListener.kt │ │ │ │ │ ├── IOnCardCountDownListener.kt │ │ │ │ │ ├── IOnCubeCallNativeListener.kt │ │ │ │ │ ├── IOnCubeClickListener.kt │ │ │ │ │ ├── IOnCubeCloseListener.kt │ │ │ │ │ ├── IOnCubeCountDownListener.kt │ │ │ │ │ ├── IOnCubeDataChangedListener.kt │ │ │ │ │ ├── LoadingHandler.kt │ │ │ │ │ ├── OnCardClickHandler.kt │ │ │ │ │ └── dialog │ │ │ │ │ │ └── AlertDescriptor.kt │ │ │ │ ├── configs │ │ │ │ │ ├── Constants.kt │ │ │ │ │ ├── DefaultDeviceInfo.kt │ │ │ │ │ ├── DefaultLocationManager.kt │ │ │ │ │ ├── DefaultNetHandler.kt │ │ │ │ │ ├── IAjaxResponseHandler.kt │ │ │ │ │ ├── ICardJSBridge.kt │ │ │ │ │ ├── IDeviceInfo.kt │ │ │ │ │ ├── IDownloadResultHandler.kt │ │ │ │ │ ├── IGlobalClickHandler.kt │ │ │ │ │ ├── ILocationManager.kt │ │ │ │ │ ├── INetHandler.kt │ │ │ │ │ ├── IReportEvent.kt │ │ │ │ │ ├── IRouter.kt │ │ │ │ │ ├── IUserManager.kt │ │ │ │ │ ├── MagicConfig.kt │ │ │ │ │ ├── MagicCube.kt │ │ │ │ │ ├── MagicInfo.kt │ │ │ │ │ ├── MagicStarer.kt │ │ │ │ │ └── UserManagerDefault.kt │ │ │ │ ├── data │ │ │ │ │ ├── Data.kt │ │ │ │ │ ├── ListItemScopeData.kt │ │ │ │ │ ├── LocalMethodBridge.kt │ │ │ │ │ ├── SafeMap.kt │ │ │ │ │ └── ScopeData.kt │ │ │ │ ├── ext │ │ │ │ │ └── Log.kt │ │ │ │ ├── js │ │ │ │ │ ├── IJsEngine.kt │ │ │ │ │ ├── IMainJSRuntime.kt │ │ │ │ │ ├── IVoidFuncDescriptor.kt │ │ │ │ │ ├── JSEngine.kt │ │ │ │ │ ├── JSEngineInitializer.kt │ │ │ │ │ ├── JSHelper.kt │ │ │ │ │ ├── MagicCardJsEngine.kt │ │ │ │ │ ├── MainJSEngine.kt │ │ │ │ │ ├── MainJSRuntime.kt │ │ │ │ │ ├── bridges │ │ │ │ │ │ ├── global │ │ │ │ │ │ │ ├── WukongBridge.kt │ │ │ │ │ │ │ └── WukongConsolePlugin.java │ │ │ │ │ │ ├── model │ │ │ │ │ │ │ └── SetStateFuncArgs.kt │ │ │ │ │ │ └── wk │ │ │ │ │ │ │ ├── BaseCardWKBridge.kt │ │ │ │ │ │ │ ├── ExternalWKBridge.kt │ │ │ │ │ │ │ ├── IJSBridgeProto.kt │ │ │ │ │ │ │ ├── IWKVoidBridge.kt │ │ │ │ │ │ │ ├── JSBridgeProtoImpl.kt │ │ │ │ │ │ │ ├── MainJsObject.kt │ │ │ │ │ │ │ ├── WKAjaxBridge.kt │ │ │ │ │ │ │ ├── WKBridges.kt │ │ │ │ │ │ │ ├── WKCallNativeBridge.kt │ │ │ │ │ │ │ ├── WKDismissBridge.kt │ │ │ │ │ │ │ ├── WKSetStateBridge.kt │ │ │ │ │ │ │ ├── WKSetTimeoutBridge.kt │ │ │ │ │ │ │ └── WKShowWukongDialogBridge.kt │ │ │ │ │ └── wrapper │ │ │ │ │ │ ├── IWKJSArray.kt │ │ │ │ │ │ ├── IWKJSObject.kt │ │ │ │ │ │ ├── WKJSArray.kt │ │ │ │ │ │ └── WKJSObject.kt │ │ │ │ ├── node │ │ │ │ │ ├── IVNodeContext.kt │ │ │ │ │ ├── IVNodeEngine.kt │ │ │ │ │ ├── VCountDownNode.kt │ │ │ │ │ ├── VForNode.kt │ │ │ │ │ ├── VIfNode.kt │ │ │ │ │ ├── VListViewNode.kt │ │ │ │ │ ├── VNode.kt │ │ │ │ │ ├── VNodeContext.kt │ │ │ │ │ └── VNodeParserV2.kt │ │ │ │ ├── preload │ │ │ │ │ ├── IMetaData.kt │ │ │ │ │ ├── MetaDataRepository.kt │ │ │ │ │ ├── WKMetaData.kt │ │ │ │ │ ├── WKRequest.kt │ │ │ │ │ └── WKResponse.kt │ │ │ │ ├── render │ │ │ │ │ ├── IRender.kt │ │ │ │ │ └── VNodeRender.kt │ │ │ │ ├── reports │ │ │ │ │ ├── Codes.kt │ │ │ │ │ ├── Msgs.kt │ │ │ │ │ └── session │ │ │ │ │ │ └── SessionResult.kt │ │ │ │ └── template │ │ │ │ │ ├── BaseTemplate.kt │ │ │ │ │ ├── ContainerTemplate.kt │ │ │ │ │ ├── CountDownTemplate.kt │ │ │ │ │ ├── CustomWidgetTemplate.kt │ │ │ │ │ ├── Grammar.kt │ │ │ │ │ ├── ICustomWidgetTemplate.kt │ │ │ │ │ ├── ImageTemplate.kt │ │ │ │ │ ├── ListViewTemplate.kt │ │ │ │ │ ├── LottieTemplate.kt │ │ │ │ │ ├── ProgressTemplate.kt │ │ │ │ │ ├── SpanTemplate.kt │ │ │ │ │ ├── Template.kt │ │ │ │ │ ├── TemplateFactory.kt │ │ │ │ │ ├── TextTemplate.kt │ │ │ │ │ └── descriptor │ │ │ │ │ ├── BaseFunctionDescriptor.kt │ │ │ │ │ └── JSFuncDescriptor.kt │ │ │ │ └── widget │ │ │ │ ├── BaseCustomWidget.kt │ │ │ │ ├── BorderImageView.kt │ │ │ │ ├── BorderProgressView.kt │ │ │ │ ├── BorderRecyclerView.kt │ │ │ │ ├── BorderTextView.kt │ │ │ │ ├── CustomerWidgetContainer.kt │ │ │ │ ├── IBorder.kt │ │ │ │ ├── IMTLayout.java │ │ │ │ ├── IOnWidgetAttachToWindowChanged.kt │ │ │ │ ├── IParent.kt │ │ │ │ ├── IPressedStateChangedListener.kt │ │ │ │ ├── IWKCustomWidget.kt │ │ │ │ ├── IWidgetAttachToWindow.kt │ │ │ │ ├── MagicBoxLayout.kt │ │ │ │ ├── MagicYogaLayout.kt │ │ │ │ └── SafeLottieAnimationView.kt │ │ └── res │ │ │ └── values │ │ │ └── style.xml │ │ └── test │ │ └── java │ │ └── com │ │ └── hellobike │ │ └── library_magiccube │ │ └── ExampleUnitTest.kt └── settings.gradle ├── example ├── .gitignore ├── data.json ├── demo01-text │ ├── data.json │ ├── template.js │ └── template.xml ├── demo02-container │ ├── data.json │ ├── template.js │ └── template.xml ├── demo03-img │ ├── data.json │ ├── template.js │ └── template.xml ├── demo04-progress │ ├── data.json │ ├── template.js │ └── template.xml ├── demo05-counting │ ├── data.json │ ├── template.js │ └── template.xml ├── demo06-list │ ├── data.json │ ├── template.js │ └── template.xml ├── demo07-component │ ├── component-01.xml │ ├── component-02.xml │ ├── component-03.xml │ ├── data.json │ ├── template.js │ └── template.xml ├── demo08-js │ ├── data.json │ ├── template.js │ └── template.xml ├── demo09 │ ├── components │ │ ├── template-content.xml │ │ └── template-title.xml │ ├── data.json │ ├── template.js │ └── template.xml ├── readme.md ├── template.js └── template.xml ├── iOS ├── .gitignore ├── Example │ ├── JYMagicCube.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── JYMagicCube-Example.xcscheme │ ├── JYMagicCube.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ ├── JYMagicCube │ │ ├── Base.lproj │ │ │ └── LaunchScreen.storyboard │ │ ├── ExportObjs │ │ │ ├── JYTestPayExportHandler.h │ │ │ ├── JYTestPayExportHandler.m │ │ │ ├── JYTestShareExportHandler.h │ │ │ └── JYTestShareExportHandler.m │ │ ├── Images.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ ├── JSAdapters │ │ │ ├── JYWKJSEngineCacheAdapter.h │ │ │ ├── JYWKJSEngineCacheAdapter.m │ │ │ ├── JYWKJSEngineEventAdapter.h │ │ │ ├── JYWKJSEngineEventAdapter.m │ │ │ ├── JYWKJSEngineLocalAdapter.h │ │ │ ├── JYWKJSEngineLocalAdapter.m │ │ │ ├── JYWKJSEngineLogAdapter.h │ │ │ ├── JYWKJSEngineLogAdapter.m │ │ │ ├── JYWKJSEngineToastAdapter.h │ │ │ ├── JYWKJSEngineToastAdapter.m │ │ │ ├── JYWKJSEngineTrackAdapter.h │ │ │ ├── JYWKJSEngineTrackAdapter.m │ │ │ └── Model │ │ │ │ ├── JYWKJSEngineAlertInfo.h │ │ │ │ └── JYWKJSEngineAlertInfo.m │ │ ├── JYAppDelegate.h │ │ ├── JYAppDelegate.m │ │ ├── JYDemoPreviewBaseViewController.h │ │ ├── JYDemoPreviewBaseViewController.m │ │ ├── JYDemoPreviewSingleViewController.h │ │ ├── JYDemoPreviewSingleViewController.m │ │ ├── JYMagicCube-Info.plist │ │ ├── JYMagicCube-Prefix.pch │ │ ├── MCAdapters │ │ │ ├── JYTestTrackAdapter.h │ │ │ └── JYTestTrackAdapter.m │ │ ├── UIDevice+JY.h │ │ ├── UIDevice+JY.m │ │ ├── WebSocket │ │ │ ├── JYMCWebSocket.h │ │ │ └── JYMCWebSocket.m │ │ └── main.m │ └── Podfile ├── JYMagicCube │ ├── Assets │ │ └── .gitkeep │ └── Classes │ │ ├── .gitkeep │ │ ├── Action │ │ ├── Counter │ │ │ ├── JYMCCountingTimer.h │ │ │ └── JYMCCountingTimer.m │ │ ├── JYMCActionInternalContext.h │ │ ├── JYMCActionInternalContext.m │ │ ├── JYMCElementView+Action.h │ │ ├── JYMCElementView+Action.m │ │ ├── JYMagicCubeView+Action.h │ │ ├── JYMagicCubeView+Action.m │ │ ├── UIResponder+JYMagicCube.h │ │ └── UIResponder+JYMagicCube.m │ │ ├── Alert │ │ ├── JYMagicAlert.h │ │ ├── JYMagicAlertDelegate.h │ │ ├── JYMagicAlertLifeCycleDelegate.h │ │ ├── JYMagicAlertLoader.h │ │ ├── JYMagicAlertLoader.m │ │ ├── JYMagicAlertLoaderDelegate.h │ │ ├── JYMagicAlertLoaderProtocol.h │ │ ├── JYMagicAlertProtocol.h │ │ ├── JYMagicAlertViewController.h │ │ └── JYMagicAlertViewController.m │ │ ├── JSExpression │ │ ├── JYMCJSExpression.h │ │ ├── JYMCJSExpression.m │ │ ├── JYMCJSExpressionCache.h │ │ └── JYMCJSExpressionCache.m │ │ ├── JYMCActionContext.h │ │ ├── JYMCActionContext.m │ │ ├── JYMCConfigure+Private.h │ │ ├── JYMCConfigure+Private.m │ │ ├── JYMCConfigure.h │ │ ├── JYMCConfigure.m │ │ ├── JYMCLoadingSession.h │ │ ├── JYMCLoadingSession.m │ │ ├── JYMagicCube.h │ │ ├── JYMagicCubeDefine.h │ │ ├── JYMagicCubeDefine.m │ │ ├── JYMagicCubeMacro.h │ │ ├── JYMagicCubeView+Tool.h │ │ ├── JYMagicCubeView+Tool.m │ │ ├── JYMagicCubeView.h │ │ ├── JYMagicCubeView.m │ │ ├── JYMagicCubeView_js.h │ │ ├── JYMagicCubeView_js.m │ │ ├── JYMagicCubeView_private.h │ │ ├── JYMagicCubeView_v2.h │ │ ├── JYMagicCubeView_v2.m │ │ ├── Model │ │ ├── JYMCAlertConfig.h │ │ ├── JYMCAlertConfig.m │ │ ├── JYMCMetaData+Private.h │ │ ├── JYMCMetaData+Private.m │ │ ├── JYMCMetaData.h │ │ ├── JYMCMetaData.m │ │ ├── JYMCStateInfo.h │ │ ├── JYMCStateInfo.m │ │ ├── JYMCTextContent.h │ │ └── JYMCTextContent.m │ │ ├── Node │ │ ├── Attributes │ │ │ ├── Action │ │ │ │ ├── Click │ │ │ │ │ ├── JYMCActionClick.h │ │ │ │ │ └── JYMCActionClick.m │ │ │ │ ├── Expose │ │ │ │ │ ├── JYMCActionExpose.h │ │ │ │ │ └── JYMCActionExpose.m │ │ │ │ ├── JYMCAction.h │ │ │ │ ├── JYMCAction.m │ │ │ │ └── Report │ │ │ │ │ ├── JYMCActionReport.h │ │ │ │ │ └── JYMCActionReport.m │ │ │ ├── Layout │ │ │ │ ├── JYMCLayout.h │ │ │ │ └── JYMCLayout.m │ │ │ └── Style │ │ │ │ ├── JYMCViewStyle.h │ │ │ │ └── JYMCViewStyle.m │ │ └── Elements │ │ │ ├── JYMCContainerElement.h │ │ │ ├── JYMCContainerElement.m │ │ │ ├── JYMCCountingElement.h │ │ │ ├── JYMCCountingElement.m │ │ │ ├── JYMCCustomerElement.h │ │ │ ├── JYMCCustomerElement.m │ │ │ ├── JYMCElement.h │ │ │ ├── JYMCElement.m │ │ │ ├── JYMCImageElement.h │ │ │ ├── JYMCImageElement.m │ │ │ ├── JYMCListElement.h │ │ │ ├── JYMCListElement.m │ │ │ ├── JYMCLottieElement.h │ │ │ ├── JYMCLottieElement.m │ │ │ ├── JYMCProgressElement.h │ │ │ ├── JYMCProgressElement.m │ │ │ ├── JYMCRichTextElement.h │ │ │ ├── JYMCRichTextElement.m │ │ │ ├── JYMCTextElement.h │ │ │ └── JYMCTextElement.m │ │ ├── Parser │ │ ├── JYMCDataParser.h │ │ ├── JYMCDataParser.m │ │ ├── JYMCJSExpressionParser.h │ │ ├── JYMCJSExpressionParser.m │ │ ├── JYMCRegExpParser.h │ │ ├── JYMCRegExpParser.m │ │ ├── JYMCStyleParser.h │ │ └── JYMCStyleParser.m │ │ ├── Preload │ │ ├── JYMCPreload.h │ │ └── JYMCPreload.m │ │ ├── Protocol │ │ └── JYMCCustomerFactoryProtocol.h │ │ ├── StyleManager │ │ ├── Cache │ │ │ ├── JYMCStyleCache.h │ │ │ └── JYMCStyleCache.m │ │ ├── Downloader │ │ │ ├── JYMCStyleDownloadToken.h │ │ │ ├── JYMCStyleDownloader.h │ │ │ ├── JYMCStyleDownloader.m │ │ │ ├── JYMCStyleDownloaderBlocks.h │ │ │ ├── JYMCStyleDownloaderConfig.h │ │ │ ├── JYMCStyleDownloaderConfig.m │ │ │ ├── JYMCStyleDownloaderOperation.h │ │ │ ├── JYMCStyleDownloaderOperation.m │ │ │ └── JYMCStyleDownloaderResultHandler.h │ │ ├── JYMCStyleManager.h │ │ ├── JYMCStyleManager.m │ │ ├── JYMCStyleOperation.h │ │ ├── JYMCStyleOperation.m │ │ ├── JYMCStylePrefetcher.h │ │ ├── JYMCStylePrefetcher.m │ │ └── Model │ │ │ ├── JYMCError.h │ │ │ ├── JYMCError.m │ │ │ ├── JYMCStyleMetaData.h │ │ │ └── JYMCStyleMetaData.m │ │ ├── Tools │ │ ├── JSEngine │ │ │ ├── JYMCJSAction.h │ │ │ └── JYMCJSAction.m │ │ ├── LayoutTrans │ │ │ ├── JYMCLayoutTrans.h │ │ │ └── JYMCLayoutTrans.m │ │ ├── Network │ │ │ ├── JYMCLocalParameters.h │ │ │ └── JYMCLocalParameters.m │ │ ├── PreloadCache │ │ │ ├── JYMCPreloadCacheManager.h │ │ │ └── JYMCPreloadCacheManager.m │ │ ├── Tag │ │ │ ├── NSMutableAttributedString+AttachImg.h │ │ │ ├── NSMutableAttributedString+AttachImg.m │ │ │ ├── UIImage+TextTag.h │ │ │ └── UIImage+TextTag.m │ │ └── Utils │ │ │ ├── JYMCCommonUtils.h │ │ │ └── JYMCCommonUtils.m │ │ ├── Track │ │ ├── JYMCPerformanceRecord.h │ │ ├── JYMCPerformanceRecord.m │ │ ├── JYMCTrackActionInfo.h │ │ ├── JYMCTrackActionInfo.m │ │ ├── JYMCTrackAdapter.h │ │ ├── JYMCTrackContext.h │ │ ├── JYMCTrackContext.m │ │ ├── JYMCTracker.h │ │ └── JYMCTracker.m │ │ └── Views │ │ ├── Base │ │ ├── JYMCActionWebViewController.h │ │ ├── JYMCActionWebViewController.m │ │ ├── JYMCElementView+Layout.h │ │ ├── JYMCElementView+Layout.m │ │ ├── JYMCElementView+Style.h │ │ ├── JYMCElementView+Style.m │ │ ├── JYMCElementView.h │ │ └── JYMCElementView.m │ │ ├── JYMCContainerView.h │ │ ├── JYMCContainerView.m │ │ ├── JYMCCountingView.h │ │ ├── JYMCCountingView.m │ │ ├── JYMCCustomerView.h │ │ ├── JYMCCustomerView.m │ │ ├── JYMCIfSentryView.h │ │ ├── JYMCIfSentryView.m │ │ ├── JYMCImageView.h │ │ ├── JYMCImageView.m │ │ ├── JYMCListView.h │ │ ├── JYMCListView.m │ │ ├── JYMCLottieView.h │ │ ├── JYMCLottieView.m │ │ ├── JYMCMForSentryView.h │ │ ├── JYMCMForSentryView.m │ │ ├── JYMCProgressView.h │ │ ├── JYMCProgressView.m │ │ ├── JYMCRichTextView.h │ │ ├── JYMCRichTextView.m │ │ ├── JYMCTextView.h │ │ └── JYMCTextView.m └── JYWKJSEngine │ └── Classes │ ├── Adapters │ ├── Event │ │ ├── JYWKEventAdapterProtocol.swift │ │ └── JYWKNetworkParameter.swift │ ├── JYWKAdapterManager.swift │ ├── JYWKCacheAdapterProtocol.swift │ ├── JYWKLocalAdapterProtocol.swift │ ├── JYWKLogAdapterProtocol.swift │ ├── JYWKToastAdapterProtocol.swift │ └── JYWKTrackAdapterProtocol.swift │ ├── Exports │ ├── Global │ │ ├── Common │ │ │ ├── JYWKCommonExport.swift │ │ │ └── JYWKCommonExportProtocol.swift │ │ └── Console │ │ │ ├── JYWKConsoleExport.swift │ │ │ └── JYWKConsoleExportProtocol.swift │ └── Internal │ │ ├── JYWKInternalExport.swift │ │ ├── JYWKInternalExportDelegate.swift │ │ └── JYWKInternalExportProtocol.swift │ ├── JYWKJSContext.swift │ ├── JYWKJSContextDelegate.swift │ └── JYWKJSEngine.swift ├── imgs ├── Screenshot_Android.png ├── Screenshot_iOS.png ├── Wukong_Code.png ├── code.jpeg ├── logo.svg └── screenshots.gif └── script ├── .gitignore ├── index.js ├── install-curl.sh ├── install.sh ├── package.json ├── resources ├── lib.wukong.ts ├── magic.xsd ├── template.js └── template.xml └── src ├── constants └── constants.js ├── init-project.js ├── parser ├── action-file-parser.js ├── base-parser.js ├── component-parser.js ├── container-parser.js ├── counting-parser.js ├── customer-parser.js ├── document-parser.js ├── img-parser.js ├── js-file-parser.js ├── list-item-parser.js ├── list-parser.js ├── lottie-parser.js ├── parser-factory.js ├── parser.js ├── progress-parser.js ├── span-parser.js └── text-parser.js └── server ├── server.js └── socket.js /.gitignore: -------------------------------------------------------------------------------- 1 | # General 2 | .DS_Store 3 | .AppleDouble 4 | .idea -------------------------------------------------------------------------------- /android/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellof2e/Wukong/8123fdaafa9ee7eaeee43fb73789b7fa3feac697/android/README.md -------------------------------------------------------------------------------- /android/app/.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /.idea 4 | .DS_Store 5 | /build -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /android/app/src/androidTest/java/com/hellobike/magiccube/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.hellobike.magiccube 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.hellobike.magiccube", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /android/app/src/main/assets/DIN-Alternate.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellof2e/Wukong/8123fdaafa9ee7eaeee43fb73789b7fa3feac697/android/app/src/main/assets/DIN-Alternate.ttf -------------------------------------------------------------------------------- /android/app/src/main/java/com/hellobike/magiccube/demo/CoroutineSupport.kt: -------------------------------------------------------------------------------- 1 | package com.hellobike.magiccube.demo 2 | 3 | import kotlinx.coroutines.* 4 | import kotlin.coroutines.CoroutineContext 5 | 6 | class CoroutineSupport(parent: Job? = null): CoroutineScope { 7 | 8 | private val job: Job = if (parent == null){ 9 | SupervisorJob() 10 | }else { 11 | SupervisorJob(parent) 12 | } 13 | 14 | override val coroutineContext: CoroutineContext 15 | get() = Dispatchers.Main + job 16 | 17 | /** 18 | * 取消协程上下文的job, 19 | * 取消后不要再使用了, 20 | * 如果再使用所有任务会不执行, 21 | * 一般在onDestroy里做 22 | */ 23 | fun destroy(){ 24 | job.cancel() 25 | } 26 | 27 | /** 28 | * 取消所有的子任务 29 | */ 30 | fun cancelChildren(){ 31 | job.cancelChildren() 32 | } 33 | } -------------------------------------------------------------------------------- /android/app/src/main/java/com/hellobike/magiccube/demo/TestTemplate1.kt: -------------------------------------------------------------------------------- 1 | package com.hellobike.magiccube.demo 2 | 3 | import android.content.Context 4 | import android.view.View 5 | import android.widget.ImageView 6 | import com.bumptech.glide.Glide 7 | import com.hellobike.magiccube.model.TypeNames 8 | import com.hellobike.magiccube.v2.template.ICustomWidgetTemplate 9 | import com.hellobike.magiccube.widget.BaseCustomWidget 10 | 11 | 12 | @TypeNames(["c-img1", "c-img2"]) 13 | class TestTemplate1(context: Context) : BaseCustomWidget(context) { 14 | 15 | private val imageView: ImageView by lazy { ImageView(context) } 16 | 17 | override fun initView(context: Context, typeName: String): View = imageView 18 | 19 | override fun render(template: ICustomWidgetTemplate) { 20 | super.render(template) 21 | val data = template.getData() as? Map ?: return 22 | val img = data["img"] as? String ?: return 23 | Glide.with(context).load(img).into(imageView) 24 | } 25 | } -------------------------------------------------------------------------------- /android/app/src/main/java/com/hellobike/magiccube/demo/TestTemplate2.kt: -------------------------------------------------------------------------------- 1 | package com.hellobike.magiccube.demo 2 | 3 | import android.content.Context 4 | import android.view.View 5 | import android.widget.TextView 6 | import com.hellobike.magiccube.model.TypeName 7 | import com.hellobike.magiccube.v2.template.ICustomWidgetTemplate 8 | import com.hellobike.magiccube.widget.BaseCustomWidget 9 | 10 | /** 11 | * 12 | * @Description: java类作用描述 13 | * @Author: nikozxh 14 | * @CreateDate: 2022/1/17 5:14 PM 15 | */ 16 | @TypeName("c-custom-tv") 17 | class TestTemplate2(context: Context) : BaseCustomWidget(context) { 18 | 19 | private val tv by lazy { TextView(context) } 20 | 21 | override fun initView(context: Context, typeName: String): View { 22 | return tv 23 | } 24 | 25 | override fun render(template: ICustomWidgetTemplate) { 26 | super.render(template) 27 | tv.text = "hello" 28 | tv.postDelayed({ 29 | tv.text = "hello world" 30 | }, 2000) 31 | } 32 | } -------------------------------------------------------------------------------- /android/app/src/main/java/com/hellobike/magiccube/demo/configs/GlobalConfig.kt: -------------------------------------------------------------------------------- 1 | package com.hellobike.magiccube.demo.configs 2 | 3 | import com.hellobike.magiccube.demo.TestTemplate1 4 | import com.hellobike.magiccube.demo.TestTemplate2 5 | import com.hellobike.magiccube.widget.MagicBoxLayout 6 | 7 | object GlobalConfig { 8 | 9 | fun applyCustomerTemplate(layout: MagicBoxLayout) { 10 | layout.apply { 11 | registerCustomerTemplate(TestTemplate1(layout.context)) 12 | registerCustomerTemplate(TestTemplate2(context)) 13 | } 14 | } 15 | 16 | } -------------------------------------------------------------------------------- /android/app/src/main/java/com/hellobike/magiccube/demo/logger.kt: -------------------------------------------------------------------------------- 1 | package com.hellobike.magiccube.demo 2 | 3 | import android.util.Log 4 | 5 | fun logd(message: String, tag: String = "HBAndroidDSLSDK") { 6 | Log.d(tag, message) 7 | } 8 | 9 | fun loge(message: String, tag: String = "HBAndroidDSLSDK") { 10 | Log.e(tag, message) 11 | } -------------------------------------------------------------------------------- /android/app/src/main/java/com/hellobike/magiccube/demo/preview/controller/IPreviewCallback.kt: -------------------------------------------------------------------------------- 1 | package com.hellobike.magiccube.demo.preview.controller 2 | 3 | import java.lang.Exception 4 | 5 | interface IPreviewCallback { 6 | 7 | fun onFailure(e: Exception) 8 | 9 | fun onSuccess(style: String, data: String) 10 | } -------------------------------------------------------------------------------- /android/app/src/main/java/com/hellobike/magiccube/demo/preview/controller/PreviewCache.kt: -------------------------------------------------------------------------------- 1 | package com.hellobike.magiccube.demo.preview.controller 2 | 3 | import android.content.Context 4 | import android.content.SharedPreferences 5 | 6 | class PreviewCache(private val context: Context) { 7 | 8 | private val sp: SharedPreferences by lazy { 9 | context.getSharedPreferences("preview", Context.MODE_PRIVATE) 10 | } 11 | 12 | fun saveIp(ip: String) { 13 | sp.edit().putString("preview_ip", ip).apply() 14 | } 15 | 16 | fun savePort(port: String) { 17 | sp.edit().putString("preview_port", port).apply() 18 | } 19 | 20 | fun getIp(): String = sp.getString("preview_ip", "") ?: "" 21 | 22 | fun getPort(): String = sp.getString("preview_port", "7788") ?: "7788" 23 | 24 | } -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/aaa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellof2e/Wukong/8123fdaafa9ee7eaeee43fb73789b7fa3feac697/android/app/src/main/res/drawable/aaa.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/task_btn_bg.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellof2e/Wukong/8123fdaafa9ee7eaeee43fb73789b7fa3feac697/android/app/src/main/res/drawable/task_btn_bg.webp -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/task_btn_bg_png.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellof2e/Wukong/8123fdaafa9ee7eaeee43fb73789b7fa3feac697/android/app/src/main/res/drawable/task_btn_bg_png.9.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/task_btn_bg_png2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellof2e/Wukong/8123fdaafa9ee7eaeee43fb73789b7fa3feac697/android/app/src/main/res/drawable/task_btn_bg_png2.png -------------------------------------------------------------------------------- /android/app/src/main/res/layout/activity_magic_card.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/layout/activity_quickjs.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 |