@vuetify/nightly 3.0.0-beta.13 → 3.0.0-beta.15
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/CHANGELOG.md +23 -5
- package/dist/json/importMap.json +26 -30
- package/dist/vuetify.css +262 -173
- package/dist/vuetify.d.ts +16645 -7306
- package/dist/vuetify.esm.js +1040 -2004
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +1038 -2003
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +531 -537
- package/dist/vuetify.min.js.map +1 -1
- package/lib/blueprints/index.d.ts +24 -32
- package/lib/blueprints/index.mjs.map +1 -1
- package/lib/blueprints/md1.d.ts +24 -32
- package/lib/blueprints/md1.mjs +3 -1
- package/lib/blueprints/md1.mjs.map +1 -1
- package/lib/blueprints/md2.d.ts +24 -32
- package/lib/blueprints/md2.mjs +3 -1
- package/lib/blueprints/md2.mjs.map +1 -1
- package/lib/blueprints/md3.d.ts +24 -32
- package/lib/blueprints/md3.mjs +2 -2
- package/lib/blueprints/md3.mjs.map +1 -1
- package/lib/components/VAlert/VAlert.mjs +2 -9
- package/lib/components/VAlert/VAlert.mjs.map +1 -1
- package/lib/components/VAlert/VAlertTitle.mjs.map +1 -1
- package/lib/components/VAlert/index.d.ts +7 -5
- package/lib/components/VAlert/index.mjs.map +1 -1
- package/lib/components/VApp/VApp.mjs +5 -7
- package/lib/components/VApp/VApp.mjs.map +1 -1
- package/lib/components/VApp/index.d.ts +4 -2
- package/lib/components/VApp/index.mjs.map +1 -1
- package/lib/components/VAppBar/VAppBar.mjs +4 -8
- package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
- package/lib/components/VAppBar/VAppBarNavIcon.mjs +0 -4
- package/lib/components/VAppBar/VAppBarNavIcon.mjs.map +1 -1
- package/lib/components/VAppBar/VAppBarTitle.mjs +2 -4
- package/lib/components/VAppBar/VAppBarTitle.mjs.map +1 -1
- package/lib/components/VAppBar/index.d.ts +7 -3
- package/lib/components/VAppBar/index.mjs.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.css +18 -1
- package/lib/components/VAutocomplete/VAutocomplete.mjs +16 -35
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.sass +11 -1
- package/lib/components/VAutocomplete/_variables.scss +1 -0
- package/lib/components/VAutocomplete/index.d.ts +267 -376
- package/lib/components/VAutocomplete/index.mjs.map +1 -1
- package/lib/components/VAvatar/VAvatar.mjs +3 -7
- package/lib/components/VAvatar/VAvatar.mjs.map +1 -1
- package/lib/components/VAvatar/index.d.ts +5 -3
- package/lib/components/VAvatar/index.mjs.map +1 -1
- package/lib/components/VBadge/VBadge.mjs +2 -6
- package/lib/components/VBadge/VBadge.mjs.map +1 -1
- package/lib/components/VBadge/index.mjs.map +1 -1
- package/lib/components/VBanner/VBanner.mjs +5 -7
- package/lib/components/VBanner/VBanner.mjs.map +1 -1
- package/lib/components/VBanner/VBannerActions.mjs +0 -4
- package/lib/components/VBanner/VBannerActions.mjs.map +1 -1
- package/lib/components/VBanner/VBannerText.mjs.map +1 -1
- package/lib/components/VBanner/index.d.ts +7 -3
- package/lib/components/VBanner/index.mjs.map +1 -1
- package/lib/components/VBottomNavigation/VBottomNavigation.mjs +2 -5
- package/lib/components/VBottomNavigation/VBottomNavigation.mjs.map +1 -1
- package/lib/components/VBottomNavigation/index.d.ts +5 -3
- package/lib/components/VBottomNavigation/index.mjs.map +1 -1
- package/lib/components/VBottomSheet/VBottomSheet.mjs +5 -5
- package/lib/components/VBottomSheet/VBottomSheet.mjs.map +1 -1
- package/lib/components/VBottomSheet/index.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs +5 -9
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbsDivider.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs +0 -5
- package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/index.d.ts +50 -40
- package/lib/components/VBreadcrumbs/index.mjs.map +1 -1
- package/lib/components/VBtn/VBtn.mjs +2 -10
- package/lib/components/VBtn/VBtn.mjs.map +1 -1
- package/lib/components/VBtn/index.d.ts +5 -3
- package/lib/components/VBtn/index.mjs.map +1 -1
- package/lib/components/VBtnGroup/VBtnGroup.mjs +2 -4
- package/lib/components/VBtnGroup/VBtnGroup.mjs.map +1 -1
- package/lib/components/VBtnGroup/index.d.ts +6 -3
- package/lib/components/VBtnGroup/index.mjs.map +1 -1
- package/lib/components/VBtnToggle/VBtnToggle.mjs +2 -7
- package/lib/components/VBtnToggle/VBtnToggle.mjs.map +1 -1
- package/lib/components/VBtnToggle/index.d.ts +20 -25
- package/lib/components/VBtnToggle/index.mjs.map +1 -1
- package/lib/components/VCalendar/VCalendar.mjs +6 -67
- package/lib/components/VCalendar/VCalendar.mjs.map +1 -1
- package/lib/components/VCalendar/VCalendarCategory.mjs +7 -18
- package/lib/components/VCalendar/VCalendarCategory.mjs.map +1 -1
- package/lib/components/VCalendar/VCalendarDaily.mjs +3 -34
- package/lib/components/VCalendar/VCalendarDaily.mjs.map +1 -1
- package/lib/components/VCalendar/VCalendarMonthly.mjs +3 -7
- package/lib/components/VCalendar/VCalendarMonthly.mjs.map +1 -1
- package/lib/components/VCalendar/VCalendarWeekly.mjs +3 -32
- package/lib/components/VCalendar/VCalendarWeekly.mjs.map +1 -1
- package/lib/components/VCalendar/index.mjs.map +1 -1
- package/lib/components/VCalendar/mixins/calendar-base.mjs +1 -19
- package/lib/components/VCalendar/mixins/calendar-base.mjs.map +1 -1
- package/lib/components/VCalendar/mixins/calendar-with-events.mjs +14 -78
- package/lib/components/VCalendar/mixins/calendar-with-events.mjs.map +1 -1
- package/lib/components/VCalendar/mixins/calendar-with-intervals.mjs +0 -30
- package/lib/components/VCalendar/mixins/calendar-with-intervals.mjs.map +1 -1
- package/lib/components/VCalendar/mixins/mouse.mjs +7 -17
- package/lib/components/VCalendar/mixins/mouse.mjs.map +1 -1
- package/lib/components/VCalendar/mixins/times.mjs +1 -9
- package/lib/components/VCalendar/mixins/times.mjs.map +1 -1
- package/lib/components/VCalendar/modes/column.mjs +0 -3
- package/lib/components/VCalendar/modes/column.mjs.map +1 -1
- package/lib/components/VCalendar/modes/common.mjs +0 -14
- package/lib/components/VCalendar/modes/common.mjs.map +1 -1
- package/lib/components/VCalendar/modes/index.mjs +0 -1
- package/lib/components/VCalendar/modes/index.mjs.map +1 -1
- package/lib/components/VCalendar/modes/stack.mjs +3 -45
- package/lib/components/VCalendar/modes/stack.mjs.map +1 -1
- package/lib/components/VCalendar/util/events.mjs +0 -1
- package/lib/components/VCalendar/util/events.mjs.map +1 -1
- package/lib/components/VCalendar/util/parser.mjs +3 -4
- package/lib/components/VCalendar/util/parser.mjs.map +1 -1
- package/lib/components/VCalendar/util/props.mjs +0 -13
- package/lib/components/VCalendar/util/props.mjs.map +1 -1
- package/lib/components/VCalendar/util/timestamp.mjs +2 -64
- package/lib/components/VCalendar/util/timestamp.mjs.map +1 -1
- package/lib/components/VCard/VCard.mjs +3 -8
- package/lib/components/VCard/VCard.mjs.map +1 -1
- package/lib/components/VCard/VCardActions.mjs +0 -4
- package/lib/components/VCard/VCardActions.mjs.map +1 -1
- package/lib/components/VCard/VCardItem.mjs +0 -5
- package/lib/components/VCard/VCardItem.mjs.map +1 -1
- package/lib/components/VCard/VCardSubtitle.mjs.map +1 -1
- package/lib/components/VCard/VCardText.mjs.map +1 -1
- package/lib/components/VCard/VCardTitle.mjs.map +1 -1
- package/lib/components/VCard/index.d.ts +13 -6
- package/lib/components/VCard/index.mjs.map +1 -1
- package/lib/components/VCarousel/VCarousel.mjs +5 -9
- package/lib/components/VCarousel/VCarousel.mjs.map +1 -1
- package/lib/components/VCarousel/VCarouselItem.mjs +0 -3
- package/lib/components/VCarousel/VCarouselItem.mjs.map +1 -1
- package/lib/components/VCarousel/index.d.ts +1 -0
- package/lib/components/VCarousel/index.mjs.map +1 -1
- package/lib/components/VCheckbox/VCheckbox.mjs +6 -6
- package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
- package/lib/components/VCheckbox/VCheckboxBtn.mjs +7 -15
- package/lib/components/VCheckbox/VCheckboxBtn.mjs.map +1 -1
- package/lib/components/VCheckbox/index.d.ts +24 -22
- package/lib/components/VCheckbox/index.mjs.map +1 -1
- package/lib/components/VChip/VChip.css +25 -0
- package/lib/components/VChip/VChip.mjs +2 -10
- package/lib/components/VChip/VChip.mjs.map +1 -1
- package/lib/components/VChip/VChip.sass +1 -0
- package/lib/components/VChip/index.d.ts +5 -3
- package/lib/components/VChip/index.mjs.map +1 -1
- package/lib/components/VChipGroup/VChipGroup.mjs +5 -6
- package/lib/components/VChipGroup/VChipGroup.mjs.map +1 -1
- package/lib/components/VChipGroup/index.mjs.map +1 -1
- package/lib/components/VCode/index.d.ts +1 -0
- package/lib/components/VCode/index.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPicker.mjs +9 -12
- package/lib/components/VColorPicker/VColorPicker.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerCanvas.mjs +5 -20
- package/lib/components/VColorPicker/VColorPickerCanvas.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerEdit.mjs +6 -10
- package/lib/components/VColorPicker/VColorPickerEdit.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerPreview.mjs +6 -8
- package/lib/components/VColorPicker/VColorPickerPreview.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerSwatches.mjs +2 -6
- package/lib/components/VColorPicker/VColorPickerSwatches.mjs.map +1 -1
- package/lib/components/VColorPicker/index.mjs.map +1 -1
- package/lib/components/VColorPicker/util/index.mjs +24 -26
- package/lib/components/VColorPicker/util/index.mjs.map +1 -1
- package/lib/components/VCombobox/VCombobox.css +13 -0
- package/lib/components/VCombobox/VCombobox.mjs +23 -50
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/VCombobox.sass +5 -0
- package/lib/components/VCombobox/_variables.scss +1 -0
- package/lib/components/VCombobox/index.d.ts +275 -384
- package/lib/components/VCombobox/index.mjs.map +1 -1
- package/lib/components/VCounter/VCounter.mjs +2 -5
- package/lib/components/VCounter/VCounter.mjs.map +1 -1
- package/lib/components/VCounter/index.d.ts +1 -0
- package/lib/components/VCounter/index.mjs.map +1 -1
- package/lib/components/VData/VData.mjs +9 -67
- package/lib/components/VData/VData.mjs.map +1 -1
- package/lib/components/VData/index.mjs.map +1 -1
- package/lib/components/VDataIterator/VDataFooter.mjs +6 -25
- package/lib/components/VDataIterator/VDataFooter.mjs.map +1 -1
- package/lib/components/VDataIterator/VDataIterator.mjs +12 -51
- package/lib/components/VDataIterator/VDataIterator.mjs.map +1 -1
- package/lib/components/VDataIterator/index.mjs.map +1 -1
- package/lib/components/VDataTable/MobileRow.mjs +3 -8
- package/lib/components/VDataTable/MobileRow.mjs.map +1 -1
- package/lib/components/VDataTable/Row.mjs +1 -8
- package/lib/components/VDataTable/Row.mjs.map +1 -1
- package/lib/components/VDataTable/RowGroup.mjs +1 -7
- package/lib/components/VDataTable/RowGroup.mjs.map +1 -1
- package/lib/components/VDataTable/VDataTable.mjs +42 -90
- package/lib/components/VDataTable/VDataTable.mjs.map +1 -1
- package/lib/components/VDataTable/VDataTableHeader.mjs +6 -10
- package/lib/components/VDataTable/VDataTableHeader.mjs.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaderDesktop.mjs +0 -18
- package/lib/components/VDataTable/VDataTableHeaderDesktop.mjs.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaderMobile.mjs +0 -9
- package/lib/components/VDataTable/VDataTableHeaderMobile.mjs.map +1 -1
- package/lib/components/VDataTable/VEditDialog.mjs +3 -17
- package/lib/components/VDataTable/VEditDialog.mjs.map +1 -1
- package/lib/components/VDataTable/VVirtualTable.mjs +3 -28
- package/lib/components/VDataTable/VVirtualTable.mjs.map +1 -1
- package/lib/components/VDataTable/index.mjs +0 -1
- package/lib/components/VDataTable/index.mjs.map +1 -1
- package/lib/components/VDataTable/mixins/header.mjs +0 -5
- package/lib/components/VDataTable/mixins/header.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePicker.mjs +2 -69
- package/lib/components/VDatePicker/VDatePicker.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePickerDateTable.mjs +1 -29
- package/lib/components/VDatePicker/VDatePickerDateTable.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePickerHeader.mjs +4 -17
- package/lib/components/VDatePicker/VDatePickerHeader.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonthTable.mjs +1 -12
- package/lib/components/VDatePicker/VDatePickerMonthTable.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePickerTitle.mjs +4 -15
- package/lib/components/VDatePicker/VDatePickerTitle.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePickerYears.mjs +4 -18
- package/lib/components/VDatePicker/VDatePickerYears.mjs.map +1 -1
- package/lib/components/VDatePicker/index.mjs.map +1 -1
- package/lib/components/VDatePicker/mixins/date-picker-table.mjs +6 -33
- package/lib/components/VDatePicker/mixins/date-picker-table.mjs.map +1 -1
- package/lib/components/VDatePicker/util/createNativeLocaleFormatter.mjs +0 -5
- package/lib/components/VDatePicker/util/createNativeLocaleFormatter.mjs.map +1 -1
- package/lib/components/VDatePicker/util/eventHelpers.mjs +2 -3
- package/lib/components/VDatePicker/util/eventHelpers.mjs.map +1 -1
- package/lib/components/VDatePicker/util/index.mjs +0 -1
- package/lib/components/VDatePicker/util/index.mjs.map +1 -1
- package/lib/components/VDatePicker/util/isDateAllowed.mjs +1 -1
- package/lib/components/VDatePicker/util/isDateAllowed.mjs.map +1 -1
- package/lib/components/VDatePicker/util/monthChange.mjs +0 -3
- package/lib/components/VDatePicker/util/monthChange.mjs.map +1 -1
- package/lib/components/VDatePicker/util/pad.mjs +1 -6
- package/lib/components/VDatePicker/util/pad.mjs.map +1 -1
- package/lib/components/VDatePicker/util/sanitizeDateString.mjs.map +1 -1
- package/lib/components/VDefaultsProvider/VDefaultsProvider.mjs +2 -4
- package/lib/components/VDefaultsProvider/VDefaultsProvider.mjs.map +1 -1
- package/lib/components/VDefaultsProvider/index.d.ts +1 -0
- package/lib/components/VDefaultsProvider/index.mjs.map +1 -1
- package/lib/components/VDialog/VDialog.mjs +7 -20
- package/lib/components/VDialog/VDialog.mjs.map +1 -1
- package/lib/components/VDialog/index.d.ts +1208 -188
- package/lib/components/VDialog/index.mjs.map +1 -1
- package/lib/components/VDivider/VDivider.mjs +2 -8
- package/lib/components/VDivider/VDivider.mjs.map +1 -1
- package/lib/components/VDivider/index.d.ts +1 -0
- package/lib/components/VDivider/index.mjs.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanel.mjs +0 -5
- package/lib/components/VExpansionPanel/VExpansionPanel.mjs.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelText.mjs +2 -6
- package/lib/components/VExpansionPanel/VExpansionPanelText.mjs.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs +3 -8
- package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanels.mjs +2 -5
- package/lib/components/VExpansionPanel/VExpansionPanels.mjs.map +1 -1
- package/lib/components/VExpansionPanel/index.mjs.map +1 -1
- package/lib/components/VField/VField.css +1 -1
- package/lib/components/VField/VField.mjs +4 -11
- package/lib/components/VField/VField.mjs.map +1 -1
- package/lib/components/VField/VField.sass +0 -1
- package/lib/components/VField/VFieldLabel.mjs +0 -3
- package/lib/components/VField/VFieldLabel.mjs.map +1 -1
- package/lib/components/VField/index.d.ts +33 -59
- package/lib/components/VField/index.mjs.map +1 -1
- package/lib/components/VFileInput/VFileInput.css +16 -0
- package/lib/components/VFileInput/VFileInput.mjs +6 -20
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VFileInput/VFileInput.sass +10 -0
- package/lib/components/VFileInput/_variables.scss +2 -0
- package/lib/components/VFileInput/index.d.ts +233 -5
- package/lib/components/VFileInput/index.mjs.map +1 -1
- package/lib/components/VFooter/VFooter.mjs +2 -4
- package/lib/components/VFooter/VFooter.mjs.map +1 -1
- package/lib/components/VFooter/index.d.ts +1 -0
- package/lib/components/VFooter/index.mjs.map +1 -1
- package/lib/components/VForm/VForm.mjs +2 -13
- package/lib/components/VForm/VForm.mjs.map +1 -1
- package/lib/components/VForm/index.d.ts +1 -1
- package/lib/components/VForm/index.mjs.map +1 -1
- package/lib/components/VGrid/VCol.mjs +8 -23
- package/lib/components/VGrid/VCol.mjs.map +1 -1
- package/lib/components/VGrid/VContainer.mjs +2 -4
- package/lib/components/VGrid/VContainer.mjs.map +1 -1
- package/lib/components/VGrid/VRow.mjs +6 -24
- package/lib/components/VGrid/VRow.mjs.map +1 -1
- package/lib/components/VGrid/VSpacer.mjs.map +1 -1
- package/lib/components/VGrid/index.d.ts +2 -0
- package/lib/components/VGrid/index.mjs.map +1 -1
- package/lib/components/VHover/VHover.mjs +0 -4
- package/lib/components/VHover/VHover.mjs.map +1 -1
- package/lib/components/VHover/index.d.ts +1 -0
- package/lib/components/VHover/index.mjs.map +1 -1
- package/lib/components/VIcon/VIcon.mjs +2 -8
- package/lib/components/VIcon/VIcon.mjs.map +1 -1
- package/lib/components/VIcon/index.d.ts +1 -0
- package/lib/components/VIcon/index.mjs.map +1 -1
- package/lib/components/VImg/VImg.mjs +9 -35
- package/lib/components/VImg/VImg.mjs.map +1 -1
- package/lib/components/VImg/index.d.ts +8 -4
- package/lib/components/VImg/index.mjs.map +1 -1
- package/lib/components/VInput/InputIcon.mjs +0 -2
- package/lib/components/VInput/InputIcon.mjs.map +1 -1
- package/lib/components/VInput/VInput.mjs +5 -9
- package/lib/components/VInput/VInput.mjs.map +1 -1
- package/lib/components/VInput/index.d.ts +29 -45
- package/lib/components/VInput/index.mjs.map +1 -1
- package/lib/components/VItemGroup/VItem.mjs +0 -5
- package/lib/components/VItemGroup/VItem.mjs.map +1 -1
- package/lib/components/VItemGroup/VItemGroup.mjs +4 -6
- package/lib/components/VItemGroup/VItemGroup.mjs.map +1 -1
- package/lib/components/VItemGroup/index.d.ts +19 -25
- package/lib/components/VItemGroup/index.mjs.map +1 -1
- package/lib/components/VKbd/index.d.ts +1 -0
- package/lib/components/VKbd/index.mjs.map +1 -1
- package/lib/components/VLabel/VLabel.mjs +2 -5
- package/lib/components/VLabel/VLabel.mjs.map +1 -1
- package/lib/components/VLabel/index.mjs.map +1 -1
- package/lib/components/VLayout/VLayout.mjs +2 -5
- package/lib/components/VLayout/VLayout.mjs.map +1 -1
- package/lib/components/VLayout/VLayoutItem.mjs +2 -6
- package/lib/components/VLayout/VLayoutItem.mjs.map +1 -1
- package/lib/components/VLayout/index.d.ts +5 -2
- package/lib/components/VLayout/index.mjs.map +1 -1
- package/lib/components/VLazy/VLazy.mjs +0 -8
- package/lib/components/VLazy/VLazy.mjs.map +1 -1
- package/lib/components/VLazy/index.d.ts +1 -0
- package/lib/components/VLazy/index.mjs.map +1 -1
- package/lib/components/VList/VList.mjs +2 -11
- package/lib/components/VList/VList.mjs.map +1 -1
- package/lib/components/VList/VListChildren.mjs +12 -21
- package/lib/components/VList/VListChildren.mjs.map +1 -1
- package/lib/components/VList/VListGroup.mjs +1 -12
- package/lib/components/VList/VListGroup.mjs.map +1 -1
- package/lib/components/VList/VListImg.mjs.map +1 -1
- package/lib/components/VList/VListItem.mjs +2 -12
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VList/VListItemAction.mjs +0 -3
- package/lib/components/VList/VListItemAction.mjs.map +1 -1
- package/lib/components/VList/VListItemMedia.mjs +0 -3
- package/lib/components/VList/VListItemMedia.mjs.map +1 -1
- package/lib/components/VList/VListItemSubtitle.mjs.map +1 -1
- package/lib/components/VList/VListItemTitle.mjs.map +1 -1
- package/lib/components/VList/VListSubheader.mjs +0 -4
- package/lib/components/VList/VListSubheader.mjs.map +1 -1
- package/lib/components/VList/index.d.ts +147 -170
- package/lib/components/VList/index.mjs.map +1 -1
- package/lib/components/VList/list.mjs +5 -2
- package/lib/components/VList/list.mjs.map +1 -1
- package/lib/components/VLocaleProvider/VLocaleProvider.mjs +4 -9
- package/lib/components/VLocaleProvider/VLocaleProvider.mjs.map +1 -1
- package/lib/components/VLocaleProvider/index.d.ts +1 -0
- package/lib/components/VLocaleProvider/index.mjs.map +1 -1
- package/lib/components/VMain/VMain.mjs +2 -5
- package/lib/components/VMain/VMain.mjs.map +1 -1
- package/lib/components/VMain/index.d.ts +1 -0
- package/lib/components/VMain/index.mjs.map +1 -1
- package/lib/components/VMenu/VMenu.mjs +3 -14
- package/lib/components/VMenu/VMenu.mjs.map +1 -1
- package/lib/components/VMenu/index.d.ts +1203 -183
- package/lib/components/VMenu/index.mjs.map +1 -1
- package/lib/components/VMenu/shared.mjs.map +1 -1
- package/lib/components/VMessages/VMessages.mjs +2 -6
- package/lib/components/VMessages/VMessages.mjs.map +1 -1
- package/lib/components/VMessages/index.d.ts +1 -0
- package/lib/components/VMessages/index.mjs.map +1 -1
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +6 -11
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
- package/lib/components/VNavigationDrawer/index.mjs.map +1 -1
- package/lib/components/VNavigationDrawer/sticky.mjs +0 -4
- package/lib/components/VNavigationDrawer/sticky.mjs.map +1 -1
- package/lib/components/VNavigationDrawer/touch.mjs +2 -15
- package/lib/components/VNavigationDrawer/touch.mjs.map +1 -1
- package/lib/components/VNoSsr/VNoSsr.mjs +0 -4
- package/lib/components/VNoSsr/VNoSsr.mjs.map +1 -1
- package/lib/components/VNoSsr/index.d.ts +1 -0
- package/lib/components/VNoSsr/index.mjs.map +1 -1
- package/lib/components/VOtpInput/VOtpInput.mjs +7 -58
- package/lib/components/VOtpInput/VOtpInput.mjs.map +1 -1
- package/lib/components/VOtpInput/index.mjs.map +1 -1
- package/lib/components/VOverflowBtn/VOverflowBtn.mjs +7 -19
- package/lib/components/VOverflowBtn/VOverflowBtn.mjs.map +1 -1
- package/lib/components/VOverflowBtn/index.mjs.map +1 -1
- package/lib/components/VOverlay/VOverlay.mjs +8 -17
- package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
- package/lib/components/VOverlay/index.d.ts +32 -60
- package/lib/components/VOverlay/index.mjs.map +1 -1
- package/lib/components/VOverlay/locationStrategies.mjs +23 -56
- package/lib/components/VOverlay/locationStrategies.mjs.map +1 -1
- package/lib/components/VOverlay/requestNewFrame.mjs +1 -2
- package/lib/components/VOverlay/requestNewFrame.mjs.map +1 -1
- package/lib/components/VOverlay/scrollStrategies.mjs +2 -18
- package/lib/components/VOverlay/scrollStrategies.mjs.map +1 -1
- package/lib/components/VOverlay/useActivator.mjs +6 -32
- package/lib/components/VOverlay/useActivator.mjs.map +1 -1
- package/lib/components/VOverlay/util/point.mjs +3 -4
- package/lib/components/VOverlay/util/point.mjs.map +1 -1
- package/lib/components/VPagination/VPagination.mjs +11 -23
- package/lib/components/VPagination/VPagination.mjs.map +1 -1
- package/lib/components/VPagination/index.d.ts +5 -3
- package/lib/components/VPagination/index.mjs.map +1 -1
- package/lib/components/VParallax/VParallax.mjs +6 -12
- package/lib/components/VParallax/VParallax.mjs.map +1 -1
- package/lib/components/VParallax/index.mjs.map +1 -1
- package/lib/components/VPicker/VPicker.mjs +3 -12
- package/lib/components/VPicker/VPicker.mjs.map +1 -1
- package/lib/components/VPicker/index.mjs.map +1 -1
- package/lib/components/VProgressCircular/VProgressCircular.mjs +2 -5
- package/lib/components/VProgressCircular/VProgressCircular.mjs.map +1 -1
- package/lib/components/VProgressCircular/index.d.ts +1 -0
- package/lib/components/VProgressCircular/index.mjs.map +1 -1
- package/lib/components/VProgressLinear/VProgressLinear.mjs +5 -8
- package/lib/components/VProgressLinear/VProgressLinear.mjs.map +1 -1
- package/lib/components/VProgressLinear/index.d.ts +1 -0
- package/lib/components/VProgressLinear/index.mjs.map +1 -1
- package/lib/components/VRadio/VRadio.mjs +2 -4
- package/lib/components/VRadio/VRadio.mjs.map +1 -1
- package/lib/components/VRadio/index.d.ts +13 -11
- package/lib/components/VRadio/index.mjs.map +1 -1
- package/lib/components/VRadioGroup/VRadioGroup.mjs +15 -20
- package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
- package/lib/components/VRadioGroup/index.d.ts +26 -38
- package/lib/components/VRadioGroup/index.mjs.map +1 -1
- package/lib/components/VRangeSlider/VRangeSlider.mjs +13 -26
- package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
- package/lib/components/VRangeSlider/index.d.ts +5 -3
- package/lib/components/VRangeSlider/index.mjs.map +1 -1
- package/lib/components/VRating/VRating.mjs +4 -22
- package/lib/components/VRating/VRating.mjs.map +1 -1
- package/lib/components/VRating/index.d.ts +32 -40
- package/lib/components/VRating/index.mjs.map +1 -1
- package/lib/components/VResponsive/VResponsive.mjs +2 -5
- package/lib/components/VResponsive/VResponsive.mjs.map +1 -1
- package/lib/components/VResponsive/index.d.ts +1 -0
- package/lib/components/VResponsive/index.mjs.map +1 -1
- package/lib/components/VSelect/VSelect.css +13 -0
- package/lib/components/VSelect/VSelect.mjs +9 -22
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/VSelect.sass +6 -0
- package/lib/components/VSelect/_variables.scss +1 -0
- package/lib/components/VSelect/index.d.ts +4264 -776
- package/lib/components/VSelect/index.mjs.map +1 -1
- package/lib/components/VSelectionControl/VSelectionControl.mjs +14 -58
- package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
- package/lib/components/VSelectionControl/index.d.ts +62 -78
- package/lib/components/VSelectionControl/index.mjs.map +1 -1
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.css +1 -0
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs +56 -28
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs.map +1 -1
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.sass +1 -0
- package/lib/components/VSelectionControlGroup/index.d.ts +53 -4
- package/lib/components/VSelectionControlGroup/index.mjs.map +1 -1
- package/lib/components/VSheet/VSheet.mjs +2 -4
- package/lib/components/VSheet/VSheet.mjs.map +1 -1
- package/lib/components/VSheet/index.d.ts +1 -0
- package/lib/components/VSheet/index.mjs.map +1 -1
- package/lib/components/VSkeletonLoader/VSkeletonLoader.mjs +19 -32
- package/lib/components/VSkeletonLoader/VSkeletonLoader.mjs.map +1 -1
- package/lib/components/VSkeletonLoader/index.mjs.map +1 -1
- package/lib/components/VSlideGroup/VSlideGroup.mjs +16 -47
- package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
- package/lib/components/VSlideGroup/VSlideGroupItem.mjs +5 -9
- package/lib/components/VSlideGroup/VSlideGroupItem.mjs.map +1 -1
- package/lib/components/VSlideGroup/helpers.mjs +0 -2
- package/lib/components/VSlideGroup/helpers.mjs.map +1 -1
- package/lib/components/VSlideGroup/index.d.ts +342 -59
- package/lib/components/VSlideGroup/index.mjs.map +1 -1
- package/lib/components/VSlider/VSlider.mjs +6 -9
- package/lib/components/VSlider/VSlider.mjs.map +1 -1
- package/lib/components/VSlider/VSliderThumb.mjs +4 -15
- package/lib/components/VSlider/VSliderThumb.mjs.map +1 -1
- package/lib/components/VSlider/VSliderTrack.mjs +6 -8
- package/lib/components/VSlider/VSliderTrack.mjs.map +1 -1
- package/lib/components/VSlider/index.d.ts +5 -3
- package/lib/components/VSlider/index.mjs.map +1 -1
- package/lib/components/VSlider/slider.mjs +6 -27
- package/lib/components/VSlider/slider.mjs.map +1 -1
- package/lib/components/VSnackbar/VSnackbar.mjs +3 -10
- package/lib/components/VSnackbar/VSnackbar.mjs.map +1 -1
- package/lib/components/VSnackbar/index.d.ts +1215 -191
- package/lib/components/VSnackbar/index.mjs.map +1 -1
- package/lib/components/VSparkline/VSparkline.mjs +5 -40
- package/lib/components/VSparkline/VSparkline.mjs.map +1 -1
- package/lib/components/VSparkline/helpers/core.mjs +1 -1
- package/lib/components/VSparkline/helpers/core.mjs.map +1 -1
- package/lib/components/VSparkline/helpers/math.mjs +2 -3
- package/lib/components/VSparkline/helpers/math.mjs.map +1 -1
- package/lib/components/VSparkline/helpers/path.mjs +0 -4
- package/lib/components/VSparkline/helpers/path.mjs.map +1 -1
- package/lib/components/VSparkline/index.mjs.map +1 -1
- package/lib/components/VSpeedDial/VSpeedDial.mjs +3 -12
- package/lib/components/VSpeedDial/VSpeedDial.mjs.map +1 -1
- package/lib/components/VSpeedDial/index.mjs.map +1 -1
- package/lib/components/VStepper/VStepper.mjs +5 -24
- package/lib/components/VStepper/VStepper.mjs.map +1 -1
- package/lib/components/VStepper/VStepperContent.mjs +4 -25
- package/lib/components/VStepper/VStepperContent.mjs.map +1 -1
- package/lib/components/VStepper/VStepperStep.mjs +0 -24
- package/lib/components/VStepper/VStepperStep.mjs.map +1 -1
- package/lib/components/VStepper/index.mjs.map +1 -1
- package/lib/components/VSwitch/VSwitch.mjs +14 -15
- package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
- package/lib/components/VSwitch/index.d.ts +15 -11
- package/lib/components/VSwitch/index.mjs.map +1 -1
- package/lib/components/VSystemBar/VSystemBar.mjs +2 -4
- package/lib/components/VSystemBar/VSystemBar.mjs.map +1 -1
- package/lib/components/VSystemBar/index.d.ts +1 -0
- package/lib/components/VSystemBar/index.mjs.map +1 -1
- package/lib/components/VTable/VTable.css +3 -3
- package/lib/components/VTable/VTable.mjs +5 -6
- package/lib/components/VTable/VTable.mjs.map +1 -1
- package/lib/components/VTable/VTable.sass +9 -3
- package/lib/components/VTable/index.d.ts +8 -3
- package/lib/components/VTable/index.mjs.map +1 -1
- package/lib/components/VTabs/VTab.mjs +2 -10
- package/lib/components/VTabs/VTab.mjs.map +1 -1
- package/lib/components/VTabs/VTabs.css +5 -5
- package/lib/components/VTabs/VTabs.mjs +12 -17
- package/lib/components/VTabs/VTabs.mjs.map +1 -1
- package/lib/components/VTabs/VTabs.sass +4 -4
- package/lib/components/VTabs/_variables.scss +1 -1
- package/lib/components/VTabs/index.d.ts +23 -15
- package/lib/components/VTabs/index.mjs.map +1 -1
- package/lib/components/VTabs/shared.mjs.map +1 -1
- package/lib/components/VTextField/VTextField.mjs +13 -24
- package/lib/components/VTextField/VTextField.mjs.map +1 -1
- package/lib/components/VTextField/index.d.ts +1375 -191
- package/lib/components/VTextField/index.mjs.map +1 -1
- package/lib/components/VTextarea/VTextarea.mjs +6 -24
- package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
- package/lib/components/VTextarea/index.d.ts +233 -5
- package/lib/components/VTextarea/index.mjs.map +1 -1
- package/lib/components/VThemeProvider/VThemeProvider.mjs +2 -5
- package/lib/components/VThemeProvider/VThemeProvider.mjs.map +1 -1
- package/lib/components/VThemeProvider/index.d.ts +1 -0
- package/lib/components/VThemeProvider/index.mjs.map +1 -1
- package/lib/components/VTimePicker/SelectingTimes.mjs +0 -3
- package/lib/components/VTimePicker/SelectingTimes.mjs.map +1 -1
- package/lib/components/VTimePicker/VTimePicker.mjs +3 -53
- package/lib/components/VTimePicker/VTimePicker.mjs.map +1 -1
- package/lib/components/VTimePicker/VTimePickerClock.mjs +6 -42
- package/lib/components/VTimePicker/VTimePickerClock.mjs.map +1 -1
- package/lib/components/VTimePicker/VTimePickerTitle.mjs +4 -13
- package/lib/components/VTimePicker/VTimePickerTitle.mjs.map +1 -1
- package/lib/components/VTimePicker/index.mjs.map +1 -1
- package/lib/components/VTimeline/VTimeline.mjs +2 -9
- package/lib/components/VTimeline/VTimeline.mjs.map +1 -1
- package/lib/components/VTimeline/VTimelineDivider.mjs +0 -5
- package/lib/components/VTimeline/VTimelineDivider.mjs.map +1 -1
- package/lib/components/VTimeline/VTimelineItem.mjs +0 -6
- package/lib/components/VTimeline/VTimelineItem.mjs.map +1 -1
- package/lib/components/VTimeline/index.d.ts +7 -3
- package/lib/components/VTimeline/index.mjs.map +1 -1
- package/lib/components/VToolbar/VToolbar.mjs +2 -8
- package/lib/components/VToolbar/VToolbar.mjs.map +1 -1
- package/lib/components/VToolbar/VToolbarItems.mjs +0 -4
- package/lib/components/VToolbar/VToolbarItems.mjs.map +1 -1
- package/lib/components/VToolbar/VToolbarTitle.mjs +0 -5
- package/lib/components/VToolbar/VToolbarTitle.mjs.map +1 -1
- package/lib/components/VToolbar/index.d.ts +34 -71
- package/lib/components/VToolbar/index.mjs.map +1 -1
- package/lib/components/VTooltip/VTooltip.mjs +2 -8
- package/lib/components/VTooltip/VTooltip.mjs.map +1 -1
- package/lib/components/VTooltip/index.d.ts +1196 -176
- package/lib/components/VTooltip/index.mjs.map +1 -1
- package/lib/components/VTreeview/VTreeview.mjs +17 -72
- package/lib/components/VTreeview/VTreeview.mjs.map +1 -1
- package/lib/components/VTreeview/VTreeviewNode.mjs +2 -32
- package/lib/components/VTreeview/VTreeviewNode.mjs.map +1 -1
- package/lib/components/VTreeview/index.mjs.map +1 -1
- package/lib/components/VTreeview/util/filterTreeItems.mjs +0 -6
- package/lib/components/VTreeview/util/filterTreeItems.mjs.map +1 -1
- package/lib/components/VValidation/VValidation.mjs +2 -5
- package/lib/components/VValidation/VValidation.mjs.map +1 -1
- package/lib/components/VValidation/index.d.ts +1 -0
- package/lib/components/VValidation/index.mjs.map +1 -1
- package/lib/components/VVirtualScroll/VVirtualScroll.mjs +3 -18
- package/lib/components/VVirtualScroll/VVirtualScroll.mjs.map +1 -1
- package/lib/components/VVirtualScroll/index.mjs.map +1 -1
- package/lib/components/VWindow/VWindow.mjs +5 -15
- package/lib/components/VWindow/VWindow.mjs.map +1 -1
- package/lib/components/VWindow/VWindowItem.mjs +8 -21
- package/lib/components/VWindow/VWindowItem.mjs.map +1 -1
- package/lib/components/VWindow/index.d.ts +37 -87
- package/lib/components/VWindow/index.mjs.map +1 -1
- package/lib/components/index.d.ts +16084 -6799
- package/lib/components/index.mjs +0 -11
- package/lib/components/index.mjs.map +1 -1
- package/lib/components/transitions/createTransition.mjs +0 -10
- package/lib/components/transitions/createTransition.mjs.map +1 -1
- package/lib/components/transitions/dialog-transition.mjs +3 -18
- package/lib/components/transitions/dialog-transition.mjs.map +1 -1
- package/lib/components/transitions/expand-transition.mjs +2 -11
- package/lib/components/transitions/expand-transition.mjs.map +1 -1
- package/lib/components/transitions/index.d.ts +16 -0
- package/lib/components/transitions/index.mjs +5 -4
- package/lib/components/transitions/index.mjs.map +1 -1
- package/lib/composables/border.mjs +0 -3
- package/lib/composables/border.mjs.map +1 -1
- package/lib/composables/color.mjs +0 -4
- package/lib/composables/color.mjs.map +1 -1
- package/lib/composables/defaults.mjs +0 -5
- package/lib/composables/defaults.mjs.map +1 -1
- package/lib/composables/delay.mjs +0 -3
- package/lib/composables/delay.mjs.map +1 -1
- package/lib/composables/density.mjs +4 -1
- package/lib/composables/density.mjs.map +1 -1
- package/lib/composables/dimensions.mjs +0 -1
- package/lib/composables/dimensions.mjs.map +1 -1
- package/lib/composables/display.mjs +7 -20
- package/lib/composables/display.mjs.map +1 -1
- package/lib/composables/elevation.mjs +2 -4
- package/lib/composables/elevation.mjs.map +1 -1
- package/lib/composables/filter.mjs +7 -14
- package/lib/composables/filter.mjs.map +1 -1
- package/lib/composables/focus.mjs +0 -5
- package/lib/composables/focus.mjs.map +1 -1
- package/lib/composables/form.mjs +1 -14
- package/lib/composables/form.mjs.map +1 -1
- package/lib/composables/forwardRefs.mjs +9 -16
- package/lib/composables/forwardRefs.mjs.map +1 -1
- package/lib/composables/group.mjs +10 -33
- package/lib/composables/group.mjs.map +1 -1
- package/lib/composables/hydration.mjs +0 -1
- package/lib/composables/hydration.mjs.map +1 -1
- package/lib/composables/icons.mjs +4 -17
- package/lib/composables/icons.mjs.map +1 -1
- package/lib/composables/index.mjs +1 -2
- package/lib/composables/index.mjs.map +1 -1
- package/lib/composables/intersectionObserver.mjs +0 -3
- package/lib/composables/intersectionObserver.mjs.map +1 -1
- package/lib/composables/items.mjs +3 -15
- package/lib/composables/items.mjs.map +1 -1
- package/lib/composables/layout.mjs +29 -31
- package/lib/composables/layout.mjs.map +1 -1
- package/lib/composables/lazy.mjs +2 -3
- package/lib/composables/lazy.mjs.map +1 -1
- package/lib/composables/loader.mjs +0 -3
- package/lib/composables/loader.mjs.map +1 -1
- package/lib/composables/locale.mjs +46 -118
- package/lib/composables/locale.mjs.map +1 -1
- package/lib/composables/location.mjs +1 -8
- package/lib/composables/location.mjs.map +1 -1
- package/lib/composables/mutationObserver.mjs +3 -1
- package/lib/composables/mutationObserver.mjs.map +1 -1
- package/lib/composables/nested/nested.mjs +4 -20
- package/lib/composables/nested/nested.mjs.map +1 -1
- package/lib/composables/nested/openStrategies.mjs +0 -9
- package/lib/composables/nested/openStrategies.mjs.map +1 -1
- package/lib/composables/nested/selectStrategies.mjs +6 -21
- package/lib/composables/nested/selectStrategies.mjs.map +1 -1
- package/lib/composables/position.mjs +1 -4
- package/lib/composables/position.mjs.map +1 -1
- package/lib/composables/proxiedModel.mjs +3 -9
- package/lib/composables/proxiedModel.mjs.map +1 -1
- package/lib/composables/refs.mjs +0 -2
- package/lib/composables/refs.mjs.map +1 -1
- package/lib/composables/resizeObserver.mjs +0 -3
- package/lib/composables/resizeObserver.mjs.map +1 -1
- package/lib/composables/rounded.mjs +0 -3
- package/lib/composables/rounded.mjs.map +1 -1
- package/lib/composables/router.mjs +3 -11
- package/lib/composables/router.mjs.map +1 -1
- package/lib/composables/scopeId.mjs.map +1 -1
- package/lib/composables/scroll.mjs +3 -9
- package/lib/composables/scroll.mjs.map +1 -1
- package/lib/composables/selectLink.mjs +3 -2
- package/lib/composables/selectLink.mjs.map +1 -1
- package/lib/composables/size.mjs +0 -3
- package/lib/composables/size.mjs.map +1 -1
- package/lib/composables/ssrBoot.mjs +2 -1
- package/lib/composables/ssrBoot.mjs.map +1 -1
- package/lib/composables/stack.mjs +0 -6
- package/lib/composables/stack.mjs.map +1 -1
- package/lib/composables/tag.mjs +0 -1
- package/lib/composables/tag.mjs.map +1 -1
- package/lib/composables/teleport.mjs +0 -4
- package/lib/composables/teleport.mjs.map +1 -1
- package/lib/composables/theme.mjs +18 -38
- package/lib/composables/theme.mjs.map +1 -1
- package/lib/composables/toggleScope.mjs +0 -1
- package/lib/composables/toggleScope.mjs.map +1 -1
- package/lib/composables/touch.mjs +5 -28
- package/lib/composables/touch.mjs.map +1 -1
- package/lib/composables/transition.mjs +0 -2
- package/lib/composables/transition.mjs.map +1 -1
- package/lib/composables/validation.mjs +3 -13
- package/lib/composables/validation.mjs.map +1 -1
- package/lib/composables/variant.mjs +0 -2
- package/lib/composables/variant.mjs.map +1 -1
- package/lib/directives/click-outside/index.mjs +10 -22
- package/lib/directives/click-outside/index.mjs.map +1 -1
- package/lib/directives/color/index.mjs +0 -11
- package/lib/directives/color/index.mjs.map +1 -1
- package/lib/directives/index.d.ts +104 -13
- package/lib/directives/index.mjs +0 -1
- package/lib/directives/index.mjs.map +1 -1
- package/lib/directives/intersect/index.mjs +3 -10
- package/lib/directives/intersect/index.mjs.map +1 -1
- package/lib/directives/mutate/index.mjs +1 -5
- package/lib/directives/mutate/index.mjs.map +1 -1
- package/lib/directives/resize/index.mjs +0 -5
- package/lib/directives/resize/index.mjs.map +1 -1
- package/lib/directives/ripple/index.mjs +11 -63
- package/lib/directives/ripple/index.mjs.map +1 -1
- package/lib/directives/scroll/index.mjs +0 -4
- package/lib/directives/scroll/index.mjs.map +1 -1
- package/lib/directives/touch/index.mjs +0 -15
- package/lib/directives/touch/index.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/entry-bundler.mjs.map +1 -1
- package/lib/framework.mjs +24 -22
- package/lib/framework.mjs.map +1 -1
- package/lib/iconsets/fa-svg.mjs +0 -1
- package/lib/iconsets/fa-svg.mjs.map +1 -1
- package/lib/iconsets/fa.mjs +0 -1
- package/lib/iconsets/fa.mjs.map +1 -1
- package/lib/iconsets/fa4.mjs +4 -3
- package/lib/iconsets/fa4.mjs.map +1 -1
- package/lib/iconsets/md.mjs +4 -3
- package/lib/iconsets/md.mjs.map +1 -1
- package/lib/iconsets/mdi-svg.mjs +0 -1
- package/lib/iconsets/mdi-svg.mjs.map +1 -1
- package/lib/iconsets/mdi.mjs +4 -3
- package/lib/iconsets/mdi.mjs.map +1 -1
- package/lib/index.d.ts +92 -106
- package/lib/locale/adapters/vue-i18n.d.ts +10 -16
- package/lib/locale/adapters/vue-i18n.mjs +59 -52
- package/lib/locale/adapters/vue-i18n.mjs.map +1 -1
- package/lib/locale/adapters/vuetify.d.ts +24 -0
- package/lib/locale/adapters/vuetify.mjs +97 -0
- package/lib/locale/adapters/vuetify.mjs.map +1 -0
- package/lib/locale/af.mjs.map +1 -1
- package/lib/locale/ar.mjs.map +1 -1
- package/lib/locale/az.mjs.map +1 -1
- package/lib/locale/bg.mjs.map +1 -1
- package/lib/locale/ca.mjs.map +1 -1
- package/lib/locale/ckb.mjs.map +1 -1
- package/lib/locale/cs.mjs.map +1 -1
- package/lib/locale/da.mjs.map +1 -1
- package/lib/locale/de.mjs.map +1 -1
- package/lib/locale/el.mjs.map +1 -1
- package/lib/locale/en.mjs.map +1 -1
- package/lib/locale/es.mjs.map +1 -1
- package/lib/locale/et.mjs.map +1 -1
- package/lib/locale/fa.mjs.map +1 -1
- package/lib/locale/fi.mjs.map +1 -1
- package/lib/locale/fr.mjs.map +1 -1
- package/lib/locale/he.mjs.map +1 -1
- package/lib/locale/hr.mjs.map +1 -1
- package/lib/locale/hu.mjs.map +1 -1
- package/lib/locale/id.mjs.map +1 -1
- package/lib/locale/index.d.ts +2 -2
- package/lib/locale/index.mjs +1 -1
- package/lib/locale/index.mjs.map +1 -1
- package/lib/locale/it.mjs.map +1 -1
- package/lib/locale/ja.mjs.map +1 -1
- package/lib/locale/ko.mjs.map +1 -1
- package/lib/locale/lt.mjs.map +1 -1
- package/lib/locale/lv.mjs.map +1 -1
- package/lib/locale/nl.mjs.map +1 -1
- package/lib/locale/no.mjs.map +1 -1
- package/lib/locale/pl.mjs +7 -7
- package/lib/locale/pl.mjs.map +1 -1
- package/lib/locale/pt.mjs.map +1 -1
- package/lib/locale/ro.mjs.map +1 -1
- package/lib/locale/ru.mjs.map +1 -1
- package/lib/locale/sk.mjs.map +1 -1
- package/lib/locale/sl.mjs.map +1 -1
- package/lib/locale/sr-Cyrl.mjs.map +1 -1
- package/lib/locale/sr-Latn.mjs.map +1 -1
- package/lib/locale/sv.mjs.map +1 -1
- package/lib/locale/th.mjs.map +1 -1
- package/lib/locale/tr.mjs.map +1 -1
- package/lib/locale/uk.mjs.map +1 -1
- package/lib/locale/vi.mjs.map +1 -1
- package/lib/locale/zh-Hans.mjs.map +1 -1
- package/lib/locale/zh-Hant.mjs.map +1 -1
- package/lib/services/goto/easing-patterns.mjs +24 -24
- package/lib/services/goto/easing-patterns.mjs.map +1 -1
- package/lib/services/goto/index.mjs +11 -15
- package/lib/services/goto/index.mjs.map +1 -1
- package/lib/services/goto/util.mjs +1 -8
- package/lib/services/goto/util.mjs.map +1 -1
- package/lib/styles/main.css +4 -0
- package/lib/styles/settings/_utilities.scss +7 -0
- package/lib/util/anchor.mjs +0 -3
- package/lib/util/anchor.mjs.map +1 -1
- package/lib/util/animation.mjs +0 -6
- package/lib/util/animation.mjs.map +1 -1
- package/lib/util/box.mjs +0 -5
- package/lib/util/box.mjs.map +1 -1
- package/lib/util/color/APCA.mjs +23 -21
- package/lib/util/color/APCA.mjs.map +1 -1
- package/lib/util/color/transformCIELAB.mjs +0 -2
- package/lib/util/color/transformCIELAB.mjs.map +1 -1
- package/lib/util/color/transformSRGB.mjs +14 -12
- package/lib/util/color/transformSRGB.mjs.map +1 -1
- package/lib/util/colorUtils.mjs +8 -25
- package/lib/util/colorUtils.mjs.map +1 -1
- package/lib/util/colors.mjs.map +1 -1
- package/lib/util/console.mjs +5 -14
- package/lib/util/console.mjs.map +1 -1
- package/lib/util/createSimpleFunctional.mjs +0 -3
- package/lib/util/createSimpleFunctional.mjs.map +1 -1
- package/lib/util/dateTimeUtils.mjs +0 -10
- package/lib/util/dateTimeUtils.mjs.map +1 -1
- package/lib/util/defineComponent.mjs +6 -22
- package/lib/util/defineComponent.mjs.map +1 -1
- package/lib/util/dom.mjs +4 -4
- package/lib/util/dom.mjs.map +1 -1
- package/lib/util/easing.mjs +0 -1
- package/lib/util/easing.mjs.map +1 -1
- package/lib/util/getCurrentInstance.mjs +1 -7
- package/lib/util/getCurrentInstance.mjs.map +1 -1
- package/lib/util/getScrollParent.mjs +0 -3
- package/lib/util/getScrollParent.mjs.map +1 -1
- package/lib/util/globals.mjs.map +1 -1
- package/lib/util/helpers.mjs +18 -75
- package/lib/util/helpers.mjs.map +1 -1
- package/lib/util/injectSelf.mjs +0 -1
- package/lib/util/injectSelf.mjs.map +1 -1
- package/lib/util/isFixedPosition.mjs +0 -2
- package/lib/util/isFixedPosition.mjs.map +1 -1
- package/lib/util/propsFactory.mjs +11 -5
- package/lib/util/propsFactory.mjs.map +1 -1
- package/lib/util/useRender.mjs +0 -1
- package/lib/util/useRender.mjs.map +1 -1
- package/package.json +6 -10
- package/dist/json/attributes.json +0 -5602
- package/dist/json/tags.json +0 -1945
- package/dist/json/web-types.json +0 -19006
- package/lib/composables/rtl.mjs +0 -42
- package/lib/composables/rtl.mjs.map +0 -1
- package/lib/locale/adapters/vue-intl.d.ts +0 -42
- package/lib/locale/adapters/vue-intl.mjs +0 -65
- package/lib/locale/adapters/vue-intl.mjs.map +0 -1
|
@@ -1,25 +1,20 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
|
|
3
2
|
/* eslint-disable */
|
|
3
|
+
|
|
4
4
|
// Return target's cumulative offset from the top
|
|
5
5
|
export function getOffset(target) {
|
|
6
6
|
if (typeof target === 'number') {
|
|
7
7
|
return target;
|
|
8
8
|
}
|
|
9
|
-
|
|
10
9
|
let el = $(target);
|
|
11
|
-
|
|
12
10
|
if (!el) {
|
|
13
11
|
throw typeof target === 'string' ? new Error(`Target element "${target}" not found.`) : new TypeError(`Target must be a Number/Selector/HTMLElement/VueComponent, received ${type(target)} instead.`);
|
|
14
12
|
}
|
|
15
|
-
|
|
16
13
|
let totalOffset = 0;
|
|
17
|
-
|
|
18
14
|
while (el) {
|
|
19
15
|
totalOffset += el.offsetTop;
|
|
20
16
|
el = el.offsetParent;
|
|
21
17
|
}
|
|
22
|
-
|
|
23
18
|
return totalOffset;
|
|
24
19
|
}
|
|
25
20
|
export function getContainer(container) {
|
|
@@ -27,11 +22,9 @@ export function getContainer(container) {
|
|
|
27
22
|
if (el) return el;
|
|
28
23
|
throw typeof container === 'string' ? new Error(`Container element "${container}" not found.`) : new TypeError(`Container must be a Selector/HTMLElement/VueComponent, received ${type(container)} instead.`);
|
|
29
24
|
}
|
|
30
|
-
|
|
31
25
|
function type(el) {
|
|
32
26
|
return el == null ? el : el.constructor.name;
|
|
33
27
|
}
|
|
34
|
-
|
|
35
28
|
function $(el) {
|
|
36
29
|
if (typeof el === 'string') {
|
|
37
30
|
return document.querySelector(el);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.mjs","names":["getOffset","target","el","$","Error","TypeError","type","totalOffset","offsetTop","offsetParent","getContainer","container","constructor","name","document","querySelector","_isVue","$el","HTMLElement"],"sources":["../../../src/services/goto/util.ts"],"sourcesContent":["// @ts-nocheck\n/* eslint-disable */\n\nimport Vue from 'vue'\n\n// Return target's cumulative offset from the top\nexport function getOffset (target: any): number {\n if (typeof target === 'number') {\n return target\n }\n\n let el = $(target)\n if (!el) {\n throw typeof target === 'string'\n ? new Error(`Target element \"${target}\" not found.`)\n : new TypeError(`Target must be a Number/Selector/HTMLElement/VueComponent, received ${type(target)} instead.`)\n }\n\n let totalOffset = 0\n while (el) {\n totalOffset += el.offsetTop\n el = el.offsetParent as HTMLElement\n }\n\n return totalOffset\n}\n\nexport function getContainer (container: any): HTMLElement {\n const el = $(container)\n\n if (el) return el\n\n throw typeof container === 'string'\n ? new Error(`Container element \"${container}\" not found.`)\n : new TypeError(`Container must be a Selector/HTMLElement/VueComponent, received ${type(container)} instead.`)\n}\n\nfunction type (el: any) {\n return el == null ? el : el.constructor.name\n}\n\nfunction $ (el: any): HTMLElement | null {\n if (typeof el === 'string') {\n return document.querySelector<HTMLElement>(el)\n } else if (el && el._isVue) {\n return (el as Vue).$el as HTMLElement\n } else if (el instanceof HTMLElement) {\n return el\n } else {\n return null\n }\n}\n"],"mappings":"AAAA;;
|
|
1
|
+
{"version":3,"file":"util.mjs","names":["getOffset","target","el","$","Error","TypeError","type","totalOffset","offsetTop","offsetParent","getContainer","container","constructor","name","document","querySelector","_isVue","$el","HTMLElement"],"sources":["../../../src/services/goto/util.ts"],"sourcesContent":["// @ts-nocheck\n/* eslint-disable */\n\nimport Vue from 'vue'\n\n// Return target's cumulative offset from the top\nexport function getOffset (target: any): number {\n if (typeof target === 'number') {\n return target\n }\n\n let el = $(target)\n if (!el) {\n throw typeof target === 'string'\n ? new Error(`Target element \"${target}\" not found.`)\n : new TypeError(`Target must be a Number/Selector/HTMLElement/VueComponent, received ${type(target)} instead.`)\n }\n\n let totalOffset = 0\n while (el) {\n totalOffset += el.offsetTop\n el = el.offsetParent as HTMLElement\n }\n\n return totalOffset\n}\n\nexport function getContainer (container: any): HTMLElement {\n const el = $(container)\n\n if (el) return el\n\n throw typeof container === 'string'\n ? new Error(`Container element \"${container}\" not found.`)\n : new TypeError(`Container must be a Selector/HTMLElement/VueComponent, received ${type(container)} instead.`)\n}\n\nfunction type (el: any) {\n return el == null ? el : el.constructor.name\n}\n\nfunction $ (el: any): HTMLElement | null {\n if (typeof el === 'string') {\n return document.querySelector<HTMLElement>(el)\n } else if (el && el._isVue) {\n return (el as Vue).$el as HTMLElement\n } else if (el instanceof HTMLElement) {\n return el\n } else {\n return null\n }\n}\n"],"mappings":"AAAA;AACA;;AAIA;AACA,OAAO,SAASA,SAAS,CAAEC,MAAW,EAAU;EAC9C,IAAI,OAAOA,MAAM,KAAK,QAAQ,EAAE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/main.css
CHANGED
package/lib/util/anchor.mjs
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { includes } from "./helpers.mjs";
|
|
2
2
|
const block = ['top', 'bottom'];
|
|
3
3
|
const inline = ['start', 'end', 'left', 'right'];
|
|
4
|
-
|
|
5
4
|
/** Parse a raw anchor string into an object */
|
|
6
5
|
export function parseAnchor(anchor, isRtl) {
|
|
7
6
|
let [side, align] = anchor.split(' ');
|
|
8
|
-
|
|
9
7
|
if (!align) {
|
|
10
8
|
align = includes(block, side) ? 'start' : includes(inline, side) ? 'top' : 'center';
|
|
11
9
|
}
|
|
12
|
-
|
|
13
10
|
return {
|
|
14
11
|
side: toPhysical(side, isRtl),
|
|
15
12
|
align: toPhysical(align, isRtl)
|
package/lib/util/anchor.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anchor.mjs","names":["includes","block","inline","parseAnchor","anchor","isRtl","side","align","split","toPhysical","str","flipSide","center","top","bottom","left","right","flipAlign","flipCorner","getAxis"],"sources":["../../src/util/anchor.ts"],"sourcesContent":["import { includes } from '@/util/helpers'\n\nconst block = ['top', 'bottom'] as const\nconst inline = ['start', 'end', 'left', 'right'] as const\ntype Tblock = typeof block[number]\ntype Tinline = typeof inline[number]\nexport type Anchor =\n | Tblock\n | Tinline\n | 'center'\n | 'center center'\n | `${Tblock} ${Tinline | 'center'}`\n | `${Tinline} ${Tblock | 'center'}`\nexport type ParsedAnchor =\n | { side: 'center', align: 'center' }\n | { side: Tblock, align: 'left' | 'right' | 'center' }\n | { side: 'left' | 'right', align: Tblock | 'center' }\n\n/** Parse a raw anchor string into an object */\nexport function parseAnchor (anchor: Anchor, isRtl: boolean) {\n let [side, align] = anchor.split(' ') as [Tblock | Tinline | 'center', Tblock | Tinline | 'center' | undefined]\n if (!align) {\n align =\n includes(block, side) ? 'start'\n : includes(inline, side) ? 'top'\n : 'center'\n }\n\n return {\n side: toPhysical(side, isRtl),\n align: toPhysical(align, isRtl),\n } as ParsedAnchor\n}\n\nexport function toPhysical (str: 'center' | Tblock | Tinline, isRtl: boolean) {\n if (str === 'start') return isRtl ? 'right' : 'left'\n if (str === 'end') return isRtl ? 'left' : 'right'\n return str\n}\n\nexport function flipSide (anchor: ParsedAnchor) {\n return {\n side: {\n center: 'center',\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n }[anchor.side],\n align: anchor.align,\n } as ParsedAnchor\n}\n\nexport function flipAlign (anchor: ParsedAnchor) {\n return {\n side: anchor.side,\n align: {\n center: 'center',\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n }[anchor.align],\n } as ParsedAnchor\n}\n\nexport function flipCorner (anchor: ParsedAnchor) {\n return {\n side: anchor.align,\n align: anchor.side,\n } as ParsedAnchor\n}\n\nexport function getAxis (anchor: ParsedAnchor) {\n return includes(block, anchor.side) ? 'y' : 'x'\n}\n"],"mappings":"SAASA,
|
|
1
|
+
{"version":3,"file":"anchor.mjs","names":["includes","block","inline","parseAnchor","anchor","isRtl","side","align","split","toPhysical","str","flipSide","center","top","bottom","left","right","flipAlign","flipCorner","getAxis"],"sources":["../../src/util/anchor.ts"],"sourcesContent":["import { includes } from '@/util/helpers'\n\nconst block = ['top', 'bottom'] as const\nconst inline = ['start', 'end', 'left', 'right'] as const\ntype Tblock = typeof block[number]\ntype Tinline = typeof inline[number]\nexport type Anchor =\n | Tblock\n | Tinline\n | 'center'\n | 'center center'\n | `${Tblock} ${Tinline | 'center'}`\n | `${Tinline} ${Tblock | 'center'}`\nexport type ParsedAnchor =\n | { side: 'center', align: 'center' }\n | { side: Tblock, align: 'left' | 'right' | 'center' }\n | { side: 'left' | 'right', align: Tblock | 'center' }\n\n/** Parse a raw anchor string into an object */\nexport function parseAnchor (anchor: Anchor, isRtl: boolean) {\n let [side, align] = anchor.split(' ') as [Tblock | Tinline | 'center', Tblock | Tinline | 'center' | undefined]\n if (!align) {\n align =\n includes(block, side) ? 'start'\n : includes(inline, side) ? 'top'\n : 'center'\n }\n\n return {\n side: toPhysical(side, isRtl),\n align: toPhysical(align, isRtl),\n } as ParsedAnchor\n}\n\nexport function toPhysical (str: 'center' | Tblock | Tinline, isRtl: boolean) {\n if (str === 'start') return isRtl ? 'right' : 'left'\n if (str === 'end') return isRtl ? 'left' : 'right'\n return str\n}\n\nexport function flipSide (anchor: ParsedAnchor) {\n return {\n side: {\n center: 'center',\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n }[anchor.side],\n align: anchor.align,\n } as ParsedAnchor\n}\n\nexport function flipAlign (anchor: ParsedAnchor) {\n return {\n side: anchor.side,\n align: {\n center: 'center',\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n }[anchor.align],\n } as ParsedAnchor\n}\n\nexport function flipCorner (anchor: ParsedAnchor) {\n return {\n side: anchor.align,\n align: anchor.side,\n } as ParsedAnchor\n}\n\nexport function getAxis (anchor: ParsedAnchor) {\n return includes(block, anchor.side) ? 'y' : 'x'\n}\n"],"mappings":"SAASA,QAAQ;AAEjB,MAAMC,KAAK,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAU;AACxC,MAAMC,MAAM,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAU;AAezD;AACA,OAAO,SAASC,WAAW,CAAEC,MAAc,EAAEC,KAAc,EAAE;EAC3D,IAAI,CAACC,IAAI,EAAEC,KAAK,CAAC,GAAGH,MAAM,CAACI,KAAK,CAAC,GAAG,CAA2E;EAC/G,IAAI,CAACD,KAAK,EAAE;IACVA,KAAK,GACHP,QAAQ,CAACC,KAAK,EAAEK,IAAI,CAAC,GAAG,OAAO,GAC7BN,QAAQ,CAACE,MAAM,EAAEI,IAAI,CAAC,GAAG,KAAK,GAC9B,QAAQ;EACd;EAEA,OAAO;IACLA,IAAI,EAAEG,UAAU,CAACH,IAAI,EAAED,KAAK,CAAC;IAC7BE,KAAK,EAAEE,UAAU,CAACF,KAAK,EAAEF,KAAK;EAChC,CAAC;AACH;AAEA,OAAO,SAASI,UAAU,CAAEC,GAAgC,EAAEL,KAAc,EAAE;EAC5E,IAAIK,GAAG,KAAK,OAAO,EAAE,OAAOL,KAAK,GAAG,OAAO,GAAG,MAAM;EACpD,IAAIK,GAAG,KAAK,KAAK,EAAE,OAAOL,KAAK,GAAG,MAAM,GAAG,OAAO;EAClD,OAAOK,GAAG;AACZ;AAEA,OAAO,SAASC,QAAQ,CAAEP,MAAoB,EAAE;EAC9C,OAAO;IACLE,IAAI,EAAE;MACJM,MAAM,EAAE,QAAQ;MAChBC,GAAG,EAAE,QAAQ;MACbC,MAAM,EAAE,KAAK;MACbC,IAAI,EAAE,OAAO;MACbC,KAAK,EAAE;IACT,CAAC,CAACZ,MAAM,CAACE,IAAI,CAAC;IACdC,KAAK,EAAEH,MAAM,CAACG;EAChB,CAAC;AACH;AAEA,OAAO,SAASU,SAAS,CAAEb,MAAoB,EAAE;EAC/C,OAAO;IACLE,IAAI,EAAEF,MAAM,CAACE,IAAI;IACjBC,KAAK,EAAE;MACLK,MAAM,EAAE,QAAQ;MAChBC,GAAG,EAAE,QAAQ;MACbC,MAAM,EAAE,KAAK;MACbC,IAAI,EAAE,OAAO;MACbC,KAAK,EAAE;IACT,CAAC,CAACZ,MAAM,CAACG,KAAK;EAChB,CAAC;AACH;AAEA,OAAO,SAASW,UAAU,CAAEd,MAAoB,EAAE;EAChD,OAAO;IACLE,IAAI,EAAEF,MAAM,CAACG,KAAK;IAClBA,KAAK,EAAEH,MAAM,CAACE;EAChB,CAAC;AACH;AAEA,OAAO,SAASa,OAAO,CAAEf,MAAoB,EAAE;EAC7C,OAAOJ,QAAQ,CAACC,KAAK,EAAEG,MAAM,CAACE,IAAI,CAAC,GAAG,GAAG,GAAG,GAAG;AACjD"}
|
package/lib/util/animation.mjs
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { Box } from "./box.mjs";
|
|
2
2
|
/** @see https://stackoverflow.com/a/57876601/2074736 */
|
|
3
|
-
|
|
4
3
|
export function nullifyTransforms(el) {
|
|
5
4
|
const rect = el.getBoundingClientRect();
|
|
6
5
|
const style = getComputedStyle(el);
|
|
7
6
|
const tx = style.transform;
|
|
8
|
-
|
|
9
7
|
if (tx) {
|
|
10
8
|
let ta, sx, sy, dx, dy;
|
|
11
|
-
|
|
12
9
|
if (tx.startsWith('matrix3d(')) {
|
|
13
10
|
ta = tx.slice(9, -1).split(/, /);
|
|
14
11
|
sx = +ta[0];
|
|
@@ -24,7 +21,6 @@ export function nullifyTransforms(el) {
|
|
|
24
21
|
} else {
|
|
25
22
|
return new Box(rect);
|
|
26
23
|
}
|
|
27
|
-
|
|
28
24
|
const to = style.transformOrigin;
|
|
29
25
|
const x = rect.x - dx - (1 - sx) * parseFloat(to);
|
|
30
26
|
const y = rect.y - dy - (1 - sy) * parseFloat(to.slice(to.indexOf(' ') + 1));
|
|
@@ -45,7 +41,6 @@ export function animate(el, keyframes, options) {
|
|
|
45
41
|
finished: Promise.resolve()
|
|
46
42
|
};
|
|
47
43
|
const animation = el.animate(keyframes, options);
|
|
48
|
-
|
|
49
44
|
if (typeof animation.finished === 'undefined') {
|
|
50
45
|
animation.finished = new Promise(resolve => {
|
|
51
46
|
animation.onfinish = () => {
|
|
@@ -53,7 +48,6 @@ export function animate(el, keyframes, options) {
|
|
|
53
48
|
};
|
|
54
49
|
});
|
|
55
50
|
}
|
|
56
|
-
|
|
57
51
|
return animation;
|
|
58
52
|
}
|
|
59
53
|
//# sourceMappingURL=animation.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animation.mjs","names":["Box","nullifyTransforms","el","rect","getBoundingClientRect","style","getComputedStyle","tx","transform","ta","sx","sy","dx","dy","startsWith","slice","split","to","transformOrigin","x","parseFloat","y","indexOf","w","width","offsetWidth","h","height","offsetHeight","animate","keyframes","options","finished","Promise","resolve","animation","onfinish"],"sources":["../../src/util/animation.ts"],"sourcesContent":["import { Box } from '@/util/box'\n\n/** @see https://stackoverflow.com/a/57876601/2074736 */\nexport function nullifyTransforms (el: HTMLElement): Box {\n const rect = el.getBoundingClientRect()\n const style = getComputedStyle(el)\n const tx = style.transform\n\n if (tx) {\n let ta, sx, sy, dx, dy\n if (tx.startsWith('matrix3d(')) {\n ta = tx.slice(9, -1).split(/, /)\n sx = +ta[0]\n sy = +ta[5]\n dx = +ta[12]\n dy = +ta[13]\n } else if (tx.startsWith('matrix(')) {\n ta = tx.slice(7, -1).split(/, /)\n sx = +ta[0]\n sy = +ta[3]\n dx = +ta[4]\n dy = +ta[5]\n } else {\n return new Box(rect)\n }\n\n const to = style.transformOrigin\n const x = rect.x - dx - (1 - sx) * parseFloat(to)\n const y = rect.y - dy - (1 - sy) * parseFloat(to.slice(to.indexOf(' ') + 1))\n const w = sx ? rect.width / sx : el.offsetWidth + 1\n const h = sy ? rect.height / sy : el.offsetHeight + 1\n\n return new Box({ x, y, width: w, height: h })\n } else {\n return new Box(rect)\n }\n}\n\nexport function animate (\n el: Element,\n keyframes: Keyframe[] | PropertyIndexedKeyframes | null,\n options?: number | KeyframeAnimationOptions\n) {\n if (typeof el.animate === 'undefined') return { finished: Promise.resolve() }\n\n const animation = el.animate(keyframes, options)\n if (typeof animation.finished === 'undefined') {\n (animation as any).finished = new Promise(resolve => {\n animation.onfinish = () => {\n resolve(animation)\n }\n })\n }\n\n return animation\n}\n"],"mappings":"SAASA,
|
|
1
|
+
{"version":3,"file":"animation.mjs","names":["Box","nullifyTransforms","el","rect","getBoundingClientRect","style","getComputedStyle","tx","transform","ta","sx","sy","dx","dy","startsWith","slice","split","to","transformOrigin","x","parseFloat","y","indexOf","w","width","offsetWidth","h","height","offsetHeight","animate","keyframes","options","finished","Promise","resolve","animation","onfinish"],"sources":["../../src/util/animation.ts"],"sourcesContent":["import { Box } from '@/util/box'\n\n/** @see https://stackoverflow.com/a/57876601/2074736 */\nexport function nullifyTransforms (el: HTMLElement): Box {\n const rect = el.getBoundingClientRect()\n const style = getComputedStyle(el)\n const tx = style.transform\n\n if (tx) {\n let ta, sx, sy, dx, dy\n if (tx.startsWith('matrix3d(')) {\n ta = tx.slice(9, -1).split(/, /)\n sx = +ta[0]\n sy = +ta[5]\n dx = +ta[12]\n dy = +ta[13]\n } else if (tx.startsWith('matrix(')) {\n ta = tx.slice(7, -1).split(/, /)\n sx = +ta[0]\n sy = +ta[3]\n dx = +ta[4]\n dy = +ta[5]\n } else {\n return new Box(rect)\n }\n\n const to = style.transformOrigin\n const x = rect.x - dx - (1 - sx) * parseFloat(to)\n const y = rect.y - dy - (1 - sy) * parseFloat(to.slice(to.indexOf(' ') + 1))\n const w = sx ? rect.width / sx : el.offsetWidth + 1\n const h = sy ? rect.height / sy : el.offsetHeight + 1\n\n return new Box({ x, y, width: w, height: h })\n } else {\n return new Box(rect)\n }\n}\n\nexport function animate (\n el: Element,\n keyframes: Keyframe[] | PropertyIndexedKeyframes | null,\n options?: number | KeyframeAnimationOptions\n) {\n if (typeof el.animate === 'undefined') return { finished: Promise.resolve() }\n\n const animation = el.animate(keyframes, options)\n if (typeof animation.finished === 'undefined') {\n (animation as any).finished = new Promise(resolve => {\n animation.onfinish = () => {\n resolve(animation)\n }\n })\n }\n\n return animation\n}\n"],"mappings":"SAASA,GAAG;AAEZ;AACA,OAAO,SAASC,iBAAiB,CAAEC,EAAe,EAAO;EACvD,MAAMC,IAAI,GAAGD,EAAE,CAACE,qBAAqB,EAAE;EACvC,MAAMC,KAAK,GAAGC,gBAAgB,CAACJ,EAAE,CAAC;EAClC,MAAMK,EAAE,GAAGF,KAAK,CAACG,SAAS;EAE1B,IAAID,EAAE,EAAE;IACN,IAAIE,EAAE,EAAEC,EAAE,EAAEC,EAAE,EAAEC,EAAE,EAAEC,EAAE;IACtB,IAAIN,EAAE,CAACO,UAAU,CAAC,WAAW,CAAC,EAAE;MAC9BL,EAAE,GAAGF,EAAE,CAACQ,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAACC,KAAK,CAAC,IAAI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O,IAAI5B,GAAG,CAAC;MAAEmB,CAAC;MAAEE,CAAC;MAAEG,KAAK,EAAED,CAAC;MAAEI,MAAM,EAAED;IAAE,CAAC,CAAC;EAC/C,CAAC,MAAM;IACL,OAAO,IAAI1B,GAAG,CAACG,IAAI,CAAC;EACtB;AACF;AAEA,OAAO,SAAS0B,OAAO,CACrB3B,EAAW,EACX4B,SAAuD,EACvDC,OAA2C,EAC3C;EACA,IAAI,OAAO7B,EAAE,CAAC2B,OAAO,KAAK,WAAW,EAAE,OAAO;IAAEG,QAAQ,EAAEC,OAAO,CAACC,OAAO;EAAG,CAAC;EAE7E,MAAMC,SAAS,GAAGjC,EAAE,CAAC2B,OAAO,CAACC,SAAS,EAAEC,OAAO,CAAC;EAChD,IAAI,OAAOI,SAAS,CAACH,QAAQ,KAAK,WAAW,EAAE;IAC5CG,SAAS,CAASH,QAAQ,GAAG,IAAIC,OAAO,CAACC,OAAO,IAAI;MACnDC,SAAS,CAACC,QAAQ,GAAG,MAAM;QACzBF,OAAO,CAACC,SAAS,CAAC;MACpB,CAAC;IACH,CAAC,CAAC;EACJ;EAEA,OAAOA,SAAS;AAClB"}
|
package/lib/util/box.mjs
CHANGED
|
@@ -11,23 +11,18 @@ export class Box {
|
|
|
11
11
|
this.width = width;
|
|
12
12
|
this.height = height;
|
|
13
13
|
}
|
|
14
|
-
|
|
15
14
|
get top() {
|
|
16
15
|
return this.y;
|
|
17
16
|
}
|
|
18
|
-
|
|
19
17
|
get bottom() {
|
|
20
18
|
return this.y + this.height;
|
|
21
19
|
}
|
|
22
|
-
|
|
23
20
|
get left() {
|
|
24
21
|
return this.x;
|
|
25
22
|
}
|
|
26
|
-
|
|
27
23
|
get right() {
|
|
28
24
|
return this.x + this.width;
|
|
29
25
|
}
|
|
30
|
-
|
|
31
26
|
}
|
|
32
27
|
export function getOverflow(a, b) {
|
|
33
28
|
return {
|
package/lib/util/box.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"box.mjs","names":["Box","constructor","x","y","width","height","top","bottom","left","right","getOverflow","a","b","before","Math","max","after"],"sources":["../../src/util/box.ts"],"sourcesContent":["export class Box {\n x: number\n y: number\n width: number\n height: number\n\n constructor ({ x, y, width, height }: {\n x: number\n y: number\n width: number\n height: number\n }) {\n this.x = x\n this.y = y\n this.width = width\n this.height = height\n }\n\n get top () { return this.y }\n get bottom () { return this.y + this.height }\n get left () { return this.x }\n get right () { return this.x + this.width }\n}\n\nexport function getOverflow (a: Box, b: Box) {\n return {\n x: {\n before: Math.max(0, b.left - a.left),\n after: Math.max(0, a.right - b.right),\n },\n y: {\n before: Math.max(0, b.top - a.top),\n after: Math.max(0, a.bottom - b.bottom),\n },\n }\n}\n"],"mappings":"AAAA,OAAO,MAAMA,
|
|
1
|
+
{"version":3,"file":"box.mjs","names":["Box","constructor","x","y","width","height","top","bottom","left","right","getOverflow","a","b","before","Math","max","after"],"sources":["../../src/util/box.ts"],"sourcesContent":["export class Box {\n x: number\n y: number\n width: number\n height: number\n\n constructor ({ x, y, width, height }: {\n x: number\n y: number\n width: number\n height: number\n }) {\n this.x = x\n this.y = y\n this.width = width\n this.height = height\n }\n\n get top () { return this.y }\n get bottom () { return this.y + this.height }\n get left () { return this.x }\n get right () { return this.x + this.width }\n}\n\nexport function getOverflow (a: Box, b: Box) {\n return {\n x: {\n before: Math.max(0, b.left - a.left),\n after: Math.max(0, a.right - b.right),\n },\n y: {\n before: Math.max(0, b.top - a.top),\n after: Math.max(0, a.bottom - b.bottom),\n },\n }\n}\n"],"mappings":"AAAA,OAAO,MAAMA,GAAG,CAAC;EAMfC,WAAW,OAKR;IAAA,IALU;MAAEC,CAAC;MAAEC,CAAC;MAAEC,KAAK;MAAEC;IAK5B,CAAC;IACC,IAAI,CAACH,CAAC,GAAGA,CAAC;IACV,IAAI,CAACC,CAAC,GAAGA,CAAC;IACV,IAAI,CAACC,KAAK,GAAGA,KAAK;IAClB,IAAI,CAACC,MAAM,GAAGA,MAAM;EACtB;EAEA,IAAIC,GAAG,GAAI;IAAE,OAAO,IAAI,CAACH,CAAC;EAAC;EAC3B,IAAII,MAAM,GAAI;IAAE,OAAO,IAAI,CAACJ,CAAC,GAAG,IAAI,CAACE,MAAM;EAAC;EAC5C,IAAIG,IAAI,GAAI;IAAE,OAAO,IAAI,CAACN,CAAC;EAAC;EAC5B,IAAIO,KAAK,GAAI;IAAE,OAAO,IAAI,CAACP,CAAC,GAAG,IAAI,CAACE,KAAK;EAAC;AAC5C;AAEA,OAAO,SAASM,WAAW,CAAEC,CAAM,EAAEC,CAAM,EAAE;EAC3C,OAAO;IACLV,CAAC,EAAE;MACDW,MAAM,EAAEC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEH,CAAC,CAACJ,IAAI,GAAGG,CAAC,CAACH,IAAI,CAAC;MACpCQ,KAAK,EAAEF,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEJ,CAAC,CAACF,KAAK,GAAGG,CAAC,CAACH,KAAK;IACtC,CAAC;IACDN,CAAC,EAAE;MACDU,MAAM,EAAEC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEH,CAAC,CAACN,GAAG,GAAGK,CAAC,CAACL,GAAG,CAAC;MAClCU,KAAK,EAAEF,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEJ,CAAC,CAACJ,MAAM,GAAGK,CAAC,CAACL,MAAM;IACxC;EACF,CAAC;AACH"}
|
package/lib/util/color/APCA.mjs
CHANGED
|
@@ -3,44 +3,40 @@
|
|
|
3
3
|
* @licence https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
|
|
4
4
|
* @see https://www.w3.org/WAI/GL/task-forces/silver/wiki/Visual_Contrast_of_Text_Subgroup
|
|
5
5
|
*/
|
|
6
|
+
|
|
6
7
|
// MAGICAL NUMBERS
|
|
8
|
+
|
|
7
9
|
// sRGB Conversion to Relative Luminance (Y)
|
|
10
|
+
|
|
8
11
|
// Transfer Curve (aka "Gamma") for sRGB linearization
|
|
9
12
|
// Simple power curve vs piecewise described in docs
|
|
10
13
|
// Essentially, 2.4 best models actual display
|
|
11
14
|
// characteristics in combination with the total method
|
|
12
15
|
const mainTRC = 2.4;
|
|
13
16
|
const Rco = 0.2126729; // sRGB Red Coefficient (from matrix)
|
|
14
|
-
|
|
15
17
|
const Gco = 0.7151522; // sRGB Green Coefficient (from matrix)
|
|
16
|
-
|
|
17
18
|
const Bco = 0.0721750; // sRGB Blue Coefficient (from matrix)
|
|
19
|
+
|
|
18
20
|
// For Finding Raw SAPC Contrast from Relative Luminance (Y)
|
|
21
|
+
|
|
19
22
|
// Constants for SAPC Power Curve Exponents
|
|
20
23
|
// One pair for normal text, and one for reverse
|
|
21
24
|
// These are the "beating heart" of SAPC
|
|
22
|
-
|
|
23
25
|
const normBG = 0.55;
|
|
24
26
|
const normTXT = 0.58;
|
|
25
27
|
const revTXT = 0.57;
|
|
26
|
-
const revBG = 0.62;
|
|
28
|
+
const revBG = 0.62;
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
// For Clamping and Scaling Values
|
|
29
31
|
|
|
32
|
+
const blkThrs = 0.03; // Level that triggers the soft black clamp
|
|
30
33
|
const blkClmp = 1.45; // Exponent for the soft black clamp curve
|
|
31
|
-
|
|
32
34
|
const deltaYmin = 0.0005; // Lint trap
|
|
33
|
-
|
|
34
35
|
const scaleBoW = 1.25; // Scaling for dark text on light
|
|
35
|
-
|
|
36
36
|
const scaleWoB = 1.25; // Scaling for light text on dark
|
|
37
|
-
|
|
38
37
|
const loConThresh = 0.078; // Threshold for new simple offset scale
|
|
39
|
-
|
|
40
38
|
const loConFactor = 12.82051282051282; // = 1/0.078,
|
|
41
|
-
|
|
42
39
|
const loConOffset = 0.06; // The simple offset
|
|
43
|
-
|
|
44
40
|
const loClip = 0.001; // Output clip (lint trap #2)
|
|
45
41
|
|
|
46
42
|
export function APCAcontrast(text, background) {
|
|
@@ -50,36 +46,42 @@ export function APCAcontrast(text, background) {
|
|
|
50
46
|
const Btxt = ((text >> 0 & 0xff) / 255) ** mainTRC;
|
|
51
47
|
const Rbg = ((background >> 16 & 0xff) / 255) ** mainTRC;
|
|
52
48
|
const Gbg = ((background >> 8 & 0xff) / 255) ** mainTRC;
|
|
53
|
-
const Bbg = ((background >> 0 & 0xff) / 255) ** mainTRC;
|
|
49
|
+
const Bbg = ((background >> 0 & 0xff) / 255) ** mainTRC;
|
|
54
50
|
|
|
51
|
+
// Apply the standard coefficients and sum to Y
|
|
55
52
|
let Ytxt = Rtxt * Rco + Gtxt * Gco + Btxt * Bco;
|
|
56
|
-
let Ybg = Rbg * Rco + Gbg * Gco + Bbg * Bco;
|
|
57
|
-
// Now clamping all colors to prevent crossover errors
|
|
53
|
+
let Ybg = Rbg * Rco + Gbg * Gco + Bbg * Bco;
|
|
58
54
|
|
|
55
|
+
// Soft clamp Y when near black.
|
|
56
|
+
// Now clamping all colors to prevent crossover errors
|
|
59
57
|
if (Ytxt <= blkThrs) Ytxt += (blkThrs - Ytxt) ** blkClmp;
|
|
60
|
-
if (Ybg <= blkThrs) Ybg += (blkThrs - Ybg) ** blkClmp;
|
|
58
|
+
if (Ybg <= blkThrs) Ybg += (blkThrs - Ybg) ** blkClmp;
|
|
61
59
|
|
|
62
|
-
|
|
60
|
+
// Return 0 Early for extremely low ∆Y (lint trap #1)
|
|
61
|
+
if (Math.abs(Ybg - Ytxt) < deltaYmin) return 0.0;
|
|
63
62
|
|
|
64
|
-
|
|
63
|
+
// SAPC CONTRAST
|
|
65
64
|
|
|
65
|
+
let outputContrast; // For weighted final values
|
|
66
66
|
if (Ybg > Ytxt) {
|
|
67
67
|
// For normal polarity, black text on white
|
|
68
68
|
// Calculate the SAPC contrast value and scale
|
|
69
|
-
|
|
69
|
+
|
|
70
|
+
const SAPC = (Ybg ** normBG - Ytxt ** normTXT) * scaleBoW;
|
|
71
|
+
|
|
72
|
+
// NEW! SAPC SmoothScale™
|
|
70
73
|
// Low Contrast Smooth Scale Rollout to prevent polarity reversal
|
|
71
74
|
// and also a low clip for very low contrasts (lint trap #2)
|
|
72
75
|
// much of this is for very low contrasts, less than 10
|
|
73
76
|
// therefore for most reversing needs, only loConOffset is important
|
|
74
|
-
|
|
75
77
|
outputContrast = SAPC < loClip ? 0.0 : SAPC < loConThresh ? SAPC - SAPC * loConFactor * loConOffset : SAPC - loConOffset;
|
|
76
78
|
} else {
|
|
77
79
|
// For reverse polarity, light text on dark
|
|
78
80
|
// WoB should always return negative value.
|
|
81
|
+
|
|
79
82
|
const SAPC = (Ybg ** revBG - Ytxt ** revTXT) * scaleWoB;
|
|
80
83
|
outputContrast = SAPC > -loClip ? 0.0 : SAPC > -loConThresh ? SAPC - SAPC * loConFactor * loConOffset : SAPC + loConOffset;
|
|
81
84
|
}
|
|
82
|
-
|
|
83
85
|
return outputContrast * 100;
|
|
84
86
|
}
|
|
85
87
|
//# sourceMappingURL=APCA.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"APCA.mjs","names":["mainTRC","Rco","Gco","Bco","normBG","normTXT","revTXT","revBG","blkThrs","blkClmp","deltaYmin","scaleBoW","scaleWoB","loConThresh","loConFactor","loConOffset","loClip","APCAcontrast","text","background","Rtxt","Gtxt","Btxt","Rbg","Gbg","Bbg","Ytxt","Ybg","Math","abs","outputContrast","SAPC"],"sources":["../../../src/util/color/APCA.ts"],"sourcesContent":["/**\n * WCAG 3.0 APCA perceptual contrast algorithm from https://github.com/Myndex/SAPC-APCA\n * @licence https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document\n * @see https://www.w3.org/WAI/GL/task-forces/silver/wiki/Visual_Contrast_of_Text_Subgroup\n */\n\n// MAGICAL NUMBERS\n\n// sRGB Conversion to Relative Luminance (Y)\n\n// Transfer Curve (aka \"Gamma\") for sRGB linearization\n// Simple power curve vs piecewise described in docs\n// Essentially, 2.4 best models actual display\n// characteristics in combination with the total method\nconst mainTRC = 2.4\n\nconst Rco = 0.2126729 // sRGB Red Coefficient (from matrix)\nconst Gco = 0.7151522 // sRGB Green Coefficient (from matrix)\nconst Bco = 0.0721750 // sRGB Blue Coefficient (from matrix)\n\n// For Finding Raw SAPC Contrast from Relative Luminance (Y)\n\n// Constants for SAPC Power Curve Exponents\n// One pair for normal text, and one for reverse\n// These are the \"beating heart\" of SAPC\nconst normBG = 0.55\nconst normTXT = 0.58\nconst revTXT = 0.57\nconst revBG = 0.62\n\n// For Clamping and Scaling Values\n\nconst blkThrs = 0.03 // Level that triggers the soft black clamp\nconst blkClmp = 1.45 // Exponent for the soft black clamp curve\nconst deltaYmin = 0.0005 // Lint trap\nconst scaleBoW = 1.25 // Scaling for dark text on light\nconst scaleWoB = 1.25 // Scaling for light text on dark\nconst loConThresh = 0.078 // Threshold for new simple offset scale\nconst loConFactor = 12.82051282051282 // = 1/0.078,\nconst loConOffset = 0.06 // The simple offset\nconst loClip = 0.001 // Output clip (lint trap #2)\n\nexport function APCAcontrast (text: number, background: number) {\n // Linearize sRGB\n const Rtxt = ((text >> 16 & 0xff) / 255) ** mainTRC\n const Gtxt = ((text >> 8 & 0xff) / 255) ** mainTRC\n const Btxt = ((text >> 0 & 0xff) / 255) ** mainTRC\n\n const Rbg = ((background >> 16 & 0xff) / 255) ** mainTRC\n const Gbg = ((background >> 8 & 0xff) / 255) ** mainTRC\n const Bbg = ((background >> 0 & 0xff) / 255) ** mainTRC\n\n // Apply the standard coefficients and sum to Y\n let Ytxt = (Rtxt * Rco) + (Gtxt * Gco) + (Btxt * Bco)\n let Ybg = (Rbg * Rco) + (Gbg * Gco) + (Bbg * Bco)\n\n // Soft clamp Y when near black.\n // Now clamping all colors to prevent crossover errors\n if (Ytxt <= blkThrs) Ytxt += (blkThrs - Ytxt) ** blkClmp\n if (Ybg <= blkThrs) Ybg += (blkThrs - Ybg) ** blkClmp\n\n // Return 0 Early for extremely low ∆Y (lint trap #1)\n if (Math.abs(Ybg - Ytxt) < deltaYmin) return 0.0\n\n // SAPC CONTRAST\n\n let outputContrast: number // For weighted final values\n if (Ybg > Ytxt) {\n // For normal polarity, black text on white\n // Calculate the SAPC contrast value and scale\n\n const SAPC = ((Ybg ** normBG) - (Ytxt ** normTXT)) * scaleBoW\n\n // NEW! SAPC SmoothScale™\n // Low Contrast Smooth Scale Rollout to prevent polarity reversal\n // and also a low clip for very low contrasts (lint trap #2)\n // much of this is for very low contrasts, less than 10\n // therefore for most reversing needs, only loConOffset is important\n outputContrast =\n (SAPC < loClip) ? 0.0\n : (SAPC < loConThresh) ? SAPC - SAPC * loConFactor * loConOffset\n : SAPC - loConOffset\n } else {\n // For reverse polarity, light text on dark\n // WoB should always return negative value.\n\n const SAPC = ((Ybg ** revBG) - (Ytxt ** revTXT)) * scaleWoB\n\n outputContrast =\n (SAPC > -loClip) ? 0.0\n : (SAPC > -loConThresh) ? SAPC - SAPC * loConFactor * loConOffset\n : SAPC + loConOffset\n }\n\n return outputContrast * 100\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA
|
|
1
|
+
{"version":3,"file":"APCA.mjs","names":["mainTRC","Rco","Gco","Bco","normBG","normTXT","revTXT","revBG","blkThrs","blkClmp","deltaYmin","scaleBoW","scaleWoB","loConThresh","loConFactor","loConOffset","loClip","APCAcontrast","text","background","Rtxt","Gtxt","Btxt","Rbg","Gbg","Bbg","Ytxt","Ybg","Math","abs","outputContrast","SAPC"],"sources":["../../../src/util/color/APCA.ts"],"sourcesContent":["/**\n * WCAG 3.0 APCA perceptual contrast algorithm from https://github.com/Myndex/SAPC-APCA\n * @licence https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document\n * @see https://www.w3.org/WAI/GL/task-forces/silver/wiki/Visual_Contrast_of_Text_Subgroup\n */\n\n// MAGICAL NUMBERS\n\n// sRGB Conversion to Relative Luminance (Y)\n\n// Transfer Curve (aka \"Gamma\") for sRGB linearization\n// Simple power curve vs piecewise described in docs\n// Essentially, 2.4 best models actual display\n// characteristics in combination with the total method\nconst mainTRC = 2.4\n\nconst Rco = 0.2126729 // sRGB Red Coefficient (from matrix)\nconst Gco = 0.7151522 // sRGB Green Coefficient (from matrix)\nconst Bco = 0.0721750 // sRGB Blue Coefficient (from matrix)\n\n// For Finding Raw SAPC Contrast from Relative Luminance (Y)\n\n// Constants for SAPC Power Curve Exponents\n// One pair for normal text, and one for reverse\n// These are the \"beating heart\" of SAPC\nconst normBG = 0.55\nconst normTXT = 0.58\nconst revTXT = 0.57\nconst revBG = 0.62\n\n// For Clamping and Scaling Values\n\nconst blkThrs = 0.03 // Level that triggers the soft black clamp\nconst blkClmp = 1.45 // Exponent for the soft black clamp curve\nconst deltaYmin = 0.0005 // Lint trap\nconst scaleBoW = 1.25 // Scaling for dark text on light\nconst scaleWoB = 1.25 // Scaling for light text on dark\nconst loConThresh = 0.078 // Threshold for new simple offset scale\nconst loConFactor = 12.82051282051282 // = 1/0.078,\nconst loConOffset = 0.06 // The simple offset\nconst loClip = 0.001 // Output clip (lint trap #2)\n\nexport function APCAcontrast (text: number, background: number) {\n // Linearize sRGB\n const Rtxt = ((text >> 16 & 0xff) / 255) ** mainTRC\n const Gtxt = ((text >> 8 & 0xff) / 255) ** mainTRC\n const Btxt = ((text >> 0 & 0xff) / 255) ** mainTRC\n\n const Rbg = ((background >> 16 & 0xff) / 255) ** mainTRC\n const Gbg = ((background >> 8 & 0xff) / 255) ** mainTRC\n const Bbg = ((background >> 0 & 0xff) / 255) ** mainTRC\n\n // Apply the standard coefficients and sum to Y\n let Ytxt = (Rtxt * Rco) + (Gtxt * Gco) + (Btxt * Bco)\n let Ybg = (Rbg * Rco) + (Gbg * Gco) + (Bbg * Bco)\n\n // Soft clamp Y when near black.\n // Now clamping all colors to prevent crossover errors\n if (Ytxt <= blkThrs) Ytxt += (blkThrs - Ytxt) ** blkClmp\n if (Ybg <= blkThrs) Ybg += (blkThrs - Ybg) ** blkClmp\n\n // Return 0 Early for extremely low ∆Y (lint trap #1)\n if (Math.abs(Ybg - Ytxt) < deltaYmin) return 0.0\n\n // SAPC CONTRAST\n\n let outputContrast: number // For weighted final values\n if (Ybg > Ytxt) {\n // For normal polarity, black text on white\n // Calculate the SAPC contrast value and scale\n\n const SAPC = ((Ybg ** normBG) - (Ytxt ** normTXT)) * scaleBoW\n\n // NEW! SAPC SmoothScale™\n // Low Contrast Smooth Scale Rollout to prevent polarity reversal\n // and also a low clip for very low contrasts (lint trap #2)\n // much of this is for very low contrasts, less than 10\n // therefore for most reversing needs, only loConOffset is important\n outputContrast =\n (SAPC < loClip) ? 0.0\n : (SAPC < loConThresh) ? SAPC - SAPC * loConFactor * loConOffset\n : SAPC - loConOffset\n } else {\n // For reverse polarity, light text on dark\n // WoB should always return negative value.\n\n const SAPC = ((Ybg ** revBG) - (Ytxt ** revTXT)) * scaleWoB\n\n outputContrast =\n (SAPC > -loClip) ? 0.0\n : (SAPC > -loConThresh) ? SAPC - SAPC * loConFactor * loConOffset\n : SAPC + loConOffset\n }\n\n return outputContrast * 100\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAMA,OAAO,GAAG,GAAG;AAEnB,MAAMC,GAAG,GAAG,SAAS,EAAC;AACtB,MAAMC,GAAG,GAAG,SAAS,EAAC;AACtB,MAAMC,GAAG,GAAG,SAAS,EAAC;;AAEtB;;AAEA;AACA;AACA;AACA,MAAMC,MAAM,GAAG,IAAI;AACnB,MAAMC,OAAO,GAAG,IAAI;AACpB,MAAMC,MAAM,GAAG,IAAI;AACnB,MAAMC,KAAK,GAAG,IAAI;;AAElB;;AAEA,MAAMC,OAAO,GAAG,IAAI,EAAC;AACrB,MAAMC,OAAO,GAAG,IAAI,EAAC;AACrB,MAAMC,SAAS,GAAG,MAAM,EAAC;AACzB,MAAMC,QAAQ,GAAG,IAAI,EAAC;AACtB,MAAMC,QAAQ,GAAG,IAAI,EAAC;AACtB,MAAMC,WAAW,GAAG,KAAK,EAAC;AAC1B,MAAMC,WAAW,GAAG,iBAAiB,EAAC;AACtC,MAAMC,WAAW,GAAG,IAAI,EAAC;AACzB,MAAMC,MAA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IH,GAAG,GAAGD,IAAI,EAAE;IACd;IACA;;IAEA,MAAMK,IAAI,GAAG,CAAEJ,GAAG,IAAIvB,MAAM,GAAKsB,IAAI,IAAIrB,OAAQ,IAAIM,QAAQ;;IAE7D;IACA;IACA;IACA;IACA;IACAmB,cAAc,GACXC,IAAI,GAAGf,MAAM,GAAI,GAAG,GAClBe,IAAI,GAAGlB,WAAW,GAAIkB,IAAI,GAAGA,IAAI,GAAGjB,WAAW,GAAGC,WAAW,GAC9DgB,IAAI,GAAGhB,WAAW;EACxB,CAAC,MAAM;IACL;IACA;;IAEA,MAAMgB,IAAI,GAAG,CAAEJ,GAAG,IAAIpB,KAAK,GAAKmB,IAAI,IAAIpB,MAAO,IAAIM,QAAQ;IAE3DkB,cAAc,GACXC,IAAI,GAAG,CAACf,MAAM,GAAI,GAAG,GACnBe,IAAI,GAAG,CAAClB,WAAW,GAAIkB,IAAI,GAAGA,IAAI,GAAGjB,WAAW,GAAGC,WAAW,GAC/DgB,IAAI,GAAGhB,WAAW;EACxB;EAEA,OAAOe,cAAc,GAAG,GAAG;AAC7B"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
const delta = 0.20689655172413793; // 6÷29
|
|
2
2
|
|
|
3
3
|
const cielabForwardTransform = t => t > delta ** 3 ? Math.cbrt(t) : t / (3 * delta ** 2) + 4 / 29;
|
|
4
|
-
|
|
5
4
|
const cielabReverseTransform = t => t > delta ? t ** 3 : 3 * delta ** 2 * (t - 4 / 29);
|
|
6
|
-
|
|
7
5
|
export function fromXYZ(xyz) {
|
|
8
6
|
const transform = cielabForwardTransform;
|
|
9
7
|
const transformedY = transform(xyz[1]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformCIELAB.mjs","names":["delta","cielabForwardTransform","t","Math","cbrt","cielabReverseTransform","fromXYZ","xyz","transform","transformedY","toXYZ","lab","Ln"],"sources":["../../../src/util/color/transformCIELAB.ts"],"sourcesContent":["import type { LAB, XYZ } from '../colorUtils'\n\nconst delta = 0.20689655172413793 // 6÷29\n\nconst cielabForwardTransform = (t: number): number => (\n t > delta ** 3\n ? Math.cbrt(t)\n : (t / (3 * delta ** 2)) + 4 / 29\n)\n\nconst cielabReverseTransform = (t: number): number => (\n t > delta\n ? t ** 3\n : (3 * delta ** 2) * (t - 4 / 29)\n)\n\nexport function fromXYZ (xyz: XYZ): LAB {\n const transform = cielabForwardTransform\n const transformedY = transform(xyz[1])\n\n return [\n 116 * transformedY - 16,\n 500 * (transform(xyz[0] / 0.95047) - transformedY),\n 200 * (transformedY - transform(xyz[2] / 1.08883)),\n ]\n}\n\nexport function toXYZ (lab: LAB): XYZ {\n const transform = cielabReverseTransform\n const Ln = (lab[0] + 16) / 116\n return [\n transform(Ln + lab[1] / 500) * 0.95047,\n transform(Ln),\n transform(Ln - lab[2] / 200) * 1.08883,\n ]\n}\n"],"mappings":"AAEA,MAAMA,KAAK,GAAG,
|
|
1
|
+
{"version":3,"file":"transformCIELAB.mjs","names":["delta","cielabForwardTransform","t","Math","cbrt","cielabReverseTransform","fromXYZ","xyz","transform","transformedY","toXYZ","lab","Ln"],"sources":["../../../src/util/color/transformCIELAB.ts"],"sourcesContent":["import type { LAB, XYZ } from '../colorUtils'\n\nconst delta = 0.20689655172413793 // 6÷29\n\nconst cielabForwardTransform = (t: number): number => (\n t > delta ** 3\n ? Math.cbrt(t)\n : (t / (3 * delta ** 2)) + 4 / 29\n)\n\nconst cielabReverseTransform = (t: number): number => (\n t > delta\n ? t ** 3\n : (3 * delta ** 2) * (t - 4 / 29)\n)\n\nexport function fromXYZ (xyz: XYZ): LAB {\n const transform = cielabForwardTransform\n const transformedY = transform(xyz[1])\n\n return [\n 116 * transformedY - 16,\n 500 * (transform(xyz[0] / 0.95047) - transformedY),\n 200 * (transformedY - transform(xyz[2] / 1.08883)),\n ]\n}\n\nexport function toXYZ (lab: LAB): XYZ {\n const transform = cielabReverseTransform\n const Ln = (lab[0] + 16) / 116\n return [\n transform(Ln + lab[1] /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G,OAAO,CACvC;AACH"}
|
|
@@ -1,39 +1,41 @@
|
|
|
1
1
|
import { clamp } from "../../util/helpers.mjs"; // For converting XYZ to sRGB
|
|
2
|
+
const srgbForwardMatrix = [[3.2406, -1.5372, -0.4986], [-0.9689, 1.8758, 0.0415], [0.0557, -0.2040, 1.0570]];
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
// Forward gamma adjust
|
|
5
|
+
const srgbForwardTransform = C => C <= 0.0031308 ? C * 12.92 : 1.055 * C ** (1 / 2.4) - 0.055;
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const srgbReverseMatrix = [[0.4124, 0.3576, 0.1805], [0.2126, 0.7152, 0.0722], [0.0193, 0.1192, 0.9505]]; // Reverse gamma adjust
|
|
7
|
+
// For converting sRGB to XYZ
|
|
8
|
+
const srgbReverseMatrix = [[0.4124, 0.3576, 0.1805], [0.2126, 0.7152, 0.0722], [0.0193, 0.1192, 0.9505]];
|
|
9
9
|
|
|
10
|
+
// Reverse gamma adjust
|
|
10
11
|
const srgbReverseTransform = C => C <= 0.04045 ? C / 12.92 : ((C + 0.055) / 1.055) ** 2.4;
|
|
11
|
-
|
|
12
12
|
export function fromXYZ(xyz) {
|
|
13
13
|
const rgb = Array(3);
|
|
14
14
|
const transform = srgbForwardTransform;
|
|
15
|
-
const matrix = srgbForwardMatrix;
|
|
15
|
+
const matrix = srgbForwardMatrix;
|
|
16
16
|
|
|
17
|
+
// Matrix transform, then gamma adjustment
|
|
17
18
|
for (let i = 0; i < 3; ++i) {
|
|
18
19
|
rgb[i] = Math.round(clamp(transform(matrix[i][0] * xyz[0] + matrix[i][1] * xyz[1] + matrix[i][2] * xyz[2])) * 255);
|
|
19
|
-
}
|
|
20
|
-
|
|
20
|
+
}
|
|
21
21
|
|
|
22
|
+
// Rescale back to [0, 255]
|
|
22
23
|
return (rgb[0] << 16) + (rgb[1] << 8) + (rgb[2] << 0);
|
|
23
24
|
}
|
|
24
25
|
export function toXYZ(rgb) {
|
|
25
26
|
const xyz = [0, 0, 0];
|
|
26
27
|
const transform = srgbReverseTransform;
|
|
27
|
-
const matrix = srgbReverseMatrix;
|
|
28
|
+
const matrix = srgbReverseMatrix;
|
|
28
29
|
|
|
30
|
+
// Rescale from [0, 255] to [0, 1] then adjust sRGB gamma to linear RGB
|
|
29
31
|
const r = transform((rgb >> 16 & 0xff) / 255);
|
|
30
32
|
const g = transform((rgb >> 8 & 0xff) / 255);
|
|
31
|
-
const b = transform((rgb >> 0 & 0xff) / 255);
|
|
33
|
+
const b = transform((rgb >> 0 & 0xff) / 255);
|
|
32
34
|
|
|
35
|
+
// Matrix color space transform
|
|
33
36
|
for (let i = 0; i < 3; ++i) {
|
|
34
37
|
xyz[i] = matrix[i][0] * r + matrix[i][1] * g + matrix[i][2] * b;
|
|
35
38
|
}
|
|
36
|
-
|
|
37
39
|
return xyz;
|
|
38
40
|
}
|
|
39
41
|
//# sourceMappingURL=transformSRGB.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformSRGB.mjs","names":["clamp","srgbForwardMatrix","srgbForwardTransform","C","srgbReverseMatrix","srgbReverseTransform","fromXYZ","xyz","rgb","Array","transform","matrix","i","Math","round","toXYZ","r","g","b"],"sources":["../../../src/util/color/transformSRGB.ts"],"sourcesContent":["import type { ColorInt, XYZ } from '../colorUtils'\nimport { clamp } from '../../util/helpers'\n\n// For converting XYZ to sRGB\nconst srgbForwardMatrix = [\n [3.2406, -1.5372, -0.4986],\n [-0.9689, 1.8758, 0.0415],\n [0.0557, -0.2040, 1.0570],\n]\n\n// Forward gamma adjust\nconst srgbForwardTransform = (C: number): number => (\n C <= 0.0031308\n ? C * 12.92\n : 1.055 * C ** (1 / 2.4) - 0.055\n)\n\n// For converting sRGB to XYZ\nconst srgbReverseMatrix = [\n [0.4124, 0.3576, 0.1805],\n [0.2126, 0.7152, 0.0722],\n [0.0193, 0.1192, 0.9505],\n]\n\n// Reverse gamma adjust\nconst srgbReverseTransform = (C: number): number => (\n C <= 0.04045\n ? C / 12.92\n : ((C + 0.055) / 1.055) ** 2.4\n)\n\nexport function fromXYZ (xyz: XYZ): ColorInt {\n const rgb = Array(3)\n const transform = srgbForwardTransform\n const matrix = srgbForwardMatrix\n\n // Matrix transform, then gamma adjustment\n for (let i = 0; i < 3; ++i) {\n rgb[i] = Math.round(clamp(transform(\n matrix[i][0] * xyz[0] +\n matrix[i][1] * xyz[1] +\n matrix[i][2] * xyz[2]\n )) * 255)\n }\n\n // Rescale back to [0, 255]\n return (rgb[0] << 16) + (rgb[1] << 8) + (rgb[2] << 0)\n}\n\nexport function toXYZ (rgb: ColorInt): XYZ {\n const xyz: XYZ = [0, 0, 0]\n const transform = srgbReverseTransform\n const matrix = srgbReverseMatrix\n\n // Rescale from [0, 255] to [0, 1] then adjust sRGB gamma to linear RGB\n const r = transform((rgb >> 16 & 0xff) / 255)\n const g = transform((rgb >> 8 & 0xff) / 255)\n const b = transform((rgb >> 0 & 0xff) / 255)\n\n // Matrix color space transform\n for (let i = 0; i < 3; ++i) {\n xyz[i] = matrix[i][0] * r + matrix[i][1] * g + matrix[i][2] * b\n }\n\n return xyz\n}\n"],"mappings":"SACSA,
|
|
1
|
+
{"version":3,"file":"transformSRGB.mjs","names":["clamp","srgbForwardMatrix","srgbForwardTransform","C","srgbReverseMatrix","srgbReverseTransform","fromXYZ","xyz","rgb","Array","transform","matrix","i","Math","round","toXYZ","r","g","b"],"sources":["../../../src/util/color/transformSRGB.ts"],"sourcesContent":["import type { ColorInt, XYZ } from '../colorUtils'\nimport { clamp } from '../../util/helpers'\n\n// For converting XYZ to sRGB\nconst srgbForwardMatrix = [\n [3.2406, -1.5372, -0.4986],\n [-0.9689, 1.8758, 0.0415],\n [0.0557, -0.2040, 1.0570],\n]\n\n// Forward gamma adjust\nconst srgbForwardTransform = (C: number): number => (\n C <= 0.0031308\n ? C * 12.92\n : 1.055 * C ** (1 / 2.4) - 0.055\n)\n\n// For converting sRGB to XYZ\nconst srgbReverseMatrix = [\n [0.4124, 0.3576, 0.1805],\n [0.2126, 0.7152, 0.0722],\n [0.0193, 0.1192, 0.9505],\n]\n\n// Reverse gamma adjust\nconst srgbReverseTransform = (C: number): number => (\n C <= 0.04045\n ? C / 12.92\n : ((C + 0.055) / 1.055) ** 2.4\n)\n\nexport function fromXYZ (xyz: XYZ): ColorInt {\n const rgb = Array(3)\n const transform = srgbForwardTransform\n const matrix = srgbForwardMatrix\n\n // Matrix transform, then gamma adjustment\n for (let i = 0; i < 3; ++i) {\n rgb[i] = Math.round(clamp(transform(\n matrix[i][0] * xyz[0] +\n matrix[i][1] * xyz[1] +\n matrix[i][2] * xyz[2]\n )) * 255)\n }\n\n // Rescale back to [0, 255]\n return (rgb[0] << 16) + (rgb[1] << 8) + (rgb[2] << 0)\n}\n\nexport function toXYZ (rgb: ColorInt): XYZ {\n const xyz: XYZ = [0, 0, 0]\n const transform = srgbReverseTransform\n const matrix = srgbReverseMatrix\n\n // Rescale from [0, 255] to [0, 1] then adjust sRGB gamma to linear RGB\n const r = transform((rgb >> 16 & 0xff) / 255)\n const g = transform((rgb >> 8 & 0xff) / 255)\n const b = transform((rgb >> 0 & 0xff) / 255)\n\n // Matrix color space transform\n for (let i = 0; i < 3; ++i) {\n xyz[i] = matrix[i][0] * r + matrix[i][1] * g + matrix[i][2] * b\n }\n\n return xyz\n}\n"],"mappings":"SACSA,KAAK,kCAEd;AACA,MAAMC,iBAAiB,GAAG,CACxB,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,EAC1B,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EACzB,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAC1B;;AAED;AACA,MAAMC,oBAAoB,GAAIC,CAAS,IACrCA,CAAC,IAAI,SAAS,GACVA,CAAC,GAAG,KAAK,GACT,KAAK,GAAGA,CAAC,KAAK,CAAC,GAAG,GAAG,C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