├── ios ├── sdk │ ├── README.md │ ├── WeexSDK │ │ ├── Resources │ │ │ └── wx_load_error@3x.png │ │ └── Sources │ │ │ ├── Component │ │ │ ├── WXTextAreaComponent.h │ │ │ ├── WXDivComponent.h │ │ │ ├── WXImageComponent.h │ │ │ ├── WXTextComponent.h │ │ │ ├── WXSwitchComponent.h │ │ │ ├── WXAComponent.h │ │ │ ├── WXDivComponent.m │ │ │ ├── WXRefreshComponent.h │ │ │ ├── WXEmbedComponent.h │ │ │ ├── WXLoadingComponent.h │ │ │ ├── WXLoadingIndicator.h │ │ │ ├── WXTextInputComponent.h │ │ │ ├── WXCellComponent.h │ │ │ ├── WXSliderComponent.h │ │ │ └── WXWebComponent.h │ │ │ ├── Module │ │ │ ├── WXClipboardModule.h │ │ │ ├── WXDomModule.h │ │ │ ├── WXStreamModule.h │ │ │ ├── WXModalUIModule.h │ │ │ ├── WXNavigatorModule.h │ │ │ ├── WXWebViewModule.h │ │ │ ├── WXInstanceWrap.h │ │ │ ├── WXAnimationModule.h │ │ │ └── WXClipboardModule.m │ │ │ ├── View │ │ │ ├── WXView.h │ │ │ ├── WXComponent+ViewManagement.h │ │ │ └── WXErrorView.h │ │ │ ├── Display │ │ │ ├── WXLayer.h │ │ │ ├── WXComponent+Display.h │ │ │ ├── WXDisplayQueue.h │ │ │ └── WXLayer.m │ │ │ ├── Supporting Files │ │ │ └── WeexSDK-Prefix.pch │ │ │ ├── Bridge │ │ │ ├── WXJSCoreBridge.h │ │ │ └── WXDebugLoggerBridge.h │ │ │ ├── Events │ │ │ └── WXComponent+Events.h │ │ │ ├── Layout │ │ │ └── WXComponent+Layout.h │ │ │ ├── Protocol │ │ │ ├── WXEventModuleProtocol.h │ │ │ ├── WXDestroyProtocol.h │ │ │ └── WXTextComponentProtocol.h │ │ │ ├── Handler │ │ │ ├── WXNavigationDefaultImpl.h │ │ │ └── WXNetworkDefaultImpl.h │ │ │ ├── Utility │ │ │ ├── WXThreadSafeMutableArray.h │ │ │ ├── NSObject+WXSwizzle.h │ │ │ ├── WXWeakObjectWrapper.h │ │ │ ├── WXThreadSafeMutableDictionary.h │ │ │ ├── WXThreadSafeCounter.h │ │ │ ├── WXWeakObjectWrapper.m │ │ │ ├── WXSimulatorShortcutMananger.h │ │ │ ├── NSTimer+Weex.h │ │ │ ├── WXThreadSafeCounter.m │ │ │ └── NSArray+Weex.h │ │ │ └── Manager │ │ │ └── WXModuleManager.h │ ├── WeexSDK.xcodeproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ ├── WeexSDK_MTL │ │ ├── WeexSDK_MTL.m │ │ └── WeexSDK_MTL.h │ ├── WeexSDKTests │ │ ├── TestSupportUtils.h │ │ └── TestSupportUtils.m │ └── NOTICE ├── playground │ ├── README.md │ ├── weex.png │ ├── weex@2x.png │ ├── WeexDemo │ │ ├── weex-icon.png │ │ ├── Assets.xcassets │ │ │ ├── Contents.json │ │ │ ├── back.imageset │ │ │ │ ├── back.png │ │ │ │ ├── back@2x.png │ │ │ │ ├── back@3x.png │ │ │ │ └── Contents.json │ │ │ ├── scan.imageset │ │ │ │ ├── scan.png │ │ │ │ ├── scan@2x.png │ │ │ │ ├── scan@3x.png │ │ │ │ └── Contents.json │ │ │ ├── reload.imageset │ │ │ │ ├── reload.png │ │ │ │ ├── reload@2x.png │ │ │ │ ├── reload@3x.png │ │ │ │ └── Contents.json │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── Icon-29.png │ │ │ │ ├── Icon-40.png │ │ │ │ ├── Icon-76.png │ │ │ │ ├── Icon-29@2x.png │ │ │ │ ├── Icon-29@3x.png │ │ │ │ ├── Icon-40@2x.png │ │ │ │ ├── Icon-40@3x.png │ │ │ │ ├── Icon-60@2x.png │ │ │ │ ├── Icon-60@3x.png │ │ │ │ ├── Icon-76@2x.png │ │ │ │ ├── Icon-29@2x-1.png │ │ │ │ ├── Icon-40@2x-1.png │ │ │ │ └── Icon-83.5@2x.png │ │ │ └── LaunchImage.launchimage │ │ │ │ ├── Default.png │ │ │ │ ├── Default@2x.png │ │ │ │ ├── Default@3x.png │ │ │ │ ├── Default-4.7@2x.png │ │ │ │ ├── Default@2x-1.png │ │ │ │ ├── Default@3x-1.png │ │ │ │ ├── Default-568h@2x.png │ │ │ │ └── Default-568h@2x-1.png │ │ ├── WeexiOSKit │ │ │ ├── Component │ │ │ │ ├── WXSeekBarComponent.h │ │ │ │ ├── WXStepperComponent.h │ │ │ │ ├── WXDatePickerComponent.h │ │ │ │ ├── WXSearchBarComponent.h │ │ │ │ └── WXSegmentedControlComponent.h │ │ │ ├── Module │ │ │ │ ├── WXLocationModule.h │ │ │ │ ├── WXVibrationModule.h │ │ │ │ ├── WXActionSheetModule.h │ │ │ │ ├── WXMBProgressHUDModule.h │ │ │ │ └── WXVibrationModule.m │ │ │ └── Utility │ │ │ │ └── WXConvert+Addition.h │ │ ├── DemoBaseViewController.h │ │ ├── debug │ │ │ ├── WXATLoggerPlugin.h │ │ │ └── WXATViewHierarchyPlugin.h │ │ ├── Scanner │ │ │ └── WXScannerVC.h │ │ ├── Images.xcassets │ │ │ └── Brand Assets.launchimage │ │ │ │ └── Contents.json │ │ ├── extend │ │ │ ├── component │ │ │ │ └── WXSelectComponent.h │ │ │ ├── handler │ │ │ │ └── WXImgLoaderDefaultImpl.h │ │ │ └── module │ │ │ │ └── WXEventModule.h │ │ ├── main.m │ │ ├── AppDelegate.h │ │ ├── UIViewController+WXDemoNaviBar.h │ │ └── WXDemoViewController.h │ ├── WeexDemo.xcodeproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ ├── WeexDemo.xcworkspace │ │ └── contents.xcworkspacedata │ └── Podfile └── WXDevtool │ ├── Products │ └── TBWXDevTool.framework │ │ └── Info.plist │ ├── WXDevTool │ ├── Source │ │ ├── PonyDebugger │ │ │ ├── NSData+PDDebugger.h │ │ │ ├── NSDate+PDDebugger.h │ │ │ ├── NSDate+PDDebugger.m │ │ │ ├── PonyDebugger.h │ │ │ ├── WXDeviceInfo.h │ │ │ ├── NSDate+PD_JSONObject.h │ │ │ ├── NSArray+PD_JSONObject.h │ │ │ ├── NSError+PD_JSONObject.h │ │ │ ├── NSData+PDDebugger.m │ │ │ ├── NSDate+PD_JSONObject.m │ │ │ ├── NSError+PD_JSONObject.m │ │ │ ├── WXCSSDomainController.h │ │ │ ├── PDPageDomainController.h │ │ │ ├── PDInspectorDomainController.h │ │ │ ├── WXDevToolType.m │ │ │ ├── WXDebugDomainController.h │ │ │ ├── PDContainerIndex.h │ │ │ └── WXDevToolType.h │ │ ├── DerivedSources │ │ │ ├── WXProfilerDomainController.h │ │ │ ├── WXDebugDomain.h │ │ │ └── WXTimelineDomainController.h │ │ └── Supporting Files │ │ │ └── TBWXDevTool.pch │ └── TBWXDevTool.h │ ├── Podfile │ └── TBWXDevTool_MTL │ ├── TBWXDevTool_MTL.m │ └── TBWXDevTool_MTL.h ├── android ├── sdk │ ├── README.md │ ├── assets │ │ ├── .gitkeep │ │ └── .gitkeeper │ ├── publish.sh │ ├── libs │ │ ├── x86 │ │ │ └── libweexv8.so │ │ └── armeabi │ │ │ └── libweexv8.so │ ├── license │ │ ├── plexus-utils-3.0.24.jar │ │ ├── license-gradle-plugin-0.12.1.jar │ │ └── maven-license-plugin-1.10.b1.jar │ ├── src │ │ └── main │ │ │ ├── res │ │ │ └── drawable │ │ │ │ └── error.png │ │ │ └── java │ │ │ └── com │ │ │ └── taobao │ │ │ └── weex │ │ │ └── dom │ │ │ ├── flex │ │ │ ├── CSSWrap.java │ │ │ ├── CSSDirection.java │ │ │ ├── CSSPositionType.java │ │ │ ├── CSSAlign.java │ │ │ ├── CSSFlexDirection.java │ │ │ ├── CSSJustify.java │ │ │ ├── MeasureOutput.java │ │ │ ├── CSSConstants.java │ │ │ └── FloatUtil.java │ │ │ ├── CSSWrapConvert.java │ │ │ └── CSSPositionTypeConvert.java │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── .gitignore │ └── NOTICE ├── inspector │ ├── .gitignore │ ├── proguard-consumer.pro │ ├── gradle.properties │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── taobao │ │ └── weex │ │ └── devtools │ │ ├── common │ │ ├── Predicate.java │ │ ├── Accumulator.java │ │ ├── ArrayListAccumulator.java │ │ └── android │ │ │ ├── DialogFragmentAccessor.java │ │ │ └── FragmentManagerAccessor.java │ │ ├── server │ │ ├── http │ │ │ ├── PathMatcher.java │ │ │ ├── HttpHeaders.java │ │ │ └── HttpStatus.java │ │ ├── SocketHandlerFactory.java │ │ └── PeerAuthorizationException.java │ │ ├── websocket │ │ ├── ReadCallback.java │ │ ├── WriteCallback.java │ │ ├── CloseCodes.java │ │ └── MaskingHelper.java │ │ ├── inspector │ │ ├── console │ │ │ └── RuntimeRepl.java │ │ ├── elements │ │ │ ├── AttributeAccumulator.java │ │ │ ├── StyleAccumulator.java │ │ │ ├── DocumentView.java │ │ │ └── android │ │ │ │ ├── HighlightableDescriptor.java │ │ │ │ └── DocumentHiddenView.java │ │ ├── jsonrpc │ │ │ ├── protocol │ │ │ │ └── EmptyResult.java │ │ │ ├── PendingRequestCallback.java │ │ │ └── DisconnectReceiver.java │ │ ├── protocol │ │ │ ├── ChromeDevtoolsDomain.java │ │ │ ├── ChromeDevtoolsMethod.java │ │ │ └── module │ │ │ │ └── DatabaseConstants.java │ │ ├── helper │ │ │ └── PeerRegistrationListener.java │ │ ├── MessageHandlingException.java │ │ └── network │ │ │ └── ResponseBodyData.java │ │ ├── InspectorModulesProvider.java │ │ ├── json │ │ └── annotation │ │ │ ├── JsonValue.java │ │ │ └── JsonProperty.java │ │ └── dumpapp │ │ ├── DumpUsageException.java │ │ └── UnexpectedFrameException.java ├── weex_debug │ ├── .gitignore │ ├── libs │ │ └── classes.jar │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── src │ │ ├── main │ │ │ └── res │ │ │ │ ├── drawable-xhdpi │ │ │ │ ├── ic_action_3d.png │ │ │ │ ├── ic_action_weex.png │ │ │ │ ├── prettyfish_coord.png │ │ │ │ ├── prettyfish_cpu.png │ │ │ │ ├── prettyfish_fps.png │ │ │ │ ├── prettyfish_grid.png │ │ │ │ ├── prettyfish_icon_sp.png │ │ │ │ ├── prettyfish_memory.png │ │ │ │ ├── prettyfish_traffic.png │ │ │ │ ├── prettyfish_boundary.png │ │ │ │ ├── prettyfish_icon_back.png │ │ │ │ ├── prettyfish_icon_close.png │ │ │ │ ├── prettyfish_icon_fab.png │ │ │ │ ├── prettyfish_icon_perf.png │ │ │ │ ├── prettyfish_icon_tools.png │ │ │ │ ├── prettyfish_icon_ued.png │ │ │ │ └── prettyfish_icon_deletefile.png │ │ │ │ ├── values │ │ │ │ ├── dimens.xml │ │ │ │ └── attrs.xml │ │ │ │ ├── drawable │ │ │ │ ├── prettyfish_fab.xml │ │ │ │ ├── leak_canary_toast_background.xml │ │ │ │ ├── prettyfish_bg_floatmenu.xml │ │ │ │ └── prettyfish_coordrect.xml │ │ │ │ └── layout │ │ │ │ ├── prettyfish_coverview.xml │ │ │ │ ├── prettyfish_filelist.xml │ │ │ │ └── prettyfish_datafilelist.xml │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── taobao │ │ │ │ └── weex │ │ │ │ └── ExampleUnitTest.java │ │ └── androidTest │ │ │ └── java │ │ │ └── com │ │ │ └── taobao │ │ │ └── weex │ │ │ └── ApplicationTest.java │ └── NOTICE ├── .gitignore ├── playground │ ├── app │ │ ├── src │ │ │ ├── androidTest │ │ │ │ └── java │ │ │ │ │ └── com │ │ │ │ │ └── alibaba │ │ │ │ │ └── weex │ │ │ │ │ ├── uitest │ │ │ │ │ ├── TC_List │ │ │ │ │ │ └── .gitignore │ │ │ │ │ ├── TC_PopBox │ │ │ │ │ │ └── .gitignore │ │ │ │ │ ├── TC_Select │ │ │ │ │ │ └── .gitignore │ │ │ │ │ ├── TC_Style │ │ │ │ │ │ └── .gitignore │ │ │ │ │ ├── TC_Switch │ │ │ │ │ │ └── .gitignore │ │ │ │ │ ├── TC_Video │ │ │ │ │ │ └── .gitignore │ │ │ │ │ ├── TC_Web │ │ │ │ │ │ └── .gitignore │ │ │ │ │ ├── TC_Animation │ │ │ │ │ │ └── .gitignore │ │ │ │ │ ├── TC_AppendTree │ │ │ │ │ │ └── .gitignore │ │ │ │ │ ├── TC_BizComponet │ │ │ │ │ │ └── .gitignore │ │ │ │ │ ├── TC_BizModule │ │ │ │ │ │ └── .gitignore │ │ │ │ │ ├── TC_DataBind │ │ │ │ │ │ └── .gitignore │ │ │ │ │ ├── TC_Gesture │ │ │ │ │ │ └── .gitignore │ │ │ │ │ ├── TC_Monitor │ │ │ │ │ │ └── .gitignore │ │ │ │ │ └── TC_Scroller │ │ │ │ │ │ └── .gitignore │ │ │ │ │ ├── ApplicationTest.java │ │ │ │ │ └── util │ │ │ │ │ └── SdCardHelper.java │ │ │ └── main │ │ │ │ ├── res │ │ │ │ ├── raw │ │ │ │ │ └── beep.ogg │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable-hdpi │ │ │ │ │ ├── ic_action_scan.png │ │ │ │ │ └── ic_action_refresh.png │ │ │ │ ├── drawable-mdpi │ │ │ │ │ ├── ic_action_scan.png │ │ │ │ │ └── ic_action_refresh.png │ │ │ │ ├── drawable-xhdpi │ │ │ │ │ ├── ic_action_scan.png │ │ │ │ │ └── ic_action_refresh.png │ │ │ │ ├── drawable-xxhdpi │ │ │ │ │ ├── ic_action_scan.png │ │ │ │ │ └── ic_action_refresh.png │ │ │ │ ├── values │ │ │ │ │ ├── colors.xml │ │ │ │ │ ├── dimens.xml │ │ │ │ │ └── drawables.xml │ │ │ │ ├── drawable │ │ │ │ │ └── side_nav_bar.xml │ │ │ │ ├── values-v21 │ │ │ │ │ └── styles.xml │ │ │ │ ├── drawable-v21 │ │ │ │ │ ├── ic_menu_send.xml │ │ │ │ │ ├── ic_menu_slideshow.xml │ │ │ │ │ ├── ic_menu_gallery.xml │ │ │ │ │ ├── ic_menu_manage.xml │ │ │ │ │ └── ic_menu_camera.xml │ │ │ │ ├── values-w820dp │ │ │ │ │ └── dimens.xml │ │ │ │ ├── menu │ │ │ │ │ ├── main_scan.xml │ │ │ │ │ ├── refresh.xml │ │ │ │ │ └── main.xml │ │ │ │ └── layout │ │ │ │ │ ├── catalog_item.xml │ │ │ │ │ ├── content_main.xml │ │ │ │ │ └── camera.xml │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── alibaba │ │ │ │ └── weex │ │ │ │ ├── https │ │ │ │ ├── WXHttpResponse.java │ │ │ │ ├── WXRequestListener.java │ │ │ │ └── WXHttpTask.java │ │ │ │ ├── extend │ │ │ │ └── module │ │ │ │ │ ├── RenderModule.java │ │ │ │ │ └── MyModule.java │ │ │ │ └── WXBaseActivity.java │ │ └── tools │ │ │ └── weex.jks │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── README.md │ ├── NOTICE │ ├── settings.gradle │ └── build.gradle └── commons │ ├── src │ └── main │ │ └── AndroidManifest.xml │ └── proguard-rules.pro ├── bin ├── .gitignore ├── release.sh ├── install-hooks.sh ├── pre-commit.sh ├── commit-msg.sh ├── pre-push.sh └── welcome.sh ├── .babelrc ├── examples ├── .gitignore ├── more.we └── webcomponent-example.we ├── test ├── stream.json ├── index-item.we ├── text-word-wrap.we ├── ui-list-item.we ├── web-demo.we └── input-test.we ├── html5 ├── default │ ├── static │ │ ├── map.js │ │ └── misc.js │ ├── app │ │ ├── index.js │ │ ├── ctrl │ │ │ └── index.js │ │ └── bundle │ │ │ └── index.js │ └── config.js ├── shared │ ├── objectAssign.js │ ├── index.js │ ├── promise.js │ └── setTimeout.js ├── runtime │ ├── framework-weex.js │ ├── .eslintrc │ └── index.js ├── test │ ├── unit │ │ ├── default │ │ │ └── assets │ │ │ │ ├── foo.output │ │ │ │ ├── if-refresh.output │ │ │ │ ├── promise.output │ │ │ │ ├── transformer1.output │ │ │ │ ├── transformer2.output │ │ │ │ ├── transformer3.output │ │ │ │ ├── foo2.output │ │ │ │ ├── foo3.output │ │ │ │ ├── require.output │ │ │ │ ├── created.output │ │ │ │ ├── dynamic-type.output │ │ │ │ ├── ready.output │ │ │ │ ├── foo4.output │ │ │ │ ├── inline-click.output │ │ │ │ ├── input-binding.output │ │ │ │ ├── if.output │ │ │ │ ├── if-repeat.output │ │ │ │ ├── computed.output │ │ │ │ ├── foo5.output │ │ │ │ ├── subvm.output │ │ │ │ ├── components.output │ │ │ │ ├── if-repeat-refresh.output │ │ │ │ ├── repeat-index.output │ │ │ │ ├── computed-in-repeat.output │ │ │ │ ├── foo3.input │ │ │ │ ├── repeat-array-kv.output │ │ │ │ ├── repeat-array-v.output │ │ │ │ ├── foo.input │ │ │ │ ├── repeat-array-no-kv.output │ │ │ │ ├── repeat-array-non-obj.output │ │ │ │ ├── repeat-track-by.output │ │ │ │ ├── foo4.input │ │ │ │ ├── transformer1.input │ │ │ │ ├── transformer2.input │ │ │ │ ├── transformer3.input │ │ │ │ ├── refresh2.output │ │ │ │ ├── promise.input │ │ │ │ ├── dynamic-type.input │ │ │ │ ├── click.output │ │ │ │ ├── foo7.output │ │ │ │ ├── foo2.input │ │ │ │ ├── foo6.output │ │ │ │ └── foo5.input │ │ └── shared │ │ │ └── objectAssign.js │ └── e2e │ │ └── specs │ │ └── index.js ├── browser │ ├── extend │ │ ├── components │ │ │ ├── video │ │ │ │ └── video.css │ │ │ ├── image │ │ │ │ └── image.css │ │ │ ├── indicator │ │ │ │ └── indicator.css │ │ │ ├── slider │ │ │ │ └── carrousel.css │ │ │ ├── scrollable │ │ │ │ ├── list │ │ │ │ │ ├── index.js │ │ │ │ │ ├── hlist.js │ │ │ │ │ └── vlist.js │ │ │ │ ├── index.js │ │ │ │ ├── scrollable.css │ │ │ │ ├── loading │ │ │ │ │ └── loading.css │ │ │ │ └── refresh │ │ │ │ │ └── refresh.css │ │ │ └── switch │ │ │ │ └── switch.css │ │ └── api │ │ │ ├── event.js │ │ │ └── pageInfo.js │ ├── runtime │ │ ├── config.js │ │ ├── shared.js │ │ ├── default │ │ │ └── config.js │ │ └── app │ │ │ ├── index.js │ │ │ ├── ctrl │ │ │ └── index.js │ │ │ └── bundle │ │ │ └── index.js │ ├── dom │ │ └── index.js │ ├── bridge │ │ └── index.js │ ├── render │ │ └── config.js │ ├── weex-web-kit │ │ ├── index.js │ │ └── components │ │ │ └── segmented-control │ │ │ └── segmented-control.css │ ├── utils │ │ └── array.js │ ├── base │ │ └── div.js │ └── index.js ├── vdom │ └── helper.js └── native │ └── index.js ├── img ├── ia.png ├── ib.png ├── ic.png ├── id.png ├── ie.png ├── mr.png ├── mu.png ├── mua.png └── web-sc.png ├── start ├── .gitignore ├── .github ├── PULL_REQUEST_TEMPLATE.md └── ISSUE_TEMPLATE.md └── WeexiOSKit.podspec /ios/sdk/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/sdk/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bin/.gitignore: -------------------------------------------------------------------------------- 1 | .welcome -------------------------------------------------------------------------------- /android/sdk/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ios/playground/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/sdk/assets/.gitkeeper: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { "presets": ["es2015"] } 2 | -------------------------------------------------------------------------------- /android/inspector/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /examples/.gitignore: -------------------------------------------------------------------------------- 1 | local-* 2 | archive/ -------------------------------------------------------------------------------- /android/weex_debug/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /.gradle 3 | -------------------------------------------------------------------------------- /test/stream.json: -------------------------------------------------------------------------------- 1 | { 2 | "this_is": "a json test" 3 | } -------------------------------------------------------------------------------- /html5/default/static/map.js: -------------------------------------------------------------------------------- 1 | export const instanceMap = {} 2 | -------------------------------------------------------------------------------- /html5/shared/objectAssign.js: -------------------------------------------------------------------------------- 1 | import 'core-js/fn/object/assign' 2 | -------------------------------------------------------------------------------- /html5/runtime/framework-weex.js: -------------------------------------------------------------------------------- 1 | import * as Weex from '../default' 2 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | .idea 3 | local.properties 4 | *iml 5 | build -------------------------------------------------------------------------------- /html5/test/unit/default/assets/foo.output: -------------------------------------------------------------------------------- 1 | { 2 | type: 'container' 3 | } -------------------------------------------------------------------------------- /img/ia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/img/ia.png -------------------------------------------------------------------------------- /img/ib.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/img/ib.png -------------------------------------------------------------------------------- /img/ic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/img/ic.png -------------------------------------------------------------------------------- /img/id.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/img/id.png -------------------------------------------------------------------------------- /img/ie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/img/ie.png -------------------------------------------------------------------------------- /img/mr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/img/mr.png -------------------------------------------------------------------------------- /img/mu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/img/mu.png -------------------------------------------------------------------------------- /img/mua.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/img/mua.png -------------------------------------------------------------------------------- /android/sdk/publish.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ./gradlew clean assemble publish -------------------------------------------------------------------------------- /html5/test/unit/default/assets/if-refresh.output: -------------------------------------------------------------------------------- 1 | { 2 | type: 'container' 3 | } -------------------------------------------------------------------------------- /html5/test/unit/default/assets/promise.output: -------------------------------------------------------------------------------- 1 | { 2 | type: 'container' 3 | } 4 | -------------------------------------------------------------------------------- /html5/test/unit/default/assets/transformer1.output: -------------------------------------------------------------------------------- 1 | { 2 | type: 'container' 3 | } -------------------------------------------------------------------------------- /html5/test/unit/default/assets/transformer2.output: -------------------------------------------------------------------------------- 1 | { 2 | type: 'container' 3 | } -------------------------------------------------------------------------------- /html5/test/unit/default/assets/transformer3.output: -------------------------------------------------------------------------------- 1 | { 2 | type: 'container' 3 | } -------------------------------------------------------------------------------- /img/web-sc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/img/web-sc.png -------------------------------------------------------------------------------- /android/playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_List/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_PopBox/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Select/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Style/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Switch/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Video/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Web/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /html5/runtime/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unused-vars": 0 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /android/playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Animation/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_AppendTree/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_BizComponet/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_BizModule/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_DataBind/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Gesture/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Monitor/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/playground/app/src/androidTest/java/com/alibaba/weex/uitest/TC_Scroller/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /html5/browser/extend/components/video/video.css: -------------------------------------------------------------------------------- 1 | .weex-video { 2 | background-color: #000; 3 | } -------------------------------------------------------------------------------- /ios/playground/weex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/weex.png -------------------------------------------------------------------------------- /ios/playground/weex@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/weex@2x.png -------------------------------------------------------------------------------- /android/sdk/libs/x86/libweexv8.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/sdk/libs/x86/libweexv8.so -------------------------------------------------------------------------------- /android/playground/app/tools/weex.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/playground/app/tools/weex.jks -------------------------------------------------------------------------------- /android/sdk/libs/armeabi/libweexv8.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/sdk/libs/armeabi/libweexv8.so -------------------------------------------------------------------------------- /android/weex_debug/libs/classes.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/weex_debug/libs/classes.jar -------------------------------------------------------------------------------- /ios/playground/WeexDemo/weex-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/weex-icon.png -------------------------------------------------------------------------------- /android/inspector/proguard-consumer.pro: -------------------------------------------------------------------------------- 1 | -keep class com.taobao.weex.devtools.** { *; } 2 | -dontwarn com.taobao.weex.devtools.** 3 | -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /android/sdk/license/plexus-utils-3.0.24.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/sdk/license/plexus-utils-3.0.24.jar -------------------------------------------------------------------------------- /android/sdk/src/main/res/drawable/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/sdk/src/main/res/drawable/error.png -------------------------------------------------------------------------------- /android/sdk/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/sdk/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Resources/wx_load_error@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/sdk/WeexSDK/Resources/wx_load_error@3x.png -------------------------------------------------------------------------------- /android/playground/app/src/main/res/raw/beep.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/playground/app/src/main/res/raw/beep.ogg -------------------------------------------------------------------------------- /android/playground/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/playground/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/sdk/license/license-gradle-plugin-0.12.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/sdk/license/license-gradle-plugin-0.12.1.jar -------------------------------------------------------------------------------- /android/sdk/license/maven-license-plugin-1.10.b1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/sdk/license/maven-license-plugin-1.10.b1.jar -------------------------------------------------------------------------------- /android/weex_debug/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/weex_debug/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /html5/browser/runtime/config.js: -------------------------------------------------------------------------------- 1 | // built by npm run build:config 2 | 3 | import * as Weex from './default' 4 | 5 | export default { 6 | Weex 7 | } 8 | -------------------------------------------------------------------------------- /android/inspector/gradle.properties: -------------------------------------------------------------------------------- 1 | POM_NAME=Weex 2 | POM_ARTIFACT_ID=inspector 3 | POM_OPTIONAL_DEPS=com.android.support:appcompat-v7 4 | POM_PACKAGING=aar 5 | -------------------------------------------------------------------------------- /html5/vdom/helper.js: -------------------------------------------------------------------------------- 1 | let nextNodeRef = 1 2 | 3 | export const instanceMap = {} 4 | 5 | export function getNextNodeRef () { 6 | return nextNodeRef++ 7 | } 8 | -------------------------------------------------------------------------------- /html5/browser/extend/components/image/image.css: -------------------------------------------------------------------------------- 1 | .weex-img { 2 | background-repeat: no-repeat; 3 | background-size: 100% 100%; 4 | background-position: 50%; 5 | } -------------------------------------------------------------------------------- /ios/WXDevtool/Products/TBWXDevTool.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/WXDevtool/Products/TBWXDevTool.framework/Info.plist -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/back.imageset/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/back.imageset/back.png -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/scan.imageset/scan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/scan.imageset/scan.png -------------------------------------------------------------------------------- /android/playground/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/playground/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/playground/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/playground/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/playground/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/playground/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/weex_debug/src/main/res/drawable-xhdpi/ic_action_3d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/weex_debug/src/main/res/drawable-xhdpi/ic_action_3d.png -------------------------------------------------------------------------------- /android/playground/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/playground/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/playground/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/playground/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/weex_debug/src/main/res/drawable-xhdpi/ic_action_weex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/weex_debug/src/main/res/drawable-xhdpi/ic_action_weex.png -------------------------------------------------------------------------------- /android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_coord.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_coord.png -------------------------------------------------------------------------------- /android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_cpu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_cpu.png -------------------------------------------------------------------------------- /android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_fps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_fps.png -------------------------------------------------------------------------------- /android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_grid.png -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/back.imageset/back@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/back.imageset/back@2x.png -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/back.imageset/back@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/back.imageset/back@3x.png -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/reload.imageset/reload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/reload.imageset/reload.png -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/scan.imageset/scan@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/scan.imageset/scan@2x.png -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/scan.imageset/scan@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/scan.imageset/scan@3x.png -------------------------------------------------------------------------------- /android/playground/app/src/main/res/drawable-hdpi/ic_action_scan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/playground/app/src/main/res/drawable-hdpi/ic_action_scan.png -------------------------------------------------------------------------------- /android/playground/app/src/main/res/drawable-mdpi/ic_action_scan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/playground/app/src/main/res/drawable-mdpi/ic_action_scan.png -------------------------------------------------------------------------------- /android/playground/app/src/main/res/drawable-xhdpi/ic_action_scan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/playground/app/src/main/res/drawable-xhdpi/ic_action_scan.png -------------------------------------------------------------------------------- /android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_icon_sp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_icon_sp.png -------------------------------------------------------------------------------- /android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_memory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_memory.png -------------------------------------------------------------------------------- /android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_traffic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_traffic.png -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/reload.imageset/reload@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/reload.imageset/reload@2x.png -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/reload.imageset/reload@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/reload.imageset/reload@3x.png -------------------------------------------------------------------------------- /android/commons/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /android/playground/app/src/main/res/drawable-hdpi/ic_action_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/playground/app/src/main/res/drawable-hdpi/ic_action_refresh.png -------------------------------------------------------------------------------- /android/playground/app/src/main/res/drawable-mdpi/ic_action_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/playground/app/src/main/res/drawable-mdpi/ic_action_refresh.png -------------------------------------------------------------------------------- /android/playground/app/src/main/res/drawable-xhdpi/ic_action_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/playground/app/src/main/res/drawable-xhdpi/ic_action_refresh.png -------------------------------------------------------------------------------- /android/playground/app/src/main/res/drawable-xxhdpi/ic_action_scan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/playground/app/src/main/res/drawable-xxhdpi/ic_action_scan.png -------------------------------------------------------------------------------- /android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_boundary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_boundary.png -------------------------------------------------------------------------------- /android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_icon_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_icon_back.png -------------------------------------------------------------------------------- /android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_icon_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_icon_close.png -------------------------------------------------------------------------------- /android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_icon_fab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_icon_fab.png -------------------------------------------------------------------------------- /android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_icon_perf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_icon_perf.png -------------------------------------------------------------------------------- /android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_icon_tools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_icon_tools.png -------------------------------------------------------------------------------- /android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_icon_ued.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_icon_ued.png -------------------------------------------------------------------------------- /html5/browser/dom/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileOverview 3 | * A simple virtual dom implementation 4 | */ 5 | import ComponentManager from './componentManager' 6 | 7 | export { ComponentManager } 8 | -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-29.png -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-40.png -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-76.png -------------------------------------------------------------------------------- /android/playground/app/src/main/res/drawable-xxhdpi/ic_action_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/playground/app/src/main/res/drawable-xxhdpi/ic_action_refresh.png -------------------------------------------------------------------------------- /html5/test/unit/default/assets/foo2.output: -------------------------------------------------------------------------------- 1 | { 2 | type: 'container', 3 | attr: { 4 | a: '1', 5 | b: 1 6 | }, 7 | style: { 8 | fontSize: 12 9 | } 10 | } -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-29@2x.png -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-29@3x.png -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png -------------------------------------------------------------------------------- /android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_icon_deletefile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/android/weex_debug/src/main/res/drawable-xhdpi/prettyfish_icon_deletefile.png -------------------------------------------------------------------------------- /html5/browser/bridge/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | import protocol from './protocol' 4 | import receiver from './receiver' 5 | import Sender from './sender' 6 | 7 | export { protocol, receiver, Sender } 8 | -------------------------------------------------------------------------------- /html5/test/unit/default/assets/foo3.output: -------------------------------------------------------------------------------- 1 | { 2 | type: 'container', 3 | children: [{ 4 | type: 'text', 5 | attr: { 6 | value: 'Hello World' 7 | } 8 | }] 9 | } -------------------------------------------------------------------------------- /html5/test/unit/default/assets/require.output: -------------------------------------------------------------------------------- 1 | { 2 | type: 'container', 3 | children: [{ 4 | type: 'text', 5 | attr: { 6 | value: 'Hello World' 7 | } 8 | }] 9 | } -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-29@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-29@2x-1.png -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-40@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-40@2x-1.png -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default.png -------------------------------------------------------------------------------- /start: -------------------------------------------------------------------------------- 1 | # called by native 2 | THIS_DIR=$(dirname "$0") 3 | pushd "$THIS_DIR" 4 | 5 | npm run build:native 6 | npm run build:browser 7 | npm run serve & 8 | npm run dev:examples 9 | 10 | popd 11 | -------------------------------------------------------------------------------- /android/playground/README.md: -------------------------------------------------------------------------------- 1 | ### weex apps samples 2 | 3 | *Please install the weex-toolkit before use hotrefresh* 4 | 5 | [Development Tools link](https://github.com/alibaba/weex_toolchain) -------------------------------------------------------------------------------- /android/sdk/.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | .idea 3 | build 4 | captures 5 | local.properties 6 | target 7 | bin 8 | .classpath 9 | .project 10 | .settings 11 | gen 12 | *.iml 13 | lint.xml 14 | project.properties -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default@2x.png -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default@3x.png -------------------------------------------------------------------------------- /android/playground/app/src/main/java/com/alibaba/weex/https/WXHttpResponse.java: -------------------------------------------------------------------------------- 1 | package com.alibaba.weex.https; 2 | 3 | public class WXHttpResponse { 4 | 5 | public int code; 6 | public byte[] data; 7 | } 8 | -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default-4.7@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default-4.7@2x.png -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default@2x-1.png -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default@3x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default@3x-1.png -------------------------------------------------------------------------------- /html5/browser/render/config.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const config = { 4 | weexVersion: '0.5.0', 5 | debug: false, 6 | validRoots: ['div', 'list', 'vlist', 'scroller'] 7 | } 8 | 9 | export default config 10 | -------------------------------------------------------------------------------- /html5/browser/weex-web-kit/index.js: -------------------------------------------------------------------------------- 1 | import SegmentedControl from './components/segmented-control' //okay 2 | 3 | export default { 4 | init: function (Weex) { 5 | 6 | Weex.install(SegmentedControl) 7 | 8 | } 9 | } -------------------------------------------------------------------------------- /html5/test/unit/default/assets/created.output: -------------------------------------------------------------------------------- 1 | { 2 | "children": [ 3 | { 4 | "attr": { 5 | "value": "1" 6 | }, 7 | "type": "text" 8 | } 9 | ], 10 | "type": "container" 11 | } -------------------------------------------------------------------------------- /html5/test/unit/default/assets/dynamic-type.output: -------------------------------------------------------------------------------- 1 | { 2 | type: 'container', 3 | children: [{ 4 | type: 'text', 5 | style: { 6 | width: 200, 7 | height: 200 8 | } 9 | }] 10 | } 11 | -------------------------------------------------------------------------------- /html5/test/unit/default/assets/ready.output: -------------------------------------------------------------------------------- 1 | { 2 | "children": [ 3 | { 4 | "attr": { 5 | "value": "1" 6 | }, 7 | "type": "text" 8 | } 9 | ], 10 | "type": "container" 11 | } -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png -------------------------------------------------------------------------------- /html5/browser/extend/components/indicator/indicator.css: -------------------------------------------------------------------------------- 1 | .weex-indicators { 2 | position: absolute; 3 | white-space: nowrap; 4 | } 5 | .weex-indicators .weex-indicator { 6 | float: left; 7 | border-radius: 50%; 8 | } 9 | -------------------------------------------------------------------------------- /html5/browser/extend/components/slider/carrousel.css: -------------------------------------------------------------------------------- 1 | [data-ctrl-name="carrousel"] { 2 | position: relative; 3 | -webkit-transform: translateZ(1px); 4 | -ms-transform: translateZ(1px); 5 | transform: translateZ(1px); 6 | } -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coderyi/hello-weex/HEAD/ios/playground/WeexDemo/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x-1.png -------------------------------------------------------------------------------- /ios/sdk/WeexSDK.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /html5/test/e2e/specs/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'index page': function (browser) { 3 | browser.url('http://localhost:8088/index.html') 4 | browser.expect.element('#weex').to.be.present 5 | browser.end() 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ios/playground/WeexDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /html5/test/unit/default/assets/foo4.output: -------------------------------------------------------------------------------- 1 | { 2 | type: 'container', 3 | children: [{ 4 | type: 'text', 5 | attr: { 6 | value: 'Hello World' 7 | }, 8 | style: { 9 | color: '#ff0000' 10 | } 11 | }] 12 | } -------------------------------------------------------------------------------- /android/playground/app/src/main/java/com/alibaba/weex/https/WXRequestListener.java: -------------------------------------------------------------------------------- 1 | package com.alibaba.weex.https; 2 | 3 | public interface WXRequestListener { 4 | 5 | void onSuccess(WXHttpTask task); 6 | 7 | void onError(WXHttpTask task); 8 | } 9 | -------------------------------------------------------------------------------- /html5/test/unit/default/assets/inline-click.output: -------------------------------------------------------------------------------- 1 | { 2 | "type": "div", 3 | "children": [ 4 | { 5 | "type": "text", 6 | "attr": { 7 | "value": "Hello World1" 8 | }, 9 | "event": [ 10 | "click" 11 | ] 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /android/playground/app/src/main/java/com/alibaba/weex/https/WXHttpTask.java: -------------------------------------------------------------------------------- 1 | package com.alibaba.weex.https; 2 | 3 | public class WXHttpTask { 4 | 5 | public String url; 6 | public WXRequestListener requestListener; 7 | public WXHttpResponse response; 8 | } 9 | -------------------------------------------------------------------------------- /android/weex_debug/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12dp 4 | 16dp 5 | 16dp 6 | -------------------------------------------------------------------------------- /html5/test/unit/default/assets/input-binding.output: -------------------------------------------------------------------------------- 1 | { 2 | "children": [ 3 | { 4 | "attr": { 5 | "value": "abcde" 6 | }, 7 | "event": ["change"], 8 | "type": "input" 9 | } 10 | ], 11 | "type": "div" 12 | } 13 | -------------------------------------------------------------------------------- /ios/WXDevtool/WXDevTool/Source/PonyDebugger/NSData+PDDebugger.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Simone Civetta on 01/08/14. 3 | // 4 | 5 | #import 6 | 7 | @interface NSData (PDDebugger) 8 | + (NSData *)emptyDataOfLength:(NSUInteger)length; 9 | @end -------------------------------------------------------------------------------- /html5/test/unit/default/assets/if.output: -------------------------------------------------------------------------------- 1 | { 2 | type: 'container', 3 | children: [{ 4 | type: 'text', 5 | style: { 6 | color: '#FF0000', 7 | fontSize: 26 8 | }, 9 | attr: { 10 | value: 'Hello World' 11 | } 12 | }] 13 | } -------------------------------------------------------------------------------- /html5/browser/extend/components/scrollable/list/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | import Vlist from './vlist' 4 | import Hlist from './hlist' 5 | 6 | function init (Weex) { 7 | Weex.install(Vlist) 8 | Weex.install(Hlist) 9 | } 10 | 11 | export default { init } 12 | -------------------------------------------------------------------------------- /html5/browser/runtime/shared.js: -------------------------------------------------------------------------------- 1 | import '../../shared/promise' 2 | // import '../../shared/console' 3 | 4 | export { 5 | extend, 6 | def, 7 | remove, 8 | hasOwn, 9 | bind, 10 | toArray, 11 | isObject, 12 | isPlainObject 13 | } from '../../shared/utils' 14 | -------------------------------------------------------------------------------- /html5/test/unit/default/assets/if-repeat.output: -------------------------------------------------------------------------------- 1 | { 2 | type: 'container', 3 | children: [{ 4 | type: 'text', 5 | style: { 6 | color: '#FF0000', 7 | fontSize: 26 8 | }, 9 | attr: { 10 | value: 'Hello World1' 11 | } 12 | }] 13 | } -------------------------------------------------------------------------------- /html5/shared/index.js: -------------------------------------------------------------------------------- 1 | import './setTimeout' 2 | import './promise' 3 | import './console' 4 | import './objectAssign' 5 | 6 | export { 7 | extend, 8 | def, 9 | remove, 10 | hasOwn, 11 | bind, 12 | toArray, 13 | isObject, 14 | isPlainObject 15 | } from './utils' 16 | -------------------------------------------------------------------------------- /html5/test/unit/default/assets/computed.output: -------------------------------------------------------------------------------- 1 | { 2 | type: 'container', 3 | event: ['click'], 4 | children: [{ 5 | type: 'text', 6 | attr: { 7 | value: 3 8 | }, 9 | }, { 10 | type: 'text', 11 | attr: { 12 | value: 3 13 | } 14 | }] 15 | } 16 | -------------------------------------------------------------------------------- /ios/WXDevtool/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | ali_source 'alibaba-specs' 3 | ali_source 'alibaba-specs-mirror' 4 | 5 | platform :ios, '7.0' 6 | inhibit_all_warnings! 7 | target 'TBWXDevTool' do 8 | pod 'WeexSDK', '~> 0.6.0.5' 9 | end 10 | -------------------------------------------------------------------------------- /html5/test/unit/default/assets/foo5.output: -------------------------------------------------------------------------------- 1 | { 2 | type: 'container', 3 | children: [{ 4 | type: 'text', 5 | attr: { 6 | value: 'Hello World' 7 | }, 8 | style: { 9 | color: '#ff0000', 10 | fontSize: 48, 11 | fontWeight: 'bold' 12 | } 13 | }] 14 | } -------------------------------------------------------------------------------- /android/weex_debug/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon May 23 19:45:35 CST 2016 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-2.2.1-bin.zip 7 | -------------------------------------------------------------------------------- /html5/default/app/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileOverview 3 | * Weex instance constructor & definition 4 | */ 5 | import { extend } from '../util' 6 | import * as ctrl from './ctrl' 7 | import AppInstance from './instance' 8 | 9 | extend(AppInstance.prototype, ctrl) 10 | 11 | export default AppInstance 12 | -------------------------------------------------------------------------------- /android/playground/NOTICE: -------------------------------------------------------------------------------- 1 | Weex android playground 2 | Copyright 2016 Alibaba Group 3 | 4 | This product includes software developed at Alibaba Group. (http://www.alibabagroup.com) 5 | 6 | This product contains software zxing(https://github.com/zxing/zxing) developed 7 | by Google Inc. , licensed under the Apache License. -------------------------------------------------------------------------------- /html5/default/config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | nativeComponentMap: { 3 | text: true, 4 | image: true, 5 | container: true, 6 | slider: { 7 | type: 'slider', 8 | append: 'tree' 9 | }, 10 | cell: { 11 | type: 'cell', 12 | append: 'tree' 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ios/WXDevtool/TBWXDevTool_MTL/TBWXDevTool_MTL.m: -------------------------------------------------------------------------------- 1 | // 2 | // TBWXDevTool_MTL.m 3 | // TBWXDevTool_MTL 4 | // 5 | // Created by yangshengtao on 16/7/20. 6 | // Copyright © 2016年 Taobao. All rights reserved. 7 | // 8 | 9 | #import "TBWXDevTool_MTL.h" 10 | 11 | @implementation TBWXDevTool_MTL 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /android/weex_debug/NOTICE: -------------------------------------------------------------------------------- 1 | Weex Debug Android 2 | Copyright 2016 Alibaba Group 3 | 4 | This product includes software developed at Alibaba Group. (http://www.alibabagroup.com) 5 | 6 | This product contains software scalpel(https://github.com/JakeWharton/scalpel.git) developed 7 | by JakeWharton Inc., licensed under the LICENSE-2.0. -------------------------------------------------------------------------------- /ios/WXDevtool/TBWXDevTool_MTL/TBWXDevTool_MTL.h: -------------------------------------------------------------------------------- 1 | // 2 | // TBWXDevTool_MTL.h 3 | // TBWXDevTool_MTL 4 | // 5 | // Created by yangshengtao on 16/7/20. 6 | // Copyright © 2016年 Taobao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TBWXDevTool_MTL : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ios/WXDevtool/WXDevTool/Source/PonyDebugger/NSDate+PDDebugger.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+PDDebugger.h 3 | // PonyDebugger 4 | // 5 | // Created by Wen-Hao Lue on 2013-01-30. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface NSDate (PDDebugger) 12 | 13 | + (NSNumber *)PD_timestamp; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /ios/playground/WeexDemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /html5/browser/runtime/default/config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | nativeComponentMap: { 3 | text: true, 4 | image: true, 5 | container: true, 6 | slider: { 7 | type: 'slider', 8 | append: 'tree' 9 | }, 10 | cell: { 11 | type: 'cell', 12 | append: 'tree' 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/playground/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | #66000000 8 | 9 | -------------------------------------------------------------------------------- /bin/release.sh: -------------------------------------------------------------------------------- 1 | # Export bugfix log 2 | git log --pretty=format:"%s %h" --no-merges --since="2016-05-17" | grep -E "^[\\*]\s*\[(jsfm|html5|android|ios)\].*(fix|bug|close)" > commit-history.log 3 | 4 | # git log --pretty=format:"%s %h" --no-merges --since="2016-05-17" | grep -E "^[\\*]\s*\[(jsfm|html5|android|ios)\]" > commit-history.log 5 | -------------------------------------------------------------------------------- /html5/browser/runtime/app/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileOverview 3 | * Weex instance constructor & definition 4 | */ 5 | import * as ctrl from './ctrl' 6 | import { extend } from '../../utils' 7 | import AppInstance from '../../../default/app/instance' 8 | 9 | extend(AppInstance.prototype, ctrl) 10 | 11 | export default AppInstance 12 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Component/WXTextAreaComponent.h: -------------------------------------------------------------------------------- 1 | // 2 | // WXTextViewComponent.h 3 | // WeexSDK 4 | // 5 | // Created by zifan.zx on 7/4/16. 6 | // Copyright © 2016 taobao. All rights reserved. 7 | // 8 | 9 | #import "WXComponent.h" 10 | 11 | @interface WXTextAreaComponent : WXComponent 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /html5/shared/promise.js: -------------------------------------------------------------------------------- 1 | // fix Promise Problem on JSContext of iOS7~8 2 | // @see https://bugs.webkit.org/show_bug.cgi?id=135866 3 | // global.Promise = null 4 | require('core-js/modules/es6.object.to-string') 5 | require('core-js/modules/es6.string.iterator') 6 | require('core-js/modules/web.dom.iterable') 7 | require('core-js/modules/es6.promise') 8 | -------------------------------------------------------------------------------- /ios/playground/WeexDemo/WeexiOSKit/Component/WXSeekBarComponent.h: -------------------------------------------------------------------------------- 1 | // 2 | // WXSeekBarComponent.h 3 | // Monkey 4 | // 5 | // Created by coderyi on 2016/10/12. 6 | // Copyright © 2016年 www.coderyi.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface WXSeekBarComponent : WXComponent 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ios/playground/WeexDemo/WeexiOSKit/Component/WXStepperComponent.h: -------------------------------------------------------------------------------- 1 | // 2 | // WXStepperComponent.h 3 | // Monkey 4 | // 5 | // Created by coderyi on 2016/10/12. 6 | // Copyright © 2016年 www.coderyi.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface WXStepperComponent : WXComponent 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /bin/install-hooks.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if test -e .git/hooks; then 4 | ln -sf ../../bin/pre-commit.sh .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit 5 | ln -sf ../../bin/commit-msg.sh .git/hooks/commit-msg && chmod +x .git/hooks/commit-msg 6 | ln -sf ../../bin/pre-push.sh .git/hooks/pre-push && chmod +x .git/hooks/pre-push 7 | fi -------------------------------------------------------------------------------- /ios/playground/WeexDemo/WeexiOSKit/Component/WXDatePickerComponent.h: -------------------------------------------------------------------------------- 1 | // 2 | // WXDatePickerComponent.h 3 | // Monkey 4 | // 5 | // Created by coderyi on 2016/10/12. 6 | // Copyright © 2016年 www.coderyi.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface WXDatePickerComponent : WXComponent 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ios/playground/WeexDemo/WeexiOSKit/Component/WXSearchBarComponent.h: -------------------------------------------------------------------------------- 1 | // 2 | // WXSearchBarComponent.h 3 | // Monkey 4 | // 5 | // Created by coderyi on 2016/10/12. 6 | // Copyright © 2016年 www.coderyi.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface WXSearchBarComponent : WXComponent 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /bin/pre-commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | sh ./bin/welcome.sh 4 | 5 | # Validate email 6 | email=$(git config user.email | grep -E 'alibaba-inc.com|taobao.com|tmall.com|1688.com') 7 | if [ "$email" != "" ];then 8 | echo "ERROR: Your git repo email is '$email'. Please run:\n" 9 | echo " git config user.email 'your.github@binded.email'\n" 10 | exit 1 11 | fi -------------------------------------------------------------------------------- /ios/playground/WeexDemo/WeexiOSKit/Component/WXSegmentedControlComponent.h: -------------------------------------------------------------------------------- 1 | // 2 | // WXSegmentedControlComponent.h 3 | // Monkey 4 | // 5 | // Created by coderyi on 2016/10/11. 6 | // Copyright © 2016年 www.coderyi.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface WXSegmentedControlComponent : WXComponent 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Module/WXClipboardModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // WXClipboardModule.h 3 | // WeexSDK 4 | // 5 | // Created by Jun Shi on 7/21/16. 6 | // Copyright © 2016 taobao. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "WXModuleProtocol.h" 11 | 12 | @interface WXClipboardModule : NSObject 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /android/playground/app/src/main/res/drawable/side_nav_bar.xml: -------------------------------------------------------------------------------- 1 | 3 | 9 | -------------------------------------------------------------------------------- /android/weex_debug/src/main/res/drawable/prettyfish_fab.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ios/playground/WeexDemo/WeexiOSKit/Module/WXLocationModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // WXLocationModule.h 3 | // WeexDemo 4 | // 5 | // Created by coderyi on 2016/10/18. 6 | // Copyright © 2016年 taobao. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "WXModuleProtocol.h" 11 | 12 | @interface WXLocationModule : NSObject 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /android/sdk/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Oct 21 11:34:03 PDT 2015 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | #distributionUrl=http://gw.alicdn.com/bao/uploaded/LB1J5WLJVXXXXcMXpXXXXXXXXXX.zip 7 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip 8 | -------------------------------------------------------------------------------- /ios/playground/WeexDemo/WeexiOSKit/Module/WXVibrationModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // WXVibrationModule.h 3 | // WeexDemo 4 | // 5 | // Created by coderyi on 2016/10/20. 6 | // Copyright © 2016年 taobao. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "WXModuleProtocol.h" 11 | 12 | @interface WXVibrationModule : NSObject 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /ios/playground/WeexDemo/WeexiOSKit/Module/WXActionSheetModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // WXActionSheetModule.h 3 | // Monkey 4 | // 5 | // Created by coderyi on 2016/10/12. 6 | // Copyright © 2016年 www.coderyi.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "WXModuleProtocol.h" 11 | 12 | @interface WXActionSheetModule : NSObject 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /android/weex_debug/src/main/res/drawable/leak_canary_toast_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /html5/browser/extend/components/scrollable/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | import list from './list' 4 | import scroller from './scroller' 5 | import refresh from './refresh' 6 | import loading from './loading' 7 | 8 | export default { 9 | init: function (Weex) { 10 | Weex.install(list) 11 | Weex.install(scroller) 12 | Weex.install(refresh) 13 | Weex.install(loading) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ios/playground/WeexDemo/WeexiOSKit/Module/WXMBProgressHUDModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // WXMBProgressHUDModule.h 3 | // Monkey 4 | // 5 | // Created by coderyi on 2016/10/12. 6 | // Copyright © 2016年 www.coderyi.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "WXModuleProtocol.h" 11 | 12 | @interface WXMBProgressHUDModule : NSObject 13 | 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /android/playground/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | include ":weex_sdk" 4 | project(":weex_sdk").projectDir=new File("../sdk") 5 | 6 | include ":inspector" 7 | project(":inspector").projectDir=new File("../inspector") 8 | 9 | include ":commons" 10 | project(":commons").projectDir=new File("../commons") 11 | 12 | include ":weex_debug" 13 | project(":weex_debug").projectDir=new File("../weex_debug") 14 | -------------------------------------------------------------------------------- /android/playground/app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 9 | 10 | -------------------------------------------------------------------------------- /android/weex_debug/src/main/res/drawable/prettyfish_bg_floatmenu.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK_MTL/WeexSDK_MTL.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WeexSDK_MTL.h" 10 | 11 | @implementation WeexSDK_MTL 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /android/playground/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Apr 12 10:06:38 CST 2016 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=http://gw.alicdn.com/bao/uploaded/LB1J5WLJVXXXXcMXpXXXXXXXXXX.zip 7 | #distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip 8 | #distributionUrl=gradle-2.10-bin.zip -------------------------------------------------------------------------------- /android/weex_debug/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ios/WXDevtool/WXDevTool/Source/PonyDebugger/NSDate+PDDebugger.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+PDDebugger.m 3 | // PonyDebugger 4 | // 5 | // Created by Wen-Hao Lue on 2013-01-30. 6 | // 7 | // 8 | 9 | #import "NSDate+PDDebugger.h" 10 | 11 | @implementation NSDate (PDDebugger) 12 | 13 | + (NSNumber *)PD_timestamp; 14 | { 15 | return [NSNumber numberWithDouble:[[NSDate date] timeIntervalSince1970]]; 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/View/WXView.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | 11 | @interface WXView : UIView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /android/playground/app/src/main/res/drawable-v21/ic_menu_send.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /android/playground/app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /html5/browser/extend/components/scrollable/scrollable.css: -------------------------------------------------------------------------------- 1 | .scrollable-wrap { 2 | display: block; 3 | overflow: hidden; 4 | } 5 | 6 | .scrollable-element.horizontal { 7 | -webkit-box-orient: horizontal; 8 | -webkit-flex-direction: row; 9 | flex-direction: row; 10 | } 11 | .scrollable-element.vertical { 12 | -webkit-box-orient: vertical; 13 | -webkit-flex-direction: column; 14 | flex-direction: column; 15 | } 16 | -------------------------------------------------------------------------------- /html5/test/unit/default/assets/subvm.output: -------------------------------------------------------------------------------- 1 | { 2 | "type": "container", 3 | "children": [{ 4 | "type": "container", 5 | "children": [{ 6 | "type": "text", 7 | "attr": { 8 | "value": "aa" 9 | } 10 | },{ 11 | "type": "text", 12 | "attr": { 13 | "value": "bb" 14 | } 15 | }] 16 | }] 17 | } -------------------------------------------------------------------------------- /android/playground/app/src/main/java/com/alibaba/weex/extend/module/RenderModule.java: -------------------------------------------------------------------------------- 1 | package com.alibaba.weex.extend.module; 2 | 3 | import android.util.Log; 4 | 5 | import com.taobao.weex.common.WXModule; 6 | import com.taobao.weex.common.WXModuleAnno; 7 | 8 | 9 | public class RenderModule extends WXModule { 10 | 11 | @WXModuleAnno 12 | public void performClick() { 13 | Log.d("Render", "Render"); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/playground/app/src/main/res/menu/main_scan.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | 10 | -------------------------------------------------------------------------------- /android/weex_debug/src/test/java/com/taobao/weex/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.taobao.weex; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | 12 | @Test 13 | public void addition_isCorrect() throws Exception { 14 | assertEquals(4, 2 + 2); 15 | } 16 | } -------------------------------------------------------------------------------- /html5/browser/utils/array.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | export function isArray (arr) { 4 | return Array.isArray 5 | ? Array.isArray(arr) 6 | : (Object.prototype.toString.call(arr) === '[object Array]') 7 | } 8 | 9 | export function slice (arr, start, end) { 10 | if (isArray(arr)) { 11 | return arr.slice(start, end) 12 | } 13 | const slice = Array.prototype.slice 14 | return slice.call(arr, start, end) 15 | } 16 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK_MTL/WeexSDK_MTL.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | 11 | @interface WeexSDK_MTL : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /html5/runtime/index.js: -------------------------------------------------------------------------------- 1 | import { Document, Element, Comment } from '../vdom' 2 | import Listener from '../vdom/listener' 3 | import frameworks from './config' 4 | 5 | import init from './init' 6 | 7 | const config = { 8 | Document, Element, Comment, Listener, frameworks, 9 | sendTasks (...args) { 10 | return global.callNative(...args) 11 | } 12 | } 13 | 14 | const methods = init(config) 15 | 16 | export default methods 17 | -------------------------------------------------------------------------------- /html5/test/unit/default/assets/components.output: -------------------------------------------------------------------------------- 1 | { 2 | "type": "container", 3 | "children": [{ 4 | "type": "container", 5 | "children": [{ 6 | "type": "text", 7 | "attr": { 8 | "value": "aa" 9 | } 10 | },{ 11 | "type": "text", 12 | "attr": { 13 | "value": "bb" 14 | } 15 | }] 16 | }] 17 | } 18 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Display/WXLayer.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | 11 | @interface WXLayer : CALayer 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /android/playground/app/src/main/res/menu/refresh.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | 10 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Display/WXComponent+Display.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXComponent.h" 10 | 11 | @interface WXComponent (Display) 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /html5/browser/extend/components/scrollable/loading/loading.css: -------------------------------------------------------------------------------- 1 | .weex-loading { 2 | // -webkit-box-align: center; 3 | // -webkit-align-items: center; 4 | // align-items: center; 5 | // -webkit-box-pack: center; 6 | // -webkit-justify-content: center; 7 | // justify-content: center; 8 | overflow: hidden; 9 | position: absolute; 10 | bottom: 0; 11 | left: 0; 12 | width: 100%; 13 | height: 0; 14 | background-color: #666; 15 | } -------------------------------------------------------------------------------- /html5/browser/weex-web-kit/components/segmented-control/segmented-control.css: -------------------------------------------------------------------------------- 1 | .weex-sc { 2 | flex-direction: row; 3 | border-radius: 6px; 4 | border-left:2px solid red; 5 | } 6 | 7 | .weex-sc-item { 8 | flex-direction: row; 9 | border-radius: 6px; 10 | border-right:2px solid red; 11 | border-bottom:2px solid red; 12 | border-top:2px solid red; 13 | text-align:center; 14 | vertical-align:middle; 15 | align-content:center; 16 | } -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Component/WXDivComponent.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXComponent.h" 10 | 11 | @interface WXDivComponent : WXComponent 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Component/WXImageComponent.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXComponent.h" 10 | 11 | @interface WXImageComponent : WXComponent 12 | 13 | @end -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Component/WXTextComponent.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXComponent.h" 10 | 11 | @interface WXTextComponent : WXComponent 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Supporting Files/WeexSDK-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | #import 9 | #import 10 | #import "WXDefine.h" 11 | #endif 12 | 13 | #ifdef DEBUG 14 | # define NSLog(...) NSLog(__VA_ARGS__) 15 | #else 16 | # define NSLog(...) 17 | #endif -------------------------------------------------------------------------------- /html5/browser/base/div.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | function init (Weex) { 4 | const Component = Weex.Component 5 | 6 | function Div (data, nodeType) { 7 | Component.call(this, data, nodeType) 8 | this.node.classList.add('weex-container') 9 | } 10 | Div.prototype = Object.create(Component.prototype) 11 | 12 | Weex.registerComponent('div', Div) 13 | Weex.registerComponent('container', Div) 14 | } 15 | 16 | export default { init } 17 | -------------------------------------------------------------------------------- /html5/default/app/ctrl/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileOverview 3 | * instance controls from native 4 | * 5 | * - init bundle 6 | * - fire event 7 | * - callback 8 | * - destroy 9 | * 10 | * corresponded with the API of instance manager (framework.js) 11 | */ 12 | export { init } from './init' 13 | 14 | export { 15 | updateActions, 16 | destroy, 17 | getRootElement, 18 | fireEvent, 19 | callback, 20 | refreshData 21 | } from './misc' 22 | -------------------------------------------------------------------------------- /html5/test/unit/default/assets/if-repeat-refresh.output: -------------------------------------------------------------------------------- 1 | { 2 | type: 'container', 3 | children: [{ 4 | type: 'text', 5 | style: { 6 | color: '#FF0000', 7 | fontSize: 26 8 | }, 9 | attr: { 10 | value: 'Hello World2' 11 | } 12 | }, { 13 | type: 'text', 14 | style: { 15 | color: '#FF0000', 16 | fontSize: 26 17 | }, 18 | attr: { 19 | value: 'Hello World3' 20 | } 21 | }] 22 | } -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Component/WXSwitchComponent.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXComponent.h" 10 | 11 | @interface WXSwitchComponent : WXComponent 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/View/WXComponent+ViewManagement.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXComponent.h" 10 | 11 | @interface WXComponent (ViewManagement) 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /html5/test/unit/default/assets/repeat-index.output: -------------------------------------------------------------------------------- 1 | { 2 | type: 'container', 3 | children: [{ 4 | type: 'text', 5 | style: { 6 | color: '#FF0000', 7 | fontSize: 26 8 | }, 9 | attr: { 10 | value: '0: Hello World1' 11 | } 12 | }, { 13 | type: 'text', 14 | style: { 15 | color: '#FF0000', 16 | fontSize: 26 17 | }, 18 | attr: { 19 | value: '1: Hello World2' 20 | } 21 | }] 22 | } 23 | -------------------------------------------------------------------------------- /ios/playground/WeexDemo/DemoBaseViewController.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | 11 | @interface DemoBaseViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Module/WXDomModule.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXModuleProtocol.h" 10 | 11 | @interface WXDomModule : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /html5/browser/extend/api/event.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const event = { 4 | /** 5 | * openUrl 6 | * @param {string} url 7 | */ 8 | openURL: function (url) { 9 | location.href = url 10 | } 11 | 12 | } 13 | 14 | const meta = { 15 | event: [{ 16 | name: 'openURL', 17 | args: ['string'] 18 | }] 19 | } 20 | 21 | export default { 22 | init: function (Weex) { 23 | Weex.registerApiModule('event', event, meta) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /html5/test/unit/default/assets/computed-in-repeat.output: -------------------------------------------------------------------------------- 1 | { 2 | "type": "div", 3 | "children": [{ 4 | "type": "text", 5 | "attr": { 6 | "value": "Hello Evan You" 7 | } 8 | }, { 9 | "type": "text", 10 | "attr": { 11 | "value": "Hello Terry King" 12 | } 13 | }, { 14 | "type": "text", 15 | "attr": { 16 | "value": "Jack Ma" 17 | } 18 | }] 19 | } -------------------------------------------------------------------------------- /html5/test/unit/default/assets/foo3.input: -------------------------------------------------------------------------------- 1 | define('@weex-component/foo3', function (require, exports, module) { 2 | 3 | ; 4 | 5 | ;module.exports.style = {} 6 | 7 | ;module.exports.template = { 8 | "type": "container", 9 | "children": [ 10 | { 11 | "type": "text", 12 | "attr": { 13 | "value": "Hello World" 14 | } 15 | } 16 | ] 17 | } 18 | 19 | ;}) 20 | 21 | // require module 22 | 23 | bootstrap('@weex-component/foo3') -------------------------------------------------------------------------------- /html5/test/unit/default/assets/repeat-array-kv.output: -------------------------------------------------------------------------------- 1 | { 2 | type: 'container', 3 | children: [{ 4 | type: 'text', 5 | style: { 6 | color: '#FF0000', 7 | fontSize: 26 8 | }, 9 | attr: { 10 | value: '0: Hello World1' 11 | } 12 | }, { 13 | type: 'text', 14 | style: { 15 | color: '#FF0000', 16 | fontSize: 26 17 | }, 18 | attr: { 19 | value: '1: Hello World2' 20 | } 21 | }] 22 | } 23 | -------------------------------------------------------------------------------- /html5/test/unit/default/assets/repeat-array-v.output: -------------------------------------------------------------------------------- 1 | { 2 | type: 'container', 3 | children: [{ 4 | type: 'text', 5 | style: { 6 | color: '#FF0000', 7 | fontSize: 26 8 | }, 9 | attr: { 10 | value: '0: Hello World1' 11 | } 12 | }, { 13 | type: 'text', 14 | style: { 15 | color: '#FF0000', 16 | fontSize: 26 17 | }, 18 | attr: { 19 | value: '1: Hello World2' 20 | } 21 | }] 22 | } 23 | -------------------------------------------------------------------------------- /ios/playground/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | platform :ios, '7.0' 3 | #inhibit_all_warnings! 4 | 5 | def common 6 | pod 'WeexSDK', :path=>'../sdk/' 7 | pod 'WXDevtool', :path=>'../WXDevtool/' 8 | pod 'SDWebImage', '3.7.5' 9 | pod 'SocketRocket', '0.4.2' 10 | pod 'ATSDK-Weex', '0.0.1' 11 | end 12 | 13 | target 'WeexDemo' do 14 | common 15 | end 16 | 17 | target 'WeexUITestDemo' do 18 | common 19 | end 20 | -------------------------------------------------------------------------------- /android/weex_debug/src/androidTest/java/com/taobao/weex/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.taobao.weex; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | 11 | public ApplicationTest() { 12 | super(Application.class); 13 | } 14 | } -------------------------------------------------------------------------------- /html5/browser/extend/components/scrollable/list/hlist.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | import listModule from './list' 4 | 5 | function init (Weex) { 6 | const List = listModule.init(Weex) 7 | 8 | function Hlist (data, nodeType) { 9 | data.attr.direction = 'h' 10 | List.call(this, data, nodeType) 11 | } 12 | 13 | Hlist.prototype = Object.create(List.prototype) 14 | 15 | Weex.registerComponent('hlist', Hlist) 16 | } 17 | 18 | export default { init } 19 | -------------------------------------------------------------------------------- /html5/browser/extend/components/scrollable/refresh/refresh.css: -------------------------------------------------------------------------------- 1 | .weex-refresh { 2 | // -webkit-box-align: center; 3 | // -webkit-align-items: center; 4 | // align-items: center; 5 | // -webkit-box-pack: center; 6 | // -webkit-justify-content: center; 7 | // justify-content: center; 8 | overflow: hidden; 9 | position: absolute; 10 | top: 0; 11 | left: 0; 12 | width: 100%; 13 | height: 0; 14 | z-index: 999999; 15 | background-color: #666; 16 | } -------------------------------------------------------------------------------- /html5/test/unit/default/assets/foo.input: -------------------------------------------------------------------------------- 1 | define('@weex-component/foo', function (require, exports, module) { 2 | 3 | ; 4 | module.exports = { 5 | data: function () { 6 | return { 7 | x: 1 8 | } 9 | } 10 | } 11 | 12 | 13 | ;module.exports.style = { 14 | "a": { 15 | "fontSize": 12 16 | } 17 | } 18 | 19 | ;module.exports.template = { 20 | "type": "container" 21 | } 22 | 23 | ;}) 24 | 25 | 26 | bootstrap('@weex-component/foo') -------------------------------------------------------------------------------- /html5/test/unit/default/assets/repeat-array-no-kv.output: -------------------------------------------------------------------------------- 1 | { 2 | type: 'container', 3 | children: [{ 4 | type: 'text', 5 | style: { 6 | color: '#FF0000', 7 | fontSize: 26 8 | }, 9 | attr: { 10 | value: '0: Hello World1' 11 | } 12 | }, { 13 | type: 'text', 14 | style: { 15 | color: '#FF0000', 16 | fontSize: 26 17 | }, 18 | attr: { 19 | value: '1: Hello World2' 20 | } 21 | }] 22 | } 23 | -------------------------------------------------------------------------------- /html5/test/unit/default/assets/repeat-array-non-obj.output: -------------------------------------------------------------------------------- 1 | { 2 | type: 'container', 3 | children: [{ 4 | type: 'text', 5 | style: { 6 | color: '#FF0000', 7 | fontSize: 26 8 | }, 9 | attr: { 10 | value: '0: Hello World1' 11 | } 12 | }, { 13 | type: 'text', 14 | style: { 15 | color: '#FF0000', 16 | fontSize: 26 17 | }, 18 | attr: { 19 | value: '1: Hello World2' 20 | } 21 | }] 22 | } 23 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXBridgeProtocol.h" 10 | 11 | @interface WXJSCoreBridge : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Component/WXAComponent.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXComponent.h" 10 | 11 | @interface WXAComponent : WXComponent 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Events/WXComponent+Events.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXComponent.h" 10 | 11 | @interface WXComponent (Events) 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /android/playground/app/src/androidTest/java/com/alibaba/weex/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.alibaba.weex; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /android/sdk/src/main/java/com/taobao/weex/dom/flex/CSSWrap.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014, Facebook, Inc. All rights reserved.

