yuyeon 0.3.4-rc.4 → 0.3.6-beta.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/style.css +1 -1
- package/dist/yuyeon.js +3963 -3707
- package/dist/yuyeon.umd.cjs +3 -3
- package/lib/abstract/items.js.map +1 -1
- package/lib/components/alert/YAlert.js +1 -2
- package/lib/components/alert/YAlert.js.map +1 -1
- package/lib/components/alert/index.js.map +1 -1
- package/lib/components/app/YApp.js +2 -2
- package/lib/components/app/YApp.js.map +1 -1
- package/lib/components/app/index.js.map +1 -1
- package/lib/components/badge/YBadge.js +7 -5
- package/lib/components/badge/YBadge.js.map +1 -1
- package/lib/components/badge/YBadge.scss +87 -86
- package/lib/components/badge/index.js.map +1 -1
- package/lib/components/bench/YBench.js +3 -4
- package/lib/components/bench/YBench.js.map +1 -1
- package/lib/components/bench/index.js.map +1 -1
- package/lib/components/button/YButton.js +1 -2
- package/lib/components/button/YButton.js.map +1 -1
- package/lib/components/button/index.js.map +1 -1
- package/lib/components/card/YCard.js.map +1 -1
- package/lib/components/card/YCard.scss +2 -2
- package/lib/components/card/YCardBody.js.map +1 -1
- package/lib/components/card/YCardFooter.js.map +1 -1
- package/lib/components/card/YCardHeader.js.map +1 -1
- package/lib/components/card/index.js.map +1 -1
- package/lib/components/checkbox/YCheckbox.js +1 -2
- package/lib/components/checkbox/YCheckbox.js.map +1 -1
- package/lib/components/checkbox/YInputCheckbox.js +1 -2
- package/lib/components/checkbox/YInputCheckbox.js.map +1 -1
- package/lib/components/checkbox/index.js.map +1 -1
- package/lib/components/chip/YChip.js +1 -2
- package/lib/components/chip/YChip.js.map +1 -1
- package/lib/components/chip/index.js.map +1 -1
- package/lib/components/date-picker/YDateCalendar.js +59 -54
- package/lib/components/date-picker/YDateCalendar.js.map +1 -1
- package/lib/components/date-picker/YDatePicker.js +24 -25
- package/lib/components/date-picker/YDatePicker.js.map +1 -1
- package/lib/components/date-picker/YDatePickerControl.js +19 -20
- package/lib/components/date-picker/YDatePickerControl.js.map +1 -1
- package/lib/components/date-picker/YMonthPicker.js +10 -11
- package/lib/components/date-picker/YMonthPicker.js.map +1 -1
- package/lib/components/date-picker/YYearPicker.js +11 -13
- package/lib/components/date-picker/YYearPicker.js.map +1 -1
- package/lib/components/date-picker/index.js.map +1 -1
- package/lib/components/default-provider/YDefaultProvider.js.map +1 -1
- package/lib/components/default-provider/index.js.map +1 -1
- package/lib/components/dialog/YDialog.js +32 -32
- package/lib/components/dialog/YDialog.js.map +1 -1
- package/lib/components/dialog/index.js.map +1 -1
- package/lib/components/divider/YDivider.js +5 -5
- package/lib/components/divider/YDivider.js.map +1 -1
- package/lib/components/divider/index.js.map +1 -1
- package/lib/components/draggable/YDraggable.js +10 -11
- package/lib/components/draggable/YDraggable.js.map +1 -1
- package/lib/components/draggable/index.js.map +1 -1
- package/lib/components/dropdown/YDropdown.js +16 -17
- package/lib/components/dropdown/YDropdown.js.map +1 -1
- package/lib/components/dropdown/index.js.map +1 -1
- package/lib/components/field-input/YFieldInput.js +39 -39
- package/lib/components/field-input/YFieldInput.js.map +1 -1
- package/lib/components/field-input/index.js.map +1 -1
- package/lib/components/form/YForm.js +12 -14
- package/lib/components/form/YForm.js.map +1 -1
- package/lib/components/form/index.js.map +1 -1
- package/lib/components/hover/YHover.js +9 -8
- package/lib/components/hover/YHover.js.map +1 -1
- package/lib/components/hover/index.js.map +1 -1
- package/lib/components/icon/YIcon.js +2 -4
- package/lib/components/icon/YIcon.js.map +1 -1
- package/lib/components/icon/index.js.map +1 -1
- package/lib/components/icons/YIconCheckbox.js +7 -6
- package/lib/components/icons/YIconCheckbox.js.map +1 -1
- package/lib/components/icons/YIconCheckbox.scss +4 -5
- package/lib/components/icons/YIconClear.js +2 -1
- package/lib/components/icons/YIconClear.js.map +1 -1
- package/lib/components/icons/YIconDropdown.js +2 -1
- package/lib/components/icons/YIconDropdown.js.map +1 -1
- package/lib/components/icons/YIconExpand.js +1 -0
- package/lib/components/icons/YIconExpand.js.map +1 -1
- package/lib/components/icons/YIconPageControl.js +7 -6
- package/lib/components/icons/YIconPageControl.js.map +1 -1
- package/lib/components/icons/YIconSort.js +6 -5
- package/lib/components/icons/YIconSort.js.map +1 -1
- package/lib/components/icons/YIconSort.scss +2 -0
- package/lib/components/icons/index.js.map +1 -1
- package/lib/components/img/YImg.js +38 -33
- package/lib/components/img/YImg.js.map +1 -1
- package/lib/components/img/index.js +1 -1
- package/lib/components/img/index.js.map +1 -1
- package/lib/components/index.js +1 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/input/YInput.js +1 -2
- package/lib/components/input/YInput.js.map +1 -1
- package/lib/components/input/YInput.scss +9 -8
- package/lib/components/input/index.js.map +1 -1
- package/lib/components/ip-field/YIpv4Field.js +1 -2
- package/lib/components/ip-field/YIpv4Field.js.map +1 -1
- package/lib/components/ip-field/index.js.map +1 -1
- package/lib/components/layer/YLayer.js +38 -25
- package/lib/components/layer/YLayer.js.map +1 -1
- package/lib/components/layer/active-delay.js.map +1 -1
- package/lib/components/layer/active-stack.js.map +1 -1
- package/lib/components/layer/base.js +11 -1
- package/lib/components/layer/base.js.map +1 -1
- package/lib/components/layer/content.js.map +1 -1
- package/lib/components/layer/index.js.map +1 -1
- package/lib/components/layer/scroll-strategies.js.map +1 -1
- package/lib/components/list/YList.js +1 -2
- package/lib/components/list/YList.js.map +1 -1
- package/lib/components/list/YListItem.js +1 -2
- package/lib/components/list/YListItem.js.map +1 -1
- package/lib/components/list/index.js.map +1 -1
- package/lib/components/loading/YSpinnerRing.js.map +1 -1
- package/lib/components/loading/index.js.map +1 -1
- package/lib/components/menu/YMenu.js +22 -25
- package/lib/components/menu/YMenu.js.map +1 -1
- package/lib/components/menu/YMenu.scss +3 -4
- package/lib/components/menu/index.js.map +1 -1
- package/lib/components/navigation/YNavigation.js +1 -2
- package/lib/components/navigation/YNavigation.js.map +1 -1
- package/lib/components/navigation/index.js.map +1 -1
- package/lib/components/pagination/YPagination.js +1 -2
- package/lib/components/pagination/YPagination.js.map +1 -1
- package/lib/components/pagination/index.js.map +1 -1
- package/lib/components/panel/YDividePanel.js +1 -2
- package/lib/components/panel/YDividePanel.js.map +1 -1
- package/lib/components/panel/YDividePanel.scss +44 -43
- package/lib/components/panel/index.js.map +1 -1
- package/lib/components/plate/YPlate.js +1 -2
- package/lib/components/plate/YPlate.js.map +1 -1
- package/lib/components/plate/index.js.map +1 -1
- package/lib/components/progress-bar/YProgressBar.js +1 -2
- package/lib/components/progress-bar/YProgressBar.js.map +1 -1
- package/lib/components/progress-bar/index.js.map +1 -1
- package/lib/components/progress-ring/YProgressRing.js +3 -4
- package/lib/components/progress-ring/YProgressRing.js.map +1 -1
- package/lib/components/progress-ring/index.js.map +1 -1
- package/lib/components/radio/YRadio.js +1 -1
- package/lib/components/radio/YRadio.js.map +1 -1
- package/lib/components/radio/YRadioIcon.js.map +1 -1
- package/lib/components/radio/YRadioIcon.scss +2 -3
- package/lib/components/radio/index.js.map +1 -1
- package/lib/components/select/YSelect.js +41 -42
- package/lib/components/select/YSelect.js.map +1 -1
- package/lib/components/select/index.js.map +1 -1
- package/lib/components/slider/YSlider.js.map +1 -1
- package/lib/components/slider/index.js.map +1 -1
- package/lib/components/slider/slider.js.map +1 -1
- package/lib/components/snackbar/YSnackbar.js +6 -6
- package/lib/components/snackbar/YSnackbar.js.map +1 -1
- package/lib/components/snackbar/index.js.map +1 -1
- package/lib/components/switch/YSwitch.js +1 -2
- package/lib/components/switch/YSwitch.js.map +1 -1
- package/lib/components/switch/index.js.map +1 -1
- package/lib/components/tab/YTab.js +2 -3
- package/lib/components/tab/YTab.js.map +1 -1
- package/lib/components/tab/YTab.scss +1 -1
- package/lib/components/tab/YTabs.js +1 -2
- package/lib/components/tab/YTabs.js.map +1 -1
- package/lib/components/tab/index.js.map +1 -1
- package/lib/components/tab/shared.js.map +1 -1
- package/lib/components/tab/types.js.map +1 -1
- package/lib/components/table/YDataTable.js +1 -2
- package/lib/components/table/YDataTable.js.map +1 -1
- package/lib/components/table/YDataTableBody.js +2 -3
- package/lib/components/table/YDataTableBody.js.map +1 -1
- package/lib/components/table/YDataTableCell.js +1 -2
- package/lib/components/table/YDataTableCell.js.map +1 -1
- package/lib/components/table/YDataTableControl.js +1 -1
- package/lib/components/table/YDataTableControl.js.map +1 -1
- package/lib/components/table/YDataTableControl.scss +17 -17
- package/lib/components/table/YDataTableHead.js +1 -1
- package/lib/components/table/YDataTableHead.js.map +1 -1
- package/lib/components/table/YDataTableLayer.js +1 -2
- package/lib/components/table/YDataTableLayer.js.map +1 -1
- package/lib/components/table/YDataTableLayerRow.js +1 -2
- package/lib/components/table/YDataTableLayerRow.js.map +1 -1
- package/lib/components/table/YDataTableLayerRows.js +3 -4
- package/lib/components/table/YDataTableLayerRows.js.map +1 -1
- package/lib/components/table/YDataTableRow.js +1 -2
- package/lib/components/table/YDataTableRow.js.map +1 -1
- package/lib/components/table/YDataTableServer.js +1 -2
- package/lib/components/table/YDataTableServer.js.map +1 -1
- package/lib/components/table/YTable.js +1 -2
- package/lib/components/table/YTable.js.map +1 -1
- package/lib/components/table/composables/expand.js.map +1 -1
- package/lib/components/table/composables/header.js.map +1 -1
- package/lib/components/table/composables/items.js.map +1 -1
- package/lib/components/table/composables/measure.js +1 -1
- package/lib/components/table/composables/measure.js.map +1 -1
- package/lib/components/table/composables/options.js.map +1 -1
- package/lib/components/table/composables/pagination.js.map +1 -1
- package/lib/components/table/composables/provides.js.map +1 -1
- package/lib/components/table/composables/selection.js.map +1 -1
- package/lib/components/table/composables/sorted-items.js.map +1 -1
- package/lib/components/table/composables/sorting.js.map +1 -1
- package/lib/components/table/index.js.map +1 -1
- package/lib/components/table/types/common.js.map +1 -1
- package/lib/components/table/types/header.js.map +1 -1
- package/lib/components/table/types/index.js.map +1 -1
- package/lib/components/table/types/item.js.map +1 -1
- package/lib/components/table/types/row.js.map +1 -1
- package/lib/components/text-ellipsis/YTextEllipsis.js +1 -2
- package/lib/components/text-ellipsis/YTextEllipsis.js.map +1 -1
- package/lib/components/text-ellipsis/index.js.map +1 -1
- package/lib/components/text-highlighter/YTextHighlighter.js.map +1 -1
- package/lib/components/text-highlighter/index.js.map +1 -1
- package/lib/components/text-interpolation/YTi.js +2 -2
- package/lib/components/text-interpolation/YTi.js.map +1 -1
- package/lib/components/text-interpolation/index.js.map +1 -1
- package/lib/components/textarea/YTextarea.js +1 -2
- package/lib/components/textarea/YTextarea.js.map +1 -1
- package/lib/components/textarea/index.js.map +1 -1
- package/lib/components/toggle-button/YToggleButton.js.map +1 -1
- package/lib/components/toggle-button/index.js.map +1 -1
- package/lib/components/tooltip/YTooltip.js +20 -21
- package/lib/components/tooltip/YTooltip.js.map +1 -1
- package/lib/components/tooltip/index.js.map +1 -1
- package/lib/components/transitions/expand-transition.js.map +1 -1
- package/lib/components/transitions/index.js.map +1 -1
- package/lib/components/tree-view/YTreeView.js +23 -29
- package/lib/components/tree-view/YTreeView.js.map +1 -1
- package/lib/components/tree-view/YTreeViewNode.js +58 -21
- package/lib/components/tree-view/YTreeViewNode.js.map +1 -1
- package/lib/components/tree-view/index.js.map +1 -1
- package/lib/components/tree-view/tree-view.js +61 -8
- package/lib/components/tree-view/tree-view.js.map +1 -1
- package/lib/components/tree-view/types.js.map +1 -1
- package/lib/components/tree-view/util.js.map +1 -1
- package/lib/composables/choice-link.js.map +1 -1
- package/lib/composables/choice.js.map +1 -1
- package/lib/composables/communication.js.map +1 -1
- package/lib/composables/component.js.map +1 -1
- package/lib/composables/coordinate/arrangement.js.map +1 -1
- package/lib/composables/coordinate/index.js +23 -13
- package/lib/composables/coordinate/index.js.map +1 -1
- package/lib/composables/coordinate/levitation.js +79 -50
- package/lib/composables/coordinate/levitation.js.map +1 -1
- package/lib/composables/coordinate/types.js.map +1 -1
- package/lib/composables/coordinate/utils/point.js.map +1 -1
- package/lib/composables/date/factory.js.map +1 -1
- package/lib/composables/date/index.js.map +1 -1
- package/lib/composables/date/setting.js.map +1 -1
- package/lib/composables/date/types.js.map +1 -1
- package/lib/composables/defaults/index.js.map +1 -1
- package/lib/composables/defaults/share.js.map +1 -1
- package/lib/composables/defaults/types.js.map +1 -1
- package/lib/composables/dimension.js.map +1 -1
- package/lib/composables/focus.js.map +1 -1
- package/lib/composables/form.js +5 -5
- package/lib/composables/form.js.map +1 -1
- package/lib/composables/i18n/index.js.map +1 -1
- package/lib/composables/i18n/locale.js.map +1 -1
- package/lib/composables/i18n/rtl.js.map +1 -1
- package/lib/composables/i18n/share.js.map +1 -1
- package/lib/composables/icon.js +1 -2
- package/lib/composables/icon.js.map +1 -1
- package/lib/composables/index.js.map +1 -1
- package/lib/composables/layer-group.js.map +1 -1
- package/lib/composables/layout.js.map +1 -1
- package/lib/composables/list-items.js.map +1 -1
- package/lib/composables/progress.js.map +1 -1
- package/lib/composables/ref.js.map +1 -1
- package/lib/composables/resize-observer.js.map +1 -1
- package/lib/composables/scope.js.map +1 -1
- package/lib/composables/style-color.js +6 -5
- package/lib/composables/style-color.js.map +1 -1
- package/lib/composables/theme/factory.js.map +1 -1
- package/lib/composables/theme/helper.js.map +1 -1
- package/lib/composables/theme/index.js +8 -1
- package/lib/composables/theme/index.js.map +1 -1
- package/lib/composables/theme/setting.js.map +1 -1
- package/lib/composables/theme/types.js.map +1 -1
- package/lib/composables/timing.js +13 -5
- package/lib/composables/timing.js.map +1 -1
- package/lib/composables/transition.js.map +1 -1
- package/lib/composables/validation.js.map +1 -1
- package/lib/composables/vue-router.js.map +1 -1
- package/lib/directives/complement-click/index.js.map +1 -1
- package/lib/directives/index.js +3 -0
- package/lib/directives/index.js.map +1 -0
- package/lib/directives/plate-wave/index.js.map +1 -1
- package/lib/directives/plate-wave/plate-wave.scss +44 -33
- package/lib/directives/theme-class/index.js +24 -0
- package/lib/directives/theme-class/index.js.map +1 -0
- package/lib/etc/index.js.map +1 -1
- package/lib/i18n/built-in.js.map +1 -1
- package/lib/i18n/config.js.map +1 -1
- package/lib/i18n/types.js.map +1 -1
- package/lib/index.js +3 -3
- package/lib/index.js.map +1 -1
- package/lib/locales/en.js.map +1 -1
- package/lib/locales/index.js.map +1 -1
- package/lib/locales/ko.js.map +1 -1
- package/lib/mixins/di.js.map +1 -1
- package/lib/mixins/rebind-attrs.js +0 -2
- package/lib/mixins/rebind-attrs.js.map +1 -1
- package/lib/styles/_elevation.scss +0 -1
- package/lib/styles/base.scss +3 -1
- package/lib/styles/settings/_elevation.scss +12 -12
- package/lib/styles/settings/_provided.scss +33 -33
- package/lib/styles/theme/dark.scss +3 -3
- package/lib/styles/theme/index.scss +4 -5
- package/lib/styles/theme/light.scss +3 -3
- package/lib/styles/util/_mixin.scss +16 -16
- package/lib/types/index.js.map +1 -1
- package/lib/util/anchor.js.map +1 -1
- package/lib/util/array.js.map +1 -1
- package/lib/util/collection.js.map +1 -1
- package/lib/util/color/apca.js +31 -30
- package/lib/util/color/apca.js.map +1 -1
- package/lib/util/color/const.js.map +1 -1
- package/lib/util/color/contrast/contrast.js.map +1 -1
- package/lib/util/color/conversion.js.map +1 -1
- package/lib/util/color/hct/cam16.js +95 -95
- package/lib/util/color/hct/cam16.js.map +1 -1
- package/lib/util/color/hct/hct-solver.js +113 -113
- package/lib/util/color/hct/hct-solver.js.map +1 -1
- package/lib/util/color/hct/hct.js +71 -71
- package/lib/util/color/hct/hct.js.map +1 -1
- package/lib/util/color/hct/viewing-conditions.js +6 -4
- package/lib/util/color/hct/viewing-conditions.js.map +1 -1
- package/lib/util/color/index.js +12 -12
- package/lib/util/color/index.js.map +1 -1
- package/lib/util/color/palettes/core-palette.js.map +1 -1
- package/lib/util/color/palettes/tonal-palette.js +3 -3
- package/lib/util/color/palettes/tonal-palette.js.map +1 -1
- package/lib/util/color/types.js.map +1 -1
- package/lib/util/color/utils/math-utils.js +62 -62
- package/lib/util/color/utils/math-utils.js.map +1 -1
- package/lib/util/common.js +28 -13
- package/lib/util/common.js.map +1 -1
- package/lib/util/component/component.js.map +1 -1
- package/lib/util/component/index.js.map +1 -1
- package/lib/util/component/inject-self.js.map +1 -1
- package/lib/util/component/props.js.map +1 -1
- package/lib/util/component/types.js.map +1 -1
- package/lib/util/date/adapters/yuyeon-date-adapter.js +3 -3
- package/lib/util/date/adapters/yuyeon-date-adapter.js.map +1 -1
- package/lib/util/date/built-in.js +2 -0
- package/lib/util/date/built-in.js.map +1 -1
- package/lib/util/date/index.js +1 -1
- package/lib/util/date/index.js.map +1 -1
- package/lib/util/date/types.js.map +1 -1
- package/lib/util/debounce.js +1 -1
- package/lib/util/debounce.js.map +1 -1
- package/lib/util/dom.js +10 -1
- package/lib/util/dom.js.map +1 -1
- package/lib/util/environments.js.map +1 -1
- package/lib/util/frame-scheduler.js +3 -3
- package/lib/util/frame-scheduler.js.map +1 -1
- package/lib/util/index.js +11 -11
- package/lib/util/index.js.map +1 -1
- package/lib/util/reactivity.js +3 -3
- package/lib/util/reactivity.js.map +1 -1
- package/lib/util/rect.js.map +1 -1
- package/lib/util/scroll.js.map +1 -1
- package/lib/util/string.js +3 -1
- package/lib/util/string.js.map +1 -1
- package/lib/util/ui.js +8 -7
- package/lib/util/ui.js.map +1 -1
- package/lib/util/validation.js.map +1 -1
- package/package.json +11 -2
- package/types/abstract/items.d.ts +4 -4
- package/types/components/alert/YAlert.d.ts +2 -2
- package/types/components/badge/YBadge.d.ts +9 -3
- package/types/components/button/YButton.d.ts +3 -3
- package/types/components/checkbox/YCheckbox.d.ts +4 -4
- package/types/components/chip/YChip.d.ts +0 -3
- package/types/components/date-picker/YDateCalendar.d.ts +4 -3
- package/types/components/date-picker/YDatePickerControl.d.ts +7 -7
- package/types/components/dialog/YDialog.d.ts +116 -6484
- package/types/components/draggable/YDraggable.d.ts +6 -6
- package/types/components/dropdown/YDropdown.d.ts +87 -87
- package/types/components/field-input/YFieldInput.d.ts +14 -14
- package/types/components/form/YForm.d.ts +3 -3
- package/types/components/icon/YIcon.d.ts +4 -4
- package/types/components/icons/YIconPageControl.d.ts +1 -1
- package/types/components/icons/YIconSort.d.ts +1 -1
- package/types/components/icons/index.d.ts +4 -4
- package/types/components/img/YImg.d.ts +30 -27
- package/types/components/img/index.d.ts +1 -0
- package/types/components/index.d.ts +1 -0
- package/types/components/input/YInput.d.ts +13 -13
- package/types/components/ip-field/YIpv4Field.d.ts +5 -5
- package/types/components/layer/YLayer.d.ts +59 -3242
- package/types/components/layer/base.d.ts +4 -0
- package/types/components/layer/scroll-strategies.d.ts +4 -4
- package/types/components/menu/YMenu.d.ts +83 -6451
- package/types/components/pagination/YPagination.d.ts +3 -3
- package/types/components/select/YSelect.d.ts +172 -496
- package/types/components/slider/YSlider.d.ts +1 -1
- package/types/components/snackbar/YSnackbar.d.ts +55 -55
- package/types/components/tab/YTab.d.ts +3 -3
- package/types/components/tab/YTabs.d.ts +1 -1
- package/types/components/table/YDataTable.d.ts +30 -87
- package/types/components/table/YDataTableBody.d.ts +3 -3
- package/types/components/table/YDataTableCell.d.ts +2 -2
- package/types/components/table/YDataTableControl.d.ts +6 -6
- package/types/components/table/YDataTableLayer.d.ts +2 -2
- package/types/components/table/YDataTableRow.d.ts +1 -1
- package/types/components/table/YDataTableServer.d.ts +37 -94
- package/types/components/table/YTable.d.ts +3 -3
- package/types/components/table/composables/expand.d.ts +4 -4
- package/types/components/table/composables/header.d.ts +16 -48
- package/types/components/table/composables/items.d.ts +2 -2
- package/types/components/table/composables/pagination.d.ts +10 -10
- package/types/components/table/composables/selection.d.ts +6 -6
- package/types/components/table/composables/sorting.d.ts +8 -14
- package/types/components/table/types/item.d.ts +1 -1
- package/types/components/textarea/YTextarea.d.ts +30 -30
- package/types/components/tooltip/YTooltip.d.ts +67 -67
- package/types/components/tree-view/YTreeView.d.ts +21 -29
- package/types/components/tree-view/YTreeViewNode.d.ts +76 -6
- package/types/components/tree-view/tree-view.d.ts +19 -3
- package/types/composables/choice.d.ts +2 -2
- package/types/composables/coordinate/index.d.ts +28 -3207
- package/types/composables/coordinate/levitation.d.ts +4 -2
- package/types/composables/coordinate/types.d.ts +1 -0
- package/types/composables/dimension.d.ts +6 -6
- package/types/composables/form.d.ts +17 -27
- package/types/composables/list-items.d.ts +3 -3
- package/types/composables/style-color.d.ts +22 -1
- package/types/composables/theme/index.d.ts +1 -0
- package/types/composables/transition.d.ts +10 -10
- package/types/composables/validation.d.ts +6 -6
- package/types/composables/vue-router.d.ts +3 -3
- package/types/declares.d.ts +1 -0
- package/types/directives/index.d.ts +2 -0
- package/types/directives/plate-wave/index.d.ts +7 -1
- package/types/globals.d.ts +4 -5
- package/types/shims.d.ts +65 -59
- package/types/types/index.d.ts +3 -0
- package/types/util/anchor.d.ts +1 -1
- package/types/util/common.d.ts +3 -0
- package/types/util/component/component.d.ts +1 -2
- package/types/util/component/props.d.ts +1 -1
- package/types/util/component/types.d.ts +1 -1
- package/types/util/date/index.d.ts +1 -1
- package/types/util/dom.d.ts +2 -0
- package/types/util/index.d.ts +11 -11
- package/types/components/table/composibles/header.d.ts +0 -207
- package/types/components/table/composibles/items.d.ts +0 -55
- package/types/components/table/composibles/measure.d.ts +0 -8
- package/types/components/table/composibles/options.d.ts +0 -11
- package/types/components/table/composibles/pagination.d.ts +0 -81
- package/types/components/table/composibles/selection.d.ts +0 -82
- package/types/components/table/composibles/sorted-items.d.ts +0 -7
- package/types/components/table/composibles/sorting.d.ts +0 -62
- /package/types/directives/{theme-class.d.ts → theme-class/index.d.ts} +0 -0
|
@@ -1,60 +1,60 @@
|
|
|
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.
|
|
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
16
|
*/
|
|
17
|
-
/**
|
|
18
|
-
* A color system built using CAM16 hue and chroma, and L* from
|
|
19
|
-
* L*a*b*.
|
|
20
|
-
*
|
|
21
|
-
* Using L* creates a link between the color system, contrast, and thus
|
|
22
|
-
* accessibility. Contrast ratio depends on relative luminance, or Y in the XYZ
|
|
23
|
-
* color space. L*, or perceptual luminance can be calculated from Y.
|
|
24
|
-
*
|
|
25
|
-
* Unlike Y, L* is linear to human perception, allowing trivial creation of
|
|
26
|
-
* accurate color tones.
|
|
27
|
-
*
|
|
28
|
-
* Unlike contrast ratio, measuring contrast in L* is linear, and simple to
|
|
29
|
-
* calculate. A difference of 40 in HCT tone guarantees a contrast ratio >= 3.0,
|
|
30
|
-
* and a difference of 50 guarantees a contrast ratio >= 4.5.
|
|
17
|
+
/**
|
|
18
|
+
* A color system built using CAM16 hue and chroma, and L* from
|
|
19
|
+
* L*a*b*.
|
|
20
|
+
*
|
|
21
|
+
* Using L* creates a link between the color system, contrast, and thus
|
|
22
|
+
* accessibility. Contrast ratio depends on relative luminance, or Y in the XYZ
|
|
23
|
+
* color space. L*, or perceptual luminance can be calculated from Y.
|
|
24
|
+
*
|
|
25
|
+
* Unlike Y, L* is linear to human perception, allowing trivial creation of
|
|
26
|
+
* accurate color tones.
|
|
27
|
+
*
|
|
28
|
+
* Unlike contrast ratio, measuring contrast in L* is linear, and simple to
|
|
29
|
+
* calculate. A difference of 40 in HCT tone guarantees a contrast ratio >= 3.0,
|
|
30
|
+
* and a difference of 50 guarantees a contrast ratio >= 4.5.
|
|
31
31
|
*/
|
|
32
32
|
import { Cam16 } from "./cam16.js";
|
|
33
33
|
import { HctSolver } from "./hct-solver.js";
|
|
34
34
|
import { ViewingConditions } from "./viewing-conditions.js";
|
|
35
35
|
import { lstarFromArgb, lstarFromY } from "../conversion.js";
|
|
36
|
-
/**
|
|
37
|
-
* HCT, hue, chroma, and tone. A color system that provides a perceptually
|
|
38
|
-
* accurate color measurement system that can also accurately render what colors
|
|
39
|
-
* will appear as in different lighting environments.
|
|
36
|
+
/**
|
|
37
|
+
* HCT, hue, chroma, and tone. A color system that provides a perceptually
|
|
38
|
+
* accurate color measurement system that can also accurately render what colors
|
|
39
|
+
* will appear as in different lighting environments.
|
|
40
40
|
*/
|
|
41
41
|
export class Hct {
|
|
42
|
-
/**
|
|
43
|
-
* @param hue 0 <= hue < 360; invalid values are corrected.
|
|
44
|
-
* @param chroma 0 <= chroma < ?; Informally, colorfulness. The color
|
|
45
|
-
* returned may be lower than the requested chroma. Chroma has a different
|
|
46
|
-
* maximum for any given hue and tone.
|
|
47
|
-
* @param tone 0 <= tone <= 100; invalid values are corrected.
|
|
48
|
-
* @return HCT representation of a color in default viewing conditions.
|
|
42
|
+
/**
|
|
43
|
+
* @param hue 0 <= hue < 360; invalid values are corrected.
|
|
44
|
+
* @param chroma 0 <= chroma < ?; Informally, colorfulness. The color
|
|
45
|
+
* returned may be lower than the requested chroma. Chroma has a different
|
|
46
|
+
* maximum for any given hue and tone.
|
|
47
|
+
* @param tone 0 <= tone <= 100; invalid values are corrected.
|
|
48
|
+
* @return HCT representation of a color in default viewing conditions.
|
|
49
49
|
*/
|
|
50
50
|
|
|
51
51
|
static from(hue, chroma, tone) {
|
|
52
52
|
return new Hct(HctSolver.solveToInt(hue, chroma, tone));
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
/**
|
|
56
|
-
* @param argb ARGB representation of a color.
|
|
57
|
-
* @return HCT representation of a color in default viewing conditions
|
|
55
|
+
/**
|
|
56
|
+
* @param argb ARGB representation of a color.
|
|
57
|
+
* @return HCT representation of a color in default viewing conditions
|
|
58
58
|
*/
|
|
59
59
|
static fromInt(argb) {
|
|
60
60
|
return new Hct(argb);
|
|
@@ -63,18 +63,18 @@ export class Hct {
|
|
|
63
63
|
return this.argb;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
/**
|
|
67
|
-
* A number, in degrees, representing ex. red, orange, yellow, etc.
|
|
68
|
-
* Ranges from 0 <= hue < 360.
|
|
66
|
+
/**
|
|
67
|
+
* A number, in degrees, representing ex. red, orange, yellow, etc.
|
|
68
|
+
* Ranges from 0 <= hue < 360.
|
|
69
69
|
*/
|
|
70
70
|
get hue() {
|
|
71
71
|
return this.internalHue;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
/**
|
|
75
|
-
* @param newHue 0 <= newHue < 360; invalid values are corrected.
|
|
76
|
-
* Chroma may decrease because chroma has a different maximum for any given
|
|
77
|
-
* hue and tone.
|
|
74
|
+
/**
|
|
75
|
+
* @param newHue 0 <= newHue < 360; invalid values are corrected.
|
|
76
|
+
* Chroma may decrease because chroma has a different maximum for any given
|
|
77
|
+
* hue and tone.
|
|
78
78
|
*/
|
|
79
79
|
set hue(newHue) {
|
|
80
80
|
this.setInternalState(HctSolver.solveToInt(newHue, this.internalChroma, this.internalTone));
|
|
@@ -83,10 +83,10 @@ export class Hct {
|
|
|
83
83
|
return this.internalChroma;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
/**
|
|
87
|
-
* @param newChroma 0 <= newChroma < ?
|
|
88
|
-
* Chroma may decrease because chroma has a different maximum for any given
|
|
89
|
-
* hue and tone.
|
|
86
|
+
/**
|
|
87
|
+
* @param newChroma 0 <= newChroma < ?
|
|
88
|
+
* Chroma may decrease because chroma has a different maximum for any given
|
|
89
|
+
* hue and tone.
|
|
90
90
|
*/
|
|
91
91
|
set chroma(newChroma) {
|
|
92
92
|
this.setInternalState(HctSolver.solveToInt(this.internalHue, newChroma, this.internalTone));
|
|
@@ -97,10 +97,10 @@ export class Hct {
|
|
|
97
97
|
return this.internalTone;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
/**
|
|
101
|
-
* @param newTone 0 <= newTone <= 100; invalid valids are corrected.
|
|
102
|
-
* Chroma may decrease because chroma has a different maximum for any given
|
|
103
|
-
* hue and tone.
|
|
100
|
+
/**
|
|
101
|
+
* @param newTone 0 <= newTone <= 100; invalid valids are corrected.
|
|
102
|
+
* Chroma may decrease because chroma has a different maximum for any given
|
|
103
|
+
* hue and tone.
|
|
104
104
|
*/
|
|
105
105
|
set tone(newTone) {
|
|
106
106
|
this.setInternalState(HctSolver.solveToInt(this.internalHue, this.internalChroma, newTone));
|
|
@@ -121,19 +121,19 @@ export class Hct {
|
|
|
121
121
|
this.argb = argb;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
/**
|
|
125
|
-
* Translates a color into different [ViewingConditions].
|
|
126
|
-
*
|
|
127
|
-
* Colors change appearance. They look different with lights on versus off,
|
|
128
|
-
* the same color, as in hex code, on white looks different when on black.
|
|
129
|
-
* This is called color relativity, most famously explicated by Josef Albers
|
|
130
|
-
* in Interaction of Color.
|
|
131
|
-
*
|
|
132
|
-
* In color science, color appearance models can account for this and
|
|
133
|
-
* calculate the appearance of a color in different settings. HCT is based on
|
|
134
|
-
* CAM16, a color appearance model, and uses it to make these calculations.
|
|
135
|
-
*
|
|
136
|
-
* See [ViewingConditions.make] for parameters affecting color appearance.
|
|
124
|
+
/**
|
|
125
|
+
* Translates a color into different [ViewingConditions].
|
|
126
|
+
*
|
|
127
|
+
* Colors change appearance. They look different with lights on versus off,
|
|
128
|
+
* the same color, as in hex code, on white looks different when on black.
|
|
129
|
+
* This is called color relativity, most famously explicated by Josef Albers
|
|
130
|
+
* in Interaction of Color.
|
|
131
|
+
*
|
|
132
|
+
* In color science, color appearance models can account for this and
|
|
133
|
+
* calculate the appearance of a color in different settings. HCT is based on
|
|
134
|
+
* CAM16, a color appearance model, and uses it to make these calculations.
|
|
135
|
+
*
|
|
136
|
+
* See [ViewingConditions.make] for parameters affecting color appearance.
|
|
137
137
|
*/
|
|
138
138
|
inViewingConditions(vc) {
|
|
139
139
|
// 1. Use CAM16 to find XYZ coordinates of color in specified VC.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hct.js","names":["Cam16","HctSolver","ViewingConditions","lstarFromArgb","lstarFromY","Hct","from","hue","chroma","tone","solveToInt","fromInt","argb","toInt","internalHue","newHue","setInternalState","internalChroma","internalTone","newChroma","newTone","constructor","cam","inViewingConditions","vc","viewedInVc","xyzInViewingConditions","recastInVc","fromXyzInViewingConditions","make","recastHct"],"sources":["../../../../src/util/color/hct/hct.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * A color system built using CAM16 hue and chroma, and L* from\n * L*a*b*.\n *\n * Using L* creates a link between the color system, contrast, and thus\n * accessibility. Contrast ratio depends on relative luminance, or Y in the XYZ\n * color space. L*, or perceptual luminance can be calculated from Y.\n *\n * Unlike Y, L* is linear to human perception, allowing trivial creation of\n * accurate color tones.\n *\n * Unlike contrast ratio, measuring contrast in L* is linear, and simple to\n * calculate. A difference of 40 in HCT tone guarantees a contrast ratio >= 3.0,\n * and a difference of 50 guarantees a contrast ratio >= 4.5.\n */\nimport { Cam16 } from './cam16';\nimport { HctSolver } from './hct-solver';\nimport { ViewingConditions } from './viewing-conditions';\nimport { lstarFromArgb, lstarFromY } from
|
|
1
|
+
{"version":3,"file":"hct.js","names":["Cam16","HctSolver","ViewingConditions","lstarFromArgb","lstarFromY","Hct","from","hue","chroma","tone","solveToInt","fromInt","argb","toInt","internalHue","newHue","setInternalState","internalChroma","internalTone","newChroma","newTone","constructor","cam","inViewingConditions","vc","viewedInVc","xyzInViewingConditions","recastInVc","fromXyzInViewingConditions","make","recastHct"],"sources":["../../../../src/util/color/hct/hct.ts"],"sourcesContent":["/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n/**\r\n * A color system built using CAM16 hue and chroma, and L* from\r\n * L*a*b*.\r\n *\r\n * Using L* creates a link between the color system, contrast, and thus\r\n * accessibility. Contrast ratio depends on relative luminance, or Y in the XYZ\r\n * color space. L*, or perceptual luminance can be calculated from Y.\r\n *\r\n * Unlike Y, L* is linear to human perception, allowing trivial creation of\r\n * accurate color tones.\r\n *\r\n * Unlike contrast ratio, measuring contrast in L* is linear, and simple to\r\n * calculate. A difference of 40 in HCT tone guarantees a contrast ratio >= 3.0,\r\n * and a difference of 50 guarantees a contrast ratio >= 4.5.\r\n */\r\nimport { Cam16 } from './cam16';\r\nimport { HctSolver } from './hct-solver';\r\nimport { ViewingConditions } from './viewing-conditions';\r\nimport { lstarFromArgb, lstarFromY } from '../conversion';\r\n\r\n/**\r\n * HCT, hue, chroma, and tone. A color system that provides a perceptually\r\n * accurate color measurement system that can also accurately render what colors\r\n * will appear as in different lighting environments.\r\n */\r\nexport class Hct {\r\n /**\r\n * @param hue 0 <= hue < 360; invalid values are corrected.\r\n * @param chroma 0 <= chroma < ?; Informally, colorfulness. The color\r\n * returned may be lower than the requested chroma. Chroma has a different\r\n * maximum for any given hue and tone.\r\n * @param tone 0 <= tone <= 100; invalid values are corrected.\r\n * @return HCT representation of a color in default viewing conditions.\r\n */\r\n\r\n internalHue: number;\r\n internalChroma: number;\r\n internalTone: number;\r\n\r\n static from(hue: number, chroma: number, tone: number) {\r\n return new Hct(HctSolver.solveToInt(hue, chroma, tone));\r\n }\r\n\r\n /**\r\n * @param argb ARGB representation of a color.\r\n * @return HCT representation of a color in default viewing conditions\r\n */\r\n static fromInt(argb: number) {\r\n return new Hct(argb);\r\n }\r\n\r\n toInt(): number {\r\n return this.argb;\r\n }\r\n\r\n /**\r\n * A number, in degrees, representing ex. red, orange, yellow, etc.\r\n * Ranges from 0 <= hue < 360.\r\n */\r\n get hue(): number {\r\n return this.internalHue;\r\n }\r\n\r\n /**\r\n * @param newHue 0 <= newHue < 360; invalid values are corrected.\r\n * Chroma may decrease because chroma has a different maximum for any given\r\n * hue and tone.\r\n */\r\n set hue(newHue: number) {\r\n this.setInternalState(\r\n HctSolver.solveToInt(newHue, this.internalChroma, this.internalTone),\r\n );\r\n }\r\n\r\n get chroma(): number {\r\n return this.internalChroma;\r\n }\r\n\r\n /**\r\n * @param newChroma 0 <= newChroma < ?\r\n * Chroma may decrease because chroma has a different maximum for any given\r\n * hue and tone.\r\n */\r\n set chroma(newChroma: number) {\r\n this.setInternalState(\r\n HctSolver.solveToInt(this.internalHue, newChroma, this.internalTone),\r\n );\r\n }\r\n\r\n /** Lightness. Ranges from 0 to 100. */\r\n get tone(): number {\r\n return this.internalTone;\r\n }\r\n\r\n /**\r\n * @param newTone 0 <= newTone <= 100; invalid valids are corrected.\r\n * Chroma may decrease because chroma has a different maximum for any given\r\n * hue and tone.\r\n */\r\n set tone(newTone: number) {\r\n this.setInternalState(\r\n HctSolver.solveToInt(this.internalHue, this.internalChroma, newTone),\r\n );\r\n }\r\n\r\n private constructor(private argb: number) {\r\n const cam = Cam16.fromInt(argb);\r\n this.internalHue = cam.hue;\r\n this.internalChroma = cam.chroma;\r\n this.internalTone = lstarFromArgb(argb);\r\n this.argb = argb;\r\n }\r\n\r\n private setInternalState(argb: number) {\r\n const cam = Cam16.fromInt(argb);\r\n this.internalHue = cam.hue;\r\n this.internalChroma = cam.chroma;\r\n this.internalTone = lstarFromArgb(argb);\r\n this.argb = argb;\r\n }\r\n\r\n /**\r\n * Translates a color into different [ViewingConditions].\r\n *\r\n * Colors change appearance. They look different with lights on versus off,\r\n * the same color, as in hex code, on white looks different when on black.\r\n * This is called color relativity, most famously explicated by Josef Albers\r\n * in Interaction of Color.\r\n *\r\n * In color science, color appearance models can account for this and\r\n * calculate the appearance of a color in different settings. HCT is based on\r\n * CAM16, a color appearance model, and uses it to make these calculations.\r\n *\r\n * See [ViewingConditions.make] for parameters affecting color appearance.\r\n */\r\n inViewingConditions(vc: ViewingConditions): Hct {\r\n // 1. Use CAM16 to find XYZ coordinates of color in specified VC.\r\n const cam = Cam16.fromInt(this.toInt());\r\n const viewedInVc = cam.xyzInViewingConditions(vc);\r\n\r\n // 2. Create CAM16 of those XYZ coordinates in default VC.\r\n const recastInVc = Cam16.fromXyzInViewingConditions(\r\n viewedInVc[0],\r\n viewedInVc[1],\r\n viewedInVc[2],\r\n ViewingConditions.make(),\r\n );\r\n\r\n // 3. Create HCT from:\r\n // - CAM16 using default VC with XYZ coordinates in specified VC.\r\n // - L* converted from Y in XYZ coordinates in specified VC.\r\n const recastHct = Hct.from(\r\n recastInVc.hue,\r\n recastInVc.chroma,\r\n lstarFromY(viewedInVc[1]),\r\n );\r\n return recastHct;\r\n }\r\n}\r\n"],"mappings":"AAAA;AACA;AACA;A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,EACbA,UAAU,CAAC,CAAC,CAAC,EACbA,UAAU,CAAC,CAAC,CAAC,EACbvB,iBAAiB,CAAC2B,IAAI,CAAC,CACzB,CAAC;;IAED;IACA;IACA;IACA,MAAMC,SAAS,GAAGzB,GAAG,CAACC,IAAI,CACxBqB,UAAU,CAACpB,GAAG,EACdoB,UAAU,CAACnB,MAAM,EACjBJ,UAAU,CAACqB,UAAU,CAAC,CAAC,CAAC,CAC1B,CAAC;IACD,OAAOK,SAAS;EAClB;AACF","ignoreList":[]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
function
|
|
3
|
-
function
|
|
1
|
+
var _ViewingConditions;
|
|
2
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
4
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
5
|
/**
|
|
5
6
|
* @license
|
|
6
7
|
* Copyright 2021 Google LLC
|
|
@@ -105,6 +106,7 @@ export class ViewingConditions {
|
|
|
105
106
|
this.z = z;
|
|
106
107
|
}
|
|
107
108
|
}
|
|
109
|
+
_ViewingConditions = ViewingConditions;
|
|
108
110
|
/** sRGB-like viewing conditions. */
|
|
109
|
-
_defineProperty(ViewingConditions, "DEFAULT",
|
|
111
|
+
_defineProperty(ViewingConditions, "DEFAULT", _ViewingConditions.make());
|
|
110
112
|
//# sourceMappingURL=viewing-conditions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewing-conditions.js","names":["whitePointD65","yFromLstar","math","ViewingConditions","make","whitePoint","arguments","length","undefined","adaptingLuminance","Math","PI","backgroundLstar","surround","discountingIlluminant","xyz","rW","gW","bW","f","c","lerp","d","exp","nc","rgbD","k","k4","k4F","fl","cbrt","n","z","sqrt","nbb","pow","ncb","rgbAFactors","rgbA","aw","constructor","fLRoot","_defineProperty"],"sources":["../../../../src/util/color/hct/viewing-conditions.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { whitePointD65, yFromLstar } from '../conversion';\nimport * as math from '../utils/math-utils';\n\n/**\n * In traditional color spaces, a color can be identified solely by the\n * observer's measurement of the color. Color appearance models such as CAM16\n * also use information about the environment where the color was\n * observed, known as the viewing conditions.\n *\n * For example, white under the traditional assumption of a midday sun white\n * point is accurately measured as a slightly chromatic blue by CAM16. (roughly,\n * hue 203, chroma 3, lightness 100)\n *\n * This class caches intermediate values of the CAM16 conversion process that\n * depend only on viewing conditions, enabling speed ups.\n */\nexport class ViewingConditions {\n /** sRGB-like viewing conditions. */\n static DEFAULT = ViewingConditions.make();\n\n /**\n * Create ViewingConditions from a simple, physically relevant, set of\n * parameters.\n *\n * @param whitePoint White point, measured in the XYZ color space.\n * default = D65, or sunny day afternoon\n * @param adaptingLuminance The luminance of the adapting field. Informally,\n * how bright it is in the room where the color is viewed. Can be\n * calculated from lux by multiplying lux by 0.0586. default = 11.72,\n * or 200 lux.\n * @param backgroundLstar The lightness of the area surrounding the color.\n * measured by L* in L*a*b*. default = 50.0\n * @param surround A general description of the lighting surrounding the\n * color. 0 is pitch dark, like watching a movie in a theater. 1.0 is a\n * dimly light room, like watching TV at home at night. 2.0 means there\n * is no difference between the lighting on the color and around it.\n * default = 2.0\n * @param discountingIlluminant Whether the eye accounts for the tint of the\n * ambient lighting, such as knowing an apple is still red in green light.\n * default = false, the eye does not perform this process on\n * self-luminous objects like displays.\n */\n static make(\n whitePoint = whitePointD65(),\n adaptingLuminance = ((200.0 / Math.PI) * yFromLstar(50.0)) / 100.0,\n backgroundLstar = 50.0,\n surround = 2.0,\n discountingIlluminant = false,\n ): ViewingConditions {\n const xyz = whitePoint;\n const rW = xyz[0] * 0.401288 + xyz[1] * 0.650173 + xyz[2] * -0.051461;\n const gW = xyz[0] * -0.250268 + xyz[1] * 1.204414 + xyz[2] * 0.045854;\n const bW = xyz[0] * -0.002079 + xyz[1] * 0.048952 + xyz[2] * 0.953127;\n const f = 0.8 + surround / 10.0;\n const c =\n f >= 0.9\n ? math.lerp(0.59, 0.69, (f - 0.9) * 10.0)\n : math.lerp(0.525, 0.59, (f - 0.8) * 10.0);\n let d = discountingIlluminant\n ? 1.0\n : f * (1.0 - (1.0 / 3.6) * Math.exp((-adaptingLuminance - 42.0) / 92.0));\n d = d > 1.0 ? 1.0 : d < 0.0 ? 0.0 : d;\n const nc = f;\n const rgbD = [\n d * (100.0 / rW) + 1.0 - d,\n d * (100.0 / gW) + 1.0 - d,\n d * (100.0 / bW) + 1.0 - d,\n ];\n const k = 1.0 / (5.0 * adaptingLuminance + 1.0);\n const k4 = k * k * k * k;\n const k4F = 1.0 - k4;\n const fl =\n k4 * adaptingLuminance +\n 0.1 * k4F * k4F * Math.cbrt(5.0 * adaptingLuminance);\n const n = yFromLstar(backgroundLstar) / whitePoint[1];\n const z = 1.48 + Math.sqrt(n);\n const nbb = 0.725 / Math.pow(n, 0.2);\n const ncb = nbb;\n const rgbAFactors = [\n Math.pow((fl * rgbD[0] * rW) / 100.0, 0.42),\n Math.pow((fl * rgbD[1] * gW) / 100.0, 0.42),\n Math.pow((fl * rgbD[2] * bW) / 100.0, 0.42),\n ];\n const rgbA = [\n (400.0 * rgbAFactors[0]) / (rgbAFactors[0] + 27.13),\n (400.0 * rgbAFactors[1]) / (rgbAFactors[1] + 27.13),\n (400.0 * rgbAFactors[2]) / (rgbAFactors[2] + 27.13),\n ];\n const aw = (2.0 * rgbA[0] + rgbA[1] + 0.05 * rgbA[2]) * nbb;\n return new ViewingConditions(\n n,\n aw,\n nbb,\n ncb,\n c,\n nc,\n rgbD,\n fl,\n Math.pow(fl, 0.25),\n z,\n );\n }\n\n /**\n * Parameters are intermediate values of the CAM16 conversion process. Their\n * names are shorthand for technical color science terminology, this class\n * would not benefit from documenting them individually. A brief overview\n * is available in the CAM16 specification, and a complete overview requires\n * a color science textbook, such as Fairchild's Color Appearance Models.\n */\n private constructor(\n public n: number,\n public aw: number,\n public nbb: number,\n public ncb: number,\n public c: number,\n public nc: number,\n public rgbD: number[],\n public fl: number,\n public fLRoot: number,\n public z: number,\n ) {}\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"viewing-conditions.js","names":["whitePointD65","yFromLstar","math","ViewingConditions","make","whitePoint","arguments","length","undefined","adaptingLuminance","Math","PI","backgroundLstar","surround","discountingIlluminant","xyz","rW","gW","bW","f","c","lerp","d","exp","nc","rgbD","k","k4","k4F","fl","cbrt","n","z","sqrt","nbb","pow","ncb","rgbAFactors","rgbA","aw","constructor","fLRoot","_ViewingConditions","_defineProperty"],"sources":["../../../../src/util/color/hct/viewing-conditions.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { whitePointD65, yFromLstar } from '../conversion';\nimport * as math from '../utils/math-utils';\n\n/**\n * In traditional color spaces, a color can be identified solely by the\n * observer's measurement of the color. Color appearance models such as CAM16\n * also use information about the environment where the color was\n * observed, known as the viewing conditions.\n *\n * For example, white under the traditional assumption of a midday sun white\n * point is accurately measured as a slightly chromatic blue by CAM16. (roughly,\n * hue 203, chroma 3, lightness 100)\n *\n * This class caches intermediate values of the CAM16 conversion process that\n * depend only on viewing conditions, enabling speed ups.\n */\nexport class ViewingConditions {\n /** sRGB-like viewing conditions. */\n static DEFAULT = ViewingConditions.make();\n\n /**\n * Create ViewingConditions from a simple, physically relevant, set of\n * parameters.\n *\n * @param whitePoint White point, measured in the XYZ color space.\n * default = D65, or sunny day afternoon\n * @param adaptingLuminance The luminance of the adapting field. Informally,\n * how bright it is in the room where the color is viewed. Can be\n * calculated from lux by multiplying lux by 0.0586. default = 11.72,\n * or 200 lux.\n * @param backgroundLstar The lightness of the area surrounding the color.\n * measured by L* in L*a*b*. default = 50.0\n * @param surround A general description of the lighting surrounding the\n * color. 0 is pitch dark, like watching a movie in a theater. 1.0 is a\n * dimly light room, like watching TV at home at night. 2.0 means there\n * is no difference between the lighting on the color and around it.\n * default = 2.0\n * @param discountingIlluminant Whether the eye accounts for the tint of the\n * ambient lighting, such as knowing an apple is still red in green light.\n * default = false, the eye does not perform this process on\n * self-luminous objects like displays.\n */\n static make(\n whitePoint = whitePointD65(),\n adaptingLuminance = ((200.0 / Math.PI) * yFromLstar(50.0)) / 100.0,\n backgroundLstar = 50.0,\n surround = 2.0,\n discountingIlluminant = false,\n ): ViewingConditions {\n const xyz = whitePoint;\n const rW = xyz[0] * 0.401288 + xyz[1] * 0.650173 + xyz[2] * -0.051461;\n const gW = xyz[0] * -0.250268 + xyz[1] * 1.204414 + xyz[2] * 0.045854;\n const bW = xyz[0] * -0.002079 + xyz[1] * 0.048952 + xyz[2] * 0.953127;\n const f = 0.8 + surround / 10.0;\n const c =\n f >= 0.9\n ? math.lerp(0.59, 0.69, (f - 0.9) * 10.0)\n : math.lerp(0.525, 0.59, (f - 0.8) * 10.0);\n let d = discountingIlluminant\n ? 1.0\n : f * (1.0 - (1.0 / 3.6) * Math.exp((-adaptingLuminance - 42.0) / 92.0));\n d = d > 1.0 ? 1.0 : d < 0.0 ? 0.0 : d;\n const nc = f;\n const rgbD = [\n d * (100.0 / rW) + 1.0 - d,\n d * (100.0 / gW) + 1.0 - d,\n d * (100.0 / bW) + 1.0 - d,\n ];\n const k = 1.0 / (5.0 * adaptingLuminance + 1.0);\n const k4 = k * k * k * k;\n const k4F = 1.0 - k4;\n const fl =\n k4 * adaptingLuminance +\n 0.1 * k4F * k4F * Math.cbrt(5.0 * adaptingLuminance);\n const n = yFromLstar(backgroundLstar) / whitePoint[1];\n const z = 1.48 + Math.sqrt(n);\n const nbb = 0.725 / Math.pow(n, 0.2);\n const ncb = nbb;\n const rgbAFactors = [\n Math.pow((fl * rgbD[0] * rW) / 100.0, 0.42),\n Math.pow((fl * rgbD[1] * gW) / 100.0, 0.42),\n Math.pow((fl * rgbD[2] * bW) / 100.0, 0.42),\n ];\n const rgbA = [\n (400.0 * rgbAFactors[0]) / (rgbAFactors[0] + 27.13),\n (400.0 * rgbAFactors[1]) / (rgbAFactors[1] + 27.13),\n (400.0 * rgbAFactors[2]) / (rgbAFactors[2] + 27.13),\n ];\n const aw = (2.0 * rgbA[0] + rgbA[1] + 0.05 * rgbA[2]) * nbb;\n return new ViewingConditions(\n n,\n aw,\n nbb,\n ncb,\n c,\n nc,\n rgbD,\n fl,\n Math.pow(fl, 0.25),\n z,\n );\n }\n\n /**\n * Parameters are intermediate values of the CAM16 conversion process. Their\n * names are shorthand for technical color science terminology, this class\n * would not benefit from documenting them individually. A brief overview\n * is available in the CAM16 specification, and a complete overview requires\n * a color science textbook, such as Fairchild's Color Appearance Models.\n */\n private constructor(\n public n: number,\n public aw: number,\n public nbb: number,\n public ncb: number,\n public c: number,\n public nc: number,\n public rgbD: number[],\n public fl: number,\n public fLRoot: number,\n public z: number,\n ) {}\n}\n"],"mappings":";;;;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C,CAAC,CAAC,GAAGA,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,GAAGA,IAAI,CAAC,CAAC,CAAC,IAAIJ,GAAG;IAC3D,OAAO,IAAI/B,iBAAiB,CAC1B4B,CAAC,EACDQ,EAAE,EACFL,GAAG,EACHE,GAAG,EACHhB,CAAC,EACDI,EAAE,EACFC,IAAI,EACJI,EAAE,EACFnB,IAAI,CAACyB,GAAG,CAACN,EAAE,EAAE,IAAI,CAAC,EAClBG,CACF,CAAC;EACH;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACUQ,WAAWA,CACVT,CAAS,EACTQ,EAAU,EACVL,GAAW,EACXE,GAAW,EACXhB,CAAS,EACTI,EAAU,EACVC,IAAc,EACdI,EAAU,EACVY,MAAc,EACdT,CAAS,EAChB;IAAA,KAVOD,CAAS,GAATA,CAAS;IAAA,KACTQ,EAAU,GAAVA,EAAU;IAAA,KACVL,GAAW,GAAXA,GAAW;IAAA,KACXE,GAAW,GAAXA,GAAW;IAAA,KACXhB,CAAS,GAATA,CAAS;IAAA,KACTI,EAAU,GAAVA,EAAU;IAAA,KACVC,IAAc,GAAdA,IAAc;IAAA,KACdI,EAAU,GAAVA,EAAU;IAAA,KACVY,MAAc,GAAdA,MAAc;IAAA,KACdT,CAAS,GAATA,CAAS;EACf;AACL;AAACU,kBAAA,GA1GYvC,iBAAiB;AAC5B;AAAAwC,eAAA,CADWxC,iBAAiB,aAEXA,kBAAiB,CAACC,IAAI,CAAC,CAAC","ignoreList":[]}
|
package/lib/util/color/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* yuyeon
|
|
3
|
-
* Apache-2.0 license (Copyright 2023 yeonyew)
|
|
4
|
-
*
|
|
5
|
-
* Used Libs
|
|
6
|
-
* - material-color-utilities
|
|
7
|
-
* Apache-2.0 license (Copyright 2021 Google LLC)
|
|
8
|
-
* https://github.com/material-foundation/material-color-utilities
|
|
9
|
-
*
|
|
10
|
-
* - Vuetify
|
|
11
|
-
* MIT license (Copyright (c) 2016-2023 John Jeremy Leider)
|
|
12
|
-
* https://github.com/vuetifyjs/vuetify
|
|
13
|
-
* */
|
|
2
|
+
* yuyeon
|
|
3
|
+
* Apache-2.0 license (Copyright 2023 yeonyew)
|
|
4
|
+
*
|
|
5
|
+
* Used Libs
|
|
6
|
+
* - material-color-utilities
|
|
7
|
+
* Apache-2.0 license (Copyright 2021 Google LLC)
|
|
8
|
+
* https://github.com/material-foundation/material-color-utilities
|
|
9
|
+
*
|
|
10
|
+
* - Vuetify
|
|
11
|
+
* MIT license (Copyright (c) 2016-2023 John Jeremy Leider)
|
|
12
|
+
* https://github.com/vuetifyjs/vuetify
|
|
13
|
+
* */
|
|
14
14
|
import { HEX_COLOR_REGEX, RGBA_REGEX } from "./const.js";
|
|
15
15
|
import { rgbFromHex } from "./conversion.js";
|
|
16
16
|
export function isColorValue(value) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["HEX_COLOR_REGEX","RGBA_REGEX","rgbFromHex","isColorValue","value","test","colorRgb","color","startsWith","join","exec","valueArray","trim","split","splice","isTextColorIsLight","r","g","b","luminance"],"sources":["../../../src/util/color/index.ts"],"sourcesContent":["/*\r\n* yuyeon\r\n* Apache-2.0 license (Copyright 2023 yeonyew)\r\n*\r\n* Used Libs\r\n* - material-color-utilities\r\n* Apache-2.0 license (Copyright 2021 Google LLC)\r\n* https://github.com/material-foundation/material-color-utilities\r\n*\r\n* - Vuetify\r\n* MIT license (Copyright (c) 2016-2023 John Jeremy Leider)\r\n* https://github.com/vuetifyjs/vuetify\r\n* */\r\n\r\nimport { HEX_COLOR_REGEX, RGBA_REGEX } from
|
|
1
|
+
{"version":3,"file":"index.js","names":["HEX_COLOR_REGEX","RGBA_REGEX","rgbFromHex","isColorValue","value","test","colorRgb","color","startsWith","join","exec","valueArray","trim","split","splice","isTextColorIsLight","r","g","b","luminance"],"sources":["../../../src/util/color/index.ts"],"sourcesContent":["/*\r\n * yuyeon\r\n * Apache-2.0 license (Copyright 2023 yeonyew)\r\n *\r\n * Used Libs\r\n * - material-color-utilities\r\n * Apache-2.0 license (Copyright 2021 Google LLC)\r\n * https://github.com/material-foundation/material-color-utilities\r\n *\r\n * - Vuetify\r\n * MIT license (Copyright (c) 2016-2023 John Jeremy Leider)\r\n * https://github.com/vuetifyjs/vuetify\r\n * */\r\n\r\nimport { HEX_COLOR_REGEX, RGBA_REGEX } from './const';\r\nimport { rgbFromHex } from './conversion';\r\n\r\nexport function isColorValue(value: string): boolean {\r\n return RGBA_REGEX.test(value) || HEX_COLOR_REGEX.test(value);\r\n}\r\n\r\nexport function colorRgb(color: string): string {\r\n if (color?.startsWith('#')) {\r\n return rgbFromHex(color)?.join(',') || '';\r\n }\r\n const RGBA_REGEX = /rgb(a?)\\((?<v>.*)\\)/;\r\n if (RGBA_REGEX.test(color)) {\r\n const value = RGBA_REGEX.exec(color)?.[2] || '';\r\n if (value) {\r\n const valueArray = value.trim().split(',');\r\n valueArray.splice(3, 1);\r\n return valueArray.join(',');\r\n }\r\n }\r\n return '';\r\n}\r\n\r\nexport function isTextColorIsLight(r: number, g: number, b: number): boolean {\r\n const luminance = 1 - (0.299 * r + 0.587 * g + 0.114 * b) / 255;\r\n return luminance < 0.5;\r\n}\r\n\r\nexport * from './const';\r\nexport * from './conversion';\r\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAZA,SAcSA,eAAe,EAAEC,UAAU;AAAA,SAC3BC,UAAU;AAEnB,OAAO,SAASC,YAAYA,CAACC,KAAa,EAAW;EACnD,OAAOH,UAAU,CAACI,IAAI,CAACD,KAAK,CAAC,IAAIJ,eAAe,CAACK,IAAI,CAACD,KAAK,CAAC;AAC9D;AAEA,OAAO,SAASE,QAAQA,CAACC,KAAa,EAAU;EAC9C,IAAIA,KAAK,EAAEC,UAAU,CAAC,GAAG,CAAC,EAAE;IAC1B,OAAON,UAAU,CAACK,KAAK,CAAC,EAAEE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE;EAC3C;EACA,MAAMR,UAAU,GAAG,qBAAqB;EACxC,IAAIA,UAAU,CAACI,IAAI,CAACE,KAAK,CAAC,EAAE;IAC1B,MAAMH,KAAK,GAAGH,UAAU,CAACS,IAAI,CAACH,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE;IAC/C,IAAIH,KAAK,EAAE;MACT,MAAMO,UAAU,GAAGP,KAAK,CAACQ,IAAI,CAAC,CAAC,CAACC,KAAK,CAAC,GAAG,CAAC;MAC1CF,UAAU,CAACG,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;MACvB,OAAOH,UAAU,CAACF,IAAI,CAAC,GAAG,CAAC;IAC7B;EACF;EACA,OAAO,EAAE;AACX;AAEA,OAAO,SAASM,kBAAkBA,CAACC,CAAS,EAAEC,CAAS,EAAEC,CAAS,EAAW;EAC3E,MAAMC,SAAS,GAAG,CAAC,GAAG,CAAC,KAAK,GAAGH,CAAC,GAAG,KAAK,GAAGC,CAAC,GAAG,KAAK,GAAGC,CAAC,IAAI,GAAG;EAC/D,OAAOC,SAAS,GAAG,GAAG;AACxB;AAAC;AAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-palette.js","names":["Hct","TonalPalette","CorePalette","of","argb","contentOf","fromColors","colors","createPaletteFromColors","contentFromColors","content","palette","primary","secondary","p","a2","a1","tertiary","a3","error","neutral","n1","neutralVariant","n2","constructor","isContent","hct","fromInt","hue","chroma","fromHueAndChroma","Math","min","max"],"sources":["../../../../src/util/color/palettes/core-palette.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Hct } from '../hct/hct';\nimport { TonalPalette } from './tonal-palette';\n\n/**\n * Set of colors to generate a [CorePalette] from\n */\nexport interface CorePaletteColors {\n primary: number;\n secondary?: number;\n tertiary?: number;\n neutral?: number;\n neutralVariant?: number;\n error?: number;\n}\n\n/**\n * An intermediate concept between the key color for a UI theme, and a full\n * color scheme. 5 sets of tones are generated, all except one use the same hue\n * as the key color, and all vary in chroma.\n */\nexport class CorePalette {\n a1: TonalPalette;\n a2: TonalPalette;\n a3: TonalPalette;\n n1: TonalPalette;\n n2: TonalPalette;\n error: TonalPalette;\n\n /**\n * @param argb ARGB representation of a color\n */\n static of(argb: number): CorePalette {\n return new CorePalette(argb, false);\n }\n\n /**\n * @param argb ARGB representation of a color\n */\n static contentOf(argb: number): CorePalette {\n return new CorePalette(argb, true);\n }\n\n /**\n * Create a [CorePalette] from a set of colors\n */\n static fromColors(colors: CorePaletteColors): CorePalette {\n return CorePalette.createPaletteFromColors(false, colors);\n }\n\n /**\n * Create a content [CorePalette] from a set of colors\n */\n static contentFromColors(colors: CorePaletteColors): CorePalette {\n return CorePalette.createPaletteFromColors(true, colors);\n }\n\n private static createPaletteFromColors(\n content: boolean,\n colors: CorePaletteColors,\n ) {\n const palette = new CorePalette(colors.primary, content);\n if (colors.secondary) {\n const p = new CorePalette(colors.secondary, content);\n palette.a2 = p.a1;\n }\n if (colors.tertiary) {\n const p = new CorePalette(colors.tertiary, content);\n palette.a3 = p.a1;\n }\n if (colors.error) {\n const p = new CorePalette(colors.error, content);\n palette.error = p.a1;\n }\n if (colors.neutral) {\n const p = new CorePalette(colors.neutral, content);\n palette.n1 = p.n1;\n }\n if (colors.neutralVariant) {\n const p = new CorePalette(colors.neutralVariant, content);\n palette.n2 = p.n2;\n }\n return palette;\n }\n\n private constructor(argb: number, isContent: boolean) {\n const hct = Hct.fromInt(argb);\n const hue = hct.hue;\n const chroma = hct.chroma;\n if (isContent) {\n this.a1 = TonalPalette.fromHueAndChroma(hue, chroma);\n this.a2 = TonalPalette.fromHueAndChroma(hue, chroma / 3);\n this.a3 = TonalPalette.fromHueAndChroma(hue + 60, chroma / 2);\n this.n1 = TonalPalette.fromHueAndChroma(hue, Math.min(chroma / 12, 4));\n this.n2 = TonalPalette.fromHueAndChroma(hue, Math.min(chroma / 6, 8));\n } else {\n this.a1 = TonalPalette.fromHueAndChroma(hue, Math.max(48, chroma));\n this.a2 = TonalPalette.fromHueAndChroma(hue, 16);\n this.a3 = TonalPalette.fromHueAndChroma(hue + 60, 24);\n this.n1 = TonalPalette.fromHueAndChroma(hue, 4);\n this.n2 = TonalPalette.fromHueAndChroma(hue, 8);\n }\n this.error = TonalPalette.fromHueAndChroma(25, 84);\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAfA,SAgBSA,GAAG;AAAA,SACHC,YAAY;AAErB;AACA;AACA;AAUA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,WAAW,CAAC;EAQvB;AACF;AACA;EACE,OAAOC,EAAEA,CAACC,IAAY,EAAe;IACnC,OAAO,IAAIF,WAAW,CAACE,IAAI,EAAE,KAAK,CAAC;EACrC;;EAEA;AACF;AACA;EACE,OAAOC,SAASA,CAACD,IAAY,EAAe;IAC1C,OAAO,IAAIF,WAAW,CAACE,IAAI,EAAE,IAAI,CAAC;EACpC;;EAEA;AACF;AACA;EACE,OAAOE,UAAUA,CAACC,MAAyB,EAAe;IACxD,OAAOL,WAAW,CAACM,uBAAuB,CAAC,KAAK,EAAED,MAAM,CAAC;EAC3D;;EAEA;AACF;AACA;EACE,OAAOE,iBAAiBA,CAACF,MAAyB,EAAe;IAC/D,OAAOL,WAAW,CAACM,uBAAuB,CAAC,IAAI,EAAED,MAAM,CAAC;EAC1D;EAEA,OAAeC,uB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file":"core-palette.js","names":["Hct","TonalPalette","CorePalette","of","argb","contentOf","fromColors","colors","createPaletteFromColors","contentFromColors","content","palette","primary","secondary","p","a2","a1","tertiary","a3","error","neutral","n1","neutralVariant","n2","constructor","isContent","hct","fromInt","hue","chroma","fromHueAndChroma","Math","min","max"],"sources":["../../../../src/util/color/palettes/core-palette.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Hct } from '../hct/hct';\nimport { TonalPalette } from './tonal-palette';\n\n/**\n * Set of colors to generate a [CorePalette] from\n */\nexport interface CorePaletteColors {\n primary: number;\n secondary?: number;\n tertiary?: number;\n neutral?: number;\n neutralVariant?: number;\n error?: number;\n}\n\n/**\n * An intermediate concept between the key color for a UI theme, and a full\n * color scheme. 5 sets of tones are generated, all except one use the same hue\n * as the key color, and all vary in chroma.\n */\nexport class CorePalette {\n a1: TonalPalette;\n a2: TonalPalette;\n a3: TonalPalette;\n n1: TonalPalette;\n n2: TonalPalette;\n error: TonalPalette;\n\n /**\n * @param argb ARGB representation of a color\n */\n static of(argb: number): CorePalette {\n return new CorePalette(argb, false);\n }\n\n /**\n * @param argb ARGB representation of a color\n */\n static contentOf(argb: number): CorePalette {\n return new CorePalette(argb, true);\n }\n\n /**\n * Create a [CorePalette] from a set of colors\n */\n static fromColors(colors: CorePaletteColors): CorePalette {\n return CorePalette.createPaletteFromColors(false, colors);\n }\n\n /**\n * Create a content [CorePalette] from a set of colors\n */\n static contentFromColors(colors: CorePaletteColors): CorePalette {\n return CorePalette.createPaletteFromColors(true, colors);\n }\n\n private static createPaletteFromColors(\n content: boolean,\n colors: CorePaletteColors,\n ) {\n const palette = new CorePalette(colors.primary, content);\n if (colors.secondary) {\n const p = new CorePalette(colors.secondary, content);\n palette.a2 = p.a1;\n }\n if (colors.tertiary) {\n const p = new CorePalette(colors.tertiary, content);\n palette.a3 = p.a1;\n }\n if (colors.error) {\n const p = new CorePalette(colors.error, content);\n palette.error = p.a1;\n }\n if (colors.neutral) {\n const p = new CorePalette(colors.neutral, content);\n palette.n1 = p.n1;\n }\n if (colors.neutralVariant) {\n const p = new CorePalette(colors.neutralVariant, content);\n palette.n2 = p.n2;\n }\n return palette;\n }\n\n private constructor(argb: number, isContent: boolean) {\n const hct = Hct.fromInt(argb);\n const hue = hct.hue;\n const chroma = hct.chroma;\n if (isContent) {\n this.a1 = TonalPalette.fromHueAndChroma(hue, chroma);\n this.a2 = TonalPalette.fromHueAndChroma(hue, chroma / 3);\n this.a3 = TonalPalette.fromHueAndChroma(hue + 60, chroma / 2);\n this.n1 = TonalPalette.fromHueAndChroma(hue, Math.min(chroma / 12, 4));\n this.n2 = TonalPalette.fromHueAndChroma(hue, Math.min(chroma / 6, 8));\n } else {\n this.a1 = TonalPalette.fromHueAndChroma(hue, Math.max(48, chroma));\n this.a2 = TonalPalette.fromHueAndChroma(hue, 16);\n this.a3 = TonalPalette.fromHueAndChroma(hue + 60, 24);\n this.n1 = TonalPalette.fromHueAndChroma(hue, 4);\n this.n2 = TonalPalette.fromHueAndChroma(hue, 8);\n }\n this.error = TonalPalette.fromHueAndChroma(25, 84);\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAfA,SAgBSA,GAAG;AAAA,SACHC,YAAY;AAErB;AACA;AACA;AAUA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,WAAW,CAAC;EAQvB;AACF;AACA;EACE,OAAOC,EAAEA,CAACC,IAAY,EAAe;IACnC,OAAO,IAAIF,WAAW,CA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ACF,GAAG,EAAE,EAAE,CAAC;MAChD,IAAI,CAACV,EAAE,GAAGjB,YAAY,CAAC6B,gBAAgB,CAACF,GAAG,GAAG,EAAE,EAAE,EAAE,CAAC;MACrD,IAAI,CAACP,EAAE,GAAGpB,YAAY,CAAC6B,gBAAgB,CAACF,GAAG,EAAE,CAAC,CAAC;MAC/C,IAAI,CAACL,EAAE,GAAGtB,YAAY,CAAC6B,gBAAgB,CAACF,GAAG,EAAE,CAAC,CAAC;IACjD;IACA,IAAI,CAACT,KAAK,GAAGlB,YAAY,CAAC6B,gBAAgB,CAAC,EAAE,EAAE,EAAE,CAAC;EACpD;AACF","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
function _defineProperty(
|
|
2
|
-
function _toPropertyKey(
|
|
3
|
-
function _toPrimitive(
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
4
|
/**
|
|
5
5
|
* @license
|
|
6
6
|
* Copyright 2021 Google LLC
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tonal-palette.js","names":["Hct","TonalPalette","fromInt","argb","hct","fromHct","hue","chroma","fromHueAndChroma","createKeyColor","constructor","keyColor","_defineProperty","Map","startTone","smallestDeltaHct","from","smallestDelta","Math","abs","delta","round","hctAdd","hctAddDelta","hctSubtract","hctSubtractDelta","tone","cache","get","undefined","toInt","set","getHct"],"sources":["../../../../src/util/color/palettes/tonal-palette.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Hct } from '../hct/hct';\n\n/**\n * A convenience class for retrieving colors that are constant in hue and\n * chroma, but vary in tone.\n */\nexport class TonalPalette {\n private readonly cache = new Map<number, number>();\n\n /**\n * @param argb ARGB representation of a color\n * @return Tones matching that color's hue and chroma.\n */\n static fromInt(argb: number): TonalPalette {\n const hct = Hct.fromInt(argb);\n return TonalPalette.fromHct(hct);\n }\n\n /**\n * @param hct Hct\n * @return Tones matching that color's hue and chroma.\n */\n static fromHct(hct: Hct) {\n return new TonalPalette(hct.hue, hct.chroma, hct);\n }\n\n /**\n * @param hue HCT hue\n * @param chroma HCT chroma\n * @return Tones matching hue and chroma.\n */\n static fromHueAndChroma(hue: number, chroma: number): TonalPalette {\n return new TonalPalette(\n hue,\n chroma,\n TonalPalette.createKeyColor(hue, chroma),\n );\n }\n\n private constructor(\n readonly hue: number,\n readonly chroma: number,\n readonly keyColor: Hct,\n ) {}\n\n private static createKeyColor(hue: number, chroma: number): Hct {\n const startTone = 50.0;\n let smallestDeltaHct = Hct.from(hue, chroma, startTone);\n let smallestDelta = Math.abs(smallestDeltaHct.chroma - chroma);\n // Starting from T50, check T+/-delta to see if they match the requested\n // chroma.\n //\n // Starts from T50 because T50 has the most chroma available, on\n // average. Thus it is most likely to have a direct answer and minimize\n // iteration.\n for (let delta = 1.0; delta < 50.0; delta += 1.0) {\n // Termination condition rounding instead of minimizing delta to avoid\n // case where requested chroma is 16.51, and the closest chroma is 16.49.\n // Error is minimized, but when rounded and displayed, requested chroma\n // is 17, key color's chroma is 16.\n if (Math.round(chroma) === Math.round(smallestDeltaHct.chroma)) {\n return smallestDeltaHct;\n }\n\n const hctAdd = Hct.from(hue, chroma, startTone + delta);\n const hctAddDelta = Math.abs(hctAdd.chroma - chroma);\n if (hctAddDelta < smallestDelta) {\n smallestDelta = hctAddDelta;\n smallestDeltaHct = hctAdd;\n }\n\n const hctSubtract = Hct.from(hue, chroma, startTone - delta);\n const hctSubtractDelta = Math.abs(hctSubtract.chroma - chroma);\n if (hctSubtractDelta < smallestDelta) {\n smallestDelta = hctSubtractDelta;\n smallestDeltaHct = hctSubtract;\n }\n }\n\n return smallestDeltaHct;\n }\n\n /**\n * @param tone HCT tone, measured from 0 to 100.\n * @return ARGB representation of a color with that tone.\n */\n tone(tone: number): number {\n let argb = this.cache.get(tone);\n if (argb === undefined) {\n argb = Hct.from(this.hue, this.chroma, tone).toInt();\n this.cache.set(tone, argb);\n }\n return argb;\n }\n\n /**\n * @param tone HCT tone.\n * @return HCT representation of a color with that tone.\n */\n getHct(tone: number): Hct {\n return Hct.fromInt(this.tone(tone));\n }\n}\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAfA,SAgBSA,GAAG;AAEZ;AACA;AACA;AACA;AACA,OAAO,MAAMC,YAAY,CAAC;EAGxB;AACF;AACA;AACA;EACE,OAAOC,OAAOA,CAACC,IAAY,EAAgB;IACzC,MAAMC,GAAG,GAAGJ,GAAG,CAACE,OAAO,CAACC,IAAI,CAAC;IAC7B,OAAOF,YAAY,CAACI,OAAO,CAACD,GAAG,CAAC;EAClC;;EAEA;AACF;AACA;AACA;EACE,OAAOC,OAAOA,CAACD,GAAQ,EAAE;IACvB,OAAO,IAAIH,YAAY,CAACG,GAAG,CAACE,GAAG,EAAEF,GAAG,CAACG,MAAM,EAAEH,GAAG,CAAC;EACnD;;EAEA;AACF;AACA;AACA;AACA;EACE,OAAOI,gBAAgBA,CAACF,GAAW,EAAE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B,IAAI,CAACV,GAAG,EAAEC,MAAM,EAAEO,SAAS,GAAGM,KAAK,CAAC;MAC5D,MAAMK,gBAAgB,GAAGP,IAAI,CAACC,GAAG,CAACK,WAAW,CAACjB,MAAM,GAAGA,MAAM,CAAC;MAC9D,IAAIkB,gBAAgB,GAAGR,aAAa,EAAE;QACpCA,aAAa,GAAGQ,gBAAgB;QAChCV,gBAAgB,GAAGS,WAAW;MAChC;IACF;IAEA,OAAOT,gBAAgB;EACzB;;EAEA;AACF;AACA;AACA;EACEW,IAAIA,CAACA,IAAY,EAAU;IACzB,IAAIvB,IAAI,GAAG,IAAI,CAACwB,KAAK,CAACC,GAAG,CAACF,IAAI,CAAC;IAC/B,IAAIvB,IAAI,KAAK0B,SAAS,EAAE;MACtB1B,IAAI,GAAGH,GAAG,CAACgB,IAAI,CAAC,IAAI,CAACV,GAAG,EAAE,IAAI,CAACC,MAAM,EAAEmB,IAAI,CAAC,CAACI,KAAK,CAAC,CAAC;MACpD,IAAI,CAACH,KAAK,CAACI,GAAG,CAACL,IAAI,EAAEvB,IAAI,CAAC;IAC5B;IACA,OAAOA,IAAI;EACb;;EAEA;AACF;AACA;AACA;EACE6B,MAAMA,CAACN,IAAY,EAAO;IACxB,OAAO1B,GAAG,CAACE,OAAO,CAAC,IAAI,CAACwB,IAAI,CAACA,IAAI,CAAC,CAAC;EACrC;AACF"}
|
|
1
|
+
{"version":3,"file":"tonal-palette.js","names":["Hct","TonalPalette","fromInt","argb","hct","fromHct","hue","chroma","fromHueAndChroma","createKeyColor","constructor","keyColor","_defineProperty","Map","startTone","smallestDeltaHct","from","smallestDelta","Math","abs","delta","round","hctAdd","hctAddDelta","hctSubtract","hctSubtractDelta","tone","cache","get","undefined","toInt","set","getHct"],"sources":["../../../../src/util/color/palettes/tonal-palette.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Hct } from '../hct/hct';\n\n/**\n * A convenience class for retrieving colors that are constant in hue and\n * chroma, but vary in tone.\n */\nexport class TonalPalette {\n private readonly cache = new Map<number, number>();\n\n /**\n * @param argb ARGB representation of a color\n * @return Tones matching that color's hue and chroma.\n */\n static fromInt(argb: number): TonalPalette {\n const hct = Hct.fromInt(argb);\n return TonalPalette.fromHct(hct);\n }\n\n /**\n * @param hct Hct\n * @return Tones matching that color's hue and chroma.\n */\n static fromHct(hct: Hct) {\n return new TonalPalette(hct.hue, hct.chroma, hct);\n }\n\n /**\n * @param hue HCT hue\n * @param chroma HCT chroma\n * @return Tones matching hue and chroma.\n */\n static fromHueAndChroma(hue: number, chroma: number): TonalPalette {\n return new TonalPalette(\n hue,\n chroma,\n TonalPalette.createKeyColor(hue, chroma),\n );\n }\n\n private constructor(\n readonly hue: number,\n readonly chroma: number,\n readonly keyColor: Hct,\n ) {}\n\n private static createKeyColor(hue: number, chroma: number): Hct {\n const startTone = 50.0;\n let smallestDeltaHct = Hct.from(hue, chroma, startTone);\n let smallestDelta = Math.abs(smallestDeltaHct.chroma - chroma);\n // Starting from T50, check T+/-delta to see if they match the requested\n // chroma.\n //\n // Starts from T50 because T50 has the most chroma available, on\n // average. Thus it is most likely to have a direct answer and minimize\n // iteration.\n for (let delta = 1.0; delta < 50.0; delta += 1.0) {\n // Termination condition rounding instead of minimizing delta to avoid\n // case where requested chroma is 16.51, and the closest chroma is 16.49.\n // Error is minimized, but when rounded and displayed, requested chroma\n // is 17, key color's chroma is 16.\n if (Math.round(chroma) === Math.round(smallestDeltaHct.chroma)) {\n return smallestDeltaHct;\n }\n\n const hctAdd = Hct.from(hue, chroma, startTone + delta);\n const hctAddDelta = Math.abs(hctAdd.chroma - chroma);\n if (hctAddDelta < smallestDelta) {\n smallestDelta = hctAddDelta;\n smallestDeltaHct = hctAdd;\n }\n\n const hctSubtract = Hct.from(hue, chroma, startTone - delta);\n const hctSubtractDelta = Math.abs(hctSubtract.chroma - chroma);\n if (hctSubtractDelta < smallestDelta) {\n smallestDelta = hctSubtractDelta;\n smallestDeltaHct = hctSubtract;\n }\n }\n\n return smallestDeltaHct;\n }\n\n /**\n * @param tone HCT tone, measured from 0 to 100.\n * @return ARGB representation of a color with that tone.\n */\n tone(tone: number): number {\n let argb = this.cache.get(tone);\n if (argb === undefined) {\n argb = Hct.from(this.hue, this.chroma, tone).toInt();\n this.cache.set(tone, argb);\n }\n return argb;\n }\n\n /**\n * @param tone HCT tone.\n * @return HCT representation of a color with that tone.\n */\n getHct(tone: number): Hct {\n return Hct.fromInt(this.tone(tone));\n }\n}\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAfA,SAgBSA,GAAG;AAEZ;AACA;AACA;AACA;AACA,OAAO,MAAMC,YAAY,CAAC;EAGxB;AACF;AACA;AACA;EACE,OAAOC,OAAOA,CAACC,IAAY,EAAgB;IACzC,MAAMC,GAAG,GAAGJ,GAAG,CAACE,OAAO,CAACC,IAAI,CAAC;IAC7B,OAAOF,YAAY,CAACI,OAAO,CAACD,GAAG,CAAC;EAClC;;EAEA;AACF;AACA;AACA;EACE,OAAOC,OAAOA,CAACD,GAAQ,EAAE;IACvB,OAAO,IAAIH,YAAY,CAACG,GAAG,CAACE,GAAG,EAAEF,GAAG,CAACG,MAAM,EAAEH,GAAG,CAAC;EACnD;;EAEA;AACF;AACA;AACA;AACA;EACE,OAAOI,gBAAgBA,CAACF,GAAW,EAAEC,MAAc,EAAgB;IACjE,OAAO,IAAIN,YAAY,CACrBK,GAAG,EACHC,MAAM,EACNN,YAAY,CAACQ,cAAc,CAACH,GAAG,EAA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,GAAG,CAACK,WAAW,CAACjB,MAAM,GAAGA,MAAM,CAAC;MAC9D,IAAIkB,gBAAgB,GAAGR,aAAa,EAAE;QACpCA,aAAa,GAAGQ,gBAAgB;QAChCV,gBAAgB,GAAGS,WAAW;MAChC;IACF;IAEA,OAAOT,gBAAgB;EACzB;;EAEA;AACF;AACA;AACA;EACEW,IAAIA,CAACA,IAAY,EAAU;IACzB,IAAIvB,IAAI,GAAG,IAAI,CAACwB,KAAK,CAACC,GAAG,CAACF,IAAI,CAAC;IAC/B,IAAIvB,IAAI,KAAK0B,SAAS,EAAE;MACtB1B,IAAI,GAAGH,GAAG,CAACgB,IAAI,CAAC,IAAI,CAACV,GAAG,EAAE,IAAI,CAACC,MAAM,EAAEmB,IAAI,CAAC,CAACI,KAAK,CAAC,CAAC;MACpD,IAAI,CAACH,KAAK,CAACI,GAAG,CAACL,IAAI,EAAEvB,IAAI,CAAC;IAC5B;IACA,OAAOA,IAAI;EACb;;EAEA;AACF;AACA;AACA;EACE6B,MAAMA,CAACN,IAAY,EAAO;IACxB,OAAO1B,GAAG,CAACE,OAAO,CAAC,IAAI,CAACwB,IAAI,CAACA,IAAI,CAAC,CAAC;EACrC;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../src/util/color/types.ts"],"sourcesContent":["/**\
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/util/color/types.ts"],"sourcesContent":["/**\n * RGBA component\n *\n * @param r Red value should be between 0-255\n * @param g Green value should be between 0-255\n * @param b Blue value should be between 0-255\n * @param a Alpha value should be between 0-255\n */\nexport interface Rgba {\n r: number;\n g: number;\n b: number;\n a: number;\n}\n"],"mappings":"","ignoreList":[]}
|