3
0
sxoinas12 5 سال پیش
والد
کامیت
a012a25c1a
37فایلهای تغییر یافته به همراه46 افزوده شده و 13 حذف شده
  1. 31 11
      App.js
  2. BIN
      assets/fonts/SFCompactDisplay-Black_0.otf
  3. BIN
      assets/fonts/SFCompactDisplay-Bold_0.otf
  4. BIN
      assets/fonts/SFCompactDisplay-Heavy_0.otf
  5. BIN
      assets/fonts/SFCompactDisplay-Light_0.otf
  6. BIN
      assets/fonts/SFCompactDisplay-Medium_0.otf
  7. BIN
      assets/fonts/SFCompactDisplay-Regular_0.otf
  8. BIN
      assets/fonts/SFCompactDisplay-Semibold_0.otf
  9. BIN
      assets/fonts/SFCompactDisplay-Thin_0.otf
  10. BIN
      assets/fonts/SFCompactDisplay-Ultralight_0.otf
  11. 0 0
      dist/lib/Module.js
  12. 0 0
      dist/lib/Types.js
  13. 0 0
      dist/lib/helpers/graph.js
  14. 0 0
      dist/lib/helpers/tree.js
  15. 1 0
      dist/lib/index.js
  16. 0 0
      dist/lib/systems/CoreSystem.js
  17. 1 0
      dist/lib/systems/EventSystem.js
  18. 1 0
      dist/lib/systems/InjectionSystem.js
  19. 1 0
      dist/lib/systems/LinkManager.js
  20. 0 0
      dist/lib/systems/ModuleSystem.js
  21. 0 0
      dist/lib/systems/RoutingSystem.js
  22. 1 0
      dist/lib/systems/StyleSystem.js
  23. 0 0
      dist/lib/systems/ViewSystem.js
  24. 1 0
      dist/modules/BaseContainer/index.js
  25. 0 0
      dist/modules/BaseHolder/index.js
  26. 0 0
      dist/modules/Button/index.js
  27. 1 0
      dist/modules/Button/styles/fake.js
  28. 0 0
      dist/modules/Col.js
  29. 0 0
      dist/modules/DatePicker.js
  30. BIN
      dist/modules/Image/assets/default.jpg
  31. 1 0
      dist/modules/RootComp/index.js
  32. 0 0
      dist/modules/Row.js
  33. 1 0
      dist/modules/Text/index.js
  34. 1 0
      dist/modules/View.js
  35. 1 0
      dist/modules/ViewComp.js
  36. 1 0
      dist/modules/index.js
  37. 3 2
      modules/Button/index.js

+ 31 - 11
App.js

@@ -14,7 +14,7 @@ import RootComp from './modules/RootComp';
 import ImageComp from './modules/Image';
 import ButtonComp from './modules/Button';
 import Environment from './environment';
-
+import * as Font from 'expo-font';
 import Module from './modules';
 console.log("@@@@@@@@@@@@@@")
 console.log(Module)
@@ -150,18 +150,38 @@ CS.import(Environment);
 
 
 const useForceUpdate = (text) => useState(text)[1];
