@getcortexlabs/mavis 0.1.0-alpha.1 → 0.1.0-alpha.10
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/ChoiceControl.d.ts +111 -0
- package/dist/vue/components/ChoiceControl.d.ts.map +1 -0
- package/dist/vue/components/ChoiceControl.js +211 -0
- package/dist/vue/components/ChoiceControl.js.map +1 -0
- package/dist/vue/components/DateCalendar.d.ts +94 -0
- package/dist/vue/components/DateCalendar.d.ts.map +1 -0
- package/dist/vue/components/DateCalendar.js +96 -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/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/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/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/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 +50 -9
- package/dist/vue/index.d.ts.map +1 -1
- package/dist/vue/index.js +89 -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/ChoiceControl.ts +258 -0
- package/src/vue/components/DateCalendar.ts +117 -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/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/MVirtualList.ts +120 -0
- package/src/vue/components/configurator.ts +27 -0
- package/src/vue/components/layout.ts +24 -9
- package/src/vue/components/navigation.ts +19 -0
- package/src/vue/components/workflows.ts +38 -0
- package/src/vue/index.ts +183 -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
package/src/vue/index.ts
CHANGED
|
@@ -1,41 +1,202 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import { MPopover } from './components/MPopover.js'
|
|
2
|
+
import { MMenu, MAppBar, MTabBar } from './components/navigation.js'
|
|
3
|
+
import { MTimePicker } from './components/MTimePicker.js'
|
|
4
|
+
import { MVirtualList } from './components/MVirtualList.js'
|
|
5
|
+
import { MNumberInput, MMultiSelect } from './components/configurator.js'
|
|
6
|
+
import { MImage } from './components/MImage.js'
|
|
7
|
+
import { MStack } from './components/MStack.js'
|
|
8
|
+
import { MGrid } from './components/MGrid.js'
|
|
9
|
+
import { MLink } from './components/MLink.js'
|
|
10
|
+
import { MDatePicker, MDateRangePicker } from './components/MDatePicker.js'
|
|
11
|
+
import { MCombobox } from './components/MCombobox.js'
|
|
12
|
+
import { MFilePicker } from './components/MFilePicker.js'
|
|
13
|
+
import { MFormGroup, MFormErrors, MSteps, MPagination } from './components/workflows.js'
|
|
14
|
+
import { MChip } from './components/MChip.js'
|
|
15
|
+
import { MEmptyState } from './components/MEmptyState.js'
|
|
16
|
+
import type { App, Component } from 'nativescript-vue'
|
|
17
|
+
import { createMavisServices, type MavisServiceOptions } from './services.js'
|
|
18
|
+
export { createMavisServices } from './services.js'
|
|
19
|
+
export type { MavisServiceOptions } from './services.js'
|
|
20
|
+
import { MThemeProvider, MSpan, MPlatform } from '@getcortexlabs/mavis-core/vue'
|
|
5
21
|
import { MScreen } from './components/MScreen.js'
|
|
6
22
|
import { MBox, MRow, MColumn } from './components/layout.js'
|
|
7
23
|
import { MCard } from './components/MCard.js'
|
|
8
24
|
import { MText } from './components/MText.js'
|
|
9
25
|
import { MButton } from './components/MButton.js'
|
|
26
|
+
import { MToast } from './components/MToast.js'
|
|
27
|
+
import { MDialog } from './components/MDialog.js'
|
|
28
|
+
import { MListItem } from './components/MListItem.js'
|
|
29
|
+
import { MSeparator } from './components/MSeparator.js'
|
|
30
|
+
import { MAvatar } from './components/MAvatar.js'
|
|
31
|
+
import { MBadge } from './components/MBadge.js'
|
|
32
|
+
import { MSkeleton } from './components/MSkeleton.js'
|
|
33
|
+
import { MProgress } from './components/MProgress.js'
|
|
34
|
+
import { MAccordion } from './components/MAccordion.js'
|
|
35
|
+
import { MSegmentedControl } from './components/MSegmentedControl.js'
|
|
36
|
+
import { MAlert } from './components/MAlert.js'
|
|
37
|
+
import { MTabs } from './components/MTabs.js'
|
|
38
|
+
import { MSelect } from './components/MSelect.js'
|
|
39
|
+
import { MRadioGroup } from './components/MRadioGroup.js'
|
|
40
|
+
import { MCheckbox } from './components/MCheckbox.js'
|
|
41
|
+
import { MSwitch } from './components/MSwitch.js'
|
|
10
42
|
import { MSlider } from './components/MSlider.js'
|
|
11
43
|
import { MInput } from './components/MInput.js'
|
|
44
|
+
import { MIcon } from './components/MIcon.js'
|
|
12
45
|
import { MReveal } from './components/MReveal.js'
|
|
46
|
+
import { MSheet } from './components/MSheet.js'
|
|
47
|
+
import type { ClaimSystemBack, SystemBackClaimant } from './system-back.js'
|
|
13
48
|
|
|
14
|
-
export {
|
|
15
|
-
|
|
16
|
-
|
|
49
|
+
export {
|
|
50
|
+
MThemeProvider,
|
|
51
|
+
MPlatform,
|
|
52
|
+
MSpan,
|
|
53
|
+
MScreen,
|
|
54
|
+
MBox,
|
|
55
|
+
MRow,
|
|
56
|
+
MColumn,
|
|
57
|
+
MStack,
|
|
58
|
+
MGrid,
|
|
59
|
+
MLink,
|
|
60
|
+
MCard,
|
|
61
|
+
MText,
|
|
62
|
+
MButton,
|
|
63
|
+
MSlider,
|
|
64
|
+
MSwitch,
|
|
65
|
+
MCheckbox,
|
|
66
|
+
MRadioGroup,
|
|
67
|
+
MSelect,
|
|
68
|
+
MToast,
|
|
69
|
+
MDialog,
|
|
70
|
+
MTabs,
|
|
71
|
+
MSkeleton,
|
|
72
|
+
MChip,
|
|
73
|
+
MEmptyState,
|
|
74
|
+
MProgress,
|
|
75
|
+
MAccordion,
|
|
76
|
+
MSegmentedControl,
|
|
77
|
+
MAlert,
|
|
78
|
+
MListItem,
|
|
79
|
+
MSeparator,
|
|
80
|
+
MAvatar,
|
|
81
|
+
MBadge,
|
|
82
|
+
MInput,
|
|
83
|
+
MIcon,
|
|
84
|
+
MReveal,
|
|
85
|
+
MSheet,
|
|
86
|
+
MDatePicker,
|
|
87
|
+
MDateRangePicker,
|
|
88
|
+
MNumberInput,
|
|
89
|
+
MMultiSelect,
|
|
90
|
+
MImage,
|
|
91
|
+
MCombobox,
|
|
92
|
+
MFilePicker,
|
|
93
|
+
MFormGroup,
|
|
94
|
+
MFormErrors,
|
|
95
|
+
MSteps,
|
|
96
|
+
MPagination,
|
|
97
|
+
MPopover,
|
|
98
|
+
MMenu,
|
|
99
|
+
MAppBar,
|
|
100
|
+
MTabBar,
|
|
101
|
+
MTimePicker,
|
|
102
|
+
MVirtualList,
|
|
103
|
+
}
|
|
104
|
+
export {
|
|
105
|
+
useMavisTheme,
|
|
106
|
+
useMavisPlatform,
|
|
107
|
+
useMavisListMotion,
|
|
108
|
+
useToast,
|
|
109
|
+
useFormController,
|
|
110
|
+
useFormField,
|
|
111
|
+
useFileSelection,
|
|
112
|
+
useMavisNavigation,
|
|
113
|
+
} from '@getcortexlabs/mavis-core/vue'
|
|
114
|
+
export type {
|
|
115
|
+
MavisThemeContext,
|
|
116
|
+
MavisPlatform,
|
|
117
|
+
MavisPlatformTarget,
|
|
118
|
+
MavisPlatformContext,
|
|
119
|
+
Appearance,
|
|
120
|
+
AppearanceMode,
|
|
121
|
+
AppearanceSource,
|
|
122
|
+
} from '@getcortexlabs/mavis-core/vue'
|
|
17
123
|
export type { Align, Justify } from './components/layout.js'
|
|
18
124
|
export type {} from '@getcortexlabs/mavis-core/vue'
|
|
19
125
|
|
|
20
|
-
|
|
21
|
-
|
|
126
|
+
export type { SystemBackClaimant, ClaimSystemBack }
|
|
127
|
+
|
|
128
|
+
export type MavisOptions = MavisServiceOptions & { components?: false | Record<string, Component> }
|
|
129
|
+
|
|
130
|
+
/** Create one plugin per application; `system` appearance follows the device. Vue also resolves MButton as <m-button>. */
|
|
131
|
+
export function createMavis(options: MavisOptions = {}) {
|
|
22
132
|
return {
|
|
23
133
|
install(app: App) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
134
|
+
const { components, ...services } = options
|
|
135
|
+
createMavisServices(services).install(app)
|
|
136
|
+
if (components === false) return
|
|
137
|
+
for (const [name, component] of Object.entries(
|
|
138
|
+
components ?? {
|
|
139
|
+
MThemeProvider,
|
|
140
|
+
MPlatform,
|
|
141
|
+
MSpan,
|
|
142
|
+
MScreen,
|
|
143
|
+
MBox,
|
|
144
|
+
MRow,
|
|
145
|
+
MColumn,
|
|
146
|
+
MStack,
|
|
147
|
+
MGrid,
|
|
148
|
+
MLink,
|
|
149
|
+
MCard,
|
|
150
|
+
MText,
|
|
151
|
+
MButton,
|
|
152
|
+
MSlider,
|
|
153
|
+
MSwitch,
|
|
154
|
+
MCheckbox,
|
|
155
|
+
MRadioGroup,
|
|
156
|
+
MSelect,
|
|
157
|
+
MToast,
|
|
158
|
+
MDialog,
|
|
159
|
+
MTabs,
|
|
160
|
+
MSkeleton,
|
|
161
|
+
MChip,
|
|
162
|
+
MEmptyState,
|
|
163
|
+
MProgress,
|
|
164
|
+
MAccordion,
|
|
165
|
+
MSegmentedControl,
|
|
166
|
+
MAlert,
|
|
167
|
+
MListItem,
|
|
168
|
+
MSeparator,
|
|
169
|
+
MAvatar,
|
|
170
|
+
MBadge,
|
|
171
|
+
MInput,
|
|
172
|
+
MIcon,
|
|
173
|
+
MReveal,
|
|
174
|
+
MSheet,
|
|
175
|
+
MDatePicker,
|
|
176
|
+
MDateRangePicker,
|
|
177
|
+
MNumberInput,
|
|
178
|
+
MMultiSelect,
|
|
179
|
+
MImage,
|
|
180
|
+
MCombobox,
|
|
181
|
+
MFilePicker,
|
|
182
|
+
MFormGroup,
|
|
183
|
+
MFormErrors,
|
|
184
|
+
MSteps,
|
|
185
|
+
MPagination,
|
|
186
|
+
MPopover,
|
|
187
|
+
MMenu,
|
|
188
|
+
MAppBar,
|
|
189
|
+
MTabBar,
|
|
190
|
+
MTimePicker,
|
|
191
|
+
MVirtualList,
|
|
192
|
+
},
|
|
193
|
+
)) {
|
|
37
194
|
app.component(name, component)
|
|
38
195
|
}
|
|
39
196
|
},
|
|
40
197
|
}
|
|
41
198
|
}
|
|
199
|
+
|
|
200
|
+
export * from '../files.js'
|
|
201
|
+
|
|
202
|
+
export { createMavisNavigation } from './router-navigation.js'
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import {
|
|
2
|
+
inject,
|
|
3
|
+
provide,
|
|
4
|
+
shallowReactive,
|
|
5
|
+
type Component,
|
|
6
|
+
type InjectionKey,
|
|
7
|
+
type Ref,
|
|
8
|
+
} from 'nativescript-vue'
|
|
9
|
+
|
|
10
|
+
export interface Layer {
|
|
11
|
+
component: Component
|
|
12
|
+
props: Record<string, unknown>
|
|
13
|
+
/** True while the layer covers the screen content. */
|
|
14
|
+
presented: Ref<boolean>
|
|
15
|
+
/** Non-modal notices leave the screen content reachable. */
|
|
16
|
+
modal?: boolean
|
|
17
|
+
}
|
|
18
|
+
export interface LayerEntry extends Layer {
|
|
19
|
+
key: number
|
|
20
|
+
}
|
|
21
|
+
export interface LayerHost {
|
|
22
|
+
add(layer: Layer): () => void
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const layerHost: InjectionKey<LayerHost> = Symbol('mavis.layers')
|
|
26
|
+
|
|
27
|
+
/** A Screen renders registered layers above its content, inside one native cell. */
|
|
28
|
+
export function provideLayerHost(): LayerEntry[] {
|
|
29
|
+
const layers = shallowReactive<LayerEntry[]>([])
|
|
30
|
+
let next = 0
|
|
31
|
+
provide(layerHost, {
|
|
32
|
+
add(layer) {
|
|
33
|
+
const entry = { ...layer, key: next++ }
|
|
34
|
+
layers.push(entry)
|
|
35
|
+
return () => {
|
|
36
|
+
const index = layers.indexOf(entry)
|
|
37
|
+
if (index >= 0) layers.splice(index, 1)
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
})
|
|
41
|
+
return layers
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function useLayerHost(name: string): LayerHost {
|
|
45
|
+
const host = inject(layerHost, undefined)
|
|
46
|
+
if (!host) throw new Error(`${name} needs an MScreen ancestor on NativeScript`)
|
|
47
|
+
return host
|
|
48
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Utils } from '@nativescript/core'
|
|
2
|
+
import { linkDestination, type NavigationOptions } from '@getcortexlabs/mavis-core'
|
|
3
|
+
|
|
4
|
+
export function nativeDestination(options: NavigationOptions) {
|
|
5
|
+
const href = linkDestination(options.href!)
|
|
6
|
+
if (!options.navigate && !/^[a-z][a-z\d+.-]*:/i.test(href))
|
|
7
|
+
throw new TypeError('Native navigation needs a navigate handler for in-app destinations.')
|
|
8
|
+
return href
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export async function navigateNative(options: NavigationOptions) {
|
|
12
|
+
const href = nativeDestination(options)
|
|
13
|
+
if (options.navigate) await options.navigate(href)
|
|
14
|
+
else if (!(await Utils.openUrl(href))) throw new Error(`The system could not open ${href}.`)
|
|
15
|
+
}
|
package/src/vue/props.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MavisTheme } from '@getcortexlabs/mavis-core'
|
|
1
|
+
import type { Dimension, MavisTheme } from '@getcortexlabs/mavis-core'
|
|
2
2
|
import {
|
|
3
3
|
resolveSpace,
|
|
4
4
|
resolveRadius,
|
|
@@ -8,19 +8,44 @@ import {
|
|
|
8
8
|
import type { BoxProps } from '@getcortexlabs/mavis-core/vue'
|
|
9
9
|
export { boxProps, spacingProp } from '@getcortexlabs/mavis-core/vue'
|
|
10
10
|
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
export interface BoxStyle {
|
|
12
|
+
paddingLeft?: number
|
|
13
|
+
paddingRight?: number
|
|
14
|
+
paddingTop?: number
|
|
15
|
+
paddingBottom?: number
|
|
16
|
+
borderRadius?: number
|
|
17
|
+
flexGrow: number
|
|
18
|
+
flexShrink: number
|
|
19
|
+
minWidth: number
|
|
20
|
+
width?: Dimension
|
|
21
|
+
height?: Dimension
|
|
22
|
+
backgroundColor?: string
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// A prop that was not given leaves its style untouched, so a plain attribute such as
|
|
26
|
+
// `paddingTop` or `borderRadius` on the element survives every render.
|
|
27
|
+
export function boxStyle(theme: MavisTheme, props: BoxProps, defaultShrink = 0): BoxStyle {
|
|
28
|
+
const style: BoxStyle = {
|
|
19
29
|
flexGrow: nonNegative(props.grow, 'grow'),
|
|
20
30
|
flexShrink: nonNegative(props.shrink ?? defaultShrink, 'shrink'),
|
|
21
31
|
minWidth: 0,
|
|
22
|
-
width: resolveDimension(props.width),
|
|
23
|
-
height: resolveDimension(props.height),
|
|
24
|
-
backgroundColor: props.backgroundColor,
|
|
25
32
|
}
|
|
33
|
+
const padding = props.padding === undefined ? undefined : resolveSpace(theme, props.padding)
|
|
34
|
+
const x = props.paddingX === undefined ? padding : resolveSpace(theme, props.paddingX)
|
|
35
|
+
const y = props.paddingY === undefined ? padding : resolveSpace(theme, props.paddingY)
|
|
36
|
+
if (x !== undefined) {
|
|
37
|
+
style.paddingLeft = x
|
|
38
|
+
style.paddingRight = x
|
|
39
|
+
}
|
|
40
|
+
if (y !== undefined) {
|
|
41
|
+
style.paddingTop = y
|
|
42
|
+
style.paddingBottom = y
|
|
43
|
+
}
|
|
44
|
+
if (props.radius !== undefined) style.borderRadius = resolveRadius(theme, props.radius)
|
|
45
|
+
const width = resolveDimension(props.width)
|
|
46
|
+
if (width !== undefined) style.width = width
|
|
47
|
+
const height = resolveDimension(props.height)
|
|
48
|
+
if (height !== undefined) style.height = height
|
|
49
|
+
if (props.backgroundColor !== undefined) style.backgroundColor = props.backgroundColor
|
|
50
|
+
return style
|
|
26
51
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createRouterNavigation,
|
|
3
|
+
defineNavigationTransition,
|
|
4
|
+
type MavisRouter,
|
|
5
|
+
type NavigationTransition,
|
|
6
|
+
} from '@getcortexlabs/mavis-core'
|
|
7
|
+
|
|
8
|
+
export interface NativeNavigationRouter extends MavisRouter {
|
|
9
|
+
push(
|
|
10
|
+
href: string,
|
|
11
|
+
options?: { animated?: boolean; transition?: { name: string; duration: number } },
|
|
12
|
+
): unknown
|
|
13
|
+
replace(
|
|
14
|
+
href: string,
|
|
15
|
+
options?: { animated?: boolean; transition?: { name: string; duration: number } },
|
|
16
|
+
): unknown
|
|
17
|
+
back(options?: { animated?: boolean }): unknown
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** vue-router-ns owns native transitions, reduced motion, interactive back and focus. */
|
|
21
|
+
export function createMavisNavigation(
|
|
22
|
+
router: NativeNavigationRouter,
|
|
23
|
+
options: { transition?: NavigationTransition } = {},
|
|
24
|
+
) {
|
|
25
|
+
const policy = defineNavigationTransition(options.transition)
|
|
26
|
+
const native =
|
|
27
|
+
policy.name === 'none' || policy.duration === 0
|
|
28
|
+
? { animated: false }
|
|
29
|
+
: { transition: { name: policy.name, duration: policy.duration } }
|
|
30
|
+
return createRouterNavigation({
|
|
31
|
+
resolve: (href) => router.resolve(href),
|
|
32
|
+
push: (href) => router.push(href, native),
|
|
33
|
+
replace: (href) => router.replace(href, native),
|
|
34
|
+
back: () =>
|
|
35
|
+
router.back(
|
|
36
|
+
policy.name === 'none' || policy.duration === 0 ? { animated: false } : undefined,
|
|
37
|
+
),
|
|
38
|
+
})
|
|
39
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { App } from 'nativescript-vue'
|
|
2
|
+
import { isIOS } from '@nativescript/core'
|
|
3
|
+
import type { MavisNavigation } from '@getcortexlabs/mavis-core'
|
|
4
|
+
import {
|
|
5
|
+
createThemeContext,
|
|
6
|
+
installAppToast,
|
|
7
|
+
themeKey,
|
|
8
|
+
navigationKey,
|
|
9
|
+
platformKey,
|
|
10
|
+
createPlatformContext,
|
|
11
|
+
type ThemeContextOptions,
|
|
12
|
+
} from '@getcortexlabs/mavis-core/vue'
|
|
13
|
+
import { systemAppearance } from '../native/appearance'
|
|
14
|
+
import { systemBackKey, type ClaimSystemBack } from './system-back.js'
|
|
15
|
+
|
|
16
|
+
export type MavisServiceOptions = Omit<ThemeContextOptions, 'source'> & {
|
|
17
|
+
toast?: { closeLabel?: string }
|
|
18
|
+
claimSystemBack?: ClaimSystemBack
|
|
19
|
+
navigation?: MavisNavigation
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** Application-owned services without global component registration. */
|
|
23
|
+
export function createMavisServices(options: MavisServiceOptions = {}) {
|
|
24
|
+
return {
|
|
25
|
+
install(app: App) {
|
|
26
|
+
app.provide(platformKey, createPlatformContext(isIOS ? 'ios' : 'android'))
|
|
27
|
+
installAppToast(app, options.toast)
|
|
28
|
+
const { toast: _toast, claimSystemBack, navigation, ...theme } = options
|
|
29
|
+
const context = createThemeContext({ ...theme, source: systemAppearance() })
|
|
30
|
+
app.provide(themeKey, context)
|
|
31
|
+
app.provide(systemBackKey, claimSystemBack)
|
|
32
|
+
app.provide(navigationKey, navigation)
|
|
33
|
+
app.onUnmount(() => {
|
|
34
|
+
context.dispose()
|
|
35
|
+
navigation?.dispose?.()
|
|
36
|
+
})
|
|
37
|
+
},
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { InjectionKey } from 'nativescript-vue'
|
|
2
|
+
|
|
3
|
+
/** Something other than a page that the Android system back should reach first. */
|
|
4
|
+
export interface SystemBackClaimant {
|
|
5
|
+
/** Whether it wants the next back press or gesture. */
|
|
6
|
+
owns(): boolean
|
|
7
|
+
/** Takes the press. */
|
|
8
|
+
back(): void
|
|
9
|
+
}
|
|
10
|
+
export type ClaimSystemBack = (claimant: SystemBackClaimant) => () => void
|
|
11
|
+
|
|
12
|
+
export const systemBackKey: InjectionKey<ClaimSystemBack | undefined> = Symbol('mavis.systemBack')
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { onBeforeUnmount, watch, type Ref } from 'nativescript-vue'
|
|
2
|
+
import type { EventData, View } from '@nativescript/core'
|
|
3
|
+
import { animate } from '@rafaelaugusto/jolt'
|
|
4
|
+
import { choiceMotion, type ChoicePaint, type MavisTheme } from '@getcortexlabs/mavis-core'
|
|
5
|
+
|
|
6
|
+
export function useChoicePaint(
|
|
7
|
+
paint: () => ChoicePaint,
|
|
8
|
+
theme: Readonly<Ref<Readonly<MavisTheme>>>,
|
|
9
|
+
) {
|
|
10
|
+
const initial = paint()
|
|
11
|
+
let target: View | undefined
|
|
12
|
+
let playback: ReturnType<typeof animate> | undefined
|
|
13
|
+
function update(instant = false) {
|
|
14
|
+
if (!target?.isLoaded) return
|
|
15
|
+
const previous = playback
|
|
16
|
+
playback = animate(target, paint(), instant ? { duration: 0 } : choiceMotion(theme.value))
|
|
17
|
+
previous?.stop()
|
|
18
|
+
}
|
|
19
|
+
function unload() {
|
|
20
|
+
playback?.stop()
|
|
21
|
+
playback = undefined
|
|
22
|
+
target = undefined
|
|
23
|
+
}
|
|
24
|
+
watch(
|
|
25
|
+
() => [paint(), theme.value.motion],
|
|
26
|
+
() => update(),
|
|
27
|
+
{ deep: true, flush: 'post' },
|
|
28
|
+
)
|
|
29
|
+
onBeforeUnmount(unload)
|
|
30
|
+
return {
|
|
31
|
+
style: initial,
|
|
32
|
+
onLoaded: (event: EventData) => {
|
|
33
|
+
unload()
|
|
34
|
+
target = event.object as View
|
|
35
|
+
update(true)
|
|
36
|
+
},
|
|
37
|
+
onUnloaded: unload,
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { onBeforeUnmount, watch } from 'nativescript-vue'
|
|
2
|
+
import type { EventData, View } from '@nativescript/core'
|
|
3
|
+
import type { MotionRegion } from '@getcortexlabs/mavis-core/experimental'
|
|
4
|
+
import { attachNativeMotionRegion } from '../native/motion-region.js'
|
|
5
|
+
|
|
6
|
+
export function useMotionRegion(reference: () => MotionRegion | undefined) {
|
|
7
|
+
let target: View | undefined, release: (() => void) | undefined
|
|
8
|
+
const clear = () => {
|
|
9
|
+
release?.()
|
|
10
|
+
release = undefined
|
|
11
|
+
}
|
|
12
|
+
const attach = () => {
|
|
13
|
+
clear()
|
|
14
|
+
const region = reference()
|
|
15
|
+
if (region && target?.isLoaded) release = attachNativeMotionRegion(region, target)
|
|
16
|
+
}
|
|
17
|
+
watch(reference, attach, { flush: 'post' })
|
|
18
|
+
onBeforeUnmount(clear)
|
|
19
|
+
return {
|
|
20
|
+
onLoaded(event: EventData) {
|
|
21
|
+
target = event.object as View
|
|
22
|
+
attach()
|
|
23
|
+
},
|
|
24
|
+
onUnloaded() {
|
|
25
|
+
clear()
|
|
26
|
+
target = undefined
|
|
27
|
+
},
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import type { EventData, View } from '@nativescript/core'
|
|
2
|
+
import { onBeforeUnmount, watch } from 'nativescript-vue'
|
|
3
|
+
import { animate, set, onReducedMotion } from '@rafaelaugusto/jolt'
|
|
4
|
+
import {
|
|
5
|
+
bindMotionSurface,
|
|
6
|
+
type MotionFrames,
|
|
7
|
+
type MotionSurface,
|
|
8
|
+
} from '@getcortexlabs/mavis-core/experimental'
|
|
9
|
+
import { nativeContinuousSurface } from '../native/motion-surface.js'
|
|
10
|
+
import { nativeMotionOwner } from '../native/motion-owner.js'
|
|
11
|
+
|
|
12
|
+
export function useMotionSurface(
|
|
13
|
+
surface: () => MotionSurface | undefined,
|
|
14
|
+
enabled: () => boolean = () => true,
|
|
15
|
+
plainText: () => boolean = () => false,
|
|
16
|
+
afterLayout = false,
|
|
17
|
+
) {
|
|
18
|
+
let view: View | undefined
|
|
19
|
+
let unbind: (() => void) | undefined
|
|
20
|
+
let offPreference: (() => void) | undefined
|
|
21
|
+
let continuous: ReturnType<typeof nativeContinuousSurface> | undefined
|
|
22
|
+
const active = new Map<ReturnType<typeof animate>, MotionFrames>()
|
|
23
|
+
let layoutView: View | undefined
|
|
24
|
+
let layoutQueued = false
|
|
25
|
+
const clearLayout = () => {
|
|
26
|
+
layoutView?.off('layoutChanged', laidOut)
|
|
27
|
+
layoutView = undefined
|
|
28
|
+
}
|
|
29
|
+
const release = () => {
|
|
30
|
+
unbind?.()
|
|
31
|
+
unbind = undefined
|
|
32
|
+
continuous = undefined
|
|
33
|
+
offPreference?.()
|
|
34
|
+
offPreference = undefined
|
|
35
|
+
for (const handle of active.keys()) handle.stop()
|
|
36
|
+
active.clear()
|
|
37
|
+
}
|
|
38
|
+
const bind = () => {
|
|
39
|
+
release()
|
|
40
|
+
const target = view
|
|
41
|
+
const reference = surface()
|
|
42
|
+
if (!target || !reference) return
|
|
43
|
+
if (
|
|
44
|
+
afterLayout &&
|
|
45
|
+
(!target.isLayoutValid ||
|
|
46
|
+
target.getActualSize().width <= 0 ||
|
|
47
|
+
target.getActualSize().height <= 0)
|
|
48
|
+
) {
|
|
49
|
+
if (layoutView !== target) {
|
|
50
|
+
clearLayout()
|
|
51
|
+
layoutView = target
|
|
52
|
+
target.on('layoutChanged', laidOut)
|
|
53
|
+
}
|
|
54
|
+
return
|
|
55
|
+
}
|
|
56
|
+
clearLayout()
|
|
57
|
+
continuous = nativeContinuousSurface(target, enabled, plainText)
|
|
58
|
+
unbind = bindMotionSurface(
|
|
59
|
+
reference,
|
|
60
|
+
nativeMotionOwner(
|
|
61
|
+
{
|
|
62
|
+
...continuous.adapter,
|
|
63
|
+
animate(values, options) {
|
|
64
|
+
continuous?.interrupt(Object.keys(values))
|
|
65
|
+
const handle = animate(target, values, options)
|
|
66
|
+
active.set(handle, values)
|
|
67
|
+
void handle.finished.then(() => active.delete(handle))
|
|
68
|
+
return handle
|
|
69
|
+
},
|
|
70
|
+
set: (values) => {
|
|
71
|
+
continuous?.interrupt(Object.keys(values))
|
|
72
|
+
return animate(target, values, { duration: 0 })
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
target,
|
|
76
|
+
),
|
|
77
|
+
)
|
|
78
|
+
offPreference = onReducedMotion((reduced) => {
|
|
79
|
+
if (!reduced) return
|
|
80
|
+
// Set only spatial channels: opacity can keep its existing timeline.
|
|
81
|
+
const values: Record<string, number> = {}
|
|
82
|
+
for (const frames of active.values())
|
|
83
|
+
for (const [property, value] of Object.entries(frames)) {
|
|
84
|
+
if (property === 'opacity') continue
|
|
85
|
+
const final = Array.isArray(value) ? value.at(-1) : value
|
|
86
|
+
if (typeof final === 'number') values[property] = final
|
|
87
|
+
}
|
|
88
|
+
if (Object.keys(values).length) set(target, values)
|
|
89
|
+
})
|
|
90
|
+
}
|
|
91
|
+
const laidOut = () => {
|
|
92
|
+
if (layoutQueued) return
|
|
93
|
+
layoutQueued = true
|
|
94
|
+
void Promise.resolve().then(() => {
|
|
95
|
+
layoutQueued = false
|
|
96
|
+
if (view) bind()
|
|
97
|
+
})
|
|
98
|
+
}
|
|
99
|
+
const unloaded = () => {
|
|
100
|
+
clearLayout()
|
|
101
|
+
release()
|
|
102
|
+
view = undefined
|
|
103
|
+
}
|
|
104
|
+
watch(surface, bind, { flush: 'post' })
|
|
105
|
+
watch(enabled, () => continuous?.refresh(), { flush: 'sync' })
|
|
106
|
+
onBeforeUnmount(unloaded)
|
|
107
|
+
return {
|
|
108
|
+
allowsActivation: () => continuous?.allowsActivation() ?? true,
|
|
109
|
+
onLoaded(event: EventData) {
|
|
110
|
+
view = event.object as View
|
|
111
|
+
bind()
|
|
112
|
+
},
|
|
113
|
+
onUnloaded: unloaded,
|
|
114
|
+
}
|
|
115
|
+
}
|
package/src/vue/use-press.ts
CHANGED
|
@@ -3,27 +3,35 @@ import { onBeforeUnmount, watch, type Ref } from 'nativescript-vue'
|
|
|
3
3
|
import type { MavisTheme } from '@getcortexlabs/mavis-core'
|
|
4
4
|
import { attachPressFeedback } from '../native/press.js'
|
|
5
5
|
|
|
6
|
-
export function usePressFeedback(
|
|
6
|
+
export function usePressFeedback(
|
|
7
|
+
enabled: () => boolean,
|
|
8
|
+
theme: Readonly<Ref<MavisTheme>>,
|
|
9
|
+
keyboard?: Readonly<Ref<boolean>>,
|
|
10
|
+
) {
|
|
7
11
|
let view: View | undefined
|
|
8
|
-
let remove:
|
|
12
|
+
let remove: ReturnType<typeof attachPressFeedback> | undefined
|
|
9
13
|
|
|
10
14
|
const release = () => {
|
|
11
15
|
remove?.()
|
|
12
16
|
remove = undefined
|
|
13
17
|
}
|
|
14
18
|
const refresh = () => {
|
|
15
|
-
|
|
16
|
-
|
|
19
|
+
if (view && enabled()) {
|
|
20
|
+
if (remove) remove.update(theme.value.motion)
|
|
21
|
+
else remove = attachPressFeedback(view, theme.value.motion)
|
|
22
|
+
} else release()
|
|
17
23
|
}
|
|
18
24
|
const unloaded = () => {
|
|
19
25
|
release()
|
|
20
26
|
view = undefined
|
|
21
27
|
}
|
|
22
|
-
watch([enabled, () => theme.value.motion
|
|
28
|
+
watch([enabled, () => theme.value.motion], refresh, { flush: 'post' })
|
|
29
|
+
if (keyboard) watch(keyboard, (pressed) => remove?.press(pressed), { flush: 'sync' })
|
|
23
30
|
onBeforeUnmount(unloaded)
|
|
24
31
|
|
|
25
32
|
return {
|
|
26
33
|
onLoaded(event: EventData) {
|
|
34
|
+
release()
|
|
27
35
|
view = event.object as View
|
|
28
36
|
refresh()
|
|
29
37
|
},
|