This source code is licensed under 3 | * the BSD-style license found in the LICENSE file in the root directory of this source tree. An 4 | * additional grant of patent rights can be found in the PATENTS file in the same directory. 5 | */ 6 | package com.taobao.weex.dom.flex; 7 | 8 | public enum CSSWrap { 9 | NOWRAP, 10 | WRAP, 11 | } 12 | -------------------------------------------------------------------------------- /bin/commit-msg.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Validate commit log 4 | commit_regex='^Merge.+|[+*-] \[(android|ios|jsfm|html5|component|doc|website|example|test|all)\] [^\n]{1,50}' 5 | 6 | if ! grep -iqE "$commit_regex" "$1"; then 7 | echo "ERROR: commit log format is not correct!" 8 | echo "See https://github.com/alibaba/weex/blob/dev/CONTRIBUTING.md#commit-log" 9 | exit 1 10 | fi 11 | # FIXME no effect after editor (like vim) exits 12 | # ISSUE merge or conflict 13 | -------------------------------------------------------------------------------- /html5/browser/runtime/app/ctrl/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileOverview 3 | * instance controls from native 4 | * 5 | * - init bundle 6 | * - fire event 7 | * - callback 8 | * - destroy 9 | * 10 | * corresponded with the API of instance manager (framework.js) 11 | */ 12 | export { init } from './init' 13 | 14 | export { 15 | updateActions, 16 | destroy, 17 | getRootElement, 18 | fireEvent, 19 | callback, 20 | refreshData 21 | } from '../../../../default/app/ctrl/misc' 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by IDE 2 | .idea/ 3 | *.iml 4 | .DS_Store 5 | 6 | # Created by Builder 7 | examples/build 8 | test/build 9 | weex_tmp 10 | coverage 11 | dist 12 | 13 | # Node 14 | logs 15 | *.log 16 | npm-debug.log* 17 | node_modules 18 | .npm 19 | 20 | # Runtime data 21 | pids 22 | *.pid 23 | *.seed 24 | 25 | # build framework options by script 26 | html5/runtime/config.js 27 | 28 | # e2e test 29 | html5/test/e2e/reports 30 | html5/test/e2e/screenshots 31 | html5/test/e2e/logs 32 | -------------------------------------------------------------------------------- /android/inspector/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /android/playground/app/src/main/java/com/alibaba/weex/WXBaseActivity.java: -------------------------------------------------------------------------------- 1 | package com.alibaba.weex; 2 | 3 | import android.os.Bundle; 4 | import android.os.PersistableBundle; 5 | import android.support.v7.app.AppCompatActivity; 6 | 7 | public abstract class WXBaseActivity extends AppCompatActivity { 8 | 9 | @Override 10 | public void onCreate(Bundle savedInstanceState, PersistableBundle persistentState) { 11 | super.onCreate(savedInstanceState, persistentState); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /html5/browser/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | import Weex from './render' 4 | 5 | /** 6 | * install components and APIs 7 | */ 8 | import root from './base/root' 9 | import div from './base/div' 10 | import components from './extend/components' 11 | import api from './extend/api' 12 | import weexwebkit from './weex-web-kit' 13 | 14 | Weex.install(root) 15 | Weex.install(div) 16 | Weex.install(components) 17 | Weex.install(api) 18 | Weex.install(weexwebkit) 19 | 20 | export default Weex 21 | -------------------------------------------------------------------------------- /ios/WXDevtool/WXDevTool/Source/PonyDebugger/PonyDebugger.h: -------------------------------------------------------------------------------- 1 | // 2 | // PonyDebugger.h 3 | // PonyDebugger 4 | // 5 | // Created by Mike Lewis on 2/27/12. 6 | // 7 | // Licensed to Square, Inc. under one or more contributor license agreements. 8 | // See the LICENSE file distributed with this work for the terms under 9 | // which Square, Inc. licenses this file to you. 10 | // 11 | 12 | #import "PDDefinitions.h" 13 | #import "PDDebugger.h" 14 | #import "PDNetworkDomainController.h" 15 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Component/WXDivComponent.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXDivComponent.h" 10 | 11 | @interface WXDivComponent () 12 | @end 13 | 14 | @implementation WXDivComponent 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /android/playground/app/src/main/java/com/alibaba/weex/extend/module/MyModule.java: -------------------------------------------------------------------------------- 1 | package com.alibaba.weex.extend.module; 2 | 3 | import android.widget.Toast; 4 | 5 | import com.taobao.weex.common.WXModule; 6 | import com.taobao.weex.common.WXModuleAnno; 7 | 8 | public class MyModule extends WXModule { 9 | 10 | @WXModuleAnno(runOnUIThread = true) 11 | public void printLog(String msg) { 12 | Toast.makeText(mWXSDKInstance.getContext(),msg,Toast.LENGTH_SHORT).show(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ios/WXDevtool/WXDevTool/Source/PonyDebugger/WXDeviceInfo.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | 11 | @interface WXDeviceInfo : NSObject 12 | 13 | + (NSString *)getDeviceID; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXComponent.h" 10 | #import "WXSDKInstance.h" 11 | #import "WXUtility.h" 12 | 13 | @interface WXComponent (Layout) 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /android/sdk/src/main/java/com/taobao/weex/dom/CSSWrapConvert.java: -------------------------------------------------------------------------------- 1 | package com.taobao.weex.dom; 2 | 3 | import android.text.TextUtils; 4 | 5 | import com.taobao.weex.dom.flex.CSSWrap; 6 | 7 | class CSSWrapConvert { 8 | 9 | public static CSSWrap convert(String s) { 10 | CSSWrap cssWrap = CSSWrap.NOWRAP; 11 | if (TextUtils.isEmpty(s)) { 12 | return cssWrap; 13 | } else if (s.equals("wrap")) { 14 | return CSSWrap.WRAP; 15 | } 16 | return cssWrap; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /android/sdk/src/main/java/com/taobao/weex/dom/flex/CSSDirection.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014, Facebook, Inc. All rights reserved.

