yuyeon 0.1.0-rc.19 → 0.1.0-rc.20
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/yuyeon.js +3507 -3246
- package/dist/yuyeon.umd.cjs +11 -11
- package/lib/components/card/YCard.mjs +16 -9
- package/lib/components/card/YCard.mjs.map +1 -1
- package/lib/components/hover/YHover.mjs +11 -4
- package/lib/components/hover/YHover.mjs.map +1 -1
- package/lib/components/hover/index.mjs +2 -0
- package/lib/components/hover/index.mjs.map +1 -0
- package/lib/components/index.mjs +1 -0
- package/lib/components/index.mjs.map +1 -1
- package/lib/components/layer/YLayer.mjs +17 -5
- package/lib/components/layer/YLayer.mjs.map +1 -1
- package/lib/components/layer/base.mjs +1 -1
- package/lib/components/layer/base.mjs.map +1 -1
- package/lib/components/layer/scroll-strategies.mjs +1 -1
- package/lib/components/layer/scroll-strategies.mjs.map +1 -1
- package/lib/components/menu/YMenu.mjs +2 -1
- package/lib/components/menu/YMenu.mjs.map +1 -1
- package/lib/composables/coordinate/levitation.mjs.map +1 -1
- package/lib/composables/index.mjs +1 -0
- package/lib/composables/index.mjs.map +1 -1
- package/lib/composables/theme/index.mjs +6 -3
- package/lib/composables/theme/index.mjs.map +1 -1
- package/package.json +1 -1
- package/types/abstract/items.d.ts +5 -4
- package/types/components/alert/YAlert.d.ts +3 -2
- package/types/components/app/YApp.d.ts +3 -2
- package/types/components/badge/YBadge.d.ts +9 -8
- package/types/components/button/YButton.d.ts +27 -29
- package/types/components/card/YCard.d.ts +6 -3
- package/types/components/card/YCardBody.d.ts +1 -1
- package/types/components/card/YCardFooter.d.ts +1 -1
- package/types/components/card/YCardHeader.d.ts +1 -1
- package/types/components/checkbox/YCheckbox.d.ts +4 -3
- package/types/components/checkbox/YInputCheckbox.d.ts +7 -6
- package/types/components/checkbox/index.d.ts +1 -1
- package/types/components/chip/YChip.d.ts +3 -2
- package/types/components/date-picker/YDateCalendar.d.ts +16 -15
- package/types/components/date-picker/YDatePicker.d.ts +41 -40
- package/types/components/date-picker/YDatePickerControl.d.ts +29 -28
- package/types/components/date-picker/YMonthPicker.d.ts +6 -5
- package/types/components/date-picker/YYearPicker.d.ts +3 -2
- package/types/components/dialog/YDialog.d.ts +414 -333
- package/types/components/divider/YDivider.d.ts +4 -3
- package/types/components/dropdown/YDropdown.d.ts +268 -220
- package/types/components/field-input/YFieldInput.d.ts +27 -26
- package/types/components/form/YForm.d.ts +9 -8
- package/{dist → types}/components/hover/YHover.d.ts +6 -2
- package/types/components/hover/index.d.ts +1 -0
- package/types/components/icon/YIcon.d.ts +5 -4
- package/types/components/icons/YIconCheckbox.d.ts +5 -4
- package/types/components/icons/YIconClear.d.ts +1 -1
- package/types/components/icons/YIconDropdown.d.ts +1 -1
- package/types/components/icons/YIconExpand.d.ts +1 -1
- package/types/components/icons/YIconPageControl.d.ts +6 -5
- package/types/components/icons/YIconSort.d.ts +5 -4
- package/types/components/icons/index.d.ts +26 -26
- package/types/components/index.d.ts +2 -0
- package/types/components/input/YInput.d.ts +21 -20
- package/types/components/layer/YLayer.d.ts +148 -100
- package/types/components/layer/active-stack.d.ts +3 -2
- package/types/components/layer/base.d.ts +8 -7
- package/{dist → types}/components/layer/scroll-strategies.d.ts +1 -1
- package/types/components/list/YList.d.ts +8 -7
- package/types/components/list/YListItem.d.ts +19 -13
- package/types/components/loading/YSpinnerRing.d.ts +2 -1
- package/types/components/menu/YMenu.d.ts +161 -120
- package/types/components/pagination/YPagination.d.ts +20 -19
- package/types/components/panel/YDividePanel.d.ts +4 -3
- package/types/components/plate/YPlate.d.ts +3 -2
- package/types/components/progress-bar/YProgressBar.d.ts +5 -4
- package/types/components/select/YSelect.d.ts +1232 -923
- package/types/components/snackbar/YSnackbar.d.ts +12 -11
- package/types/components/switch/YSwitch.d.ts +4 -3
- package/types/components/tab/YTab.d.ts +30 -29
- package/types/components/tab/YTabs.d.ts +12 -11
- package/types/components/tab/index.d.ts +1 -1
- package/types/components/tab/shared.d.ts +1 -0
- package/types/components/table/YDataTable.d.ts +63 -62
- package/types/components/table/YDataTableBody.d.ts +10 -9
- package/types/components/table/YDataTableCell.d.ts +6 -5
- package/types/components/table/YDataTableControl.d.ts +5 -4
- package/types/components/table/YDataTableHead.d.ts +10 -10
- package/types/components/table/YDataTableLayer.d.ts +4 -3
- package/types/components/table/YDataTableRow.d.ts +3 -2
- package/types/components/table/YDataTableServer.d.ts +63 -62
- package/types/components/table/YTable.d.ts +7 -6
- package/types/components/table/composibles/header.d.ts +10 -9
- package/types/components/table/composibles/items.d.ts +5 -4
- package/types/components/table/composibles/options.d.ts +2 -1
- package/types/components/table/composibles/pagination.d.ts +6 -5
- package/types/components/table/composibles/selection.d.ts +6 -5
- package/types/components/table/composibles/sorting.d.ts +4 -3
- package/types/components/table/types/header.d.ts +2 -1
- package/types/components/table/types/index.d.ts +5 -4
- package/types/components/table/types/item.d.ts +1 -0
- package/types/components/table/types/row.d.ts +1 -0
- package/types/components/text-ellipsis/YTextEllipsis.d.ts +3 -2
- package/types/components/text-highlighter/YTextHighlighter.d.ts +3 -2
- package/types/components/textarea/YTextarea.d.ts +39 -39
- package/types/components/toggle-button/YToggleButton.d.ts +1 -0
- package/types/components/tooltip/YTooltip.d.ts +201 -140
- package/types/components/transitions/expand-transition.d.ts +4 -3
- package/types/components/transitions/index.d.ts +10 -10
- package/types/components/tree-view/YTreeView.d.ts +20 -13
- package/types/components/tree-view/YTreeViewNode.d.ts +42 -20
- package/types/components/tree-view/types.d.ts +2 -1
- package/types/components/tree-view/util.d.ts +1 -0
- package/types/composables/choice-link.d.ts +2 -1
- package/types/composables/choice.d.ts +3 -2
- package/types/composables/communication.d.ts +2 -1
- package/types/composables/component.d.ts +1 -0
- package/types/composables/coordinate/arrangement.d.ts +2 -1
- package/types/composables/coordinate/index.d.ts +19 -18
- package/types/composables/coordinate/levitation.d.ts +2 -1
- package/types/composables/coordinate/types.d.ts +2 -1
- package/types/composables/coordinate/utils/point.d.ts +1 -0
- package/types/composables/date/factory.d.ts +1 -0
- package/types/composables/date/index.d.ts +1 -0
- package/types/composables/date/setting.d.ts +2 -1
- package/types/composables/date/types.d.ts +2 -1
- package/types/composables/dimension.d.ts +4 -3
- package/types/composables/focus.d.ts +4 -3
- package/types/composables/form.d.ts +7 -6
- package/types/composables/i18n/index.d.ts +1 -0
- package/types/composables/i18n/locale.d.ts +2 -1
- package/types/composables/i18n/rtl.d.ts +2 -1
- package/types/composables/icon.d.ts +9 -10
- package/types/composables/index.d.ts +1 -0
- package/types/composables/layer-group.d.ts +3 -2
- package/types/composables/list-items.d.ts +36 -35
- package/types/composables/progress.d.ts +1 -1
- package/types/composables/ref.d.ts +2 -1
- package/types/composables/resize-observer.d.ts +2 -2
- package/types/composables/scope.d.ts +2 -1
- package/types/composables/theme/factory.d.ts +1 -0
- package/types/composables/theme/index.d.ts +5 -4
- package/types/composables/theme/setting.d.ts +1 -0
- package/types/composables/timing.d.ts +2 -1
- package/types/composables/transition.d.ts +2 -1
- package/types/composables/validation.d.ts +19 -18
- package/types/composables/vue-router.d.ts +3 -3
- package/types/directives/complement-click/index.d.ts +1 -0
- package/types/directives/plate-wave/index.d.ts +2 -1
- package/types/directives/theme-class.d.ts +1 -0
- package/types/globals.d.ts +1 -1
- package/types/i18n/built-in.d.ts +2 -1
- package/types/i18n/types.d.ts +2 -1
- package/types/index.d.ts +2 -1
- package/types/mixins/di.d.ts +1 -1
- package/types/mixins/rebind-attrs.d.ts +2 -2
- package/types/shims.d.ts +4 -45
- package/types/types/index.d.ts +2 -1
- package/types/util/anchor.d.ts +1 -1
- package/types/util/color/conversion.d.ts +1 -0
- package/types/util/color/hct/cam16.d.ts +2 -17
- package/types/util/color/hct/hct.d.ts +2 -17
- package/types/util/color/index.d.ts +1 -1
- package/types/util/date/adapters/yuyeon-date-adapter.d.ts +1 -0
- package/types/util/date/built-in.d.ts +2 -1
- package/types/util/date/index.d.ts +1 -1
- package/types/util/reactivity.d.ts +3 -2
- package/types/util/vue-component.d.ts +4 -3
- package/dist/abstract/items.d.ts +0 -49
- package/dist/components/alert/YAlert.d.ts +0 -24
- package/dist/components/alert/index.d.ts +0 -1
- package/dist/components/app/YApp.d.ts +0 -8
- package/dist/components/app/index.d.ts +0 -1
- package/dist/components/badge/YBadge.d.ts +0 -142
- package/dist/components/badge/index.d.ts +0 -1
- package/dist/components/button/YButton.d.ts +0 -248
- package/dist/components/button/index.d.ts +0 -1
- package/dist/components/card/YCard.d.ts +0 -12
- package/dist/components/card/YCardBody.d.ts +0 -2
- package/dist/components/card/YCardFooter.d.ts +0 -2
- package/dist/components/card/YCardHeader.d.ts +0 -2
- package/dist/components/card/index.d.ts +0 -4
- package/dist/components/checkbox/YCheckbox.d.ts +0 -48
- package/dist/components/checkbox/YInputCheckbox.d.ts +0 -55
- package/dist/components/checkbox/index.d.ts +0 -3
- package/dist/components/chip/YChip.d.ts +0 -36
- package/dist/components/chip/index.d.ts +0 -1
- package/dist/components/date-picker/YDateCalendar.d.ts +0 -143
- package/dist/components/date-picker/YDatePicker.d.ts +0 -123
- package/dist/components/date-picker/YDatePickerControl.d.ts +0 -129
- package/dist/components/date-picker/YMonthPicker.d.ts +0 -29
- package/dist/components/date-picker/YYearPicker.d.ts +0 -44
- package/dist/components/date-picker/index.d.ts +0 -3
- package/dist/components/dialog/YDialog.d.ts +0 -2346
- package/dist/components/dialog/index.d.ts +0 -1
- package/dist/components/divider/YDivider.d.ts +0 -16
- package/dist/components/divider/index.d.ts +0 -1
- package/dist/components/dropdown/YDropdown.d.ts +0 -651
- package/dist/components/dropdown/index.d.ts +0 -1
- package/dist/components/field-input/YFieldInput.d.ts +0 -416
- package/dist/components/field-input/index.d.ts +0 -1
- package/dist/components/form/YForm.d.ts +0 -42
- package/dist/components/form/index.d.ts +0 -1
- package/dist/components/icon/YIcon.d.ts +0 -82
- package/dist/components/icon/index.d.ts +0 -1
- package/dist/components/icons/YIconCheckbox.d.ts +0 -14
- package/dist/components/icons/YIconClear.d.ts +0 -1
- package/dist/components/icons/YIconDropdown.d.ts +0 -1
- package/dist/components/icons/YIconExpand.d.ts +0 -1
- package/dist/components/icons/YIconPageControl.d.ts +0 -21
- package/dist/components/icons/YIconSort.d.ts +0 -19
- package/dist/components/icons/index.d.ts +0 -89
- package/dist/components/index.d.ts +0 -34
- package/dist/components/input/YInput.d.ts +0 -336
- package/dist/components/input/index.d.ts +0 -1
- package/dist/components/layer/YLayer.d.ts +0 -2089
- package/dist/components/layer/active-delay.d.ts +0 -4
- package/dist/components/layer/active-stack.d.ts +0 -16
- package/dist/components/layer/base.d.ts +0 -22
- package/dist/components/layer/index.d.ts +0 -1
- package/dist/components/list/YList.d.ts +0 -24
- package/dist/components/list/YListItem.d.ts +0 -60
- package/dist/components/list/index.d.ts +0 -2
- package/dist/components/loading/YSpinnerRing.d.ts +0 -3
- package/dist/components/loading/index.d.ts +0 -1
- package/dist/components/menu/YMenu.d.ts +0 -2176
- package/dist/components/menu/index.d.ts +0 -1
- package/dist/components/pagination/YPagination.d.ts +0 -177
- package/dist/components/pagination/index.d.ts +0 -1
- package/dist/components/panel/YDividePanel.d.ts +0 -5
- package/dist/components/panel/index.d.ts +0 -1
- package/dist/components/plate/YPlate.d.ts +0 -11
- package/dist/components/plate/index.d.ts +0 -1
- package/dist/components/progress-bar/YProgressBar.d.ts +0 -78
- package/dist/components/progress-bar/index.d.ts +0 -1
- package/dist/components/select/YSelect.d.ts +0 -7244
- package/dist/components/select/index.d.ts +0 -1
- package/dist/components/snackbar/YSnackbar.d.ts +0 -90
- package/dist/components/snackbar/index.d.ts +0 -1
- package/dist/components/switch/YSwitch.d.ts +0 -108
- package/dist/components/switch/index.d.ts +0 -1
- package/dist/components/tab/YTab.d.ts +0 -284
- package/dist/components/tab/YTabs.d.ts +0 -131
- package/dist/components/tab/index.d.ts +0 -3
- package/dist/components/tab/shared.d.ts +0 -4
- package/dist/components/tab/types.d.ts +0 -5
- package/dist/components/table/YDataTable.d.ts +0 -453
- package/dist/components/table/YDataTableBody.d.ts +0 -110
- package/dist/components/table/YDataTableCell.d.ts +0 -57
- package/dist/components/table/YDataTableControl.d.ts +0 -71
- package/dist/components/table/YDataTableHead.d.ts +0 -72
- package/dist/components/table/YDataTableLayer.d.ts +0 -12
- package/dist/components/table/YDataTableRow.d.ts +0 -49
- package/dist/components/table/YDataTableServer.d.ts +0 -490
- package/dist/components/table/YTable.d.ts +0 -84
- package/dist/components/table/composibles/header.d.ts +0 -69
- package/dist/components/table/composibles/items.d.ts +0 -55
- package/dist/components/table/composibles/options.d.ts +0 -11
- package/dist/components/table/composibles/pagination.d.ts +0 -81
- package/dist/components/table/composibles/selection.d.ts +0 -82
- package/dist/components/table/composibles/sorting.d.ts +0 -44
- package/dist/components/table/index.d.ts +0 -3
- package/dist/components/table/types/common.d.ts +0 -2
- package/dist/components/table/types/header.d.ts +0 -23
- package/dist/components/table/types/index.d.ts +0 -57
- package/dist/components/table/types/item.d.ts +0 -21
- package/dist/components/table/types/row.d.ts +0 -4
- package/dist/components/text-ellipsis/YTextEllipsis.d.ts +0 -15
- package/dist/components/text-ellipsis/index.d.ts +0 -1
- package/dist/components/text-highlighter/YTextHighlighter.d.ts +0 -41
- package/dist/components/textarea/YTextarea.d.ts +0 -589
- package/dist/components/textarea/index.d.ts +0 -1
- package/dist/components/toggle-button/YToggleButton.d.ts +0 -4
- package/dist/components/toggle-button/index.d.ts +0 -1
- package/dist/components/tooltip/YTooltip.d.ts +0 -3875
- package/dist/components/tooltip/index.d.ts +0 -1
- package/dist/components/transitions/expand-transition.d.ts +0 -17
- package/dist/components/transitions/index.d.ts +0 -32
- package/dist/components/tree-view/YTreeView.d.ts +0 -160
- package/dist/components/tree-view/YTreeViewNode.d.ts +0 -223
- package/dist/components/tree-view/index.d.ts +0 -2
- package/dist/components/tree-view/types.d.ts +0 -15
- package/dist/components/tree-view/util.d.ts +0 -6
- package/dist/composables/choice-link.d.ts +0 -3
- package/dist/composables/choice.d.ts +0 -113
- package/dist/composables/communication.d.ts +0 -8
- package/dist/composables/component.d.ts +0 -3
- package/dist/composables/coordinate/arrangement.d.ts +0 -7
- package/dist/composables/coordinate/index.d.ts +0 -1672
- package/dist/composables/coordinate/levitation.d.ts +0 -7
- package/dist/composables/coordinate/types.d.ts +0 -7
- package/dist/composables/coordinate/utils/point.d.ts +0 -22
- package/dist/composables/date/factory.d.ts +0 -3
- package/dist/composables/date/index.d.ts +0 -12
- package/dist/composables/date/setting.d.ts +0 -5
- package/dist/composables/date/types.d.ts +0 -13
- package/dist/composables/dimension.d.ts +0 -54
- package/dist/composables/focus.d.ts +0 -30
- package/dist/composables/form.d.ts +0 -127
- package/dist/composables/i18n/index.d.ts +0 -9
- package/dist/composables/i18n/locale.d.ts +0 -3
- package/dist/composables/i18n/rtl.d.ts +0 -21
- package/dist/composables/i18n/share.d.ts +0 -1
- package/dist/composables/icon.d.ts +0 -95
- package/dist/composables/index.d.ts +0 -9
- package/dist/composables/layer-group.d.ts +0 -8
- package/dist/composables/list-items.d.ts +0 -111
- package/dist/composables/progress.d.ts +0 -3
- package/dist/composables/ref.d.ts +0 -6
- package/dist/composables/resize-observer.d.ts +0 -14
- package/dist/composables/scope.d.ts +0 -3
- package/dist/composables/theme/factory.d.ts +0 -4
- package/dist/composables/theme/helper.d.ts +0 -3
- package/dist/composables/theme/index.d.ts +0 -56
- package/dist/composables/theme/setting.d.ts +0 -10
- package/dist/composables/theme/types.d.ts +0 -28
- package/dist/composables/timing.d.ts +0 -20
- package/dist/composables/transition.d.ts +0 -22
- package/dist/composables/validation.d.ts +0 -82
- package/dist/composables/vue-router.d.ts +0 -43
- package/dist/directives/complement-click/index.d.ts +0 -26
- package/dist/directives/plate-wave/index.d.ts +0 -14
- package/dist/directives/theme-class.d.ts +0 -4
- package/dist/etc/index.d.ts +0 -1
- package/dist/globals.d.ts +0 -20
- package/dist/i18n/built-in.d.ts +0 -3
- package/dist/i18n/config.d.ts +0 -81
- package/dist/i18n/types.d.ts +0 -20
- package/dist/index.d.ts +0 -13
- package/dist/locales/en.d.ts +0 -6
- package/dist/mixins/di.d.ts +0 -2
- package/dist/mixins/rebind-attrs.d.ts +0 -5
- package/dist/shims.d.ts +0 -52
- package/dist/types/index.d.ts +0 -7
- package/dist/util/anchor.d.ts +0 -23
- package/dist/util/array.d.ts +0 -2
- package/dist/util/collection.d.ts +0 -1
- package/dist/util/color/apca.d.ts +0 -29
- package/dist/util/color/const.d.ts +0 -5
- package/dist/util/color/conversion.d.ts +0 -131
- package/dist/util/color/hct/cam16.d.ts +0 -116
- package/dist/util/color/hct/hct.d.ts +0 -71
- package/dist/util/color/index.d.ts +0 -4
- package/dist/util/color/types.d.ts +0 -14
- package/dist/util/color/utils/math-utils.d.ts +0 -82
- package/dist/util/common.d.ts +0 -13
- package/dist/util/date/adapters/yuyeon-date-adapter.d.ts +0 -43
- package/dist/util/date/built-in.d.ts +0 -41
- package/dist/util/date/index.d.ts +0 -3
- package/dist/util/date/types.d.ts +0 -167
- package/dist/util/debounce.d.ts +0 -11
- package/dist/util/dom.d.ts +0 -3
- package/dist/util/frame-scheduler.d.ts +0 -7
- package/dist/util/index.d.ts +0 -16
- package/dist/util/reactivity.d.ts +0 -7
- package/dist/util/rect.d.ts +0 -36
- package/dist/util/scroll.d.ts +0 -3
- package/dist/util/string.d.ts +0 -4
- package/dist/util/ui.d.ts +0 -4
- package/dist/util/validation.d.ts +0 -3
- package/dist/util/vue-component.d.ts +0 -39
- /package/{dist → types}/components/bench/YBench.d.ts +0 -0
- /package/{dist → types}/components/bench/index.d.ts +0 -0
- /package/{dist → types}/components/default-provider/YDefaultProvider.d.ts +0 -0
- /package/{dist → types}/components/default-provider/index.d.ts +0 -0
- /package/{dist → types}/components/ip-field/YIpv4Field.d.ts +0 -0
- /package/{dist → types}/components/ip-field/index.d.ts +0 -0
- /package/{dist → types}/components/layer/content.d.ts +0 -0
- /package/{dist → types}/components/navigation/YNavigation.d.ts +0 -0
- /package/{dist → types}/components/navigation/index.d.ts +0 -0
- /package/{dist → types}/components/text-highlighter/index.d.ts +0 -0
- /package/{dist → types}/composables/layout.d.ts +0 -0
- /package/{dist → types}/locales/index.d.ts +0 -0
- /package/{dist → types}/locales/ko.d.ts +0 -0
- /package/{dist → types}/util/color/contrast/contrast.d.ts +0 -0
- /package/{dist → types}/util/color/hct/hct-solver.d.ts +0 -0
- /package/{dist → types}/util/color/hct/viewing-conditions.d.ts +0 -0
- /package/{dist → types}/util/color/palettes/core-palette.d.ts +0 -0
- /package/{dist → types}/util/color/palettes/tonal-palette.d.ts +0 -0
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import { Rgba } from './types';
|
|
2
|
-
|
|
3
|
-
export declare function rgbFromHex(color: string): number[] | undefined;
|
|
4
|
-
export declare function hexFromRgb(red: number, green: number, blue: number): string;
|
|
5
|
-
export declare function hexFromArgb(argb: number): string;
|
|
6
|
-
/**
|
|
7
|
-
* Converts a color from RGB components to ARGB format.
|
|
8
|
-
*/
|
|
9
|
-
export declare function argbFromRgb(red: number, green: number, blue: number): number;
|
|
10
|
-
/**
|
|
11
|
-
* Converts a color from linear RGB components to ARGB format.
|
|
12
|
-
*/
|
|
13
|
-
export declare function argbFromLinrgb(linrgb: number[]): number;
|
|
14
|
-
/**
|
|
15
|
-
* Returns the alpha component of a color in ARGB format.
|
|
16
|
-
*/
|
|
17
|
-
export declare function alphaFromArgb(argb: number): number;
|
|
18
|
-
/**
|
|
19
|
-
* Returns the red component of a color in ARGB format.
|
|
20
|
-
*/
|
|
21
|
-
export declare function redFromArgb(argb: number): number;
|
|
22
|
-
/**
|
|
23
|
-
* Returns the green component of a color in ARGB format.
|
|
24
|
-
*/
|
|
25
|
-
export declare function greenFromArgb(argb: number): number;
|
|
26
|
-
/**
|
|
27
|
-
* Returns the blue component of a color in ARGB format.
|
|
28
|
-
*/
|
|
29
|
-
export declare function blueFromArgb(argb: number): number;
|
|
30
|
-
/**
|
|
31
|
-
* Returns whether a color in ARGB format is opaque.
|
|
32
|
-
*/
|
|
33
|
-
export declare function isOpaque(argb: number): boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Converts a color from ARGB to XYZ.
|
|
36
|
-
*/
|
|
37
|
-
export declare function argbFromXyz(x: number, y: number, z: number): number;
|
|
38
|
-
/**
|
|
39
|
-
* Converts a color from XYZ to ARGB.
|
|
40
|
-
*/
|
|
41
|
-
export declare function xyzFromArgb(argb: number): number[];
|
|
42
|
-
/**
|
|
43
|
-
* Converts a color represented in Lab color space into an ARGB
|
|
44
|
-
* integer.
|
|
45
|
-
*/
|
|
46
|
-
export declare function argbFromLab(l: number, a: number, b: number): number;
|
|
47
|
-
/**
|
|
48
|
-
* Converts a color from ARGB representation to L*a*b*
|
|
49
|
-
* representation.
|
|
50
|
-
*
|
|
51
|
-
* @param argb the ARGB representation of a color
|
|
52
|
-
* @return a Lab object representing the color
|
|
53
|
-
*/
|
|
54
|
-
export declare function labFromArgb(argb: number): number[];
|
|
55
|
-
/**
|
|
56
|
-
* Converts an L* value to an ARGB representation.
|
|
57
|
-
*
|
|
58
|
-
* @param lstar L* in L*a*b*
|
|
59
|
-
* @return ARGB representation of grayscale color with lightness
|
|
60
|
-
* matching L*
|
|
61
|
-
*/
|
|
62
|
-
export declare function argbFromLstar(lstar: number): number;
|
|
63
|
-
/**
|
|
64
|
-
* Computes the L* value of a color in ARGB representation.
|
|
65
|
-
*
|
|
66
|
-
* @param argb ARGB representation of a color
|
|
67
|
-
* @return L*, from L*a*b*, coordinate of the color
|
|
68
|
-
*/
|
|
69
|
-
export declare function lstarFromArgb(argb: number): number;
|
|
70
|
-
/**
|
|
71
|
-
* Converts an L* value to a Y value.
|
|
72
|
-
*
|
|
73
|
-
* L* in L*a*b* and Y in XYZ measure the same quantity, luminance.
|
|
74
|
-
*
|
|
75
|
-
* L* measures perceptual luminance, a linear scale. Y in XYZ
|
|
76
|
-
* measures relative luminance, a logarithmic scale.
|
|
77
|
-
*
|
|
78
|
-
* @param lstar L* in L*a*b*
|
|
79
|
-
* @return Y in XYZ
|
|
80
|
-
*/
|
|
81
|
-
export declare function yFromLstar(lstar: number): number;
|
|
82
|
-
/**
|
|
83
|
-
* Converts a Y value to an L* value.
|
|
84
|
-
*
|
|
85
|
-
* L* in L*a*b* and Y in XYZ measure the same quantity, luminance.
|
|
86
|
-
*
|
|
87
|
-
* L* measures perceptual luminance, a linear scale. Y in XYZ
|
|
88
|
-
* measures relative luminance, a logarithmic scale.
|
|
89
|
-
*
|
|
90
|
-
* @param y Y in XYZ
|
|
91
|
-
* @return L* in L*a*b*
|
|
92
|
-
*/
|
|
93
|
-
export declare function lstarFromY(y: number): number;
|
|
94
|
-
/**
|
|
95
|
-
* Linearizes an RGB component.
|
|
96
|
-
*
|
|
97
|
-
* @param rgbComponent 0 <= rgb_component <= 255, represents R/G/B
|
|
98
|
-
* channel
|
|
99
|
-
* @return 0.0 <= output <= 100.0, color channel converted to
|
|
100
|
-
* linear RGB space
|
|
101
|
-
*/
|
|
102
|
-
export declare function linearized(rgbComponent: number): number;
|
|
103
|
-
/**
|
|
104
|
-
* Delinearizes an RGB component.
|
|
105
|
-
*
|
|
106
|
-
* @param rgbComponent 0.0 <= rgb_component <= 100.0, represents
|
|
107
|
-
* linear R/G/B channel
|
|
108
|
-
* @return 0 <= output <= 255, color channel converted to regular
|
|
109
|
-
* RGB space
|
|
110
|
-
*/
|
|
111
|
-
export declare function delinearized(rgbComponent: number): number;
|
|
112
|
-
/**
|
|
113
|
-
* Returns the standard white point; white on a sunny day.
|
|
114
|
-
*
|
|
115
|
-
* @return The white point
|
|
116
|
-
*/
|
|
117
|
-
export declare function whitePointD65(): number[];
|
|
118
|
-
/**
|
|
119
|
-
* Return RGBA from a given int32 color
|
|
120
|
-
*
|
|
121
|
-
* @param argb ARGB representation of a int32 color.
|
|
122
|
-
* @return RGBA representation of a int32 color.
|
|
123
|
-
*/
|
|
124
|
-
export declare function rgbaFromArgb(argb: number): Rgba;
|
|
125
|
-
/**
|
|
126
|
-
* Return int32 color from a given RGBA component
|
|
127
|
-
*
|
|
128
|
-
* @param rgba RGBA representation of a int32 color.
|
|
129
|
-
* @returns ARGB representation of a int32 color.
|
|
130
|
-
*/
|
|
131
|
-
export declare function argbFromRgba({ r, g, b, a }: Rgba): number;
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import { ViewingConditions } from './viewing-conditions';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* CAM16, a color appearance model. Colors are not just defined by their hex
|
|
5
|
-
* code, but rather, a hex code and viewing conditions.
|
|
6
|
-
*
|
|
7
|
-
* CAM16 instances also have coordinates in the CAM16-UCS space, called J*, a*,
|
|
8
|
-
* b*, or jstar, astar, bstar in code. CAM16-UCS is included in the CAM16
|
|
9
|
-
* specification, and should be used when measuring distances between colors.
|
|
10
|
-
*
|
|
11
|
-
* In traditional color spaces, a color can be identified solely by the
|
|
12
|
-
* observer's measurement of the color. Color appearance models such as CAM16
|
|
13
|
-
* also use information about the environment where the color was
|
|
14
|
-
* observed, known as the viewing conditions.
|
|
15
|
-
*
|
|
16
|
-
* For example, white under the traditional assumption of a midday sun white
|
|
17
|
-
* point is accurately measured as a slightly chromatic blue by CAM16. (roughly,
|
|
18
|
-
* hue 203, chroma 3, lightness 100)
|
|
19
|
-
*/
|
|
20
|
-
export declare class Cam16 {
|
|
21
|
-
readonly hue: number;
|
|
22
|
-
readonly chroma: number;
|
|
23
|
-
readonly j: number;
|
|
24
|
-
readonly q: number;
|
|
25
|
-
readonly m: number;
|
|
26
|
-
readonly s: number;
|
|
27
|
-
readonly jstar: number;
|
|
28
|
-
readonly astar: number;
|
|
29
|
-
readonly bstar: number;
|
|
30
|
-
/**
|
|
31
|
-
* All of the CAM16 dimensions can be calculated from 3 of the dimensions, in
|
|
32
|
-
* the following combinations:
|
|
33
|
-
* - {j or q} and {c, m, or s} and hue
|
|
34
|
-
* - jstar, astar, bstar
|
|
35
|
-
* Prefer using a static method that constructs from 3 of those dimensions.
|
|
36
|
-
* This constructor is intended for those methods to use to return all
|
|
37
|
-
* possible dimensions.
|
|
38
|
-
*
|
|
39
|
-
* @param hue
|
|
40
|
-
* @param chroma informally, colorfulness / color intensity. like saturation
|
|
41
|
-
* in HSL, except perceptually accurate.
|
|
42
|
-
* @param j lightness
|
|
43
|
-
* @param q brightness; ratio of lightness to white point's lightness
|
|
44
|
-
* @param m colorfulness
|
|
45
|
-
* @param s saturation; ratio of chroma to white point's chroma
|
|
46
|
-
* @param jstar CAM16-UCS J coordinate
|
|
47
|
-
* @param astar CAM16-UCS a coordinate
|
|
48
|
-
* @param bstar CAM16-UCS b coordinate
|
|
49
|
-
*/
|
|
50
|
-
constructor(hue: number, chroma: number, j: number, q: number, m: number, s: number, jstar: number, astar: number, bstar: number);
|
|
51
|
-
/**
|
|
52
|
-
* CAM16 instances also have coordinates in the CAM16-UCS space, called J*,
|
|
53
|
-
* a*, b*, or jstar, astar, bstar in code. CAM16-UCS is included in the CAM16
|
|
54
|
-
* specification, and is used to measure distances between colors.
|
|
55
|
-
*/
|
|
56
|
-
distance(other: Cam16): number;
|
|
57
|
-
/**
|
|
58
|
-
* @param argb ARGB representation of a color.
|
|
59
|
-
* @return CAM16 color, assuming the color was viewed in default viewing
|
|
60
|
-
* conditions.
|
|
61
|
-
*/
|
|
62
|
-
static fromInt(argb: number): Cam16;
|
|
63
|
-
/**
|
|
64
|
-
* @param argb ARGB representation of a color.
|
|
65
|
-
* @param viewingConditions Information about the environment where the color
|
|
66
|
-
* was observed.
|
|
67
|
-
* @return CAM16 color.
|
|
68
|
-
*/
|
|
69
|
-
static fromIntInViewingConditions(argb: number, viewingConditions: ViewingConditions): Cam16;
|
|
70
|
-
/**
|
|
71
|
-
* @param j CAM16 lightness
|
|
72
|
-
* @param c CAM16 chroma
|
|
73
|
-
* @param h CAM16 hue
|
|
74
|
-
*/
|
|
75
|
-
static fromJch(j: number, c: number, h: number): Cam16;
|
|
76
|
-
/**
|
|
77
|
-
* @param j CAM16 lightness
|
|
78
|
-
* @param c CAM16 chroma
|
|
79
|
-
* @param h CAM16 hue
|
|
80
|
-
* @param viewingConditions Information about the environment where the color
|
|
81
|
-
* was observed.
|
|
82
|
-
*/
|
|
83
|
-
static fromJchInViewingConditions(j: number, c: number, h: number, viewingConditions: ViewingConditions): Cam16;
|
|
84
|
-
/**
|
|
85
|
-
* @param jstar CAM16-UCS lightness.
|
|
86
|
-
* @param astar CAM16-UCS a dimension. Like a* in L*a*b*, it is a Cartesian
|
|
87
|
-
* coordinate on the Y axis.
|
|
88
|
-
* @param bstar CAM16-UCS b dimension. Like a* in L*a*b*, it is a Cartesian
|
|
89
|
-
* coordinate on the X axis.
|
|
90
|
-
*/
|
|
91
|
-
static fromUcs(jstar: number, astar: number, bstar: number): Cam16;
|
|
92
|
-
/**
|
|
93
|
-
* @param jstar CAM16-UCS lightness.
|
|
94
|
-
* @param astar CAM16-UCS a dimension. Like a* in L*a*b*, it is a Cartesian
|
|
95
|
-
* coordinate on the Y axis.
|
|
96
|
-
* @param bstar CAM16-UCS b dimension. Like a* in L*a*b*, it is a Cartesian
|
|
97
|
-
* coordinate on the X axis.
|
|
98
|
-
* @param viewingConditions Information about the environment where the color
|
|
99
|
-
* was observed.
|
|
100
|
-
*/
|
|
101
|
-
static fromUcsInViewingConditions(jstar: number, astar: number, bstar: number, viewingConditions: ViewingConditions): Cam16;
|
|
102
|
-
/**
|
|
103
|
-
* @return ARGB representation of color, assuming the color was viewed in
|
|
104
|
-
* default viewing conditions, which are near-identical to the default
|
|
105
|
-
* viewing conditions for sRGB.
|
|
106
|
-
*/
|
|
107
|
-
toInt(): number;
|
|
108
|
-
/**
|
|
109
|
-
* @param viewingConditions Information about the environment where the color
|
|
110
|
-
* will be viewed.
|
|
111
|
-
* @return ARGB representation of color
|
|
112
|
-
*/
|
|
113
|
-
viewed(viewingConditions: ViewingConditions): number;
|
|
114
|
-
static fromXyzInViewingConditions(x: number, y: number, z: number, viewingConditions: ViewingConditions): Cam16;
|
|
115
|
-
xyzInViewingConditions(viewingConditions: ViewingConditions): number[];
|
|
116
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { ViewingConditions } from './viewing-conditions';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* HCT, hue, chroma, and tone. A color system that provides a perceptually
|
|
5
|
-
* accurate color measurement system that can also accurately render what colors
|
|
6
|
-
* will appear as in different lighting environments.
|
|
7
|
-
*/
|
|
8
|
-
export declare class Hct {
|
|
9
|
-
private argb;
|
|
10
|
-
/**
|
|
11
|
-
* @param hue 0 <= hue < 360; invalid values are corrected.
|
|
12
|
-
* @param chroma 0 <= chroma < ?; Informally, colorfulness. The color
|
|
13
|
-
* returned may be lower than the requested chroma. Chroma has a different
|
|
14
|
-
* maximum for any given hue and tone.
|
|
15
|
-
* @param tone 0 <= tone <= 100; invalid values are corrected.
|
|
16
|
-
* @return HCT representation of a color in default viewing conditions.
|
|
17
|
-
*/
|
|
18
|
-
internalHue: number;
|
|
19
|
-
internalChroma: number;
|
|
20
|
-
internalTone: number;
|
|
21
|
-
static from(hue: number, chroma: number, tone: number): Hct;
|
|
22
|
-
/**
|
|
23
|
-
* @param argb ARGB representation of a color.
|
|
24
|
-
* @return HCT representation of a color in default viewing conditions
|
|
25
|
-
*/
|
|
26
|
-
static fromInt(argb: number): Hct;
|
|
27
|
-
toInt(): number;
|
|
28
|
-
/**
|
|
29
|
-
* A number, in degrees, representing ex. red, orange, yellow, etc.
|
|
30
|
-
* Ranges from 0 <= hue < 360.
|
|
31
|
-
*/
|
|
32
|
-
get hue(): number;
|
|
33
|
-
/**
|
|
34
|
-
* @param newHue 0 <= newHue < 360; invalid values are corrected.
|
|
35
|
-
* Chroma may decrease because chroma has a different maximum for any given
|
|
36
|
-
* hue and tone.
|
|
37
|
-
*/
|
|
38
|
-
set hue(newHue: number);
|
|
39
|
-
get chroma(): number;
|
|
40
|
-
/**
|
|
41
|
-
* @param newChroma 0 <= newChroma < ?
|
|
42
|
-
* Chroma may decrease because chroma has a different maximum for any given
|
|
43
|
-
* hue and tone.
|
|
44
|
-
*/
|
|
45
|
-
set chroma(newChroma: number);
|
|
46
|
-
/** Lightness. Ranges from 0 to 100. */
|
|
47
|
-
get tone(): number;
|
|
48
|
-
/**
|
|
49
|
-
* @param newTone 0 <= newTone <= 100; invalid valids are corrected.
|
|
50
|
-
* Chroma may decrease because chroma has a different maximum for any given
|
|
51
|
-
* hue and tone.
|
|
52
|
-
*/
|
|
53
|
-
set tone(newTone: number);
|
|
54
|
-
private constructor();
|
|
55
|
-
private setInternalState;
|
|
56
|
-
/**
|
|
57
|
-
* Translates a color into different [ViewingConditions].
|
|
58
|
-
*
|
|
59
|
-
* Colors change appearance. They look different with lights on versus off,
|
|
60
|
-
* the same color, as in hex code, on white looks different when on black.
|
|
61
|
-
* This is called color relativity, most famously explicated by Josef Albers
|
|
62
|
-
* in Interaction of Color.
|
|
63
|
-
*
|
|
64
|
-
* In color science, color appearance models can account for this and
|
|
65
|
-
* calculate the appearance of a color in different settings. HCT is based on
|
|
66
|
-
* CAM16, a color appearance model, and uses it to make these calculations.
|
|
67
|
-
*
|
|
68
|
-
* See [ViewingConditions.make] for parameters affecting color appearance.
|
|
69
|
-
*/
|
|
70
|
-
inViewingConditions(vc: ViewingConditions): Hct;
|
|
71
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* RGBA component
|
|
3
|
-
*
|
|
4
|
-
* @param r Red value should be between 0-255
|
|
5
|
-
* @param g Green value should be between 0-255
|
|
6
|
-
* @param b Blue value should be between 0-255
|
|
7
|
-
* @param a Alpha value should be between 0-255
|
|
8
|
-
*/
|
|
9
|
-
export interface Rgba {
|
|
10
|
-
r: number;
|
|
11
|
-
g: number;
|
|
12
|
-
b: number;
|
|
13
|
-
a: number;
|
|
14
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2021 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* Utility methods for mathematical operations.
|
|
19
|
-
*/
|
|
20
|
-
/**
|
|
21
|
-
* The signum function.
|
|
22
|
-
*
|
|
23
|
-
* @return 1 if num > 0, -1 if num < 0, and 0 if num = 0
|
|
24
|
-
*/
|
|
25
|
-
export declare function signum(num: number): number;
|
|
26
|
-
/**
|
|
27
|
-
* The linear interpolation function.
|
|
28
|
-
*
|
|
29
|
-
* @return start if amount = 0 and stop if amount = 1
|
|
30
|
-
*/
|
|
31
|
-
export declare function lerp(start: number, stop: number, amount: number): number;
|
|
32
|
-
/**
|
|
33
|
-
* Clamps an integer between two integers.
|
|
34
|
-
*
|
|
35
|
-
* @return input when min <= input <= max, and either min or max
|
|
36
|
-
* otherwise.
|
|
37
|
-
*/
|
|
38
|
-
export declare function clampInt(min: number, max: number, input: number): number;
|
|
39
|
-
/**
|
|
40
|
-
* Clamps an integer between two floating-point numbers.
|
|
41
|
-
*
|
|
42
|
-
* @return input when min <= input <= max, and either min or max
|
|
43
|
-
* otherwise.
|
|
44
|
-
*/
|
|
45
|
-
export declare function clampDouble(min: number, max: number, input: number): number;
|
|
46
|
-
/**
|
|
47
|
-
* Sanitizes a degree measure as an integer.
|
|
48
|
-
*
|
|
49
|
-
* @return a degree measure between 0 (inclusive) and 360
|
|
50
|
-
* (exclusive).
|
|
51
|
-
*/
|
|
52
|
-
export declare function sanitizeDegreesInt(degrees: number): number;
|
|
53
|
-
/**
|
|
54
|
-
* Sanitizes a degree measure as a floating-point number.
|
|
55
|
-
*
|
|
56
|
-
* @return a degree measure between 0.0 (inclusive) and 360.0
|
|
57
|
-
* (exclusive).
|
|
58
|
-
*/
|
|
59
|
-
export declare function sanitizeDegreesDouble(degrees: number): number;
|
|
60
|
-
/**
|
|
61
|
-
* Sign of direction change needed to travel from one angle to
|
|
62
|
-
* another.
|
|
63
|
-
*
|
|
64
|
-
* For angles that are 180 degrees apart from each other, both
|
|
65
|
-
* directions have the same travel distance, so either direction is
|
|
66
|
-
* shortest. The value 1.0 is returned in this case.
|
|
67
|
-
*
|
|
68
|
-
* @param from The angle travel starts from, in degrees.
|
|
69
|
-
* @param to The angle travel ends at, in degrees.
|
|
70
|
-
* @return -1 if decreasing from leads to the shortest travel
|
|
71
|
-
* distance, 1 if increasing from leads to the shortest travel
|
|
72
|
-
* distance.
|
|
73
|
-
*/
|
|
74
|
-
export declare function rotationDirection(from: number, to: number): number;
|
|
75
|
-
/**
|
|
76
|
-
* Distance of two points on a circle, represented using degrees.
|
|
77
|
-
*/
|
|
78
|
-
export declare function differenceDegrees(a: number, b: number): number;
|
|
79
|
-
/**
|
|
80
|
-
* Multiplies a 1x3 row vector with a 3x3 matrix.
|
|
81
|
-
*/
|
|
82
|
-
export declare function matrixMultiply(row: number[], matrix: number[][]): number[];
|
package/dist/util/common.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare function hasOwnProperty(object: any, property: string): boolean;
|
|
2
|
-
export declare function getNestedValue(obj: any, path: (string | number)[], fallback?: any): any;
|
|
3
|
-
export declare function mergeDeep(source?: Record<string, any>, overwrite?: Record<string, any>, arrayFn?: (source: unknown[], overwrite: unknown[]) => unknown[]): {
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
};
|
|
6
|
-
export declare function getObjectValueByPath(obj: any, path: string, fallback?: any): any;
|
|
7
|
-
export type SelectItemKey = boolean | string | (string | number)[] | ((item: Record<string, any>, fallback?: any) => any);
|
|
8
|
-
export declare function getPropertyFromItem(item: any, property: SelectItemKey, fallback?: any): any;
|
|
9
|
-
export declare function clamp(value: number, min?: number, max?: number): number;
|
|
10
|
-
export declare function getRangeArr(length: number, start?: number): number[];
|
|
11
|
-
export declare function deepEqual(a: any, b: any): boolean;
|
|
12
|
-
export declare function isObject(obj: unknown): boolean;
|
|
13
|
-
export declare function omit<T extends object, U extends Extract<keyof T, string>>(obj: T, excludes: U[]): Omit<T, U>;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { DateAdapter, DateFormatOptions } from '../types';
|
|
2
|
-
|
|
3
|
-
export declare class YuyeonDateAdapter implements DateAdapter<Date> {
|
|
4
|
-
locale: string;
|
|
5
|
-
formats?: Record<string, DateFormatOptions>;
|
|
6
|
-
constructor(options: {
|
|
7
|
-
locale: string;
|
|
8
|
-
formats?: Record<string, DateFormatOptions>;
|
|
9
|
-
});
|
|
10
|
-
getWeekArray(date: Date): Date[][];
|
|
11
|
-
startOfMonth(date: Date): Date;
|
|
12
|
-
endOfMonth(date: Date): Date;
|
|
13
|
-
addDays(date: Date, amount: number): Date;
|
|
14
|
-
addMonths(date: Date, amount: number): Date;
|
|
15
|
-
date(value?: any): Date | null;
|
|
16
|
-
endOfDay(date: Date): Date;
|
|
17
|
-
endOfYear(date: Date): Date;
|
|
18
|
-
format(date: Date, formatString: string): string;
|
|
19
|
-
getDiff(date: Date, comparing: string | Date, unit?: string): number;
|
|
20
|
-
getYear(date: Date): number;
|
|
21
|
-
getMonth(date: Date): number;
|
|
22
|
-
getDay(date: Date): number;
|
|
23
|
-
getNextMonth(date: Date): Date;
|
|
24
|
-
getWeekdays(): string[];
|
|
25
|
-
isAfter(date: Date, comparing: Date): boolean;
|
|
26
|
-
isBefore(date: Date, comparing: Date): boolean;
|
|
27
|
-
isEqual(date: Date, comparing: Date): boolean;
|
|
28
|
-
isSameDay(date: Date, comparing: Date): boolean;
|
|
29
|
-
isSameMonth(date: Date, comparing: Date): boolean;
|
|
30
|
-
isValid(date: any): boolean;
|
|
31
|
-
isWithinRange(date: Date, range: [Date, Date]): boolean;
|
|
32
|
-
parseISO(date: string): Date;
|
|
33
|
-
setMonth(date: Date, month: number): Date;
|
|
34
|
-
setYear(date: Date, year: number): Date;
|
|
35
|
-
startOfDay(date: Date): Date;
|
|
36
|
-
startOfYear(date: Date): Date;
|
|
37
|
-
toISO(date: Date): string;
|
|
38
|
-
toJsDate(date: Date): Date;
|
|
39
|
-
getHour(date: Date): number;
|
|
40
|
-
getMinute(date: Date): number;
|
|
41
|
-
setHour(date: Date, hour: number): Date;
|
|
42
|
-
setMinute(date: Date, minute: number): Date;
|
|
43
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { DateAdapter, DateFormatOptions } from './types';
|
|
2
|
-
|
|
3
|
-
export declare const ONE_DAY: number;
|
|
4
|
-
export declare const YYYY_MM_DD_REGEX: RegExp;
|
|
5
|
-
export declare const FIRST_SUNDAY: Date;
|
|
6
|
-
export declare class DateUtil {
|
|
7
|
-
static date(value?: any): Date | null;
|
|
8
|
-
static format(value: Date, formatString: string, locale: string, formats?: Record<string, DateFormatOptions>): string;
|
|
9
|
-
static parseLocalDate(value: string): Date;
|
|
10
|
-
static parseISO(value: string): Date;
|
|
11
|
-
static toISO(adapter: DateAdapter<any>, value: Date): string;
|
|
12
|
-
static getWeekArray(date: Date, locale: string): Date[][];
|
|
13
|
-
static startOfMonth(date: Date): Date;
|
|
14
|
-
static endOfMonth(date: Date): Date;
|
|
15
|
-
static startOfDay(date: Date): Date;
|
|
16
|
-
static startOfYear(date: Date): Date;
|
|
17
|
-
static endOfDay(date: Date): Date;
|
|
18
|
-
static endOfYear(date: Date): Date;
|
|
19
|
-
static getYear(date: Date): number;
|
|
20
|
-
static getMonth(date: Date): number;
|
|
21
|
-
static getDay(date: Date): number;
|
|
22
|
-
static getNextMonth(date: Date): Date;
|
|
23
|
-
static getWeekdays(locale: string): string[];
|
|
24
|
-
static getMeridians(locale: string): string[];
|
|
25
|
-
static isAfter(date: Date, comparing: Date): boolean;
|
|
26
|
-
static isBefore(date: Date, comparing: Date): boolean;
|
|
27
|
-
static isEqual(date: Date, comparing: Date): boolean;
|
|
28
|
-
static isSameDay(date: Date, comparing: Date): boolean;
|
|
29
|
-
static isSameMonth(date: Date, comparing: Date): boolean;
|
|
30
|
-
static isValid(date: any): boolean;
|
|
31
|
-
static isWithinRange(date: Date, range: [Date, Date]): boolean;
|
|
32
|
-
static addDays(date: Date, amount: number): Date;
|
|
33
|
-
static addMonths(date: Date, amount: number): Date;
|
|
34
|
-
static getDiff(date: Date, comparing: string | Date, unit?: 'month' | string): number;
|
|
35
|
-
static setMonth(date: Date, month: number): Date;
|
|
36
|
-
static setYear(date: Date, year: number): Date;
|
|
37
|
-
static getHour(date: Date): number;
|
|
38
|
-
static setHour(date: Date, hour: number): Date;
|
|
39
|
-
static getMinute(date: Date): number;
|
|
40
|
-
static setMinute(date: Date, minute: number): Date;
|
|
41
|
-
}
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
export interface DateAdapter<T = unknown> {
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* @param value
|
|
5
|
-
*/
|
|
6
|
-
date(value?: any): T | null;
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* @param date
|
|
10
|
-
* @param formatString
|
|
11
|
-
*/
|
|
12
|
-
format(date: T, formatString: string): string;
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
* @param value
|
|
16
|
-
*/
|
|
17
|
-
toJsDate(value: T): Date;
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
* @param date
|
|
21
|
-
*/
|
|
22
|
-
parseISO(date: string): T;
|
|
23
|
-
/**
|
|
24
|
-
*
|
|
25
|
-
* @param date
|
|
26
|
-
*/
|
|
27
|
-
toISO(date: T): string;
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
* @param date
|
|
31
|
-
*/
|
|
32
|
-
startOfDay(date: T): T;
|
|
33
|
-
/**
|
|
34
|
-
*
|
|
35
|
-
* @param date
|
|
36
|
-
*/
|
|
37
|
-
endOfDay(date: T): T;
|
|
38
|
-
/**
|
|
39
|
-
*
|
|
40
|
-
* @param date
|
|
41
|
-
*/
|
|
42
|
-
startOfMonth(date: T): T;
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
* @param date
|
|
46
|
-
*/
|
|
47
|
-
endOfMonth(date: T): T;
|
|
48
|
-
/**
|
|
49
|
-
*
|
|
50
|
-
* @param date
|
|
51
|
-
*/
|
|
52
|
-
startOfYear(date: T): T;
|
|
53
|
-
/**
|
|
54
|
-
*
|
|
55
|
-
* @param date
|
|
56
|
-
*/
|
|
57
|
-
endOfYear(date: T): T;
|
|
58
|
-
/**
|
|
59
|
-
*
|
|
60
|
-
* @param date
|
|
61
|
-
* @param comparing
|
|
62
|
-
*/
|
|
63
|
-
isBefore(date: T, comparing: T): boolean;
|
|
64
|
-
/**
|
|
65
|
-
*
|
|
66
|
-
* @param date
|
|
67
|
-
* @param comparing
|
|
68
|
-
*/
|
|
69
|
-
isAfter(date: T, comparing: T): boolean;
|
|
70
|
-
/**
|
|
71
|
-
*
|
|
72
|
-
* @param date
|
|
73
|
-
* @param comparing
|
|
74
|
-
*/
|
|
75
|
-
isEqual(date: T, comparing: T): boolean;
|
|
76
|
-
/**
|
|
77
|
-
*
|
|
78
|
-
* @param date
|
|
79
|
-
* @param comparing
|
|
80
|
-
*/
|
|
81
|
-
isSameDay(date: T, comparing: T): boolean;
|
|
82
|
-
/**
|
|
83
|
-
*
|
|
84
|
-
* @param date
|
|
85
|
-
* @param comparing
|
|
86
|
-
*/
|
|
87
|
-
isSameMonth(date: T, comparing: T): boolean;
|
|
88
|
-
/**
|
|
89
|
-
*
|
|
90
|
-
* @param date
|
|
91
|
-
*/
|
|
92
|
-
isValid(date: any): boolean;
|
|
93
|
-
/**
|
|
94
|
-
*
|
|
95
|
-
* @param date
|
|
96
|
-
* @param range
|
|
97
|
-
*/
|
|
98
|
-
isWithinRange(date: T, range: [T, T]): boolean;
|
|
99
|
-
/**
|
|
100
|
-
*
|
|
101
|
-
* @param date
|
|
102
|
-
* @param amount
|
|
103
|
-
*/
|
|
104
|
-
addDays(date: T, amount: number): T;
|
|
105
|
-
/**
|
|
106
|
-
*
|
|
107
|
-
* @param date
|
|
108
|
-
* @param amount
|
|
109
|
-
*/
|
|
110
|
-
addMonths(date: T, amount: number): T;
|
|
111
|
-
/**
|
|
112
|
-
*
|
|
113
|
-
* @param date
|
|
114
|
-
*/
|
|
115
|
-
getYear(date: T): number;
|
|
116
|
-
/**
|
|
117
|
-
*
|
|
118
|
-
* @param date
|
|
119
|
-
* @param year
|
|
120
|
-
*/
|
|
121
|
-
setYear(date: T, year: number): T;
|
|
122
|
-
/**
|
|
123
|
-
*
|
|
124
|
-
* @param date
|
|
125
|
-
* @param comparing
|
|
126
|
-
* @param unit
|
|
127
|
-
*/
|
|
128
|
-
getDiff(date: T, comparing: T | string, unit?: string): number;
|
|
129
|
-
/**
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
* @param date
|
|
133
|
-
*/
|
|
134
|
-
getWeekArray(date: T): T[][];
|
|
135
|
-
/**
|
|
136
|
-
*
|
|
137
|
-
*/
|
|
138
|
-
getWeekdays(): string[];
|
|
139
|
-
/**
|
|
140
|
-
* 0 ~ 11
|
|
141
|
-
* @param date
|
|
142
|
-
*/
|
|
143
|
-
getMonth(date: T): number;
|
|
144
|
-
/**
|
|
145
|
-
*
|
|
146
|
-
* @param date
|
|
147
|
-
* @param month
|
|
148
|
-
*/
|
|
149
|
-
setMonth(date: T, month: number): T;
|
|
150
|
-
/**
|
|
151
|
-
*
|
|
152
|
-
* get day (1-31) number
|
|
153
|
-
*
|
|
154
|
-
* @param date
|
|
155
|
-
*/
|
|
156
|
-
getDay(date: T): number;
|
|
157
|
-
/**
|
|
158
|
-
*
|
|
159
|
-
* @param date
|
|
160
|
-
*/
|
|
161
|
-
getNextMonth(date: T): T;
|
|
162
|
-
getHour(date: T): number;
|
|
163
|
-
setHour(date: T, hour: number): T;
|
|
164
|
-
getMinute(date: T): number;
|
|
165
|
-
setMinute(date: T, minute: number): T;
|
|
166
|
-
}
|
|
167
|
-
export type DateFormatOptions = Intl.DateTimeFormatOptions | ((date: Date, formatString: string, locale: string) => string);
|