nodality 1.0.0-beta.12 → 1.0.0-beta.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/designer.js +24 -1
  2. package/package.json +1 -1
package/lib/designer.js CHANGED
@@ -1083,11 +1083,34 @@ console.log(duration);
1083
1083
  }
1084
1084
  }
1085
1085
 
1086
+ const layout = {
1087
+ Text, Image, Link, FlexRow, UINavBar, Free, Audio, Progress, Center, Code,
1088
+ Stack, Wrapper, MetaAdder, Table, Dropdown, Modal, TextField, Card,
1089
+ Wrap, FlexGrid, ZoomCard, Switcher, MobileBar, DesktopBar, SideNav, Spacer,
1090
+ };
1091
+
1092
+ const formComponents = {
1093
+ FloatingInput, Range, RadioGroup, Picker, FilePickera,
1094
+ DataList, Base, Form, Button, Slider, Video, Checkbox,
1095
+ };
1096
+
1097
+ const libs = {
1098
+ ElementMapper, Animator, LinkStyler, CardGen, Simple,
1099
+ };
1100
+
1101
+
1102
+ const components = {
1103
+ ...layout,
1104
+ ...formComponents,
1105
+ ...libs,
1106
+ };
1107
+
1086
1108
  for (var i = 0; i < this.code.length; i++) {
1087
1109
  let sub = this.code[i];
1088
1110
  console.log("SUBO");
1089
1111
  console.log(sub);
1090
- eval(`${sub}`);
1112
+ new Function(...Object.keys(components), sub)(...Object.values(components));
1113
+ // eval(`${sub}`);
1091
1114
  }
1092
1115
  }
1093
1116
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodality",
3
- "version": "1.0.0-beta.12",
3
+ "version": "1.0.0-beta.13",
4
4
  "description": "A lightweight library for declarative UI elements.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",