This source code is licensed under 3 | * the BSD-style license found in the LICENSE file in the root directory of this source tree. An 4 | * additional grant of patent rights can be found in the PATENTS file in the same directory. 5 | */ 6 | package com.taobao.weex.dom.flex; 7 | 8 | public enum CSSDirection { 9 | INHERIT, 10 | LTR, 11 | RTL, 12 | } 13 | -------------------------------------------------------------------------------- /android/sdk/src/main/java/com/taobao/weex/dom/flex/CSSPositionType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014, Facebook, Inc. All rights reserved.

This source code is licensed under 3 | * the BSD-style license found in the LICENSE file in the root directory of this source tree. An 4 | * additional grant of patent rights can be found in the PATENTS file in the same directory. 5 | */ 6 | package com.taobao.weex.dom.flex; 7 | 8 | public enum CSSPositionType { 9 | RELATIVE, 10 | ABSOLUTE, 11 | } 12 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Module/WXStreamModule.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import "WXModuleProtocol.h" 11 | 12 | @interface WXStreamModule : NSObject 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /html5/browser/extend/components/scrollable/list/vlist.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | import listModule from './list' 4 | 5 | function init (Weex) { 6 | const List = listModule.init(Weex) 7 | 8 | function Vlist (data, nodeType) { 9 | data.attr.direction = 'v' 10 | List.call(this, data, nodeType) 11 | } 12 | Vlist.prototype = Object.create(List.prototype) 13 | 14 | Weex.registerComponent('list', Vlist) 15 | Weex.registerComponent('vlist', Vlist) 16 | } 17 | 18 | export default { init } 19 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Module/WXModalUIModule.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import "WXModuleProtocol.h" 11 | 12 | @interface WXModalUIModule : NSObject 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /ios/playground/WeexDemo/debug/WXATLoggerPlugin.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import 11 | 12 | @interface WXATLoggerPlugin : NSObject 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Protocol/WXEventModuleProtocol.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXModuleProtocol.h" 10 | 11 | @protocol WXEventModuleProtocol 12 | 13 | - (void)openURL:(NSString *)url; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /test/index-item.we: -------------------------------------------------------------------------------- 1 | 6 | 7 | 13 | 14 | -------------------------------------------------------------------------------- /android/weex_debug/src/main/res/drawable/prettyfish_coordrect.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /html5/test/unit/default/assets/repeat-track-by.output: -------------------------------------------------------------------------------- 1 | { 2 | type: 'container', 3 | children: [{ 4 | type: 'text', 5 | style: { 6 | color: '#FF0000', 7 | fontSize: 26 8 | }, 9 | attr: { 10 | trackBy: 'text', 11 | value: '0: Hello World2' 12 | } 13 | }, { 14 | type: 'text', 15 | style: { 16 | color: '#FF0000', 17 | fontSize: 26 18 | }, 19 | attr: { 20 | trackBy: 'text', 21 | value: '1: Hello World1' 22 | } 23 | }] 24 | } 25 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Component/WXRefreshComponent.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXComponent.h" 10 | 11 | @interface WXRefreshComponent : WXComponent 12 | 13 | - (void)refresh; 14 | 15 | - (BOOL)displayState; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Module/WXNavigatorModule.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import 11 | 12 | @interface WXNavigatorModule : NSObject 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /bin/pre-push.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Validate branch name 4 | branch_regex="^(\d+\.\d+\.\d+)|(master|dev|android|ios|jsfm|html5|component|doc|website|example|test|all)(-(bugfix|feature|hotfix)-.+)?$" 5 | branch_name=$(git rev-parse --abbrev-ref HEAD) 6 | 7 | if ! (echo $branch_name | grep -iqE "$branch_regex"); then 8 | echo "ERROR: current branch is \"$branch_name\", name format is not correct! 9 | 10 | See https://github.com/alibaba/weex/blob/dev/CONTRIBUTING.md#branch-name\n" 11 | exit 1 12 | fi -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Scanner/WXScannerVC.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import 11 | 12 | @interface WXScannerVC : UIViewController 13 | 14 | @end -------------------------------------------------------------------------------- /ios/sdk/WeexSDKTests/TestSupportUtils.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | 11 | @interface TestSupportUtils : NSObject 12 | /** 13 | *设置等待时间 14 | */ 15 | +(void)waitSecs:(NSTimeInterval)secs; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /html5/test/unit/default/assets/foo4.input: -------------------------------------------------------------------------------- 1 | define('@weex-component/foo4', function (require, exports, module) { 2 | 3 | ; 4 | 5 | ;module.exports.style = {} 6 | 7 | ;module.exports.template = { 8 | "type": "container", 9 | "children": [ 10 | { 11 | "type": "text", 12 | "style": { 13 | "color": "#ff0000" 14 | }, 15 | "attr": { 16 | "value": "Hello World" 17 | } 18 | } 19 | ] 20 | } 21 | 22 | ;}) 23 | 24 | // require module 25 | 26 | bootstrap('@weex-component/foo4') -------------------------------------------------------------------------------- /html5/test/unit/default/assets/transformer1.input: -------------------------------------------------------------------------------- 1 | define('@weex-component/foo', function (require, exports, module) { 2 | 3 | ; 4 | module.exports = { 5 | data: function () { 6 | return { 7 | x: 1 8 | } 9 | } 10 | } 11 | 12 | 13 | ;module.exports.style = { 14 | "a": { 15 | "fontSize": 12 16 | } 17 | } 18 | 19 | ;module.exports.template = { 20 | "type": "container" 21 | } 22 | 23 | ;}) 24 | 25 | 26 | bootstrap('@weex-component/foo', { 27 | 'transformerVersion': '0.3.0' 28 | }) -------------------------------------------------------------------------------- /html5/test/unit/default/assets/transformer2.input: -------------------------------------------------------------------------------- 1 | define('@weex-component/foo', function (require, exports, module) { 2 | 3 | ; 4 | module.exports = { 5 | data: function () { 6 | return { 7 | x: 1 8 | } 9 | } 10 | } 11 | 12 | 13 | ;module.exports.style = { 14 | "a": { 15 | "fontSize": 12 16 | } 17 | } 18 | 19 | ;module.exports.template = { 20 | "type": "container" 21 | } 22 | 23 | ;}) 24 | 25 | 26 | bootstrap('@weex-component/foo', { 27 | 'transformerVersion': '0.0.1' 28 | }) -------------------------------------------------------------------------------- /html5/test/unit/default/assets/transformer3.input: -------------------------------------------------------------------------------- 1 | define('@weex-component/foo', function (require, exports, module) { 2 | 3 | ; 4 | module.exports = { 5 | data: function () { 6 | return { 7 | x: 1 8 | } 9 | } 10 | } 11 | 12 | 13 | ;module.exports.style = { 14 | "a": { 15 | "fontSize": 12 16 | } 17 | } 18 | 19 | ;module.exports.template = { 20 | "type": "container" 21 | } 22 | 23 | ;}) 24 | 25 | 26 | bootstrap('@weex-component/foo', { 27 | 'transformerVersion': '9.9.9' 28 | }) -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Bridge/WXDebugLoggerBridge.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXBridgeProtocol.h" 10 | 11 | @interface WXDebugLoggerBridge : NSObject 12 | 13 | - (instancetype)initWithURL:(NSURL *) URL; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /android/sdk/src/main/java/com/taobao/weex/dom/flex/CSSAlign.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014, Facebook, Inc. All rights reserved.