-export default function App() {
-  let [text, setText] = useState('');
-  let forceUpdate = useForceUpdate(text);
-  // let currentView =  NCS.render();
-  let currentView2 = CS.render();
-  // console.log(currentView2)
-  return <Div>
+export default class App extends React.Component {
+  constructor(){
+      super()
 
-  {currentView2}
+  }
 
-  </Div>;
-}
+  /*let [text, setText] = useState('');
+  let forceUpdate = useForceUpdate(text);
+  */
+  componentDidMount() {
+    Font.loadAsync({
+      'black': require('./assets/fonts/SFCompactDisplay-Black_0.otf'),
+      'bold': require('./assets/fonts/SFCompactDisplay-Bold_0.otf'),
+      'heavy': require('./assets/fonts/SFCompactDisplay-Heavy_0.otf'),
+      'light': require('./assets/fonts/SFCompactDisplay-Light_0.otf'),
+      'medium': require('./assets/fonts/SFCompactDisplay-Medium_0.otf'),
+      'regular': require('./assets/fonts/SFCompactDisplay-Regular_0.otf'),
+      'semibold': require('./assets/fonts/SFCompactDisplay-Semibold_0.otf'),
+      'thin': require('./assets/fonts/SFCompactDisplay-Thin_0.otf'),
+      'ultralight': require('./assets/fonts/SFCompactDisplay-Ultralight_0.otf')
+
+    });
+  }
+  render(){
+  let currentView2 = CS.render();  
+  return (
+    <Div>
+      <Div>{CS.ModuleSystem.createElementCtor(ButtonComp)}</Div>
+      <Div>{currentView2}</Div>
+    </Div>)
+    }
+  }
 
 
 const ImageStyle = StyleSheet.create({

BIN
assets/fonts/SFCompactDisplay-Black_0.otf


BIN
assets/fonts/SFCompactDisplay-Bold_0.otf


BIN
assets/fonts/SFCompactDisplay-Heavy_0.otf


BIN
assets/fonts/SFCompactDisplay-Light_0.otf


BIN
assets/fonts/SFCompactDisplay-Medium_0.otf


BIN
assets/fonts/SFCompactDisplay-Regular_0.otf


BIN
assets/fonts/SFCompactDisplay-Semibold_0.otf


BIN
assets/fonts/SFCompactDisplay-Thin_0.otf


BIN
assets/fonts/SFCompactDisplay-Ultralight_0.otf


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/lib/Module.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/lib/Types.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/lib/helpers/graph.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/lib/helpers/tree.js


+ 1 - 0
dist/lib/index.js

@@ -0,0 +1 @@
+"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _CoreSystem=_interopRequireDefault(require("./systems/CoreSystem"));var _ViewSystem=require("./systems/ViewSystem");var _Types=_interopRequireDefault(require("./Types"));var _default={CoreSystem:_CoreSystem["default"],ViewSystem:_CoreSystem["default"],ViewNode:_ViewSystem.ViewNode,View:_ViewSystem.View,Node:_ViewSystem.Node,DataTypes:_Types["default"]};exports["default"]=_default;

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/lib/systems/CoreSystem.js


+ 1 - 0
dist/lib/systems/EventSystem.js

@@ -0,0 +1 @@
+"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var EventSystem=function(){function EventSystem(){(0,_classCallCheck2["default"])(this,EventSystem);this.listeners={test:function test(){return console.log('This is default listener!');}};this.addEventListener=this.on;this.removeEventListener=this.off;}(0,_createClass2["default"])(EventSystem,[{key:"on",value:function on(eventId,fn){this.listeners[eventId]=fn;return this;}},{key:"off",value:function off(eventId){delete this.listeners[eventId];return this;}},{key:"emit",value:function emit(eventId,data){return this.listeners[eventId](data);}}]);return EventSystem;}();exports["default"]=EventSystem;

+ 1 - 0
dist/lib/systems/InjectionSystem.js

@@ -0,0 +1 @@
+"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var InjectionSystem=function(){function InjectionSystem(){(0,_classCallCheck2["default"])(this,InjectionSystem);}(0,_createClass2["default"])(InjectionSystem,[{key:"inject",value:function inject(component){}}]);return InjectionSystem;}();exports["default"]=InjectionSystem;

+ 1 - 0
dist/lib/systems/LinkManager.js

@@ -0,0 +1 @@
+"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var LinkManager=function LinkManager(){(0,_classCallCheck2["default"])(this,LinkManager);};exports["default"]=LinkManager;

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/lib/systems/ModuleSystem.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/lib/systems/RoutingSystem.js


+ 1 - 0
dist/lib/systems/StyleSystem.js

@@ -0,0 +1 @@
+"use strict";

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/lib/systems/ViewSystem.js


+ 1 - 0
dist/modules/BaseContainer/index.js

@@ -0,0 +1 @@
+"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=BaseContainer;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _Types=_interopRequireDefault(require("../../lib/Types"));var _jsxFileName="C:\\Users\\Konstanitnos\\Development\\TrapiLib\\modules\\BaseContainer\\index.js";function BaseContainer(props){var selected=props.selected,width=props.width,height=props.height,restProps=(0,_objectWithoutProperties2["default"])(props,["selected","width","height"]);if(!width)width=BaseContainer.Inputs.width["default"];if(!height)height=BaseContainer.Inputs.height["default"];return _react["default"].createElement(_reactNative.View,(0,_extends2["default"])({},restProps,{style:{width:width,height:height},__source:{fileName:_jsxFileName,lineNumber:16}}));}BaseContainer.Inputs={width:new _Types["default"].Integer().require()["default"](50),height:new _Types["default"].Integer().require()["default"](50)};

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/modules/BaseHolder/index.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/modules/Button/index.js


+ 1 - 0
dist/modules/Button/styles/fake.js

@@ -0,0 +1 @@
+"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _default={textColor:'red',width:'100',height:'100',borderRadius:0,FontSize:22,backgroundColor:'black'};exports["default"]=_default;

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/modules/Col.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/modules/DatePicker.js


BIN
dist/modules/Image/assets/default.jpg


+ 1 - 0
dist/modules/RootComp/index.js

@@ -0,0 +1 @@
+"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _react=_interopRequireDefault(require("react"));var _Types=_interopRequireDefault(require("../../lib/Types"));var _Module2=_interopRequireDefault(require("../../lib/Module"));var _reactNative=require("react-native");var _jsxFileName="C:\\Users\\Konstanitnos\\Development\\TrapiLib\\modules\\RootComp\\index.js";var RootComp=function(_Module){(0,_inherits2["default"])(RootComp,_Module);function RootComp(props){(0,_classCallCheck2["default"])(this,RootComp);return(0,_possibleConstructorReturn2["default"])(this,(0,_getPrototypeOf2["default"])(RootComp).call(this,props));}(0,_createClass2["default"])(RootComp,[{key:"display",value:function display(){return;_react["default"].createElement(_reactNative.Text,{__source:{fileName:_jsxFileName,lineNumber:14}},this.props.text||""," - ",this.props.second);}}]);return RootComp;}(_Module2["default"]);exports["default"]=RootComp;RootComp.Inputs={text:new _Types["default"].Text().require()["default"]("Sample Text"),second:new _Types["default"].Integer().require()["default"](5)};

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/modules/Row.js


+ 1 - 0
dist/modules/Text/index.js

@@ -0,0 +1 @@
+"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _react=_interopRequireDefault(require("react"));var _Module2=_interopRequireDefault(require("../../lib/Module"));var _reactNative=require("react-native");var _Types=_interopRequireDefault(require("../../lib/Types"));var _jsxFileName="C:\\Users\\Konstanitnos\\Development\\TrapiLib\\modules\\Text\\index.js";var TextComp=function(_Module){(0,_inherits2["default"])(TextComp,_Module);function TextComp(props){var _this;(0,_classCallCheck2["default"])(this,TextComp);_this=(0,_possibleConstructorReturn2["default"])(this,(0,_getPrototypeOf2["default"])(TextComp).call(this,props));_this.state={text:props.text||""};return _this;}(0,_createClass2["default"])(TextComp,[{key:"display",value:function display(){var _this$props=this.props,text=_this$props.text,color=_this$props.color,fontSize=_this$props.fontSize;return _react["default"].createElement(_reactNative.View,{__source:{fileName:_jsxFileName,lineNumber:21}},_react["default"].createElement(_reactNative.Text,{style:{color:color,fontSize:fontSize},__source:{fileName:_jsxFileName,lineNumber:22}},text),this.props.children);}}]);return TextComp;}(_Module2["default"]);exports["default"]=TextComp;TextComp.Inputs={text:new _Types["default"].Text()["default"]("Enter Text"),color:new _Types["default"].Text(),fontSize:new _Types["default"].Integer()["default"](22)};

+ 1 - 0
dist/modules/View.js

@@ -0,0 +1 @@
+"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _react=_interopRequireDefault(require("react"));var _Module2=_interopRequireDefault(require("../lib/Module"));var _reactNative=require("react-native");var _jsxFileName="C:\\Users\\Konstanitnos\\Development\\TrapiLib\\modules\\View.js";var ViewComp=function(_Module){(0,_inherits2["default"])(ViewComp,_Module);function ViewComp(props){(0,_classCallCheck2["default"])(this,ViewComp);return(0,_possibleConstructorReturn2["default"])(this,(0,_getPrototypeOf2["default"])(ViewComp).call(this,props));}(0,_createClass2["default"])(ViewComp,[{key:"display",value:function display(){return _react["default"].createElement(_reactNative.View,{__source:{fileName:_jsxFileName,lineNumber:16}},this.props.children);}}]);return ViewComp;}(_Module2["default"]);exports["default"]=ViewComp;

+ 1 - 0
dist/modules/ViewComp.js

@@ -0,0 +1 @@
+"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _react=_interopRequireDefault(require("react"));var _Module2=_interopRequireDefault(require("../lib/Module"));var _reactNative=require("react-native");var _jsxFileName="C:\\Users\\Konstanitnos\\Development\\TrapiLib\\modules\\ViewComp.js";var ViewComp=function(_Module){(0,_inherits2["default"])(ViewComp,_Module);function ViewComp(props){(0,_classCallCheck2["default"])(this,ViewComp);return(0,_possibleConstructorReturn2["default"])(this,(0,_getPrototypeOf2["default"])(ViewComp).call(this,props));}(0,_createClass2["default"])(ViewComp,[{key:"display",value:function display(){return _react["default"].createElement(_reactNative.View,{key:Math.random(),__source:{fileName:_jsxFileName,lineNumber:16}});}}]);return ViewComp;}(_Module2["default"]);exports["default"]=ViewComp;

+ 1 - 0
dist/modules/index.js

@@ -0,0 +1 @@
+"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _BaseContainer=_interopRequireDefault(require("./BaseContainer"));var _BaseHolder=_interopRequireDefault(require("./BaseHolder"));var _Button=_interopRequireDefault(require("./Button"));var _Form=_interopRequireDefault(require("./Form"));var _Image=_interopRequireDefault(require("./Image"));var _RootComp=_interopRequireDefault(require("./RootComp"));var _Text=_interopRequireDefault(require("./Text"));var _default={BaseContainer:_BaseContainer["default"],BaseHolder:_BaseHolder["default"],Button:_Button["default"],Form:_Form["default"],Image:_Image["default"],RootComp:_RootComp["default"],Text:_Text["default"]};exports["default"]=_default;

+ 3 - 2
modules/Button/index.js

@@ -22,6 +22,7 @@ export default class ButtonComp extends Module {
 			height,
 			borderRadius,
 			FontSize,
+			fontFamily,
 			backgroundColor
 		} = this.props;
 		return 	(
@@ -29,7 +30,7 @@ export default class ButtonComp extends Module {
 				  onPress = {this.props.press || this.press}
 				  title={title || "submit"}
 				  accessibilityLabel="Learn more about this purple button"
-				  titleStyle = {{color:textColor,fontSize:FontSize}}
+				  titleStyle = {{color:textColor,fontSize:FontSize,fontFamily:fontFamily}}
 				  buttonStyle = {{backgroundColor:backgroundColor,width:width,height:height,borderRadius:borderRadius}}
 				/>
 			)
@@ -39,8 +40,8 @@ export default class ButtonComp extends Module {
 
 ButtonComp.Inputs = {
 	title: new Types.Text().require().default('Submit'),
+	fontFamily :  new Types.Text().require().default('Light'),
 	textColor: new Types.Text().require().color().default('rgba(255, 255, 255, 1)'),
-	//
 	backgroundColor: new Types.Text().require().color().default('rgba(73, 156, 219, 1)'),
 	borderRadius: new Types.Integer().require().default(0),
 	FontSize: new Types.Integer().require().default(18),

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است