git0 0.2.11 → 0.2.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 (243) hide show
  1. package/docs/assets/js/c3a618e1.965a31da.js +1 -1
  2. package/docs/functions/index.html +2 -2
  3. package/docs-config/src/functions/index.md +1 -1
  4. package/package.json +2 -1
  5. package/readme.md +18 -30
  6. package/src/fm.js +1130 -0
  7. package/src/git0.js +3 -4
  8. package/src/github-api.js +14 -15
  9. package/TypeScript-React-Starter/LICENSE +0 -21
  10. package/TypeScript-React-Starter/README-CRA.md +0 -1281
  11. package/TypeScript-React-Starter/README.md +0 -810
  12. package/TypeScript-React-Starter/package.json +0 -28
  13. package/TypeScript-React-Starter/public/favicon.ico +0 -0
  14. package/TypeScript-React-Starter/public/index.html +0 -31
  15. package/TypeScript-React-Starter/src/App.css +0 -24
  16. package/TypeScript-React-Starter/src/App.test.tsx +0 -8
  17. package/TypeScript-React-Starter/src/App.tsx +0 -23
  18. package/TypeScript-React-Starter/src/actions/index.tsx +0 -24
  19. package/TypeScript-React-Starter/src/components/Hello.css +0 -13
  20. package/TypeScript-React-Starter/src/components/Hello.test.tsx +0 -30
  21. package/TypeScript-React-Starter/src/components/Hello.tsx +0 -35
  22. package/TypeScript-React-Starter/src/constants/index.tsx +0 -6
  23. package/TypeScript-React-Starter/src/containers/Hello.tsx +0 -20
  24. package/TypeScript-React-Starter/src/index.css +0 -5
  25. package/TypeScript-React-Starter/src/index.tsx +0 -22
  26. package/TypeScript-React-Starter/src/logo.svg +0 -7
  27. package/TypeScript-React-Starter/src/reducers/index.tsx +0 -15
  28. package/TypeScript-React-Starter/src/types/index.tsx +0 -5
  29. package/TypeScript-React-Starter/tsconfig.json +0 -29
  30. package/TypeScript-React-Starter/tslint.json +0 -11
  31. package/TypeScript-React-Starter/yarn.lock +0 -4785
  32. package/svelte-nodegui/.all-contributorsrc +0 -60
  33. package/svelte-nodegui/.vscode/launch.json +0 -29
  34. package/svelte-nodegui/CHANGELOG.md +0 -153
  35. package/svelte-nodegui/LICENSE +0 -22
  36. package/svelte-nodegui/README.md +0 -151
  37. package/svelte-nodegui/demo/.editorconfig +0 -15
  38. package/svelte-nodegui/demo/.vscode/extensions.json +0 -3
  39. package/svelte-nodegui/demo/livereload.js +0 -29
  40. package/svelte-nodegui/demo/package-lock.json +0 -3514
  41. package/svelte-nodegui/demo/package.json +0 -35
  42. package/svelte-nodegui/demo/src/App.svelte +0 -29
  43. package/svelte-nodegui/demo/src/app.ts +0 -31
  44. package/svelte-nodegui/demo/tsconfig.json +0 -40
  45. package/svelte-nodegui/demo/webpack.config.js +0 -110
  46. package/svelte-nodegui/extras/assets/kitchen.png +0 -0
  47. package/svelte-nodegui/extras/assets/nodegui.png +0 -0
  48. package/svelte-nodegui/extras/assets/nodegui_white.png +0 -0
  49. package/svelte-nodegui/extras/assets/start_icon.png +0 -0
  50. package/svelte-nodegui/extras/legal/logo/thanks.md +0 -13
  51. package/svelte-nodegui/extras/legal/yode/LICENSE +0 -21
  52. package/svelte-nodegui/extras/legal/yoga/LICENSE +0 -0
  53. package/svelte-nodegui/extras/logo/nodegui-circle.png +0 -0
  54. package/svelte-nodegui/extras/logo/nodegui.png +0 -0
  55. package/svelte-nodegui/extras/logo/nodegui.svg +0 -4
  56. package/svelte-nodegui/nativescript-svelte-todo.gif +0 -0
  57. package/svelte-nodegui/package-lock.json +0 -1749
  58. package/svelte-nodegui/package.json +0 -44
  59. package/svelte-nodegui/repl-workers/bundler/commonjs.js +0 -58
  60. package/svelte-nodegui/repl-workers/bundler/index.js +0 -353
  61. package/svelte-nodegui/repl-workers/package-lock.json +0 -484
  62. package/svelte-nodegui/repl-workers/package.json +0 -21
  63. package/svelte-nodegui/repl-workers/rollup.config.js +0 -21
  64. package/svelte-nodegui/rollup.config.js +0 -81
  65. package/svelte-nodegui/scripts/create-pkg.js +0 -42
  66. package/svelte-nodegui/src/components/AsComponent.svelte +0 -16
  67. package/svelte-nodegui/src/components/SlotComponent.svelte +0 -4
  68. package/svelte-nodegui/src/components/Template.svelte +0 -10
  69. package/svelte-nodegui/src/components/Template.svelte.d.ts +0 -6
  70. package/svelte-nodegui/src/components/index.ts +0 -2
  71. package/svelte-nodegui/src/dom/index.ts +0 -132
  72. package/svelte-nodegui/src/dom/nativescript-vue-next/LICENCE +0 -21
  73. package/svelte-nodegui/src/dom/nativescript-vue-next/index.ts +0 -19
  74. package/svelte-nodegui/src/dom/nativescript-vue-next/runtime/index.ts +0 -21
  75. package/svelte-nodegui/src/dom/nativescript-vue-next/runtime/nodes.ts +0 -890
  76. package/svelte-nodegui/src/dom/nativescript-vue-next/runtime/registry.ts +0 -262
  77. package/svelte-nodegui/src/dom/nativescript-vue-next/runtime/runtimeHelpers.ts +0 -20
  78. package/svelte-nodegui/src/dom/react-nodegui/LICENSE +0 -21
  79. package/svelte-nodegui/src/dom/react-nodegui/src/components/AbstractComponents/RNAbstractButton.ts +0 -67
  80. package/svelte-nodegui/src/dom/react-nodegui/src/components/Action/RNAction.ts +0 -146
  81. package/svelte-nodegui/src/dom/react-nodegui/src/components/Action/index.ts +0 -37
  82. package/svelte-nodegui/src/dom/react-nodegui/src/components/AnimatedImage/RNAnimatedImage.ts +0 -76
  83. package/svelte-nodegui/src/dom/react-nodegui/src/components/AnimatedImage/index.ts +0 -45
  84. package/svelte-nodegui/src/dom/react-nodegui/src/components/BoxView/RNBoxView.ts +0 -99
  85. package/svelte-nodegui/src/dom/react-nodegui/src/components/BoxView/index.ts +0 -49
  86. package/svelte-nodegui/src/dom/react-nodegui/src/components/Button/RNButton.ts +0 -71
  87. package/svelte-nodegui/src/dom/react-nodegui/src/components/Button/index.ts +0 -49
  88. package/svelte-nodegui/src/dom/react-nodegui/src/components/CheckBox/RNCheckBox.ts +0 -71
  89. package/svelte-nodegui/src/dom/react-nodegui/src/components/CheckBox/index.ts +0 -50
  90. package/svelte-nodegui/src/dom/react-nodegui/src/components/ComboBox/RNComboBox.ts +0 -118
  91. package/svelte-nodegui/src/dom/react-nodegui/src/components/ComboBox/index.ts +0 -50
  92. package/svelte-nodegui/src/dom/react-nodegui/src/components/Dial/RNDial.ts +0 -69
  93. package/svelte-nodegui/src/dom/react-nodegui/src/components/Dial/index.ts +0 -41
  94. package/svelte-nodegui/src/dom/react-nodegui/src/components/GridView/GridColumn/RNGridColumn.ts +0 -95
  95. package/svelte-nodegui/src/dom/react-nodegui/src/components/GridView/GridColumn/index.ts +0 -49
  96. package/svelte-nodegui/src/dom/react-nodegui/src/components/GridView/GridRow/RNGridRow.ts +0 -141
  97. package/svelte-nodegui/src/dom/react-nodegui/src/components/GridView/GridRow/index.ts +0 -47
  98. package/svelte-nodegui/src/dom/react-nodegui/src/components/GridView/RNGridView.ts +0 -185
  99. package/svelte-nodegui/src/dom/react-nodegui/src/components/GridView/index.ts +0 -51
  100. package/svelte-nodegui/src/dom/react-nodegui/src/components/GridView/utils.ts +0 -59
  101. package/svelte-nodegui/src/dom/react-nodegui/src/components/Image/RNImage.ts +0 -135
  102. package/svelte-nodegui/src/dom/react-nodegui/src/components/Image/index.ts +0 -46
  103. package/svelte-nodegui/src/dom/react-nodegui/src/components/LineEdit/RNLineEdit.ts +0 -82
  104. package/svelte-nodegui/src/dom/react-nodegui/src/components/LineEdit/index.ts +0 -41
  105. package/svelte-nodegui/src/dom/react-nodegui/src/components/Menu/RNMenu.ts +0 -49
  106. package/svelte-nodegui/src/dom/react-nodegui/src/components/Menu/index.ts +0 -44
  107. package/svelte-nodegui/src/dom/react-nodegui/src/components/MenuBar/RNMenuBar.ts +0 -51
  108. package/svelte-nodegui/src/dom/react-nodegui/src/components/MenuBar/index.ts +0 -42
  109. package/svelte-nodegui/src/dom/react-nodegui/src/components/PlainTextEdit/RNPlainTextEdit.ts +0 -82
  110. package/svelte-nodegui/src/dom/react-nodegui/src/components/PlainTextEdit/index.ts +0 -44
  111. package/svelte-nodegui/src/dom/react-nodegui/src/components/ProgressBar/RNProgressBar.ts +0 -78
  112. package/svelte-nodegui/src/dom/react-nodegui/src/components/ProgressBar/index.ts +0 -43
  113. package/svelte-nodegui/src/dom/react-nodegui/src/components/RadioButton/RNRadioButton.ts +0 -50
  114. package/svelte-nodegui/src/dom/react-nodegui/src/components/RadioButton/index.ts +0 -43
  115. package/svelte-nodegui/src/dom/react-nodegui/src/components/ScrollArea/RNScrollArea.ts +0 -51
  116. package/svelte-nodegui/src/dom/react-nodegui/src/components/ScrollArea/index.ts +0 -44
  117. package/svelte-nodegui/src/dom/react-nodegui/src/components/Slider/RNSlider.ts +0 -97
  118. package/svelte-nodegui/src/dom/react-nodegui/src/components/Slider/index.ts +0 -46
  119. package/svelte-nodegui/src/dom/react-nodegui/src/components/SpinBox/RNSpinBox.ts +0 -88
  120. package/svelte-nodegui/src/dom/react-nodegui/src/components/SpinBox/index.ts +0 -49
  121. package/svelte-nodegui/src/dom/react-nodegui/src/components/Svg/RNSvg.ts +0 -67
  122. package/svelte-nodegui/src/dom/react-nodegui/src/components/Svg/index.ts +0 -43
  123. package/svelte-nodegui/src/dom/react-nodegui/src/components/SystemTrayIcon/RNSystemTrayIcon.ts +0 -141
  124. package/svelte-nodegui/src/dom/react-nodegui/src/components/SystemTrayIcon/index.ts +0 -43
  125. package/svelte-nodegui/src/dom/react-nodegui/src/components/Tab/RNTab.ts +0 -69
  126. package/svelte-nodegui/src/dom/react-nodegui/src/components/Tab/index.ts +0 -48
  127. package/svelte-nodegui/src/dom/react-nodegui/src/components/TabItem/RNTabItem.ts +0 -72
  128. package/svelte-nodegui/src/dom/react-nodegui/src/components/TabItem/index.ts +0 -40
  129. package/svelte-nodegui/src/dom/react-nodegui/src/components/Text/RNText.ts +0 -65
  130. package/svelte-nodegui/src/dom/react-nodegui/src/components/Text/index.ts +0 -49
  131. package/svelte-nodegui/src/dom/react-nodegui/src/components/View/RNView.ts +0 -306
  132. package/svelte-nodegui/src/dom/react-nodegui/src/components/View/index.ts +0 -44
  133. package/svelte-nodegui/src/dom/react-nodegui/src/components/Window/RNWindow.ts +0 -66
  134. package/svelte-nodegui/src/dom/react-nodegui/src/components/Window/index.ts +0 -50
  135. package/svelte-nodegui/src/dom/react-nodegui/src/components/config.ts +0 -95
  136. package/svelte-nodegui/src/dom/react-nodegui/src/index.ts +0 -52
  137. package/svelte-nodegui/src/dom/react-nodegui/src/reconciler/index.ts +0 -226
  138. package/svelte-nodegui/src/dom/react-nodegui/src/utils/decoupleFromReact.ts +0 -2
  139. package/svelte-nodegui/src/dom/react-nodegui/src/utils/helpers.ts +0 -14
  140. package/svelte-nodegui/src/dom/shared/Logger.ts +0 -16
  141. package/svelte-nodegui/src/dom/shared/index.ts +0 -1
  142. package/svelte-nodegui/src/dom/svelte/HeadElement.ts +0 -41
  143. package/svelte-nodegui/src/dom/svelte/RNObject.ts +0 -95
  144. package/svelte-nodegui/src/dom/svelte/StyleElement.ts +0 -92
  145. package/svelte-nodegui/src/dom/svelte/SvelteNodeGUIDocument.ts +0 -124
  146. package/svelte-nodegui/src/dom/svelte/TemplateElement.ts +0 -16
  147. package/svelte-nodegui/src/dom/svelte-elements.ts +0 -111
  148. package/svelte-nodegui/src/index.ts +0 -62
  149. package/svelte-nodegui/src/svelte-nodegui.ts +0 -159
  150. package/svelte-nodegui/src/transitions/bezier.ts +0 -112
  151. package/svelte-nodegui/src/transitions/index.ts +0 -227
  152. package/svelte-nodegui/tsconfig.json +0 -19
  153. package/svelte-nodegui/website/README.md +0 -33
  154. package/svelte-nodegui/website/blog/2019-05-30-welcome.md +0 -12
  155. package/svelte-nodegui/website/docs/api/classes/renderer.md +0 -49
  156. package/svelte-nodegui/website/docs/api/classes/rnaction.md +0 -608
  157. package/svelte-nodegui/website/docs/api/classes/rngridcolumn.md +0 -232
  158. package/svelte-nodegui/website/docs/api/classes/rngridrow.md +0 -247
  159. package/svelte-nodegui/website/docs/api/classes/rnmenu.md +0 -1337
  160. package/svelte-nodegui/website/docs/api/classes/rnmenubar.md +0 -1341
  161. package/svelte-nodegui/website/docs/api/globals.md +0 -832
  162. package/svelte-nodegui/website/docs/api/index.md +0 -0
  163. package/svelte-nodegui/website/docs/api/interfaces/_react_proxy_.reactproxycomponent.md +0 -38
  164. package/svelte-nodegui/website/docs/api/interfaces/abstractbuttonprops.md +0 -306
  165. package/svelte-nodegui/website/docs/api/interfaces/actionprops.md +0 -115
  166. package/svelte-nodegui/website/docs/api/interfaces/animatedimageprops.md +0 -297
  167. package/svelte-nodegui/website/docs/api/interfaces/boxviewprops.md +0 -245
  168. package/svelte-nodegui/website/docs/api/interfaces/buttonprops.md +0 -313
  169. package/svelte-nodegui/website/docs/api/interfaces/checkboxprops.md +0 -313
  170. package/svelte-nodegui/website/docs/api/interfaces/comboboxprops.md +0 -343
  171. package/svelte-nodegui/website/docs/api/interfaces/datawithoffset.md +0 -32
  172. package/svelte-nodegui/website/docs/api/interfaces/dialprops.md +0 -259
  173. package/svelte-nodegui/website/docs/api/interfaces/gridviewprops.md +0 -273
  174. package/svelte-nodegui/website/docs/api/interfaces/imageprops.md +0 -311
  175. package/svelte-nodegui/website/docs/api/interfaces/lineeditprops.md +0 -266
  176. package/svelte-nodegui/website/docs/api/interfaces/menubarprops.md +0 -245
  177. package/svelte-nodegui/website/docs/api/interfaces/menuprops.md +0 -245
  178. package/svelte-nodegui/website/docs/api/interfaces/plaintexteditprops.md +0 -259
  179. package/svelte-nodegui/website/docs/api/interfaces/progressbarprops.md +0 -266
  180. package/svelte-nodegui/website/docs/api/interfaces/radiobuttonprops.md +0 -282
  181. package/svelte-nodegui/website/docs/api/interfaces/scrollareaprops.md +0 -245
  182. package/svelte-nodegui/website/docs/api/interfaces/sliderprops.md +0 -329
  183. package/svelte-nodegui/website/docs/api/interfaces/spinboxprops.md +0 -273
  184. package/svelte-nodegui/website/docs/api/interfaces/systemtrayiconprops.md +0 -97
  185. package/svelte-nodegui/website/docs/api/interfaces/tabitemprops.md +0 -28
  186. package/svelte-nodegui/website/docs/api/interfaces/tabprops.md +0 -245
  187. package/svelte-nodegui/website/docs/api/interfaces/textprops.md +0 -277
  188. package/svelte-nodegui/website/docs/api/interfaces/viewprops.md +0 -261
  189. package/svelte-nodegui/website/docs/api/interfaces/windowprops.md +0 -245
  190. package/svelte-nodegui/website/docs/api/modules/_react_proxy_.md +0 -29
  191. package/svelte-nodegui/website/docs/doc1.md +0 -162
  192. package/svelte-nodegui/website/docs/guides/custom-nodegui-native-plugin.md +0 -6
  193. package/svelte-nodegui/website/docs/guides/debugging-in-vscode.md +0 -39
  194. package/svelte-nodegui/website/docs/guides/debugging.md +0 -59
  195. package/svelte-nodegui/website/docs/guides/getting-started.md +0 -141
  196. package/svelte-nodegui/website/docs/guides/handle-events.md +0 -188
  197. package/svelte-nodegui/website/docs/guides/images.md +0 -62
  198. package/svelte-nodegui/website/docs/guides/layout.md +0 -281
  199. package/svelte-nodegui/website/docs/guides/networking.md +0 -31
  200. package/svelte-nodegui/website/docs/guides/packaging.md +0 -32
  201. package/svelte-nodegui/website/docs/guides/scroll-view.md +0 -69
  202. package/svelte-nodegui/website/docs/guides/styling.md +0 -208
  203. package/svelte-nodegui/website/docs/guides/tutorial.md +0 -82
  204. package/svelte-nodegui/website/docs/guides/using-native-node-modules.md +0 -55
  205. package/svelte-nodegui/website/docs/mdx.md +0 -22
  206. package/svelte-nodegui/website/docs/scripts/fixdocs.js +0 -21
  207. package/svelte-nodegui/website/docusaurus.config.js +0 -131
  208. package/svelte-nodegui/website/package.json +0 -33
  209. package/svelte-nodegui/website/sidebars.js +0 -77
  210. package/svelte-nodegui/website/src/components/CodeExample.js +0 -42
  211. package/svelte-nodegui/website/src/components/CreateNativeApps.js +0 -46
  212. package/svelte-nodegui/website/src/components/Features.js +0 -62
  213. package/svelte-nodegui/website/src/components/Hero.js +0 -85
  214. package/svelte-nodegui/website/src/components/SplitView.js +0 -18
  215. package/svelte-nodegui/website/src/components/Talks.js +0 -68
  216. package/svelte-nodegui/website/src/components/Try.js +0 -83
  217. package/svelte-nodegui/website/src/components/common.js +0 -41
  218. package/svelte-nodegui/website/src/components/styles.css +0 -61
  219. package/svelte-nodegui/website/src/css/custom.css +0 -34
  220. package/svelte-nodegui/website/src/pages/index.js +0 -32
  221. package/svelte-nodegui/website/src/pages/styles.module.css +0 -35
  222. package/svelte-nodegui/website/static/CNAME +0 -1
  223. package/svelte-nodegui/website/static/img/box-layout-1.png +0 -0
  224. package/svelte-nodegui/website/static/img/box-layout-2.png +0 -0
  225. package/svelte-nodegui/website/static/img/code-sample.png +0 -0
  226. package/svelte-nodegui/website/static/img/demo.png +0 -0
  227. package/svelte-nodegui/website/static/img/favicon.ico +0 -0
  228. package/svelte-nodegui/website/static/img/flex-layout-1.png +0 -0
  229. package/svelte-nodegui/website/static/img/grid-layout-1.png +0 -0
  230. package/svelte-nodegui/website/static/img/logo-circle.png +0 -0
  231. package/svelte-nodegui/website/static/img/logo.png +0 -0
  232. package/svelte-nodegui/website/static/img/logo.svg +0 -5
  233. package/svelte-nodegui/website/static/img/logox200.png +0 -0
  234. package/svelte-nodegui/website/static/img/undraw_building_websites.svg +0 -1
  235. package/svelte-nodegui/website/static/img/undraw_code_review.svg +0 -1
  236. package/svelte-nodegui/website/static/img/undraw_docusaurus_mountain.svg +0 -170
  237. package/svelte-nodegui/website/static/img/undraw_docusaurus_react.svg +0 -169
  238. package/svelte-nodegui/website/static/img/undraw_docusaurus_tree.svg +0 -1
  239. package/svelte-nodegui/website/static/img/undraw_react.svg +0 -1
  240. package/svelte-nodegui/website/static/img/undraw_website_setup.svg +0 -1
  241. package/svelte-nodegui/website/static/img/undraw_windows.svg +0 -11
  242. package/svelte-nodegui/website/website/sidebars.js +0 -32
  243. package/svelte-nodegui/website/yarn.lock +0 -10533