This source code is licensed under 3 | * the BSD-style license found in the LICENSE file in the root directory of this source tree. An 4 | * additional grant of patent rights can be found in the PATENTS file in the same directory. 5 | */ 6 | package com.taobao.weex.dom.flex; 7 | 8 | public enum CSSAlign { 9 | AUTO, 10 | FLEX_START, 11 | CENTER, 12 | FLEX_END, 13 | STRETCH, 14 | } 15 | -------------------------------------------------------------------------------- /html5/default/static/misc.js: -------------------------------------------------------------------------------- 1 | import { instanceMap } from './map' 2 | 3 | /** 4 | * get a whole element tree of an instance 5 | * for debugging 6 | * @param {string} instanceId 7 | * @return {object} a virtual dom tree 8 | */ 9 | export function getRoot (instanceId) { 10 | const instance = instanceMap[instanceId] 11 | let result 12 | if (instance) { 13 | result = instance.getRootElement() 14 | } 15 | else { 16 | result = new Error(`invalid instance id "${instanceId}"`) 17 | } 18 | return result 19 | } 20 | -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/back.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "back.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "back@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "back@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/scan.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "scan.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "scan@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "scan@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Component/WXEmbedComponent.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXComponent.h" 10 | #import "WXErrorView.h" 11 | 12 | @interface WXEmbedComponent : WXComponent 13 | 14 | - (void)refreshWeex; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Component/WXLoadingComponent.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXComponent.h" 10 | 11 | @interface WXLoadingComponent : WXComponent 12 | 13 | - (void)resizeFrame; 14 | - (void)loading; 15 | - (BOOL)displayState; 16 | 17 | @end -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Handler/WXNavigationDefaultImpl.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import "WXNavigationProtocol.h" 11 | 12 | @interface WXNavigationDefaultImpl : NSObject 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /android/playground/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | mavenCentral() 6 | jcenter() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:2.1.2' 10 | } 11 | } 12 | 13 | allprojects { 14 | repositories { 15 | mavenCentral() 16 | jcenter() 17 | } 18 | } 19 | 20 | task clean(type: Delete) { 21 | delete rootProject.buildDir 22 | } 23 | -------------------------------------------------------------------------------- /android/sdk/src/main/java/com/taobao/weex/dom/flex/CSSFlexDirection.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014, Facebook, Inc. All rights reserved.

