@getcortexlabs/mavis 0.1.0-alpha.1 → 0.1.0-alpha.11

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 (696) hide show
  1. package/README.md +9 -5
  2. package/dist/app-icons.d.ts +26 -0
  3. package/dist/app-icons.d.ts.map +1 -0
  4. package/dist/app-icons.js +9 -0
  5. package/dist/app-icons.js.map +1 -0
  6. package/dist/date-format.d.ts +3 -0
  7. package/dist/date-format.d.ts.map +1 -0
  8. package/dist/date-format.js +2 -0
  9. package/dist/date-format.js.map +1 -0
  10. package/dist/files.d.ts +4 -0
  11. package/dist/files.d.ts.map +1 -0
  12. package/dist/files.js +3 -0
  13. package/dist/files.js.map +1 -0
  14. package/dist/native/app-icons.android.d.ts +4 -0
  15. package/dist/native/app-icons.android.d.ts.map +1 -0
  16. package/dist/native/app-icons.android.js +67 -0
  17. package/dist/native/app-icons.android.js.map +1 -0
  18. package/dist/native/app-icons.d.ts +4 -0
  19. package/dist/native/app-icons.d.ts.map +1 -0
  20. package/dist/native/app-icons.ios.d.ts +4 -0
  21. package/dist/native/app-icons.ios.d.ts.map +1 -0
  22. package/dist/native/app-icons.ios.js +45 -0
  23. package/dist/native/app-icons.ios.js.map +1 -0
  24. package/dist/native/app-icons.js +9 -0
  25. package/dist/native/app-icons.js.map +1 -0
  26. package/dist/native/appearance.android.d.ts +4 -0
  27. package/dist/native/appearance.android.d.ts.map +1 -0
  28. package/dist/native/appearance.android.js +55 -0
  29. package/dist/native/appearance.android.js.map +1 -0
  30. package/dist/native/appearance.d.ts +4 -0
  31. package/dist/native/appearance.d.ts.map +1 -0
  32. package/dist/native/appearance.js +31 -0
  33. package/dist/native/appearance.js.map +1 -0
  34. package/dist/native/avatar-image.d.ts +4 -0
  35. package/dist/native/avatar-image.d.ts.map +1 -0
  36. package/dist/native/avatar-image.js +12 -0
  37. package/dist/native/avatar-image.js.map +1 -0
  38. package/dist/native/avatar-label.android.d.ts +9 -0
  39. package/dist/native/avatar-label.android.d.ts.map +1 -0
  40. package/dist/native/avatar-label.android.js +9 -0
  41. package/dist/native/avatar-label.android.js.map +1 -0
  42. package/dist/native/avatar-label.d.ts +2 -0
  43. package/dist/native/avatar-label.d.ts.map +1 -0
  44. package/dist/native/avatar-label.js +2 -0
  45. package/dist/native/avatar-label.js.map +1 -0
  46. package/dist/native/box.android.d.ts +5 -0
  47. package/dist/native/box.android.d.ts.map +1 -0
  48. package/dist/native/box.android.js +7 -0
  49. package/dist/native/box.android.js.map +1 -0
  50. package/dist/native/box.d.ts +2 -0
  51. package/dist/native/box.d.ts.map +1 -0
  52. package/dist/native/box.ios.d.ts +10 -0
  53. package/dist/native/box.ios.d.ts.map +1 -0
  54. package/dist/native/box.ios.js +40 -0
  55. package/dist/native/box.ios.js.map +1 -0
  56. package/dist/native/box.js +3 -0
  57. package/dist/native/box.js.map +1 -0
  58. package/dist/native/button.android.d.ts +11 -0
  59. package/dist/native/button.android.d.ts.map +1 -0
  60. package/dist/native/button.android.js +31 -0
  61. package/dist/native/button.android.js.map +1 -0
  62. package/dist/native/button.ios.d.ts +13 -1
  63. package/dist/native/button.ios.d.ts.map +1 -1
  64. package/dist/native/button.ios.js +29 -1
  65. package/dist/native/button.ios.js.map +1 -1
  66. package/dist/native/checkbox.android.d.ts +7 -0
  67. package/dist/native/checkbox.android.d.ts.map +1 -0
  68. package/dist/native/checkbox.android.js +26 -0
  69. package/dist/native/checkbox.android.js.map +1 -0
  70. package/dist/native/checkbox.d.ts +7 -0
  71. package/dist/native/checkbox.d.ts.map +1 -0
  72. package/dist/native/checkbox.js +7 -0
  73. package/dist/native/checkbox.js.map +1 -0
  74. package/dist/native/collection-motion.d.ts +5 -0
  75. package/dist/native/collection-motion.d.ts.map +1 -0
  76. package/dist/native/collection-motion.js +157 -0
  77. package/dist/native/collection-motion.js.map +1 -0
  78. package/dist/native/combobox-editor.android.d.ts +3 -0
  79. package/dist/native/combobox-editor.android.d.ts.map +1 -0
  80. package/dist/native/combobox-editor.android.js +5 -0
  81. package/dist/native/combobox-editor.android.js.map +1 -0
  82. package/dist/native/combobox-editor.d.ts +4 -0
  83. package/dist/native/combobox-editor.d.ts.map +1 -0
  84. package/dist/native/combobox-editor.js +5 -0
  85. package/dist/native/combobox-editor.js.map +1 -0
  86. package/dist/native/composed-button.android.d.ts +4 -0
  87. package/dist/native/composed-button.android.d.ts.map +1 -0
  88. package/dist/native/composed-button.android.js +53 -0
  89. package/dist/native/composed-button.android.js.map +1 -0
  90. package/dist/native/composed-button.d.ts +3 -0
  91. package/dist/native/composed-button.d.ts.map +1 -0
  92. package/dist/native/composed-button.js +4 -0
  93. package/dist/native/composed-button.js.map +1 -0
  94. package/dist/native/date-format.android.d.ts +5 -0
  95. package/dist/native/date-format.android.d.ts.map +1 -0
  96. package/dist/native/date-format.android.js +39 -0
  97. package/dist/native/date-format.android.js.map +1 -0
  98. package/dist/native/date-format.d.ts +6 -0
  99. package/dist/native/date-format.d.ts.map +1 -0
  100. package/dist/native/date-format.ios.d.ts +5 -0
  101. package/dist/native/date-format.ios.d.ts.map +1 -0
  102. package/dist/native/date-format.ios.js +29 -0
  103. package/dist/native/date-format.ios.js.map +1 -0
  104. package/dist/native/date-format.js +8 -0
  105. package/dist/native/date-format.js.map +1 -0
  106. package/dist/native/dialog.android.d.ts +12 -0
  107. package/dist/native/dialog.android.d.ts.map +1 -0
  108. package/dist/native/dialog.android.js +46 -0
  109. package/dist/native/dialog.android.js.map +1 -0
  110. package/dist/native/dialog.d.ts +12 -0
  111. package/dist/native/dialog.d.ts.map +1 -0
  112. package/dist/native/dialog.ios.d.ts +12 -0
  113. package/dist/native/dialog.ios.d.ts.map +1 -0
  114. package/dist/native/dialog.ios.js +13 -0
  115. package/dist/native/dialog.ios.js.map +1 -0
  116. package/dist/native/dialog.js +4 -0
  117. package/dist/native/dialog.js.map +1 -0
  118. package/dist/native/dynamic-type.d.ts +15 -0
  119. package/dist/native/dynamic-type.d.ts.map +1 -0
  120. package/dist/native/dynamic-type.js +47 -0
  121. package/dist/native/dynamic-type.js.map +1 -0
  122. package/dist/native/file-access.d.ts +23 -0
  123. package/dist/native/file-access.d.ts.map +1 -0
  124. package/dist/native/file-access.js +55 -0
  125. package/dist/native/file-access.js.map +1 -0
  126. package/dist/native/file-picker.android.d.ts +3 -0
  127. package/dist/native/file-picker.android.d.ts.map +1 -0
  128. package/dist/native/file-picker.android.js +147 -0
  129. package/dist/native/file-picker.android.js.map +1 -0
  130. package/dist/native/file-picker.d.ts +4 -0
  131. package/dist/native/file-picker.d.ts.map +1 -0
  132. package/dist/native/file-picker.ios.d.ts +3 -0
  133. package/dist/native/file-picker.ios.d.ts.map +1 -0
  134. package/dist/native/file-picker.ios.js +152 -0
  135. package/dist/native/file-picker.ios.js.map +1 -0
  136. package/dist/native/file-picker.js +7 -0
  137. package/dist/native/file-picker.js.map +1 -0
  138. package/dist/native/flex-children.d.ts +4 -0
  139. package/dist/native/flex-children.d.ts.map +1 -0
  140. package/dist/native/flex-children.js +12 -0
  141. package/dist/native/flex-children.js.map +1 -0
  142. package/dist/native/flex-layout.android.d.ts +3 -1
  143. package/dist/native/flex-layout.android.d.ts.map +1 -1
  144. package/dist/native/flex-layout.android.js +9 -0
  145. package/dist/native/flex-layout.android.js.map +1 -1
  146. package/dist/native/flex-layout.ios.d.ts +14 -1
  147. package/dist/native/flex-layout.ios.d.ts.map +1 -1
  148. package/dist/native/flex-layout.ios.js +113 -0
  149. package/dist/native/flex-layout.ios.js.map +1 -1
  150. package/dist/native/image-effects.d.ts +11 -0
  151. package/dist/native/image-effects.d.ts.map +1 -0
  152. package/dist/native/image-effects.js +61 -0
  153. package/dist/native/image-effects.js.map +1 -0
  154. package/dist/native/input-action.d.ts +5 -0
  155. package/dist/native/input-action.d.ts.map +1 -0
  156. package/dist/native/input-action.js +13 -0
  157. package/dist/native/input-action.js.map +1 -0
  158. package/dist/native/keyboard-dismiss.android.d.ts +8 -0
  159. package/dist/native/keyboard-dismiss.android.d.ts.map +1 -0
  160. package/dist/native/keyboard-dismiss.android.js +9 -0
  161. package/dist/native/keyboard-dismiss.android.js.map +1 -0
  162. package/dist/native/keyboard-dismiss.d.ts +10 -0
  163. package/dist/native/keyboard-dismiss.d.ts.map +1 -0
  164. package/dist/native/keyboard-dismiss.ios.d.ts +8 -0
  165. package/dist/native/keyboard-dismiss.ios.d.ts.map +1 -0
  166. package/dist/native/keyboard-dismiss.ios.js +91 -0
  167. package/dist/native/keyboard-dismiss.ios.js.map +1 -0
  168. package/dist/native/keyboard-dismiss.js +6 -0
  169. package/dist/native/keyboard-dismiss.js.map +1 -0
  170. package/dist/native/label.android.d.ts +12 -0
  171. package/dist/native/label.android.d.ts.map +1 -0
  172. package/dist/native/label.android.js +19 -0
  173. package/dist/native/label.android.js.map +1 -0
  174. package/dist/native/label.ios.d.ts +14 -1
  175. package/dist/native/label.ios.d.ts.map +1 -1
  176. package/dist/native/label.ios.js +37 -1
  177. package/dist/native/label.ios.js.map +1 -1
  178. package/dist/native/measure-memo.d.ts +37 -0
  179. package/dist/native/measure-memo.d.ts.map +1 -0
  180. package/dist/native/measure-memo.js +82 -0
  181. package/dist/native/measure-memo.js.map +1 -0
  182. package/dist/native/motion-owner.d.ts +5 -0
  183. package/dist/native/motion-owner.d.ts.map +1 -0
  184. package/dist/native/motion-owner.js +58 -0
  185. package/dist/native/motion-owner.js.map +1 -0
  186. package/dist/native/motion-region.d.ts +7 -0
  187. package/dist/native/motion-region.d.ts.map +1 -0
  188. package/dist/native/motion-region.js +249 -0
  189. package/dist/native/motion-region.js.map +1 -0
  190. package/dist/native/motion-surface.d.ts +9 -0
  191. package/dist/native/motion-surface.d.ts.map +1 -0
  192. package/dist/native/motion-surface.js +229 -0
  193. package/dist/native/motion-surface.js.map +1 -0
  194. package/dist/native/platform-motion.d.ts +5 -0
  195. package/dist/native/platform-motion.d.ts.map +1 -0
  196. package/dist/native/platform-motion.js +90 -0
  197. package/dist/native/platform-motion.js.map +1 -0
  198. package/dist/native/press.d.ts +8 -2
  199. package/dist/native/press.d.ts.map +1 -1
  200. package/dist/native/press.js +58 -8
  201. package/dist/native/press.js.map +1 -1
  202. package/dist/native/progress.d.ts +7 -0
  203. package/dist/native/progress.d.ts.map +1 -0
  204. package/dist/native/progress.js +77 -0
  205. package/dist/native/progress.js.map +1 -0
  206. package/dist/native/screen.android.d.ts +6 -0
  207. package/dist/native/screen.android.d.ts.map +1 -0
  208. package/dist/native/screen.android.js +8 -0
  209. package/dist/native/screen.android.js.map +1 -0
  210. package/dist/native/screen.d.ts +2 -0
  211. package/dist/native/screen.d.ts.map +1 -0
  212. package/dist/native/screen.js +3 -0
  213. package/dist/native/screen.js.map +1 -0
  214. package/dist/native/scroll-motion.d.ts +12 -0
  215. package/dist/native/scroll-motion.d.ts.map +1 -0
  216. package/dist/native/scroll-motion.js +100 -0
  217. package/dist/native/scroll-motion.js.map +1 -0
  218. package/dist/native/section-scroll.d.ts +9 -0
  219. package/dist/native/section-scroll.d.ts.map +1 -0
  220. package/dist/native/section-scroll.js +69 -0
  221. package/dist/native/section-scroll.js.map +1 -0
  222. package/dist/native/segmented.d.ts +14 -0
  223. package/dist/native/segmented.d.ts.map +1 -0
  224. package/dist/native/segmented.js +86 -0
  225. package/dist/native/segmented.js.map +1 -0
  226. package/dist/native/sheet.android.d.ts +18 -0
  227. package/dist/native/sheet.android.d.ts.map +1 -0
  228. package/dist/native/sheet.android.js +16 -0
  229. package/dist/native/sheet.android.js.map +1 -0
  230. package/dist/native/sheet.d.ts +21 -0
  231. package/dist/native/sheet.d.ts.map +1 -0
  232. package/dist/native/sheet.ios.d.ts +19 -0
  233. package/dist/native/sheet.ios.d.ts.map +1 -0
  234. package/dist/native/sheet.ios.js +41 -0
  235. package/dist/native/sheet.ios.js.map +1 -0
  236. package/dist/native/sheet.js +17 -0
  237. package/dist/native/sheet.js.map +1 -0
  238. package/dist/native/surface-effects.d.ts +4 -0
  239. package/dist/native/surface-effects.d.ts.map +1 -0
  240. package/dist/native/surface-effects.js +31 -0
  241. package/dist/native/surface-effects.js.map +1 -0
  242. package/dist/native/tabs.android.d.ts +3 -0
  243. package/dist/native/tabs.android.d.ts.map +1 -0
  244. package/dist/native/tabs.android.js +29 -0
  245. package/dist/native/tabs.android.js.map +1 -0
  246. package/dist/native/tabs.d.ts +3 -0
  247. package/dist/native/tabs.d.ts.map +1 -0
  248. package/dist/native/tabs.js +4 -0
  249. package/dist/native/tabs.js.map +1 -0
  250. package/dist/native/text-field.android.d.ts +1 -0
  251. package/dist/native/text-field.android.d.ts.map +1 -1
  252. package/dist/native/text-field.android.js +13 -0
  253. package/dist/native/text-field.android.js.map +1 -1
  254. package/dist/native/text-field.ios.d.ts +9 -0
  255. package/dist/native/text-field.ios.d.ts.map +1 -0
  256. package/dist/native/text-field.ios.js +52 -0
  257. package/dist/native/text-field.ios.js.map +1 -0
  258. package/dist/native/text-view.ios.d.ts +7 -0
  259. package/dist/native/text-view.ios.d.ts.map +1 -0
  260. package/dist/native/text-view.ios.js +10 -0
  261. package/dist/native/text-view.ios.js.map +1 -0
  262. package/dist/native/toast.android.d.ts +4 -0
  263. package/dist/native/toast.android.d.ts.map +1 -0
  264. package/dist/native/toast.android.js +10 -0
  265. package/dist/native/toast.android.js.map +1 -0
  266. package/dist/native/toast.d.ts +4 -0
  267. package/dist/native/toast.d.ts.map +1 -0
  268. package/dist/native/toast.ios.d.ts +4 -0
  269. package/dist/native/toast.ios.d.ts.map +1 -0
  270. package/dist/native/toast.ios.js +8 -0
  271. package/dist/native/toast.ios.js.map +1 -0
  272. package/dist/native/toast.js +5 -0
  273. package/dist/native/toast.js.map +1 -0
  274. package/dist/native/visual-effects.d.ts +5 -0
  275. package/dist/native/visual-effects.d.ts.map +1 -0
  276. package/dist/native/visual-effects.js +126 -0
  277. package/dist/native/visual-effects.js.map +1 -0
  278. package/dist/vue/components/ChartPlot.d.ts +65 -0
  279. package/dist/vue/components/ChartPlot.d.ts.map +1 -0
  280. package/dist/vue/components/ChartPlot.js +100 -0
  281. package/dist/vue/components/ChartPlot.js.map +1 -0
  282. package/dist/vue/components/ChoiceControl.d.ts +114 -0
  283. package/dist/vue/components/ChoiceControl.d.ts.map +1 -0
  284. package/dist/vue/components/ChoiceControl.js +218 -0
  285. package/dist/vue/components/ChoiceControl.js.map +1 -0
  286. package/dist/vue/components/DateCalendar.d.ts +109 -0
  287. package/dist/vue/components/DateCalendar.d.ts.map +1 -0
  288. package/dist/vue/components/DateCalendar.js +98 -0
  289. package/dist/vue/components/DateCalendar.js.map +1 -0
  290. package/dist/vue/components/LoadingDecoration.d.ts +116 -0
  291. package/dist/vue/components/LoadingDecoration.d.ts.map +1 -0
  292. package/dist/vue/components/LoadingDecoration.js +34 -0
  293. package/dist/vue/components/LoadingDecoration.js.map +1 -0
  294. package/dist/vue/components/MAccordion.d.ts +119 -0
  295. package/dist/vue/components/MAccordion.d.ts.map +1 -0
  296. package/dist/vue/components/MAccordion.js +83 -0
  297. package/dist/vue/components/MAccordion.js.map +1 -0
  298. package/dist/vue/components/MAlert.d.ts +109 -0
  299. package/dist/vue/components/MAlert.d.ts.map +1 -0
  300. package/dist/vue/components/MAlert.js +126 -0
  301. package/dist/vue/components/MAlert.js.map +1 -0
  302. package/dist/vue/components/MAvatar.d.ts +80 -0
  303. package/dist/vue/components/MAvatar.d.ts.map +1 -0
  304. package/dist/vue/components/MAvatar.js +86 -0
  305. package/dist/vue/components/MAvatar.js.map +1 -0
  306. package/dist/vue/components/MBadge.d.ts +70 -0
  307. package/dist/vue/components/MBadge.d.ts.map +1 -0
  308. package/dist/vue/components/MBadge.js +30 -0
  309. package/dist/vue/components/MBadge.js.map +1 -0
  310. package/dist/vue/components/MButton.d.ts +212 -32
  311. package/dist/vue/components/MButton.d.ts.map +1 -1
  312. package/dist/vue/components/MButton.js +192 -20
  313. package/dist/vue/components/MButton.js.map +1 -1
  314. package/dist/vue/components/MCard.d.ts +113 -21
  315. package/dist/vue/components/MCard.d.ts.map +1 -1
  316. package/dist/vue/components/MCard.js +24 -6
  317. package/dist/vue/components/MCard.js.map +1 -1
  318. package/dist/vue/components/MCheckbox.d.ts +103 -0
  319. package/dist/vue/components/MCheckbox.d.ts.map +1 -0
  320. package/dist/vue/components/MCheckbox.js +26 -0
  321. package/dist/vue/components/MCheckbox.js.map +1 -0
  322. package/dist/vue/components/MChip.d.ts +117 -0
  323. package/dist/vue/components/MChip.d.ts.map +1 -0
  324. package/dist/vue/components/MChip.js +120 -0
  325. package/dist/vue/components/MChip.js.map +1 -0
  326. package/dist/vue/components/MCombobox.d.ts +279 -0
  327. package/dist/vue/components/MCombobox.d.ts.map +1 -0
  328. package/dist/vue/components/MCombobox.js +234 -0
  329. package/dist/vue/components/MCombobox.js.map +1 -0
  330. package/dist/vue/components/MDatePicker.d.ts +1350 -0
  331. package/dist/vue/components/MDatePicker.d.ts.map +1 -0
  332. package/dist/vue/components/MDatePicker.js +25 -0
  333. package/dist/vue/components/MDatePicker.js.map +1 -0
  334. package/dist/vue/components/MDialog.d.ts +100 -0
  335. package/dist/vue/components/MDialog.d.ts.map +1 -0
  336. package/dist/vue/components/MDialog.js +245 -0
  337. package/dist/vue/components/MDialog.js.map +1 -0
  338. package/dist/vue/components/MEmptyState.d.ts +117 -0
  339. package/dist/vue/components/MEmptyState.d.ts.map +1 -0
  340. package/dist/vue/components/MEmptyState.js +79 -0
  341. package/dist/vue/components/MEmptyState.js.map +1 -0
  342. package/dist/vue/components/MFilePicker.d.ts +112 -0
  343. package/dist/vue/components/MFilePicker.d.ts.map +1 -0
  344. package/dist/vue/components/MFilePicker.js +196 -0
  345. package/dist/vue/components/MFilePicker.js.map +1 -0
  346. package/dist/vue/components/MGrid.d.ts +165 -0
  347. package/dist/vue/components/MGrid.d.ts.map +1 -0
  348. package/dist/vue/components/MGrid.js +52 -0
  349. package/dist/vue/components/MGrid.js.map +1 -0
  350. package/dist/vue/components/MIcon.d.ts +75 -0
  351. package/dist/vue/components/MIcon.d.ts.map +1 -0
  352. package/dist/vue/components/MIcon.js +45 -0
  353. package/dist/vue/components/MIcon.js.map +1 -0
  354. package/dist/vue/components/MImage.d.ts +248 -0
  355. package/dist/vue/components/MImage.d.ts.map +1 -0
  356. package/dist/vue/components/MImage.js +157 -0
  357. package/dist/vue/components/MImage.js.map +1 -0
  358. package/dist/vue/components/MInput.d.ts +195 -50
  359. package/dist/vue/components/MInput.d.ts.map +1 -1
  360. package/dist/vue/components/MInput.js +134 -20
  361. package/dist/vue/components/MInput.js.map +1 -1
  362. package/dist/vue/components/MLink.d.ts +120 -0
  363. package/dist/vue/components/MLink.d.ts.map +1 -0
  364. package/dist/vue/components/MLink.js +76 -0
  365. package/dist/vue/components/MLink.js.map +1 -0
  366. package/dist/vue/components/MListItem.d.ts +106 -0
  367. package/dist/vue/components/MListItem.d.ts.map +1 -0
  368. package/dist/vue/components/MListItem.js +53 -0
  369. package/dist/vue/components/MListItem.js.map +1 -0
  370. package/dist/vue/components/MPopover.d.ts +106 -0
  371. package/dist/vue/components/MPopover.d.ts.map +1 -0
  372. package/dist/vue/components/MPopover.js +209 -0
  373. package/dist/vue/components/MPopover.js.map +1 -0
  374. package/dist/vue/components/MProgress.d.ts +122 -0
  375. package/dist/vue/components/MProgress.d.ts.map +1 -0
  376. package/dist/vue/components/MProgress.js +75 -0
  377. package/dist/vue/components/MProgress.js.map +1 -0
  378. package/dist/vue/components/MRadioGroup.d.ts +103 -0
  379. package/dist/vue/components/MRadioGroup.d.ts.map +1 -0
  380. package/dist/vue/components/MRadioGroup.js +57 -0
  381. package/dist/vue/components/MRadioGroup.js.map +1 -0
  382. package/dist/vue/components/MRangeSlider.d.ts +105 -0
  383. package/dist/vue/components/MRangeSlider.d.ts.map +1 -0
  384. package/dist/vue/components/MRangeSlider.js +107 -0
  385. package/dist/vue/components/MRangeSlider.js.map +1 -0
  386. package/dist/vue/components/MReveal.d.ts +73 -37
  387. package/dist/vue/components/MReveal.d.ts.map +1 -1
  388. package/dist/vue/components/MReveal.js +80 -37
  389. package/dist/vue/components/MReveal.js.map +1 -1
  390. package/dist/vue/components/MScreen.d.ts +42 -8
  391. package/dist/vue/components/MScreen.d.ts.map +1 -1
  392. package/dist/vue/components/MScreen.js +91 -6
  393. package/dist/vue/components/MScreen.js.map +1 -1
  394. package/dist/vue/components/MSegmentedControl.d.ts +95 -0
  395. package/dist/vue/components/MSegmentedControl.d.ts.map +1 -0
  396. package/dist/vue/components/MSegmentedControl.js +172 -0
  397. package/dist/vue/components/MSegmentedControl.js.map +1 -0
  398. package/dist/vue/components/MSelect.d.ts +140 -0
  399. package/dist/vue/components/MSelect.d.ts.map +1 -0
  400. package/dist/vue/components/MSelect.js +158 -0
  401. package/dist/vue/components/MSelect.js.map +1 -0
  402. package/dist/vue/components/MSeparator.d.ts +56 -0
  403. package/dist/vue/components/MSeparator.d.ts.map +1 -0
  404. package/dist/vue/components/MSeparator.js +36 -0
  405. package/dist/vue/components/MSeparator.js.map +1 -0
  406. package/dist/vue/components/MSheet.d.ts +116 -0
  407. package/dist/vue/components/MSheet.d.ts.map +1 -0
  408. package/dist/vue/components/MSheet.js +313 -0
  409. package/dist/vue/components/MSheet.js.map +1 -0
  410. package/dist/vue/components/MSkeleton.d.ts +89 -0
  411. package/dist/vue/components/MSkeleton.d.ts.map +1 -0
  412. package/dist/vue/components/MSkeleton.js +89 -0
  413. package/dist/vue/components/MSkeleton.js.map +1 -0
  414. package/dist/vue/components/MSlider.d.ts +8 -4
  415. package/dist/vue/components/MSlider.d.ts.map +1 -1
  416. package/dist/vue/components/MSlider.js +3 -2
  417. package/dist/vue/components/MSlider.js.map +1 -1
  418. package/dist/vue/components/MStack.d.ts +199 -0
  419. package/dist/vue/components/MStack.d.ts.map +1 -0
  420. package/dist/vue/components/MStack.js +62 -0
  421. package/dist/vue/components/MStack.js.map +1 -0
  422. package/dist/vue/components/MSwitch.d.ts +89 -0
  423. package/dist/vue/components/MSwitch.d.ts.map +1 -0
  424. package/dist/vue/components/MSwitch.js +173 -0
  425. package/dist/vue/components/MSwitch.js.map +1 -0
  426. package/dist/vue/components/MTabs.d.ts +101 -0
  427. package/dist/vue/components/MTabs.d.ts.map +1 -0
  428. package/dist/vue/components/MTabs.js +245 -0
  429. package/dist/vue/components/MTabs.js.map +1 -0
  430. package/dist/vue/components/MText.d.ts +61 -25
  431. package/dist/vue/components/MText.d.ts.map +1 -1
  432. package/dist/vue/components/MText.js +47 -19
  433. package/dist/vue/components/MText.js.map +1 -1
  434. package/dist/vue/components/MTimePicker.d.ts +655 -0
  435. package/dist/vue/components/MTimePicker.d.ts.map +1 -0
  436. package/dist/vue/components/MTimePicker.js +50 -0
  437. package/dist/vue/components/MTimePicker.js.map +1 -0
  438. package/dist/vue/components/MToast.d.ts +23 -0
  439. package/dist/vue/components/MToast.d.ts.map +1 -0
  440. package/dist/vue/components/MToast.js +242 -0
  441. package/dist/vue/components/MToast.js.map +1 -0
  442. package/dist/vue/components/MTooltip.d.ts +65 -0
  443. package/dist/vue/components/MTooltip.d.ts.map +1 -0
  444. package/dist/vue/components/MTooltip.js +35 -0
  445. package/dist/vue/components/MTooltip.js.map +1 -0
  446. package/dist/vue/components/MVirtualList.d.ts +3 -0
  447. package/dist/vue/components/MVirtualList.d.ts.map +1 -0
  448. package/dist/vue/components/MVirtualList.js +88 -0
  449. package/dist/vue/components/MVirtualList.js.map +1 -0
  450. package/dist/vue/components/configurator.d.ts +541 -0
  451. package/dist/vue/components/configurator.d.ts.map +1 -0
  452. package/dist/vue/components/configurator.js +24 -0
  453. package/dist/vue/components/configurator.js.map +1 -0
  454. package/dist/vue/components/discovery.d.ts +282 -0
  455. package/dist/vue/components/discovery.d.ts.map +1 -0
  456. package/dist/vue/components/discovery.js +67 -0
  457. package/dist/vue/components/discovery.js.map +1 -0
  458. package/dist/vue/components/layout.d.ts +230 -88
  459. package/dist/vue/components/layout.d.ts.map +1 -1
  460. package/dist/vue/components/layout.js +16 -9
  461. package/dist/vue/components/layout.js.map +1 -1
  462. package/dist/vue/components/navigation.d.ts +225 -0
  463. package/dist/vue/components/navigation.d.ts.map +1 -0
  464. package/dist/vue/components/navigation.js +16 -0
  465. package/dist/vue/components/navigation.js.map +1 -0
  466. package/dist/vue/components/wayfinding.d.ts +441 -0
  467. package/dist/vue/components/wayfinding.d.ts.map +1 -0
  468. package/dist/vue/components/wayfinding.js +37 -0
  469. package/dist/vue/components/wayfinding.js.map +1 -0
  470. package/dist/vue/components/workflows.d.ts +251 -0
  471. package/dist/vue/components/workflows.d.ts.map +1 -0
  472. package/dist/vue/components/workflows.js +35 -0
  473. package/dist/vue/components/workflows.js.map +1 -0
  474. package/dist/vue/index.d.ts +54 -9
  475. package/dist/vue/index.d.ts.map +1 -1
  476. package/dist/vue/index.js +105 -7
  477. package/dist/vue/index.js.map +1 -1
  478. package/dist/vue/layers.d.ts +19 -0
  479. package/dist/vue/layers.d.ts.map +1 -0
  480. package/dist/vue/layers.js +26 -0
  481. package/dist/vue/layers.js.map +1 -0
  482. package/dist/vue/native-view.d.ts +6 -0
  483. package/dist/vue/native-view.d.ts.map +1 -0
  484. package/dist/vue/native-view.js +5 -0
  485. package/dist/vue/native-view.js.map +1 -0
  486. package/dist/vue/navigation.d.ts +4 -0
  487. package/dist/vue/navigation.d.ts.map +1 -0
  488. package/dist/vue/navigation.js +16 -0
  489. package/dist/vue/navigation.js.map +1 -0
  490. package/dist/vue/props.d.ts +12 -11
  491. package/dist/vue/props.d.ts.map +1 -1
  492. package/dist/vue/props.js +25 -10
  493. package/dist/vue/props.js.map +1 -1
  494. package/dist/vue/router-navigation.d.ts +25 -0
  495. package/dist/vue/router-navigation.d.ts.map +1 -0
  496. package/dist/vue/router-navigation.js +15 -0
  497. package/dist/vue/router-navigation.js.map +1 -0
  498. package/dist/vue/services.d.ts +16 -0
  499. package/dist/vue/services.d.ts.map +1 -0
  500. package/dist/vue/services.js +23 -0
  501. package/dist/vue/services.js.map +1 -0
  502. package/dist/vue/system-back.d.ts +11 -0
  503. package/dist/vue/system-back.d.ts.map +1 -0
  504. package/dist/vue/system-back.js +2 -0
  505. package/dist/vue/system-back.js.map +1 -0
  506. package/dist/vue/use-choice-paint.d.ts +9 -0
  507. package/dist/vue/use-choice-paint.d.ts.map +1 -0
  508. package/dist/vue/use-choice-paint.js +32 -0
  509. package/dist/vue/use-choice-paint.js.map +1 -0
  510. package/dist/vue/use-motion-region.d.ts +7 -0
  511. package/dist/vue/use-motion-region.d.ts.map +1 -0
  512. package/dist/vue/use-motion-region.js +28 -0
  513. package/dist/vue/use-motion-region.js.map +1 -0
  514. package/dist/vue/use-motion-surface.d.ts +8 -0
  515. package/dist/vue/use-motion-surface.d.ts.map +1 -0
  516. package/dist/vue/use-motion-surface.js +105 -0
  517. package/dist/vue/use-motion-surface.js.map +1 -0
  518. package/dist/vue/use-press.d.ts +1 -1
  519. package/dist/vue/use-press.d.ts.map +1 -1
  520. package/dist/vue/use-press.js +13 -5
  521. package/dist/vue/use-press.js.map +1 -1
  522. package/dist/vue/use-scroll-motion.d.ts +7 -0
  523. package/dist/vue/use-scroll-motion.d.ts.map +1 -0
  524. package/dist/vue/use-scroll-motion.js +30 -0
  525. package/dist/vue/use-scroll-motion.js.map +1 -0
  526. package/fonts/LICENSE +45 -0
  527. package/fonts/lucide.ttf +0 -0
  528. package/package.json +20 -4
  529. package/platforms/android/java/com/mavis/ui/Box.java +65 -0
  530. package/platforms/android/java/com/mavis/ui/ContentWidth.java +77 -0
  531. package/platforms/android/java/com/mavis/ui/FlexLayout.java +101 -4
  532. package/platforms/android/java/com/mavis/ui/MeasureMemo.java +145 -0
  533. package/platforms/android/java/com/mavis/ui/Screen.java +108 -0
  534. package/src/app-icons.ts +21 -0
  535. package/src/date-format.ts +2 -0
  536. package/src/files.ts +3 -0
  537. package/src/native/app-icons.android.ts +95 -0
  538. package/src/native/app-icons.ios.ts +74 -0
  539. package/src/native/app-icons.ts +12 -0
  540. package/src/native/appearance.android.ts +75 -0
  541. package/src/native/appearance.ts +33 -0
  542. package/src/native/avatar-image.ts +9 -0
  543. package/src/native/avatar-label.android.ts +14 -0
  544. package/src/native/avatar-label.ts +1 -0
  545. package/src/native/box.android.ts +11 -0
  546. package/src/native/box.ios.ts +61 -0
  547. package/src/native/box.ts +2 -0
  548. package/src/native/button.android.ts +38 -0
  549. package/src/native/button.ios.ts +53 -1
  550. package/src/native/checkbox.android.ts +35 -0
  551. package/src/native/checkbox.ts +9 -0
  552. package/src/native/collection-motion.ts +166 -0
  553. package/src/native/combobox-editor.android.ts +11 -0
  554. package/src/native/combobox-editor.ts +6 -0
  555. package/src/native/composed-button.android.ts +74 -0
  556. package/src/native/composed-button.ts +9 -0
  557. package/src/native/date-format.android.ts +72 -0
  558. package/src/native/date-format.ios.ts +54 -0
  559. package/src/native/date-format.ts +17 -0
  560. package/src/native/dialog.android.ts +56 -0
  561. package/src/native/dialog.ios.ts +23 -0
  562. package/src/native/dialog.ts +10 -0
  563. package/src/native/dynamic-type.ts +71 -0
  564. package/src/native/file-access.ts +71 -0
  565. package/src/native/file-picker.android.ts +191 -0
  566. package/src/native/file-picker.ios.ts +230 -0
  567. package/src/native/file-picker.ts +8 -0
  568. package/src/native/flex-children.ts +12 -0
  569. package/src/native/flex-layout.android.ts +12 -1
  570. package/src/native/flex-layout.ios.ts +148 -1
  571. package/src/native/image-effects.ts +71 -0
  572. package/src/native/input-action.ts +15 -0
  573. package/src/native/keyboard-dismiss.android.ts +17 -0
  574. package/src/native/keyboard-dismiss.ios.ts +124 -0
  575. package/src/native/keyboard-dismiss.ts +14 -0
  576. package/src/native/label.android.ts +27 -0
  577. package/src/native/label.ios.ts +54 -1
  578. package/src/native/measure-memo.ts +116 -0
  579. package/src/native/motion-owner.ts +66 -0
  580. package/src/native/motion-region.ts +293 -0
  581. package/src/native/motion-surface.ts +273 -0
  582. package/src/native/platform-motion.ts +103 -0
  583. package/src/native/press.ts +58 -10
  584. package/src/native/progress.ts +78 -0
  585. package/src/native/screen.android.ts +12 -0
  586. package/src/native/screen.ts +2 -0
  587. package/src/native/scroll-motion.ts +106 -0
  588. package/src/native/section-scroll.ts +81 -0
  589. package/src/native/segmented.ts +95 -0
  590. package/src/native/sheet.android.ts +24 -0
  591. package/src/native/sheet.ios.ts +52 -0
  592. package/src/native/sheet.ts +26 -0
  593. package/src/native/surface-effects.ts +33 -0
  594. package/src/native/tabs.android.ts +58 -0
  595. package/src/native/tabs.ts +8 -0
  596. package/src/native/text-field.android.ts +19 -0
  597. package/src/native/text-field.ios.ts +53 -0
  598. package/src/native/text-view.ios.ts +10 -0
  599. package/src/native/toast.android.ts +9 -0
  600. package/src/native/toast.ios.ts +13 -0
  601. package/src/native/toast.ts +6 -0
  602. package/src/native/visual-effects.ts +147 -0
  603. package/src/vue/components/ChartPlot.ts +114 -0
  604. package/src/vue/components/ChoiceControl.ts +265 -0
  605. package/src/vue/components/DateCalendar.ts +121 -0
  606. package/src/vue/components/LoadingDecoration.ts +38 -0
  607. package/src/vue/components/MAccordion.ts +123 -0
  608. package/src/vue/components/MAlert.ts +156 -0
  609. package/src/vue/components/MAvatar.ts +103 -0
  610. package/src/vue/components/MBadge.ts +34 -0
  611. package/src/vue/components/MButton.ts +255 -18
  612. package/src/vue/components/MCard.ts +44 -5
  613. package/src/vue/components/MCheckbox.ts +25 -0
  614. package/src/vue/components/MChip.ts +134 -0
  615. package/src/vue/components/MCombobox.ts +257 -0
  616. package/src/vue/components/MDatePicker.ts +25 -0
  617. package/src/vue/components/MDialog.ts +312 -0
  618. package/src/vue/components/MEmptyState.ts +96 -0
  619. package/src/vue/components/MFilePicker.ts +226 -0
  620. package/src/vue/components/MGrid.ts +86 -0
  621. package/src/vue/components/MIcon.ts +53 -0
  622. package/src/vue/components/MImage.ts +181 -0
  623. package/src/vue/components/MInput.ts +143 -21
  624. package/src/vue/components/MLink.ts +99 -0
  625. package/src/vue/components/MListItem.ts +66 -0
  626. package/src/vue/components/MPopover.ts +254 -0
  627. package/src/vue/components/MProgress.ts +94 -0
  628. package/src/vue/components/MRadioGroup.ts +64 -0
  629. package/src/vue/components/MRangeSlider.ts +125 -0
  630. package/src/vue/components/MReveal.ts +89 -48
  631. package/src/vue/components/MScreen.ts +122 -6
  632. package/src/vue/components/MSegmentedControl.ts +214 -0
  633. package/src/vue/components/MSelect.ts +185 -0
  634. package/src/vue/components/MSeparator.ts +40 -0
  635. package/src/vue/components/MSheet.ts +375 -0
  636. package/src/vue/components/MSkeleton.ts +102 -0
  637. package/src/vue/components/MSlider.ts +8 -2
  638. package/src/vue/components/MStack.ts +83 -0
  639. package/src/vue/components/MSwitch.ts +200 -0
  640. package/src/vue/components/MTabs.ts +302 -0
  641. package/src/vue/components/MText.ts +48 -10
  642. package/src/vue/components/MTimePicker.ts +57 -0
  643. package/src/vue/components/MToast.ts +289 -0
  644. package/src/vue/components/MTooltip.ts +39 -0
  645. package/src/vue/components/MVirtualList.ts +120 -0
  646. package/src/vue/components/configurator.ts +27 -0
  647. package/src/vue/components/discovery.ts +92 -0
  648. package/src/vue/components/layout.ts +24 -9
  649. package/src/vue/components/navigation.ts +19 -0
  650. package/src/vue/components/wayfinding.ts +46 -0
  651. package/src/vue/components/workflows.ts +38 -0
  652. package/src/vue/index.ts +217 -22
  653. package/src/vue/layers.ts +48 -0
  654. package/src/vue/native-view.ts +6 -0
  655. package/src/vue/navigation.ts +15 -0
  656. package/src/vue/props.ts +37 -12
  657. package/src/vue/router-navigation.ts +39 -0
  658. package/src/vue/services.ts +39 -0
  659. package/src/vue/system-back.ts +12 -0
  660. package/src/vue/use-choice-paint.ts +39 -0
  661. package/src/vue/use-motion-region.ts +29 -0
  662. package/src/vue/use-motion-surface.ts +115 -0
  663. package/src/vue/use-press.ts +13 -5
  664. package/src/vue/use-scroll-motion.ts +31 -0
  665. package/dist/native/input-description.android.d.ts +0 -4
  666. package/dist/native/input-description.android.d.ts.map +0 -1
  667. package/dist/native/input-description.android.js +0 -18
  668. package/dist/native/input-description.android.js.map +0 -1
  669. package/dist/theme/resolve.d.ts +0 -3
  670. package/dist/theme/resolve.d.ts.map +0 -1
  671. package/dist/theme/resolve.js +0 -8
  672. package/dist/theme/resolve.js.map +0 -1
  673. package/dist/theme/themes.d.ts +0 -6
  674. package/dist/theme/themes.d.ts.map +0 -1
  675. package/dist/theme/themes.js +0 -83
  676. package/dist/theme/themes.js.map +0 -1
  677. package/dist/theme/types.d.ts +0 -50
  678. package/dist/theme/types.d.ts.map +0 -1
  679. package/dist/theme/types.js +0 -2
  680. package/dist/theme/types.js.map +0 -1
  681. package/dist/vue/global-components.d.ts +0 -21
  682. package/dist/vue/global-components.d.ts.map +0 -1
  683. package/dist/vue/global-components.js +0 -2
  684. package/dist/vue/global-components.js.map +0 -1
  685. package/dist/vue/layout-context.d.ts +0 -5
  686. package/dist/vue/layout-context.d.ts.map +0 -1
  687. package/dist/vue/layout-context.js +0 -7
  688. package/dist/vue/layout-context.js.map +0 -1
  689. package/dist/vue/text-content.d.ts +0 -4
  690. package/dist/vue/text-content.d.ts.map +0 -1
  691. package/dist/vue/text-content.js +0 -17
  692. package/dist/vue/text-content.js.map +0 -1
  693. package/dist/vue/theme.d.ts +0 -177
  694. package/dist/vue/theme.d.ts.map +0 -1
  695. package/dist/vue/theme.js +0 -17
  696. package/dist/vue/theme.js.map +0 -1
