@getcortexlabs/mavis 0.1.0-alpha.2 → 0.1.0-alpha.4

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 (413) hide show
  1. package/README.md +7 -5
  2. package/dist/native/avatar-image.d.ts +4 -0
  3. package/dist/native/avatar-image.d.ts.map +1 -0
  4. package/dist/native/avatar-image.js +12 -0
  5. package/dist/native/avatar-image.js.map +1 -0
  6. package/dist/native/avatar-label.android.d.ts +9 -0
  7. package/dist/native/avatar-label.android.d.ts.map +1 -0
  8. package/dist/native/avatar-label.android.js +9 -0
  9. package/dist/native/avatar-label.android.js.map +1 -0
  10. package/dist/native/avatar-label.d.ts +2 -0
  11. package/dist/native/avatar-label.d.ts.map +1 -0
  12. package/dist/native/avatar-label.js +2 -0
  13. package/dist/native/avatar-label.js.map +1 -0
  14. package/dist/native/box.ios.d.ts +4 -0
  15. package/dist/native/box.ios.d.ts.map +1 -1
  16. package/dist/native/box.ios.js +29 -1
  17. package/dist/native/box.ios.js.map +1 -1
  18. package/dist/native/button.ios.d.ts +13 -1
  19. package/dist/native/button.ios.d.ts.map +1 -1
  20. package/dist/native/button.ios.js +29 -1
  21. package/dist/native/button.ios.js.map +1 -1
  22. package/dist/native/checkbox.android.d.ts +7 -0
  23. package/dist/native/checkbox.android.d.ts.map +1 -0
  24. package/dist/native/checkbox.android.js +26 -0
  25. package/dist/native/checkbox.android.js.map +1 -0
  26. package/dist/native/checkbox.d.ts +7 -0
  27. package/dist/native/checkbox.d.ts.map +1 -0
  28. package/dist/native/checkbox.js +7 -0
  29. package/dist/native/checkbox.js.map +1 -0
  30. package/dist/native/composed-button.android.d.ts +4 -0
  31. package/dist/native/composed-button.android.d.ts.map +1 -0
  32. package/dist/native/composed-button.android.js +53 -0
  33. package/dist/native/composed-button.android.js.map +1 -0
  34. package/dist/native/composed-button.d.ts +3 -0
  35. package/dist/native/composed-button.d.ts.map +1 -0
  36. package/dist/native/composed-button.js +4 -0
  37. package/dist/native/composed-button.js.map +1 -0
  38. package/dist/native/dialog.android.d.ts +12 -0
  39. package/dist/native/dialog.android.d.ts.map +1 -0
  40. package/dist/native/dialog.android.js +46 -0
  41. package/dist/native/dialog.android.js.map +1 -0
  42. package/dist/native/dialog.d.ts +12 -0
  43. package/dist/native/dialog.d.ts.map +1 -0
  44. package/dist/native/dialog.ios.d.ts +12 -0
  45. package/dist/native/dialog.ios.d.ts.map +1 -0
  46. package/dist/native/dialog.ios.js +13 -0
  47. package/dist/native/dialog.ios.js.map +1 -0
  48. package/dist/native/dialog.js +4 -0
  49. package/dist/native/dialog.js.map +1 -0
  50. package/dist/native/dynamic-type.d.ts +15 -0
  51. package/dist/native/dynamic-type.d.ts.map +1 -0
  52. package/dist/native/dynamic-type.js +47 -0
  53. package/dist/native/dynamic-type.js.map +1 -0
  54. package/dist/native/flex-layout.ios.d.ts +10 -0
  55. package/dist/native/flex-layout.ios.d.ts.map +1 -1
  56. package/dist/native/flex-layout.ios.js +85 -0
  57. package/dist/native/flex-layout.ios.js.map +1 -1
  58. package/dist/native/input-action.d.ts +5 -0
  59. package/dist/native/input-action.d.ts.map +1 -0
  60. package/dist/native/input-action.js +13 -0
  61. package/dist/native/input-action.js.map +1 -0
  62. package/dist/native/keyboard-dismiss.android.d.ts +8 -0
  63. package/dist/native/keyboard-dismiss.android.d.ts.map +1 -0
  64. package/dist/native/keyboard-dismiss.android.js +9 -0
  65. package/dist/native/keyboard-dismiss.android.js.map +1 -0
  66. package/dist/native/keyboard-dismiss.d.ts +10 -0
  67. package/dist/native/keyboard-dismiss.d.ts.map +1 -0
  68. package/dist/native/keyboard-dismiss.ios.d.ts +8 -0
  69. package/dist/native/keyboard-dismiss.ios.d.ts.map +1 -0
  70. package/dist/native/keyboard-dismiss.ios.js +91 -0
  71. package/dist/native/keyboard-dismiss.ios.js.map +1 -0
  72. package/dist/native/keyboard-dismiss.js +6 -0
  73. package/dist/native/keyboard-dismiss.js.map +1 -0
  74. package/dist/native/label.android.d.ts +12 -0
  75. package/dist/native/label.android.d.ts.map +1 -0
  76. package/dist/native/label.android.js +19 -0
  77. package/dist/native/label.android.js.map +1 -0
  78. package/dist/native/label.ios.d.ts +14 -1
  79. package/dist/native/label.ios.d.ts.map +1 -1
  80. package/dist/native/label.ios.js +37 -1
  81. package/dist/native/label.ios.js.map +1 -1
  82. package/dist/native/measure-memo.d.ts +37 -0
  83. package/dist/native/measure-memo.d.ts.map +1 -0
  84. package/dist/native/measure-memo.js +82 -0
  85. package/dist/native/measure-memo.js.map +1 -0
  86. package/dist/native/motion-surface.d.ts +9 -0
  87. package/dist/native/motion-surface.d.ts.map +1 -0
  88. package/dist/native/motion-surface.js +119 -0
  89. package/dist/native/motion-surface.js.map +1 -0
  90. package/dist/native/press.d.ts +5 -2
  91. package/dist/native/press.d.ts.map +1 -1
  92. package/dist/native/press.js +52 -8
  93. package/dist/native/press.js.map +1 -1
  94. package/dist/native/progress.d.ts +7 -0
  95. package/dist/native/progress.d.ts.map +1 -0
  96. package/dist/native/progress.js +77 -0
  97. package/dist/native/progress.js.map +1 -0
  98. package/dist/native/screen.android.d.ts +6 -0
  99. package/dist/native/screen.android.d.ts.map +1 -0
  100. package/dist/native/screen.android.js +8 -0
  101. package/dist/native/screen.android.js.map +1 -0
  102. package/dist/native/screen.d.ts +2 -0
  103. package/dist/native/screen.d.ts.map +1 -0
  104. package/dist/native/screen.js +3 -0
  105. package/dist/native/screen.js.map +1 -0
  106. package/dist/native/scroll-motion.d.ts +11 -0
  107. package/dist/native/scroll-motion.d.ts.map +1 -0
  108. package/dist/native/scroll-motion.js +94 -0
  109. package/dist/native/scroll-motion.js.map +1 -0
  110. package/dist/native/segmented.d.ts +14 -0
  111. package/dist/native/segmented.d.ts.map +1 -0
  112. package/dist/native/segmented.js +86 -0
  113. package/dist/native/segmented.js.map +1 -0
  114. package/dist/native/sheet.android.d.ts +18 -0
  115. package/dist/native/sheet.android.d.ts.map +1 -0
  116. package/dist/native/sheet.android.js +16 -0
  117. package/dist/native/sheet.android.js.map +1 -0
  118. package/dist/native/sheet.d.ts +21 -0
  119. package/dist/native/sheet.d.ts.map +1 -0
  120. package/dist/native/sheet.ios.d.ts +19 -0
  121. package/dist/native/sheet.ios.d.ts.map +1 -0
  122. package/dist/native/sheet.ios.js +41 -0
  123. package/dist/native/sheet.ios.js.map +1 -0
  124. package/dist/native/sheet.js +17 -0
  125. package/dist/native/sheet.js.map +1 -0
  126. package/dist/native/tabs.android.d.ts +3 -0
  127. package/dist/native/tabs.android.d.ts.map +1 -0
  128. package/dist/native/tabs.android.js +29 -0
  129. package/dist/native/tabs.android.js.map +1 -0
  130. package/dist/native/tabs.d.ts +3 -0
  131. package/dist/native/tabs.d.ts.map +1 -0
  132. package/dist/native/tabs.js +4 -0
  133. package/dist/native/tabs.js.map +1 -0
  134. package/dist/native/text-field.android.d.ts +1 -0
  135. package/dist/native/text-field.android.d.ts.map +1 -1
  136. package/dist/native/text-field.android.js +13 -0
  137. package/dist/native/text-field.android.js.map +1 -1
  138. package/dist/native/text-field.ios.d.ts +9 -0
  139. package/dist/native/text-field.ios.d.ts.map +1 -0
  140. package/dist/native/text-field.ios.js +52 -0
  141. package/dist/native/text-field.ios.js.map +1 -0
  142. package/dist/native/text-view.ios.d.ts +7 -0
  143. package/dist/native/text-view.ios.d.ts.map +1 -0
  144. package/dist/native/text-view.ios.js +10 -0
  145. package/dist/native/text-view.ios.js.map +1 -0
  146. package/dist/native/toast.android.d.ts +4 -0
  147. package/dist/native/toast.android.d.ts.map +1 -0
  148. package/dist/native/toast.android.js +10 -0
  149. package/dist/native/toast.android.js.map +1 -0
  150. package/dist/native/toast.d.ts +4 -0
  151. package/dist/native/toast.d.ts.map +1 -0
  152. package/dist/native/toast.ios.d.ts +4 -0
  153. package/dist/native/toast.ios.d.ts.map +1 -0
  154. package/dist/native/toast.ios.js +8 -0
  155. package/dist/native/toast.ios.js.map +1 -0
  156. package/dist/native/toast.js +5 -0
  157. package/dist/native/toast.js.map +1 -0
  158. package/dist/vue/components/ChoiceControl.d.ts +101 -0
  159. package/dist/vue/components/ChoiceControl.d.ts.map +1 -0
  160. package/dist/vue/components/ChoiceControl.js +196 -0
  161. package/dist/vue/components/ChoiceControl.js.map +1 -0
  162. package/dist/vue/components/MAccordion.d.ts +109 -0
  163. package/dist/vue/components/MAccordion.d.ts.map +1 -0
  164. package/dist/vue/components/MAccordion.js +83 -0
  165. package/dist/vue/components/MAccordion.js.map +1 -0
  166. package/dist/vue/components/MAlert.d.ts +99 -0
  167. package/dist/vue/components/MAlert.d.ts.map +1 -0
  168. package/dist/vue/components/MAlert.js +126 -0
  169. package/dist/vue/components/MAlert.js.map +1 -0
  170. package/dist/vue/components/MAvatar.d.ts +74 -0
  171. package/dist/vue/components/MAvatar.d.ts.map +1 -0
  172. package/dist/vue/components/MAvatar.js +86 -0
  173. package/dist/vue/components/MAvatar.js.map +1 -0
  174. package/dist/vue/components/MBadge.d.ts +64 -0
  175. package/dist/vue/components/MBadge.d.ts.map +1 -0
  176. package/dist/vue/components/MBadge.js +30 -0
  177. package/dist/vue/components/MBadge.js.map +1 -0
  178. package/dist/vue/components/MButton.d.ts +57 -5
  179. package/dist/vue/components/MButton.d.ts.map +1 -1
  180. package/dist/vue/components/MButton.js +129 -11
  181. package/dist/vue/components/MButton.js.map +1 -1
  182. package/dist/vue/components/MCard.d.ts +23 -5
  183. package/dist/vue/components/MCard.d.ts.map +1 -1
  184. package/dist/vue/components/MCard.js +14 -4
  185. package/dist/vue/components/MCard.js.map +1 -1
  186. package/dist/vue/components/MCheckbox.d.ts +93 -0
  187. package/dist/vue/components/MCheckbox.d.ts.map +1 -0
  188. package/dist/vue/components/MCheckbox.js +26 -0
  189. package/dist/vue/components/MCheckbox.js.map +1 -0
  190. package/dist/vue/components/MChip.d.ts +107 -0
  191. package/dist/vue/components/MChip.d.ts.map +1 -0
  192. package/dist/vue/components/MChip.js +120 -0
  193. package/dist/vue/components/MChip.js.map +1 -0
  194. package/dist/vue/components/MDialog.d.ts +95 -0
  195. package/dist/vue/components/MDialog.d.ts.map +1 -0
  196. package/dist/vue/components/MDialog.js +245 -0
  197. package/dist/vue/components/MDialog.js.map +1 -0
  198. package/dist/vue/components/MEmptyState.d.ts +107 -0
  199. package/dist/vue/components/MEmptyState.d.ts.map +1 -0
  200. package/dist/vue/components/MEmptyState.js +79 -0
  201. package/dist/vue/components/MEmptyState.js.map +1 -0
  202. package/dist/vue/components/MInput.d.ts +62 -7
  203. package/dist/vue/components/MInput.d.ts.map +1 -1
  204. package/dist/vue/components/MInput.js +88 -14
  205. package/dist/vue/components/MInput.js.map +1 -1
  206. package/dist/vue/components/MListItem.d.ts +92 -0
  207. package/dist/vue/components/MListItem.d.ts.map +1 -0
  208. package/dist/vue/components/MListItem.js +53 -0
  209. package/dist/vue/components/MListItem.js.map +1 -0
  210. package/dist/vue/components/MProgress.d.ts +112 -0
  211. package/dist/vue/components/MProgress.d.ts.map +1 -0
  212. package/dist/vue/components/MProgress.js +75 -0
  213. package/dist/vue/components/MProgress.js.map +1 -0
  214. package/dist/vue/components/MRadioGroup.d.ts +93 -0
  215. package/dist/vue/components/MRadioGroup.d.ts.map +1 -0
  216. package/dist/vue/components/MRadioGroup.js +57 -0
  217. package/dist/vue/components/MRadioGroup.js.map +1 -0
  218. package/dist/vue/components/MReveal.d.ts.map +1 -1
  219. package/dist/vue/components/MReveal.js +5 -7
  220. package/dist/vue/components/MReveal.js.map +1 -1
  221. package/dist/vue/components/MScreen.d.ts +18 -0
  222. package/dist/vue/components/MScreen.d.ts.map +1 -1
  223. package/dist/vue/components/MScreen.js +68 -5
  224. package/dist/vue/components/MScreen.js.map +1 -1
  225. package/dist/vue/components/MSegmentedControl.d.ts +85 -0
  226. package/dist/vue/components/MSegmentedControl.d.ts.map +1 -0
  227. package/dist/vue/components/MSegmentedControl.js +172 -0
  228. package/dist/vue/components/MSegmentedControl.js.map +1 -0
  229. package/dist/vue/components/MSelect.d.ts +130 -0
  230. package/dist/vue/components/MSelect.d.ts.map +1 -0
  231. package/dist/vue/components/MSelect.js +158 -0
  232. package/dist/vue/components/MSelect.js.map +1 -0
  233. package/dist/vue/components/MSeparator.d.ts +54 -0
  234. package/dist/vue/components/MSeparator.d.ts.map +1 -0
  235. package/dist/vue/components/MSeparator.js +36 -0
  236. package/dist/vue/components/MSeparator.js.map +1 -0
  237. package/dist/vue/components/MSheet.d.ts +101 -0
  238. package/dist/vue/components/MSheet.d.ts.map +1 -0
  239. package/dist/vue/components/MSheet.js +313 -0
  240. package/dist/vue/components/MSheet.js.map +1 -0
  241. package/dist/vue/components/MSkeleton.d.ts +70 -0
  242. package/dist/vue/components/MSkeleton.d.ts.map +1 -0
  243. package/dist/vue/components/MSkeleton.js +87 -0
  244. package/dist/vue/components/MSkeleton.js.map +1 -0
  245. package/dist/vue/components/MSlider.d.ts +1 -1
  246. package/dist/vue/components/MSlider.d.ts.map +1 -1
  247. package/dist/vue/components/MSlider.js +2 -1
  248. package/dist/vue/components/MSlider.js.map +1 -1
  249. package/dist/vue/components/MSwitch.d.ts +79 -0
  250. package/dist/vue/components/MSwitch.d.ts.map +1 -0
  251. package/dist/vue/components/MSwitch.js +163 -0
  252. package/dist/vue/components/MSwitch.js.map +1 -0
  253. package/dist/vue/components/MTabs.d.ts +91 -0
  254. package/dist/vue/components/MTabs.d.ts.map +1 -0
  255. package/dist/vue/components/MTabs.js +245 -0
  256. package/dist/vue/components/MTabs.js.map +1 -0
  257. package/dist/vue/components/MText.d.ts +16 -7
  258. package/dist/vue/components/MText.d.ts.map +1 -1
  259. package/dist/vue/components/MText.js +43 -17
  260. package/dist/vue/components/MText.js.map +1 -1
  261. package/dist/vue/components/MToast.d.ts +23 -0
  262. package/dist/vue/components/MToast.d.ts.map +1 -0
  263. package/dist/vue/components/MToast.js +242 -0
  264. package/dist/vue/components/MToast.js.map +1 -0
  265. package/dist/vue/index.d.ts +31 -4
  266. package/dist/vue/index.d.ts.map +1 -1
  267. package/dist/vue/index.js +48 -4
  268. package/dist/vue/index.js.map +1 -1
  269. package/dist/vue/layers.d.ts +19 -0
  270. package/dist/vue/layers.d.ts.map +1 -0
  271. package/dist/vue/layers.js +26 -0
  272. package/dist/vue/layers.js.map +1 -0
  273. package/dist/vue/native-view.d.ts +6 -0
  274. package/dist/vue/native-view.d.ts.map +1 -0
  275. package/dist/vue/native-view.js +5 -0
  276. package/dist/vue/native-view.js.map +1 -0
  277. package/dist/vue/props.d.ts +12 -11
  278. package/dist/vue/props.d.ts.map +1 -1
  279. package/dist/vue/props.js +25 -10
  280. package/dist/vue/props.js.map +1 -1
  281. package/dist/vue/reveal-motion.d.ts +13 -0
  282. package/dist/vue/reveal-motion.d.ts.map +1 -0
  283. package/dist/vue/reveal-motion.js +55 -0
  284. package/dist/vue/reveal-motion.js.map +1 -0
  285. package/dist/vue/system-back.d.ts +11 -0
  286. package/dist/vue/system-back.d.ts.map +1 -0
  287. package/dist/vue/system-back.js +2 -0
  288. package/dist/vue/system-back.js.map +1 -0
  289. package/dist/vue/use-motion-surface.d.ts +8 -0
  290. package/dist/vue/use-motion-surface.d.ts.map +1 -0
  291. package/dist/vue/use-motion-surface.js +75 -0
  292. package/dist/vue/use-motion-surface.js.map +1 -0
  293. package/dist/vue/use-press.d.ts +1 -1
  294. package/dist/vue/use-press.d.ts.map +1 -1
  295. package/dist/vue/use-press.js +12 -4
  296. package/dist/vue/use-press.js.map +1 -1
  297. package/dist/vue/use-scroll-motion.d.ts +7 -0
  298. package/dist/vue/use-scroll-motion.d.ts.map +1 -0
  299. package/dist/vue/use-scroll-motion.js +30 -0
  300. package/dist/vue/use-scroll-motion.js.map +1 -0
  301. package/package.json +3 -3
  302. package/platforms/android/java/com/mavis/ui/Box.java +38 -3
  303. package/platforms/android/java/com/mavis/ui/ContentWidth.java +77 -0
  304. package/platforms/android/java/com/mavis/ui/FlexLayout.java +80 -4
  305. package/platforms/android/java/com/mavis/ui/MeasureMemo.java +145 -0
  306. package/platforms/android/java/com/mavis/ui/Screen.java +108 -0
  307. package/src/native/avatar-image.ts +9 -0
  308. package/src/native/avatar-label.android.ts +14 -0
  309. package/src/native/avatar-label.ts +1 -0
  310. package/src/native/box.ios.ts +48 -1
  311. package/src/native/button.ios.ts +53 -1
  312. package/src/native/checkbox.android.ts +35 -0
  313. package/src/native/checkbox.ts +9 -0
  314. package/src/native/composed-button.android.ts +74 -0
  315. package/src/native/composed-button.ts +9 -0
  316. package/src/native/dialog.android.ts +56 -0
  317. package/src/native/dialog.ios.ts +23 -0
  318. package/src/native/dialog.ts +10 -0
  319. package/src/native/dynamic-type.ts +71 -0
  320. package/src/native/flex-layout.ios.ts +113 -0
  321. package/src/native/input-action.ts +15 -0
  322. package/src/native/keyboard-dismiss.android.ts +17 -0
  323. package/src/native/keyboard-dismiss.ios.ts +124 -0
  324. package/src/native/keyboard-dismiss.ts +14 -0
  325. package/src/native/label.android.ts +27 -0
  326. package/src/native/label.ios.ts +54 -1
  327. package/src/native/measure-memo.ts +116 -0
  328. package/src/native/motion-surface.ts +137 -0
  329. package/src/native/press.ts +52 -10
  330. package/src/native/progress.ts +78 -0
  331. package/src/native/screen.android.ts +12 -0
  332. package/src/native/screen.ts +2 -0
  333. package/src/native/scroll-motion.ts +101 -0
  334. package/src/native/segmented.ts +95 -0
  335. package/src/native/sheet.android.ts +24 -0
  336. package/src/native/sheet.ios.ts +52 -0
  337. package/src/native/sheet.ts +26 -0
  338. package/src/native/tabs.android.ts +58 -0
  339. package/src/native/tabs.ts +8 -0
  340. package/src/native/text-field.android.ts +19 -0
  341. package/src/native/text-field.ios.ts +53 -0
  342. package/src/native/text-view.ios.ts +10 -0
  343. package/src/native/toast.android.ts +9 -0
  344. package/src/native/toast.ios.ts +13 -0
  345. package/src/native/toast.ts +6 -0
  346. package/src/vue/components/ChoiceControl.ts +238 -0
  347. package/src/vue/components/MAccordion.ts +123 -0
  348. package/src/vue/components/MAlert.ts +156 -0
  349. package/src/vue/components/MAvatar.ts +103 -0
  350. package/src/vue/components/MBadge.ts +34 -0
  351. package/src/vue/components/MButton.ts +176 -9
  352. package/src/vue/components/MCard.ts +23 -3
  353. package/src/vue/components/MCheckbox.ts +25 -0
  354. package/src/vue/components/MChip.ts +134 -0
  355. package/src/vue/components/MDialog.ts +312 -0
  356. package/src/vue/components/MEmptyState.ts +96 -0
  357. package/src/vue/components/MInput.ts +96 -12
  358. package/src/vue/components/MListItem.ts +66 -0
  359. package/src/vue/components/MProgress.ts +94 -0
  360. package/src/vue/components/MRadioGroup.ts +64 -0
  361. package/src/vue/components/MReveal.ts +6 -7
  362. package/src/vue/components/MScreen.ts +93 -5
  363. package/src/vue/components/MSegmentedControl.ts +214 -0
  364. package/src/vue/components/MSelect.ts +185 -0
  365. package/src/vue/components/MSeparator.ts +40 -0
  366. package/src/vue/components/MSheet.ts +375 -0
  367. package/src/vue/components/MSkeleton.ts +100 -0
  368. package/src/vue/components/MSlider.ts +7 -1
  369. package/src/vue/components/MSwitch.ts +187 -0
  370. package/src/vue/components/MTabs.ts +302 -0
  371. package/src/vue/components/MText.ts +37 -6
  372. package/src/vue/components/MToast.ts +289 -0
  373. package/src/vue/index.ts +90 -4
  374. package/src/vue/layers.ts +48 -0
  375. package/src/vue/native-view.ts +6 -0
  376. package/src/vue/props.ts +37 -12
  377. package/src/vue/reveal-motion.ts +61 -0
  378. package/src/vue/system-back.ts +12 -0
  379. package/src/vue/use-motion-surface.ts +77 -0
  380. package/src/vue/use-press.ts +12 -4
  381. package/src/vue/use-scroll-motion.ts +31 -0
  382. package/dist/native/input-description.android.d.ts +0 -4
  383. package/dist/native/input-description.android.d.ts.map +0 -1
  384. package/dist/native/input-description.android.js +0 -18
  385. package/dist/native/input-description.android.js.map +0 -1
  386. package/dist/theme/resolve.d.ts +0 -3
  387. package/dist/theme/resolve.d.ts.map +0 -1
  388. package/dist/theme/resolve.js +0 -8
  389. package/dist/theme/resolve.js.map +0 -1
  390. package/dist/theme/themes.d.ts +0 -6
  391. package/dist/theme/themes.d.ts.map +0 -1
  392. package/dist/theme/themes.js +0 -83
  393. package/dist/theme/themes.js.map +0 -1
  394. package/dist/theme/types.d.ts +0 -50
  395. package/dist/theme/types.d.ts.map +0 -1
  396. package/dist/theme/types.js +0 -2
  397. package/dist/theme/types.js.map +0 -1
  398. package/dist/vue/global-components.d.ts +0 -21
  399. package/dist/vue/global-components.d.ts.map +0 -1
  400. package/dist/vue/global-components.js +0 -2
  401. package/dist/vue/global-components.js.map +0 -1
  402. package/dist/vue/layout-context.d.ts +0 -5
  403. package/dist/vue/layout-context.d.ts.map +0 -1
  404. package/dist/vue/layout-context.js +0 -7
  405. package/dist/vue/layout-context.js.map +0 -1
  406. package/dist/vue/text-content.d.ts +0 -4
  407. package/dist/vue/text-content.d.ts.map +0 -1
  408. package/dist/vue/text-content.js +0 -17
  409. package/dist/vue/text-content.js.map +0 -1
  410. package/dist/vue/theme.d.ts +0 -177
  411. package/dist/vue/theme.d.ts.map +0 -1
  412. package/dist/vue/theme.js +0 -17
  413. package/dist/vue/theme.js.map +0 -1