This source code is licensed under 3 | * the BSD-style license found in the LICENSE file in the root directory of this source tree. An 4 | * additional grant of patent rights can be found in the PATENTS file in the same directory. 5 | */ 6 | package com.taobao.weex.dom.flex; 7 | 8 | public enum CSSFlexDirection { 9 | COLUMN, 10 | COLUMN_REVERSE, 11 | ROW, 12 | ROW_REVERSE 13 | } 14 | -------------------------------------------------------------------------------- /ios/playground/WeexDemo/debug/WXATViewHierarchyPlugin.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | //#import 10 | //#import 11 | // 12 | //@interface WXATViewHierarchyPlugin : NSObject 13 | // 14 | //@end 15 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Component/WXLoadingIndicator.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXComponent.h" 10 | 11 | @interface WXLoadingIndicator : WXComponent 12 | 13 | - (void)start; 14 | - (void)stop; 15 | - (void)setFrame:(CGRect)frame; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Module/WXWebViewModule.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import "WXModuleProtocol.h" 11 | #import "WXDomModule.h" 12 | 13 | @interface WXWebViewModule : WXDomModule 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/common/Predicate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.common; 11 | 12 | public interface Predicate { 13 | boolean apply(T t); 14 | } 15 | -------------------------------------------------------------------------------- /android/playground/app/src/main/res/drawable-v21/ic_menu_slideshow.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /html5/browser/extend/api/pageInfo.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const pageInfo = { 4 | 5 | setTitle: function (title) { 6 | title = title || 'Weex HTML5' 7 | try { 8 | title = decodeURIComponent(title) 9 | } 10 | catch (e) {} 11 | document.title = title 12 | } 13 | } 14 | 15 | const meta = { 16 | pageInfo: [{ 17 | name: 'setTitle', 18 | args: ['string'] 19 | }] 20 | } 21 | 22 | export default { 23 | init: function (Weex) { 24 | Weex.registerApiModule('pageInfo', pageInfo, meta) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ios/WXDevtool/WXDevTool/Source/PonyDebugger/NSDate+PD_JSONObject.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+PD_JSONObject.h 3 | // PonyDebugger 4 | // 5 | // Created by Wen-Hao Lue on 8/9/12. 6 | // 7 | // Licensed to Square, Inc. under one or more contributor license agreements. 8 | // See the LICENSE file distributed with this work for the terms under 9 | // which Square, Inc. licenses this file to you. 10 | // 11 | 12 | #import 13 | 14 | @interface NSDate (PD_JSONObject) 15 | 16 | - (NSString *)PD_JSONObject; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Assets.xcassets/reload.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "reload.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "reload@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "reload@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ios/playground/WeexDemo/Images.xcassets/Brand Assets.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "minimum-system-version" : "7.0", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "orientation" : "portrait", 11 | "idiom" : "iphone", 12 | "minimum-system-version" : "7.0", 13 | "subtype" : "retina4", 14 | "scale" : "2x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/playground/WeexDemo/extend/component/WXSelectComponent.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import 11 | 12 | @interface WXSelectComponent : WXComponent 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Display/WXDisplayQueue.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | 11 | // Global queue for displaying content 12 | @interface WXDisplayQueue : NSObject 13 | 14 | + (void)addBlock:(void(^)())block; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Handler/WXNetworkDefaultImpl.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import "WXNetworkProtocol.h" 11 | 12 | @interface WXNetworkDefaultImpl : NSObject 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Utility/WXThreadSafeMutableArray.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | 11 | /** 12 | * @abstract Thread safe NSMutableArray 13 | */ 14 | @interface WXThreadSafeMutableArray : NSMutableArray 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/common/Accumulator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.common; 11 | 12 | public interface Accumulator { 13 | void store(E object); 14 | } 15 | -------------------------------------------------------------------------------- /html5/test/unit/default/assets/refresh2.output: -------------------------------------------------------------------------------- 1 | { 2 | "type": "container", 3 | "children": [{ 4 | "type": "container", 5 | "children": [{ 6 | "type": "text", 7 | "attr": { 8 | "value": "bar1" 9 | } 10 | }, { 11 | "type": "container", 12 | "children": [{ 13 | "type": "text", 14 | "attr": { 15 | "value": "bar2-refresh" 16 | } 17 | }] 18 | }] 19 | }] 20 | } -------------------------------------------------------------------------------- /ios/WXDevtool/WXDevTool/Source/DerivedSources/WXProfilerDomainController.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "PonyDebugger.h" 10 | 11 | @interface WXProfilerDomainController : PDDomainController 12 | 13 | +(WXProfilerDomainController *)defaultInstace; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /ios/WXDevtool/WXDevTool/Source/PonyDebugger/NSArray+PD_JSONObject.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+PD_JSONObject.h 3 | // PonyDebugger 4 | // 5 | // Created by Wen-Hao Lue on 8/6/12. 6 | // 7 | // Licensed to Square, Inc. under one or more contributor license agreements. 8 | // See the LICENSE file distributed with this work for the terms under 9 | // which Square, Inc. licenses this file to you. 10 | // 11 | 12 | #import 13 | 14 | @interface NSArray (PD_JSONObject) 15 | 16 | - (NSArray *)PD_JSONObject; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /ios/WXDevtool/WXDevTool/Source/PonyDebugger/NSError+PD_JSONObject.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSError+PD_JSONObject.h 3 | // PonyDebugger 4 | // 5 | // Created by Wen-Hao Lue on 8/9/12. 6 | // 7 | // Licensed to Square, Inc. under one or more contributor license agreements. 8 | // See the LICENSE file distributed with this work for the terms under 9 | // which Square, Inc. licenses this file to you. 10 | // 11 | 12 | #import 13 | 14 | @interface NSError (PD_JSONObject) 15 | 16 | - (NSString *)PD_JSONObject; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /ios/playground/WeexDemo/extend/handler/WXImgLoaderDefaultImpl.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import "WXImgLoaderProtocol.h" 11 | 12 | @interface WXImgLoaderDefaultImpl : NSObject 13 | @end 14 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Component/WXTextInputComponent.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXComponent.h" 10 | #import "WXTextComponentProtocol.h" 11 | 12 | @interface WXTextInputComponent : WXComponent 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Manager/WXModuleManager.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import "WXBridgeMethod.h" 11 | 12 | @interface WXModuleManager : NSObject 13 | 14 | - (void)dispatchMethod:(WXBridgeMethod *)method; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /android/playground/app/src/main/res/drawable-v21/ic_menu_gallery.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /android/sdk/src/main/java/com/taobao/weex/dom/flex/CSSJustify.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014, Facebook, Inc. All rights reserved.