@@ -1,262 +0,0 @@
1
- import { NSVElement, NSVViewFlags, NativeView } from './nodes'
2
- import { warn } from "../../shared/Logger";
3
- import { NodeWidget, QWidgetSignals, Component, QMenuBar, QMainWindow, WidgetEventTypes } from '@nodegui/nodegui';
4
- import { throwUnsupported } from "../../react-nodegui/src/utils/helpers";
5
- import { RNAction, ActionProps } from "../../react-nodegui/src/components/Action/RNAction";
6
- import { RNBoxView, BoxViewProps } from "../../react-nodegui/src/components/BoxView/RNBoxView";
7
- import { RNGridView, GridViewProps } from "../../react-nodegui/src/components/GridView/RNGridView";
8
- import { RNSlider, SliderProps } from "../../react-nodegui/src/components/Slider/RNSlider";
9
- import { RNView, ViewProps } from "../../react-nodegui/src/components/View/RNView";
10
- import { RNWindow, WindowProps } from "../../react-nodegui/src/components/Window/RNWindow";
11
- import { RNText, TextProps } from "../../react-nodegui/src/components/Text/RNText";
12
- import { RNImage, ImageProps } from "../../react-nodegui/src/components/Image/RNImage";
13
- import { RNAnimatedImage, AnimatedImageProps } from "../../react-nodegui/src/components/AnimatedImage/RNAnimatedImage";
14
- import { RNButton, ButtonProps } from "../../react-nodegui/src/components/Button/RNButton";
15
- import { RNCheckBox, CheckBoxProps } from "../../react-nodegui/src/components/CheckBox/RNCheckBox";
16
- import { RNLineEdit, LineEditProps } from "../../react-nodegui/src/components/LineEdit/RNLineEdit";
17
- import { RNMenu, MenuProps } from "../../react-nodegui/src/components/Menu/RNMenu";
18
- import { RNMenuBar, MenuBarProps } from "../../react-nodegui/src/components/MenuBar/RNMenuBar";
19
- import { RNPlainTextEdit, PlainTextEditProps } from "../../react-nodegui/src/components/PlainTextEdit/RNPlainTextEdit";
20
- import { RNProgressBar, ProgressBarProps } from "../../react-nodegui/src/components/ProgressBar/RNProgressBar";
21
- import { RNRadioButton, RadioButtonProps } from "../../react-nodegui/src/components/RadioButton/RNRadioButton";
22
- import { RNDial, DialProps } from "../../react-nodegui/src/components/Dial/RNDial";
23
- import { RNSpinBox, SpinBoxProps } from "../../react-nodegui/src/components/SpinBox/RNSpinBox";
24
- import { RNScrollArea, ScrollAreaProps } from "../../react-nodegui/src/components/ScrollArea/RNScrollArea";
25
- import { RNComboBox, ComboBoxProps } from "../../react-nodegui/src/components/ComboBox/RNComboBox";
26
- import { RNSystemTrayIcon, SystemTrayIconProps } from "../../react-nodegui/src/components/SystemTrayIcon/RNSystemTrayIcon";
27
- import { RNTab, TabProps } from "../../react-nodegui/src/components/Tab/RNTab";
28
- import { RNTabItem, TabItemProps } from "../../react-nodegui/src/components/TabItem/RNTabItem";
29
- import type { RNComponent } from "../../react-nodegui/src/components/config";
30
- import { RNSvg } from '../../react-nodegui/src/components/Svg/RNSvg';
31
- import { SvgProps } from '../../react-nodegui/src/components/Svg/RNSvg';
32
-
33
-
34
- export type NSVElementResolver<T extends NativeView = NativeView> = () => T
35
-
36
- export type NSVModelDescriptor = {
37
- prop: string
38
- event: string
39
- }
40
-
41
- export interface NSVViewMeta<T extends NativeView = NativeView, Props extends {} = {}> {
42
- viewFlags: NSVViewFlags
43
- nodeOps?: {
44
- setProps?(newProps: Props, oldProps: Props): void;
45
- // setAttribute?(name: string, value: any): void;
46
- // getAttribute?(name: string): any;
47
- insert?(child: NSVElement, parent: NSVElement<T>, atIndex?: number): void | "defer";
48
- remove?(child: NSVElement, parent: NSVElement<T>): void | "defer";
49
- }
50
- model?: NSVModelDescriptor
51
- overwriteExisting?: boolean
52
- }
53
-
54
- export interface NSVElementDescriptor<T extends NativeView = NativeView> {
55
- meta: NSVViewMeta
56
- resolver?: NSVElementResolver<T>
57
- }
58
-
59
- export let defaultViewMeta: NSVViewMeta = {
60
- viewFlags: NSVViewFlags.NONE,
61
- }
62
-
63
- let elementMap: Record<string, NSVElementDescriptor> = {}
64
-
65
- export function getViewMeta(elementName: string): NSVViewMeta {
66
- // console.log(`->getViewMeta(${elementName})`)
67
-
68
- const normalizedName = normalizeElementName(elementName)
69
-
70
- const entry = elementMap[normalizedName]
71
-
72
- if (!entry) {
73
- throw new Error(`No known component for element ${elementName}.`)
74
- }
75
-
76
- return entry.meta
77
- }
78
-
79
- /**
80
- * @param elementName The name of the element registered into the elementMap.
81
- * @returns The nativeView associated with this element name. May be undefined
82
- * (e.g. for virtual elements like head and style).
83
- */
84
- export function getViewClass(elementName: string): any|undefined {
85
- // console.log(`->getViewClass(${elementName})`)
86
- const normalizedName = normalizeElementName(elementName)
87
- const entry = elementMap[normalizedName]
88
-
89
- if (!entry) {
90
- throw new Error(`No known component for element ${elementName}.`)
91
- }
92
-
93
- try {
94
- return entry.resolver!()
95
- } catch (e) {
96
- throw new Error(`Could not load view for: ${elementName}. ${e}`)
97
- }
98
- }
99
-
100
- export function normalizeElementName(elementName: string): string {
101
- return elementName.replace(/-/g, '').toLowerCase()
102
- }
103
-
104
- // interface registerElement<Component>;
105
- export function registerElement<T extends NativeView = NativeView, Props extends {} = {}>(
106
- elementName: string,
107
- resolver?: NSVElementResolver<T>,
108
- meta?: Partial<NSVViewMeta<T>>
109
- ) {
110
- const normalizedName = normalizeElementName(elementName)
111
- const mergedMeta = Object.assign({}, defaultViewMeta, meta)
112
-
113
- if (elementMap[normalizedName] && !mergedMeta.overwriteExisting) {
114
- throw new Error(
115
- `Element for ${elementName} already registered.\n` +
116
- `If this is intentional set 'overwriteExisting: true' in 'meta'`
117
- )
118
- }
119
-
120
- elementMap[normalizedName] = {
121
- meta: mergedMeta,
122
- resolver,
123
- }
124
- // console.log(`->registerElement(${elementName})`)
125
- }
126
-
127
- export function isKnownView(elementName: string): boolean {
128
- return elementMap.hasOwnProperty(normalizeElementName(elementName))
129
- }
130
-
131
- // register built in elements
132
- // prettier-ignore
133
-
134
- /**
135
- * I had thought that all of these would extend NodeWidget, but it appears that many extend Component instead.
136
- * I'll improve the typings later.
137
- */
138
- export function registerNativeElements() {
139
- registerElement<RNImage, ImageProps>(
140
- 'image',
141
- () => {
142
- const widget = new RNImage();
143
- widget.setProperty("scaledContents", true);
144
- widget.addEventListener(WidgetEventTypes.Resize, () => {
145
- widget.scalePixmap(widget.size());
146
- });
147
- return widget;
148
- },
149
- )
150
- registerElement<RNAnimatedImage, AnimatedImageProps>(
151
- 'animatedImage',
152
- () => {
153
- const widget = new RNAnimatedImage();
154
- widget.setProperty("scaledContents", true);
155
- return widget;
156
- },
157
- )
158
- registerElement<RNView, ViewProps<any>>(
159
- 'view',
160
- () => new RNView(),
161
- )
162
- // registerElement<RNFlexLayout, FlexLayoutProps>(
163
- // 'flexLayout',
164
- // () => require('@nodegui/nodegui').FlexLayout,
165
- // )
166
- registerElement<RNCheckBox, CheckBoxProps>(
167
- 'checkBox',
168
- () => new RNCheckBox(),
169
- )
170
- registerElement<RNText, TextProps>(
171
- 'text',
172
- () => new RNText(),
173
- )
174
- registerElement<RNDial, DialProps>(
175
- 'dial',
176
- () => new RNDial(),
177
- )
178
- registerElement<RNLineEdit, LineEditProps>(
179
- 'lineEdit',
180
- () => new RNLineEdit(),
181
- )
182
- registerElement<RNWindow, WindowProps>(
183
- 'window',
184
- () => new RNWindow(),
185
- )
186
- registerElement<RNProgressBar, ProgressBarProps>(
187
- 'progressBar',
188
- () => new RNProgressBar(),
189
- )
190
- registerElement<RNComboBox, ComboBoxProps>(
191
- 'comboBox',
192
- () => new RNComboBox(),
193
- )
194
- registerElement<RNButton, ButtonProps>(
195
- 'button',
196
- () => new RNButton(),
197
- )
198
- registerElement<RNSpinBox, SpinBoxProps>(
199
- 'spinBox',
200
- () => new RNSpinBox(),
201
- )
202
- registerElement<RNSvg, SvgProps>(
203
- 'svg',
204
- () => new RNSvg(),
205
- )
206
- registerElement<RNRadioButton, RadioButtonProps>(
207
- 'radioButton',
208
- () => new RNRadioButton(),
209
- )
210
- registerElement<RNTab, TabProps>(
211
- 'tab',
212
- () => new RNTab(),
213
- )
214
- registerElement<RNMenu, MenuProps>(
215
- 'menu',
216
- () => new RNMenu(),
217
- )
218
- registerElement<RNMenuBar, MenuBarProps>(
219
- 'menuBar',
220
- () => new RNMenuBar(),
221
- )
222
- registerElement<RNPlainTextEdit, PlainTextEditProps>(
223
- 'plainTextEdit',
224
- () => new RNPlainTextEdit(),
225
- )
226
- registerElement<RNSlider, SliderProps>(
227
- 'slider',
228
- () => new RNSlider(),
229
- )
230
- registerElement<RNSystemTrayIcon, SystemTrayIconProps>(
231
- 'systemTrayIcon',
232
- () => new RNSystemTrayIcon(),
233
- )
234
- registerElement<RNAction, ActionProps>(
235
- 'action',
236
- () => new RNAction(),
237
- )
238
- registerElement<RNBoxView, BoxViewProps>(
239
- 'boxView',
240
- () => new RNBoxView(),
241
- )
242
- registerElement<RNGridView, GridViewProps>(
243
- 'gridView',
244
- () => {
245
- const widget = new RNGridView();
246
- const initialProps: GridViewProps = {
247
- children: []
248
- };
249
- widget.setProps(initialProps, initialProps);
250
- return widget;
251
- },
252
- )
253
- registerElement<RNScrollArea, ScrollAreaProps>(
254
- 'scrollArea',
255
- () => new RNScrollArea(),
256
- )
257
- /* Component is an abstract class, so this is surely wrong. */
258
- // registerElement<RNComponent, ComponentProps>(
259
- // 'tabItem',
260
- // () => require('@nodegui/nodegui').Component,
261
- // )
262
- }
@@ -1,20 +0,0 @@
1
- declare var __DEV__: boolean
2
- declare var __TEST__: boolean
3
- export const ELEMENT_REF = Symbol(__DEV__ ? `elementRef` : ``)
4
-
5
- export const isAndroidKey = (key: string) =>
6
- key[0] === 'a' &&
7
- key[1] === 'n' &&
8
- key[2] === 'd' &&
9
- key[3] === 'r' &&
10
- key[4] === 'o' &&
11
- key[5] === 'i' &&
12
- key[6] === 'd' &&
13
- key[7] === ':'
14
-
15
- export const isIOSKey = (key: string) =>
16
- key[0] === 'i' && key[1] === 'o' && key[2] === 's' && key[3] === ':'
17
-
18
- export const isBoolean = (value: unknown): boolean => {
19
- return typeof value === 'boolean' || value instanceof Boolean
20
- }
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2019 Atul R
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,67 +0,0 @@
1
- import { QIcon, QSize, QAbstractButtonSignals } from "@nodegui/nodegui";
2
- import { ViewProps, setViewProps } from "../View/RNView";
3
- import { QAbstractButton } from "@nodegui/nodegui";
4
-
5
- /**
6
- * The Button component provides ability to add and manipulate native button widgets. It is based on
7
- * [NodeGui's QPushButton](https://docs.nodegui.org/docs/api/QPushButton).
8
- * ## Example
9
- * ```javascript
10
- * import React from "react";
11
- * import { Renderer, Button, Window } from "@nodegui/react-nodegui";
12
- * const App = () => {
13
- * return (
14
- * <Window>
15
- * <Button style={buttonStyle} text={"Hello World"} />
16
- * </Window>
17
- * );
18
- * };
19
- * const buttonStyle = `
20
- * color: white;
21
- * `;
22
- * Renderer.render(<App />);
23
- *
24
- * ```
25
- */
26
- export interface AbstractButtonProps<Signals extends QAbstractButtonSignals>
27
- extends ViewProps<Signals> {
28
- /**
29
- * Alternative method of providing the button text
30
- */
31
- children?: string;
32
- /**
33
- * Sets the given text to the button. [QPushButton: setText](https://docs.nodegui.org/docs/api/QPushButton#buttonsettexttext)
34
- */
35
- text?: string;
36
- /**
37
- * Sets an icon in the button. [QPushButton: setIcon](https://docs.nodegui.org/docs/api/QPushButton#buttonseticonicon)
38
- */
39
- icon?: QIcon;
40
- /**
41
- * Sets an icon size in the button. [QPushButton: setIconSize](https://docs.nodegui.org/docs/api/QPushButton#buttonseticonsize)
42
- */
43
- iconSize?: QSize;
44
- }
45
-
46
- export function setAbstractButtonProps<Signals extends QAbstractButtonSignals>(
47
- widget: QAbstractButton<Signals>,
48
- newProps: AbstractButtonProps<Signals>,
49
- oldProps: AbstractButtonProps<Signals>
50
- ) {
51
- const setter: AbstractButtonProps<Signals> = {
52
- set children(childrenText: string) {
53
- widget.setText(childrenText);
54
- },
55
- set text(buttonText: string) {
56
- widget.setText(buttonText);
57
- },
58
- set icon(icon: QIcon) {
59
- widget.setIcon(icon);
60
- },
61
- set iconSize(iconSize: QSize) {
62
- widget.setIconSize(iconSize);
63
- },
64
- };
65
- Object.assign(setter, newProps);
66
- setViewProps(widget, newProps, oldProps);
67
- }
@@ -1,146 +0,0 @@
1
- import {
2
- QAction,
3
- QIcon,
4
- QActionSignals,
5
- Component,
6
- QFont,
7
- QShortcut,
8
- QKeySequence,
9
- ShortcutContext,
10
- } from "@nodegui/nodegui";
11
- import { RNComponent, RNProps } from "../config";
12
- import { throwUnsupported } from "../../utils/helpers";
13
-
14
- export interface ActionProps extends RNProps {
15
- /**
16
- * Sets whether the action is a checkable action. [QAction: setCheckable](https://docs.nodegui.org/docs/api/generated/classes/qaction#setcheckable)
17
- */
18
- checkable?: boolean;
19
-
20
- /**
21
- * Sets whether the action is checked. [QAction: setChecked](https://docs.nodegui.org/docs/api/generated/classes/qaction#setchecked)
22
- */
23
- checked?: boolean;
24
-
25
- /**
26
- * Sets whether the action is enabled. [QAction: setEnabled](https://docs.nodegui.org/docs/api/generated/classes/qaction#setenabled)
27
- */
28
- enabled?: boolean;
29
-
30
- /**
31
- * Sets a font for the action. [QAction: setFont](https://docs.nodegui.org/docs/api/generated/classes/qaction#setfont)
32
- */
33
- font?: QFont;
34
-
35
- /**
36
- * Sets an icon for the action. [QSystemTrayIcon: setIcon](https://docs.nodegui.org/docs/api/generated/classes/qsystemtrayicon#seticon)
37
- */
38
- icon?: QIcon;
39
-
40
- /**
41
- * Sets the object name (id) of the widget in Qt. Object name can be analogous to id of an element in the web world. Using the objectName of the widget one can reference it in the Qt's stylesheet much like what we do with id in the web world. [QWidget: setObjectName](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetobjectnameobjectname)
42
- */
43
- id?: string;
44
-
45
- /**
46
- * Prop to set the event listener map. See [Handlong Events](/docs/guides/handle-events)
47
- */
48
- on?: Partial<QActionSignals>;
49
-
50
- /**
51
- * Sets whether this action will be considered a separator. [QAction: setSeparator](https://docs.nodegui.org/docs/api/generated/classes/qaction#setseparator)
52
- */
53
- separator?: boolean;
54
-
55
- /**
56
- * Sets the action's primary shortcut key. [QAction: setShortcut](https://docs.nodegui.org/docs/api/generated/classes/qaction#setshortcut)
57
- */
58
- shortcut?: QKeySequence;
59
-
60
- /**
61
- * Sets the context for action's shortcut. [QAction: setShortcutContext](https://docs.nodegui.org/docs/api/generated/classes/qaction#setshortcutcontext)
62
- */
63
- shortcutContext?: ShortcutContext;
64
-
65
- /**
66
- * Sets descriptive text. [QAction: setText](https://docs.nodegui.org/docs/api/generated/classes/qaction#settext)
67
- */
68
- text?: string;
69
- }
70
-
71
- const setActionProps = (
72
- widget: RNAction,
73
- newProps: ActionProps,
74
- oldProps: ActionProps
75
- ) => {
76
- const setter: ActionProps = {
77
- set checkable(isCheckable: boolean) {
78
- widget.setCheckable(isCheckable);
79
- },
80
- set checked(isChecked: boolean) {
81
- widget.setChecked(isChecked);
82
- },
83
- set enabled(isEnabled: boolean) {
84
- widget.setEnabled(isEnabled);
85
- },
86
- set font(font: QFont) {
87
- widget.setFont(font);
88
- },
89
- set icon(icon: QIcon) {
90
- widget.setIcon(icon);
91
- },
92
- set id(id: string) {
93
- widget.setObjectName(id);
94
- },
95
- set on(listenerMap: Partial<QActionSignals>) {
96
- const listenerMapLatest: any = Object.assign({}, listenerMap);
97
- const oldListenerMap = Object.assign({}, oldProps.on);
98
- Object.entries(oldListenerMap).forEach(([eventType, oldEvtListener]) => {
99
- const newEvtListener = listenerMapLatest[eventType];
100
- if (oldEvtListener !== newEvtListener) {
101
- widget.removeEventListener(eventType as any, oldEvtListener);
102
- } else {
103
- delete listenerMapLatest[eventType];
104
- }
105
- });
106
-
107
- Object.entries(listenerMapLatest).forEach(
108
- ([eventType, newEvtListener]) => {
109
- widget.addEventListener(eventType as any, newEvtListener);
110
- }
111
- );
112
- },
113
- set separator(isSeparator: boolean) {
114
- widget.setSeparator(isSeparator);
115
- },
116
- set shortcut(shortcut: QKeySequence) {
117
- widget.setShortcut(shortcut);
118
- },
119
- set shortcutContext(shortcutContext: ShortcutContext) {
120
- widget.setShortcutContext(shortcutContext);
121
- },
122
- set text(text: string) {
123
- widget.setText(text);
124
- },
125
- };
126
- Object.assign(setter, newProps);
127
- };
128
-
129
- export class RNAction extends QAction implements RNComponent {
130
- setProps(newProps: ActionProps, oldProps: ActionProps): void {
131
- setActionProps(this, newProps, oldProps);
132
- }
133
- appendInitialChild(child: Component) {
134
- throwUnsupported(this);
135
- }
136
- appendChild(child: Component): void {
137
- throwUnsupported(this);
138
- }
139
- insertBefore(child: Component, beforeChild: Component): void {
140
- throwUnsupported(this);
141
- }
142
- removeChild(child: Component): void {
143
- throwUnsupported(this);
144
- }
145
- static tagName = "action";
146
- }
@@ -1,37 +0,0 @@
1
- import type { Fiber } from "../../utils/decoupleFromReact";
2
- import { registerComponent, ComponentConfig } from "../config";
3
- import { RNAction, ActionProps } from "./RNAction";
4
- import { AppContainer } from "../../reconciler";
5
-
6
- class ActionConfig extends ComponentConfig {
7
- tagName = RNAction.tagName;
8
- shouldSetTextContent(nextProps: ActionProps): boolean {
9
- return false;
10
- }
11
- createInstance(
12
- newProps: ActionProps,
13
- rootInstance: AppContainer,
14
- context: any,
15
- workInProgress: Fiber
16
- ): RNAction {
17
- const widget = new RNAction();
18
- widget.setProps(newProps, {});
19
- return widget;
20
- }
21
- commitMount(
22
- instance: RNAction,
23
- newProps: ActionProps,
24
- internalInstanceHandle: any
25
- ): void {}
26
- commitUpdate(
27
- instance: RNAction,
28
- updatePayload: any,
29
- oldProps: ActionProps,
30
- newProps: ActionProps,
31
- finishedWork: Fiber
32
- ): void {
33
- instance.setProps(newProps, oldProps);
34
- }
35
- }
36
-
37
- export const Action = registerComponent<ActionProps>(new ActionConfig());
@@ -1,76 +0,0 @@
1
- import { QLabel, NodeWidget, QMovie, QSize } from "@nodegui/nodegui";
2
- import { TextProps, setTextProps } from "../Text/RNText";
3
- import { RNWidget } from "../config";
4
- import { throwUnsupported, isValidUrl } from "../../utils/helpers";
5
- import phin from "phin";
6
-
7
- export interface AnimatedImageProps extends TextProps {
8
- src?: string;
9
- buffer?: Buffer;
10
- }
11
-
12
- const setAnimatedImageProps = (
13
- widget: RNAnimatedImage,
14
- newProps: AnimatedImageProps,
15
- oldProps: AnimatedImageProps
16
- ) => {
17
- const setter: AnimatedImageProps = {
18
- set src(imageUrlOrPath: string) {
19
- if (!imageUrlOrPath) {
20
- return;
21
- }
22
- getLoadedQMovie(imageUrlOrPath)
23
- .then(movie => {
24
- widget.setMovie(movie);
25
- widget.movie()?.start();
26
- })
27
- .catch(console.warn);
28
- },
29
- set buffer(imageBuffer: Buffer) {
30
- const movie = new QMovie();
31
- movie.loadFromData(imageBuffer);
32
- widget.setMovie(movie);
33
- widget.movie()?.start();
34
- }
35
- };
36
- Object.assign(setter, newProps);
37
- setTextProps(widget, newProps, oldProps);
38
- };
39
-
40
- /**
41
- * @ignore
42
- */
43
- export class RNAnimatedImage extends QLabel implements RNWidget {
44
- setProps(newProps: AnimatedImageProps, oldProps: AnimatedImageProps): void {
45
- setAnimatedImageProps(this, newProps, oldProps);
46
- }
47
- appendInitialChild(child: NodeWidget<any>): void {
48
- throwUnsupported(this);
49
- }
50
- appendChild(child: NodeWidget<any>): void {
51
- throwUnsupported(this);
52
- }
53
- insertBefore(child: NodeWidget<any>, beforeChild: NodeWidget<any>): void {
54
- throwUnsupported(this);
55
- }
56
- removeChild(child: NodeWidget<any>): void {
57
- throwUnsupported(this);
58
- }
59
- static tagName = "animatedimage";
60
- scaleMovie(size: QSize) {
61
- const movie = this.movie();
62
- movie?.setScaledSize(size);
63
- }
64
- }
65
-
66
- async function getLoadedQMovie(imageUrlOrPath: string): Promise<QMovie> {
67
- const movie = new QMovie();
68
- if (isValidUrl(imageUrlOrPath)) {
69
- const res = await phin(imageUrlOrPath);
70
- const imageBuffer = Buffer.from(res.body);
71
- movie.loadFromData(imageBuffer);
72
- } else {
73
- movie.setFileName(imageUrlOrPath);
74
- }
75
- return movie;
76
- }
@@ -1,45 +0,0 @@
1
- import type { Fiber } from "../../utils/decoupleFromReact";
2
- import { registerComponent, ComponentConfig } from "../config";
3
- import { RNAnimatedImage, AnimatedImageProps } from "./RNAnimatedImage";
4
- import { AppContainer } from "../../reconciler";
5
-
6
- class AnimatedImageConfig extends ComponentConfig {
7
- tagName = RNAnimatedImage.tagName;
8
- shouldSetTextContent(nextProps: AnimatedImageProps): boolean {
9
- return true;
10
- }
11
- createInstance(
12
- newProps: AnimatedImageProps,
13
- rootInstance: AppContainer,
14
- context: any,
15
- workInProgress: Fiber
16
- ): RNAnimatedImage {
17
- const widget = new RNAnimatedImage();
18
- widget.setProperty("scaledContents", true);
19
- widget.setProps(newProps, {});
20
- return widget;
21
- }
22
- commitMount(
23
- instance: RNAnimatedImage,
24
- newProps: AnimatedImageProps,
25
- internalInstanceHandle: any
26
- ): void {
27
- if (newProps.visible !== false) {
28
- instance.show();
29
- }
30
- return;
31
- }
32
- commitUpdate(
33
- instance: RNAnimatedImage,
34
- updatePayload: any,
35
- oldProps: AnimatedImageProps,
36
- newProps: AnimatedImageProps,
37
- finishedWork: Fiber
38
- ): void {
39
- instance.setProps(newProps, oldProps);
40
- }
41
- }
42
-
43
- export const AnimatedImage = registerComponent<AnimatedImageProps>(
44
- new AnimatedImageConfig()
45
- );