@@ -0,0 +1,46 @@
1
+ import {
2
+ createChart,
3
+ createCommandPalette,
4
+ createWayfindingControls,
5
+ } from '@getcortexlabs/mavis-core/vue'
6
+ import type { View } from '@nativescript/core'
7
+ import { MRow, MColumn, MBox } from './layout.js'
8
+ import { MText } from './MText.js'
9
+ import { MButton } from './MButton.js'
10
+ import { MLink } from './MLink.js'
11
+ import { MIcon } from './MIcon.js'
12
+ import { MBadge } from './MBadge.js'
13
+ import { MSeparator } from './MSeparator.js'
14
+ import { MSheet } from './MSheet.js'
15
+ import { MInput } from './MInput.js'
16
+ import { MSelect } from './MSelect.js'
17
+ import { MReveal } from './MReveal.js'
18
+ import { ChartPlot } from './ChartPlot.js'
19
+ const ui = {
20
+ focus: (component: unknown) =>
21
+ (component as { $el?: { nativeView?: View } } | undefined)?.$el?.nativeView?.focus(),
22
+ Row: MRow,
23
+ Column: MColumn,
24
+ Box: MBox,
25
+ Text: MText,
26
+ Button: MButton,
27
+ Link: MLink,
28
+ Icon: MIcon,
29
+ Badge: MBadge,
30
+ Separator: MSeparator,
31
+ Sheet: MSheet,
32
+ Input: MInput,
33
+ Select: MSelect,
34
+ Reveal: MReveal,
35
+ Plot: ChartPlot,
36
+ }
37
+ export const { MNavigationRail, MBreadcrumb, MTimeline } = createWayfindingControls(ui, 'native')
38
+ export const MChart = createChart(ui, 'native')
39
+ export const MCommandPalette = createCommandPalette(
40
+ {
41
+ ...ui,
42
+ focus: (component) =>
43
+ (component as { $el?: { nativeView?: View } } | undefined)?.$el?.nativeView?.focus(),
44
+ },
45
+ 'native',
46
+ )
@@ -0,0 +1,38 @@
1
+ import { createWorkflows } from '@getcortexlabs/mavis-core/vue'
2
+ import { MColumn, MRow } from './layout.js'
3
+ import { MText } from './MText.js'
4
+ import { MButton } from './MButton.js'
5
+
6
+ import { isAndroid, type View } from '@nativescript/core'
7
+
8
+ function focused(root: View): View | undefined {
9
+ if (isAndroid ? root.android?.isFocused() : root.ios?.isFirstResponder) return root
10
+ let match: View | undefined
11
+ root.eachChildView((child) => {
12
+ match = focused(child)
13
+ return !match
14
+ })
15
+ return match
16
+ }
17
+ function preserveFocus(instance: unknown, currentId: string) {
18
+ const root = (instance as { $el?: { nativeView?: View } } | undefined)?.$el?.nativeView
19
+ const previous = root && focused(root)
20
+ if (!root || !previous) return () => {}
21
+ return () => {
22
+ if (!root.isLoaded || (previous.isLoaded && previous.isEnabled)) return
23
+ const page = root.page
24
+ if (
25
+ !page ||
26
+ page.frame?.currentPage !== page ||
27
+ (!isAndroid && page.ios?.presentedViewController)
28
+ )
29
+ return
30
+ const active = focused(page)
31
+ if (!active || active === previous) root.getViewById<View>(currentId)?.focus()
32
+ }
33
+ }
34
+
35
+ export const { MFormGroup, MFormErrors, MSteps, MPagination } = createWorkflows(
36
+ { Column: MColumn, Row: MRow, Text: MText, Button: MButton, preserveFocus },
37
+ 'native',
38
+ )
package/src/vue/index.ts CHANGED
@@ -1,41 +1,236 @@
1
- import type { App } from 'nativescript-vue'
2
- import { mavis } from '@getcortexlabs/mavis-core'
3
- import type { MavisTheme } from '@getcortexlabs/mavis-core'
4
- import { createThemeContext, themeKey } from '@getcortexlabs/mavis-core/vue'
1
+ import {
2
+ MCommandPalette,
3
+ MNavigationRail,
4
+ MBreadcrumb,
5
+ MTimeline,
6
+ MChart,
7
+ } from './components/wayfinding.js'
8
+ import { MTooltip } from './components/MTooltip.js'
9
+ import { MDataTable, MCarousel, MCalendar, MRating, MTreeView } from './components/discovery.js'
10
+ import { MRangeSlider } from './components/MRangeSlider.js'
11
+ import { MPopover } from './components/MPopover.js'
12
+ import { MMenu, MAppBar, MTabBar } from './components/navigation.js'
13
+ import { MTimePicker } from './components/MTimePicker.js'
14
+ import { MVirtualList } from './components/MVirtualList.js'
15
+ import { MNumberInput, MMultiSelect } from './components/configurator.js'
16
+ import { MImage } from './components/MImage.js'
17
+ import { MStack } from './components/MStack.js'
18
+ import { MGrid } from './components/MGrid.js'
19
+ import { MLink } from './components/MLink.js'
20
+ import { MDatePicker, MDateRangePicker } from './components/MDatePicker.js'
21
+ import { MCombobox } from './components/MCombobox.js'
22
+ import { MFilePicker } from './components/MFilePicker.js'
23
+ import { MFormGroup, MFormErrors, MSteps, MPagination } from './components/workflows.js'
24
+ import { MChip } from './components/MChip.js'
25
+ import { MEmptyState } from './components/MEmptyState.js'
26
+ import type { App, Component } from 'nativescript-vue'
27
+ import { createMavisServices, type MavisServiceOptions } from './services.js'
28
+ export { createMavisServices } from './services.js'
29
+ export type { MavisServiceOptions } from './services.js'
30
+ import { MThemeProvider, MSpan, MPlatform } from '@getcortexlabs/mavis-core/vue'
5
31
  import { MScreen } from './components/MScreen.js'