This source code is licensed under 3 | * the BSD-style license found in the LICENSE file in the root directory of this source tree. An 4 | * additional grant of patent rights can be found in the PATENTS file in the same directory. 5 | */ 6 | package com.taobao.weex.dom.flex; 7 | 8 | public enum CSSJustify { 9 | FLEX_START, 10 | CENTER, 11 | FLEX_END, 12 | SPACE_BETWEEN, 13 | SPACE_AROUND, 14 | } 15 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Module/WXInstanceWrap.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXModuleProtocol.h" 10 | 11 | @interface WXInstanceWrap : NSObject 12 | 13 | - (void)error:(NSInteger)type code:(NSInteger)code info:(NSString *)info; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /ios/playground/WeexDemo/WeexiOSKit/Utility/WXConvert+Addition.h: -------------------------------------------------------------------------------- 1 | // 2 | // WXConvert+Addition.h 3 | // WeexDemo 4 | // 5 | // Created by coderyi on 2016/10/18. 6 | // Copyright © 2016年 taobao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface WXConvert (Addition) 12 | + (NSArray *)NSArray:(id)value; 13 | + (NSArray *)NSStringArray:(id)value; 14 | + (NSArray *)NSArrayArray:(id)json; 15 | + (NSArray *> *)NSStringArrayArray:(id)json; 16 | + (NSURL *)NSURL:(id)json; 17 | @end 18 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/server/http/PathMatcher.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.server.http; 11 | 12 | public interface PathMatcher { 13 | boolean match(String path); 14 | } 15 | -------------------------------------------------------------------------------- /ios/WXDevtool/WXDevTool/Source/PonyDebugger/NSData+PDDebugger.m: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Simone Civetta on 01/08/14. 3 | // 4 | 5 | #import "NSData+PDDebugger.h" 6 | 7 | 8 | @implementation NSData (PDDebugger) 9 | 10 | + (NSData *)emptyDataOfLength:(NSUInteger)length 11 | { 12 | NSMutableData *theData = [NSMutableData dataWithCapacity:length]; 13 | for (unsigned int i = 0 ; i < length/4 ; ++i) { 14 | u_int32_t randomBits = 0; 15 | [theData appendBytes:(void*)&randomBits length:4]; 16 | } 17 | return theData; 18 | } 19 | 20 | @end -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Protocol/WXDestroyProtocol.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | 11 | @protocol WXDestroyProtocol 12 | 13 | /** 14 | * @abstract execute unload function before dealloc 15 | */ 16 | - (void)unload; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /android/playground/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 160dp 5 | 6 | 16dp 7 | 16dp 8 | 16dp 9 | 16dp 10 | 11 | -------------------------------------------------------------------------------- /android/playground/app/src/main/res/drawable-v21/ic_menu_manage.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Utility/NSObject+WXSwizzle.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | 10 | #import 11 | 12 | @interface NSObject (WXSwizzle) 13 | 14 | + (BOOL)weex_swizzle:(Class)originalClass Method:(SEL)originalSelector withMethod:(SEL)swizzledSelector; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /test/text-word-wrap.we: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /android/playground/app/src/main/res/layout/catalog_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /ios/playground/WeexDemo/WeexiOSKit/Module/WXVibrationModule.m: -------------------------------------------------------------------------------- 1 | // 2 | // WXVibrationModule.m 3 | // WeexDemo 4 | // 5 | // Created by coderyi on 2016/10/20. 6 | // Copyright © 2016年 taobao. All rights reserved. 7 | // 8 | 9 | #import "WXVibrationModule.h" 10 | #import "WXUtility.h" 11 | #import 12 | 13 | #import 14 | 15 | 16 | @implementation WXVibrationModule 17 | WX_EXPORT_METHOD(@selector(vibrate)) 18 | 19 | - (void)vibrate 20 | { 21 | AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); 22 | } 23 | @end 24 | -------------------------------------------------------------------------------- /ios/playground/WeexDemo/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Utility/WXWeakObjectWrapper.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | 11 | @interface WXWeakObjectWrapper : NSObject 12 | 13 | @property (nonatomic, weak, readonly) id weakObject; 14 | 15 | - (id)initWithWeakObject:(id)weakObject; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /html5/test/unit/default/assets/promise.input: -------------------------------------------------------------------------------- 1 | define('@weex-component/foo', function (require, exports, module) { 2 | new Promise(function (fulfill, reject){ 3 | fulfill(1) 4 | }) 5 | Promise.all([Promise.resolve(1)]) 6 | ; 7 | module.exports = { 8 | data: function () { 9 | return { 10 | x: 1 11 | } 12 | } 13 | } 14 | 15 | 16 | ;module.exports.style = { 17 | "a": { 18 | "fontSize": 12 19 | } 20 | } 21 | 22 | ;module.exports.template = { 23 | "type": "container" 24 | } 25 | 26 | ;}) 27 | 28 | 29 | bootstrap('@weex-component/foo') 30 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Utility/WXThreadSafeMutableDictionary.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | 11 | /** 12 | * @abstract Thread safe NSMutableDictionary 13 | */ 14 | @interface WXThreadSafeMutableDictionary : NSMutableDictionary 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /ios/playground/WeexDemo/extend/module/WXEventModule.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import 11 | #import 12 | 13 | @interface WXEventModule : NSObject 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Component/WXCellComponent.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXComponent.h" 10 | @class WXListComponent; 11 | 12 | @interface WXCellComponent : WXComponent 13 | 14 | @property (nonatomic, strong) NSString *scope; 15 | @property (nonatomic, weak) WXListComponent *list; 16 | 17 | @end -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/websocket/ReadCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.websocket; 11 | 12 | interface ReadCallback { 13 | void onCompleteFrame(byte opcode, byte[] payload, int payloadLen); 14 | } 15 | -------------------------------------------------------------------------------- /examples/more.we: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 14 | 15 | 24 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/inspector/console/RuntimeRepl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.inspector.console; 11 | 12 | public interface RuntimeRepl { 13 | Object evaluate(String expression) throws Throwable; 14 | } 15 | -------------------------------------------------------------------------------- /ios/WXDevtool/WXDevTool/Source/PonyDebugger/NSDate+PD_JSONObject.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+PD_JSONObject.m 3 | // PonyDebugger 4 | // 5 | // Created by Wen-Hao Lue on 8/9/12. 6 | // 7 | // Licensed to Square, Inc. under one or more contributor license agreements. 8 | // See the LICENSE file distributed with this work for the terms under 9 | // which Square, Inc. licenses this file to you. 10 | // 11 | 12 | #import "NSDate+PD_JSONObject.h" 13 | 14 | @implementation NSDate (PD_JSONObject) 15 | 16 | - (NSString *)PD_JSONObject; 17 | { 18 | return self.description; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /ios/playground/WeexDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | 11 | 12 | @interface AppDelegate : UIResponder 13 | 14 | @property (strong, nonatomic) UIWindow *window; 15 | @property (strong, nonatomic) NSString *latestVer; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Component/WXSliderComponent.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import "WXComponent.h" 11 | 12 | @class WXIndicatorView; 13 | 14 | @interface WXSliderComponent : WXComponent 15 | 16 | - (void)setIndicatorView:(WXIndicatorView *)indicatorView; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Protocol/WXTextComponentProtocol.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | @protocol WXTextComponentProtocol 10 | 11 | @property (nonatomic, strong) NSTextStorage *textStorage; 12 | @property (nonatomic, assign) UIEdgeInsets border; 13 | @property (nonatomic, assign) UIEdgeInsets padding; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/inspector/elements/AttributeAccumulator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.inspector.elements; 11 | 12 | public interface AttributeAccumulator { 13 | void store(String name, String value); 14 | } 15 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/server/SocketHandlerFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.server; 11 | 12 | /** @see LazySocketHandler */ 13 | public interface SocketHandlerFactory { 14 | SocketHandler create(); 15 | } 16 | -------------------------------------------------------------------------------- /android/sdk/src/main/java/com/taobao/weex/dom/flex/MeasureOutput.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014, Facebook, Inc. All rights reserved.

