@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.
- package/README.md +9 -5
- package/dist/app-icons.d.ts +26 -0
- package/dist/app-icons.d.ts.map +1 -0
- package/dist/app-icons.js +9 -0
- package/dist/app-icons.js.map +1 -0
- package/dist/date-format.d.ts +3 -0
- package/dist/date-format.d.ts.map +1 -0
- package/dist/date-format.js +2 -0
- package/dist/date-format.js.map +1 -0
- package/dist/files.d.ts +4 -0
- package/dist/files.d.ts.map +1 -0
- package/dist/files.js +3 -0
- package/dist/files.js.map +1 -0
- package/dist/native/app-icons.android.d.ts +4 -0
- package/dist/native/app-icons.android.d.ts.map +1 -0
- package/dist/native/app-icons.android.js +67 -0
- package/dist/native/app-icons.android.js.map +1 -0
- package/dist/native/app-icons.d.ts +4 -0
- package/dist/native/app-icons.d.ts.map +1 -0
- package/dist/native/app-icons.ios.d.ts +4 -0
- package/dist/native/app-icons.ios.d.ts.map +1 -0
- package/dist/native/app-icons.ios.js +45 -0
- package/dist/native/app-icons.ios.js.map +1 -0
- package/dist/native/app-icons.js +9 -0
- package/dist/native/app-icons.js.map +1 -0
- package/dist/native/appearance.android.d.ts +4 -0
- package/dist/native/appearance.android.d.ts.map +1 -0
- package/dist/native/appearance.android.js +55 -0
- package/dist/native/appearance.android.js.map +1 -0
- package/dist/native/appearance.d.ts +4 -0
- package/dist/native/appearance.d.ts.map +1 -0
- package/dist/native/appearance.js +31 -0
- package/dist/native/appearance.js.map +1 -0
- package/dist/native/avatar-image.d.ts +4 -0
- package/dist/native/avatar-image.d.ts.map +1 -0
- package/dist/native/avatar-image.js +12 -0
- package/dist/native/avatar-image.js.map +1 -0
- package/dist/native/avatar-label.android.d.ts +9 -0
- package/dist/native/avatar-label.android.d.ts.map +1 -0
- package/dist/native/avatar-label.android.js +9 -0
- package/dist/native/avatar-label.android.js.map +1 -0
- package/dist/native/avatar-label.d.ts +2 -0
- package/dist/native/avatar-label.d.ts.map +1 -0
- package/dist/native/avatar-label.js +2 -0
- package/dist/native/avatar-label.js.map +1 -0
- package/dist/native/box.android.d.ts +5 -0
- package/dist/native/box.android.d.ts.map +1 -0
- package/dist/native/box.android.js +7 -0
- package/dist/native/box.android.js.map +1 -0
- package/dist/native/box.d.ts +2 -0
- package/dist/native/box.d.ts.map +1 -0
- package/dist/native/box.ios.d.ts +10 -0
- package/dist/native/box.ios.d.ts.map +1 -0
- package/dist/native/box.ios.js +40 -0
- package/dist/native/box.ios.js.map +1 -0
- package/dist/native/box.js +3 -0
- package/dist/native/box.js.map +1 -0
- package/dist/native/button.android.d.ts +11 -0
- package/dist/native/button.android.d.ts.map +1 -0
- package/dist/native/button.android.js +31 -0
- package/dist/native/button.android.js.map +1 -0
- package/dist/native/button.ios.d.ts +13 -1
- package/dist/native/button.ios.d.ts.map +1 -1
- package/dist/native/button.ios.js +29 -1
- package/dist/native/button.ios.js.map +1 -1
- package/dist/native/checkbox.android.d.ts +7 -0
- package/dist/native/checkbox.android.d.ts.map +1 -0
- package/dist/native/checkbox.android.js +26 -0
- package/dist/native/checkbox.android.js.map +1 -0
- package/dist/native/checkbox.d.ts +7 -0
- package/dist/native/checkbox.d.ts.map +1 -0
- package/dist/native/checkbox.js +7 -0
- package/dist/native/checkbox.js.map +1 -0
- package/dist/native/collection-motion.d.ts +5 -0
- package/dist/native/collection-motion.d.ts.map +1 -0
- package/dist/native/collection-motion.js +157 -0
- package/dist/native/collection-motion.js.map +1 -0
- package/dist/native/combobox-editor.android.d.ts +3 -0
- package/dist/native/combobox-editor.android.d.ts.map +1 -0
- package/dist/native/combobox-editor.android.js +5 -0
- package/dist/native/combobox-editor.android.js.map +1 -0
- package/dist/native/combobox-editor.d.ts +4 -0
- package/dist/native/combobox-editor.d.ts.map +1 -0
- package/dist/native/combobox-editor.js +5 -0
- package/dist/native/combobox-editor.js.map +1 -0
- package/dist/native/composed-button.android.d.ts +4 -0
- package/dist/native/composed-button.android.d.ts.map +1 -0
- package/dist/native/composed-button.android.js +53 -0
- package/dist/native/composed-button.android.js.map +1 -0
- package/dist/native/composed-button.d.ts +3 -0
- package/dist/native/composed-button.d.ts.map +1 -0
- package/dist/native/composed-button.js +4 -0
- package/dist/native/composed-button.js.map +1 -0
- package/dist/native/date-format.android.d.ts +5 -0
- package/dist/native/date-format.android.d.ts.map +1 -0
- package/dist/native/date-format.android.js +39 -0
- package/dist/native/date-format.android.js.map +1 -0
- package/dist/native/date-format.d.ts +6 -0
- package/dist/native/date-format.d.ts.map +1 -0
- package/dist/native/date-format.ios.d.ts +5 -0
- package/dist/native/date-format.ios.d.ts.map +1 -0
- package/dist/native/date-format.ios.js +29 -0
- package/dist/native/date-format.ios.js.map +1 -0
- package/dist/native/date-format.js +8 -0
- package/dist/native/date-format.js.map +1 -0
- package/dist/native/dialog.android.d.ts +12 -0
- package/dist/native/dialog.android.d.ts.map +1 -0
- package/dist/native/dialog.android.js +46 -0
- package/dist/native/dialog.android.js.map +1 -0
- package/dist/native/dialog.d.ts +12 -0
- package/dist/native/dialog.d.ts.map +1 -0
- package/dist/native/dialog.ios.d.ts +12 -0
- package/dist/native/dialog.ios.d.ts.map +1 -0
- package/dist/native/dialog.ios.js +13 -0
- package/dist/native/dialog.ios.js.map +1 -0
- package/dist/native/dialog.js +4 -0
- package/dist/native/dialog.js.map +1 -0
- package/dist/native/dynamic-type.d.ts +15 -0
- package/dist/native/dynamic-type.d.ts.map +1 -0
- package/dist/native/dynamic-type.js +47 -0
- package/dist/native/dynamic-type.js.map +1 -0
- package/dist/native/file-access.d.ts +23 -0
- package/dist/native/file-access.d.ts.map +1 -0
- package/dist/native/file-access.js +55 -0
- package/dist/native/file-access.js.map +1 -0
- package/dist/native/file-picker.android.d.ts +3 -0
- package/dist/native/file-picker.android.d.ts.map +1 -0
- package/dist/native/file-picker.android.js +147 -0
- package/dist/native/file-picker.android.js.map +1 -0
- package/dist/native/file-picker.d.ts +4 -0
- package/dist/native/file-picker.d.ts.map +1 -0
- package/dist/native/file-picker.ios.d.ts +3 -0
- package/dist/native/file-picker.ios.d.ts.map +1 -0
- package/dist/native/file-picker.ios.js +152 -0
- package/dist/native/file-picker.ios.js.map +1 -0
- package/dist/native/file-picker.js +7 -0
- package/dist/native/file-picker.js.map +1 -0
- package/dist/native/flex-children.d.ts +4 -0
- package/dist/native/flex-children.d.ts.map +1 -0
- package/dist/native/flex-children.js +12 -0
- package/dist/native/flex-children.js.map +1 -0
- package/dist/native/flex-layout.android.d.ts +3 -1
- package/dist/native/flex-layout.android.d.ts.map +1 -1
- package/dist/native/flex-layout.android.js +9 -0
- package/dist/native/flex-layout.android.js.map +1 -1
- package/dist/native/flex-layout.ios.d.ts +14 -1
- package/dist/native/flex-layout.ios.d.ts.map +1 -1
- package/dist/native/flex-layout.ios.js +113 -0
- package/dist/native/flex-layout.ios.js.map +1 -1
- package/dist/native/image-effects.d.ts +11 -0
- package/dist/native/image-effects.d.ts.map +1 -0
- package/dist/native/image-effects.js +61 -0
- package/dist/native/image-effects.js.map +1 -0
- package/dist/native/input-action.d.ts +5 -0
- package/dist/native/input-action.d.ts.map +1 -0
- package/dist/native/input-action.js +13 -0
- package/dist/native/input-action.js.map +1 -0
- package/dist/native/keyboard-dismiss.android.d.ts +8 -0
- package/dist/native/keyboard-dismiss.android.d.ts.map +1 -0
- package/dist/native/keyboard-dismiss.android.js +9 -0
- package/dist/native/keyboard-dismiss.android.js.map +1 -0
- package/dist/native/keyboard-dismiss.d.ts +10 -0
- package/dist/native/keyboard-dismiss.d.ts.map +1 -0
- package/dist/native/keyboard-dismiss.ios.d.ts +8 -0
- package/dist/native/keyboard-dismiss.ios.d.ts.map +1 -0
- package/dist/native/keyboard-dismiss.ios.js +91 -0
- package/dist/native/keyboard-dismiss.ios.js.map +1 -0
- package/dist/native/keyboard-dismiss.js +6 -0
- package/dist/native/keyboard-dismiss.js.map +1 -0
- package/dist/native/label.android.d.ts +12 -0
- package/dist/native/label.android.d.ts.map +1 -0
- package/dist/native/label.android.js +19 -0
- package/dist/native/label.android.js.map +1 -0
- package/dist/native/label.ios.d.ts +14 -1
- package/dist/native/label.ios.d.ts.map +1 -1
- package/dist/native/label.ios.js +37 -1
- package/dist/native/label.ios.js.map +1 -1
- package/dist/native/measure-memo.d.ts +37 -0
- package/dist/native/measure-memo.d.ts.map +1 -0
- package/dist/native/measure-memo.js +82 -0
- package/dist/native/measure-memo.js.map +1 -0
- package/dist/native/motion-owner.d.ts +5 -0
- package/dist/native/motion-owner.d.ts.map +1 -0
- package/dist/native/motion-owner.js +58 -0
- package/dist/native/motion-owner.js.map +1 -0
- package/dist/native/motion-region.d.ts +7 -0
- package/dist/native/motion-region.d.ts.map +1 -0
- package/dist/native/motion-region.js +249 -0
- package/dist/native/motion-region.js.map +1 -0
- package/dist/native/motion-surface.d.ts +9 -0
- package/dist/native/motion-surface.d.ts.map +1 -0
- package/dist/native/motion-surface.js +229 -0
- package/dist/native/motion-surface.js.map +1 -0
- package/dist/native/platform-motion.d.ts +5 -0
- package/dist/native/platform-motion.d.ts.map +1 -0
- package/dist/native/platform-motion.js +90 -0
- package/dist/native/platform-motion.js.map +1 -0
- package/dist/native/press.d.ts +8 -2
- package/dist/native/press.d.ts.map +1 -1
- package/dist/native/press.js +58 -8
- package/dist/native/press.js.map +1 -1
- package/dist/native/progress.d.ts +7 -0
- package/dist/native/progress.d.ts.map +1 -0
- package/dist/native/progress.js +77 -0
- package/dist/native/progress.js.map +1 -0
- package/dist/native/screen.android.d.ts +6 -0
- package/dist/native/screen.android.d.ts.map +1 -0
- package/dist/native/screen.android.js +8 -0
- package/dist/native/screen.android.js.map +1 -0
- package/dist/native/screen.d.ts +2 -0
- package/dist/native/screen.d.ts.map +1 -0
- package/dist/native/screen.js +3 -0
- package/dist/native/screen.js.map +1 -0
- package/dist/native/scroll-motion.d.ts +12 -0
- package/dist/native/scroll-motion.d.ts.map +1 -0
- package/dist/native/scroll-motion.js +100 -0
- package/dist/native/scroll-motion.js.map +1 -0
- package/dist/native/section-scroll.d.ts +9 -0
- package/dist/native/section-scroll.d.ts.map +1 -0
- package/dist/native/section-scroll.js +69 -0
- package/dist/native/section-scroll.js.map +1 -0
- package/dist/native/segmented.d.ts +14 -0
- package/dist/native/segmented.d.ts.map +1 -0
- package/dist/native/segmented.js +86 -0
- package/dist/native/segmented.js.map +1 -0
- package/dist/native/sheet.android.d.ts +18 -0
- package/dist/native/sheet.android.d.ts.map +1 -0
- package/dist/native/sheet.android.js +16 -0
- package/dist/native/sheet.android.js.map +1 -0
- package/dist/native/sheet.d.ts +21 -0
- package/dist/native/sheet.d.ts.map +1 -0
- package/dist/native/sheet.ios.d.ts +19 -0
- package/dist/native/sheet.ios.d.ts.map +1 -0
- package/dist/native/sheet.ios.js +41 -0
- package/dist/native/sheet.ios.js.map +1 -0
- package/dist/native/sheet.js +17 -0
- package/dist/native/sheet.js.map +1 -0
- package/dist/native/surface-effects.d.ts +4 -0
- package/dist/native/surface-effects.d.ts.map +1 -0
- package/dist/native/surface-effects.js +31 -0
- package/dist/native/surface-effects.js.map +1 -0
- package/dist/native/tabs.android.d.ts +3 -0
- package/dist/native/tabs.android.d.ts.map +1 -0
- package/dist/native/tabs.android.js +29 -0
- package/dist/native/tabs.android.js.map +1 -0
- package/dist/native/tabs.d.ts +3 -0
- package/dist/native/tabs.d.ts.map +1 -0
- package/dist/native/tabs.js +4 -0
- package/dist/native/tabs.js.map +1 -0
- package/dist/native/text-field.android.d.ts +1 -0
- package/dist/native/text-field.android.d.ts.map +1 -1
- package/dist/native/text-field.android.js +13 -0
- package/dist/native/text-field.android.js.map +1 -1
- package/dist/native/text-field.ios.d.ts +9 -0
- package/dist/native/text-field.ios.d.ts.map +1 -0
- package/dist/native/text-field.ios.js +52 -0
- package/dist/native/text-field.ios.js.map +1 -0
- package/dist/native/text-view.ios.d.ts +7 -0
- package/dist/native/text-view.ios.d.ts.map +1 -0
- package/dist/native/text-view.ios.js +10 -0
- package/dist/native/text-view.ios.js.map +1 -0
- package/dist/native/toast.android.d.ts +4 -0
- package/dist/native/toast.android.d.ts.map +1 -0
- package/dist/native/toast.android.js +10 -0
- package/dist/native/toast.android.js.map +1 -0
- package/dist/native/toast.d.ts +4 -0
- package/dist/native/toast.d.ts.map +1 -0
- package/dist/native/toast.ios.d.ts +4 -0
- package/dist/native/toast.ios.d.ts.map +1 -0
- package/dist/native/toast.ios.js +8 -0
- package/dist/native/toast.ios.js.map +1 -0
- package/dist/native/toast.js +5 -0
- package/dist/native/toast.js.map +1 -0
- package/dist/native/visual-effects.d.ts +5 -0
- package/dist/native/visual-effects.d.ts.map +1 -0
- package/dist/native/visual-effects.js +126 -0
- package/dist/native/visual-effects.js.map +1 -0
- package/dist/vue/components/ChartPlot.d.ts +65 -0
- package/dist/vue/components/ChartPlot.d.ts.map +1 -0
- package/dist/vue/components/ChartPlot.js +100 -0
- package/dist/vue/components/ChartPlot.js.map +1 -0
- package/dist/vue/components/ChoiceControl.d.ts +114 -0
- package/dist/vue/components/ChoiceControl.d.ts.map +1 -0
- package/dist/vue/components/ChoiceControl.js +218 -0
- package/dist/vue/components/ChoiceControl.js.map +1 -0
- package/dist/vue/components/DateCalendar.d.ts +109 -0
- package/dist/vue/components/DateCalendar.d.ts.map +1 -0
- package/dist/vue/components/DateCalendar.js +98 -0
- package/dist/vue/components/DateCalendar.js.map +1 -0
- package/dist/vue/components/LoadingDecoration.d.ts +116 -0
- package/dist/vue/components/LoadingDecoration.d.ts.map +1 -0
- package/dist/vue/components/LoadingDecoration.js +34 -0
- package/dist/vue/components/LoadingDecoration.js.map +1 -0
- package/dist/vue/components/MAccordion.d.ts +119 -0
- package/dist/vue/components/MAccordion.d.ts.map +1 -0
- package/dist/vue/components/MAccordion.js +83 -0
- package/dist/vue/components/MAccordion.js.map +1 -0
- package/dist/vue/components/MAlert.d.ts +109 -0
- package/dist/vue/components/MAlert.d.ts.map +1 -0
- package/dist/vue/components/MAlert.js +126 -0
- package/dist/vue/components/MAlert.js.map +1 -0
- package/dist/vue/components/MAvatar.d.ts +80 -0
- package/dist/vue/components/MAvatar.d.ts.map +1 -0
- package/dist/vue/components/MAvatar.js +86 -0
- package/dist/vue/components/MAvatar.js.map +1 -0
- package/dist/vue/components/MBadge.d.ts +70 -0
- package/dist/vue/components/MBadge.d.ts.map +1 -0
- package/dist/vue/components/MBadge.js +30 -0
- package/dist/vue/components/MBadge.js.map +1 -0
- package/dist/vue/components/MButton.d.ts +212 -32
- package/dist/vue/components/MButton.d.ts.map +1 -1
- package/dist/vue/components/MButton.js +192 -20
- package/dist/vue/components/MButton.js.map +1 -1
- package/dist/vue/components/MCard.d.ts +113 -21
- package/dist/vue/components/MCard.d.ts.map +1 -1
- package/dist/vue/components/MCard.js +24 -6
- package/dist/vue/components/MCard.js.map +1 -1
- package/dist/vue/components/MCheckbox.d.ts +103 -0
- package/dist/vue/components/MCheckbox.d.ts.map +1 -0
- package/dist/vue/components/MCheckbox.js +26 -0
- package/dist/vue/components/MCheckbox.js.map +1 -0
- package/dist/vue/components/MChip.d.ts +117 -0
- package/dist/vue/components/MChip.d.ts.map +1 -0
- package/dist/vue/components/MChip.js +120 -0
- package/dist/vue/components/MChip.js.map +1 -0
- package/dist/vue/components/MCombobox.d.ts +279 -0
- package/dist/vue/components/MCombobox.d.ts.map +1 -0
- package/dist/vue/components/MCombobox.js +234 -0
- package/dist/vue/components/MCombobox.js.map +1 -0
- package/dist/vue/components/MDatePicker.d.ts +1350 -0
- package/dist/vue/components/MDatePicker.d.ts.map +1 -0
- package/dist/vue/components/MDatePicker.js +25 -0
- package/dist/vue/components/MDatePicker.js.map +1 -0
- package/dist/vue/components/MDialog.d.ts +100 -0
- package/dist/vue/components/MDialog.d.ts.map +1 -0
- package/dist/vue/components/MDialog.js +245 -0
- package/dist/vue/components/MDialog.js.map +1 -0
- package/dist/vue/components/MEmptyState.d.ts +117 -0
- package/dist/vue/components/MEmptyState.d.ts.map +1 -0
- package/dist/vue/components/MEmptyState.js +79 -0
- package/dist/vue/components/MEmptyState.js.map +1 -0
- package/dist/vue/components/MFilePicker.d.ts +112 -0
- package/dist/vue/components/MFilePicker.d.ts.map +1 -0
- package/dist/vue/components/MFilePicker.js +196 -0
- package/dist/vue/components/MFilePicker.js.map +1 -0
- package/dist/vue/components/MGrid.d.ts +165 -0
- package/dist/vue/components/MGrid.d.ts.map +1 -0
- package/dist/vue/components/MGrid.js +52 -0
- package/dist/vue/components/MGrid.js.map +1 -0
- package/dist/vue/components/MIcon.d.ts +75 -0
- package/dist/vue/components/MIcon.d.ts.map +1 -0
- package/dist/vue/components/MIcon.js +45 -0
- package/dist/vue/components/MIcon.js.map +1 -0
- package/dist/vue/components/MImage.d.ts +248 -0
- package/dist/vue/components/MImage.d.ts.map +1 -0
- package/dist/vue/components/MImage.js +157 -0
- package/dist/vue/components/MImage.js.map +1 -0
- package/dist/vue/components/MInput.d.ts +195 -50
- package/dist/vue/components/MInput.d.ts.map +1 -1
- package/dist/vue/components/MInput.js +134 -20
- package/dist/vue/components/MInput.js.map +1 -1
- package/dist/vue/components/MLink.d.ts +120 -0
- package/dist/vue/components/MLink.d.ts.map +1 -0
- package/dist/vue/components/MLink.js +76 -0
- package/dist/vue/components/MLink.js.map +1 -0
- package/dist/vue/components/MListItem.d.ts +106 -0
- package/dist/vue/components/MListItem.d.ts.map +1 -0
- package/dist/vue/components/MListItem.js +53 -0
- package/dist/vue/components/MListItem.js.map +1 -0
- package/dist/vue/components/MPopover.d.ts +106 -0
- package/dist/vue/components/MPopover.d.ts.map +1 -0
- package/dist/vue/components/MPopover.js +209 -0
- package/dist/vue/components/MPopover.js.map +1 -0
- package/dist/vue/components/MProgress.d.ts +122 -0
- package/dist/vue/components/MProgress.d.ts.map +1 -0
- package/dist/vue/components/MProgress.js +75 -0
- package/dist/vue/components/MProgress.js.map +1 -0
- package/dist/vue/components/MRadioGroup.d.ts +103 -0
- package/dist/vue/components/MRadioGroup.d.ts.map +1 -0
- package/dist/vue/components/MRadioGroup.js +57 -0
- package/dist/vue/components/MRadioGroup.js.map +1 -0
- package/dist/vue/components/MRangeSlider.d.ts +105 -0
- package/dist/vue/components/MRangeSlider.d.ts.map +1 -0
- package/dist/vue/components/MRangeSlider.js +107 -0
- package/dist/vue/components/MRangeSlider.js.map +1 -0
- package/dist/vue/components/MReveal.d.ts +73 -37
- package/dist/vue/components/MReveal.d.ts.map +1 -1
- package/dist/vue/components/MReveal.js +80 -37
- package/dist/vue/components/MReveal.js.map +1 -1
- package/dist/vue/components/MScreen.d.ts +42 -8
- package/dist/vue/components/MScreen.d.ts.map +1 -1
- package/dist/vue/components/MScreen.js +91 -6
- package/dist/vue/components/MScreen.js.map +1 -1
- package/dist/vue/components/MSegmentedControl.d.ts +95 -0
- package/dist/vue/components/MSegmentedControl.d.ts.map +1 -0
- package/dist/vue/components/MSegmentedControl.js +172 -0
- package/dist/vue/components/MSegmentedControl.js.map +1 -0
- package/dist/vue/components/MSelect.d.ts +140 -0
- package/dist/vue/components/MSelect.d.ts.map +1 -0
- package/dist/vue/components/MSelect.js +158 -0
- package/dist/vue/components/MSelect.js.map +1 -0
- package/dist/vue/components/MSeparator.d.ts +56 -0
- package/dist/vue/components/MSeparator.d.ts.map +1 -0
- package/dist/vue/components/MSeparator.js +36 -0
- package/dist/vue/components/MSeparator.js.map +1 -0
- package/dist/vue/components/MSheet.d.ts +116 -0
- package/dist/vue/components/MSheet.d.ts.map +1 -0
- package/dist/vue/components/MSheet.js +313 -0
- package/dist/vue/components/MSheet.js.map +1 -0
- package/dist/vue/components/MSkeleton.d.ts +89 -0
- package/dist/vue/components/MSkeleton.d.ts.map +1 -0
- package/dist/vue/components/MSkeleton.js +89 -0
- package/dist/vue/components/MSkeleton.js.map +1 -0
- package/dist/vue/components/MSlider.d.ts +8 -4
- package/dist/vue/components/MSlider.d.ts.map +1 -1
- package/dist/vue/components/MSlider.js +3 -2
- package/dist/vue/components/MSlider.js.map +1 -1
- package/dist/vue/components/MStack.d.ts +199 -0
- package/dist/vue/components/MStack.d.ts.map +1 -0
- package/dist/vue/components/MStack.js +62 -0
- package/dist/vue/components/MStack.js.map +1 -0
- package/dist/vue/components/MSwitch.d.ts +89 -0
- package/dist/vue/components/MSwitch.d.ts.map +1 -0
- package/dist/vue/components/MSwitch.js +173 -0
- package/dist/vue/components/MSwitch.js.map +1 -0
- package/dist/vue/components/MTabs.d.ts +101 -0
- package/dist/vue/components/MTabs.d.ts.map +1 -0
- package/dist/vue/components/MTabs.js +245 -0
- package/dist/vue/components/MTabs.js.map +1 -0
- package/dist/vue/components/MText.d.ts +61 -25
- package/dist/vue/components/MText.d.ts.map +1 -1
- package/dist/vue/components/MText.js +47 -19
- package/dist/vue/components/MText.js.map +1 -1
- package/dist/vue/components/MTimePicker.d.ts +655 -0
- package/dist/vue/components/MTimePicker.d.ts.map +1 -0
- package/dist/vue/components/MTimePicker.js +50 -0
- package/dist/vue/components/MTimePicker.js.map +1 -0
- package/dist/vue/components/MToast.d.ts +23 -0
- package/dist/vue/components/MToast.d.ts.map +1 -0
- package/dist/vue/components/MToast.js +242 -0
- package/dist/vue/components/MToast.js.map +1 -0
- package/dist/vue/components/MTooltip.d.ts +65 -0
- package/dist/vue/components/MTooltip.d.ts.map +1 -0
- package/dist/vue/components/MTooltip.js +35 -0
- package/dist/vue/components/MTooltip.js.map +1 -0
- package/dist/vue/components/MVirtualList.d.ts +3 -0
- package/dist/vue/components/MVirtualList.d.ts.map +1 -0
- package/dist/vue/components/MVirtualList.js +88 -0
- package/dist/vue/components/MVirtualList.js.map +1 -0
- package/dist/vue/components/configurator.d.ts +541 -0
- package/dist/vue/components/configurator.d.ts.map +1 -0
- package/dist/vue/components/configurator.js +24 -0
- package/dist/vue/components/configurator.js.map +1 -0
- package/dist/vue/components/discovery.d.ts +282 -0
- package/dist/vue/components/discovery.d.ts.map +1 -0
- package/dist/vue/components/discovery.js +67 -0
- package/dist/vue/components/discovery.js.map +1 -0
- package/dist/vue/components/layout.d.ts +230 -88
- package/dist/vue/components/layout.d.ts.map +1 -1
- package/dist/vue/components/layout.js +16 -9
- package/dist/vue/components/layout.js.map +1 -1
- package/dist/vue/components/navigation.d.ts +225 -0
- package/dist/vue/components/navigation.d.ts.map +1 -0
- package/dist/vue/components/navigation.js +16 -0
- package/dist/vue/components/navigation.js.map +1 -0
- package/dist/vue/components/wayfinding.d.ts +441 -0
- package/dist/vue/components/wayfinding.d.ts.map +1 -0
- package/dist/vue/components/wayfinding.js +37 -0
- package/dist/vue/components/wayfinding.js.map +1 -0
- package/dist/vue/components/workflows.d.ts +251 -0
- package/dist/vue/components/workflows.d.ts.map +1 -0
- package/dist/vue/components/workflows.js +35 -0
- package/dist/vue/components/workflows.js.map +1 -0
- package/dist/vue/index.d.ts +54 -9
- package/dist/vue/index.d.ts.map +1 -1
- package/dist/vue/index.js +105 -7
- package/dist/vue/index.js.map +1 -1
- package/dist/vue/layers.d.ts +19 -0
- package/dist/vue/layers.d.ts.map +1 -0
- package/dist/vue/layers.js +26 -0
- package/dist/vue/layers.js.map +1 -0
- package/dist/vue/native-view.d.ts +6 -0
- package/dist/vue/native-view.d.ts.map +1 -0
- package/dist/vue/native-view.js +5 -0
- package/dist/vue/native-view.js.map +1 -0
- package/dist/vue/navigation.d.ts +4 -0
- package/dist/vue/navigation.d.ts.map +1 -0
- package/dist/vue/navigation.js +16 -0
- package/dist/vue/navigation.js.map +1 -0
- package/dist/vue/props.d.ts +12 -11
- package/dist/vue/props.d.ts.map +1 -1
- package/dist/vue/props.js +25 -10
- package/dist/vue/props.js.map +1 -1
- package/dist/vue/router-navigation.d.ts +25 -0
- package/dist/vue/router-navigation.d.ts.map +1 -0
- package/dist/vue/router-navigation.js +15 -0
- package/dist/vue/router-navigation.js.map +1 -0
- package/dist/vue/services.d.ts +16 -0
- package/dist/vue/services.d.ts.map +1 -0
- package/dist/vue/services.js +23 -0
- package/dist/vue/services.js.map +1 -0
- package/dist/vue/system-back.d.ts +11 -0
- package/dist/vue/system-back.d.ts.map +1 -0
- package/dist/vue/system-back.js +2 -0
- package/dist/vue/system-back.js.map +1 -0
- package/dist/vue/use-choice-paint.d.ts +9 -0
- package/dist/vue/use-choice-paint.d.ts.map +1 -0
- package/dist/vue/use-choice-paint.js +32 -0
- package/dist/vue/use-choice-paint.js.map +1 -0
- package/dist/vue/use-motion-region.d.ts +7 -0
- package/dist/vue/use-motion-region.d.ts.map +1 -0
- package/dist/vue/use-motion-region.js +28 -0
- package/dist/vue/use-motion-region.js.map +1 -0
- package/dist/vue/use-motion-surface.d.ts +8 -0
- package/dist/vue/use-motion-surface.d.ts.map +1 -0
- package/dist/vue/use-motion-surface.js +105 -0
- package/dist/vue/use-motion-surface.js.map +1 -0
- package/dist/vue/use-press.d.ts +1 -1
- package/dist/vue/use-press.d.ts.map +1 -1
- package/dist/vue/use-press.js +13 -5
- package/dist/vue/use-press.js.map +1 -1
- package/dist/vue/use-scroll-motion.d.ts +7 -0
- package/dist/vue/use-scroll-motion.d.ts.map +1 -0
- package/dist/vue/use-scroll-motion.js +30 -0
- package/dist/vue/use-scroll-motion.js.map +1 -0
- package/fonts/LICENSE +45 -0
- package/fonts/lucide.ttf +0 -0
- package/package.json +20 -4
- package/platforms/android/java/com/mavis/ui/Box.java +65 -0
- package/platforms/android/java/com/mavis/ui/ContentWidth.java +77 -0
- package/platforms/android/java/com/mavis/ui/FlexLayout.java +101 -4
- package/platforms/android/java/com/mavis/ui/MeasureMemo.java +145 -0
- package/platforms/android/java/com/mavis/ui/Screen.java +108 -0
- package/src/app-icons.ts +21 -0
- package/src/date-format.ts +2 -0
- package/src/files.ts +3 -0
- package/src/native/app-icons.android.ts +95 -0
- package/src/native/app-icons.ios.ts +74 -0
- package/src/native/app-icons.ts +12 -0
- package/src/native/appearance.android.ts +75 -0
- package/src/native/appearance.ts +33 -0
- package/src/native/avatar-image.ts +9 -0
- package/src/native/avatar-label.android.ts +14 -0
- package/src/native/avatar-label.ts +1 -0
- package/src/native/box.android.ts +11 -0
- package/src/native/box.ios.ts +61 -0
- package/src/native/box.ts +2 -0
- package/src/native/button.android.ts +38 -0
- package/src/native/button.ios.ts +53 -1
- package/src/native/checkbox.android.ts +35 -0
- package/src/native/checkbox.ts +9 -0
- package/src/native/collection-motion.ts +166 -0
- package/src/native/combobox-editor.android.ts +11 -0
- package/src/native/combobox-editor.ts +6 -0
- package/src/native/composed-button.android.ts +74 -0
- package/src/native/composed-button.ts +9 -0
- package/src/native/date-format.android.ts +72 -0
- package/src/native/date-format.ios.ts +54 -0
- package/src/native/date-format.ts +17 -0
- package/src/native/dialog.android.ts +56 -0
- package/src/native/dialog.ios.ts +23 -0
- package/src/native/dialog.ts +10 -0
- package/src/native/dynamic-type.ts +71 -0
- package/src/native/file-access.ts +71 -0
- package/src/native/file-picker.android.ts +191 -0
- package/src/native/file-picker.ios.ts +230 -0
- package/src/native/file-picker.ts +8 -0
- package/src/native/flex-children.ts +12 -0
- package/src/native/flex-layout.android.ts +12 -1
- package/src/native/flex-layout.ios.ts +148 -1
- package/src/native/image-effects.ts +71 -0
- package/src/native/input-action.ts +15 -0
- package/src/native/keyboard-dismiss.android.ts +17 -0
- package/src/native/keyboard-dismiss.ios.ts +124 -0
- package/src/native/keyboard-dismiss.ts +14 -0
- package/src/native/label.android.ts +27 -0
- package/src/native/label.ios.ts +54 -1
- package/src/native/measure-memo.ts +116 -0
- package/src/native/motion-owner.ts +66 -0
- package/src/native/motion-region.ts +293 -0
- package/src/native/motion-surface.ts +273 -0
- package/src/native/platform-motion.ts +103 -0
- package/src/native/press.ts +58 -10
- package/src/native/progress.ts +78 -0
- package/src/native/screen.android.ts +12 -0
- package/src/native/screen.ts +2 -0
- package/src/native/scroll-motion.ts +106 -0
- package/src/native/section-scroll.ts +81 -0
- package/src/native/segmented.ts +95 -0
- package/src/native/sheet.android.ts +24 -0
- package/src/native/sheet.ios.ts +52 -0
- package/src/native/sheet.ts +26 -0
- package/src/native/surface-effects.ts +33 -0
- package/src/native/tabs.android.ts +58 -0
- package/src/native/tabs.ts +8 -0
- package/src/native/text-field.android.ts +19 -0
- package/src/native/text-field.ios.ts +53 -0
- package/src/native/text-view.ios.ts +10 -0
- package/src/native/toast.android.ts +9 -0
- package/src/native/toast.ios.ts +13 -0
- package/src/native/toast.ts +6 -0
- package/src/native/visual-effects.ts +147 -0
- package/src/vue/components/ChartPlot.ts +114 -0
- package/src/vue/components/ChoiceControl.ts +265 -0
- package/src/vue/components/DateCalendar.ts +121 -0
- package/src/vue/components/LoadingDecoration.ts +38 -0
- package/src/vue/components/MAccordion.ts +123 -0
- package/src/vue/components/MAlert.ts +156 -0
- package/src/vue/components/MAvatar.ts +103 -0
- package/src/vue/components/MBadge.ts +34 -0
- package/src/vue/components/MButton.ts +255 -18
- package/src/vue/components/MCard.ts +44 -5
- package/src/vue/components/MCheckbox.ts +25 -0
- package/src/vue/components/MChip.ts +134 -0
- package/src/vue/components/MCombobox.ts +257 -0
- package/src/vue/components/MDatePicker.ts +25 -0
- package/src/vue/components/MDialog.ts +312 -0
- package/src/vue/components/MEmptyState.ts +96 -0
- package/src/vue/components/MFilePicker.ts +226 -0
- package/src/vue/components/MGrid.ts +86 -0
- package/src/vue/components/MIcon.ts +53 -0
- package/src/vue/components/MImage.ts +181 -0
- package/src/vue/components/MInput.ts +143 -21
- package/src/vue/components/MLink.ts +99 -0
- package/src/vue/components/MListItem.ts +66 -0
- package/src/vue/components/MPopover.ts +254 -0
- package/src/vue/components/MProgress.ts +94 -0
- package/src/vue/components/MRadioGroup.ts +64 -0
- package/src/vue/components/MRangeSlider.ts +125 -0
- package/src/vue/components/MReveal.ts +89 -48
- package/src/vue/components/MScreen.ts +122 -6
- package/src/vue/components/MSegmentedControl.ts +214 -0
- package/src/vue/components/MSelect.ts +185 -0
- package/src/vue/components/MSeparator.ts +40 -0
- package/src/vue/components/MSheet.ts +375 -0
- package/src/vue/components/MSkeleton.ts +102 -0
- package/src/vue/components/MSlider.ts +8 -2
- package/src/vue/components/MStack.ts +83 -0
- package/src/vue/components/MSwitch.ts +200 -0
- package/src/vue/components/MTabs.ts +302 -0
- package/src/vue/components/MText.ts +48 -10
- package/src/vue/components/MTimePicker.ts +57 -0
- package/src/vue/components/MToast.ts +289 -0
- package/src/vue/components/MTooltip.ts +39 -0
- package/src/vue/components/MVirtualList.ts +120 -0
- package/src/vue/components/configurator.ts +27 -0
- package/src/vue/components/discovery.ts +92 -0
- package/src/vue/components/layout.ts +24 -9
- package/src/vue/components/navigation.ts +19 -0
- package/src/vue/components/wayfinding.ts +46 -0
- package/src/vue/components/workflows.ts +38 -0
- package/src/vue/index.ts +217 -22
- package/src/vue/layers.ts +48 -0
- package/src/vue/native-view.ts +6 -0
- package/src/vue/navigation.ts +15 -0
- package/src/vue/props.ts +37 -12
- package/src/vue/router-navigation.ts +39 -0
- package/src/vue/services.ts +39 -0
- package/src/vue/system-back.ts +12 -0
- package/src/vue/use-choice-paint.ts +39 -0
- package/src/vue/use-motion-region.ts +29 -0
- package/src/vue/use-motion-surface.ts +115 -0
- package/src/vue/use-press.ts +13 -5
- package/src/vue/use-scroll-motion.ts +31 -0
- package/dist/native/input-description.android.d.ts +0 -4
- package/dist/native/input-description.android.d.ts.map +0 -1
- package/dist/native/input-description.android.js +0 -18
- package/dist/native/input-description.android.js.map +0 -1
- package/dist/theme/resolve.d.ts +0 -3
- package/dist/theme/resolve.d.ts.map +0 -1
- package/dist/theme/resolve.js +0 -8
- package/dist/theme/resolve.js.map +0 -1
- package/dist/theme/themes.d.ts +0 -6
- package/dist/theme/themes.d.ts.map +0 -1
- package/dist/theme/themes.js +0 -83
- package/dist/theme/themes.js.map +0 -1
- package/dist/theme/types.d.ts +0 -50
- package/dist/theme/types.d.ts.map +0 -1
- package/dist/theme/types.js +0 -2
- package/dist/theme/types.js.map +0 -1
- package/dist/vue/global-components.d.ts +0 -21
- package/dist/vue/global-components.d.ts.map +0 -1
- package/dist/vue/global-components.js +0 -2
- package/dist/vue/global-components.js.map +0 -1
- package/dist/vue/layout-context.d.ts +0 -5
- package/dist/vue/layout-context.d.ts.map +0 -1
- package/dist/vue/layout-context.js +0 -7
- package/dist/vue/layout-context.js.map +0 -1
- package/dist/vue/text-content.d.ts +0 -4
- package/dist/vue/text-content.d.ts.map +0 -1
- package/dist/vue/text-content.js +0 -17
- package/dist/vue/text-content.js.map +0 -1
- package/dist/vue/theme.d.ts +0 -177
- package/dist/vue/theme.d.ts.map +0 -1
- package/dist/vue/theme.js +0 -17
- package/dist/vue/theme.js.map +0 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { TextField } from '@nativescript/core'
|
|
2
|
+
import { secureProperty } from '@nativescript/core/ui/text-field/text-field-common'
|
|
3
|
+
import { fontScaleInternalProperty } from '@nativescript/core/ui/styling/style-properties'
|
|
4
|
+
import { applyDynamicType } from './dynamic-type'
|
|
5
|
+
|
|
6
|
+
const setSecure = (TextField.prototype as unknown as Record<symbol, (value: boolean) => void>)[
|
|
7
|
+
secureProperty.setNative
|
|
8
|
+
]!
|
|
9
|
+
|
|
10
|
+
/** Follows the system text size with the iOS body curve instead of Core's table. */
|
|
11
|
+
export class MavisTextField extends TextField {
|
|
12
|
+
[secureProperty.setNative](value: boolean) {
|
|
13
|
+
const field = this.ios
|
|
14
|
+
const text = field.text
|
|
15
|
+
const selection = field.selectedTextRange
|
|
16
|
+
const start = selection
|
|
17
|
+
? field.offsetFromPositionToPosition(field.beginningOfDocument, selection.start)
|
|
18
|
+
: null
|
|
19
|
+
const end = selection
|
|
20
|
+
? field.offsetFromPositionToPosition(field.beginningOfDocument, selection.end)
|
|
21
|
+
: null
|
|
22
|
+
setSecure.call(this, value)
|
|
23
|
+
if (field.isFirstResponder) {
|
|
24
|
+
// Core treats the first secure keystroke as replacing the whole value. This is
|
|
25
|
+
// an existing edit switching visibility, so its next keystroke must use the selection.
|
|
26
|
+
const state = this as unknown as { _firstEdit: boolean }
|
|
27
|
+
state._firstEdit = false
|
|
28
|
+
}
|
|
29
|
+
if (field.isFirstResponder && value && text) {
|
|
30
|
+
// UIKit otherwise clears the secure buffer on the next insertion. Reinsert
|
|
31
|
+
// the existing value without treating it as a new edit in Core's delegate.
|
|
32
|
+
const delegate = field.delegate
|
|
33
|
+
try {
|
|
34
|
+
field.delegate = null
|
|
35
|
+
field.text = ''
|
|
36
|
+
field.insertText(text)
|
|
37
|
+
} finally {
|
|
38
|
+
field.delegate = delegate
|
|
39
|
+
}
|
|
40
|
+
} else {
|
|
41
|
+
field.text = text
|
|
42
|
+
}
|
|
43
|
+
if (start !== null && end !== null) {
|
|
44
|
+
const from = field.positionFromPositionOffset(field.beginningOfDocument, start)
|
|
45
|
+
const to = field.positionFromPositionOffset(field.beginningOfDocument, end)
|
|
46
|
+
if (from && to) field.selectedTextRange = field.textRangeFromPositionToPosition(from, to)
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
[fontScaleInternalProperty.setNative]() {
|
|
51
|
+
applyDynamicType(this)
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TextView } from '@nativescript/core'
|
|
2
|
+
import { fontScaleInternalProperty } from '@nativescript/core/ui/styling/style-properties'
|
|
3
|
+
import { applyDynamicType } from './dynamic-type'
|
|
4
|
+
|
|
5
|
+
/** Follows the system text size with the iOS body curve instead of Core's table. */
|
|
6
|
+
export class MavisTextView extends TextView {
|
|
7
|
+
[fontScaleInternalProperty.setNative]() {
|
|
8
|
+
applyDynamicType(this)
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Application, type View } from '@nativescript/core'
|
|
2
|
+
|
|
3
|
+
export function toastReaderActive(): boolean {
|
|
4
|
+
const manager = Application.android.context?.getSystemService('accessibility')
|
|
5
|
+
return Boolean(manager?.isTouchExplorationEnabled())
|
|
6
|
+
}
|
|
7
|
+
export function announceToast(view: View, message: string) {
|
|
8
|
+
if (view.isLoaded && toastReaderActive()) view.android?.announceForAccessibility(message)
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { View } from '@nativescript/core'
|
|
2
|
+
|
|
3
|
+
declare function UIAccessibilityIsVoiceOverRunning(): boolean
|
|
4
|
+
declare const UIAccessibilityAnnouncementNotification: number
|
|
5
|
+
declare function UIAccessibilityPostNotification(notification: number, argument: unknown): void
|
|
6
|
+
|
|
7
|
+
export function toastReaderActive() {
|
|
8
|
+
return UIAccessibilityIsVoiceOverRunning()
|
|
9
|
+
}
|
|
10
|
+
export function announceToast(view: View, message: string) {
|
|
11
|
+
if (view.isLoaded && toastReaderActive())
|
|
12
|
+
UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, message)
|
|
13
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { Label, Image, isIOS, type View } from '@nativescript/core'
|
|
2
|
+
import { nativeSurfaceEffects } from './surface-effects.js'
|
|
3
|
+
import {
|
|
4
|
+
gradient,
|
|
5
|
+
shimmer,
|
|
6
|
+
loader,
|
|
7
|
+
reveal,
|
|
8
|
+
conceal,
|
|
9
|
+
animateText,
|
|
10
|
+
rollTo,
|
|
11
|
+
type DerivedValue,
|
|
12
|
+
type DerivedColor,
|
|
13
|
+
} from '@rafaelaugusto/jolt'
|
|
14
|
+
import {
|
|
15
|
+
mapGradientBindings,
|
|
16
|
+
type MotionVisualAdapter,
|
|
17
|
+
type MotionCircular,
|
|
18
|
+
type MotionPlayback,
|
|
19
|
+
} from '@getcortexlabs/mavis-core/experimental'
|
|
20
|
+
|
|
21
|
+
const circles = new WeakMap<View, { dispose(): void }>()
|
|
22
|
+
export function nativeVisualEffects(
|
|
23
|
+
target: View,
|
|
24
|
+
sources: WeakMap<object, DerivedValue>,
|
|
25
|
+
colors: WeakMap<object, DerivedColor>,
|
|
26
|
+
plainText: () => boolean,
|
|
27
|
+
): MotionVisualAdapter {
|
|
28
|
+
const text = () => {
|
|
29
|
+
if (!plainText() || !(target instanceof Label) || target.formattedText)
|
|
30
|
+
throw new TypeError(
|
|
31
|
+
'Declare a motionSurface on MText with an explicit text prop; rich/slotted text is unsupported.',
|
|
32
|
+
)
|
|
33
|
+
return target
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
...nativeSurfaceEffects(target),
|
|
37
|
+
supports: (effect) => {
|
|
38
|
+
if (effect === 'text') return plainText()
|
|
39
|
+
if (effect === 'symbol')
|
|
40
|
+
return isIOS && target instanceof Image && Boolean(target.ios?.image?.symbolImage)
|
|
41
|
+
if (effect === 'image') return target instanceof Image
|
|
42
|
+
if (effect === 'liquid') return isIOS && target instanceof Image
|
|
43
|
+
return (
|
|
44
|
+
['gradient', 'particles', 'confetti', 'blur', 'shape', 'keyboard'].includes(effect) || isIOS
|
|
45
|
+
)
|
|
46
|
+
},
|
|
47
|
+
gradient(options) {
|
|
48
|
+
const paint = gradient(target, options)
|
|
49
|
+
return {
|
|
50
|
+
type: paint.type,
|
|
51
|
+
get suspended() {
|
|
52
|
+
return paint.suspended
|
|
53
|
+
},
|
|
54
|
+
animate: (values, options) => paint.animate(values, options),
|
|
55
|
+
set: (values) => paint.set(values),
|
|
56
|
+
stop: () => paint.stop(),
|
|
57
|
+
suspend: () => paint.suspend(),
|
|
58
|
+
resume: () => paint.resume(),
|
|
59
|
+
bind(values) {
|
|
60
|
+
const dispose = paint.bind(
|
|
61
|
+
mapGradientBindings(
|
|
62
|
+
values,
|
|
63
|
+
(value) => sources.get(value)!,
|
|
64
|
+
(value) => colors.get(value)!,
|
|
65
|
+
),
|
|
66
|
+
)
|
|
67
|
+
return { dispose }
|
|
68
|
+
},
|
|
69
|
+
dispose: () => paint.remove(),
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
shimmer: (options) => ({ supported: isIOS, dispose: shimmer(target, options) }),
|
|
73
|
+
loader: (options) => ({ supported: isIOS, dispose: loader(target, options) }),
|
|
74
|
+
animateText: (options) => animateText(text(), options),
|
|
75
|
+
rollTo: (value, options) => rollTo(text(), value, options),
|
|
76
|
+
circular() {
|
|
77
|
+
circles.get(target)?.dispose()
|
|
78
|
+
const hidden = target.accessibilityHidden,
|
|
79
|
+
interactive = target.isUserInteractionEnabled
|
|
80
|
+
const visibility = target.visibility
|
|
81
|
+
let active: MotionPlayback | undefined,
|
|
82
|
+
locked = false,
|
|
83
|
+
generation = 0,
|
|
84
|
+
disposed = false
|
|
85
|
+
let writtenVisibility: View['visibility'] | undefined
|
|
86
|
+
const focused = (view: View): boolean => {
|
|
87
|
+
if (view.ios?.isFirstResponder) return true
|
|
88
|
+
let found = false
|
|
89
|
+
view.eachChildView((child) => {
|
|
90
|
+
found = focused(child)
|
|
91
|
+
return !found
|
|
92
|
+
})
|
|
93
|
+
return found
|
|
94
|
+
}
|
|
95
|
+
const unlock = () => {
|
|
96
|
+
if (!locked) return
|
|
97
|
+
locked = false
|
|
98
|
+
if (target.accessibilityHidden) target.accessibilityHidden = hidden
|
|
99
|
+
if (!target.isUserInteractionEnabled) target.isUserInteractionEnabled = interactive
|
|
100
|
+
}
|
|
101
|
+
const run = (open: boolean, options: Parameters<MotionCircular['reveal']>[0] = {}) => {
|
|
102
|
+
if (isIOS && !open && focused(target))
|
|
103
|
+
throw new Error('Move focus outside the circular surface before conceal().')
|
|
104
|
+
const handle = open
|
|
105
|
+
? reveal(target, { from: options.origin, duration: options.duration })
|
|
106
|
+
: conceal(target, { to: options.origin, duration: options.duration })
|
|
107
|
+
const token = ++generation
|
|
108
|
+
active = handle
|
|
109
|
+
if (isIOS) writtenVisibility = target.visibility
|
|
110
|
+
if (isIOS) {
|
|
111
|
+
if (open) unlock()
|
|
112
|
+
else {
|
|
113
|
+
locked = true
|
|
114
|
+
target.accessibilityHidden = true
|
|
115
|
+
target.isUserInteractionEnabled = false
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
void handle.finished.then((completed) => {
|
|
119
|
+
if (token !== generation || disposed) return
|
|
120
|
+
active = undefined
|
|
121
|
+
if (completed && isIOS) writtenVisibility = target.visibility
|
|
122
|
+
if (!completed && target.visibility !== 'hidden') unlock()
|
|
123
|
+
})
|
|
124
|
+
return handle
|
|
125
|
+
}
|
|
126
|
+
const control = {
|
|
127
|
+
supported: isIOS,
|
|
128
|
+
reveal: (options?: Parameters<MotionCircular['reveal']>[0]) => run(true, options),
|
|
129
|
+
conceal: (options?: Parameters<MotionCircular['conceal']>[0]) => run(false, options),
|
|
130
|
+
dispose() {
|
|
131
|
+
if (disposed) return
|
|
132
|
+
disposed = true
|
|
133
|
+
generation++
|
|
134
|
+
active?.stop()
|
|
135
|
+
unlock()
|
|
136
|
+
if (circles.get(target) === control) {
|
|
137
|
+
circles.delete(target)
|
|
138
|
+
if (isIOS && writtenVisibility !== undefined && target.visibility === writtenVisibility)
|
|
139
|
+
target.visibility = visibility
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
}
|
|
143
|
+
circles.set(target, control)
|
|
144
|
+
return control
|
|
145
|
+
},
|
|
146
|
+
}
|
|
147
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { defineComponent, h, ref } from 'nativescript-vue'
|
|
2
|
+
import type { EventData, TapGestureEventData, View } from '@nativescript/core'
|
|
3
|
+
import { chartPlotProps, useMavisTheme } from '@getcortexlabs/mavis-core/vue'
|
|
4
|
+
import { chartHitTest, type ChartPoint } from '@getcortexlabs/mavis-core'
|
|
5
|
+
|
|
6
|
+
/** Bounded native geometry, without a WebView or a second animation scheduler. */
|
|
7
|
+
export const ChartPlot = defineComponent({
|
|
8
|
+
name: 'MChartPlot',
|
|
9
|
+
props: chartPlotProps,
|
|
10
|
+
emits: { select: (_category: number, _series: number) => true },
|
|
11
|
+
setup(props, { emit }) {
|
|
12
|
+
const { theme } = useMavisTheme()
|
|
13
|
+
const width = ref(0)
|
|
14
|
+
return () => {
|
|
15
|
+
const height = props.height
|
|
16
|
+
const x = (point: ChartPoint) => point.x * width.value
|
|
17
|
+
const y = (point: ChartPoint) => 8 + point.y * (height - 16)
|
|
18
|
+
const zero = 8 + props.geometry.zero * (height - 16)
|
|
19
|
+
const count = props.geometry.series[0]?.points.length ?? 0
|
|
20
|
+
const groupWidth = (width.value / Math.max(1, count)) * 0.7
|
|
21
|
+
const barWidth = groupWidth / Math.max(1, props.geometry.series.length)
|
|
22
|
+
const shape = (key: string, values: Record<string, unknown>) =>
|
|
23
|
+
h('ContentView', {
|
|
24
|
+
key,
|
|
25
|
+
accessibilityHidden: true,
|
|
26
|
+
isUserInteractionEnabled: false,
|
|
27
|
+
...values,
|
|
28
|
+
})
|
|
29
|
+
return h(
|
|
30
|
+
'AbsoluteLayout',
|
|
31
|
+
{
|
|
32
|
+
class: 'm-chart-plot',
|
|
33
|
+
height,
|
|
34
|
+
accessibilityHidden: true,
|
|
35
|
+
onLayoutChanged: (event: EventData) => {
|
|
36
|
+
const size = (event.object as View).getActualSize()
|
|
37
|
+
if (width.value !== size.width) width.value = size.width
|
|
38
|
+
},
|
|
39
|
+
onTap: (event: TapGestureEventData) => {
|
|
40
|
+
if (props.disabled || !width.value || !count) return
|
|
41
|
+
const hit = chartHitTest(
|
|
42
|
+
props.geometry,
|
|
43
|
+
props.type,
|
|
44
|
+
event.getX() / width.value,
|
|
45
|
+
(event.getY() - 8) / (height - 16),
|
|
46
|
+
)
|
|
47
|
+
if (hit) emit('select', hit.category, hit.series)
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
width.value <= 0
|
|
51
|
+
? []
|
|
52
|
+
: [
|
|
53
|
+
...props.geometry.ticks.map((_, i) =>
|
|
54
|
+
shape(`grid:${i}`, {
|
|
55
|
+
left: 0,
|
|
56
|
+
top: 8 + ((height - 16) * i) / 4,
|
|
57
|
+
width: width.value,
|
|
58
|
+
height: 1,
|
|
59
|
+
backgroundColor: theme.value.colors.border,
|
|
60
|
+
}),
|
|
61
|
+
),
|
|
62
|
+
...props.geometry.series.flatMap((series, seriesIndex) =>
|
|
63
|
+
series.points.flatMap((point, index) => {
|
|
64
|
+
if (!point) return []
|
|
65
|
+
const color = props.colors[seriesIndex]
|
|
66
|
+
const selected =
|
|
67
|
+
props.selected?.category === index && props.selected.series === seriesIndex
|
|
68
|
+
const previous = series.points[index - 1]
|
|
69
|
+
const line =
|
|
70
|
+
props.type === 'line' && previous
|
|
71
|
+
? (() => {
|
|
72
|
+
const dx = x(point) - x(previous),
|
|
73
|
+
dy = y(point) - y(previous)
|
|
74
|
+
const length = Math.hypot(dx, dy)
|
|
75
|
+
return shape(`line:${seriesIndex}:${index}`, {
|
|
76
|
+
left: (x(point) + x(previous)) / 2 - length / 2,
|
|
77
|
+
top: (y(point) + y(previous)) / 2 - 1.25,
|
|
78
|
+
width: length,
|
|
79
|
+
height: 2.5,
|
|
80
|
+
rotate: (Math.atan2(dy, dx) * 180) / Math.PI,
|
|
81
|
+
backgroundColor: color,
|
|
82
|
+
borderRadius: 1.25,
|
|
83
|
+
})
|
|
84
|
+
})()
|
|
85
|
+
: null
|
|
86
|
+
const radius = selected ? 5 : 3
|
|
87
|
+
return [
|
|
88
|
+
line,
|
|
89
|
+
props.type === 'bar'
|
|
90
|
+
? shape(`bar:${seriesIndex}:${index}`, {
|
|
91
|
+
left: x(point) - groupWidth / 2 + seriesIndex * barWidth,
|
|
92
|
+
top: Math.min(y(point), zero),
|
|
93
|
+
width: Math.max(1, barWidth * 0.82),
|
|
94
|
+
height: Math.max(1, Math.abs(zero - y(point))),
|
|
95
|
+
borderRadius: 3,
|
|
96
|
+
backgroundColor: color,
|
|
97
|
+
opacity: props.selected && !selected ? 0.45 : 1,
|
|
98
|
+
})
|
|
99
|
+
: shape(`point:${seriesIndex}:${index}`, {
|
|
100
|
+
left: x(point) - radius,
|
|
101
|
+
top: y(point) - radius,
|
|
102
|
+
width: radius * 2,
|
|
103
|
+
height: radius * 2,
|
|
104
|
+
borderRadius: radius,
|
|
105
|
+
backgroundColor: color,
|
|
106
|
+
}),
|
|
107
|
+
]
|
|
108
|
+
}),
|
|
109
|
+
),
|
|
110
|
+
],
|
|
111
|
+
)
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
})
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import { useChoicePaint } from '../use-choice-paint.js'
|
|
2
|
+
import {
|
|
3
|
+
defineComponent,
|
|
4
|
+
h,
|
|
5
|
+
mergeProps,
|
|
6
|
+
onBeforeUnmount,
|
|
7
|
+
ref,
|
|
8
|
+
registerElement,
|
|
9
|
+
watch,
|
|
10
|
+
} from 'nativescript-vue'
|
|
11
|
+
import type { EventData, TouchGestureEventData, View } from '@nativescript/core'
|
|
12
|
+
import { animate } from '@rafaelaugusto/jolt'
|
|
13
|
+
import { checkboxProps, useMavisTheme } from '@getcortexlabs/mavis-core/vue'
|
|
14
|
+
import { MavisButton } from '../../native/button'
|
|
15
|
+
import { mixedValue, observeCheckbox } from '../../native/checkbox'
|
|
16
|
+
import { MBox, MRow, MColumn } from './layout.js'
|
|
17
|
+
import { MText } from './MText.js'
|
|
18
|
+
import { useNativeViewAttrs } from '../accessibility.js'
|
|
19
|
+
|
|
20
|
+
registerElement('MavisCheckboxButton', () => MavisButton)
|
|
21
|
+
registerElement('MavisRadioButton', () => MavisButton)
|
|
22
|
+
|
|
23
|
+
export const ChoiceControl = defineComponent({
|
|
24
|
+
name: 'ChoiceControl',
|
|
25
|
+
inheritAttrs: false,
|
|
26
|
+
props: {
|
|
27
|
+
...checkboxProps,
|
|
28
|
+
radio: Boolean,
|
|
29
|
+
labelHidden: Boolean,
|
|
30
|
+
pressFeedback: { type: Boolean, default: true },
|
|
31
|
+
},
|
|
32
|
+
emits: ['activate'],
|
|
33
|
+
setup(props, { attrs, emit }) {
|
|
34
|
+
const { theme } = useMavisTheme()
|
|
35
|
+
const nativeAttrs = useNativeViewAttrs(props)
|
|
36
|
+
const paint = useChoicePaint(
|
|
37
|
+
() => ({
|
|
38
|
+
borderColor:
|
|
39
|
+
props.modelValue || props.indeterminate
|
|
40
|
+
? theme.value.colors.primary
|
|
41
|
+
: theme.value.colors.muted,
|
|
42
|
+
backgroundColor:
|
|
43
|
+
!props.radio && (props.modelValue || props.indeterminate)
|
|
44
|
+
? theme.value.colors.primary
|
|
45
|
+
: 'transparent',
|
|
46
|
+
}),
|
|
47
|
+
theme,
|
|
48
|
+
)
|
|
49
|
+
const focused = ref(false)
|
|
50
|
+
let touchView: View | undefined
|
|
51
|
+
let mark: View | undefined
|
|
52
|
+
let motion: ReturnType<typeof animate> | undefined
|
|
53
|
+
let observer: ReturnType<typeof observeCheckbox> | undefined
|
|
54
|
+
|
|
55
|
+
function restore() {
|
|
56
|
+
motion?.stop()
|
|
57
|
+
motion = undefined
|
|
58
|
+
if (mark) {
|
|
59
|
+
mark.scaleX = 1
|
|
60
|
+
mark.scaleY = 1
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function unload() {
|
|
64
|
+
touchView?.off('touch', touch)
|
|
65
|
+
touchView = undefined
|
|
66
|
+
restore()
|
|
67
|
+
observer?.dispose()
|
|
68
|
+
observer = undefined
|
|
69
|
+
}
|
|
70
|
+
onBeforeUnmount(unload)
|
|
71
|
+
watch(
|
|
72
|
+
() => props.disabled,
|
|
73
|
+
(disabled) => {
|
|
74
|
+
if (disabled) restore()
|
|
75
|
+
},
|
|
76
|
+
)
|
|
77
|
+
watch(
|
|
78
|
+
[() => props.indeterminate, () => props.indeterminateLabel],
|
|
79
|
+
() => {
|
|
80
|
+
observer?.setMixed(props.indeterminate ? props.indeterminateLabel : undefined)
|
|
81
|
+
},
|
|
82
|
+
{ flush: 'post' },
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
function touch(data: EventData) {
|
|
86
|
+
const event = data as TouchGestureEventData
|
|
87
|
+
if (!mark || props.disabled || !props.pressFeedback) return
|
|
88
|
+
if (!['down', 'up', 'cancel'].includes(event.action)) return
|
|
89
|
+
motion?.stop()
|
|
90
|
+
const scale = event.action === 'down' ? 0.9 : 1
|
|
91
|
+
motion = animate(
|
|
92
|
+
mark,
|
|
93
|
+
{ scaleX: scale, scaleY: scale },
|
|
94
|
+
{
|
|
95
|
+
type: 'spring',
|
|
96
|
+
duration: 180,
|
|
97
|
+
bounce: 0,
|
|
98
|
+
},
|
|
99
|
+
)
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return () => {
|
|
103
|
+
const { colors } = theme.value
|
|
104
|
+
const selected = props.indeterminate || props.modelValue
|
|
105
|
+
return h(
|
|
106
|
+
MBox,
|
|
107
|
+
mergeProps(
|
|
108
|
+
{
|
|
109
|
+
width: props.width,
|
|
110
|
+
grow: props.grow,
|
|
111
|
+
shrink: props.shrink,
|
|
112
|
+
style: {
|
|
113
|
+
minHeight: 48,
|
|
114
|
+
borderWidth: 2,
|
|
115
|
+
borderRadius: 10,
|
|
116
|
+
borderColor: focused.value && !props.disabled ? colors.primary : 'transparent',
|
|
117
|
+
opacity: props.disabled ? 0.45 : 1,
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
attrs,
|
|
121
|
+
{ accessibilityHidden: props.accessibilityHidden },
|
|
122
|
+
),
|
|
123
|
+
{
|
|
124
|
+
default: () => [
|
|
125
|
+
h(props.radio ? 'MavisRadioButton' : 'MavisCheckboxButton', {
|
|
126
|
+
...nativeAttrs(),
|
|
127
|
+
text: '',
|
|
128
|
+
isEnabled: !props.disabled,
|
|
129
|
+
accessible: true,
|
|
130
|
+
accessibilityRole: props.radio ? 'radioButton' : 'checkbox',
|
|
131
|
+
accessibilityState:
|
|
132
|
+
props.modelValue && !props.indeterminate ? 'checked' : 'unchecked',
|
|
133
|
+
accessibilityLabel: props.label,
|
|
134
|
+
accessibilityHint: props.helperText || '',
|
|
135
|
+
accessibilityValue: mixedValue(props.indeterminate, props.indeterminateLabel),
|
|
136
|
+
style: {
|
|
137
|
+
minHeight: 48,
|
|
138
|
+
minWidth: 0,
|
|
139
|
+
margin: 0,
|
|
140
|
+
padding: 0,
|
|
141
|
+
borderWidth: 0,
|
|
142
|
+
backgroundColor: 'transparent',
|
|
143
|
+
androidElevation: 0,
|
|
144
|
+
androidDynamicElevationOffset: 0,
|
|
145
|
+
},
|
|
146
|
+
onTap: () => {
|
|
147
|
+
if (!props.disabled) emit('activate')
|
|
148
|
+
},
|
|
149
|
+
onLoaded: (event: EventData) => {
|
|
150
|
+
unload()
|
|
151
|
+
touchView = event.object as View
|
|
152
|
+
touchView.on('touch', touch)
|
|
153
|
+
observer = observeCheckbox(event.object as View, (value) => {
|
|
154
|
+
focused.value = value
|
|
155
|
+
})
|
|
156
|
+
observer.setMixed(props.indeterminate ? props.indeterminateLabel : undefined)
|
|
157
|
+
},
|
|
158
|
+
onUnloaded: unload,
|
|
159
|
+
}),
|
|
160
|
+
h(
|
|
161
|
+
MRow,
|
|
162
|
+
{
|
|
163
|
+
gap: 'md',
|
|
164
|
+
paddingY: 'sm',
|
|
165
|
+
isUserInteractionEnabled: false,
|
|
166
|
+
accessibilityHidden: true,
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
default: () => [
|
|
170
|
+
h(
|
|
171
|
+
MBox,
|
|
172
|
+
{
|
|
173
|
+
width: 24,
|
|
174
|
+
height: 24,
|
|
175
|
+
shrink: 0,
|
|
176
|
+
radius: props.radio ? 12 : 7,
|
|
177
|
+
isUserInteractionEnabled: false,
|
|
178
|
+
accessibilityHidden: true,
|
|
179
|
+
style: {
|
|
180
|
+
borderWidth: 2,
|
|
181
|
+
...paint.style,
|
|
182
|
+
},
|
|
183
|
+
onLoaded: (event: EventData) => {
|
|
184
|
+
mark = event.object as View
|
|
185
|
+
paint.onLoaded(event)
|
|
186
|
+
},
|
|
187
|
+
onUnloaded: () => {
|
|
188
|
+
restore()
|
|
189
|
+
paint.onUnloaded()
|
|
190
|
+
mark = undefined
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
default: () =>
|
|
195
|
+
selected
|
|
196
|
+
? h(MBox, {
|
|
197
|
+
width: 12,
|
|
198
|
+
height: props.radio ? 12 : props.indeterminate ? 2 : 7,
|
|
199
|
+
isUserInteractionEnabled: false,
|
|
200
|
+
accessibilityHidden: true,
|
|
201
|
+
style: props.radio
|
|
202
|
+
? {
|
|
203
|
+
backgroundColor: colors.primary,
|
|
204
|
+
borderRadius: 6,
|
|
205
|
+
horizontalAlignment: 'center',
|
|
206
|
+
verticalAlignment: 'middle',
|
|
207
|
+
}
|
|
208
|
+
: props.indeterminate
|
|
209
|
+
? {
|
|
210
|
+
backgroundColor: colors.onPrimary,
|
|
211
|
+
borderRadius: 1,
|
|
212
|
+
horizontalAlignment: 'center',
|
|
213
|
+
verticalAlignment: 'middle',
|
|
214
|
+
}
|
|
215
|
+
: {
|
|
216
|
+
borderLeftWidth: 2,
|
|
217
|
+
borderBottomWidth: 2,
|
|
218
|
+
borderColor: colors.onPrimary,
|
|
219
|
+
rotate: -45,
|
|
220
|
+
translateY: -1,
|
|
221
|
+
horizontalAlignment: 'center',
|
|
222
|
+
verticalAlignment: 'middle',
|
|
223
|
+
},
|
|
224
|
+
})
|
|
225
|
+
: null,
|
|
226
|
+
},
|
|
227
|
+
),
|
|
228
|
+
props.labelHidden
|
|
229
|
+
? null
|
|
230
|
+
: h(
|
|
231
|
+
MColumn,
|
|
232
|
+
{
|
|
233
|
+
gap: 'xs',
|
|
234
|
+
isUserInteractionEnabled: false,
|
|
235
|
+
accessibilityHidden: true,
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
default: () => [
|
|
239
|
+
h(MText, {
|
|
240
|
+
text: props.label,
|
|
241
|
+
accessibilityHidden: true,
|
|
242
|
+
isUserInteractionEnabled: false,
|
|
243
|
+
style: { fontWeight: '600' },
|
|
244
|
+
}),
|
|
245
|
+
props.helperText
|
|
246
|
+
? h(MText, {
|
|
247
|
+
text: props.helperText,
|
|
248
|
+
variant: 'caption',
|
|
249
|
+
tone: 'muted',
|
|
250
|
+
accessibilityHidden: true,
|
|
251
|
+
isUserInteractionEnabled: false,
|
|
252
|
+
})
|
|
253
|
+
: null,
|
|
254
|
+
],
|
|
255
|
+
},
|
|
256
|
+
),
|
|
257
|
+
],
|
|
258
|
+
},
|
|
259
|
+
),
|
|
260
|
+
],
|
|
261
|
+
},
|
|
262
|
+
)
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
})
|