6
32
  import { MBox, MRow, MColumn } from './components/layout.js'
7
33
  import { MCard } from './components/MCard.js'
8
34
  import { MText } from './components/MText.js'
9
35
  import { MButton } from './components/MButton.js'
36
+ import { MToast } from './components/MToast.js'
37
+ import { MDialog } from './components/MDialog.js'
38
+ import { MListItem } from './components/MListItem.js'
39
+ import { MSeparator } from './components/MSeparator.js'
40
+ import { MAvatar } from './components/MAvatar.js'
41
+ import { MBadge } from './components/MBadge.js'
42
+ import { MSkeleton } from './components/MSkeleton.js'
43
+ import { MProgress } from './components/MProgress.js'
44
+ import { MAccordion } from './components/MAccordion.js'
45
+ import { MSegmentedControl } from './components/MSegmentedControl.js'
46
+ import { MAlert } from './components/MAlert.js'
47
+ import { MTabs } from './components/MTabs.js'
48
+ import { MSelect } from './components/MSelect.js'
49
+ import { MRadioGroup } from './components/MRadioGroup.js'
50
+ import { MCheckbox } from './components/MCheckbox.js'
51
+ import { MSwitch } from './components/MSwitch.js'
10
52
  import { MSlider } from './components/MSlider.js'