@@ -0,0 +1,185 @@
1
+ import {
2
+ computed,
3
+ defineComponent,
4
+ h,
5
+ mergeProps,
6
+ onBeforeUnmount,
7
+ ref,
8
+ watch,
9
+ } from 'nativescript-vue'
10
+ import { Utils, isAndroid, type EventData, type View } from '@nativescript/core'
11
+ import { canChoose, choiceKey, validateChoices, type ChoiceOption } from '@getcortexlabs/mavis-core'
12
+ import {
13
+ useButtonAction,
14
+ selectProps,
15
+ selectEmits,
16
+ useMavisTheme,
17
+ } from '@getcortexlabs/mavis-core/vue'
18
+ import { observeCheckbox } from '../../native/checkbox'
19
+ import { MColumn, MBox } from './layout.js'
20
+ import { MText } from './MText.js'
21
+ import { MButton } from './MButton.js'
22
+ import { MIcon } from './MIcon.js'
23
+ import { MSheet } from './MSheet.js'
24
+ import { ChoiceControl } from './ChoiceControl.js'
25
+
26
+ export const MSelect = defineComponent({
27
+ name: 'MSelect',
28
+ inheritAttrs: false,
29
+ props: selectProps,
30
+ emits: selectEmits,
31
+ setup(props, { attrs, emit }) {
32
+ useButtonAction()
33
+ const { theme } = useMavisTheme()
34
+ const open = ref(false)
35
+ const focused = ref(false)
36
+ let observer: ReturnType<typeof observeCheckbox> | undefined
37
+ const options = computed(() => {
38
+ validateChoices(props.options, props.modelValue)
39
+ return props.options
40
+ })
41
+ function unload() {
42
+ open.value = false
43
+ observer?.dispose()
44
+ observer = undefined
45
+ focused.value = false
46
+ }
47
+ onBeforeUnmount(unload)
48
+ watch(
49
+ () => props.disabled,
50
+ (disabled) => {
51
+ if (disabled) open.value = false
52
+ },
53
+ )
54
+ function show() {
55
+ if (props.disabled || open.value) return
56
+ Utils.dismissKeyboard()
57
+ open.value = true
58
+ }
59
+ function choose(option: ChoiceOption) {
60
+ // Resolve the live option again: removal or disabling while open must win over an old tap.
61
+ const current = options.value.find((item) => item.value === option.value)
62
+ if (!open.value || props.disabled || !current || current.disabled) return
63
+ if (canChoose(current, props.modelValue)) emit('update:modelValue', current.value)
64
+ open.value = false
65
+ }
66
+ return () => {
67
+ const { colors, typography } = theme.value
68
+ const selected = options.value.find((option) => option.value === props.modelValue)
69
+ const message = props.error || props.helperText
70
+ const active = open.value || focused.value
71
+ return h(
72
+ MColumn,
73
+ mergeProps(attrs, {
74
+ width: props.width,
75
+ grow: props.grow,
76
+ shrink: props.shrink,
77
+ gap: 'sm',
78
+ accessibilityHidden: props.accessibilityHidden,
79
+ onUnloaded: unload,
80
+ }),
81
+ {
82
+ default: () => [
83
+ h(MText, {
84
+ text: props.label,
85
+ variant: 'caption',
86
+ style: { fontWeight: '600' },
87
+ accessibilityHidden: true,
88
+ onTap: show,
89
+ }),
90
+ h(
91
+ MBox,
92
+ {},
93
+ {
94
+ default: () => [
95
+ h(MButton, {
96
+ id: props.id,
97
+ text: selected?.label ?? props.placeholder,
98
+ variant: 'secondary',
99
+ disabled: props.disabled,
100
+ accessibilityLabel: props.label,
101
+ accessibilityHint: message,
102
+ style: {
103
+ textAlignment: 'left',
104
+ fontSize: typography.body.fontSize,
105
+ fontWeight: '400',
106
+ paddingLeft: 16,
107
+ paddingRight: 48,
108
+ paddingTop: 14,
109
+ paddingBottom: 14,
110
+ backgroundColor: colors.surface,
111
+ color: selected ? colors.text : colors.muted,
112
+ borderWidth: 2,
113
+ borderColor: props.error
114
+ ? colors.danger
115
+ : active
116
+ ? colors.primary
117
+ : colors.border,
118
+ },
119
+ onClick: show,
120
+ onLoaded: (event: EventData) => {
121
+ observer?.dispose()
122
+ observer = observeCheckbox(event.object as View, (value) => {
123
+ focused.value = value
124
+ })
125
+ },
126
+ onUnloaded: unload,
127
+ }),
128
+ h(MIcon, {
129
+ name: 'chevron-down',
130
+ tone: props.error ? 'danger' : active ? 'primary' : 'muted',
131
+ isUserInteractionEnabled: false,
132
+ style: {
133
+ horizontalAlignment: 'right',
134
+ verticalAlignment: 'middle',
135
+ marginRight: 16,
136
+ opacity: props.disabled ? 0.45 : 1,
137
+ },
138
+ }),
139
+ ],
140
+ },
141
+ ),
142
+ message
143
+ ? h(MText, {
144
+ text: message,
145
+ variant: 'caption',
146
+ tone: props.error ? 'danger' : 'muted',
147
+ })
148
+ : null,
149
+ h(
150
+ MSheet,
151
+ {
152
+ open: open.value,
153
+ title: props.label,
154
+ closeLabel: props.closeLabel,
155
+ gap: 'sm',
156
+ 'onUpdate:open': (value: boolean) => {
157
+ open.value = value && !props.disabled
158
+ },
159
+ },
160
+ {
161
+ default: () =>
162
+ options.value.length
163
+ ? options.value.map((option) =>
164
+ h(ChoiceControl, {
165
+ key: choiceKey(option.value),
166
+ radio: true,
167
+ // Mark feedback blocks drags from reaching the nested Android ScrollView.
168
+ // Keep the native button gesture there; the field and Sheet still animate.
169
+ pressFeedback: !isAndroid,
170
+ label: option.label,
171
+ helperText: option.helperText,
172
+ modelValue: option.value === props.modelValue,
173
+ disabled: props.disabled || option.disabled,
174
+ onActivate: () => choose(option),
175
+ }),
176
+ )
177
+ : h(MText, { text: props.emptyText, tone: 'muted' }),
178
+ },
179
+ ),
180
+ ],
181
+ },
182
+ )
183
+ }
184
+ },
185
+ })
@@ -0,0 +1,40 @@
1
+ import { defineComponent, h, mergeProps } from 'nativescript-vue'
2
+ import { separatorProps, useMavisTheme } from '@getcortexlabs/mavis-core/vue'
3
+ import { resolveSpace } from '@getcortexlabs/mavis-core'
4
+ import { MBox } from './layout.js'
5
+
6
+ export const MSeparator = defineComponent({
7
+ name: 'MSeparator',
8
+ inheritAttrs: false,
9
+ props: separatorProps,
10
+ setup(props, { attrs }) {
11
+ const { theme } = useMavisTheme()
12
+ return () => {
13
+ const vertical = props.orientation === 'vertical'
14
+ const spacing = resolveSpace(theme.value, props.spacing)
15
+ const inset = resolveSpace(theme.value, props.inset)
16
+ const x = vertical ? spacing : inset,
17
+ y = vertical ? inset : spacing
18
+ return h(
19
+ MBox,
20
+ mergeProps(attrs, {
21
+ id: props.id,
22
+ width: vertical ? 1 : props.length,
23
+ height: vertical ? props.length : 1,
24
+ shrink: 0,
25
+ backgroundColor: theme.value.colors.border,
26
+ accessible: false,
27
+ accessibilityHidden: true,
28
+ isUserInteractionEnabled: false,
29
+ style: {
30
+ alignSelf: props.length === undefined ? 'stretch' : 'center',
31
+ marginLeft: x,
32
+ marginRight: x,
33
+ marginTop: y,
34
+ marginBottom: y,
35
+ },
36
+ }),
37
+ )
38
+ }
39
+ },
40
+ })
@@ -0,0 +1,375 @@
1
+ import { computed } from 'nativescript-vue'
2
+ import { useButtonAction, useCachedActivity } from '@getcortexlabs/mavis-core/vue'
3
+ import {
4
+ defineComponent,
5
+ getCurrentInstance,
6
+ h,
7
+ inject,
8
+ onBeforeUnmount,
9
+ onMounted,
10
+ provide,
11
+ ref,
12
+ registerElement,
13
+ shallowRef,
14
+ watch,
15
+ type ExtractPropTypes,
16
+ type PropType,
17
+ type Ref,
18
+ type VNodeChild,
19
+ } from 'nativescript-vue'
20
+ import { bottomSheet, GestureSurface, type BottomSheet } from '@rafaelaugusto/jolt/bottom-sheet'
21
+ import {
22
+ sheetProps,
23
+ sheetEmits,
24
+ useMavisTheme,
25
+ type MavisThemeContext,
26
+ } from '@getcortexlabs/mavis-core/vue'
27
+ import { checkSheetName, type SheetName, type SheetCloseReason } from '@getcortexlabs/mavis-core'
28
+ import { isAndroid, type EventData, type ScrollView, type View } from '@nativescript/core'
29
+ import { MRow, MColumn, MBox } from './layout.js'
30
+ import { MText } from './MText.js'
31
+ import { MButton } from './MButton.js'
32
+ import { useLayerHost } from '../layers.js'
33
+ import { nativeViewOf } from '../native-view.js'
34
+ import { systemBackKey } from '../system-back.js'
35
+ import { watchBack, setModal, safeAreaOf, contentInsets } from '../../native/sheet'
36
+ import { notifyAccessibilityLayout } from '../../native/accessibility-layout'
37
+
38
+ registerElement('MavisSheetPanel', () => GestureSurface, { viewFlags: 4 })
39
+
40
+ type SheetState = ExtractPropTypes<typeof sheetProps>
41
+ type Element<T extends View = View> = { nativeView: T }
42
+
43
+ interface Bridge {
44
+ context: MavisThemeContext
45
+ state: SheetState
46
+ content: () => VNodeChild
47
+ provides: Record<PropertyKey, unknown>
48
+ presented: Ref<boolean>
49
+ requestClose(reason: SheetCloseReason): void
50
+ dismissed(reason: SheetCloseReason): void
51
+ reopened(): void
52
+ settled(): void
53
+ }
54
+
55
+ /** Content rendered by the Screen still resolves injections from the sheet's own position. */
56
+ function bridgeProvides(source: Record<PropertyKey, unknown>) {
57
+ const seen = new Set<PropertyKey>()
58
+ for (
59
+ let chain: object | null = source;
60
+ chain && chain !== Object.prototype;
61
+ chain = Object.getPrototypeOf(chain)
62
+ ) {
63
+ for (const key of [
64
+ ...Object.getOwnPropertyNames(chain),
65
+ ...Object.getOwnPropertySymbols(chain),
66
+ ]) {
67
+ if (seen.has(key)) continue
68
+ seen.add(key)
69
+ provide(key as string | symbol, (chain as Record<PropertyKey, unknown>)[key])
70
+ }
71
+ }
72
+ }
73
+
74
+ function focusAccessibility(view: View | undefined) {
75
+ if (!view?.isLoaded) return
76
+ if (isAndroid) view.android.performAccessibilityAction(64, null)
77
+ else notifyAccessibilityLayout(view)
78
+ }
79
+
80
+ const SheetLayer = defineComponent({
81
+ name: 'MSheetLayer',
82
+ props: { bridge: { type: Object as PropType<Bridge>, required: true } },
83
+ setup(props) {
84
+ useButtonAction()
85
+ const bridge = props.bridge
86
+ bridgeProvides(bridge.provides)
87
+ const { theme } = bridge.context
88
+ const claimSystemBack = inject(systemBackKey, undefined)
89
+ const panel = shallowRef<Element<GestureSurface>>()
90
+ const handle = shallowRef<Element>()
91
+ const scroll = shallowRef<Element<ScrollView>>()
92
+ const backdrop = shallowRef<Element>()
93
+ // The surface covers the window edges; content clears the home indicator and landscape notch.
94
+ const insets = ref({ left: 0, right: 0, bottom: 0 })
95
+ let title: View | undefined
96
+ let sheet: BottomSheet | undefined
97
+ let pending: SheetCloseReason | undefined
98
+ let requested = false
99
+ let releaseBack = () => {}
100
+ let releaseClaim = () => {}
101
+
102
+ function updateInsets() {
103
+ const host = nativeViewOf(panel.value)?.parent as View | undefined
104
+ if (!host) return
105
+ const next = contentInsets(host)
106
+ const current = insets.value
107
+ if (
108
+ next.left !== current.left ||
109
+ next.right !== current.right ||
110
+ next.bottom !== current.bottom
111
+ )
112
+ insets.value = next
113
+ }
114
+
115
+ function dispose() {
116
+ releaseBack()
117
+ releaseClaim()
118
+ releaseBack = releaseClaim = () => {}
119
+ const current = sheet
120
+ sheet = undefined
121
+ current?.dispose()
122
+ }
123
+ function present() {
124
+ const views = {
125
+ panel: nativeViewOf(panel.value),
126
+ handle: nativeViewOf(handle.value),
127
+ scroll: nativeViewOf(scroll.value),
128
+ backdrop: nativeViewOf(backdrop.value),
129
+ }
130
+ if (sheet || !views.panel || !views.handle || !views.scroll || !views.backdrop) return
131
+ const state = bridge.state
132
+ const host = views.panel.parent as View
133
+ updateInsets()
134
+ pending = undefined
135
+ requested = false
136
+ const back = () => {
137
+ if (!sheet?.isOpen) return
138
+ if (!state.dismissible) return
139
+ pending = 'back'
140
+ sheet.dismiss()
141
+ }
142
+ // Core's own navigation honors the cancelled event; a router that owns back asks the claimant first.
143
+ releaseBack = watchBack((event) => {
144
+ if (sheet?.isOpen) event.cancel = true
145
+ back()
146
+ })
147
+ releaseClaim = claimSystemBack?.({ owns: () => Boolean(sheet?.isOpen), back }) ?? (() => {})
148
+ setModal(views.panel, true)
149
+ let opened = false
150
+ sheet = bottomSheet(views.panel, {
151
+ handle: views.handle,
152
+ scrollView: views.scroll,
153
+ backdrop: views.backdrop,
154
+ safeArea: safeAreaOf(host),
155
+ snap: [state.fullscreen ? '100%' : 'content'],
156
+ dismissible: state.dismissible,
157
+ accessibility: {
158
+ label: checkSheetName(state.title, state.accessibilityLabel),
159
+ dismiss: state.closeLabel,
160
+ },
161
+ onChange(point) {
162
+ if (point === null) {
163
+ if (!requested) bridge.dismissed(pending ?? 'swipe')
164
+ pending = undefined
165
+ opened = false
166
+ return
167
+ }
168
+ requested = false
169
+ bridge.reopened()
170
+ if (!opened) focusAccessibility(title)
171
+ opened = true
172
+ },
173
+ onDismiss: () => bridge.settled(),
174
+ })
175
+ sheet.open()
176
+ }
177
+
178
+ onMounted(() => {
179
+ if (bridge.presented.value) present()
180
+ })
181
+ watch(
182
+ () => bridge.presented.value,
183
+ (presented) => {
184
+ if (presented) present()
185
+ },
186
+ { flush: 'post' },
187
+ )
188
+ watch(
189
+ () => bridge.presented.value,
190
+ (presented) => {
191
+ if (!presented) dispose()
192
+ },
193
+ )
194
+ watch(
195
+ () => bridge.state.open,
196
+ (open) => {
197
+ if (!open && sheet) {
198
+ requested = true
199
+ sheet.dismiss()
200
+ }
201
+ },
202
+ )
203
+ onBeforeUnmount(dispose)
204
+
205
+ return () => {
206
+ if (!bridge.presented.value) return null
207
+ const state = bridge.state
208
+ const { colors, radius } = theme.value
209
+ const name = checkSheetName(state.title, state.accessibilityLabel)
210
+ const heading = state.title?.trim()
211
+ const header =
212
+ heading || state.dismissible
213
+ ? h(
214
+ MRow,
215
+ { row: 1, paddingX: 'lg', paddingY: 'sm', gap: 'sm', justify: 'between' },
216
+ {
217
+ default: () => [
218
+ heading
219
+ ? h(MText, {
220
+ as: 'h2',
221
+ variant: 'heading',
222
+ grow: 1,
223
+ text: heading,
224
+ onLoaded: (event: EventData) => {
225
+ title = event.object as View
226
+ },
227
+ })
228
+ : h(MBox, { grow: 1 }),
229
+ state.dismissible
230
+ ? h(MButton, {
231
+ variant: 'ghost',
232
+ size: 'sm',
233
+ icon: 'x',
234
+ shrink: 0,
235
+ accessibilityLabel: state.closeLabel,
236
+ onClick: () => bridge.requestClose('button'),
237
+ })
238
+ : null,
239
+ ],
240
+ },
241
+ )
242
+ : null
243
+ return [
244
+ h('MavisBox', {
245
+ ref: backdrop,
246
+ backgroundColor: '#000000',
247
+ accessible: false,
248
+ accessibilityHidden: true,
249
+ onTap: () => {
250
+ if (state.dismissible) pending = 'backdrop'
251
+ },
252
+ }),
253
+ h(
254
+ 'MavisSheetPanel',
255
+ {
256
+ ref: panel,
257
+ id: state.id,
258
+ accessibilityLabel: name,
259
+ onLayoutChanged: updateInsets,
260
+ style: {
261
+ backgroundColor: colors.surface,
262
+ borderTopLeftRadius: radius.lg,
263
+ borderTopRightRadius: radius.lg,
264
+ paddingLeft: insets.value.left,
265
+ paddingRight: insets.value.right,
266
+ paddingBottom: insets.value.bottom,
267
+ },
268
+ },
269
+ [
270
+ h('GridLayout', { rows: 'auto,auto,*' }, [
271
+ h('GridLayout', { ref: handle, accessibilityLabel: name, row: 0, height: 24 }, [
272
+ h('MavisBox', {
273
+ width: 36,
274
+ height: 5,
275
+ borderRadius: 3,
276
+ backgroundColor: colors.border,
277
+ horizontalAlignment: 'center',
278
+ verticalAlignment: 'middle',
279
+ }),
280
+ ]),
281
+ header,
282
+ // Reserve the handle/header before measuring the viewport. A flex child's
283
+ // initial measurement can otherwise retain the full panel height on Android.
284
+ h('ScrollView', { ref: scroll, row: 2 }, [
285
+ h(
286
+ MColumn,
287
+ { padding: state.padding, gap: state.gap, align: state.align },
288
+ { default: () => bridge.content() },
289
+ ),
290
+ ]),
291
+ ]),
292
+ ],
293
+ ),
294
+ ]
295
+ }
296
+ },
297
+ })
298
+
299
+ const Sheet = defineComponent({
300
+ name: 'MSheet',
301
+ inheritAttrs: false,
302
+ props: sheetProps,
303
+ emits: sheetEmits,
304
+ setup(props, { slots, emit }) {
305
+ const host = useLayerHost('MSheet')
306
+ const active = useCachedActivity()
307
+ checkSheetName(props.title, props.accessibilityLabel)
308
+ // Vue keeps the injection chain on the instance without declaring it in its public types.
309
+ const provides =
310
+ (getCurrentInstance() as { provides?: Record<PropertyKey, unknown> } | null)?.provides ?? {}
311
+ const presented = ref(false)
312
+ let closing: SheetCloseReason | undefined
313
+ const announce = (reason: SheetCloseReason) => {
314
+ closing = reason
315
+ emit('update:open', false)
316
+ emit('close', reason)
317
+ }
318
+ watch(active, (value) => {
319
+ if (!value) {
320
+ presented.value = false
321
+ if (props.open) announce('program')
322
+ }
323
+ })
324
+ const bridge: Bridge = {
325
+ context: useMavisTheme(),
326
+ state: props,
327
+ content: () => slots.default?.(),
328
+ provides,
329
+ presented,
330
+ requestClose(reason) {
331
+ if (props.open && !closing) announce(reason)
332
+ },
333
+ dismissed(reason) {
334
+ if (!closing) announce(reason)
335
+ },
336
+ reopened() {
337
+ closing = undefined
338
+ if (!props.open) emit('update:open', true)
339
+ },
340
+ settled() {
341
+ presented.value = false
342
+ closing = undefined
343
+ },
344
+ }
345
+ watch(
346
+ () => props.open,
347
+ (open) => {
348
+ if (open) {
349
+ closing = undefined
350
+ presented.value = true
351
+ } else if (presented.value && !closing) {
352
+ closing = 'program'
353
+ emit('close', 'program')
354
+ }
355
+ },
356
+ { immediate: true },
357
+ )
358
+ onBeforeUnmount(
359
+ host.add({
360
+ component: SheetLayer,
361
+ props: { bridge },
362
+ presented: computed(() => active.value && presented.value),
363
+ }),
364
+ )
365
+ return () => {
366
+ // An unnamed sheet fails where it is declared, not in the Screen's render.
367
+ checkSheetName(props.title, props.accessibilityLabel)
368
+ return null
369
+ }
370
+ },
371
+ })
372
+
373
+ export const MSheet = Sheet as typeof Sheet & {
374
+ new (): InstanceType<typeof Sheet> & { $props: SheetName }
375
+ }
@@ -0,0 +1,100 @@
1
+ import { defineComponent, h, mergeProps, onBeforeUnmount, watch } from 'nativescript-vue'
2
+ import { Application, type EventData, type View } from '@nativescript/core'
3
+ import { animate, onReducedMotion, reducedMotion, set } from '@rafaelaugusto/jolt'
4
+ import { skeletonProps, useMavisTheme } from '@getcortexlabs/mavis-core/vue'
5
+ import { MBox } from './layout.js'
6
+
7
+ export const MSkeleton = defineComponent({
8
+ name: 'MSkeleton',
9
+ inheritAttrs: false,
10
+ props: skeletonProps,
11
+ setup(props, { attrs }) {
12
+ const { theme } = useMavisTheme()
13
+ let view: View | undefined
14
+ let motion: ReturnType<typeof animate> | undefined
15
+ let pending: ReturnType<typeof setTimeout> | undefined
16
+ let offMotion: (() => void) | undefined
17
+ let suspended = Application.suspended
18
+
19
+ function stop() {
20
+ clearTimeout(pending)
21
+ pending = undefined
22
+ motion?.stop()
23
+ motion = undefined
24
+ if (view) set(view, { opacity: 1 })
25
+ }
26
+ function update() {
27
+ if (!view || suspended || !props.animated || reducedMotion()) {
28
+ stop()
29
+ return
30
+ }
31
+ if (motion || pending !== undefined) return
32
+ // Let loaded finish syncing native styles before attaching the opacity animation.
33
+ pending = setTimeout(() => {
34
+ pending = undefined
35
+ if (!view || suspended || !props.animated || reducedMotion()) return
36
+ motion = animate(
37
+ view,
38
+ { opacity: [1, 0.45, 1] },
39
+ { duration: 1600, ease: 'easeInOut', repeat: Infinity },
40
+ )
41
+ }, 0)
42
+ }
43
+
44
+ function suspend() {
45
+ suspended = true
46
+ stop()
47
+ }
48
+ function resume() {
49
+ suspended = false
50
+ update()
51
+ }
52
+ function release() {
53
+ stop()
54
+ offMotion?.()
55
+ offMotion = undefined
56
+ Application.off(Application.suspendEvent, suspend)
57
+ Application.off(Application.resumeEvent, resume)
58
+ view = undefined
59
+ }
60
+ function loaded(event: EventData) {
61
+ release()
62
+ view = event.object as View
63
+ suspended = Application.suspended
64
+ offMotion = onReducedMotion(update)
65
+ Application.on(Application.suspendEvent, suspend)
66
+ Application.on(Application.resumeEvent, resume)
67
+ update()
68
+ }
69
+ watch(() => props.animated, update, { flush: 'post' })
70
+ onBeforeUnmount(release)
71
+
72
+ return () =>
73
+ h(
74
+ MBox,
75
+ mergeProps(
76
+ {
77
+ style: {
78
+ alignSelf:
79
+ props.width === undefined || props.width === 'auto' ? 'stretch' : 'flex-start',
80
+ },
81
+ },
82
+ attrs,
83
+ {
84
+ id: props.id,
85
+ width: props.width,
86
+ height: props.height,
87
+ radius: props.radius,
88
+ grow: props.grow,
89
+ shrink: props.shrink,
90
+ backgroundColor: theme.value.colors.border,
91
+ accessible: false,
92
+ accessibilityHidden: true,
93
+ isUserInteractionEnabled: false,
94
+ onLoaded: loaded,
95
+ onUnloaded: release,
96
+ },
97
+ ),
98
+ )
99
+ },
100
+ })