This source code is licensed under 3 | * the BSD-style license found in the LICENSE file in the root directory of this source tree. An 4 | * additional grant of patent rights can be found in the PATENTS file in the same directory. 5 | */ 6 | package com.taobao.weex.dom.flex; 7 | 8 | /** 9 | * POJO to hold the output of the measure function. 10 | */ 11 | public class MeasureOutput { 12 | 13 | public float width; 14 | public float height; 15 | } 16 | -------------------------------------------------------------------------------- /html5/test/unit/default/assets/dynamic-type.input: -------------------------------------------------------------------------------- 1 | define('@weex-component/dynamic-type', function (require, exports, module) { 2 | 3 | ; 4 | module.exports = { 5 | data: function () {return { 6 | type: 'text' 7 | }} 8 | } 9 | 10 | ;module.exports.template = { 11 | "type": "container", 12 | "children": [ 13 | { 14 | "type": function () {return this.type}, 15 | "style": { 16 | "width": 200, 17 | "height": 200 18 | } 19 | } 20 | ] 21 | } 22 | 23 | ;}) 24 | 25 | // require module 26 | 27 | bootstrap('@weex-component/dynamic-type') 28 | -------------------------------------------------------------------------------- /ios/WXDevtool/WXDevTool/Source/PonyDebugger/NSError+PD_JSONObject.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSError+PD_JSONObject.m 3 | // PonyDebugger 4 | // 5 | // Created by Wen-Hao Lue on 8/9/12. 6 | // 7 | // Licensed to Square, Inc. under one or more contributor license agreements. 8 | // See the LICENSE file distributed with this work for the terms under 9 | // which Square, Inc. licenses this file to you. 10 | // 11 | 12 | #import "NSError+PD_JSONObject.h" 13 | 14 | @implementation NSError (PD_JSONObject) 15 | 16 | - (NSString *)PD_JSONObject; 17 | { 18 | return self.description; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /android/weex_debug/src/main/res/layout/prettyfish_coverview.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 10 | -------------------------------------------------------------------------------- /html5/test/unit/default/assets/click.output: -------------------------------------------------------------------------------- 1 | { 2 | type: 'container', 3 | event: ['click'], 4 | children: [{ 5 | type: 'image', 6 | attr: { 7 | src: 'https://gd2.alicdn.com/bao/uploaded/i2/T14H1LFwBcXXXXXXXX_!!0-item_pic.jpg' 8 | }, 9 | style: { 10 | width: 200, 11 | height: 200 12 | } 13 | }, { 14 | type: 'text', 15 | attr: { 16 | value: '一个超赞的宝贝标题' 17 | }, 18 | style: { 19 | flex: 1, 20 | color: '#ff0000', 21 | fontSize: 48, 22 | fontWeight: 'bold', 23 | backgroundColor: '#eeeeee' 24 | } 25 | }] 26 | } -------------------------------------------------------------------------------- /html5/test/unit/default/assets/foo7.output: -------------------------------------------------------------------------------- 1 | { 2 | type: 'container', 3 | event: ['click'], 4 | children: [{ 5 | type: 'image', 6 | attr: { 7 | src: 'https://gd2.alicdn.com/bao/uploaded/i2/T14H1LFwBcXXXXXXXX_!!0-item_pic.jpg' 8 | }, 9 | style: { 10 | width: 200, 11 | height: 200 12 | } 13 | }, { 14 | type: 'text', 15 | attr: { 16 | value: '一个超赞的宝贝标题' 17 | }, 18 | style: { 19 | flex: 1, 20 | color: '#ff0000', 21 | fontSize: 48, 22 | fontWeight: 'bold', 23 | backgroundColor: '#eeeeee' 24 | } 25 | }] 26 | } -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Component/WXWebComponent.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXComponent.h" 10 | 11 | @interface WXWebComponent : WXComponent 12 | 13 | - (void)notifyWebview:(NSDictionary *) data; 14 | 15 | - (void)reload; 16 | 17 | - (void)goBack; 18 | 19 | - (void)goForward; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Display/WXLayer.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXLayer.h" 10 | #import "WXDefine.h" 11 | #import "WXComponent.h" 12 | #import "WXComponent_internal.h" 13 | 14 | @implementation WXLayer 15 | 16 | - (void)display 17 | { 18 | [self.wx_component _willDisplayLayer:self]; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Utility/WXThreadSafeCounter.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | 11 | /** 12 | * @abstract a thread-safe counter 13 | */ 14 | @interface WXThreadSafeCounter : NSObject 15 | 16 | @property (atomic, readonly) int32_t value; 17 | 18 | - (int32_t)increase; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/View/WXErrorView.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | 11 | @protocol WXErrorViewDelegate 12 | 13 | - (void)onclickErrorView; 14 | 15 | @end 16 | 17 | @interface WXErrorView : UIView 18 | 19 | @property (nonatomic, weak) id delegate; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/inspector/elements/StyleAccumulator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.inspector.elements; 11 | 12 | public interface StyleAccumulator { 13 | void store(String name, String value, boolean isDefault); 14 | } 15 | -------------------------------------------------------------------------------- /android/playground/app/src/main/res/layout/content_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/server/http/HttpHeaders.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.server.http; 11 | 12 | public interface HttpHeaders { 13 | String CONTENT_TYPE = "Content-Type"; 14 | String CONTENT_LENGTH = "Content-Length"; 15 | } 16 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/websocket/WriteCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.websocket; 11 | 12 | import java.io.IOException; 13 | 14 | interface WriteCallback { 15 | void onFailure(IOException e); 16 | void onSuccess(); 17 | } 18 | -------------------------------------------------------------------------------- /android/weex_debug/src/main/res/layout/prettyfish_filelist.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /android/sdk/NOTICE: -------------------------------------------------------------------------------- 1 | Weex Sdk Android 2 | Copyright 2016 Alibaba Group 3 | 4 | This product includes software developed at Alibaba Group. (http://www.alibabagroup.com) 5 | 6 | This product contains software css-layout(https://github.com/facebook/css-layout) developed 7 | by Facebook Inc., licensed under the BSD License. 8 | 9 | This product contains software React Native(https://github.com/facebook/react-native) developed 10 | by Facebook Inc., licensed under the BSD License. 11 | 12 | This product contains software Guava(https://github.com/google/guava) developed 13 | by Google Inc. , licensed under the Apache License. 14 | -------------------------------------------------------------------------------- /html5/test/unit/default/assets/foo2.input: -------------------------------------------------------------------------------- 1 | define('@weex-component/foo2', function (require, exports, module) { 2 | 3 | ; 4 | module.exports = { 5 | data: function () { 6 | return { 7 | x: 1 8 | } 9 | } 10 | } 11 | 12 | 13 | ;module.exports.style = { 14 | "a": { 15 | "fontSize": 12 16 | } 17 | } 18 | 19 | ;module.exports.template = { 20 | "type": "container", 21 | "attr": { 22 | "a": "1", 23 | "b": function () {return this.x} 24 | }, 25 | "classList": [ 26 | "a" 27 | ] 28 | } 29 | 30 | ;}) 31 | 32 | // require module 33 | 34 | bootstrap('@weex-component/foo2') -------------------------------------------------------------------------------- /html5/test/unit/default/assets/foo6.output: -------------------------------------------------------------------------------- 1 | { 2 | type: 'container', 3 | style: { 4 | flexDirection: 'row' 5 | }, 6 | children: [{ 7 | type: 'image', 8 | attr: { 9 | src: 'http://gw.alicdn.com/tfscom/TB1OMfAJFXXXXbfXXXXqVMCNVXX-400-400.jpg' 10 | }, 11 | style: { 12 | width: 200, 13 | height: 200 14 | } 15 | }, { 16 | type: 'text', 17 | attr: { 18 | value: '一个超赞的宝贝标题' 19 | }, 20 | style: { 21 | flex: 1, 22 | color: '#ff0000', 23 | fontSize: 48, 24 | fontWeight: 'bold', 25 | backgroundColor: '#eeeeee' 26 | } 27 | }] 28 | } -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/inspector/elements/DocumentView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.inspector.elements; 11 | 12 | public interface DocumentView { 13 | Object getRootElement(); 14 | 15 | ElementInfo getElementInfo(Object element); 16 | } 17 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Module/WXAnimationModule.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import "WXModuleProtocol.h" 11 | 12 | @interface WXAnimationModule : NSObject 13 | 14 | - (void)animation:(WXComponent *)targetComponent args:(NSDictionary *)args callback:(WXModuleCallback)callback; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /android/playground/app/src/main/res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 2 |

4 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /html5/test/unit/default/assets/foo5.input: -------------------------------------------------------------------------------- 1 | define('@weex-component/foo5', function (require, exports, module) { 2 | 3 | ; 4 | 5 | ;module.exports.style = { 6 | "title": { 7 | "color": "#ff0000", 8 | "fontSize": 48, 9 | "fontWeight": "bold" 10 | } 11 | } 12 | 13 | ;module.exports.template = { 14 | "type": "container", 15 | "children": [ 16 | { 17 | "type": "text", 18 | "classList": [ 19 | "title" 20 | ], 21 | "attr": { 22 | "value": "Hello World" 23 | } 24 | } 25 | ] 26 | } 27 | 28 | ;}) 29 | 30 | // require module 31 | 32 | bootstrap('@weex-component/foo5') -------------------------------------------------------------------------------- /ios/WXDevtool/WXDevTool/Source/DerivedSources/WXDebugDomain.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "PDDynamicDebuggerDomain.h" 10 | #import "PDObject.h" 11 | #import "PDDebugger.h" 12 | #import "WXDevtool.h" 13 | 14 | @interface WXDebugDomain : PDDynamicDebuggerDomain 15 | 16 | @property (nonatomic, assign) id delegate; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Utility/WXWeakObjectWrapper.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXWeakObjectWrapper.h" 10 | 11 | @implementation WXWeakObjectWrapper 12 | 13 | - (id)initWithWeakObject:(id)weakObject 14 | { 15 | if (self = [super init]) { 16 | _weakObject = weakObject; 17 | } 18 | 19 | return self; 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /test/ui-list-item.we: -------------------------------------------------------------------------------- 1 | 6 | 7 | 22 | 23 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 14 | -------------------------------------------------------------------------------- /ios/sdk/NOTICE: -------------------------------------------------------------------------------- 1 | Weex Sdk iOS 2 | Copyright 2016 Alibaba Group 3 | 4 | This product includes software developed at Alibaba Group. (http://www.alibabagroup.com) 5 | 6 | This product contains software css-layout(https://github.com/facebook/css-layout) developed 7 | by Facebook Inc., licensed under the BSD License. 8 | 9 | This product contains software React Native(https://github.com/facebook/react-native) developed 10 | by Facebook Inc., licensed under the BSD License. 11 | 12 | This product contains software SRWebSocket (https://github.com/facebook/SocketRocket)by Facebook Inc., licensed under the Apache License, Version 2.0. 13 | 14 | -------------------------------------------------------------------------------- /android/sdk/src/main/java/com/taobao/weex/dom/flex/CSSConstants.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014, Facebook, Inc. All rights reserved.