11
53
  import { MInput } from './components/MInput.js'
54
+ import { MIcon } from './components/MIcon.js'
12
55
  import { MReveal } from './components/MReveal.js'
56
+ import { MSheet } from './components/MSheet.js'
57
+ import type { ClaimSystemBack, SystemBackClaimant } from './system-back.js'
13
58
 
14
- export { MScreen, MBox, MRow, MColumn, MCard, MText, MButton, MSlider, MInput, MReveal }
15
- export { useMavisTheme } from '@getcortexlabs/mavis-core/vue'
16
- export type { MavisThemeContext } from '@getcortexlabs/mavis-core/vue'
59
+ export {
60
+ MThemeProvider,
61
+ MPlatform,
62
+ MSpan,
63
+ MScreen,
64
+ MBox,
65
+ MRow,
66
+ MColumn,
67
+ MStack,
68
+ MGrid,
69
+ MLink,
70
+ MCard,
71
+ MText,
72
+ MButton,
73
+ MSlider,
74
+ MSwitch,
75
+ MCheckbox,
76
+ MRadioGroup,
77
+ MSelect,
78
+ MToast,
79
+ MDialog,
80
+ MTabs,
81
+ MSkeleton,
82
+ MChip,
83
+ MEmptyState,
84
+ MProgress,
85
+ MAccordion,
86
+ MSegmentedControl,
87
+ MAlert,
88
+ MListItem,
89
+ MSeparator,
90
+ MAvatar,
91
+ MBadge,
92
+ MInput,
93
+ MIcon,
94
+ MReveal,
95
+ MSheet,
96
+ MDatePicker,
97
+ MDateRangePicker,
98
+ MNumberInput,
99
+ MMultiSelect,
100
+ MImage,
101
+ MCombobox,
102
+ MFilePicker,
103
+ MFormGroup,
104
+ MFormErrors,
105
+ MSteps,
106
+ MPagination,
107
+ MPopover,
108
+ MMenu,
109
+ MAppBar,
110
+ MTabBar,
111
+ MTimePicker,
112
+ MVirtualList,
113
+ MDataTable,
114
+ MCarousel,
115
+ MRangeSlider,
116
+ MCalendar,
117
+ MRating,
118
+ MTreeView,
119
+ MCommandPalette,
120
+ MNavigationRail,
121
+ MBreadcrumb,
122
+ MTooltip,
123
+ MTimeline,
124
+ MChart,
125
+ }
126
+ export {
127
+ useMavisTheme,
128
+ useMavisPlatform,
129
+ useMavisListMotion,
130
+ useToast,
131
+ useFormController,
132
+ useFormField,
133
+ useFileSelection,
134
+ useMavisNavigation,
135
+ } from '@getcortexlabs/mavis-core/vue'
136
+ export type {
137
+ MavisThemeContext,
138
+ MavisPlatform,
139
+ MavisPlatformTarget,
140
+ MavisPlatformContext,
141
+ Appearance,
142
+ AppearanceMode,
143
+ AppearanceSource,
144
+ } from '@getcortexlabs/mavis-core/vue'
17
145
  export type { Align, Justify } from './components/layout.js'
