vectis-ui 0.14.0 → 0.16.0
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/dist/components/VAccordion/VAccordion.css +1 -1
- package/dist/components/VAccordion/VAccordion.d.ts +0 -6
- package/dist/components/VAccordion/VAccordion.js.map +1 -1
- package/dist/components/VAccordion/VAccordion.vue_vue_type_script_setup_true_lang.js +3 -8
- package/dist/components/VAccordion/VAccordion.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VAccordion/VAccordionItem.js.map +1 -1
- package/dist/components/VAccordion/VAccordionItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VAccordion/context.js.map +1 -1
- package/dist/components/VAlert/VAlert.js.map +1 -1
- package/dist/components/VAlert/VAlert.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VAvatar/VAvatar.d.ts +0 -3
- package/dist/components/VAvatar/VAvatar.js.map +1 -1
- package/dist/components/VAvatar/VAvatar.vue_vue_type_script_setup_true_lang.js +21 -27
- package/dist/components/VAvatar/VAvatar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VAvatar/VAvatarGroup.d.ts +0 -6
- package/dist/components/VAvatar/VAvatarGroup.js.map +1 -1
- package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js +5 -19
- package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VAvatar/context.d.ts +0 -1
- package/dist/components/VAvatar/context.js.map +1 -1
- package/dist/components/VBadge/VBadge.js.map +1 -1
- package/dist/components/VBadge/VBadge.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/VBadge/VBadge.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VBreadcrumb/VBreadcrumb.js.map +1 -1
- package/dist/components/VBreadcrumb/VBreadcrumb.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VButton/VButton.d.ts +0 -6
- package/dist/components/VButton/VButton.js.map +1 -1
- package/dist/components/VButton/VButton.vue_vue_type_script_setup_true_lang.js +11 -17
- package/dist/components/VButton/VButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VButton/VButtonGroup.d.ts +0 -6
- package/dist/components/VButton/VButtonGroup.js.map +1 -1
- package/dist/components/VButton/VButtonGroup.vue_vue_type_script_setup_true_lang.js +0 -7
- package/dist/components/VButton/VButtonGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VButton/context.d.ts +0 -2
- package/dist/components/VButton/context.js.map +1 -1
- package/dist/components/VCalendar/VCalendar.js.map +1 -1
- package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCalendar/VCalendarEvent.js.map +1 -1
- package/dist/components/VCalendar/VCalendarEvent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCalendar/VCalendarMonth.js.map +1 -1
- package/dist/components/VCalendar/VCalendarMonth.vue_vue_type_script_setup_true_lang.js +5 -17
- package/dist/components/VCalendar/VCalendarMonth.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCalendar/VCalendarTimeGrid.js.map +1 -1
- package/dist/components/VCalendar/VCalendarTimeGrid.vue_vue_type_script_setup_true_lang.js +19 -31
- package/dist/components/VCalendar/VCalendarTimeGrid.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCalendar/VCalendarYear.js.map +1 -1
- package/dist/components/VCalendar/VCalendarYear.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCalendar/color.js.map +1 -1
- package/dist/components/VCalendar/edgeStep.js +1 -5
- package/dist/components/VCalendar/edgeStep.js.map +1 -1
- package/dist/components/VCalendar/gesture.js +4 -12
- package/dist/components/VCalendar/gesture.js.map +1 -1
- package/dist/components/VCalendar/keyboard.js.map +1 -1
- package/dist/components/VCalendar/layout.js +8 -12
- package/dist/components/VCalendar/layout.js.map +1 -1
- package/dist/components/VCalendar/timeGrid.js +5 -5
- package/dist/components/VCalendar/timeGrid.js.map +1 -1
- package/dist/components/VCard/VCard.js.map +1 -1
- package/dist/components/VCard/VCard.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCarousel/VCarousel.js.map +1 -1
- package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCarousel/VCarouselItem.js.map +1 -1
- package/dist/components/VCarousel/VCarouselItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCarousel/context.js.map +1 -1
- package/dist/components/VCheckbox/VCheckMark.js.map +1 -1
- package/dist/components/VCheckbox/VCheckMark.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCheckbox/VCheckbox.js.map +1 -1
- package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VChip/VChip.d.ts +0 -3
- package/dist/components/VChip/VChip.js.map +1 -1
- package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js +0 -6
- package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VColorInput/VColorInput.d.ts +0 -3
- package/dist/components/VColorInput/VColorInput.js.map +1 -1
- package/dist/components/VColorInput/VColorInput.vue_vue_type_script_setup_true_lang.js +3 -9
- package/dist/components/VColorInput/VColorInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VColorPicker/VColorPicker.js.map +1 -1
- package/dist/components/VColorPicker/VColorPicker.vue_vue_type_script_setup_true_lang.js +1 -5
- package/dist/components/VColorPicker/VColorPicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VColorPicker/color.js.map +1 -1
- package/dist/components/VCombobox/VCombobox.d.ts +0 -3
- package/dist/components/VCombobox/VCombobox.js.map +1 -1
- package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js +100 -119
- package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCommandPalette/VCommandPalette.js.map +1 -1
- package/dist/components/VCommandPalette/VCommandPalette.vue_vue_type_script_setup_true_lang.js +0 -1
- package/dist/components/VCommandPalette/VCommandPalette.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCommandPalette/VCommandPaletteItem.js.map +1 -1
- package/dist/components/VCommandPalette/VCommandPaletteItem.vue_vue_type_script_setup_true_lang.js +1 -5
- package/dist/components/VCommandPalette/VCommandPaletteItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VContextMenu/VContextMenu.d.ts +0 -3
- package/dist/components/VContextMenu/VContextMenu.js.map +1 -1
- package/dist/components/VContextMenu/VContextMenu.vue_vue_type_script_setup_true_lang.js +3 -11
- package/dist/components/VContextMenu/VContextMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VDataTable/VDataTable.css +1 -1
- package/dist/components/VDataTable/VDataTable.d.ts +0 -2
- package/dist/components/VDataTable/VDataTable.js.map +1 -1
- package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js +69 -88
- package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VDateInput/VDateInput.d.ts +0 -3
- package/dist/components/VDateInput/VDateInput.js.map +1 -1
- package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js +5 -10
- package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VDateInput/mask.js.map +1 -1
- package/dist/components/VDatePicker/VDatePicker.js.map +1 -1
- package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VDatePicker/keyboard.js.map +1 -1
- package/dist/components/VDatePicker/names.js.map +1 -1
- package/dist/components/VDialog/VDialog.js.map +1 -1
- package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VDialog/VDialogAlert.js.map +1 -1
- package/dist/components/VDialog/VDialogAlert.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VDrawer/VDrawer.js.map +1 -1
- package/dist/components/VDrawer/VDrawer.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VEmptyState/VEmptyState.js.map +1 -1
- package/dist/components/VEmptyState/VEmptyState.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VField/VField.js.map +1 -1
- package/dist/components/VField/VField.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VField/VFieldAnnouncer.js.map +1 -1
- package/dist/components/VField/VFieldAnnouncer.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VField/VFieldMessage.js.map +1 -1
- package/dist/components/VField/VFieldMessage.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VFieldset/VFieldset.js.map +1 -1
- package/dist/components/VFieldset/VFieldset.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VFileInput/VFileInput.d.ts +0 -5
- package/dist/components/VFileInput/VFileInput.js.map +1 -1
- package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js +54 -65
- package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VFileInput/truncate.js.map +1 -1
- package/dist/components/VFilePicker/VFilePicker.js.map +1 -1
- package/dist/components/VFilePicker/VFilePicker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/VFilePicker/VFilePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VFilePicker/fileKind.js.map +1 -1
- package/dist/components/VHotkeys/VHotkeys.d.ts +0 -3
- package/dist/components/VHotkeys/VHotkeys.js.map +1 -1
- package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js +0 -6
- package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VHotkeys/platform.js +1 -1
- package/dist/components/VHotkeys/platform.js.map +1 -1
- package/dist/components/VHoverCard/VHoverCard.js.map +1 -1
- package/dist/components/VHoverCard/VHoverCard.vue_vue_type_script_setup_true_lang.js +2 -12
- package/dist/components/VHoverCard/VHoverCard.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VIcon/VIcon.js.map +1 -1
- package/dist/components/VIcon/VIcon.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VIcon/iconProps.js.map +1 -1
- package/dist/components/VIcon/icons/add.js.map +1 -1
- package/dist/components/VIcon/icons/arrow_downward.js.map +1 -1
- package/dist/components/VIcon/icons/arrow_downward_alt.js.map +1 -1
- package/dist/components/VIcon/icons/arrow_drop_down.js.map +1 -1
- package/dist/components/VIcon/icons/arrow_drop_up.js.map +1 -1
- package/dist/components/VIcon/icons/arrow_left_alt.js.map +1 -1
- package/dist/components/VIcon/icons/arrow_right_alt.js.map +1 -1
- package/dist/components/VIcon/icons/arrow_upward.js.map +1 -1
- package/dist/components/VIcon/icons/arrow_upward_alt.js.map +1 -1
- package/dist/components/VIcon/icons/attach_file.js.map +1 -1
- package/dist/components/VIcon/icons/audio_file.js.map +1 -1
- package/dist/components/VIcon/icons/calendar_today.js.map +1 -1
- package/dist/components/VIcon/icons/check.js.map +1 -1
- package/dist/components/VIcon/icons/check_circle.js.map +1 -1
- package/dist/components/VIcon/icons/chevron_left.js.map +1 -1
- package/dist/components/VIcon/icons/chevron_right.js.map +1 -1
- package/dist/components/VIcon/icons/close.js.map +1 -1
- package/dist/components/VIcon/icons/cloud_upload.js.map +1 -1
- package/dist/components/VIcon/icons/code.js.map +1 -1
- package/dist/components/VIcon/icons/colorize.js.map +1 -1
- package/dist/components/VIcon/icons/description.js.map +1 -1
- package/dist/components/VIcon/icons/error.js.map +1 -1
- package/dist/components/VIcon/icons/expand_less.js.map +1 -1
- package/dist/components/VIcon/icons/expand_more.js.map +1 -1
- package/dist/components/VIcon/icons/first_page.js.map +1 -1
- package/dist/components/VIcon/icons/folder_zip.js.map +1 -1
- package/dist/components/VIcon/icons/image.js.map +1 -1
- package/dist/components/VIcon/icons/inbox.js.map +1 -1
- package/dist/components/VIcon/icons/index.js.map +1 -1
- package/dist/components/VIcon/icons/info.js.map +1 -1
- package/dist/components/VIcon/icons/last_page.js.map +1 -1
- package/dist/components/VIcon/icons/more_horiz.js.map +1 -1
- package/dist/components/VIcon/icons/names.js.map +1 -1
- package/dist/components/VIcon/icons/notifications.js.map +1 -1
- package/dist/components/VIcon/icons/open_in_new.js.map +1 -1
- package/dist/components/VIcon/icons/picture_as_pdf.js.map +1 -1
- package/dist/components/VIcon/icons/priority_high.js.map +1 -1
- package/dist/components/VIcon/icons/remove.js.map +1 -1
- package/dist/components/VIcon/icons/schedule.js.map +1 -1
- package/dist/components/VIcon/icons/search.js.map +1 -1
- package/dist/components/VIcon/icons/search_off.js.map +1 -1
- package/dist/components/VIcon/icons/star.js.map +1 -1
- package/dist/components/VIcon/icons/swap_vert.js.map +1 -1
- package/dist/components/VIcon/icons/table_chart.js.map +1 -1
- package/dist/components/VIcon/icons/video_file.js.map +1 -1
- package/dist/components/VIcon/icons/viewBox.js.map +1 -1
- package/dist/components/VIcon/icons/warning.js.map +1 -1
- package/dist/components/VIcon/resolver.js.map +1 -1
- package/dist/components/VIconButton/VIconButton.d.ts +0 -3
- package/dist/components/VIconButton/VIconButton.js.map +1 -1
- package/dist/components/VIconButton/VIconButton.vue_vue_type_script_setup_true_lang.js +0 -6
- package/dist/components/VIconButton/VIconButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VInput/VInput.css +1 -1
- package/dist/components/VInput/VInput.d.ts +0 -3
- package/dist/components/VInput/VInput.js.map +1 -1
- package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js +2 -8
- package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VInput/VInputGroup.d.ts +0 -3
- package/dist/components/VInput/VInputGroup.js.map +1 -1
- package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js +0 -7
- package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VInput/context.d.ts +0 -2
- package/dist/components/VInput/context.js.map +1 -1
- package/dist/components/VInputOTP/VInputOTP.d.ts +0 -3
- package/dist/components/VInputOTP/VInputOTP.js.map +1 -1
- package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js +2 -14
- package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VLink/VLink.js.map +1 -1
- package/dist/components/VLink/VLink.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VListbox/VListboxChevron.js.map +1 -1
- package/dist/components/VListbox/VListboxChevron.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VListbox/VListboxGroup.js.map +1 -1
- package/dist/components/VListbox/VListboxGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VListbox/VListboxOption.js.map +1 -1
- package/dist/components/VListbox/VListboxOption.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VListbox/VListboxPanel.d.ts +0 -3
- package/dist/components/VListbox/VListboxPanel.js.map +1 -1
- package/dist/components/VListbox/VListboxPanel.vue_vue_type_script_setup_true_lang.js +0 -6
- package/dist/components/VListbox/VListboxPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VListbox/VListboxSeparator.js.map +1 -1
- package/dist/components/VListbox/VListboxSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VListbox/VListboxValues.js.map +1 -1
- package/dist/components/VListbox/VListboxValues.vue_vue_type_script_setup_true_lang.js +4 -14
- package/dist/components/VListbox/VListboxValues.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VMenu/VMenu.d.ts +0 -3
- package/dist/components/VMenu/VMenu.js.map +1 -1
- package/dist/components/VMenu/VMenu.vue_vue_type_script_setup_true_lang.js +0 -6
- package/dist/components/VMenu/VMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VMenu/VMenuGroup.js.map +1 -1
- package/dist/components/VMenu/VMenuGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VMenu/VMenuItem.js.map +1 -1
- package/dist/components/VMenu/VMenuItem.vue_vue_type_script_setup_true_lang.js +6 -12
- package/dist/components/VMenu/VMenuItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VMenu/VMenuPanel.d.ts +0 -3
- package/dist/components/VMenu/VMenuPanel.js.map +1 -1
- package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js +9 -16
- package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VMenu/VMenuSeparator.js.map +1 -1
- package/dist/components/VMenu/VMenuSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VMenu/context.js.map +1 -1
- package/dist/components/VMeter/VMeter.js.map +1 -1
- package/dist/components/VMeter/VMeter.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VNumberInput/VNumberInput.d.ts +0 -3
- package/dist/components/VNumberInput/VNumberInput.js.map +1 -1
- package/dist/components/VNumberInput/VNumberInput.vue_vue_type_script_setup_true_lang.js +85 -90
- package/dist/components/VNumberInput/VNumberInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VNumberInput/number.js.map +1 -1
- package/dist/components/VPagination/VPagination.d.ts +0 -3
- package/dist/components/VPagination/VPagination.js.map +1 -1
- package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js +0 -6
- package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VPopover/VPopover.js.map +1 -1
- package/dist/components/VPopover/VPopover.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VProgressCircular/VProgressCircular.js.map +1 -1
- package/dist/components/VProgressCircular/VProgressCircular.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VProgressLinear/VProgressLinear.js.map +1 -1
- package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VRadio/VRadio.js.map +1 -1
- package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VRating/VRating.js.map +1 -1
- package/dist/components/VRating/VRating.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VResizable/VResizable.js.map +1 -1
- package/dist/components/VResizable/VResizable.vue_vue_type_script_setup_true_lang.js +8 -6
- package/dist/components/VResizable/VResizable.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VResizable/VResizablePanel.js.map +1 -1
- package/dist/components/VResizable/VResizablePanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VResizable/context.js.map +1 -1
- package/dist/components/VResizable/layout.js.map +1 -1
- package/dist/components/VSelect/VSelect.d.ts +0 -3
- package/dist/components/VSelect/VSelect.js.map +1 -1
- package/dist/components/VSelect/VSelect.vue_vue_type_script_setup_true_lang.js +80 -90
- package/dist/components/VSelect/VSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSeparator/VSeparator.js.map +1 -1
- package/dist/components/VSeparator/VSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigation.d.ts +0 -6
- package/dist/components/VSideNavigation/VSideNavigation.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js +2 -11
- package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigationGroup.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigationGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigationItem.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js +1 -5
- package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigationSeparator.js.map +1 -1
- package/dist/components/VSideNavigation/context.js.map +1 -1
- package/dist/components/VSkeletonLoader/VSkeletonLoader.d.ts +0 -3
- package/dist/components/VSkeletonLoader/VSkeletonLoader.js.map +1 -1
- package/dist/components/VSkeletonLoader/VSkeletonLoader.vue_vue_type_script_setup_true_lang.js +0 -6
- package/dist/components/VSkeletonLoader/VSkeletonLoader.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSlider/VSlider.js.map +1 -1
- package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js +107 -112
- package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSnackbar/VSnackbar.js.map +1 -1
- package/dist/components/VSnackbar/VSnackbar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSnackbar/state.js.map +1 -1
- package/dist/components/VSpinner/VSpinner.js.map +1 -1
- package/dist/components/VSpinner/VSpinner.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSplitButton/VSplitButton.d.ts +0 -3
- package/dist/components/VSplitButton/VSplitButton.js.map +1 -1
- package/dist/components/VSplitButton/VSplitButton.vue_vue_type_script_setup_true_lang.js +0 -6
- package/dist/components/VSplitButton/VSplitButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VStepper/VStepper.js.map +1 -1
- package/dist/components/VStepper/VStepper.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSwitch/VSwitch.js.map +1 -1
- package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTabs/VTab.js.map +1 -1
- package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js +0 -2
- package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTabs/VTabPanel.js.map +1 -1
- package/dist/components/VTabs/VTabPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTabs/VTabs.css +1 -1
- package/dist/components/VTabs/VTabs.d.ts +0 -3
- package/dist/components/VTabs/VTabs.js.map +1 -1
- package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js +2 -15
- package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTabs/context.d.ts +0 -2
- package/dist/components/VTabs/context.js.map +1 -1
- package/dist/components/VTextarea/VTextarea.d.ts +0 -6
- package/dist/components/VTextarea/VTextarea.js.map +1 -1
- package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js +0 -6
- package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTimeInput/VTimeInput.d.ts +0 -3
- package/dist/components/VTimeInput/VTimeInput.js.map +1 -1
- package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js +197 -204
- package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTimeInput/search.js.map +1 -1
- package/dist/components/VTimePicker/VTimePicker.js.map +1 -1
- package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js +9 -9
- package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTimePicker/limits.js.map +1 -1
- package/dist/components/VTimeline/VTimeline.js.map +1 -1
- package/dist/components/VTimeline/VTimeline.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTimeline/VTimelineItem.js.map +1 -1
- package/dist/components/VTimeline/VTimelineItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTimeline/context.js.map +1 -1
- package/dist/components/VTimeline/datetime.js.map +1 -1
- package/dist/components/VToast/VToast.js.map +1 -1
- package/dist/components/VToast/VToast.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VToast/VToaster.js.map +1 -1
- package/dist/components/VToast/VToaster.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/VToast/VToaster.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VToast/state.js.map +1 -1
- package/dist/components/VToggle/VToggle.d.ts +0 -3
- package/dist/components/VToggle/VToggle.js.map +1 -1
- package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js +1 -13
- package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VToggle/VToggleItem.js.map +1 -1
- package/dist/components/VToggle/VToggleItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VToggle/context.js.map +1 -1
- package/dist/components/VTooltip/VTooltip.js.map +1 -1
- package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTreeView/VTreeView.js.map +1 -1
- package/dist/components/VTreeView/VTreeView.vue_vue_type_script_setup_true_lang.js +1 -5
- package/dist/components/VTreeView/VTreeView.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTypography/VTypography.js.map +1 -1
- package/dist/components/VTypography/VTypography.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VVirtualList/VVirtualList.js.map +1 -1
- package/dist/components/VVirtualList/VVirtualList.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/composables/useAriaLabel.js.map +1 -1
- package/dist/composables/useChoice.js.map +1 -1
- package/dist/composables/useClearable.js.map +1 -1
- package/dist/composables/useControlShape.d.ts +1 -5
- package/dist/composables/useControlShape.js +0 -1
- package/dist/composables/useControlShape.js.map +1 -1
- package/dist/composables/useDebouncedSearch.js.map +1 -1
- package/dist/composables/useDetailsOpen.js.map +1 -1
- package/dist/composables/useEscapeDismiss.js.map +1 -1
- package/dist/composables/useFieldIds.js.map +1 -1
- package/dist/composables/useFieldPanel.js +3 -7
- package/dist/composables/useFieldPanel.js.map +1 -1
- package/dist/composables/useFileDrop.js.map +1 -1
- package/dist/composables/useFileField.js +2 -2
- package/dist/composables/useFileField.js.map +1 -1
- package/dist/composables/useFocusoutDismiss.js.map +1 -1
- package/dist/composables/useHotkeyListener.js.map +1 -1
- package/dist/composables/useIconClickHandlers.js.map +1 -1
- package/dist/composables/useInertLink.js.map +1 -1
- package/dist/composables/useInfiniteScroll.js +2 -2
- package/dist/composables/useInfiniteScroll.js.map +1 -1
- package/dist/composables/useListbox.d.ts +0 -1
- package/dist/composables/useListbox.js +4 -10
- package/dist/composables/useListbox.js.map +1 -1
- package/dist/composables/useLiveAnnouncer.js.map +1 -1
- package/dist/composables/useMaskedField.js +28 -48
- package/dist/composables/useMaskedField.js.map +1 -1
- package/dist/composables/useModalDialog.js +1 -1
- package/dist/composables/useModalDialog.js.map +1 -1
- package/dist/composables/usePopover.js +1 -1
- package/dist/composables/usePopover.js.map +1 -1
- package/dist/composables/useProgressValue.js.map +1 -1
- package/dist/composables/useRootAttrs.js.map +1 -1
- package/dist/composables/useSlotNodes.js.map +1 -1
- package/dist/composables/useTextLimit.js.map +1 -1
- package/dist/composables/useTimer.js.map +1 -1
- package/dist/composables/useTypeahead.js.map +1 -1
- package/dist/composables/useVirtualList.js.map +1 -1
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/fr.js.map +1 -1
- package/dist/i18n/state.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/tokens/css.js.map +1 -1
- package/dist/tokens/index.d.ts +3 -0
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/primitives.js.map +1 -1
- package/dist/tokens/semantic.d.ts +3 -0
- package/dist/tokens/semantic.js +6 -5
- package/dist/tokens/semantic.js.map +1 -1
- package/dist/tokens/themes/dark.js.map +1 -1
- package/dist/tokens/types.js.map +1 -1
- package/dist/tokens.json +12 -5
- package/dist/types.d.ts +0 -2
- package/dist/utils/array.js.map +1 -1
- package/dist/utils/arrowNav.js.map +1 -1
- package/dist/utils/attrs.js.map +1 -1
- package/dist/utils/chip.d.ts +4 -6
- package/dist/utils/chip.js +8 -5
- package/dist/utils/chip.js.map +1 -1
- package/dist/utils/clock.js +3 -1
- package/dist/utils/clock.js.map +1 -1
- package/dist/utils/css.js +1 -1
- package/dist/utils/css.js.map +1 -1
- package/dist/utils/date.js.map +1 -1
- package/dist/utils/direction.js.map +1 -1
- package/dist/utils/env.js.map +1 -1
- package/dist/utils/file.js +13 -31
- package/dist/utils/file.js.map +1 -1
- package/dist/utils/focus.js.map +1 -1
- package/dist/utils/hostWarns.js.map +1 -1
- package/dist/utils/ids.js.map +1 -1
- package/dist/utils/matcher.js.map +1 -1
- package/dist/utils/memo.js.map +1 -1
- package/dist/utils/number.js.map +1 -1
- package/dist/utils/text.js.map +1 -1
- package/dist/utils/time.js.map +1 -1
- package/dist/utils/vnode.js.map +1 -1
- package/package.json +19 -19
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dark.js","names":[],"sources":["../../../src/tokens/themes/dark.ts"],"sourcesContent":["/** Dark mode repoints existing semantic roles while retaining the shared primitive palette. */\nimport { color, type TokenGroup } from '../types'\n\nexport const dark = {\n color: {\n surface: color('{color.gray.950}'),\n 'surface-muted': color('{color.gray.800}'),\n 'surface-raised': color('{color.gray.900}'),\n 'surface-overlay': color('{color.gray.900}'),\n 'surface-sunken': color('oklch(11% 0.006 260)'),\n 'surface-inverse': color('{color.gray.800}'),\n 'surface-skeleton': color('{color.gray.800}'),\n\n 'text-on-inverse': color('{color.gray.50}'),\n\n text: color('{color.gray.50}'),\n 'text-muted': color('{color.gray.300}'),\n 'text-subtle': color('{color.gray.400}'),\n 'text-on-accent': color('{color.white}'),\n\n border: color('{color.gray.800}'),\n 'border-strong': color('{color.gray.700}'),\n 'border-on-fill': color('oklch(100% 0 0 / 0.15)'),\n\n accent: color('{color.indigo.500}'),\n 'accent-hover': color('{color.indigo.400}'),\n 'accent-active': color('{color.indigo.300}'),\n 'accent-surface': color('{color.indigo.950}'),\n 'accent-border': color('{color.indigo.900}'),\n 'accent-text': color('{color.indigo.300}'),\n\n /*\n * Retain explicit red/green steps for white-text contrast. Their dark-theme hover steps\n * grow darker, unlike accent and warning.\n */\n danger: color('{color.red.600}'),\n 'danger-hover': color('{color.red.700}'),\n 'danger-active': color('{color.red.800}'),\n 'danger-surface': color('{color.red.950}'),\n 'danger-border': color('{color.red.900}'),\n 'danger-text': color('{color.red.300}'),\n\n success: color('{color.green.700}'),\n 'success-hover': color('{color.green.800}'),\n 'success-active': color('{color.green.900}'),\n 'success-surface': color('{color.green.950}'),\n 'success-border': color('{color.green.900}'),\n 'success-text': color('{color.green.300}'),\n\n warning: color('{color.amber.500}'),\n 'warning-hover': color('{color.amber.400}'),\n 'warning-active': color('{color.amber.300}'),\n 'warning-surface': color('{color.amber.950}'),\n 'warning-border': color('{color.amber.900}'),\n 'warning-text': color('{color.amber.300}'),\n\n backdrop: color('oklch(0% 0 0 / 0.6)'),\n\n /* Swap event surface and text lightness in dark mode; each card still supplies its own hue. */\n 'event-surface': color('oklch(0.3 0.05 265)'),\n 'event-border': color('oklch(0.42 0.08 265)'),\n 'event-text': color('oklch(0.9 0.06 265)'),\n },\n focus: {\n 'ring-color': color('{color.indigo.400}'),\n },\n} satisfies TokenGroup\n"],"mappings":";;AAGA,
|
|
1
|
+
{"version":3,"file":"dark.js","names":["dark","color"],"sources":["../../../src/tokens/themes/dark.ts"],"sourcesContent":["/** Dark mode repoints existing semantic roles while retaining the shared primitive palette. */\nimport { color, type TokenGroup } from '../types'\n\nexport const dark = {\n color: {\n surface: color('{color.gray.950}'),\n 'surface-muted': color('{color.gray.800}'),\n 'surface-raised': color('{color.gray.900}'),\n 'surface-overlay': color('{color.gray.900}'),\n 'surface-sunken': color('oklch(11% 0.006 260)'),\n 'surface-inverse': color('{color.gray.800}'),\n 'surface-skeleton': color('{color.gray.800}'),\n\n 'text-on-inverse': color('{color.gray.50}'),\n\n text: color('{color.gray.50}'),\n 'text-muted': color('{color.gray.300}'),\n 'text-subtle': color('{color.gray.400}'),\n 'text-on-accent': color('{color.white}'),\n\n border: color('{color.gray.800}'),\n 'border-strong': color('{color.gray.700}'),\n 'border-on-fill': color('oklch(100% 0 0 / 0.15)'),\n\n accent: color('{color.indigo.500}'),\n 'accent-hover': color('{color.indigo.400}'),\n 'accent-active': color('{color.indigo.300}'),\n 'accent-surface': color('{color.indigo.950}'),\n 'accent-border': color('{color.indigo.900}'),\n 'accent-text': color('{color.indigo.300}'),\n\n /*\n * Retain explicit red/green steps for white-text contrast. Their dark-theme hover steps\n * grow darker, unlike accent and warning.\n */\n danger: color('{color.red.600}'),\n 'danger-hover': color('{color.red.700}'),\n 'danger-active': color('{color.red.800}'),\n 'danger-surface': color('{color.red.950}'),\n 'danger-border': color('{color.red.900}'),\n 'danger-text': color('{color.red.300}'),\n\n success: color('{color.green.700}'),\n 'success-hover': color('{color.green.800}'),\n 'success-active': color('{color.green.900}'),\n 'success-surface': color('{color.green.950}'),\n 'success-border': color('{color.green.900}'),\n 'success-text': color('{color.green.300}'),\n\n warning: color('{color.amber.500}'),\n 'warning-hover': color('{color.amber.400}'),\n 'warning-active': color('{color.amber.300}'),\n 'warning-surface': color('{color.amber.950}'),\n 'warning-border': color('{color.amber.900}'),\n 'warning-text': color('{color.amber.300}'),\n\n backdrop: color('oklch(0% 0 0 / 0.6)'),\n\n /* Swap event surface and text lightness in dark mode; each card still supplies its own hue. */\n 'event-surface': color('oklch(0.3 0.05 265)'),\n 'event-border': color('oklch(0.42 0.08 265)'),\n 'event-text': color('oklch(0.9 0.06 265)'),\n },\n focus: {\n 'ring-color': color('{color.indigo.400}'),\n },\n} satisf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AUA,EAAM,qBAAqB;EAGrC,iBAAiBA,EAAM,qBAAqB;EAC5C,gBAAgBA,EAAM,sBAAsB;EAC5C,cAAcA,EAAM,qBAAqB;CAC3C;CACA,OAAO,EACL,cAAcA,EAAM,oBAAoB,EAC1C;AACF"}
|
package/dist/tokens/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../src/tokens/types.ts"],"sourcesContent":["/** Typed DTCG tokens: nested groups of $value, $type and optional $description. */\nexport type TokenType =\n | 'color'\n | 'dimension'\n | 'fontFamily'\n | 'fontWeight'\n | 'number'\n | 'duration'\n | 'cubicBezier'\n | 'shadow'\n\nexport interface DesignToken {\n $value: string\n $type: TokenType\n $description?: string\n}\n\nexport interface TokenGroup {\n [key: string]: DesignToken | TokenGroup\n}\n\n/** Tells a token apart from a group of them, which walking the tree rests on. */\nexport function isToken(node: DesignToken | TokenGroup): node is DesignToken {\n return typeof (node as DesignToken).$value === 'string'\n}\n\nconst make =\n ($type: TokenType) =>\n ($value: string, $description?: string): DesignToken =>\n $description === undefined ? { $type, $value } : { $type, $value, $description }\n\nexport const color = make('color')\nexport const dimension = make('dimension')\nexport const fontFamily = make('fontFamily')\nexport const fontWeight = make('fontWeight')\nexport const number = make('number')\nexport const duration = make('duration')\nexport const cubicBezier = make('cubicBezier')\nexport const shadow = make('shadow')\n"],"mappings":";AAsBA,
|
|
1
|
+
{"version":3,"file":"types.js","names":["isToken","node","make","$description","color","dimension","fontFamily","fontWeight","duration","cubicBezier","shadow"],"sources":["../../src/tokens/types.ts"],"sourcesContent":["/** Typed DTCG tokens: nested groups of $value, $type and optional $description. */\nexport type TokenType =\n | 'color'\n | 'dimension'\n | 'fontFamily'\n | 'fontWeight'\n | 'number'\n | 'duration'\n | 'cubicBezier'\n | 'shadow'\n\nexport interface DesignToken {\n $value: string\n $type: TokenType\n $description?: string\n}\n\nexport interface TokenGroup {\n [key: string]: DesignToken | TokenGroup\n}\n\n/** Tells a token apart from a group of them, which walking the tree rests on. */\nexport function isToken(node: DesignToken | TokenGroup): node is DesignToken {\n return typeof (node as DesignToken).$value === 'string'\n}\n\nconst make =\n ($type: TokenType) =>\n ($value: string, $description?: string): DesignToken =>\n $description === undefined ? { $type, $value } : { $type, $value, $description }\n\nexport const color = make('color')\nexport const dimension = make('dimension')\nexport const fontFamily = make('fontFamily')\nexport const fontWeight = make('fontWeight')\nexport const number = make('number')\nexport const duration = make('duration')\nexport const cubicBezier = make('cubicBezier')\nexport const shadow = make('shadow')\n"],"mappings":";AAsBA,SAAgBA,EAAQ,GAAqD;CAC3E,OAAO,OAAQC,EAAqB,UAAW;AACjD;AAEA,IAAMC,KACH,OACA,GAAgB,MACfC,MAAiB,KAAA,IAAY;CAAE;CAAO;AAAO,IAAI;CAAE;CAAO;CAAQ;AAAa,GAEtEC,IAAQF,EAAK,OAAO,GACpBG,IAAYH,EAAK,WAAW,GAC5BI,IAAaJ,EAAK,YAAY,GAC9BK,IAAaL,EAAK,YAAY,GAE9BM,IAAWN,EAAK,UAAU,GAC1BO,IAAcP,EAAK,aAAa,GAChCQ,IAASR,EAAK,QAAQ"}
|
package/dist/tokens.json
CHANGED
|
@@ -1071,31 +1071,38 @@
|
|
|
1071
1071
|
"$description": "The gap between a control and its focus ring"
|
|
1072
1072
|
}
|
|
1073
1073
|
},
|
|
1074
|
+
"density": {
|
|
1075
|
+
"delta": {
|
|
1076
|
+
"$type": "dimension",
|
|
1077
|
+
"$value": "0px",
|
|
1078
|
+
"$description": "What the density takes off every control height and component padding: 0px for the standard scale, the --vectis-space-1 step for the compact one"
|
|
1079
|
+
}
|
|
1080
|
+
},
|
|
1074
1081
|
"control": {
|
|
1075
1082
|
"height-xs": {
|
|
1076
1083
|
"$type": "dimension",
|
|
1077
1084
|
"$value": "1.5rem",
|
|
1078
|
-
"$description": "The height of every control at size=\"xs\" (24px),
|
|
1085
|
+
"$description": "The height of every control at size=\"xs\" (24px), less the density delta"
|
|
1079
1086
|
},
|
|
1080
1087
|
"height-sm": {
|
|
1081
1088
|
"$type": "dimension",
|
|
1082
1089
|
"$value": "2rem",
|
|
1083
|
-
"$description": "The height of every control at size=\"sm\" (32px),
|
|
1090
|
+
"$description": "The height of every control at size=\"sm\" (32px), less the density delta"
|
|
1084
1091
|
},
|
|
1085
1092
|
"height-md": {
|
|
1086
1093
|
"$type": "dimension",
|
|
1087
1094
|
"$value": "2.5rem",
|
|
1088
|
-
"$description": "The height of every control at size=\"md\" (40px),
|
|
1095
|
+
"$description": "The height of every control at size=\"md\" (40px), less the density delta"
|
|
1089
1096
|
},
|
|
1090
1097
|
"height-lg": {
|
|
1091
1098
|
"$type": "dimension",
|
|
1092
1099
|
"$value": "3rem",
|
|
1093
|
-
"$description": "The height of every control at size=\"lg\" (48px),
|
|
1100
|
+
"$description": "The height of every control at size=\"lg\" (48px), less the density delta"
|
|
1094
1101
|
},
|
|
1095
1102
|
"height-xl": {
|
|
1096
1103
|
"$type": "dimension",
|
|
1097
1104
|
"$value": "3.5rem",
|
|
1098
|
-
"$description": "The height of every control at size=\"xl\" (56px),
|
|
1105
|
+
"$description": "The height of every control at size=\"xl\" (56px), less the density delta"
|
|
1099
1106
|
},
|
|
1100
1107
|
"border-width": {
|
|
1101
1108
|
"$type": "dimension",
|
package/dist/types.d.ts
CHANGED
|
@@ -49,11 +49,9 @@ export interface ListboxChipSlotProps {
|
|
|
49
49
|
label: string;
|
|
50
50
|
remove: () => void;
|
|
51
51
|
size: ChipSize;
|
|
52
|
-
compact: boolean;
|
|
53
52
|
}
|
|
54
53
|
/** What the `#overflow` slot of VCombobox and VSelect receives. */
|
|
55
54
|
export interface ListboxOverflowSlotProps {
|
|
56
55
|
count: number;
|
|
57
56
|
size: ChipSize;
|
|
58
|
-
compact: boolean;
|
|
59
57
|
}
|
package/dist/utils/array.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array.js","names":[],"sources":["../../src/utils/array.ts"],"sourcesContent":["// @core\n/**\n * Toggle membership without mutating the input; returning a new reference propagates selection\n * changes through v-model.\n */\nexport function toggleValue<T>(list: readonly T[], value: T): T[] {\n return list.includes(value) ? list.filter((v) => v !== value) : [...list, value]\n}\n"],"mappings":";AAKA,
|
|
1
|
+
{"version":3,"file":"array.js","names":["toggleValue","list","value","v"],"sources":["../../src/utils/array.ts"],"sourcesContent":["// @core\n/**\n * Toggle membership without mutating the input; returning a new reference propagates selection\n * changes through v-model.\n */\nexport function toggleValue<T>(list: readonly T[], value: T): T[] {\n return list.includes(value) ? list.filter((v) => v !== value) : [...list, value]\n}\n"],"mappings":";AAKA,SAAgBA,EAAe,GAAoB,GAAe;CAChE,OAAOC,EAAK,SAASC,CAAK,IAAID,EAAK,QAAQ,MAAME,MAAMD,CAAK,IAAI,CAAC,GAAGD,GAAMC,CAAK;AACjF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrowNav.js","names":[],"sources":["../../src/utils/arrowNav.ts"],"sourcesContent":["// @keyboard @a11y\n/** Arrow-key navigation over a row or column of controls, shared by every roving-focus group. */\nimport { isRtl } from './direction'\n\n/** The elements the arrows may land on, discovered from the DOM rather than a registry. */\nexport function navigableItems(container: HTMLElement, selector: string): HTMLElement[] {\n return [...container.querySelectorAll<HTMLElement>(selector)].filter(\n (el) => getComputedStyle(el).display !== 'none',\n )\n}\n\n/** Moves focus for the arrows and Home/End, and reports whether it took the key. */\nexport function arrowNavigate(\n event: KeyboardEvent,\n container: HTMLElement,\n items: () => HTMLElement[],\n options: { vertical?: boolean } = {},\n): boolean {\n const vertical = options.vertical ?? false\n const keys = vertical\n ? ['ArrowDown', 'ArrowUp', 'Home', 'End']\n : ['ArrowRight', 'ArrowLeft', 'Home', 'End']\n if (event.altKey || event.ctrlKey || event.metaKey || !keys.includes(event.key)) return false\n const list = items()\n if (list.length === 0) return false\n event.preventDefault()\n\n // A function, not a value: only the arrow branch asks, so Home and End are spared the\n // style recalculation that reading the direction forces.\n const forward = () =>\n vertical ? event.key === 'ArrowDown' : (event.key === 'ArrowRight') !== isRtl(container)\n const current = list.indexOf(document.activeElement as HTMLElement)\n const next =\n event.key === 'Home'\n ? 0\n : event.key === 'End'\n ? list.length - 1\n : current === -1\n ? 0\n : (current + (forward() ? 1 : -1) + list.length) % list.length\n list[next]?.focus()\n return true\n}\n"],"mappings":";;AAKA,
|
|
1
|
+
{"version":3,"file":"arrowNav.js","names":["navigableItems","container","selector","el","arrowNavigate","vertical","options","keys","event","list","items","forward","isRtl","current"],"sources":["../../src/utils/arrowNav.ts"],"sourcesContent":["// @keyboard @a11y\n/** Arrow-key navigation over a row or column of controls, shared by every roving-focus group. */\nimport { isRtl } from './direction'\n\n/** The elements the arrows may land on, discovered from the DOM rather than a registry. */\nexport function navigableItems(container: HTMLElement, selector: string): HTMLElement[] {\n return [...container.querySelectorAll<HTMLElement>(selector)].filter(\n (el) => getComputedStyle(el).display !== 'none',\n )\n}\n\n/** Moves focus for the arrows and Home/End, and reports whether it took the key. */\nexport function arrowNavigate(\n event: KeyboardEvent,\n container: HTMLElement,\n items: () => HTMLElement[],\n options: { vertical?: boolean } = {},\n): boolean {\n const vertical = options.vertical ?? false\n const keys = vertical\n ? ['ArrowDown', 'ArrowUp', 'Home', 'End']\n : ['ArrowRight', 'ArrowLeft', 'Home', 'End']\n if (event.altKey || event.ctrlKey || event.metaKey || !keys.includes(event.key)) return false\n const list = items()\n if (list.length === 0) return false\n event.preventDefault()\n\n // A function, not a value: only the arrow branch asks, so Home and End are spared the\n // style recalculation that reading the direction forces.\n const forward = () =>\n vertical ? event.key === 'ArrowDown' : (event.key === 'ArrowRight') !== isRtl(container)\n const current = list.indexOf(document.activeElement as HTMLElement)\n const next =\n event.key === 'Home'\n ? 0\n : event.key === 'End'\n ? list.length - 1\n : current === -1\n ? 0\n : (current + (forward() ? 1 : -1) + list.length) % list.length\n list[next]?.focus()\n return true\n}\n"],"mappings":";;AAKA,SAAgBA,EAAe,GAAwB,GAAiC;CACtF,OAAO,CAAC,GAAGC,EAAU,iBAA8BC,CAAQ,CAAC,CAAC,CAAC,QAC3D,MAAO,iBAAiBC,CAAE,CAAC,CAAC,YAAY,MAC3C;AACF;AAGA,SAAgBC,EACd,GACA,GACA,GACA,IAAkC,CAAC,GAC1B;CACT,IAAMC,IAAWC,EAAQ,YAAY,IAC/BC,IAAOF,IACT;EAAC;EAAa;EAAW;EAAQ;CAAK,IACtC;EAAC;EAAc;EAAa;EAAQ;CAAK;CAC7C,IAAIG,EAAM,UAAUA,EAAM,WAAWA,EAAM,WAAW,CAACD,EAAK,SAASC,EAAM,GAAG,GAAG,OAAO;CACxF,IAAMC,IAAOC,EAAM;CACnB,IAAID,EAAK,WAAW,GAAG,OAAO;CAC9B,EAAM,eAAe;CAIrB,IAAME,UACJN,IAAWG,EAAM,QAAQ,cAAeA,EAAM,QAAQ,iBAAkBI,EAAMX,CAAS,GACnFY,IAAUJ,EAAK,QAAQ,SAAS,aAA4B;CAUlE,OADAA,EAPED,EAAM,QAAQ,SACV,IACAA,EAAM,QAAQ,QACZC,EAAK,SAAS,IACdI,MAAY,KACV,KACCA,KAAWF,EAAQ,IAAI,IAAI,MAAMF,EAAK,UAAUA,EAAK,OACtD,EAAE,MAAM,GACX;AACT"}
|
package/dist/utils/attrs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attrs.js","names":[],"sources":["../../src/utils/attrs.ts"],"sourcesContent":["/**\n * Splits attributes between two elements: the listed keys go to `picked`, every other one to\n * `rest`. Each listed key is read even when absent, so a computed calling this re-runs when one\n * appears later: enumerating an empty attrs object tracks no reads.\n */\nexport function partitionAttrs(\n attrs: Record<string, unknown>,\n keys: readonly string[],\n): { picked: Record<string, unknown>; rest: Record<string, unknown> } {\n for (const key of keys) void attrs[key]\n const picked: Record<string, unknown> = {}\n const rest: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(attrs)) {\n ;(keys.includes(key) ? picked : rest)[key] = value\n }\n return { picked, rest }\n}\n"],"mappings":";AAKA,
|
|
1
|
+
{"version":3,"file":"attrs.js","names":["partitionAttrs","key","keys","picked","rest","value","attrs"],"sources":["../../src/utils/attrs.ts"],"sourcesContent":["/**\n * Splits attributes between two elements: the listed keys go to `picked`, every other one to\n * `rest`. Each listed key is read even when absent, so a computed calling this re-runs when one\n * appears later: enumerating an empty attrs object tracks no reads.\n */\nexport function partitionAttrs(\n attrs: Record<string, unknown>,\n keys: readonly string[],\n): { picked: Record<string, unknown>; rest: Record<string, unknown> } {\n for (const key of keys) void attrs[key]\n const picked: Record<string, unknown> = {}\n const rest: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(attrs)) {\n ;(keys.includes(key) ? picked : rest)[key] = value\n }\n return { picked, rest }\n}\n"],"mappings":";AAKA,SAAgBA,EACd,GACA,GACoE;CACpE,KAAK,IAAMC,KAAOC,GAAM,EAAWD;CACnC,IAAME,IAAkC,CAAC,GACnCC,IAAgC,CAAC;CACvC,KAAK,IAAM,CAACH,GAAKI,MAAU,OAAO,QAAQC,CAAK,GAC5C,CAACJ,EAAK,SAASD,CAAG,IAAIE,IAASC,EAAA,CAAMH,KAAOI;CAE/C,OAAO;EAAE;EAAQ;CAAK;AACxB"}
|
package/dist/utils/chip.d.ts
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { ChipSize } from '../components/VChip/VChip.js';
|
|
2
2
|
/**
|
|
3
3
|
* The scale of a VChip rendered INSIDE a text field: VCombobox's values, VFileInput's files.
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* room, does not pass its own through.
|
|
4
|
+
* An `sm` field has no smaller chip size left to fit, so its chips take the xs height less one
|
|
5
|
+
* step, whatever the density: the floor the compact scale reaches.
|
|
7
6
|
*/
|
|
8
7
|
export type ChipFieldSize = 'sm' | 'md' | 'lg';
|
|
9
8
|
export interface ChipScale {
|
|
10
9
|
size: ChipSize;
|
|
11
|
-
|
|
12
|
-
/** The chips' height, ready to be set on the field so it can match its own text to it. */
|
|
10
|
+
/** The chips' height, set on the field so its text and its chips match. */
|
|
13
11
|
height: string;
|
|
14
12
|
}
|
|
15
|
-
export declare function chipScaleFor(size: ChipFieldSize
|
|
13
|
+
export declare function chipScaleFor(size: ChipFieldSize): ChipScale;
|
package/dist/utils/chip.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
//#region src/utils/chip.ts
|
|
2
|
-
function e(e
|
|
3
|
-
|
|
2
|
+
function e(e) {
|
|
3
|
+
if (e === "sm") return {
|
|
4
|
+
size: "xs",
|
|
5
|
+
height: "calc(var(--vectis-control-height-xs) - var(--vectis-space-1))"
|
|
6
|
+
};
|
|
7
|
+
let t = e === "lg" ? "sm" : "xs";
|
|
4
8
|
return {
|
|
5
|
-
size:
|
|
6
|
-
|
|
7
|
-
height: r ? `calc(${i} - var(--vectis-space-1))` : i
|
|
9
|
+
size: t,
|
|
10
|
+
height: `calc(var(--vectis-control-height-${t}) - var(--vectis-density-delta))`
|
|
8
11
|
};
|
|
9
12
|
}
|
|
10
13
|
//#endregion
|
package/dist/utils/chip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip.js","names":[],"sources":["../../src/utils/chip.ts"],"sourcesContent":["import type { ChipSize } from '../components/VChip/VChip.vue'\n\n// @core\n/**\n * The scale of a VChip rendered INSIDE a text field: VCombobox's values, VFileInput's files.\n *
|
|
1
|
+
{"version":3,"file":"chip.js","names":["chipScaleFor","size","chipSize"],"sources":["../../src/utils/chip.ts"],"sourcesContent":["import type { ChipSize } from '../components/VChip/VChip.vue'\n\n// @core\n/**\n * The scale of a VChip rendered INSIDE a text field: VCombobox's values, VFileInput's files.\n * An `sm` field has no smaller chip size left to fit, so its chips take the xs height less one\n * step, whatever the density: the floor the compact scale reaches.\n */\nexport type ChipFieldSize = 'sm' | 'md' | 'lg'\n\nexport interface ChipScale {\n size: ChipSize\n /** The chips' height, set on the field so its text and its chips match. */\n height: string\n}\n\nexport function chipScaleFor(size: ChipFieldSize): ChipScale {\n if (size === 'sm')\n return { size: 'xs', height: 'calc(var(--vectis-control-height-xs) - var(--vectis-space-1))' }\n const chipSize = size === 'lg' ? 'sm' : 'xs'\n return {\n size: chipSize,\n height: `calc(var(--vectis-control-height-${chipSize}) - var(--vectis-density-delta))`,\n }\n}\n"],"mappings":";AAgBA,SAAgBA,EAAa,GAAgC;CAC3D,IAAIC,MAAS,MACX,OAAO;EAAE,MAAM;EAAM,QAAQ;CAAgE;CAC/F,IAAMC,IAAWD,MAAS,OAAO,OAAO;CACxC,OAAO;EACL,MAAMC;EACN,QAAQ,oCAAoCA,EAAS;CACvD;AACF"}
|
package/dist/utils/clock.js
CHANGED
|
@@ -70,7 +70,9 @@ function y(e, t = !1) {
|
|
|
70
70
|
}
|
|
71
71
|
function b(e, n) {
|
|
72
72
|
let r = i(e);
|
|
73
|
-
|
|
73
|
+
if (!r) return "";
|
|
74
|
+
let o = n === "12h" ? a(r.hour).hour : r.hour;
|
|
75
|
+
return v(t(o) + t(r.minute));
|
|
74
76
|
}
|
|
75
77
|
function x(t, r, i = "AM") {
|
|
76
78
|
let a = e(t);
|
package/dist/utils/clock.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clock.js","names":[],"sources":["../../src/utils/clock.ts"],"sourcesContent":["// @ssr @core\n/**\n * Clock- and input-specific time arithmetic stays outside the smaller time module imported by\n * calendar views.\n */\nimport { digitsOf, pad2 } from './text'\nimport { formatTime, parseTime, formatTimeDisplay } from './time'\nimport type { HourFormat, Meridiem } from './time'\n\n/**\n * Turns an hour of the 24-hour clock into the hour a 12-hour clock face shows, together\n * with which half of the day it belongs to: midnight is 12 AM, noon is 12 PM, and eleven\n * at night is 11 PM.\n */\nexport function to12h(hour24: number): { hour: number; meridiem: Meridiem } {\n const meridiem: Meridiem = hour24 >= 12 ? 'PM' : 'AM'\n const hour = hour24 % 12 === 0 ? 12 : hour24 % 12\n return { hour, meridiem }\n}\n\n/**\n * The way back: an hour read off a 12-hour clock face, plus the half of the day it is in,\n * gives the hour on the 24-hour clock: 12 in the morning is 0, 12 in the afternoon is 12.\n */\nexport function to24h(hour12: number, meridiem: Meridiem): number {\n const base = hour12 % 12 // Twelve is the zero of the cycle, not its top.\n return meridiem === 'PM' ? base + 12 : base\n}\n\n/**\n * The same hour moved into the other half of the day, or left where it is: 9 with PM gives\n * 21, and 21 with PM stays 21. It is what an AM/PM control does to the hour it qualifies.\n */\nexport function hourWithMeridiem(hour24: number, meridiem: Meridiem): number {\n return to24h(to12h(hour24).hour, meridiem)\n}\n\n/**\n * A canonical time moved into a half of the day, its minutes untouched, or `null` when it is\n * not a time at all: `'09:30'` with PM gives `'21:30'`.\n */\nexport function withMeridiem(time: string | null | undefined, meridiem: Meridiem): string | null {\n const parts = parseTime(time)\n return parts ? formatTime(hourWithMeridiem(parts.hour, meridiem), parts.minute) : null\n}\n\n/** Snaps a minute to the nearest allowed step and wraps it back inside the hour. */\nexport function snapMinute(minute: number, step: number): number {\n const size = Math.round(step)\n const snapped = size <= 1 ? Math.round(minute) : Math.round(minute / size) * size\n return ((snapped % 60) + 60) % 60\n}\n\n/**\n * Which mark a pointer offset from the dial's centre is aiming at. Marks are numbered clockwise\n * from twelve o'clock and the nearest wins.\n */\nexport function angleToIndex(dx: number, dy: number, segments: number): number {\n const angle = Math.atan2(dx, -dy)\n const turn = (angle / (2 * Math.PI) + 1) % 1\n return Math.round(turn * segments) % segments\n}\n\n/** How far from the centre a finger landed, as a fraction: nothing at the centre, one at the edge. */\nexport function distanceFraction(dx: number, dy: number, radius: number): number {\n return radius > 0 ? Math.hypot(dx, dy) / radius : 0\n}\n\n/**\n * The number is DERIVED from the dial tokens. A 256px dial with 48px numerals puts the rings'\n * centres at 104px and 56px from the middle, whose midpoint is 0.625 of the radius.\n */\nexport const DIAL_INNER_THRESHOLD = 0.625\n\n/**\n * Derived from the same tokens as the threshold above: the inner ring's numerals start 32px\n * from the middle (56px less half a 48px numeral), 0.25 of the radius, so the dead zone stops\n * short of them. Grow it past 0.25 and the inner small hours lose their inner half to it.\n */\nexport const DIAL_DEAD_ZONE = 0.2\n\n/**\n * Which hour a mark stands for on the two-ring dial: outer carries 12 then 1-11, inner\n * carries 00 then 13-23. Index 0 of each is the mark at twelve o'clock.\n */\nexport function dialIndexToHour24(index: number, ring: 'outer' | 'inner'): number {\n if (ring === 'outer') return index === 0 ? 12 : index\n return index === 0 ? 0 : index + 12\n}\n\n/** The way back, which tells the hand where to point. */\nexport function hour24ToDial(hour: number): { index: number; ring: 'outer' | 'inner' } {\n if (hour === 0) return { index: 0, ring: 'inner' }\n if (hour === 12) return { index: 0, ring: 'outer' }\n if (hour > 12) return { index: hour - 12, ring: 'inner' }\n return { index: hour, ring: 'outer' }\n}\n\nexport interface TimeOption {\n /** The canonical time, which the component's value will be set to. */\n value: string\n /** The same time written out for the reader: \"07:30\", or \"7:30 AM\". */\n label: string\n}\n\n/**\n * Every time of the day at a given interval, midnight to the last one before the next. A\n * nonsensical step (zero, a fraction, more than an hour) falls back to hourly, so the list\n * stays FINITE even when the component's warning about it was ignored.\n */\nexport function timeList(step: number, locale: string, format: HourFormat): TimeOption[] {\n const safe = Number.isInteger(step) && step >= 1 && step <= 60 ? step : 60\n const out: TimeOption[] = []\n for (let m = 0; m < 24 * 60; m += safe) {\n const value = formatTime(Math.floor(m / 60), m % 60)\n out.push({ value, label: formatTimeDisplay(value, locale, format) })\n }\n return out\n}\n\n/*\n * Unlike a date's separator this one is UNIVERSAL: every language writes a time with a colon,\n * and only the 12/24-hour cycle varies. It therefore stays out of the dictionary, where the\n * empty field's `hh:mm` placeholder does belong; that one is made of the initials of words.\n */\nconst TIME_SEPARATOR = ':'\n\n/**\n * Lays a run of typed digits out as a time. The colon appears AS SOON AS the hour is\n * complete: typing \"09\" already gives \"09:\", exactly as a date's separators do.\n */\nexport function formatTimeMask(digits: string): string {\n const all = digitsOf(digits).slice(0, 4)\n return all.length >= 2 ? `${all.slice(0, 2)}${TIME_SEPARATOR}${all.slice(2)}` : all\n}\n\n/**\n * Where the caret belongs to sit just after `n` digits. On a DELETION it stays in front of it,\n * or the next Backspace steps over the colon instead of erasing a digit and the key appears to\n * do nothing.\n */\nexport function timeCaret(n: number, skipSeparator = false): number {\n if (n < 2) return n\n if (n === 2) return skipSeparator ? 3 : 2\n return Math.min(n + 1, 5)\n}\n\n/**\n * A canonical time written into the field in whichever form is SHOWN. On a 12-hour clock the\n * hour comes back into 1-12: the meridiem belongs to the toggle beside the field, never to\n * the text.\n */\nexport function timeToMask(time: string | null | undefined, format: HourFormat): string {\n const parts = parseTime(time)\n if (!parts) return ''\n const hour = format === '12h' ? to12h(parts.hour).hour : parts.hour\n return formatTimeMask(pad2(hour) + pad2(parts.minute))\n}\n\n/**\n * What was typed read back into a canonical time, or `null` when it is incomplete, too long\n * or not a real time. On a 12-hour clock this is the ONE place the typed digits and the\n * meridiem toggle meet.\n */\nexport function parseTimeMask(\n text: string,\n format: HourFormat,\n meridiem: Meridiem = 'AM',\n): string | null {\n const digits = digitsOf(text)\n if (digits.length !== 4) return null\n const hour = Number(digits.slice(0, 2))\n const minute = Number(digits.slice(2))\n if (minute > 59) return null\n if (format === '12h')\n return hour >= 1 && hour <= 12 ? formatTime(to24h(hour, meridiem), minute) : null\n return hour <= 23 ? formatTime(hour, minute) : null\n}\n"],"mappings":";;;AAcA,SAAgB,EAAM,GAAsD;CAC1E,IAAM,IAAqB,KAAU,KAAK,OAAO;CAEjD,OAAO;EAAE,MADI,IAAS,MAAO,IAAI,KAAK,IAAS;EAChC;CAAS;AAC1B;AAMA,SAAgB,EAAM,GAAgB,GAA4B;CAChE,IAAM,IAAO,IAAS;CACtB,OAAO,MAAa,OAAO,IAAO,KAAK;AACzC;AAMA,SAAgB,EAAiB,GAAgB,GAA4B;CAC3E,OAAO,EAAM,EAAM,CAAM,CAAC,CAAC,MAAM,CAAQ;AAC3C;AAMA,SAAgB,EAAa,GAAiC,GAAmC;CAC/F,IAAM,IAAQ,EAAU,CAAI;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AAM;EAAE,CAAC;CACrE;CACA,OAAO;AACT;AAOA,IAAM,IAAiB;AAMvB,SAAgB,EAAe,GAAwB;CACrD,IAAM,IAAM,EAAS,CAAM,CAAC,CAAC,MAAM,GAAG,CAAC;CACvC,OAAO,EAAI,UAAU,IAAI,GAAG,EAAI,MAAM,GAAG,CAAC,IAAI,IAAiB,EAAI,MAAM,CAAC,MAAM;AAClF;AAOA,SAAgB,EAAU,GAAW,IAAgB,IAAe;CAGlE,OAFI,IAAI,IAAU,IACd,MAAM,IAAU,IAAgB,IAAI,IACjC,KAAK,IAAI,IAAI,GAAG,CAAC;AAC1B;AAOA,SAAgB,EAAW,GAAiC,GAA4B;CACtF,IAAM,IAAQ,EAAU,CAAI;CAG5B,OAFK,IAEE,EAAe,EADT,MAAW,QAAQ,EAAM,EAAM,IAAI,CAAC,CAAC,OAAO,EAAM,IAChC,IAAI,EAAK,EAAM,MAAM,CAAC,IAFlC;AAGrB;AAOA,SAAgB,EACd,GACA,GACA,IAAqB,MACN;CACf,IAAM,IAAS,EAAS,CAAI;CAC5B,IAAI,EAAO,WAAW,GAAG,OAAO;CAChC,IAAM,IAAO,OAAO,EAAO,MAAM,GAAG,CAAC,CAAC,GAChC,IAAS,OAAO,EAAO,MAAM,CAAC,CAAC;CAIrC,OAHI,IAAS,KAAW,OACpB,MAAW,QACN,KAAQ,KAAK,KAAQ,KAAK,EAAW,EAAM,GAAM,CAAQ,GAAG,CAAM,IAAI,OACxE,KAAQ,KAAK,EAAW,GAAM,CAAM,IAAI;AACjD"}
|
|
1
|
+
{"version":3,"file":"clock.js","names":["to12h","meridiem","hour24","to24h","base","hour12","hourWithMeridiem","withMeridiem","parts","parseTime","time","formatTime","snapMinute","size","step","minute","angleToIndex","turn","dx","dy","segments","distanceFraction","radius","DIAL_INNER_THRESHOLD","DIAL_DEAD_ZONE","dialIndexToHour24","ring","index","hour24ToDial","hour","timeList","safe","out","m","value","formatTimeDisplay","locale","format","TIME_SEPARATOR","formatTimeMask","all","digitsOf","digits","timeCaret","n","skipSeparator","timeToMask","pad2","parseTimeMask","text"],"sources":["../../src/utils/clock.ts"],"sourcesContent":["// @ssr @core\n/**\n * Clock- and input-specific time arithmetic stays outside the smaller time module imported by\n * calendar views.\n */\nimport { digitsOf, pad2 } from './text'\nimport { formatTime, parseTime, formatTimeDisplay } from './time'\nimport type { HourFormat, Meridiem } from './time'\n\n/**\n * Turns an hour of the 24-hour clock into the hour a 12-hour clock face shows, together\n * with which half of the day it belongs to: midnight is 12 AM, noon is 12 PM, and eleven\n * at night is 11 PM.\n */\nexport function to12h(hour24: number): { hour: number; meridiem: Meridiem } {\n const meridiem: Meridiem = hour24 >= 12 ? 'PM' : 'AM'\n const hour = hour24 % 12 === 0 ? 12 : hour24 % 12\n return { hour, meridiem }\n}\n\n/**\n * The way back: an hour read off a 12-hour clock face, plus the half of the day it is in,\n * gives the hour on the 24-hour clock: 12 in the morning is 0, 12 in the afternoon is 12.\n */\nexport function to24h(hour12: number, meridiem: Meridiem): number {\n const base = hour12 % 12 // Twelve is the zero of the cycle, not its top.\n return meridiem === 'PM' ? base + 12 : base\n}\n\n/**\n * The same hour moved into the other half of the day, or left where it is: 9 with PM gives\n * 21, and 21 with PM stays 21. It is what an AM/PM control does to the hour it qualifies.\n */\nexport function hourWithMeridiem(hour24: number, meridiem: Meridiem): number {\n return to24h(to12h(hour24).hour, meridiem)\n}\n\n/**\n * A canonical time moved into a half of the day, its minutes untouched, or `null` when it is\n * not a time at all: `'09:30'` with PM gives `'21:30'`.\n */\nexport function withMeridiem(time: string | null | undefined, meridiem: Meridiem): string | null {\n const parts = parseTime(time)\n return parts ? formatTime(hourWithMeridiem(parts.hour, meridiem), parts.minute) : null\n}\n\n/** Snaps a minute to the nearest allowed step and wraps it back inside the hour. */\nexport function snapMinute(minute: number, step: number): number {\n const size = Math.round(step)\n const snapped = size <= 1 ? Math.round(minute) : Math.round(minute / size) * size\n return ((snapped % 60) + 60) % 60\n}\n\n/**\n * Which mark a pointer offset from the dial's centre is aiming at. Marks are numbered clockwise\n * from twelve o'clock and the nearest wins.\n */\nexport function angleToIndex(dx: number, dy: number, segments: number): number {\n const angle = Math.atan2(dx, -dy)\n const turn = (angle / (2 * Math.PI) + 1) % 1\n return Math.round(turn * segments) % segments\n}\n\n/** How far from the centre a finger landed, as a fraction: nothing at the centre, one at the edge. */\nexport function distanceFraction(dx: number, dy: number, radius: number): number {\n return radius > 0 ? Math.hypot(dx, dy) / radius : 0\n}\n\n/**\n * The number is DERIVED from the dial tokens. A 256px dial with 48px numerals puts the rings'\n * centres at 104px and 56px from the middle, whose midpoint is 0.625 of the radius.\n */\nexport const DIAL_INNER_THRESHOLD = 0.625\n\n/**\n * Derived from the same tokens as the threshold above: the inner ring's numerals start 32px\n * from the middle (56px less half a 48px numeral), 0.25 of the radius, so the dead zone stops\n * short of them. Grow it past 0.25 and the inner small hours lose their inner half to it.\n */\nexport const DIAL_DEAD_ZONE = 0.2\n\n/**\n * Which hour a mark stands for on the two-ring dial: outer carries 12 then 1-11, inner\n * carries 00 then 13-23. Index 0 of each is the mark at twelve o'clock.\n */\nexport function dialIndexToHour24(index: number, ring: 'outer' | 'inner'): number {\n if (ring === 'outer') return index === 0 ? 12 : index\n return index === 0 ? 0 : index + 12\n}\n\n/** The way back, which tells the hand where to point. */\nexport function hour24ToDial(hour: number): { index: number; ring: 'outer' | 'inner' } {\n if (hour === 0) return { index: 0, ring: 'inner' }\n if (hour === 12) return { index: 0, ring: 'outer' }\n if (hour > 12) return { index: hour - 12, ring: 'inner' }\n return { index: hour, ring: 'outer' }\n}\n\nexport interface TimeOption {\n /** The canonical time, which the component's value will be set to. */\n value: string\n /** The same time written out for the reader: \"07:30\", or \"7:30 AM\". */\n label: string\n}\n\n/**\n * Every time of the day at a given interval, midnight to the last one before the next. A\n * nonsensical step (zero, a fraction, more than an hour) falls back to hourly, so the list\n * stays FINITE even when the component's warning about it was ignored.\n */\nexport function timeList(step: number, locale: string, format: HourFormat): TimeOption[] {\n const safe = Number.isInteger(step) && step >= 1 && step <= 60 ? step : 60\n const out: TimeOption[] = []\n for (let m = 0; m < 24 * 60; m += safe) {\n const value = formatTime(Math.floor(m / 60), m % 60)\n out.push({ value, label: formatTimeDisplay(value, locale, format) })\n }\n return out\n}\n\n/*\n * Unlike a date's separator this one is UNIVERSAL: every language writes a time with a colon,\n * and only the 12/24-hour cycle varies. It therefore stays out of the dictionary, where the\n * empty field's `hh:mm` placeholder does belong; that one is made of the initials of words.\n */\nconst TIME_SEPARATOR = ':'\n\n/**\n * Lays a run of typed digits out as a time. The colon appears AS SOON AS the hour is\n * complete: typing \"09\" already gives \"09:\", exactly as a date's separators do.\n */\nexport function formatTimeMask(digits: string): string {\n const all = digitsOf(digits).slice(0, 4)\n return all.length >= 2 ? `${all.slice(0, 2)}${TIME_SEPARATOR}${all.slice(2)}` : all\n}\n\n/**\n * Where the caret belongs to sit just after `n` digits. On a DELETION it stays in front of it,\n * or the next Backspace steps over the colon instead of erasing a digit and the key appears to\n * do nothing.\n */\nexport function timeCaret(n: number, skipSeparator = false): number {\n if (n < 2) return n\n if (n === 2) return skipSeparator ? 3 : 2\n return Math.min(n + 1, 5)\n}\n\n/**\n * A canonical time written into the field in whichever form is SHOWN. On a 12-hour clock the\n * hour comes back into 1-12: the meridiem belongs to the toggle beside the field, never to\n * the text.\n */\nexport function timeToMask(time: string | null | undefined, format: HourFormat): string {\n const parts = parseTime(time)\n if (!parts) return ''\n const hour = format === '12h' ? to12h(parts.hour).hour : parts.hour\n return formatTimeMask(pad2(hour) + pad2(parts.minute))\n}\n\n/**\n * What was typed read back into a canonical time, or `null` when it is incomplete, too long\n * or not a real time. On a 12-hour clock this is the ONE place the typed digits and the\n * meridiem toggle meet.\n */\nexport function parseTimeMask(\n text: string,\n format: HourFormat,\n meridiem: Meridiem = 'AM',\n): string | null {\n const digits = digitsOf(text)\n if (digits.length !== 4) return null\n const hour = Number(digits.slice(0, 2))\n const minute = Number(digits.slice(2))\n if (minute > 59) return null\n if (format === '12h')\n return hour >= 1 && hour <= 12 ? formatTime(to24h(hour, meridiem), minute) : null\n return hour <= 23 ? formatTime(hour, minute) : null\n}\n"],"mappings":";;;AAcA,SAAgBA,EAAM,GAAsD;CAC1E,IAAMC,IAAqBC,KAAU,KAAK,OAAO;CAEjD,OAAO;EAAE,MADIA,IAAS,MAAO,IAAI,KAAKA,IAAS;EAChC;CAAS;AAC1B;AAMA,SAAgBC,EAAM,GAAgB,GAA4B;CAChE,IAAMC,IAAOC,IAAS;CACtB,OAAOJ,MAAa,OAAOG,IAAO,KAAKA;AACzC;AAMA,SAAgBE,EAAiB,GAAgB,GAA4B;CAC3E,OAAOH,EAAMH,EAAME,CAAM,CAAC,CAAC,MAAMD,CAAQ;AAC3C;AAMA,SAAgBM,EAAa,GAAiC,GAAmC;CAC/F,IAAMC,IAAQC,EAAUC,CAAI;CAC5B,OAAOF,IAAQG,EAAWL,EAAiBE,EAAM,MAAMP,CAAQ,GAAGO,EAAM,MAAM,IAAI;AACpF;AAGA,SAAgBI,EAAW,GAAgB,GAAsB;CAC/D,IAAMC,IAAO,KAAK,MAAMC,CAAI;CAE5B,SADgBD,KAAQ,IAAI,KAAK,MAAME,CAAM,IAAI,KAAK,MAAMA,IAASF,CAAI,IAAIA,KAC1D,KAAM,MAAM;AACjC;AAMA,SAAgBG,EAAa,GAAY,GAAY,GAA0B;CAE7E,IAAMC,KADQ,KAAK,MAAMC,GAAI,CAACC,CAChB,KAAS,IAAI,KAAK,MAAM,KAAK;CAC3C,OAAO,KAAK,MAAMF,IAAOG,CAAQ,IAAIA;AACvC;AAGA,SAAgBC,EAAiB,GAAY,GAAY,GAAwB;CAC/E,OAAOC,IAAS,IAAI,KAAK,MAAMJ,GAAIC,CAAE,IAAIG,IAAS;AACpD;AAMA,IAAaC,IAAuB,MAOvBC,IAAiB;AAM9B,SAAgBC,EAAkB,GAAe,GAAiC;CAEhF,OADIC,MAAS,UAAgBC,MAAU,IAAI,KAAKA,IACzCA,MAAU,IA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AIkB,EAAKvC,EAAM,MAAM,CAAC;AACvD;AAOA,SAAgBwC,EACd,GACA,GACA,IAAqB,MACN;CACf,IAAMN,IAASD,EAASQ,CAAI;CAC5B,IAAIP,EAAO,WAAW,GAAG,OAAO;CAChC,IAAMb,IAAO,OAAOa,EAAO,MAAM,GAAG,CAAC,CAAC,GAChC3B,IAAS,OAAO2B,EAAO,MAAM,CAAC,CAAC;CAIrC,OAHI3B,IAAS,KAAW,OACpBsB,MAAW,QACNR,KAAQ,KAAKA,KAAQ,KAAKlB,EAAWR,EAAM0B,GAAM5B,CAAQ,GAAGc,CAAM,IAAI,OACxEc,KAAQ,KAAKlB,EAAWkB,GAAMd,CAAM,IAAI;AACjD"}
|
package/dist/utils/css.js
CHANGED
|
@@ -5,7 +5,7 @@ function e(e) {
|
|
|
5
5
|
return Number.isFinite(t) && t >= 0 ? `${t}px` : void 0;
|
|
6
6
|
}
|
|
7
7
|
function t(e) {
|
|
8
|
-
if (
|
|
8
|
+
if (e !== void 0 && e !== "") return typeof e == "string" ? e : Number.isFinite(e) && e >= 0 ? `${e}px` : void 0;
|
|
9
9
|
}
|
|
10
10
|
function n(e) {
|
|
11
11
|
return e === void 0 ? void 0 : { "--custom-color": e };
|
package/dist/utils/css.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.js","names":[],"sources":["../../src/utils/css.ts"],"sourcesContent":["// @core\n/**\n * Accept complete numeric strings; parseFloat would silently reinterpret 12rem as 12px. Reject\n * blanks before Number converts them to zero.\n */\nexport function px(v: number | string | undefined): string | undefined {\n if (v === undefined) return undefined\n const n = typeof v === 'number' ? v : v.trim() === '' ? Number.NaN : Number(v)\n return Number.isFinite(n) && n >= 0 ? `${n}px` : undefined\n}\n\n// @core\n/**\n * A dimension in any unit: a bare number is read as pixels, a string passes through untouched:\n * `50%`, `20vw`, `max-content`. Unlike `px` above, the string is deliberately not examined: CSS\n * judges it, and one it cannot parse falls back to whatever the component declares for itself.\n */\nexport function cssSize(v: number | string | undefined): string | undefined {\n if (v === undefined || v === '') return undefined\n if (typeof v === 'string') return v\n return Number.isFinite(v) && v >= 0 ? `${v}px` : undefined\n}\n\n// @core\n/**\n * The inline style carrying a consumer's own colour to a component's sheet, which derives\n * every shade from `--custom-color`: VChip, VAvatar and VBadge.\n *\n * `undefined` when no colour was given, so a style array holding it binds nothing and the\n * tone the sheet already paints stays in force.\n */\nexport function customColorStyle(\n color: string | undefined,\n): { '--custom-color': string } | undefined {\n return color === undefined ? undefined : { '--custom-color': color }\n}\n"],"mappings":";AAKA,
|
|
1
|
+
{"version":3,"file":"css.js","names":["px","v","n","cssSize","customColorStyle","color"],"sources":["../../src/utils/css.ts"],"sourcesContent":["// @core\n/**\n * Accept complete numeric strings; parseFloat would silently reinterpret 12rem as 12px. Reject\n * blanks before Number converts them to zero.\n */\nexport function px(v: number | string | undefined): string | undefined {\n if (v === undefined) return undefined\n const n = typeof v === 'number' ? v : v.trim() === '' ? Number.NaN : Number(v)\n return Number.isFinite(n) && n >= 0 ? `${n}px` : undefined\n}\n\n// @core\n/**\n * A dimension in any unit: a bare number is read as pixels, a string passes through untouched:\n * `50%`, `20vw`, `max-content`. Unlike `px` above, the string is deliberately not examined: CSS\n * judges it, and one it cannot parse falls back to whatever the component declares for itself.\n */\nexport function cssSize(v: number | string | undefined): string | undefined {\n if (v === undefined || v === '') return undefined\n if (typeof v === 'string') return v\n return Number.isFinite(v) && v >= 0 ? `${v}px` : undefined\n}\n\n// @core\n/**\n * The inline style carrying a consumer's own colour to a component's sheet, which derives\n * every shade from `--custom-color`: VChip, VAvatar and VBadge.\n *\n * `undefined` when no colour was given, so a style array holding it binds nothing and the\n * tone the sheet already paints stays in force.\n */\nexport function customColorStyle(\n color: string | undefined,\n): { '--custom-color': string } | undefined {\n return color === undefined ? undefined : { '--custom-color': color }\n}\n"],"mappings":";AAKA,SAAgBA,EAAG,GAAoD;CACrE,IAAIC,MAAM,KAAA,GAAW;CACrB,IAAMC,IAAI,OAAOD,KAAM,WAAWA,IAAIA,EAAE,KAAK,MAAM,KAAK,MAAa,OAAOA,CAAC;CAC7E,OAAO,OAAO,SAASC,CAAC,KAAKA,KAAK,IAAI,GAAGA,EAAE,MAAM,KAAA;AACnD;AAQA,SAAgBC,EAAQ,GAAoD;CAC1E,IAAIF,MAAM,KAAA,KAAaA,MAAM,IAE7B,OADI,OAAOA,KAAM,WAAiBA,IAC3B,OAAO,SAASA,CAAC,KAAKA,KAAK,IAAI,GAAGA,EAAE,MAAM,KAAA;AACnD;AAUA,SAAgBG,EACd,GAC0C;CAC1C,OAAOC,MAAU,KAAA,IAAY,KAAA,IAAY,EAAE,kBAAkBA,EAAM;AACrE"}
|
package/dist/utils/date.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.js","names":[],"sources":["../../src/utils/date.ts"],"sourcesContent":["// @ssr @core\n/** Pure date arithmetic shared by date inputs, pickers and calendars. */\n\nimport { memo } from './memo'\nimport { pad2 } from './text'\n\n/**\n * Not `new Date(y, m, d)` itself, which reads a year from 0 to 99 as 1900 to 1999: `0050-01-01`\n * would come back as 1950, and a `min` in the first century would open the years view nineteen\n * centuries late. `setFullYear` takes the year as it is.\n */\nfunction localDate(year: number, month0: number, day: number): Date {\n const date = new Date(year, month0, day)\n if (year >= 0 && year < 100) date.setFullYear(year, month0, day)\n return date\n}\n\nconst ISO_RE = /^\\d{4}-\\d{2}-\\d{2}$/\n\n/** Tells whether a value is a real `YYYY-MM-DD` date. */\nexport function isValidISO(iso: unknown): iso is string {\n return typeof iso === 'string' && parseISO(iso) !== null\n}\n\n/**\n * Parse ISO dates at local midnight, returning null for invalid input. Round-trip the result to\n * reject impossible days that Date silently rolls into the next month.\n */\nexport function parseISO(iso: string | null | undefined): Date | null {\n if (typeof iso !== 'string' || !ISO_RE.test(iso)) return null\n const parts = iso.split('-')\n const date = localDate(Number(parts[0]), Number(parts[1]) - 1, Number(parts[2]))\n return Number.isNaN(date.getTime()) || formatISO(date) !== iso ? null : date\n}\n\n/**\n * Writes a `Date` as an ISO string, reading its LOCAL components. This manual\n * concatenation is what `toISOString()` cannot do, since that one formats in UTC.\n */\nexport function formatISO(date: Date): string {\n const year = String(date.getFullYear()).padStart(4, '0')\n return `${year}-${pad2(date.getMonth() + 1)}-${pad2(date.getDate())}`\n}\n\n/**\n * Builds an ISO string from separate values. The month is 0-indexed, as everywhere\n * in the language: 0 is January.\n */\nexport function isoOf(year: number, month0: number, day: number): string {\n return formatISO(localDate(year, month0, day))\n}\n\n/**\n * Moves a date by a number of days, forwards or backwards. Crossing into another\n * month or year is handled by `Date` itself.\n */\nexport function addDays(iso: string, n: number): string {\n const d = parseISO(iso)\n if (!d) return iso\n d.setDate(d.getDate() + n)\n return formatISO(d)\n}\n\n/** Moves a date by a number of months, keeping the day of the month where possible. */\nexport function addMonths(iso: string, n: number): string {\n const d = parseISO(iso)\n if (!d) return iso\n const day = d.getDate()\n d.setDate(1)\n d.setMonth(d.getMonth() + n)\n d.setDate(Math.min(day, daysInMonth(d.getFullYear(), d.getMonth())))\n return formatISO(d)\n}\n\n/**\n * How many days the given month holds, leap years included. Day 0 of the following month is the\n * last day of this one, which makes the leap year rule the language's problem rather than ours.\n */\nexport function daysInMonth(year: number, month0: number): number {\n return localDate(year, month0 + 1, 0).getDate()\n}\n\n/** Compares two dates chronologically, returning the usual -1, 0 or 1. */\nexport function compareISO(a: string, b: string): number {\n return a < b ? -1 : a > b ? 1 : 0\n}\n\n/**\n * Whether two dates are the same day, with a null on either side counting as no\n * date at all rather than as a match.\n */\nexport const isSameISO = (a: string | null, b: string | null) => !!a && a === b\n\n/**\n * Brings a date back inside the allowed interval, returning the bound it exceeded.\n * Both bounds are optional, and an absent one means unbounded on that side.\n */\nexport function clampISO(iso: string, min?: string, max?: string): string {\n if (min && compareISO(iso, min) < 0) return min\n if (max && compareISO(iso, max) > 0) return max\n return iso\n}\n\n/** Whether a date falls inside the allowed interval, each bound being optional. */\nexport function isWithin(iso: string, min?: string, max?: string): boolean {\n if (min && compareISO(iso, min) < 0) return false\n if (max && compareISO(iso, max) > 0) return false\n return true\n}\n\n/** Whether a date may be chosen: inside the bounds, and not one the matcher excludes. */\nexport function isDateAllowed(\n iso: string,\n min: string | undefined,\n max: string | undefined,\n excluded: (iso: string) => boolean,\n): boolean {\n return isWithin(iso, min, max) && !excluded(iso)\n}\n\n/** One square of a month grid. */\nexport interface MonthCell {\n /** The day it stands for, as an ISO `YYYY-MM-DD` string. */\n iso: string\n /** The day of the month, carried so a caller does not parse back what was just formatted. */\n day: number\n /**\n * Which side of the displayed month this day belongs to when it is not part of it,\n * and `null` when it is.\n */\n adjacent: 'prev' | 'next' | null\n}\n\n/**\n * Builds the grid of a month: 42 cells, six rows of seven, filled out at both ends with the\n * days of the neighbouring months. The count is fixed on purpose, so that the calendar keeps\n * the same height from one month to the next instead of jumping by a row.\n */\nexport function buildMonthGrid(year: number, month0: number, firstDayOfWeek: number): MonthCell[] {\n const first = localDate(year, month0, 1)\n // How many cells the 1st of the month sits after the start of its row, which is\n // exactly how many days of the previous month the grid has to open with.\n const offset = (first.getDay() - firstDayOfWeek + 7) % 7\n const cells: MonthCell[] = []\n for (let i = 0; i < 42; i++) {\n // Built from the 1st rather than stepped from a start date, so the month and year\n // rolling over at either end is `Date`'s arithmetic and not ours.\n const d = localDate(year, month0, 1 - offset + i)\n const adjacent =\n d.getMonth() === month0 && d.getFullYear() === year ? null : d < first ? 'prev' : 'next'\n cells.push({ iso: formatISO(d), day: d.getDate(), adjacent })\n }\n return cells\n}\n\nconst firstDayCache = new Map<string, number>()\n\n// @fallback @ssr\n/**\n * The day the week starts on in a given locale, from 0 for Sunday to 6 for Saturday : Sunday in\n * the United States, Monday in most of Europe, Saturday in much of the Middle East. That part\n * of `Intl` is not everywhere (some Node builds lack it), so the answer falls back to Monday\n * when it is missing.\n */\nexport function firstDayOfWeekFor(locale: string): number {\n return memo(firstDayCache, locale, () => resolveFirstDayOfWeek(locale))\n}\n\nfunction resolveFirstDayOfWeek(locale: string): number {\n try {\n // Implementations disagree on the shape: Chrome and Safari expose `weekInfo` as\n // a getter, others a `getWeekInfo()` method. Both are tried.\n const loc = new Intl.Locale(locale) as Intl.Locale & {\n weekInfo?: { firstDay: number }\n getWeekInfo?: () => { firstDay: number }\n }\n const info = loc.getWeekInfo?.() ?? loc.weekInfo\n if (info?.firstDay) return info.firstDay % 7\n } catch {\n /* An invalid locale throws a RangeError: fall through to the fallback */\n }\n return 1\n}\n\n// The reference instants the names are formatted from. Any Sunday will do for the\n// weekdays, and any year for the months; combined with `timeZone: 'UTC'` at every\n// call site, they pin the output whatever zone the machine is in.\nconst REF_SUNDAY = Date.UTC(2021, 7, 1)\nconst MS_DAY = 86_400_000\n\n/**\n * The names of the seven days, starting from `firstDayOfWeek` so the list can be\n * dropped straight into a calendar header.\n */\nexport function weekdayNames(\n locale: string,\n firstDayOfWeek: number,\n weekday: 'short' | 'long' = 'short',\n): string[] {\n const fmt = dateFormatter(locale, { weekday, timeZone: 'UTC' })\n return Array.from({ length: 7 }, (_, i) =>\n fmt.format(REF_SUNDAY + ((firstDayOfWeek + i) % 7) * MS_DAY),\n )\n}\n\n/**\n * One formatter kept per locale and set of options, for the lifetime of the module: building an\n * `Intl` formatter costs far more than using one.\n */\nconst formatters = new Map<string, Intl.DateTimeFormat>()\n\nexport function dateFormatter(\n locale: string,\n options: Intl.DateTimeFormatOptions,\n): Intl.DateTimeFormat {\n return memo(\n formatters,\n `${locale}|${JSON.stringify(options)}`,\n () => new Intl.DateTimeFormat(locale, options),\n )\n}\n\n/**\n * A date written out for the reader, in the conventions of their locale: this is\n * what VDateInput shows in its field. An unparsable date yields an empty string\n * rather than a broken one.\n */\nexport function formatDateDisplay(\n iso: string,\n locale: string,\n options: Intl.DateTimeFormatOptions,\n): string {\n const d = parseISO(iso)\n return d ? dateFormatter(locale, options).format(d) : ''\n}\n\n/**\n * ICU releases disagree on the spaces around a range's dash: Node 24 (ICU 78) writes thin spaces\n * where Chromium writes plain ones. Writing every thin or hair space as a plain one keeps a\n * prerendered range identical to the one the browser hydrates.\n */\nconst RANGE_SPACES = /[\\u2009\\u200A]/g\n\n/** A period written out for the reader. */\nexport function formatDisplayRange(\n start: string,\n end: string,\n locale: string,\n options: Intl.DateTimeFormatOptions,\n): string {\n const a = parseISO(start)\n const b = parseISO(end)\n if (!a || !b) return ''\n const fmt = dateFormatter(locale, options)\n const order = compareISO(start, end)\n if (order === 0) return fmt.format(a)\n const text = order < 0 ? fmt.formatRange(a, b) : fmt.formatRange(b, a)\n return text.replace(RANGE_SPACES, ' ')\n}\n"],"mappings":";;;AAWA,SAAS,EAAU,GAAc,GAAgB,GAAmB;CAClE,IAAM,IAAO,IAAI,KAAK,GAAM,GAAQ,CAAG;CAEvC,OADI,KAAQ,KAAK,IAAO,OAAK,EAAK,YAAY,GAAM,GAAQ,CAAG,GACxD;AACT;AAEA,IAAM,IAAS;AAGf,SAAgB,EAAW,GAA6B;CACtD,OAAO,OAAO,KAAQ,YAAY,EAAS,CAAG,MAAM;AACtD;AAMA,SAAgB,EAAS,GAA6C;CACpE,IAAI,OAAO,KAAQ,YAAY,CAAC,EAAO,KAAK,CAAG,GAAG,OAAO;CACzD,IAAM,IAAQ,EAAI,MAAM,GAAG,GACrB,IAAO,EAAU,OAAO,EAAM,EAAE,GAAG,OAAO,EAAM,EAAE,IAAI,GAAG,OAAO,EAAM,EAAE,CAAC;CAC/E,OAAO,OAAO,MAAM,EAAK,QAAQ,CAAC,KAAK,EAAU,CAAI,MAAM,IAAM,OAAO;AAC1E;AAMA,SAAgB,EAAU,GAAoB;CAE5C,OAAO,GADM,OAAO,EAAK,YAAY,CAAC,CAAC,CAAC,SAAS,GAAG,GAC1C,EAAK,GAAG,EAAK,EAAK,SAAS,IAAI,CAAC,EAAE,GAAG,EAAK,EAAK,QAAQ,CAAC;AACpE;AAMA,SAAgB,EAAM,GAAc,GAAgB,GAAqB;CACvE,OAAO,EAAU,EAAU,GAAM,GAAQ,C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AgB,EACd,GACA,GACA,GACA,GACQ;CACR,IAAM,IAAI,EAAS,CAAK,GAClB,IAAI,EAAS,CAAG;CACtB,IAAI,CAAC,KAAK,CAAC,GAAG,OAAO;CACrB,IAAM,IAAM,EAAc,GAAQ,CAAO,GACnC,IAAQ,EAAW,GAAO,CAAG;CAGnC,OAFI,MAAU,IAAU,EAAI,OAAO,CAAC,KACvB,IAAQ,IAAI,EAAI,YAAY,GAAG,CAAC,IAAI,EAAI,YAAY,GAAG,CAAC,EAAA,CACzD,QAAQ,GAAc,GAAG;AACvC"}
|
|
1
|
+
{"version":3,"file":"date.js","names":["localDate","date","year","month0","day","ISO_RE","isValidISO","iso","parseISO","parts","formatISO","pad2","isoOf","addDays","d","n","addMonths","daysInMonth","compareISO","a","b","isSameISO","clampISO","min","max","isWithin","isDateAllowed","excluded","buildMonthGrid","first","offset","firstDayOfWeek","cells","i","adjacent","firstDayCache","firstDayOfWeekFor","memo","locale","resolveFirstDayOfWeek","loc","info","REF_SUNDAY","MS_DAY","weekdayNames","fmt","dateFormatter","formatters","options","formatDateDisplay","RANGE_SPACES","formatDisplayRange","start","end","order"],"sources":["../../src/utils/date.ts"],"sourcesContent":["// @ssr @core\n/** Pure date arithmetic shared by date inputs, pickers and calendars. */\n\nimport { memo } from './memo'\nimport { pad2 } from './text'\n\n/**\n * Not `new Date(y, m, d)` itself, which reads a year from 0 to 99 as 1900 to 1999: `0050-01-01`\n * would come back as 1950, and a `min` in the first century would open the years view nineteen\n * centuries late. `setFullYear` takes the year as it is.\n */\nfunction localDate(year: number, month0: number, day: number): Date {\n const date = new Date(year, month0, day)\n if (year >= 0 && year < 100) date.setFullYear(year, month0, day)\n return date\n}\n\nconst ISO_RE = /^\\d{4}-\\d{2}-\\d{2}$/\n\n/** Tells whether a value is a real `YYYY-MM-DD` date. */\nexport function isValidISO(iso: unknown): iso is string {\n return typeof iso === 'string' && parseISO(iso) !== null\n}\n\n/**\n * Parse ISO dates at local midnight, returning null for invalid input. Round-trip the result to\n * reject impossible days that Date silently rolls into the next month.\n */\nexport function parseISO(iso: string | null | undefined): Date | null {\n if (typeof iso !== 'string' || !ISO_RE.test(iso)) return null\n const parts = iso.split('-')\n const date = localDate(Number(parts[0]), Number(parts[1]) - 1, Number(parts[2]))\n return Number.isNaN(date.getTime()) || formatISO(date) !== iso ? null : date\n}\n\n/**\n * Writes a `Date` as an ISO string, reading its LOCAL components. This manual\n * concatenation is what `toISOString()` cannot do, since that one formats in UTC.\n */\nexport function formatISO(date: Date): string {\n const year = String(date.getFullYear()).padStart(4, '0')\n return `${year}-${pad2(date.getMonth() + 1)}-${pad2(date.getDate())}`\n}\n\n/**\n * Builds an ISO string from separate values. The month is 0-indexed, as everywhere\n * in the language: 0 is January.\n */\nexport function isoOf(year: number, month0: number, day: number): string {\n return formatISO(localDate(year, month0, day))\n}\n\n/**\n * Moves a date by a number of days, forwards or backwards. Crossing into another\n * month or year is handled by `Date` itself.\n */\nexport function addDays(iso: string, n: number): string {\n const d = parseISO(iso)\n if (!d) return iso\n d.setDate(d.getDate() + n)\n return formatISO(d)\n}\n\n/** Moves a date by a number of months, keeping the day of the month where possible. */\nexport function addMonths(iso: string, n: number): string {\n const d = parseISO(iso)\n if (!d) return iso\n const day = d.getDate()\n d.setDate(1)\n d.setMonth(d.getMonth() + n)\n d.setDate(Math.min(day, daysInMonth(d.getFullYear(), d.getMonth())))\n return formatISO(d)\n}\n\n/**\n * How many days the given month holds, leap years included. Day 0 of the following month is the\n * last day of this one, which makes the leap year rule the language's problem rather than ours.\n */\nexport function daysInMonth(year: number, month0: number): number {\n return localDate(year, month0 + 1, 0).getDate()\n}\n\n/** Compares two dates chronologically, returning the usual -1, 0 or 1. */\nexport function compareISO(a: string, b: string): number {\n return a < b ? -1 : a > b ? 1 : 0\n}\n\n/**\n * Whether two dates are the same day, with a null on either side counting as no\n * date at all rather than as a match.\n */\nexport const isSameISO = (a: string | null, b: string | null) => !!a && a === b\n\n/**\n * Brings a date back inside the allowed interval, returning the bound it exceeded.\n * Both bounds are optional, and an absent one means unbounded on that side.\n */\nexport function clampISO(iso: string, min?: string, max?: string): string {\n if (min && compareISO(iso, min) < 0) return min\n if (max && compareISO(iso, max) > 0) return max\n return iso\n}\n\n/** Whether a date falls inside the allowed interval, each bound being optional. */\nexport function isWithin(iso: string, min?: string, max?: string): boolean {\n if (min && compareISO(iso, min) < 0) return false\n if (max && compareISO(iso, max) > 0) return false\n return true\n}\n\n/** Whether a date may be chosen: inside the bounds, and not one the matcher excludes. */\nexport function isDateAllowed(\n iso: string,\n min: string | undefined,\n max: string | undefined,\n excluded: (iso: string) => boolean,\n): boolean {\n return isWithin(iso, min, max) && !excluded(iso)\n}\n\n/** One square of a month grid. */\nexport interface MonthCell {\n /** The day it stands for, as an ISO `YYYY-MM-DD` string. */\n iso: string\n /** The day of the month, carried so a caller does not parse back what was just formatted. */\n day: number\n /**\n * Which side of the displayed month this day belongs to when it is not part of it,\n * and `null` when it is.\n */\n adjacent: 'prev' | 'next' | null\n}\n\n/**\n * Builds the grid of a month: 42 cells, six rows of seven, filled out at both ends with the\n * days of the neighbouring months. The count is fixed on purpose, so that the calendar keeps\n * the same height from one month to the next instead of jumping by a row.\n */\nexport function buildMonthGrid(year: number, month0: number, firstDayOfWeek: number): MonthCell[] {\n const first = localDate(year, month0, 1)\n // How many cells the 1st of the month sits after the start of its row, which is\n // exactly how many days of the previous month the grid has to open with.\n const offset = (first.getDay() - firstDayOfWeek + 7) % 7\n const cells: MonthCell[] = []\n for (let i = 0; i < 42; i++) {\n // Built from the 1st rather than stepped from a start date, so the month and year\n // rolling over at either end is `Date`'s arithmetic and not ours.\n const d = localDate(year, month0, 1 - offset + i)\n const adjacent =\n d.getMonth() === month0 && d.getFullYear() === year ? null : d < first ? 'prev' : 'next'\n cells.push({ iso: formatISO(d), day: d.getDate(), adjacent })\n }\n return cells\n}\n\nconst firstDayCache = new Map<string, number>()\n\n// @fallback @ssr\n/**\n * The day the week starts on in a given locale, from 0 for Sunday to 6 for Saturday : Sunday in\n * the United States, Monday in most of Europe, Saturday in much of the Middle East. That part\n * of `Intl` is not everywhere (some Node builds lack it), so the answer falls back to Monday\n * when it is missing.\n */\nexport function firstDayOfWeekFor(locale: string): number {\n return memo(firstDayCache, locale, () => resolveFirstDayOfWeek(locale))\n}\n\nfunction resolveFirstDayOfWeek(locale: string): number {\n try {\n // Implementations disagree on the shape: Chrome and Safari expose `weekInfo` as\n // a getter, others a `getWeekInfo()` method. Both are tried.\n const loc = new Intl.Locale(locale) as Intl.Locale & {\n weekInfo?: { firstDay: number }\n getWeekInfo?: () => { firstDay: number }\n }\n const info = loc.getWeekInfo?.() ?? loc.weekInfo\n if (info?.firstDay) return info.firstDay % 7\n } catch {\n /* An invalid locale throws a RangeError: fall through to the fallback */\n }\n return 1\n}\n\n// The reference instants the names are formatted from. Any Sunday will do for the\n// weekdays, and any year for the months; combined with `timeZone: 'UTC'` at every\n// call site, they pin the output whatever zone the machine is in.\nconst REF_SUNDAY = Date.UTC(2021, 7, 1)\nconst MS_DAY = 86_400_000\n\n/**\n * The names of the seven days, starting from `firstDayOfWeek` so the list can be\n * dropped straight into a calendar header.\n */\nexport function weekdayNames(\n locale: string,\n firstDayOfWeek: number,\n weekday: 'short' | 'long' = 'short',\n): string[] {\n const fmt = dateFormatter(locale, { weekday, timeZone: 'UTC' })\n return Array.from({ length: 7 }, (_, i) =>\n fmt.format(REF_SUNDAY + ((firstDayOfWeek + i) % 7) * MS_DAY),\n )\n}\n\n/**\n * One formatter kept per locale and set of options, for the lifetime of the module: building an\n * `Intl` formatter costs far more than using one.\n */\nconst formatters = new Map<string, Intl.DateTimeFormat>()\n\nexport function dateFormatter(\n locale: string,\n options: Intl.DateTimeFormatOptions,\n): Intl.DateTimeFormat {\n return memo(\n formatters,\n `${locale}|${JSON.stringify(options)}`,\n () => new Intl.DateTimeFormat(locale, options),\n )\n}\n\n/**\n * A date written out for the reader, in the conventions of their locale: this is\n * what VDateInput shows in its field. An unparsable date yields an empty string\n * rather than a broken one.\n */\nexport function formatDateDisplay(\n iso: string,\n locale: string,\n options: Intl.DateTimeFormatOptions,\n): string {\n const d = parseISO(iso)\n return d ? dateFormatter(locale, options).format(d) : ''\n}\n\n/**\n * ICU releases disagree on the spaces around a range's dash: Node 24 (ICU 78) writes thin spaces\n * where Chromium writes plain ones. Writing every thin or hair space as a plain one keeps a\n * prerendered range identical to the one the browser hydrates.\n */\nconst RANGE_SPACES = /[\\u2009\\u200A]/g\n\n/** A period written out for the reader. */\nexport function formatDisplayRange(\n start: string,\n end: string,\n locale: string,\n options: Intl.DateTimeFormatOptions,\n): string {\n const a = parseISO(start)\n const b = parseISO(end)\n if (!a || !b) return ''\n const fmt = dateFormatter(locale, options)\n const order = compareISO(start, end)\n if (order === 0) return fmt.format(a)\n const text = order < 0 ? fmt.formatRange(a, b) : fmt.formatRange(b, a)\n return text.replace(RANGE_SPACES, ' ')\n}\n"],"mappings":";;;AAWA,SAASA,EAAU,GAAc,GAAgB,GAAmB;CAClE,IAAMC,IAAO,IAAI,KAAKC,GAAMC,GAAQC,CAAG;CAEvC,OADIF,KAAQ,KAAKA,IAAO,OAAKD,EAAK,YAAYC,GAAMC,GAAQC,CAAG,GACxDH;AACT;AAEA,IAAMI,IAAS;AAGf,SAAgBC,EAAW,GAA6B;CACtD,OAAO,OAAOC,KAAQ,YAAYC,EAASD,CAAG,MAAM;AACtD;AAMA,SAAgBC,EAAS,GAA6C;CACpE,IAAI,OAAOD,KAAQ,YAAY,CAACF,EAAO,KAAKE,CAAG,GAAG,OAAO;CACzD,IAAME,IAAQF,EAAI,MAAM,GAAG,GACrBN,IAAOD,EAAU,OAAOS,EAAM,EAAE,GAAG,OAAOA,EAAM,EAAE,IAAI,GAAG,OAAOA,EAAM,EAAE,CAAC;CAC/E,OAAO,OAAO,MAAMR,EAAK,QAAQ,CAAC,KAAKS,EAAUT,CAAI,MAAMM,IAAM,OAAON;AAC1E;AAMA,SAAgBS,EAAU,GAAoB;CAE5C,OAAO,G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I,OAAOH,KAAeX,IAAiBE,KAAK,IAAKU,CAAM,CAC7D;AACF;AAMA,IAAMI,oBAAa,IAAI,IAAiC;AAExD,SAAgBD,EACd,GACA,GACqB;CACrB,OAAOT,EACLU,GACA,GAAGT,EAAO,GAAG,KAAK,UAAUU,CAAO,WAC7B,IAAI,KAAK,eAAeV,GAAQU,CAAO,CAC/C;AACF;AAOA,SAAgBC,EACd,GACA,GACA,GACQ;CACR,IAAMnC,IAAIN,EAASD,CAAG;CACtB,OAAOO,IAAIgC,EAAcR,GAAQU,CAAO,CAAC,CAAC,OAAOlC,CAAC,IAAI;AACxD;AAOA,IAAMoC,IAAe;AAGrB,SAAgBC,EACd,GACA,GACA,GACA,GACQ;CACR,IAAMhC,IAAIX,EAAS4C,CAAK,GAClBhC,IAAIZ,EAAS6C,CAAG;CACtB,IAAI,CAAClC,KAAK,CAACC,GAAG,OAAO;CACrB,IAAMyB,IAAMC,EAAcR,GAAQU,CAAO,GACnCM,IAAQpC,EAAWkC,GAAOC,CAAG;CAGnC,OAFIC,MAAU,IAAUT,EAAI,OAAO1B,CAAC,KACvBmC,IAAQ,IAAIT,EAAI,YAAY1B,GAAGC,CAAC,IAAIyB,EAAI,YAAYzB,GAAGD,CAAC,EAAA,CACzD,QAAQ+B,GAAc,GAAG;AACvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"direction.js","names":[],"sources":["../../src/utils/direction.ts"],"sourcesContent":["// @core\n/**\n * Read computed direction for physical keys and coordinates; dir may be inherited or supplied\n * through CSS.\n */\nexport function isRtl(el: Element | null | undefined): boolean {\n return el != null && getComputedStyle(el).direction === 'rtl'\n}\n"],"mappings":";AAKA,
|
|
1
|
+
{"version":3,"file":"direction.js","names":["isRtl","el"],"sources":["../../src/utils/direction.ts"],"sourcesContent":["// @core\n/**\n * Read computed direction for physical keys and coordinates; dir may be inherited or supplied\n * through CSS.\n */\nexport function isRtl(el: Element | null | undefined): boolean {\n return el != null && getComputedStyle(el).direction === 'rtl'\n}\n"],"mappings":";AAKA,SAAgBA,EAAM,GAAyC;CAC7D,OAAOC,KAAM,QAAQ,iBAAiBA,CAAE,CAAC,CAAC,cAAc;AAC1D"}
|
package/dist/utils/env.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.js","names":[],"sources":["../../src/utils/env.ts"],"sourcesContent":["/*\n * Declare process locally so the consumer's bundler can replace NODE_ENV without leaking Node\n * ambient types into library declarations.\n */\ndeclare const process: { env: { NODE_ENV?: string } }\n\n// @devwarn\n/**\n * Use process.env.NODE_ENV so the consumer chooses development warnings; import.meta.env would\n * be folded during library build and erase them.\n */\nexport const isDev = process.env.NODE_ENV !== 'production'\n"],"mappings":";AAWA,
|
|
1
|
+
{"version":3,"file":"env.js","names":["isDev"],"sources":["../../src/utils/env.ts"],"sourcesContent":["/*\n * Declare process locally so the consumer's bundler can replace NODE_ENV without leaking Node\n * ambient types into library declarations.\n */\ndeclare const process: { env: { NODE_ENV?: string } }\n\n// @devwarn\n/**\n * Use process.env.NODE_ENV so the consumer chooses development warnings; import.meta.env would\n * be folded during library build and erase them.\n */\nexport const isDev = process.env.NODE_ENV !== 'production'\n"],"mappings":";AAWA,IAAaA,IAAA,QAAA,IAAA,aAAiC"}
|
package/dist/utils/file.js
CHANGED
|
@@ -35,37 +35,19 @@ function u(e, t) {
|
|
|
35
35
|
}
|
|
36
36
|
function d(e, r, i) {
|
|
37
37
|
let a = [], o = [], s = r.reduce((e, t) => e + t.size, 0), c = t(i.accept);
|
|
38
|
-
for (let t of e) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
continue;
|
|
52
|
-
}
|
|
53
|
-
if (i.maxFiles !== void 0 && r.length + a.length >= i.maxFiles) {
|
|
54
|
-
o.push({
|
|
55
|
-
file: t,
|
|
56
|
-
reason: "count"
|
|
57
|
-
});
|
|
58
|
-
continue;
|
|
59
|
-
}
|
|
60
|
-
if (i.maxTotalSize !== void 0 && s + t.size > i.maxTotalSize) {
|
|
61
|
-
o.push({
|
|
62
|
-
file: t,
|
|
63
|
-
reason: "total-size"
|
|
64
|
-
});
|
|
65
|
-
continue;
|
|
66
|
-
}
|
|
67
|
-
a.push(t), s += t.size;
|
|
68
|
-
}
|
|
38
|
+
for (let t of e) n(t, c) ? i.maxSize !== void 0 && t.size > i.maxSize ? o.push({
|
|
39
|
+
file: t,
|
|
40
|
+
reason: "size"
|
|
41
|
+
}) : i.maxFiles !== void 0 && r.length + a.length >= i.maxFiles ? o.push({
|
|
42
|
+
file: t,
|
|
43
|
+
reason: "count"
|
|
44
|
+
}) : i.maxTotalSize !== void 0 && s + t.size > i.maxTotalSize ? o.push({
|
|
45
|
+
file: t,
|
|
46
|
+
reason: "total-size"
|
|
47
|
+
}) : (a.push(t), s += t.size) : o.push({
|
|
48
|
+
file: t,
|
|
49
|
+
reason: "type"
|
|
50
|
+
});
|
|
69
51
|
return {
|
|
70
52
|
accepted: a,
|
|
71
53
|
rejected: o
|
package/dist/utils/file.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.js","names":[],"sources":["../../src/utils/file.ts"],"sourcesContent":["// @core\n/**\n * Pure file screening and formatting; return accepted files and rejection reasons for\n * components to emit.\n */\nimport { memo } from './memo'\n\n/** All the matching needs of a file, so that a test does not have to counterfeit one. */\nexport interface FileCandidate {\n name: string\n type: string\n}\n\n/**\n * An `accept` list read into its tokens: split on commas, trimmed, lowercased, the empty ones\n * dropped. An empty result accepts everything.\n */\nexport function parseAccept(accept?: string): string[] {\n if (!accept) return []\n return accept\n .split(',')\n .map((token) => token.trim().toLowerCase())\n .filter(Boolean)\n}\n\n/**\n * `file.type` is the browser's GUESS and is often empty (an unknown extension, some Linux\n * setups). A list written only in MIME types then turns away a perfectly good file, which is\n * why the docs ask for extensions alongside: `image/*,.heic`, not `image/*` alone.\n */\nexport function matchesAccept(file: FileCandidate, accept?: string | readonly string[]): boolean {\n const tokens = typeof accept === 'string' || accept === undefined ? parseAccept(accept) : accept\n if (tokens.length === 0) return true\n\n const name = file.name.toLowerCase()\n const type = file.type.toLowerCase()\n\n return tokens.some((token) => {\n if (token === '*' || token === '*/*') return true\n if (token.startsWith('.')) return name.endsWith(token)\n if (token.endsWith('/*')) return type !== '' && type.startsWith(token.slice(0, -1))\n return type === token\n })\n}\n\n/** A stable key per FILE OBJECT, for the `v-for` of a file list. */\nconst fileIds = new WeakMap<File, number>()\nlet nextFileId = 0\n\nexport function fileKey(file: File): number {\n let id = fileIds.get(file)\n if (id === undefined) {\n id = nextFileId++\n fileIds.set(file, id)\n }\n return id\n}\n\n/** The units a size can be written in, smallest first; the rungs of the ladder. */\nconst UNITS = ['byte', 'kilobyte', 'megabyte', 'gigabyte', 'terabyte'] as const\n\n/**\n * Building a number formatter costs one to two orders of magnitude more than using one, and a\n * running total is rewritten every time a file is added; so one is built per language and rung,\n * and kept for as long as the page lives.\n */\nconst formatters = new Map<string, Intl.NumberFormat>()\n\n/** Bytes are counted whole; above that, one decimal is what reads as a size. */\nconst digitsFor = (step: number) => (step === 0 ? 0 : 1)\n\nfunction formatterFor(locale: string, step: number): Intl.NumberFormat {\n return memo(\n formatters,\n `${locale}|${step}`,\n () =>\n new Intl.NumberFormat(locale, {\n style: 'unit',\n unit: UNITS[step]!,\n // The byte rung is spelled out, plural included: CLDR's short English name for a\n // byte is the word \"byte\" itself, which printed \"999 byte\".\n unitDisplay: step === 0 ? 'long' : 'short',\n maximumFractionDigits: digitsFor(step),\n }),\n )\n}\n\n/** A file size as a reader expects it: 1 200 000 gives \"1.2 MB\" in English, \"1,2 Mo\" in French. */\nexport function formatBytes(bytes: number, locale: string): string {\n const n = Number.isFinite(bytes) && bytes > 0 ? bytes : 0\n\n let step = n === 0 ? 0 : Math.min(UNITS.length - 1, Math.max(0, Math.floor(Math.log10(n) / 3)))\n let value = n / 1000 ** step\n\n /*\n * The carry. 999 999 bytes belongs on the kB rung and ROUNDS to 1000 at one decimal, so\n * rung and rounding have to agree or the reader is shown \"1,000 kB\" for \"1 MB\". Round\n * first, then step up: the other order lets the same discrepancy through one rung higher.\n */\n const rounded = Math.round(value * 10 ** digitsFor(step)) / 10 ** digitsFor(step)\n if (rounded >= 1000 && step < UNITS.length - 1) {\n step += 1\n value = n / 1000 ** step\n }\n\n return formatterFor(locale, step).format(value)\n}\n\n/** Why a file was turned away: its kind, its size, how many there already are, or the total. */\nexport type FileRejectReason = 'type' | 'size' | 'count' | 'total-size'\n\n/** One file that was turned away, and the reason it was. */\nexport interface FileRejection {\n /** The file itself, so a message can name it. */\n file: File\n /** What it fell foul of. */\n reason: FileRejectReason\n}\n\nexport interface FileLimits {\n accept?: string\n /** How large ONE file may be, in bytes. */\n maxSize?: number\n /** Already settled by the caller: a field that takes a single file passes one. */\n maxFiles?: number\n maxTotalSize?: number\n}\n\n/**\n * Screens an arriving batch against what is already chosen, returning the accepted files and\n * one rejection per refusal. What is already chosen counts towards both the count and the\n * running total, so a second drop obeys the same limits as the first instead of starting over.\n */\nexport function screenFiles(\n incoming: readonly File[],\n current: readonly File[],\n limits: FileLimits,\n): { accepted: File[]; rejected: FileRejection[] } {\n const accepted: File[] = []\n const rejected: FileRejection[] = []\n let total = current.reduce((sum, file) => sum + file.size, 0)\n const accept = parseAccept(limits.accept)\n\n for (const file of incoming) {\n if (!matchesAccept(file, accept)) {\n rejected.push({ file, reason: 'type' })\n continue\n }\n if (limits.maxSize !== undefined && file.size > limits.maxSize) {\n rejected.push({ file, reason: 'size' })\n continue\n }\n if (limits.maxFiles !== undefined && current.length + accepted.length >= limits.maxFiles) {\n rejected.push({ file, reason: 'count' })\n continue\n }\n if (limits.maxTotalSize !== undefined && total + file.size > limits.maxTotalSize) {\n rejected.push({ file, reason: 'total-size' })\n continue\n }\n accepted.push(file)\n total += file.size\n }\n\n return { accepted, rejected }\n}\n"],"mappings":";;AAiBA,
|
|
1
|
+
{"version":3,"file":"file.js","names":["parseAccept","accept","token","matchesAccept","tokens","name","file","type","fileIds","nextFileId","fileKey","id","UNITS","formatters","digitsFor","step","formatterFor","memo","locale","formatBytes","bytes","value","screenFiles","accepted","rejected","total","current","sum","limits","incoming"],"sources":["../../src/utils/file.ts"],"sourcesContent":["// @core\n/**\n * Pure file screening and formatting; return accepted files and rejection reasons for\n * components to emit.\n */\nimport { memo } from './memo'\n\n/** All the matching needs of a file, so that a test does not have to counterfeit one. */\nexport interface FileCandidate {\n name: string\n type: string\n}\n\n/**\n * An `accept` list read into its tokens: split on commas, trimmed, lowercased, the empty ones\n * dropped. An empty result accepts everything.\n */\nexport function parseAccept(accept?: string): string[] {\n if (!accept) return []\n return accept\n .split(',')\n .map((token) => token.trim().toLowerCase())\n .filter(Boolean)\n}\n\n/**\n * `file.type` is the browser's GUESS and is often empty (an unknown extension, some Linux\n * setups). A list written only in MIME types then turns away a perfectly good file, which is\n * why the docs ask for extensions alongside: `image/*,.heic`, not `image/*` alone.\n */\nexport function matchesAccept(file: FileCandidate, accept?: string | readonly string[]): boolean {\n const tokens = typeof accept === 'string' || accept === undefined ? parseAccept(accept) : accept\n if (tokens.length === 0) return true\n\n const name = file.name.toLowerCase()\n const type = file.type.toLowerCase()\n\n return tokens.some((token) => {\n if (token === '*' || token === '*/*') return true\n if (token.startsWith('.')) return name.endsWith(token)\n if (token.endsWith('/*')) return type !== '' && type.startsWith(token.slice(0, -1))\n return type === token\n })\n}\n\n/** A stable key per FILE OBJECT, for the `v-for` of a file list. */\nconst fileIds = new WeakMap<File, number>()\nlet nextFileId = 0\n\nexport function fileKey(file: File): number {\n let id = fileIds.get(file)\n if (id === undefined) {\n id = nextFileId++\n fileIds.set(file, id)\n }\n return id\n}\n\n/** The units a size can be written in, smallest first; the rungs of the ladder. */\nconst UNITS = ['byte', 'kilobyte', 'megabyte', 'gigabyte', 'terabyte'] as const\n\n/**\n * Building a number formatter costs one to two orders of magnitude more than using one, and a\n * running total is rewritten every time a file is added; so one is built per language and rung,\n * and kept for as long as the page lives.\n */\nconst formatters = new Map<string, Intl.NumberFormat>()\n\n/** Bytes are counted whole; above that, one decimal is what reads as a size. */\nconst digitsFor = (step: number) => (step === 0 ? 0 : 1)\n\nfunction formatterFor(locale: string, step: number): Intl.NumberFormat {\n return memo(\n formatters,\n `${locale}|${step}`,\n () =>\n new Intl.NumberFormat(locale, {\n style: 'unit',\n unit: UNITS[step]!,\n // The byte rung is spelled out, plural included: CLDR's short English name for a\n // byte is the word \"byte\" itself, which printed \"999 byte\".\n unitDisplay: step === 0 ? 'long' : 'short',\n maximumFractionDigits: digitsFor(step),\n }),\n )\n}\n\n/** A file size as a reader expects it: 1 200 000 gives \"1.2 MB\" in English, \"1,2 Mo\" in French. */\nexport function formatBytes(bytes: number, locale: string): string {\n const n = Number.isFinite(bytes) && bytes > 0 ? bytes : 0\n\n let step = n === 0 ? 0 : Math.min(UNITS.length - 1, Math.max(0, Math.floor(Math.log10(n) / 3)))\n let value = n / 1000 ** step\n\n /*\n * The carry. 999 999 bytes belongs on the kB rung and ROUNDS to 1000 at one decimal, so\n * rung and rounding have to agree or the reader is shown \"1,000 kB\" for \"1 MB\". Round\n * first, then step up: the other order lets the same discrepancy through one rung higher.\n */\n const rounded = Math.round(value * 10 ** digitsFor(step)) / 10 ** digitsFor(step)\n if (rounded >= 1000 && step < UNITS.length - 1) {\n step += 1\n value = n / 1000 ** step\n }\n\n return formatterFor(locale, step).format(value)\n}\n\n/** Why a file was turned away: its kind, its size, how many there already are, or the total. */\nexport type FileRejectReason = 'type' | 'size' | 'count' | 'total-size'\n\n/** One file that was turned away, and the reason it was. */\nexport interface FileRejection {\n /** The file itself, so a message can name it. */\n file: File\n /** What it fell foul of. */\n reason: FileRejectReason\n}\n\nexport interface FileLimits {\n accept?: string\n /** How large ONE file may be, in bytes. */\n maxSize?: number\n /** Already settled by the caller: a field that takes a single file passes one. */\n maxFiles?: number\n maxTotalSize?: number\n}\n\n/**\n * Screens an arriving batch against what is already chosen, returning the accepted files and\n * one rejection per refusal. What is already chosen counts towards both the count and the\n * running total, so a second drop obeys the same limits as the first instead of starting over.\n */\nexport function screenFiles(\n incoming: readonly File[],\n current: readonly File[],\n limits: FileLimits,\n): { accepted: File[]; rejected: FileRejection[] } {\n const accepted: File[] = []\n const rejected: FileRejection[] = []\n let total = current.reduce((sum, file) => sum + file.size, 0)\n const accept = parseAccept(limits.accept)\n\n for (const file of incoming) {\n if (!matchesAccept(file, accept)) {\n rejected.push({ file, reason: 'type' })\n continue\n }\n if (limits.maxSize !== undefined && file.size > limits.maxSize) {\n rejected.push({ file, reason: 'size' })\n continue\n }\n if (limits.maxFiles !== undefined && current.length + accepted.length >= limits.maxFiles) {\n rejected.push({ file, reason: 'count' })\n continue\n }\n if (limits.maxTotalSize !== undefined && total + file.size > limits.maxTotalSize) {\n rejected.push({ file, reason: 'total-size' })\n continue\n }\n accepted.push(file)\n total += file.size\n }\n\n return { accepted, rejected }\n}\n"],"mappings":";;AAiBA,SAAgBA,EAAY,GAA2B;CAErD,OADKC,IACEA,EACJ,MAAM,GAAG,CAAC,CACV,KAAK,MAAUC,EAAM,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,CAC1C,OAAO,OAAO,IAJG,CAAC;AAKvB;AAOA,SAAgBC,EAAc,GAAqB,GAA8C;CAC/F,IAAMC,IAAS,OAAOH,KAAW,YAAYA,MAAW,KAAA,IAAYD,EAAYC,CAAM,IAAIA;CAC1F,IAAIG,EAAO,WAAW,GAAG,OAAO;CAEhC,IAAMC,IAAOC,EAAK,KAAK,YAAY,GAC7BC,IAAOD,EAAK,KAAK,YAAY;CAEnC,OAAOF,EAAO,MAAM,MACdF,MAAU,OAAOA,MAAU,QAAc,KACzCA,EAAM,WAAW,GAAG,IAAUG,EAAK,SAASH,CAAK,IACjDA,EAAM,SAAS,IAAI,IAAUK,MAAS,MAAMA,EAAK,WAAWL,EAAM,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,CAAC,GACtDL,IAASD,EAAY4B,EAAO,MAAM;CAExC,KAAK,IAAMtB,KAAQuB,GACjB,AAAK1B,EAAcG,GAAML,CAAM,IAI3B2B,EAAO,YAAY,KAAA,KAAatB,EAAK,OAAOsB,EAAO,UACrDJ,EAAS,KAAK;EAAE;EAAM,QAAQ;CAAO,CAAC,IAGpCI,EAAO,aAAa,KAAA,KAAaF,EAAQ,SAASH,EAAS,UAAUK,EAAO,WAC9EJ,EAAS,KAAK;EAAE;EAAM,QAAQ;CAAQ,CAAC,IAGrCI,EAAO,iBAAiB,KAAA,KAAaH,IAAQnB,EAAK,OAAOsB,EAAO,eAClEJ,EAAS,KAAK;EAAE;EAAM,QAAQ;CAAa,CAAC,KAG9CD,EAAS,KAAKjB,CAAI,GAClB,KAASA,EAAK,QAhBZkB,EAAS,KAAK;EAAE;EAAM,QAAQ;CAAO,CAAC;CAmB1C,OAAO;EAAE;EAAU;CAAS;AAC9B"}
|
package/dist/utils/focus.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focus.js","names":[],"sources":["../../src/utils/focus.ts"],"sourcesContent":["// @a11y\n/** Use the browser's focus-visible heuristic to distinguish keyboard focus. */\nexport function isKeyboardFocus(target: EventTarget | null): boolean {\n return target instanceof Element && target.matches(':focus-visible')\n}\n"],"mappings":";AAEA,
|
|
1
|
+
{"version":3,"file":"focus.js","names":["isKeyboardFocus","target"],"sources":["../../src/utils/focus.ts"],"sourcesContent":["// @a11y\n/** Use the browser's focus-visible heuristic to distinguish keyboard focus. */\nexport function isKeyboardFocus(target: EventTarget | null): boolean {\n return target instanceof Element && target.matches(':focus-visible')\n}\n"],"mappings":";AAEA,SAAgBA,EAAgB,GAAqC;CACnE,OAAOC,aAAkB,WAAWA,EAAO,QAAQ,gBAAgB;AACrE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hostWarns.js","names":[],"sources":["../../src/utils/hostWarns.ts"],"sourcesContent":["import type { InjectionKey } from 'vue'\n\n/**\n * Provided by a component that renders another with props it has ALREADY checked and reported\n * on: VDateInput for VDatePicker's bounds, VTimeInput for VTimePicker's step and restrictions,\n * both forwarded as they stand.\n */\nexport const hostWarnsKey: InjectionKey<true> = Symbol('vectisHostWarns')\n"],"mappings":";AAOA,
|
|
1
|
+
{"version":3,"file":"hostWarns.js","names":["hostWarnsKey"],"sources":["../../src/utils/hostWarns.ts"],"sourcesContent":["import type { InjectionKey } from 'vue'\n\n/**\n * Provided by a component that renders another with props it has ALREADY checked and reported\n * on: VDateInput for VDatePicker's bounds, VTimeInput for VTimePicker's step and restrictions,\n * both forwarded as they stand.\n */\nexport const hostWarnsKey: InjectionKey<true> = Symbol('vectisHostWarns')\n"],"mappings":";AAOA,IAAaA,IAAmC,OAAO,iBAAiB"}
|
package/dist/utils/ids.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids.js","names":[],"sources":["../../src/utils/ids.ts"],"sourcesContent":["// @a11y\n/**\n * Omit empty ID references and return undefined for an empty list so ARIA attributes are\n * removed rather than left blank.\n */\nexport function joinIds(...ids: (string | false | null | undefined)[]): string | undefined {\n return ids.filter(Boolean).join(' ') || undefined\n}\n"],"mappings":";AAKA,
|
|
1
|
+
{"version":3,"file":"ids.js","names":["joinIds","ids"],"sources":["../../src/utils/ids.ts"],"sourcesContent":["// @a11y\n/**\n * Omit empty ID references and return undefined for an empty list so ARIA attributes are\n * removed rather than left blank.\n */\nexport function joinIds(...ids: (string | false | null | undefined)[]): string | undefined {\n return ids.filter(Boolean).join(' ') || undefined\n}\n"],"mappings":";AAKA,SAAgBA,EAAQ,GAAGC,GAAgE;CACzF,OAAOA,EAAI,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,KAAK,KAAA;AAC1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matcher.js","names":[],"sources":["../../src/utils/matcher.ts"],"sourcesContent":["// @core\n/** Resolve matchers once in a computed value so repeated cell lookups reuse the compiled Set. */\nexport function resolveMatcher<T>(\n matcher: readonly T[] | ((value: T) => boolean) | undefined,\n): (value: T) => boolean {\n if (!matcher) return () => false\n if (typeof matcher === 'function') return matcher\n const set = new Set(matcher)\n return (value: T) => set.has(value)\n}\n"],"mappings":";AAEA,
|
|
1
|
+
{"version":3,"file":"matcher.js","names":["resolveMatcher","matcher","set","value"],"sources":["../../src/utils/matcher.ts"],"sourcesContent":["// @core\n/** Resolve matchers once in a computed value so repeated cell lookups reuse the compiled Set. */\nexport function resolveMatcher<T>(\n matcher: readonly T[] | ((value: T) => boolean) | undefined,\n): (value: T) => boolean {\n if (!matcher) return () => false\n if (typeof matcher === 'function') return matcher\n const set = new Set(matcher)\n return (value: T) => set.has(value)\n}\n"],"mappings":";AAEA,SAAgBA,EACd,GACuB;CACvB,IAAI,CAACC,GAAS,aAAa;CAC3B,IAAI,OAAOA,KAAY,YAAY,OAAOA;CAC1C,IAAMC,IAAM,IAAI,IAAID,CAAO;CAC3B,QAAQ,MAAaC,EAAI,IAAIC,CAAK;AACpC"}
|
package/dist/utils/memo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memo.js","names":[],"sources":["../../src/utils/memo.ts"],"sourcesContent":["// @core\n/** undefined marks a cache miss; builders must return a defined value. */\nexport function memo<K, V>(cache: Map<K, V>, key: K, build: () => V): V {\n let value = cache.get(key)\n if (value === undefined) {\n value = build()\n cache.set(key, value)\n }\n return value\n}\n"],"mappings":";AAEA,
|
|
1
|
+
{"version":3,"file":"memo.js","names":["memo","value","cache","key","build"],"sources":["../../src/utils/memo.ts"],"sourcesContent":["// @core\n/** undefined marks a cache miss; builders must return a defined value. */\nexport function memo<K, V>(cache: Map<K, V>, key: K, build: () => V): V {\n let value = cache.get(key)\n if (value === undefined) {\n value = build()\n cache.set(key, value)\n }\n return value\n}\n"],"mappings":";AAEA,SAAgBA,EAAW,GAAkB,GAAQ,GAAmB;CACtE,IAAIC,IAAQC,EAAM,IAAIC,CAAG;CAKzB,OAJIF,MAAU,KAAA,MACZ,IAAQG,EAAM,GACdF,EAAM,IAAIC,GAAKF,CAAK,IAEfA;AACT"}
|
package/dist/utils/number.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number.js","names":[],"sources":["../../src/utils/number.ts"],"sourcesContent":["// @core\n/** Clamp to the lower bound when the interval is empty, as with the last index of an empty list. */\nexport function clamp(n: number, min: number, max: number): number {\n return Math.max(min, Math.min(max, n))\n}\n"],"mappings":";AAEA,
|
|
1
|
+
{"version":3,"file":"number.js","names":["clamp","min","max","n"],"sources":["../../src/utils/number.ts"],"sourcesContent":["// @core\n/** Clamp to the lower bound when the interval is empty, as with the last index of an empty list. */\nexport function clamp(n: number, min: number, max: number): number {\n return Math.max(min, Math.min(max, n))\n}\n"],"mappings":";AAEA,SAAgBA,EAAM,GAAW,GAAa,GAAqB;CACjE,OAAO,KAAK,IAAIC,GAAK,KAAK,IAAIC,GAAKC,CAAC,CAAC;AACvC"}
|
package/dist/utils/text.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.js","names":[],"sources":["../../src/utils/text.ts"],"sourcesContent":["// @core\n/** Remove NFD combining marks for accent-insensitive matching. */\nexport function normalizeText(s: string): string {\n return s\n .normalize('NFD')\n .replace(/[\\u0300-\\u036f]/g, '')\n .toLowerCase()\n}\n\n// @core\n/**\n * A memory of `normalizeText` results, filed under the object a text belongs to: a table row, a\n * combobox option, and under a field name when one object holds several texts.\n */\nexport function createNormalizedCache<K extends object>() {\n const cache = new WeakMap<K, Map<string, { raw: string; normalized: string }>>()\n return (owner: K, raw: string, field = ''): string => {\n let texts = cache.get(owner)\n if (!texts) {\n texts = new Map()\n cache.set(owner, texts)\n }\n const hit = texts.get(field)\n if (hit && hit.raw === raw) return hit.normalized\n const normalized = normalizeText(raw)\n texts.set(field, { raw, normalized })\n return normalized\n }\n}\n\n// @core\n/** A whole number written on two digits, so that 7 becomes \"07\": as dates and times are. */\nexport function pad2(n: number): string {\n return String(n).padStart(2, '0')\n}\n\n// @core\n/** Just the digits of a string, everything else dropped. */\nexport const digitsOf = (text: string): string => text.replace(/\\D/g, '')\n"],"mappings":";AAEA,
|
|
1
|
+
{"version":3,"file":"text.js","names":["normalizeText","s","createNormalizedCache","cache","texts","owner","hit","field","raw","normalized","pad2","n","digitsOf","text"],"sources":["../../src/utils/text.ts"],"sourcesContent":["// @core\n/** Remove NFD combining marks for accent-insensitive matching. */\nexport function normalizeText(s: string): string {\n return s\n .normalize('NFD')\n .replace(/[\\u0300-\\u036f]/g, '')\n .toLowerCase()\n}\n\n// @core\n/**\n * A memory of `normalizeText` results, filed under the object a text belongs to: a table row, a\n * combobox option, and under a field name when one object holds several texts.\n */\nexport function createNormalizedCache<K extends object>() {\n const cache = new WeakMap<K, Map<string, { raw: string; normalized: string }>>()\n return (owner: K, raw: string, field = ''): string => {\n let texts = cache.get(owner)\n if (!texts) {\n texts = new Map()\n cache.set(owner, texts)\n }\n const hit = texts.get(field)\n if (hit && hit.raw === raw) return hit.normalized\n const normalized = normalizeText(raw)\n texts.set(field, { raw, normalized })\n return normalized\n }\n}\n\n// @core\n/** A whole number written on two digits, so that 7 becomes \"07\": as dates and times are. */\nexport function pad2(n: number): string {\n return String(n).padStart(2, '0')\n}\n\n// @core\n/** Just the digits of a string, everything else dropped. */\nexport const digitsOf = (text: string): string => text.replace(/\\D/g, '')\n"],"mappings":";AAEA,SAAgBA,EAAc,GAAmB;CAC/C,OAAOC,EACJ,UAAU,KAAK,CAAC,CAChB,QAAQ,oBAAoB,EAAE,CAAC,CAC/B,YAAY;AACjB;AAOA,SAAgBC,IAA0C;CACxD,IAAMC,oBAAQ,IAAI,QAA6D;CAC/E,QAAQ,GAAU,GAAa,IAAQ,OAAe;EACpD,IAAIC,IAAQD,EAAM,IAAIE,CAAK;EAC3B,AAAKD,MACH,oBAAQ,IAAI,IAAI,GAChBD,EAAM,IAAIE,GAAOD,CAAK;EAExB,IAAME,IAAMF,EAAM,IAAIG,CAAK;EAC3B,IAAID,KAAOA,EAAI,QAAQE,GAAK,OAAOF,EAAI;EACvC,IAAMG,IAAaT,EAAcQ,CAAG;EAEpC,OADAJ,EAAM,IAAIG,GAAO;GAAE;GAAK;EAAW,CAAC,GAC7BE;CACT;AACF;AAIA,SAAgBC,EAAK,GAAmB;CACtC,OAAO,OAAOC,CAAC,CAAC,CAAC,SAAS,GAAG,GAAG;AAClC;AAIA,IAAaC,KAAY,MAAyBC,EAAK,QAAQ,OAAO,EAAE"}
|
package/dist/utils/time.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time.js","names":[],"sources":["../../src/utils/time.ts"],"sourcesContent":["// @ssr @core\n/**\n * Keep this shared time module small: calendar views import it, while clock and field-specific\n * helpers belong in clock.ts.\n */\nimport { memo } from './memo'\nimport { pad2 } from './text'\n\nexport type HourFormat = '12h' | '24h'\nexport type Meridiem = 'AM' | 'PM'\n\nexport interface TimeParts {\n /** The hour on the 24-hour clock, from 0 to 23. */\n hour: number\n minute: number\n}\n\nconst TIME_RE = /^([01]\\d|2[0-3]):([0-5]\\d)$/\n\n/** Whether something is a time in the canonical form: two digits, a colon, two digits. */\nexport function isValidTime(value: unknown): value is string {\n return typeof value === 'string' && TIME_RE.test(value)\n}\n\n/** Reads a canonical time into its two numbers, or nothing at all if it is not one. */\nexport function parseTime(value: string | null | undefined): TimeParts | null {\n if (!isValidTime(value)) return null\n const [h, m] = value.split(':')\n return { hour: Number(h), minute: Number(m) }\n}\n\n/** Writes an hour and a minute back into the canonical form, both on two digits. */\nexport function formatTime(hour: number, minute: number): string {\n return `${pad2(hour)}:${pad2(minute)}`\n}\n\nconst hourCycleCache = new Map<string, HourFormat>()\n\n// @fallback\n/**\n * Whether a language counts the hours to twelve, with a morning and an afternoon, or straight\n * to twenty-four. A language tag it cannot make sense of falls back to the 24-hour clock rather\n * than failing.\n */\nexport function hourCycleFor(locale: string): HourFormat {\n return memo(hourCycleCache, locale, () => resolveHourCycle(locale))\n}\n\nfunction resolveHourCycle(locale: string): HourFormat {\n try {\n const { hourCycle } = new Intl.DateTimeFormat(locale, { hour: 'numeric' }).resolvedOptions()\n return hourCycle === 'h11' || hourCycle === 'h12' ? '12h' : '24h'\n } catch {\n return '24h'\n }\n}\n\n/** One formatter per locale and clock, module-lived; the `formatterFor` idiom of `file.ts`. */\nconst displayFormatters = new Map<string, Intl.DateTimeFormat>()\n\nfunction displayFormatterFor(locale: string, format: HourFormat): Intl.DateTimeFormat {\n return memo(\n displayFormatters,\n `${locale}|${format}`,\n () =>\n new Intl.DateTimeFormat(locale, {\n hour: 'numeric',\n minute: '2-digit',\n // A 12-hour clock takes the language's own: Japanese counts it from 0 (h11), English\n // from 12 (h12). Imposing h12 wrote 午前12:05 where 午前0:05 is written.\n ...(format === '12h' ? { hour12: true } : { hourCycle: 'h23' as const }),\n timeZone: 'UTC',\n }),\n )\n}\n\n/** A time written out for a reader: \"19:05\", or \"7:05 PM\". */\nexport function formatTimeDisplay(time: string, locale: string, format: HourFormat): string {\n const parts = parseTime(time)\n if (!parts) return ''\n return displayFormatterFor(locale, format).format(Date.UTC(2021, 0, 1, parts.hour, parts.minute))\n}\n\n/** A time as minutes since midnight, `null` if it is not one: its position in a list. */\nexport function minutesOf(time: string | null | undefined): number | null {\n const parts = parseTime(time)\n return parts ? parts.hour * 60 + parts.minute : null\n}\n"],"mappings":";;;AAiBA,
|
|
1
|
+
{"version":3,"file":"time.js","names":["TIME_RE","isValidTime","value","parseTime","h","m","formatTime","pad2","hour","minute","hourCycleCache","hourCycleFor","memo","locale","resolveHourCycle","hourCycle","displayFormatters","displayFormatterFor","format","formatTimeDisplay","parts","time","minutesOf"],"sources":["../../src/utils/time.ts"],"sourcesContent":["// @ssr @core\n/**\n * Keep this shared time module small: calendar views import it, while clock and field-specific\n * helpers belong in clock.ts.\n */\nimport { memo } from './memo'\nimport { pad2 } from './text'\n\nexport type HourFormat = '12h' | '24h'\nexport type Meridiem = 'AM' | 'PM'\n\nexport interface TimeParts {\n /** The hour on the 24-hour clock, from 0 to 23. */\n hour: number\n minute: number\n}\n\nconst TIME_RE = /^([01]\\d|2[0-3]):([0-5]\\d)$/\n\n/** Whether something is a time in the canonical form: two digits, a colon, two digits. */\nexport function isValidTime(value: unknown): value is string {\n return typeof value === 'string' && TIME_RE.test(value)\n}\n\n/** Reads a canonical time into its two numbers, or nothing at all if it is not one. */\nexport function parseTime(value: string | null | undefined): TimeParts | null {\n if (!isValidTime(value)) return null\n const [h, m] = value.split(':')\n return { hour: Number(h), minute: Number(m) }\n}\n\n/** Writes an hour and a minute back into the canonical form, both on two digits. */\nexport function formatTime(hour: number, minute: number): string {\n return `${pad2(hour)}:${pad2(minute)}`\n}\n\nconst hourCycleCache = new Map<string, HourFormat>()\n\n// @fallback\n/**\n * Whether a language counts the hours to twelve, with a morning and an afternoon, or straight\n * to twenty-four. A language tag it cannot make sense of falls back to the 24-hour clock rather\n * than failing.\n */\nexport function hourCycleFor(locale: string): HourFormat {\n return memo(hourCycleCache, locale, () => resolveHourCycle(locale))\n}\n\nfunction resolveHourCycle(locale: string): HourFormat {\n try {\n const { hourCycle } = new Intl.DateTimeFormat(locale, { hour: 'numeric' }).resolvedOptions()\n return hourCycle === 'h11' || hourCycle === 'h12' ? '12h' : '24h'\n } catch {\n return '24h'\n }\n}\n\n/** One formatter per locale and clock, module-lived; the `formatterFor` idiom of `file.ts`. */\nconst displayFormatters = new Map<string, Intl.DateTimeFormat>()\n\nfunction displayFormatterFor(locale: string, format: HourFormat): Intl.DateTimeFormat {\n return memo(\n displayFormatters,\n `${locale}|${format}`,\n () =>\n new Intl.DateTimeFormat(locale, {\n hour: 'numeric',\n minute: '2-digit',\n // A 12-hour clock takes the language's own: Japanese counts it from 0 (h11), English\n // from 12 (h12). Imposing h12 wrote 午前12:05 where 午前0:05 is written.\n ...(format === '12h' ? { hour12: true } : { hourCycle: 'h23' as const }),\n timeZone: 'UTC',\n }),\n )\n}\n\n/** A time written out for a reader: \"19:05\", or \"7:05 PM\". */\nexport function formatTimeDisplay(time: string, locale: string, format: HourFormat): string {\n const parts = parseTime(time)\n if (!parts) return ''\n return displayFormatterFor(locale, format).format(Date.UTC(2021, 0, 1, parts.hour, parts.minute))\n}\n\n/** A time as minutes since midnight, `null` if it is not one: its position in a list. */\nexport function minutesOf(time: string | null | undefined): number | null {\n const parts = parseTime(time)\n return parts ? parts.hour * 60 + parts.minute : null\n}\n"],"mappings":";;;AAiBA,IAAMA,IAAU;AAGhB,SAAgBC,EAAY,GAAiC;CAC3D,OAAO,OAAOC,KAAU,YAAYF,EAAQ,KAAKE,CAAK;AACxD;AAGA,SAAgBC,EAAU,GAAoD;CAC5E,IAAI,CAACF,EAAYC,CAAK,GAAG,OAAO;CAChC,IAAM,CAACE,GAAGC,KAAKH,EAAM,MAAM,GAAG;CAC9B,OAAO;EAAE,MAAM,OAAOE,CAAC;EAAG,QAAQ,OAAOC,CAAC;CAAE;AAC9C;AAGA,SAAgBC,EAAW,GAAc,GAAwB;CAC/D,OAAO,GAAGC,EAAKC,CAAI,EAAE,GAAGD,EAAKE,CAAM;AACrC;AAEA,IAAMC,oBAAiB,IAAI,IAAwB;AAQnD,SAAgBC,EAAa,GAA4B;CACvD,OAAOC,EAAKF,GAAgBG,SAAcC,EAAiBD,CAAM,CAAC;AACpE;AAEA,SAASC,EAAiB,GAA4B;CACpD,IAAI;EACF,IAAM,EAAE,iBAAc,IAAI,KAAK,eAAeD,GAAQ,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,gBAAgB;EAC3F,OAAOE,MAAc,SAASA,MAAc,QAAQ,QAAQ;CAC9D,QAAQ;EACN,OAAO;CACT;AACF;AAGA,IAAMC,oBAAoB,IAAI,IAAiC;AAE/D,SAASC,EAAoB,GAAgB,GAAyC;CACpF,OAAOL,EACLI,GACA,GAAGH,EAAO,GAAGK,WAEX,IAAI,KAAK,eAAeL,GAAQ;EAC9B,MAAM;EACN,QAAQ;EAGR,GAAIK,MAAW,QAAQ,EAAE,QAAQ,GAAK,IAAI,EAAE,WAAW,MAAe;EACtE,UAAU;CACZ,CAAC,CACL;AACF;AAGA,SAAgBC,EAAkB,GAAc,GAAgB,GAA4B;CAC1F,IAAMC,IAAQjB,EAAUkB,CAAI;CAE5B,OADKD,IACEH,EAAoBJ,GAAQK,CAAM,CAAC,CAAC,OAAO,KAAK,IAAI,MAAM,GAAG,GAAGE,EAAM,MAAMA,EAAM,MAAM,CAAC,IAD7E;AAErB;AAGA,SAAgBE,EAAU,GAAgD;CACxE,IAAMF,IAAQjB,EAAUkB,CAAI;CAC5B,OAAOD,IAAQA,EAAM,OAAO,KAAKA,EAAM,SAAS;AAClD"}
|
package/dist/utils/vnode.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vnode.js","names":[],"sources":["../../src/utils/vnode.ts"],"sourcesContent":["import { Comment, Fragment, Text } from 'vue'\nimport type { VNode } from 'vue'\n\n// @ssr @core\n/**\n * A slot's VNodes reduced to the elements that will actually render: `v-for` Fragments\n * unwrapped, a false `v-if`'s Comment and the source text's whitespace dropped.\n */\nexport function flattenSlot(nodes: VNode[] | undefined): VNode[] {\n const out: VNode[] = []\n for (const node of nodes ?? []) {\n if (node.type === Fragment) out.push(...flattenSlot(node.children as VNode[]))\n else if (node.type === Comment) continue\n else if (node.type === Text && !String(node.children).trim()) continue\n else out.push(node)\n }\n return out\n}\n"],"mappings":";;AAQA,
|
|
1
|
+
{"version":3,"file":"vnode.js","names":["flattenSlot","out","node","nodes","Fragment","Comment","Text"],"sources":["../../src/utils/vnode.ts"],"sourcesContent":["import { Comment, Fragment, Text } from 'vue'\nimport type { VNode } from 'vue'\n\n// @ssr @core\n/**\n * A slot's VNodes reduced to the elements that will actually render: `v-for` Fragments\n * unwrapped, a false `v-if`'s Comment and the source text's whitespace dropped.\n */\nexport function flattenSlot(nodes: VNode[] | undefined): VNode[] {\n const out: VNode[] = []\n for (const node of nodes ?? []) {\n if (node.type === Fragment) out.push(...flattenSlot(node.children as VNode[]))\n else if (node.type === Comment) continue\n else if (node.type === Text && !String(node.children).trim()) continue\n else out.push(node)\n }\n return out\n}\n"],"mappings":";;AAQA,SAAgBA,EAAY,GAAqC;CAC/D,IAAMC,IAAe,CAAC;CACtB,KAAK,IAAMC,KAAQC,KAAS,CAAC,GAC3B,IAAID,EAAK,SAASE,GAAU,EAAI,KAAK,GAAGJ,EAAYE,EAAK,QAAmB,CAAC;MACxE,IAAIA,EAAK,SAASG,GAAS;MAC3B,IAAIH,EAAK,SAASI,KAAQ,CAAC,OAAOJ,EAAK,QAAQ,CAAC,CAAC,KAAK,GAAG;MACzD,EAAI,KAAKA,CAAI;CAEpB,OAAOD;AACT"}
|