This source code is licensed under 3 | * the BSD-style license found in the LICENSE file in the root directory of this source tree. An 4 | * additional grant of patent rights can be found in the PATENTS file in the same directory. 5 | */ 6 | package com.taobao.weex.dom.flex; 7 | 8 | public class CSSConstants { 9 | 10 | public static final float UNDEFINED = Float.NaN; 11 | 12 | public static boolean isUndefined(float value) { 13 | return Float.compare(value, UNDEFINED) == 0; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/weex_debug/src/main/res/layout/prettyfish_datafilelist.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /ios/WXDevtool/WXDevTool/Source/PonyDebugger/WXCSSDomainController.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "PonyDebugger.h" 10 | #import "PDCSSDomain.h" 11 | 12 | @interface WXCSSDomainController : PDDomainController 13 | 14 | + (WXCSSDomainController *)defaultInstance; 15 | 16 | @property (nonatomic, strong) PDCSSDomain *domain; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Utility/WXSimulatorShortcutMananger.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import 11 | 12 | @interface WXSimulatorShortcutMananger : NSObject 13 | 14 | + (void)registerSimulatorShortcutWithKey:(NSString *)key modifierFlags:(UIKeyModifierFlags)flags action:(dispatch_block_t)action; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/inspector/jsonrpc/protocol/EmptyResult.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.inspector.jsonrpc.protocol; 11 | 12 | import com.taobao.weex.devtools.inspector.jsonrpc.JsonRpcResult; 13 | 14 | public class EmptyResult implements JsonRpcResult { 15 | } 16 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/server/PeerAuthorizationException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.server; 11 | 12 | public class PeerAuthorizationException extends Exception { 13 | public PeerAuthorizationException(String message) { 14 | super(message); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /html5/shared/setTimeout.js: -------------------------------------------------------------------------------- 1 | const { 2 | setTimeout, 3 | setTimeoutNative 4 | } = global 5 | 6 | // fix no setTimeout on Android V8 7 | /* istanbul ignore if */ 8 | if (typeof setTimeout === 'undefined' && 9 | typeof setTimeoutNative === 'function') { 10 | const timeoutMap = {} 11 | let timeoutId = 0 12 | 13 | global.setTimeout = (cb, time) => { 14 | timeoutMap[++timeoutId] = cb 15 | setTimeoutNative(timeoutId.toString(), time) 16 | } 17 | 18 | global.setTimeoutCallback = (id) => { 19 | if (typeof timeoutMap[id] === 'function') { 20 | timeoutMap[id]() 21 | delete timeoutMap[id] 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ios/WXDevtool/WXDevTool/Source/DerivedSources/WXTimelineDomainController.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "PonyDebugger.h" 10 | #import "PDTimelineDomain.h" 11 | 12 | @interface WXTimelineDomainController : PDDomainController 13 | 14 | +(WXTimelineDomainController *)defaultInstance; 15 | 16 | @property (nonatomic, strong) PDTimelineDomain *domain; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /ios/WXDevtool/WXDevTool/Source/Supporting Files/TBWXDevTool.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifndef TBWXDevTool_pch 8 | #define TBWXDevTool_pch 9 | 10 | // Include any system framework and library headers here that should be included in all compilation units. 11 | // You will also need to set the Prefix Header build setting of one or more of your targets to reference this file. 12 | 13 | #endif /* TBWXDevTool_pch */ 14 | 15 | #ifdef DEBUG 16 | # define NSLog(...) NSLog(__VA_ARGS__) 17 | #else 18 | # define NSLog(...) 19 | #endif 20 | -------------------------------------------------------------------------------- /test/web-demo.we: -------------------------------------------------------------------------------- 1 | 6 | 7 | 19 | 20 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/InspectorModulesProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools; 11 | 12 | import com.taobao.weex.devtools.inspector.protocol.ChromeDevtoolsDomain; 13 | 14 | public interface InspectorModulesProvider { 15 | Iterable get(); 16 | } 17 | -------------------------------------------------------------------------------- /html5/default/app/bundle/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileOverview 3 | * api that invoked by js bundle code 4 | * 5 | * - define(name, factory): define a new composed component type 6 | * - bootstrap(type, config, data): require a certain type & 7 | * render with (optional) data 8 | * 9 | * deprecated: 10 | * - register(type, options): register a new composed component type 11 | * - render(type, data): render by a certain type with (optional) data 12 | * - require(type)(data): require a type then render with data 13 | */ 14 | 15 | export { bootstrap } from './bootstrap' 16 | export { clearCommonModules, define, register } from './define' 17 | -------------------------------------------------------------------------------- /ios/WXDevtool/WXDevTool/TBWXDevTool.h: -------------------------------------------------------------------------------- 1 | // 2 | // TBWXDevTool.h 3 | // TBWXDevTool 4 | // 5 | // Created by yangshengtao on 16/7/6. 6 | // Copyright © 2016年 Taobao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for WXDevTool. 12 | FOUNDATION_EXPORT double WXDevToolVersionNumber; 13 | 14 | //! Project version string for WXDevTool. 15 | FOUNDATION_EXPORT const unsigned char WXDevToolVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | #import 20 | 21 | 22 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Utility/NSTimer+Weex.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | 11 | @interface NSTimer (Weex) 12 | 13 | + (NSTimer *)wx_scheduledTimerWithTimeInterval:(NSTimeInterval)interval 14 | block:(void(^)())block 15 | repeats:(BOOL)repeats; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /android/sdk/src/main/java/com/taobao/weex/dom/CSSPositionTypeConvert.java: -------------------------------------------------------------------------------- 1 | package com.taobao.weex.dom; 2 | 3 | import android.text.TextUtils; 4 | 5 | import com.taobao.weex.dom.flex.CSSPositionType; 6 | 7 | class CSSPositionTypeConvert { 8 | 9 | public static CSSPositionType convert(String s) { 10 | CSSPositionType position = CSSPositionType.RELATIVE; 11 | if (TextUtils.isEmpty(s) || s.equals("relative") || s.equals("sticky")) { 12 | position = CSSPositionType.RELATIVE; 13 | } else if (s.equals("absolute") || s.equals("fixed")) { 14 | position = CSSPositionType.ABSOLUTE; 15 | } 16 | return position; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 14 | -------------------------------------------------------------------------------- /bin/welcome.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if ! test -e ./bin/.welcome; then 4 | touch ./bin/.welcome 5 | echo '********************************************************************************' 6 | echo '* *' 7 | echo '* Thanks for contributing Weex! *' 8 | echo '* See https://github.com/alibaba/weex/blob/master/CONTRIBUTING.md *' 9 | echo '* *' 10 | echo '********************************************************************************\n' 11 | fi -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Utility/WXThreadSafeCounter.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXThreadSafeCounter.h" 10 | #import 11 | 12 | @implementation WXThreadSafeCounter{ 13 | int32_t _value; 14 | } 15 | 16 | - (int32_t)value 17 | { 18 | return _value; 19 | } 20 | 21 | - (int32_t)increase { 22 | return OSAtomicIncrement32(&_value); 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /html5/browser/extend/components/switch/switch.css: -------------------------------------------------------------------------------- 1 | /* switch defaults. */ 2 | .weex-switch { 3 | background-color: #fff; 4 | border: 1px solid #dfdfdf; 5 | cursor: pointer; 6 | display: inline-block; 7 | position: relative; 8 | vertical-align: middle; 9 | -moz-user-select: none; 10 | -khtml-user-select: none; 11 | -webkit-user-select: none; 12 | -ms-user-select: none; 13 | user-select: none; 14 | box-sizing: content-box; 15 | background-clip: content-box; 16 | } 17 | 18 | .weex-switch > small { 19 | background: #fff; 20 | border-radius: 100%; 21 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); 22 | position: absolute; 23 | top: 0; 24 | } 25 | -------------------------------------------------------------------------------- /ios/WXDevtool/WXDevTool/Source/PonyDebugger/PDPageDomainController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PDPageDomainController.h 3 | // PonyDebugger 4 | // 5 | // Created by Wen-Hao Lue on 8/6/12. 6 | // 7 | // Licensed to Square, Inc. under one or more contributor license agreements. 8 | // See the LICENSE file distributed with this work for the terms under 9 | // which Square, Inc. licenses this file to you. 10 | // 11 | 12 | #import "PonyDebugger.h" 13 | #import "PDPageDomain.h" 14 | 15 | 16 | @interface PDPageDomainController : PDDomainController 17 | 18 | + (PDPageDomainController *)defaultInstance; 19 | 20 | @property (nonatomic, strong) PDPageDomain *domain; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/inspector/protocol/ChromeDevtoolsDomain.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.inspector.protocol; 11 | 12 | /** 13 | * Marker interface that identifies implementations of subsystems in the WebKit Inspector protocol. 14 | */ 15 | public interface ChromeDevtoolsDomain { 16 | } 17 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/json/annotation/JsonValue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.json.annotation; 11 | 12 | import java.lang.annotation.Retention; 13 | import java.lang.annotation.RetentionPolicy; 14 | 15 | @Retention(RetentionPolicy.RUNTIME) 16 | public @interface JsonValue { 17 | 18 | } 19 | -------------------------------------------------------------------------------- /WeexiOSKit.podspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Pod::Spec.new do |s| 5 | s.name = "WeexiOSKit" 6 | s.version = "0.1" 7 | s.summary = "WeexiOSKit - Weex 's iOS components and module,and so on" 8 | s.homepage = "https://github.com/coderyi/hello-weex" 9 | s.license = "MIT" 10 | s.authors = { "coderyi" => "coderyi@163.com" } 11 | s.source = { :git => "https://github.com/coderyi/hello-weex.git", :tag => "0.1" } 12 | s.frameworks = 'Foundation', 'CoreGraphics', 'UIKit' 13 | s.platform = :ios, '7.0' 14 | s.source_files = 'ios/playground/WeexDemo/WeexiOSKit/**/*.{h,m,png}' 15 | s.requires_arc = true 16 | 17 | 18 | 19 | 20 | 21 | end -------------------------------------------------------------------------------- /android/playground/app/src/main/res/values/drawables.xml: -------------------------------------------------------------------------------- 1 | 2 | @android:drawable/ic_menu_camera 3 | @android:drawable/ic_menu_gallery 4 | @android:drawable/ic_menu_slideshow 5 | @android:drawable/ic_menu_manage 6 | @android:drawable/ic_menu_share 7 | @android:drawable/ic_menu_send 8 | 9 | -------------------------------------------------------------------------------- /ios/WXDevtool/WXDevTool/Source/PonyDebugger/PDInspectorDomainController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PDInspectorDomainController.h 3 | // PonyDebugger 4 | // 5 | // Created by Ryan Olson on 2012-10-27. 6 | // 7 | // Licensed to Square, Inc. under one or more contributor license agreements. 8 | // See the LICENSE file distributed with this work for the terms under 9 | // which Square, Inc. licenses this file to you. 10 | // 11 | 12 | #import "PonyDebugger.h" 13 | #import "PDInspectorDomain.h" 14 | 15 | @interface PDInspectorDomainController : PDDomainController 16 | 17 | @property (nonatomic, strong) PDInspectorDomain *domain; 18 | 19 | + (instancetype)defaultInstance; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /ios/playground/WeexDemo/UIViewController+WXDemoNaviBar.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import "DemoDefine.h" 11 | 12 | @interface UIViewController (WXDemoNaviBar) 13 | 14 | /** 15 | * back button click action 16 | * @param sender responder 17 | */ 18 | - (void)backButtonClicked:(id)sender; 19 | 20 | - (void)setupNaviBar; 21 | 22 | @end 23 | 24 | -------------------------------------------------------------------------------- /examples/webcomponent-example.we: -------------------------------------------------------------------------------- 1 | 8 | 9 | 11 | 12 | 28 | -------------------------------------------------------------------------------- /html5/browser/runtime/app/bundle/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileOverview 3 | * api that invoked by js bundle code 4 | * 5 | * - define(name, factory): define a new composed component type 6 | * - bootstrap(type, config, data): require a certain type & 7 | * render with (optional) data 8 | * 9 | * deprecated: 10 | * - register(type, options): register a new composed component type 11 | * - render(type, data): render by a certain type with (optional) data 12 | * - require(type)(data): require a type then render with data 13 | */ 14 | 15 | export { bootstrap } from './bootstrap' 16 | export { clearCommonModules, define, register } from '../../../../default/app/bundle/define' 17 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/dumpapp/DumpUsageException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.dumpapp; 11 | 12 | /** 13 | * Usage error in a {@link DumperPlugin}. 14 | */ 15 | public class DumpUsageException extends DumpException { 16 | public DumpUsageException(String message) { 17 | super(message); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/inspector/protocol/ChromeDevtoolsMethod.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.inspector.protocol; 11 | 12 | import java.lang.annotation.Retention; 13 | import java.lang.annotation.RetentionPolicy; 14 | 15 | @Retention(RetentionPolicy.RUNTIME) 16 | public @interface ChromeDevtoolsMethod { 17 | } 18 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/dumpapp/UnexpectedFrameException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.dumpapp; 11 | 12 | class UnexpectedFrameException extends DumpappFramingException { 13 | public UnexpectedFrameException(byte expected, byte got) { 14 | super("Expected '" + expected + "', got: '" + got + "'"); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ios/WXDevtool/WXDevTool/Source/PonyDebugger/WXDevToolType.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXDevToolType.h" 10 | #import 11 | 12 | static BOOL WXDebug; 13 | 14 | @implementation WXDevToolType 15 | 16 | + (void)setDebug:(BOOL)isDebug { 17 | WXDebug = isDebug; 18 | [WXDebugTool setDevToolDebug:isDebug]; 19 | } 20 | 21 | + (BOOL)isDebug { 22 | return WXDebug; 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/common/ArrayListAccumulator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.common; 11 | 12 | import java.util.ArrayList; 13 | 14 | public final class ArrayListAccumulator extends ArrayList implements Accumulator { 15 | @Override 16 | public void store(E object) { 17 | add(object); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/server/http/HttpStatus.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.server.http; 11 | 12 | public interface HttpStatus { 13 | int HTTP_SWITCHING_PROTOCOLS = 101; 14 | int HTTP_OK = 200; 15 | int HTTP_NOT_FOUND = 404; 16 | int HTTP_INTERNAL_SERVER_ERROR = 500; 17 | int HTTP_NOT_IMPLEMENTED = 501; 18 | } 19 | -------------------------------------------------------------------------------- /android/playground/app/src/main/res/drawable-v21/ic_menu_camera.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/inspector/jsonrpc/PendingRequestCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.inspector.jsonrpc; 11 | 12 | import com.taobao.weex.devtools.inspector.jsonrpc.protocol.JsonRpcResponse; 13 | 14 | public interface PendingRequestCallback { 15 | void onResponse(JsonRpcPeer peer, JsonRpcResponse response); 16 | } 17 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/inspector/elements/android/HighlightableDescriptor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.inspector.elements.android; 11 | 12 | import android.view.View; 13 | 14 | import javax.annotation.Nullable; 15 | 16 | interface HighlightableDescriptor { 17 | @Nullable 18 | View getViewForHighlighting(Object element); 19 | } 20 | -------------------------------------------------------------------------------- /android/playground/app/src/androidTest/java/com/alibaba/weex/util/SdCardHelper.java: -------------------------------------------------------------------------------- 1 | package com.alibaba.weex.util; 2 | 3 | import android.os.Environment; 4 | 5 | /** 6 | * Created by admin on 16/4/25. 7 | */ 8 | public class SdCardHelper { 9 | public static String SDCardRoot = Environment.getExternalStorageDirectory().getAbsolutePath() + "/"; 10 | 11 | /** 12 | * sdcard check 13 | * @return 14 | */ 15 | public static boolean isHasSdcard(){ 16 | String status = Environment.getExternalStorageState(); 17 | if (status.equals(Environment.MEDIA_MOUNTED)) { 18 | return true; 19 | } else { 20 | return false; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /html5/test/unit/shared/objectAssign.js: -------------------------------------------------------------------------------- 1 | import chai from 'chai' 2 | const { expect } = chai 3 | 4 | import '../../../shared/objectAssign' 5 | 6 | describe('object.assign', () => { 7 | it('is a function', () => { 8 | expect(Object.assign).is.an('function') 9 | }) 10 | 11 | it('source to taget', () => { 12 | const target = { 13 | a: 'a', 14 | b: 'b' 15 | } 16 | const src1 = { 17 | b: 'bb', 18 | c: 'c' 19 | } 20 | const src2 = { 21 | d: 'd', 22 | a: 'aa' 23 | } 24 | Object.assign(target, src1, src2) 25 | expect(target).to.deep.equal({ 26 | a: 'aa', 27 | b: 'bb', 28 | c: 'c', 29 | d: 'd' 30 | }) 31 | }) 32 | }) 33 | -------------------------------------------------------------------------------- /ios/WXDevtool/WXDevTool/Source/PonyDebugger/WXDebugDomainController.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "WXDevtool.h" 10 | #import "PonyDebugger.h" 11 | #import "WXDebugDomain.h" 12 | #import "PDDynamicDebuggerDomain.h" 13 | 14 | @interface WXDebugDomainController : PDDomainController 15 | 16 | @property (nonatomic, strong) WXDebugDomain *domain; 17 | 18 | + (WXDebugDomainController *)defaultInstance; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/websocket/CloseCodes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.websocket; 11 | 12 | /** 13 | * Close codes as defined by RFC6455. 14 | */ 15 | public interface CloseCodes { 16 | int NORMAL_CLOSURE = 1000; 17 | int PROTOCOL_ERROR = 1002; 18 | int CLOSED_ABNORMALLY = 1006; 19 | int UNEXPECTED_CONDITION = 1011; 20 | } 21 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/websocket/MaskingHelper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.websocket; 11 | 12 | class MaskingHelper { 13 | public static void unmask(byte[] key, byte[] data, int offset, int count) { 14 | int index = 0; 15 | while (count-- > 0) { 16 | data[offset++] ^= key[index++ % key.length]; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/inspector/elements/android/DocumentHiddenView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.inspector.elements.android; 11 | 12 | import android.content.Context; 13 | import android.view.View; 14 | 15 | class DocumentHiddenView extends View { 16 | public DocumentHiddenView(Context context) { 17 | super(context); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/inspector/helper/PeerRegistrationListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.inspector.helper; 11 | 12 | import com.taobao.weex.devtools.inspector.jsonrpc.JsonRpcPeer; 13 | 14 | public interface PeerRegistrationListener { 15 | void onPeerRegistered(JsonRpcPeer peer); 16 | void onPeerUnregistered(JsonRpcPeer peer); 17 | } 18 | -------------------------------------------------------------------------------- /test/input-test.we: -------------------------------------------------------------------------------- 1 | 9 | 10 | 28 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/json/annotation/JsonProperty.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.json.annotation; 11 | 12 | import java.lang.annotation.Retention; 13 | import java.lang.annotation.RetentionPolicy; 14 | 15 | @Retention(RetentionPolicy.RUNTIME) 16 | public @interface JsonProperty { 17 | 18 | boolean required() default false; 19 | 20 | } 21 | 22 | -------------------------------------------------------------------------------- /ios/WXDevtool/WXDevTool/Source/PonyDebugger/PDContainerIndex.h: -------------------------------------------------------------------------------- 1 | // 2 | // PDContainerIndex.h 3 | // PonyDebugger 4 | // 5 | // Created by Wen-Hao Lue on 2013-04-28. 6 | // 7 | // Licensed to Square, Inc. under one or more contributor license agreements. 8 | // See the LICENSE file distributed with this work for the terms under 9 | // which Square, Inc. licenses this file to you. 10 | // 11 | 12 | #import 13 | 14 | 15 | #pragma mark - Public Interface 16 | 17 | @interface PDContainerIndex : NSObject 18 | 19 | - (id)initWithName:(NSString *)name index:(NSInteger)index; 20 | 21 | @property (nonatomic, copy) NSString *name; 22 | @property (nonatomic, assign) NSInteger index; 23 | 24 | @end 25 | 26 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Utility/NSArray+Weex.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | 11 | @interface NSArray (Weex) 12 | 13 | - (id)wx_safeObjectAtIndex:(NSUInteger)index; 14 | 15 | @end 16 | 17 | @interface NSMutableArray (Weex) 18 | 19 | + (id)wx_mutableArrayUsingWeakReferences; 20 | 21 | + (id)wx_mutableArrayUsingWeakReferencesWithCapacity:(NSUInteger)capacity; 22 | + (void)wx_releaseArray:(id)array; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /ios/playground/WeexDemo/WXDemoViewController.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import 11 | 12 | @interface WXDemoViewController : UIViewController 13 | 14 | @property (nonatomic, strong) NSString *script; 15 | @property (nonatomic, strong) NSURL *url; 16 | 17 | @property (nonatomic, strong) SRWebSocket *hotReloadSocket; 18 | @property (nonatomic, strong) NSString *source; 19 | 20 | @end 21 | 22 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/inspector/MessageHandlingException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.inspector; 11 | 12 | public class MessageHandlingException extends Exception { 13 | public MessageHandlingException(Throwable cause) { 14 | super(cause); 15 | } 16 | 17 | public MessageHandlingException(String message) { 18 | super(message); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/inspector/jsonrpc/DisconnectReceiver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.inspector.jsonrpc; 11 | 12 | /** 13 | * @see JsonRpcPeer#registerDisconnectReceiver(DisconnectReceiver) 14 | */ 15 | public interface DisconnectReceiver { 16 | /** 17 | * Invoked when a WebSocket peer disconnects. 18 | */ 19 | void onDisconnect(); 20 | } 21 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDKTests/TestSupportUtils.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "TestSupportUtils.h" 10 | 11 | @implementation TestSupportUtils 12 | 13 | static dispatch_once_t onceToken; 14 | 15 | +(void)waitSecs:(NSTimeInterval)secs{ 16 | NSDate *timeoutDate = [NSDate dateWithTimeIntervalSinceNow:secs]; 17 | while ( [timeoutDate timeIntervalSinceNow] > 0) { 18 | CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.01, YES); 19 | } 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /android/sdk/src/main/java/com/taobao/weex/dom/flex/FloatUtil.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014, Facebook, Inc. All rights reserved.

This source code is licensed under 3 | * the BSD-style license found in the LICENSE file in the root directory of this source tree. An 4 | * additional grant of patent rights can be found in the PATENTS file in the same directory. 5 | */ 6 | package com.taobao.weex.dom.flex; 7 | 8 | public class FloatUtil { 9 | 10 | private static final float EPSILON = .00001f; 11 | 12 | public static boolean floatsEqual(float f1, float f2) { 13 | if (Float.isNaN(f1) || Float.isNaN(f2)) { 14 | return Float.isNaN(f1) && Float.isNaN(f2); 15 | } 16 | return Math.abs(f2 - f1) < EPSILON; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/common/android/DialogFragmentAccessor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.common.android; 11 | 12 | import android.app.Dialog; 13 | 14 | public interface DialogFragmentAccessor 15 | extends FragmentAccessor { 16 | Dialog getDialog(DIALOG_FRAGMENT dialogFragment); 17 | } 18 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/common/android/FragmentManagerAccessor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.common.android; 11 | 12 | import java.util.List; 13 | 14 | import javax.annotation.Nullable; 15 | 16 | public interface FragmentManagerAccessor { 17 | @Nullable 18 | List getAddedFragments(FRAGMENT_MANAGER fragmentManager); 19 | } 20 | -------------------------------------------------------------------------------- /ios/sdk/WeexSDK/Sources/Module/WXClipboardModule.m: -------------------------------------------------------------------------------- 1 | // 2 | // WXClipboardModule.m 3 | // WeexSDK 4 | // 5 | // Created by Jun Shi on 7/21/16. 6 | // Copyright © 2016 taobao. All rights reserved. 7 | // 8 | 9 | #import "WXClipboardModule.h" 10 | 11 | @implementation WXClipboardModule 12 | 13 | WX_EXPORT_METHOD(@selector(setString:)) 14 | WX_EXPORT_METHOD(@selector(getString:)) 15 | 16 | - (void)setString:(NSString *)content 17 | { 18 | UIPasteboard *clipboard = [UIPasteboard generalPasteboard]; 19 | clipboard.string = (content ? : @""); 20 | } 21 | 22 | - (void)getString:(WXModuleCallback)callback{ 23 | UIPasteboard *clipboard = [UIPasteboard generalPasteboard]; 24 | callback((clipboard.string ? : @"")); 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /html5/native/index.js: -------------------------------------------------------------------------------- 1 | import '../shared' 2 | import runtime from '../runtime' 3 | import { subversion } from '../../package.json' 4 | import * as methods from '../default/api/methods' 5 | 6 | const { native, transformer } = subversion 7 | 8 | // register instance management APIs 9 | for (const methodName in runtime) { 10 | global[methodName] = (...args) => { 11 | const ret = runtime[methodName](...args) 12 | if (ret instanceof Error) { 13 | console.error(ret.toString()) 14 | } 15 | return ret 16 | } 17 | } 18 | 19 | // register framework meta info 20 | global.frameworkVersion = native 21 | global.transformerVersion = transformer 22 | 23 | // register special methods for Weex framework 24 | global.registerMethods(methods) 25 | -------------------------------------------------------------------------------- /android/playground/app/src/main/res/layout/camera.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 11 | 12 | 17 | 18 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/inspector/network/ResponseBodyData.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.inspector.network; 11 | 12 | /** 13 | * Special file data necessary to comply with the Chrome DevTools instance which doesn't let 14 | * us just naively base64 encode everything. 15 | */ 16 | public class ResponseBodyData { 17 | public String data; 18 | public boolean base64Encoded; 19 | } 20 | -------------------------------------------------------------------------------- /ios/WXDevtool/WXDevTool/Source/PonyDebugger/WXDevToolType.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Weex. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the Apache Licence 2.0. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | 11 | @interface WXDevToolType : NSObject 12 | 13 | /** 14 | * set debug status 15 | * @param isDebug : YES:open debug model and inspect model; 16 | * default is NO,if isDebug is NO, open inspect only; 17 | **/ 18 | + (void)setDebug:(BOOL)isDebug; 19 | 20 | 21 | /** 22 | * get debug status 23 | **/ 24 | + (BOOL)isDebug; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /android/commons/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/sospartan/sdks/android_sdk20130219/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /android/inspector/src/main/java/com/taobao/weex/devtools/inspector/protocol/module/DatabaseConstants.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | package com.taobao.weex.devtools.inspector.protocol.module; 11 | 12 | import android.os.Build; 13 | 14 | public interface DatabaseConstants { 15 | 16 | /** 17 | * Minimum API version required to use the {@link Database}. 18 | */ 19 | public static final int MIN_API_LEVEL = Build.VERSION_CODES.HONEYCOMB; 20 | } 21 | --------------------------------------------------------------------------------