18
146
  export type {} from '@getcortexlabs/mavis-core/vue'
19
147
 
20
- /** Create one plugin per application. Vue also resolves MButton as <m-button>. */
21
- export function createMavis(options: { theme?: MavisTheme } = {}) {
148
+ export type { SystemBackClaimant, ClaimSystemBack }
149
+
150
+ export type MavisOptions = MavisServiceOptions & { components?: false | Record<string, Component> }
151
+
152
+ /** Create one plugin per application; `system` appearance follows the device. Vue also resolves MButton as <m-button>. */
153
+ export function createMavis(options: MavisOptions = {}) {
22
154
  return {
23
155
  install(app: App) {
24
- app.provide(themeKey, createThemeContext(options.theme ?? mavis))
25
- for (const [name, component] of Object.entries({
26
- MScreen,
27
- MBox,
28
- MRow,
29
- MColumn,
30
- MCard,
31
- MText,
32
- MButton,
33
- MSlider,
34
- MInput,
35
- MReveal,
36
- })) {
156
+ const { components, ...services } = options
157
+ createMavisServices(services).install(app)
158
+ if (components === false) return
159
+ for (const [name, component] of Object.entries(
160
+ components ?? {
161
+ MThemeProvider,
162
+ MPlatform,
163
+ MSpan,
164
+ MScreen,
165
+ MBox,
166
+ MRow,
167
+ MColumn,
168
+ MStack,
169
+ MGrid,
170
+ MLink,
171
+ MCard,
172
+ MText,
173
+ MButton,
174
+ MSlider,
175
+ MSwitch,
176
+ MCheckbox,
177
+ MRadioGroup,
178
+ MSelect,
179
+ MToast,
180
+ MDialog,
181
+ MTabs,
182
+ MSkeleton,
183
+ MChip,
184
+ MEmptyState,
185
+ MProgress,
186
+ MAccordion,
187
+ MSegmentedControl,
188
+ MAlert,
189
+ MListItem,
190
+ MSeparator,
191
+ MAvatar,
192
+ MBadge,
193
+ MInput,
194
+ MIcon,
195
+ MReveal,
196
+ MSheet,
197
+ MDatePicker,
198
+ MDateRangePicker,
199
+ MNumberInput,
200
+ MMultiSelect,
201
+ MImage,
202
+ MCombobox,
203
+ MFilePicker,
204
+ MFormGroup,
205
+ MFormErrors,
206
+ MSteps,
207
+ MPagination,
208
+ MPopover,
209
+ MMenu,
210
+ MAppBar,
211
+ MTabBar,
212
+ MTimePicker,
213
+ MVirtualList,
214
+ MDataTable,
215
+ MCarousel,
216
+ MRangeSlider,
217
+ MCalendar,
218
+ MRating,
219
+ MTreeView,
220
+ MCommandPalette,
221
+ MNavigationRail,
222
+ MBreadcrumb,
223
+ MTooltip,
224
+ MTimeline,
225
+ MChart,
226
+ },
227
+ )) {
37
228
  app.component(name, component)
38
229
  }
39
230
  },
40
231
  }
41
232
  }
233
+
234
+ export * from '../files.js'
235
+
236
+ export { createMavisNavigation } from './router-navigation.js'
@@ -0,0 +1,48 @@
1
+ import {
2
+ inject,
3
+ provide,
4
+ shallowReactive,
5
+ type Component,
6
+ type InjectionKey,
7
+ type Ref,
8
+ } from 'nativescript-vue'
9
+
10
+ export interface Layer {
11
+ component: Component
12
+ props: Record<string, unknown>
13
+ /** True while the layer covers the screen content. */
14
+ presented: Ref<boolean>
15
+ /** Non-modal notices leave the screen content reachable. */
16
+ modal?: boolean
17
+ }
18
+ export interface LayerEntry extends Layer {
19
+ key: number
20
+ }
21
+ export interface LayerHost {
22
+ add(layer: Layer): () => void
23
+ }
24
+
25
+ const layerHost: InjectionKey<LayerHost> = Symbol('mavis.layers')
26
+
27
+ /** A Screen renders registered layers above its content, inside one native cell. */
28
+ export function provideLayerHost(): LayerEntry[] {
29
+ const layers = shallowReactive<LayerEntry[]>([])
30
+ let next = 0
31
+ provide(layerHost, {
32
+ add(layer) {
33
+ const entry = { ...layer, key: next++ }
34
+ layers.push(entry)
35
+ return () => {
36
+ const index = layers.indexOf(entry)
37
+ if (index >= 0) layers.splice(index, 1)
38
+ }
39
+ },
40
+ })
41
+ return layers
42
+ }
43
+
44
+ export function useLayerHost(name: string): LayerHost {
45
+ const host = inject(layerHost, undefined)
46
+ if (!host) throw new Error(`${name} needs an MScreen ancestor on NativeScript`)
47
+ return host
48
+ }
@@ -0,0 +1,6 @@
1
+ import type { View } from '@nativescript/core'
2
+
3
+ /** Template refs on native elements wrap the NativeScript view. */
4
+ export function nativeViewOf<T extends View>(element: { nativeView: T } | undefined) {
5
+ return element?.nativeView
6
+ }
@@ -0,0 +1,15 @@
1
+ import { Utils } from '@nativescript/core'
2
+ import { linkDestination, type NavigationOptions } from '@getcortexlabs/mavis-core'
3
+
4
+ export function nativeDestination(options: NavigationOptions) {
5
+ const href = linkDestination(options.href!)
6
+ if (!options.navigate && !/^[a-z][a-z\d+.-]*:/i.test(href))
7
+ throw new TypeError('Native navigation needs a navigate handler for in-app destinations.')
8
+ return href
9
+ }
10
+
11
+ export async function navigateNative(options: NavigationOptions) {
12
+ const href = nativeDestination(options)
13
+ if (options.navigate) await options.navigate(href)
14
+ else if (!(await Utils.openUrl(href))) throw new Error(`The system could not open ${href}.`)
15
+ }
package/src/vue/props.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { MavisTheme } from '@getcortexlabs/mavis-core'
1
+ import type { Dimension, MavisTheme } from '@getcortexlabs/mavis-core'
2
2
  import {
3
3
  resolveSpace,
4
4
  resolveRadius,
@@ -8,19 +8,44 @@ import {
8
8
  import type { BoxProps } from '@getcortexlabs/mavis-core/vue'
9
9
  export { boxProps, spacingProp } from '@getcortexlabs/mavis-core/vue'
10
10
 
11
- export function boxStyle(theme: MavisTheme, props: BoxProps, defaultShrink = 0) {
12
- const padding = resolveSpace(theme, props.padding ?? 'none')
13
- return {
14
- paddingLeft: props.paddingX === undefined ? padding : resolveSpace(theme, props.paddingX),
15
- paddingRight: props.paddingX === undefined ? padding : resolveSpace(theme, props.paddingX),
16
- paddingTop: props.paddingY === undefined ? padding : resolveSpace(theme, props.paddingY),
17
- paddingBottom: props.paddingY === undefined ? padding : resolveSpace(theme, props.paddingY),
18
- borderRadius: resolveRadius(theme, props.radius),
11
+ export interface BoxStyle {
12
+ paddingLeft?: number
13
+ paddingRight?: number
14
+ paddingTop?: number
15
+ paddingBottom?: number
16
+ borderRadius?: number
17
+ flexGrow: number
18
+ flexShrink: number
19
+ minWidth: number
20
+ width?: Dimension
21
+ height?: Dimension
22
+ backgroundColor?: string
23
+ }
24
+
25
+ // A prop that was not given leaves its style untouched, so a plain attribute such as
26
+ // `paddingTop` or `borderRadius` on the element survives every render.
27
+ export function boxStyle(theme: MavisTheme, props: BoxProps, defaultShrink = 0): BoxStyle {
28
+ const style: BoxStyle = {
19
29
  flexGrow: nonNegative(props.grow, 'grow'),
20
30
  flexShrink: nonNegative(props.shrink ?? defaultShrink, 'shrink'),
21
31
  minWidth: 0,
22
- width: resolveDimension(props.width),
23
- height: resolveDimension(props.height),
24
- backgroundColor: props.backgroundColor,
25
32
  }
33
+ const padding = props.padding === undefined ? undefined : resolveSpace(theme, props.padding)
34
+ const x = props.paddingX === undefined ? padding : resolveSpace(theme, props.paddingX)
35
+ const y = props.paddingY === undefined ? padding : resolveSpace(theme, props.paddingY)
36
+ if (x !== undefined) {
37
+ style.paddingLeft = x
38
+ style.paddingRight = x
39
+ }
40
+ if (y !== undefined) {
41
+ style.paddingTop = y
42
+ style.paddingBottom = y
43
+ }
44
+ if (props.radius !== undefined) style.borderRadius = resolveRadius(theme, props.radius)
45
+ const width = resolveDimension(props.width)
46
+ if (width !== undefined) style.width = width
47
+ const height = resolveDimension(props.height)
48
+ if (height !== undefined) style.height = height
49
+ if (props.backgroundColor !== undefined) style.backgroundColor = props.backgroundColor
50
+ return style
26
51
  }
@@ -0,0 +1,39 @@
1
+ import {
2
+ createRouterNavigation,
3
+ defineNavigationTransition,
4
+ type MavisRouter,
5
+ type NavigationTransition,
6
+ } from '@getcortexlabs/mavis-core'
7
+
8
+ export interface NativeNavigationRouter extends MavisRouter {
9
+ push(
10
+ href: string,
11
+ options?: { animated?: boolean; transition?: { name: string; duration: number } },
12
+ ): unknown
13
+ replace(
14
+ href: string,
15
+ options?: { animated?: boolean; transition?: { name: string; duration: number } },
16
+ ): unknown
17
+ back(options?: { animated?: boolean }): unknown
18
+ }
19
+
20
+ /** vue-router-ns owns native transitions, reduced motion, interactive back and focus. */
21
+ export function createMavisNavigation(
22
+ router: NativeNavigationRouter,
23
+ options: { transition?: NavigationTransition } = {},
24
+ ) {
25
+ const policy = defineNavigationTransition(options.transition)
26
+ const native =
27
+ policy.name === 'none' || policy.duration === 0
28
+ ? { animated: false }
29
+ : { transition: { name: policy.name, duration: policy.duration } }
30
+ return createRouterNavigation({
31
+ resolve: (href) => router.resolve(href),
32
+ push: (href) => router.push(href, native),
33
+ replace: (href) => router.replace(href, native),
34
+ back: () =>
35
+ router.back(
36
+ policy.name === 'none' || policy.duration === 0 ? { animated: false } : undefined,
37
+ ),
38
+ })
39
+ }
@@ -0,0 +1,39 @@
1
+ import type { App } from 'nativescript-vue'
2
+ import { isIOS } from '@nativescript/core'
3
+ import type { MavisNavigation } from '@getcortexlabs/mavis-core'
4
+ import {
5
+ createThemeContext,
6
+ installAppToast,
7
+ themeKey,
8
+ navigationKey,
9
+ platformKey,
10
+ createPlatformContext,
11
+ type ThemeContextOptions,
12
+ } from '@getcortexlabs/mavis-core/vue'
13
+ import { systemAppearance } from '../native/appearance'
14
+ import { systemBackKey, type ClaimSystemBack } from './system-back.js'
15
+
16
+ export type MavisServiceOptions = Omit<ThemeContextOptions, 'source'> & {
17
+ toast?: { closeLabel?: string }
18
+ claimSystemBack?: ClaimSystemBack
19
+ navigation?: MavisNavigation
20
+ }
21
+
22
+ /** Application-owned services without global component registration. */
23
+ export function createMavisServices(options: MavisServiceOptions = {}) {
24
+ return {
25
+ install(app: App) {
26
+ app.provide(platformKey, createPlatformContext(isIOS ? 'ios' : 'android'))
27
+ installAppToast(app, options.toast)
28
+ const { toast: _toast, claimSystemBack, navigation, ...theme } = options
29
+ const context = createThemeContext({ ...theme, source: systemAppearance() })
30
+ app.provide(themeKey, context)
31
+ app.provide(systemBackKey, claimSystemBack)
32
+ app.provide(navigationKey, navigation)
33
+ app.onUnmount(() => {
34
+ context.dispose()
35
+ navigation?.dispose?.()
36
+ })
37
+ },
38
+ }
39
+ }
@@ -0,0 +1,12 @@
1
+ import type { InjectionKey } from 'nativescript-vue'
2
+
3
+ /** Something other than a page that the Android system back should reach first. */
4
+ export interface SystemBackClaimant {
5
+ /** Whether it wants the next back press or gesture. */
6
+ owns(): boolean
7
+ /** Takes the press. */
8
+ back(): void
9
+ }
10
+ export type ClaimSystemBack = (claimant: SystemBackClaimant) => () => void
11
+
12
+ export const systemBackKey: InjectionKey<ClaimSystemBack | undefined> = Symbol('mavis.systemBack')
@@ -0,0 +1,39 @@
1
+ import { onBeforeUnmount, watch, type Ref } from 'nativescript-vue'
2
+ import type { EventData, View } from '@nativescript/core'
3
+ import { animate } from '@rafaelaugusto/jolt'
4
+ import { choiceMotion, type ChoicePaint, type MavisTheme } from '@getcortexlabs/mavis-core'
5
+
6
+ export function useChoicePaint(
7
+ paint: () => ChoicePaint,
8
+ theme: Readonly<Ref<Readonly<MavisTheme>>>,
9
+ ) {
10
+ const initial = paint()
11
+ let target: View | undefined
12
+ let playback: ReturnType<typeof animate> | undefined
13
+ function update(instant = false) {
14
+ if (!target?.isLoaded) return
15
+ const previous = playback
16
+ playback = animate(target, paint(), instant ? { duration: 0 } : choiceMotion(theme.value))
17
+ previous?.stop()
18
+ }
19
+ function unload() {
20
+ playback?.stop()
21
+ playback = undefined
22
+ target = undefined
23
+ }
24
+ watch(
25
+ () => [paint(), theme.value.motion],
26
+ () => update(),
27
+ { deep: true, flush: 'post' },
28
+ )
29
+ onBeforeUnmount(unload)
30
+ return {
31
+ style: initial,
32
+ onLoaded: (event: EventData) => {
33
+ unload()
34
+ target = event.object as View
35
+ update(true)
36
+ },
37
+ onUnloaded: unload,
38
+ }
39
+ }
@@ -0,0 +1,29 @@
1
+ import { onBeforeUnmount, watch } from 'nativescript-vue'
2
+ import type { EventData, View } from '@nativescript/core'
3
+ import type { MotionRegion } from '@getcortexlabs/mavis-core/experimental'
4
+ import { attachNativeMotionRegion } from '../native/motion-region.js'
5
+
6
+ export function useMotionRegion(reference: () => MotionRegion | undefined) {
7
+ let target: View | undefined, release: (() => void) | undefined
8
+ const clear = () => {
9
+ release?.()
10
+ release = undefined
11
+ }
12
+ const attach = () => {
13
+ clear()
14
+ const region = reference()
15
+ if (region && target?.isLoaded) release = attachNativeMotionRegion(region, target)
16
+ }
17
+ watch(reference, attach, { flush: 'post' })
18
+ onBeforeUnmount(clear)
19
+ return {
20
+ onLoaded(event: EventData) {
21
+ target = event.object as View
22
+ attach()
23
+ },
24
+ onUnloaded() {
25
+ clear()
26
+ target = undefined
27
+ },
28
+ }
29
+ }