yuyeon 0.3.1-rc.4 → 0.3.1-rc.5
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/LICENSE +191 -191
- package/README.md +15 -15
- package/dist/yuyeon.js +1751 -1687
- package/dist/yuyeon.umd.cjs +3 -3
- package/lib/abstract/items.mjs.map +1 -1
- package/lib/components/alert/YAlert.mjs +2 -2
- package/lib/components/alert/YAlert.mjs.map +1 -1
- package/lib/components/alert/YAlert.scss +77 -77
- package/lib/components/app/YApp.mjs +2 -2
- package/lib/components/app/YApp.mjs.map +1 -1
- package/lib/components/bench/YBench.mjs +2 -2
- package/lib/components/bench/YBench.mjs.map +1 -1
- package/lib/components/button/YButton.scss +137 -137
- package/lib/components/card/YCard.mjs.map +1 -1
- package/lib/components/card/YCard.scss +45 -45
- package/lib/components/card/YCardBody.mjs.map +1 -1
- package/lib/components/card/YCardFooter.mjs.map +1 -1
- package/lib/components/card/YCardHeader.mjs.map +1 -1
- package/lib/components/checkbox/YCheckbox.mjs.map +1 -1
- package/lib/components/checkbox/YInputCheckbox.mjs.map +1 -1
- package/lib/components/checkbox/YInputCheckbox.scss +84 -84
- package/lib/components/checkbox/index.mjs.map +1 -1
- package/lib/components/chip/YChip.scss +36 -36
- package/lib/components/date-picker/YDateCalendar.mjs.map +1 -1
- package/lib/components/date-picker/YDateCalendar.scss +84 -84
- package/lib/components/date-picker/YDatePicker.mjs.map +1 -1
- package/lib/components/date-picker/YDatePickerControl.mjs.map +1 -1
- package/lib/components/date-picker/YMonthPicker.mjs.map +1 -1
- package/lib/components/date-picker/YYearPicker.mjs.map +1 -1
- package/lib/components/dialog/index.mjs.map +1 -1
- package/lib/components/divider/YDivider.mjs.map +1 -1
- package/lib/components/divider/YDivider.scss +2 -2
- package/lib/components/draggable/YDraggable.mjs +2 -2
- package/lib/components/draggable/YDraggable.mjs.map +1 -1
- package/lib/components/dropdown/YDropdown.mjs.map +1 -1
- package/lib/components/dropdown/YDropdown.scss +27 -27
- package/lib/components/field-input/index.mjs.map +1 -1
- package/lib/components/form/YForm.mjs.map +1 -1
- package/lib/components/hover/YHover.mjs +1 -1
- package/lib/components/hover/YHover.mjs.map +1 -1
- package/lib/components/icon/YIcon.mjs.map +1 -1
- package/lib/components/icon/YIcon.scss +18 -18
- package/lib/components/icon/poly.mjs +57 -0
- package/lib/components/icon/poly.mjs.map +1 -0
- package/lib/components/icons/YIconCheckbox.mjs.map +1 -1
- package/lib/components/icons/YIconClear.mjs.map +1 -1
- package/lib/components/icons/YIconDropdown.mjs.map +1 -1
- package/lib/components/icons/YIconExpand.mjs.map +1 -1
- package/lib/components/icons/YIconPageControl.mjs.map +1 -1
- package/lib/components/icons/YIconSort.mjs.map +1 -1
- package/lib/components/icons/YIconSort.scss +24 -24
- package/lib/components/icons/index.mjs.map +1 -1
- package/lib/components/img/YImg.mjs +4 -4
- package/lib/components/img/YImg.mjs.map +1 -1
- package/lib/components/index.mjs.map +1 -1
- package/lib/components/input/YInput.mjs.map +1 -1
- package/lib/components/input/YInput.scss +258 -258
- package/lib/components/ip-field/YIpv4Field.mjs.map +1 -1
- package/lib/components/layer/YLayer.mjs.map +1 -1
- package/lib/components/layer/active-stack.mjs.map +1 -1
- package/lib/components/layer/base.mjs.map +1 -1
- package/lib/components/layer/content.mjs.map +1 -1
- package/lib/components/layer/scroll-strategies.mjs.map +1 -1
- package/lib/components/list/YList.mjs.map +1 -1
- package/lib/components/list/YListItem.mjs.map +1 -1
- package/lib/components/loading/YSpinnerRing.mjs.map +1 -1
- package/lib/components/menu/YMenu.mjs +2 -2
- package/lib/components/menu/YMenu.mjs.map +1 -1
- package/lib/components/menu/YMenu.scss +25 -25
- package/lib/components/navigation/YNavigation.mjs.map +1 -1
- package/lib/components/pagination/YPagination.mjs.map +1 -1
- package/lib/components/pagination/YPagination.scss +52 -52
- package/lib/components/panel/YDividePanel.mjs.map +1 -1
- package/lib/components/plate/YPlate.mjs +2 -2
- package/lib/components/plate/YPlate.mjs.map +1 -1
- package/lib/components/progress-bar/YProgressBar.mjs.map +1 -1
- package/lib/components/progress-bar/YProgressBar.scss +120 -120
- package/lib/components/progress-ring/YProgressRing.mjs +2 -2
- package/lib/components/progress-ring/YProgressRing.mjs.map +1 -1
- package/lib/components/progress-ring/YProgressRing.scss +38 -38
- package/lib/components/progress-ring/index.mjs.map +1 -1
- package/lib/components/select/YSelect.mjs.map +1 -1
- package/lib/components/slider/YSlider.mjs.map +1 -1
- package/lib/components/snackbar/YSnackbar.mjs +5 -5
- package/lib/components/snackbar/YSnackbar.mjs.map +1 -1
- package/lib/components/switch/YSwitch.mjs.map +1 -1
- package/lib/components/switch/YSwitch.scss +211 -211
- package/lib/components/tab/YTab.mjs.map +1 -1
- package/lib/components/tab/YTab.scss +73 -73
- package/lib/components/tab/YTabs.mjs.map +1 -1
- package/lib/components/tab/YTabs.scss +8 -8
- package/lib/components/tab/index.mjs.map +1 -1
- package/lib/components/tab/types.mjs.map +1 -1
- package/lib/components/table/YDataTableBody.mjs.map +1 -1
- package/lib/components/table/YDataTableCell.mjs.map +1 -1
- package/lib/components/table/YDataTableHead.mjs.map +1 -1
- package/lib/components/table/YDataTableLayer.mjs.map +1 -1
- package/lib/components/table/YDataTableRow.mjs.map +1 -1
- package/lib/components/table/YTable.mjs.map +1 -1
- package/lib/components/table/YTable.scss +157 -157
- package/lib/components/table/composibles/header.mjs.map +1 -1
- package/lib/components/table/composibles/items.mjs.map +1 -1
- package/lib/components/table/composibles/options.mjs.map +1 -1
- package/lib/components/table/composibles/pagination.mjs.map +1 -1
- package/lib/components/table/composibles/selection.mjs.map +1 -1
- package/lib/components/table/composibles/sorted-items.mjs.map +1 -1
- package/lib/components/table/composibles/sorting.mjs.map +1 -1
- package/lib/components/table/types/header.mjs.map +1 -1
- package/lib/components/table/types/index.mjs.map +1 -1
- package/lib/components/table/types/row.mjs.map +1 -1
- package/lib/components/text-ellipsis/YTextEllipsis.mjs.map +1 -1
- package/lib/components/text-ellipsis/YTextEllipsis.scss +43 -43
- package/lib/components/text-highlighter/YTextHighlighter.mjs.map +1 -1
- package/lib/components/text-interpolation/YTi.mjs.map +1 -1
- package/lib/components/textarea/YTextarea.mjs.map +1 -1
- package/lib/components/toggle-button/YToggleButton.mjs.map +1 -1
- package/lib/components/tooltip/YTooltip.mjs +2 -2
- package/lib/components/tooltip/YTooltip.mjs.map +1 -1
- package/lib/components/tree-view/YTreeView.scss +81 -81
- package/lib/components/tree-view/types.mjs.map +1 -1
- package/lib/components/tree-view/util.mjs.map +1 -1
- package/lib/composables/choice.mjs.map +1 -1
- package/lib/composables/communication.mjs.map +1 -1
- package/lib/composables/component.mjs.map +1 -1
- package/lib/composables/coordinate/arrangement.mjs.map +1 -1
- package/lib/composables/coordinate/index.mjs.map +1 -1
- package/lib/composables/coordinate/levitation.mjs +2 -2
- package/lib/composables/coordinate/levitation.mjs.map +1 -1
- package/lib/composables/coordinate/types.mjs.map +1 -1
- package/lib/composables/coordinate/utils/point.mjs.map +1 -1
- package/lib/composables/date/factory.mjs.map +1 -1
- package/lib/composables/date/index.mjs.map +1 -1
- package/lib/composables/date/setting.mjs.map +1 -1
- package/lib/composables/date/types.mjs.map +1 -1
- package/lib/composables/defaults/index.mjs.map +1 -1
- package/lib/composables/defaults/share.mjs.map +1 -1
- package/lib/composables/defaults/types.mjs.map +1 -1
- package/lib/composables/dimension.mjs.map +1 -1
- package/lib/composables/focus.mjs.map +1 -1
- package/lib/composables/form.mjs.map +1 -1
- package/lib/composables/group.mjs +194 -0
- package/lib/composables/group.mjs.map +1 -0
- package/lib/composables/i18n/index.mjs.map +1 -1
- package/lib/composables/i18n/locale.mjs.map +1 -1
- package/lib/composables/i18n/rtl.mjs.map +1 -1
- package/lib/composables/i18n/share.mjs.map +1 -1
- package/lib/composables/icon.mjs.map +1 -1
- package/lib/composables/index.mjs.map +1 -1
- package/lib/composables/layer-group.mjs.map +1 -1
- package/lib/composables/layout.mjs.map +1 -1
- package/lib/composables/list-items.mjs.map +1 -1
- package/lib/composables/progress.mjs.map +1 -1
- package/lib/composables/ref.mjs.map +1 -1
- package/lib/composables/resize-observer.mjs.map +1 -1
- package/lib/composables/scope.mjs.map +1 -1
- package/lib/composables/theme/factory.mjs.map +1 -1
- package/lib/composables/theme/index.mjs.map +1 -1
- package/lib/composables/theme/setting.mjs.map +1 -1
- package/lib/composables/theme/types.mjs.map +1 -1
- package/lib/composables/timing.mjs.map +1 -1
- package/lib/composables/transition.mjs.map +1 -1
- package/lib/composables/validation.mjs.map +1 -1
- package/lib/composables/vue-router.mjs.map +1 -1
- package/lib/directives/plate-wave/index.mjs +2 -2
- package/lib/directives/plate-wave/index.mjs.map +1 -1
- package/lib/etc/index.mjs.map +1 -1
- package/lib/i18n/built-in.mjs.map +1 -1
- package/lib/i18n/config.mjs.map +1 -1
- package/lib/i18n/types.mjs.map +1 -1
- package/lib/index.mjs.map +1 -1
- package/lib/locales/en.mjs.map +1 -1
- package/lib/locales/index.mjs.map +1 -1
- package/lib/locales/ko.mjs.map +1 -1
- package/lib/styles/_elevation.scss +16 -16
- package/lib/styles/_palette.scss +1 -1
- package/lib/styles/base.scss +130 -130
- package/lib/styles/settings/_elevation.scss +20 -20
- package/lib/styles/settings/_variables.scss +14 -14
- package/lib/styles/theme/dark.scss +11 -11
- package/lib/styles/theme/light.scss +11 -11
- package/lib/styles/util/_mixin.scss +33 -33
- package/lib/styles/util/_var.scss +18 -18
- package/lib/util/anchor.mjs.map +1 -1
- package/lib/util/collection.mjs.map +1 -1
- package/lib/util/color/const.mjs.map +1 -1
- package/lib/util/color/index.mjs +12 -12
- package/lib/util/color/index.mjs.map +1 -1
- package/lib/util/color/types.mjs.map +1 -1
- package/lib/util/color/utils/math-utils.mjs +62 -62
- package/lib/util/color/utils/math-utils.mjs.map +1 -1
- package/lib/util/component/component.mjs.map +1 -1
- package/lib/util/component/index.mjs.map +1 -1
- package/lib/util/component/inject-self.mjs.map +1 -1
- package/lib/util/component/props.mjs.map +1 -1
- package/lib/util/component/types.mjs.map +1 -1
- package/lib/util/date/index.mjs.map +1 -1
- package/lib/util/date/types.mjs.map +1 -1
- package/lib/util/debounce.mjs.map +1 -1
- package/lib/util/environments.mjs.map +1 -1
- package/lib/util/index.mjs.map +1 -1
- package/lib/util/parser.mjs +31 -0
- package/lib/util/parser.mjs.map +1 -0
- package/lib/util/reactivity.mjs +3 -3
- package/lib/util/reactivity.mjs.map +1 -1
- package/lib/util/rect.mjs.map +1 -1
- package/lib/util/validation.mjs.map +1 -1
- package/lib/util/vue-component/index.mjs +63 -0
- package/lib/util/vue-component/index.mjs.map +1 -0
- package/lib/util/vue-component/props.mjs +37 -0
- package/lib/util/vue-component/props.mjs.map +1 -0
- package/lib/util/vue-component/types.mjs +2 -0
- package/lib/util/vue-component/types.mjs.map +1 -0
- package/lib/util/vue-component.mjs +102 -0
- package/lib/util/vue-component.mjs.map +1 -0
- package/package.json +120 -120
- package/types/components/select/YSelect.d.ts +7062 -0
- package/types/components/table/pagination.d.ts +78 -0
- package/types/components/tooltip/YTooltip.d.ts +3711 -0
- package/types/globals.d.ts +20 -20
- package/types/shims.d.ts +55 -55
- package/types/util/color/hct/hct_solver.d.ts +146 -0
- package/types/util/color/hct/viewing_conditions.d.ts +74 -0
- package/types/util/color/palettes/tonal_palette.d.ts +55 -0
- package/types/util/color/utils/math_utils.d.ts +82 -0
- package/types/util/parser.d.ts +4 -0
- package/types/util/vue-component/index.d.ts +10 -0
- package/types/util/vue-component/props.d.ts +31 -0
- package/types/util/vue-component/types.d.ts +4 -0
- package/types/util/vue-component.d.ts +39 -0
- /package/types/util/{rect.d.ts → Rect.d.ts} +0 -0
package/types/globals.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { VNode } from 'vue';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
declare global {
|
|
5
|
-
namespace JSX {
|
|
6
|
-
interface Element extends VNode {}
|
|
7
|
-
|
|
8
|
-
interface IntrinsicAttributes {
|
|
9
|
-
[name: string]: any
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
declare module '@vue/runtime-core' {
|
|
15
|
-
export interface ComponentCustomProperties {
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface ComponentInternalInstance {
|
|
19
|
-
provides: Record<string, unknown>
|
|
20
|
-
}
|
|
21
|
-
}
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
declare global {
|
|
5
|
+
namespace JSX {
|
|
6
|
+
interface Element extends VNode {}
|
|
7
|
+
|
|
8
|
+
interface IntrinsicAttributes {
|
|
9
|
+
[name: string]: any
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare module '@vue/runtime-core' {
|
|
15
|
+
export interface ComponentCustomProperties {
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface ComponentInternalInstance {
|
|
19
|
+
provides: Record<string, unknown>
|
|
20
|
+
}
|
|
21
|
+
}
|
package/types/shims.d.ts
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
1
|
import { YAlert, YApp, YBadge, YButton, YCard, YCardBody, YCardFooter, YCardHeader, YCheckbox, YChip, YDataTable, YDataTableServer, YDateCalendar, YDatePicker, YDialog, YDividePanel, YDivider, YDropdown, YExpandHTransition, YExpandVTransition, YFieldInput, YForm, YHover, YIcon, YInput, YInputCheckbox, YIpv4Field, YLayer, YList, YListItem, YMenu, YMonthPicker, YPagination, YProgressBar, YSelect, YSnackbar, YSpinnerRing, YSwitch, YTab, YTable, YTabs, YTextHighlighter, YTextarea, YTi, YTooltip, YTreeView, YTreeViewNode, YProgressRing } from 'yuyeon/components';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
declare module '@vue/runtime-core' {
|
|
5
|
-
export interface GlobalComponents {
|
|
6
|
-
// @define-components
|
|
7
|
-
YApp: typeof YApp;
|
|
8
|
-
YButton: typeof YButton;
|
|
9
|
-
YChip: typeof YChip;
|
|
10
|
-
YInput: typeof YInput;
|
|
11
|
-
YFieldInput: typeof YFieldInput;
|
|
12
|
-
YTextarea: typeof YTextarea;
|
|
13
|
-
YForm: typeof YForm;
|
|
14
|
-
YCard: typeof YCard;
|
|
15
|
-
YCardBody: typeof YCardBody;
|
|
16
|
-
YCardHeader: typeof YCardHeader;
|
|
17
|
-
YCardFooter: typeof YCardFooter;
|
|
18
|
-
YDialog: typeof YDialog;
|
|
19
|
-
YLayer: typeof YLayer;
|
|
20
|
-
YSnackbar: typeof YSnackbar;
|
|
21
|
-
YProgressBar: typeof YProgressBar;
|
|
22
|
-
YSpinnerRing: typeof YSpinnerRing;
|
|
23
|
-
YTooltip: typeof YTooltip;
|
|
24
|
-
YExpandVTransition: typeof YExpandVTransition;
|
|
25
|
-
YExpandHTransition: typeof YExpandHTransition;
|
|
26
|
-
YDividePanel: typeof YDividePanel;
|
|
27
|
-
YList: typeof YList;
|
|
28
|
-
YListItem: typeof YListItem;
|
|
29
|
-
YTreeView: typeof YTreeView;
|
|
30
|
-
YTreeViewNode: typeof YTreeViewNode;
|
|
31
|
-
YDataTable: typeof YDataTable;
|
|
32
|
-
YTable: typeof YTable;
|
|
33
|
-
YDataTableServer: typeof YDataTableServer;
|
|
34
|
-
YMenu: typeof YMenu;
|
|
35
|
-
YPagination: typeof YPagination;
|
|
36
|
-
YInputCheckbox: typeof YInputCheckbox;
|
|
37
|
-
YCheckbox: typeof YCheckbox;
|
|
38
|
-
YSwitch: typeof YSwitch;
|
|
39
|
-
YDropdown: typeof YDropdown;
|
|
40
|
-
YSelect: typeof YSelect;
|
|
41
|
-
YAlert: typeof YAlert;
|
|
42
|
-
YTabs: typeof YTabs;
|
|
43
|
-
YTab: typeof YTab;
|
|
44
|
-
YDivider: typeof YDivider;
|
|
45
|
-
YDateCalendar: typeof YDateCalendar;
|
|
46
|
-
YIcon: typeof YIcon;
|
|
47
|
-
YDatePicker: typeof YDatePicker;
|
|
48
|
-
YMonthPicker: typeof YMonthPicker;
|
|
49
|
-
YBadge: typeof YBadge;
|
|
50
|
-
YIpv4Field: typeof YIpv4Field;
|
|
51
|
-
YHover: typeof YHover;
|
|
52
|
-
YTi: typeof YTi;
|
|
53
|
-
YTextHighlighter: typeof YTextHighlighter;
|
|
54
|
-
YProgressRing: typeof YProgressRing;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
declare module '@vue/runtime-core' {
|
|
5
|
+
export interface GlobalComponents {
|
|
6
|
+
// @define-components
|
|
7
|
+
YApp: typeof YApp;
|
|
8
|
+
YButton: typeof YButton;
|
|
9
|
+
YChip: typeof YChip;
|
|
10
|
+
YInput: typeof YInput;
|
|
11
|
+
YFieldInput: typeof YFieldInput;
|
|
12
|
+
YTextarea: typeof YTextarea;
|
|
13
|
+
YForm: typeof YForm;
|
|
14
|
+
YCard: typeof YCard;
|
|
15
|
+
YCardBody: typeof YCardBody;
|
|
16
|
+
YCardHeader: typeof YCardHeader;
|
|
17
|
+
YCardFooter: typeof YCardFooter;
|
|
18
|
+
YDialog: typeof YDialog;
|
|
19
|
+
YLayer: typeof YLayer;
|
|
20
|
+
YSnackbar: typeof YSnackbar;
|
|
21
|
+
YProgressBar: typeof YProgressBar;
|
|
22
|
+
YSpinnerRing: typeof YSpinnerRing;
|
|
23
|
+
YTooltip: typeof YTooltip;
|
|
24
|
+
YExpandVTransition: typeof YExpandVTransition;
|
|
25
|
+
YExpandHTransition: typeof YExpandHTransition;
|
|
26
|
+
YDividePanel: typeof YDividePanel;
|
|
27
|
+
YList: typeof YList;
|
|
28
|
+
YListItem: typeof YListItem;
|
|
29
|
+
YTreeView: typeof YTreeView;
|
|
30
|
+
YTreeViewNode: typeof YTreeViewNode;
|
|
31
|
+
YDataTable: typeof YDataTable;
|
|
32
|
+
YTable: typeof YTable;
|
|
33
|
+
YDataTableServer: typeof YDataTableServer;
|
|
34
|
+
YMenu: typeof YMenu;
|
|
35
|
+
YPagination: typeof YPagination;
|
|
36
|
+
YInputCheckbox: typeof YInputCheckbox;
|
|
37
|
+
YCheckbox: typeof YCheckbox;
|
|
38
|
+
YSwitch: typeof YSwitch;
|
|
39
|
+
YDropdown: typeof YDropdown;
|
|
40
|
+
YSelect: typeof YSelect;
|
|
41
|
+
YAlert: typeof YAlert;
|
|
42
|
+
YTabs: typeof YTabs;
|
|
43
|
+
YTab: typeof YTab;
|
|
44
|
+
YDivider: typeof YDivider;
|
|
45
|
+
YDateCalendar: typeof YDateCalendar;
|
|
46
|
+
YIcon: typeof YIcon;
|
|
47
|
+
YDatePicker: typeof YDatePicker;
|
|
48
|
+
YMonthPicker: typeof YMonthPicker;
|
|
49
|
+
YBadge: typeof YBadge;
|
|
50
|
+
YIpv4Field: typeof YIpv4Field;
|
|
51
|
+
YHover: typeof YHover;
|
|
52
|
+
YTi: typeof YTi;
|
|
53
|
+
YTextHighlighter: typeof YTextHighlighter;
|
|
54
|
+
YProgressRing: typeof YProgressRing;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
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
|
+
import { Cam16 } from './cam16';
|
|
18
|
+
/**
|
|
19
|
+
* A class that solves the HCT equation.
|
|
20
|
+
*/
|
|
21
|
+
export declare class HctSolver {
|
|
22
|
+
static SCALED_DISCOUNT_FROM_LINRGB: number[][];
|
|
23
|
+
static LINRGB_FROM_SCALED_DISCOUNT: number[][];
|
|
24
|
+
static Y_FROM_LINRGB: number[];
|
|
25
|
+
static CRITICAL_PLANES: number[];
|
|
26
|
+
/**
|
|
27
|
+
* Sanitizes a small enough angle in radians.
|
|
28
|
+
*
|
|
29
|
+
* @param angle An angle in radians; must not deviate too much
|
|
30
|
+
* from 0.
|
|
31
|
+
* @return A coterminal angle between 0 and 2pi.
|
|
32
|
+
*/
|
|
33
|
+
private static sanitizeRadians;
|
|
34
|
+
/**
|
|
35
|
+
* Delinearizes an RGB component, returning a floating-point
|
|
36
|
+
* number.
|
|
37
|
+
*
|
|
38
|
+
* @param rgbComponent 0.0 <= rgb_component <= 100.0, represents
|
|
39
|
+
* linear R/G/B channel
|
|
40
|
+
* @return 0.0 <= output <= 255.0, color channel converted to
|
|
41
|
+
* regular RGB space
|
|
42
|
+
*/
|
|
43
|
+
private static trueDelinearized;
|
|
44
|
+
private static chromaticAdaptation;
|
|
45
|
+
/**
|
|
46
|
+
* Returns the hue of a linear RGB color in CAM16.
|
|
47
|
+
*
|
|
48
|
+
* @param linrgb The linear RGB coordinates of a color.
|
|
49
|
+
* @return The hue of the color in CAM16, in radians.
|
|
50
|
+
*/
|
|
51
|
+
private static hueOf;
|
|
52
|
+
private static areInCyclicOrder;
|
|
53
|
+
/**
|
|
54
|
+
* Solves the lerp equation.
|
|
55
|
+
*
|
|
56
|
+
* @param source The starting number.
|
|
57
|
+
* @param mid The number in the middle.
|
|
58
|
+
* @param target The ending number.
|
|
59
|
+
* @return A number t such that lerp(source, target, t) = mid.
|
|
60
|
+
*/
|
|
61
|
+
private static intercept;
|
|
62
|
+
private static lerpPoint;
|
|
63
|
+
/**
|
|
64
|
+
* Intersects a segment with a plane.
|
|
65
|
+
*
|
|
66
|
+
* @param source The coordinates of point A.
|
|
67
|
+
* @param coordinate The R-, G-, or B-coordinate of the plane.
|
|
68
|
+
* @param target The coordinates of point B.
|
|
69
|
+
* @param axis The axis the plane is perpendicular with. (0: R, 1:
|
|
70
|
+
* G, 2: B)
|
|
71
|
+
* @return The intersection point of the segment AB with the plane
|
|
72
|
+
* R=coordinate, G=coordinate, or B=coordinate
|
|
73
|
+
*/
|
|
74
|
+
private static setCoordinate;
|
|
75
|
+
private static isBounded;
|
|
76
|
+
/**
|
|
77
|
+
* Returns the nth possible vertex of the polygonal intersection.
|
|
78
|
+
*
|
|
79
|
+
* @param y The Y value of the plane.
|
|
80
|
+
* @param n The zero-based index of the point. 0 <= n <= 11.
|
|
81
|
+
* @return The nth possible vertex of the polygonal intersection
|
|
82
|
+
* of the y plane and the RGB cube, in linear RGB coordinates, if
|
|
83
|
+
* it exists. If this possible vertex lies outside of the cube,
|
|
84
|
+
* [-1.0, -1.0, -1.0] is returned.
|
|
85
|
+
*/
|
|
86
|
+
private static nthVertex;
|
|
87
|
+
/**
|
|
88
|
+
* Finds the segment containing the desired color.
|
|
89
|
+
*
|
|
90
|
+
* @param y The Y value of the color.
|
|
91
|
+
* @param targetHue The hue of the color.
|
|
92
|
+
* @return A list of two sets of linear RGB coordinates, each
|
|
93
|
+
* corresponding to an endpoint of the segment containing the
|
|
94
|
+
* desired color.
|
|
95
|
+
*/
|
|
96
|
+
private static bisectToSegment;
|
|
97
|
+
private static midpoint;
|
|
98
|
+
private static criticalPlaneBelow;
|
|
99
|
+
private static criticalPlaneAbove;
|
|
100
|
+
/**
|
|
101
|
+
* Finds a color with the given Y and hue on the boundary of the
|
|
102
|
+
* cube.
|
|
103
|
+
*
|
|
104
|
+
* @param y The Y value of the color.
|
|
105
|
+
* @param targetHue The hue of the color.
|
|
106
|
+
* @return The desired color, in linear RGB coordinates.
|
|
107
|
+
*/
|
|
108
|
+
private static bisectToLimit;
|
|
109
|
+
private static inverseChromaticAdaptation;
|
|
110
|
+
/**
|
|
111
|
+
* Finds a color with the given hue, chroma, and Y.
|
|
112
|
+
*
|
|
113
|
+
* @param hueRadians The desired hue in radians.
|
|
114
|
+
* @param chroma The desired chroma.
|
|
115
|
+
* @param y The desired Y.
|
|
116
|
+
* @return The desired color as a hexadecimal integer, if found; 0
|
|
117
|
+
* otherwise.
|
|
118
|
+
*/
|
|
119
|
+
private static findResultByJ;
|
|
120
|
+
/**
|
|
121
|
+
* Finds an sRGB color with the given hue, chroma, and L*, if
|
|
122
|
+
* possible.
|
|
123
|
+
*
|
|
124
|
+
* @param hueDegrees The desired hue, in degrees.
|
|
125
|
+
* @param chroma The desired chroma.
|
|
126
|
+
* @param lstar The desired L*.
|
|
127
|
+
* @return A hexadecimal representing the sRGB color. The color
|
|
128
|
+
* has sufficiently close hue, chroma, and L* to the desired
|
|
129
|
+
* values, if possible; otherwise, the hue and L* will be
|
|
130
|
+
* sufficiently close, and chroma will be maximized.
|
|
131
|
+
*/
|
|
132
|
+
static solveToInt(hueDegrees: number, chroma: number, lstar: number): number;
|
|
133
|
+
/**
|
|
134
|
+
* Finds an sRGB color with the given hue, chroma, and L*, if
|
|
135
|
+
* possible.
|
|
136
|
+
*
|
|
137
|
+
* @param hueDegrees The desired hue, in degrees.
|
|
138
|
+
* @param chroma The desired chroma.
|
|
139
|
+
* @param lstar The desired L*.
|
|
140
|
+
* @return An CAM16 object representing the sRGB color. The color
|
|
141
|
+
* has sufficiently close hue, chroma, and L* to the desired
|
|
142
|
+
* values, if possible; otherwise, the hue and L* will be
|
|
143
|
+
* sufficiently close, and chroma will be maximized.
|
|
144
|
+
*/
|
|
145
|
+
static solveToCam(hueDegrees: number, chroma: number, lstar: number): Cam16;
|
|
146
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
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
|
+
* In traditional color spaces, a color can be identified solely by the
|
|
19
|
+
* observer's measurement of the color. Color appearance models such as CAM16
|
|
20
|
+
* also use information about the environment where the color was
|
|
21
|
+
* observed, known as the viewing conditions.
|
|
22
|
+
*
|
|
23
|
+
* For example, white under the traditional assumption of a midday sun white
|
|
24
|
+
* point is accurately measured as a slightly chromatic blue by CAM16. (roughly,
|
|
25
|
+
* hue 203, chroma 3, lightness 100)
|
|
26
|
+
*
|
|
27
|
+
* This class caches intermediate values of the CAM16 conversion process that
|
|
28
|
+
* depend only on viewing conditions, enabling speed ups.
|
|
29
|
+
*/
|
|
30
|
+
export declare class ViewingConditions {
|
|
31
|
+
n: number;
|
|
32
|
+
aw: number;
|
|
33
|
+
nbb: number;
|
|
34
|
+
ncb: number;
|
|
35
|
+
c: number;
|
|
36
|
+
nc: number;
|
|
37
|
+
rgbD: number[];
|
|
38
|
+
fl: number;
|
|
39
|
+
fLRoot: number;
|
|
40
|
+
z: number;
|
|
41
|
+
/** sRGB-like viewing conditions. */
|
|
42
|
+
static DEFAULT: ViewingConditions;
|
|
43
|
+
/**
|
|
44
|
+
* Create ViewingConditions from a simple, physically relevant, set of
|
|
45
|
+
* parameters.
|
|
46
|
+
*
|
|
47
|
+
* @param whitePoint White point, measured in the XYZ color space.
|
|
48
|
+
* default = D65, or sunny day afternoon
|
|
49
|
+
* @param adaptingLuminance The luminance of the adapting field. Informally,
|
|
50
|
+
* how bright it is in the room where the color is viewed. Can be
|
|
51
|
+
* calculated from lux by multiplying lux by 0.0586. default = 11.72,
|
|
52
|
+
* or 200 lux.
|
|
53
|
+
* @param backgroundLstar The lightness of the area surrounding the color.
|
|
54
|
+
* measured by L* in L*a*b*. default = 50.0
|
|
55
|
+
* @param surround A general description of the lighting surrounding the
|
|
56
|
+
* color. 0 is pitch dark, like watching a movie in a theater. 1.0 is a
|
|
57
|
+
* dimly light room, like watching TV at home at night. 2.0 means there
|
|
58
|
+
* is no difference between the lighting on the color and around it.
|
|
59
|
+
* default = 2.0
|
|
60
|
+
* @param discountingIlluminant Whether the eye accounts for the tint of the
|
|
61
|
+
* ambient lighting, such as knowing an apple is still red in green light.
|
|
62
|
+
* default = false, the eye does not perform this process on
|
|
63
|
+
* self-luminous objects like displays.
|
|
64
|
+
*/
|
|
65
|
+
static make(whitePoint?: number[], adaptingLuminance?: number, backgroundLstar?: number, surround?: number, discountingIlluminant?: boolean): ViewingConditions;
|
|
66
|
+
/**
|
|
67
|
+
* Parameters are intermediate values of the CAM16 conversion process. Their
|
|
68
|
+
* names are shorthand for technical color science terminology, this class
|
|
69
|
+
* would not benefit from documenting them individually. A brief overview
|
|
70
|
+
* is available in the CAM16 specification, and a complete overview requires
|
|
71
|
+
* a color science textbook, such as Fairchild's Color Appearance Models.
|
|
72
|
+
*/
|
|
73
|
+
private constructor();
|
|
74
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
import { Hct } from '../hct/hct';
|
|
18
|
+
/**
|
|
19
|
+
* A convenience class for retrieving colors that are constant in hue and
|
|
20
|
+
* chroma, but vary in tone.
|
|
21
|
+
*/
|
|
22
|
+
export declare class TonalPalette {
|
|
23
|
+
readonly hue: number;
|
|
24
|
+
readonly chroma: number;
|
|
25
|
+
readonly keyColor: Hct;
|
|
26
|
+
private readonly cache;
|
|
27
|
+
/**
|
|
28
|
+
* @param argb ARGB representation of a color
|
|
29
|
+
* @return Tones matching that color's hue and chroma.
|
|
30
|
+
*/
|
|
31
|
+
static fromInt(argb: number): TonalPalette;
|
|
32
|
+
/**
|
|
33
|
+
* @param hct Hct
|
|
34
|
+
* @return Tones matching that color's hue and chroma.
|
|
35
|
+
*/
|
|
36
|
+
static fromHct(hct: Hct): TonalPalette;
|
|
37
|
+
/**
|
|
38
|
+
* @param hue HCT hue
|
|
39
|
+
* @param chroma HCT chroma
|
|
40
|
+
* @return Tones matching hue and chroma.
|
|
41
|
+
*/
|
|
42
|
+
static fromHueAndChroma(hue: number, chroma: number): TonalPalette;
|
|
43
|
+
private constructor();
|
|
44
|
+
private static createKeyColor;
|
|
45
|
+
/**
|
|
46
|
+
* @param tone HCT tone, measured from 0 to 100.
|
|
47
|
+
* @return ARGB representation of a color with that tone.
|
|
48
|
+
*/
|
|
49
|
+
tone(tone: number): number;
|
|
50
|
+
/**
|
|
51
|
+
* @param tone HCT tone.
|
|
52
|
+
* @return HCT representation of a color with that tone.
|
|
53
|
+
*/
|
|
54
|
+
getHct(tone: number): Hct;
|
|
55
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
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[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentInternalInstance } from '@vue/runtime-core';
|
|
2
|
+
import { ComponentPublicInstance, InjectionKey, VNode, VNodeChild } from 'vue';
|
|
3
|
+
|
|
4
|
+
export { type EventProp } from './types';
|
|
5
|
+
export * from './props';
|
|
6
|
+
export declare function getSlot(vm: ComponentPublicInstance | any, name?: string, data?: any | (() => any), optional?: boolean): VNode[] | undefined;
|
|
7
|
+
export declare function getUid(): number | undefined;
|
|
8
|
+
export declare function bindClasses(classes: string | string[] | Record<string, any> | undefined): Record<string, boolean>;
|
|
9
|
+
export declare function getHtmlElement<N extends object | undefined>(node: N): Exclude<N, ComponentPublicInstance> | HTMLElement;
|
|
10
|
+
export declare function findChildrenWithProvide(key: InjectionKey<any> | symbol, vnode?: VNodeChild): ComponentInternalInstance[];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { IfAny } from '@vue/shared';
|
|
2
|
+
import { ComponentObjectPropsOptions, ExtractPropTypes, Prop, PropType } from 'vue';
|
|
3
|
+
|
|
4
|
+
export declare function propsFactory<PropsOptions extends ComponentObjectPropsOptions>(props: PropsOptions, source: string): <Defaults extends PartialKeys<PropsOptions> = {}>(defaults?: Defaults) => OverwrittenPropOptions<PropsOptions, Defaults>;
|
|
5
|
+
export declare function chooseProps<PropsOptions extends ComponentObjectPropsOptions>(props: any, target: PropsOptions): ExtractPropTypes<PropsOptions>;
|
|
6
|
+
export declare function hasEventProp(props: Record<string, any>, type: string): boolean;
|
|
7
|
+
type OverwrittenPropOptions<T extends ComponentObjectPropsOptions, D extends PartialKeys<T>> = {
|
|
8
|
+
[P in keyof T]-?: unknown extends D[P] ? T[P] : T[P] extends Record<string, unknown> ? Omit<T[P], 'type' | 'default'> & {
|
|
9
|
+
type: PropType<MergeDefault<T[P], D[P]>>;
|
|
10
|
+
default: MergeDefault<T[P], D[P]>;
|
|
11
|
+
} : {
|
|
12
|
+
type: PropType<MergeDefault<T[P], D[P]>>;
|
|
13
|
+
default: MergeDefault<T[P], D[P]>;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
type MergeDefault<T, D> = unknown extends D ? InferPropType<T> : NonNullable<InferPropType<T>> | D;
|
|
17
|
+
type PartialKeys<T> = {
|
|
18
|
+
[P in keyof T]?: unknown;
|
|
19
|
+
};
|
|
20
|
+
type InferPropType<T> = [T] extends [null] ? any : [T] extends [{
|
|
21
|
+
type: null | true;
|
|
22
|
+
}] ? any : [T] extends [ObjectConstructor | {
|
|
23
|
+
type: ObjectConstructor;
|
|
24
|
+
}] ? Record<string, any> : [T] extends [BooleanConstructor | {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
}] ? boolean : [T] extends [DateConstructor | {
|
|
27
|
+
type: DateConstructor;
|
|
28
|
+
}] ? Date : [T] extends [(infer U)[] | {
|
|
29
|
+
type: (infer U)[];
|
|
30
|
+
}] ? U extends DateConstructor ? Date | InferPropType<U> : InferPropType<U> : [T] extends [Prop<infer V, infer D>] ? unknown extends V ? IfAny<V, V, D> : V : T;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ComponentInternalInstance } from '@vue/runtime-core';
|
|
2
|
+
import { IfAny } from '@vue/shared';
|
|
3
|
+
import { ComponentObjectPropsOptions, ComponentPublicInstance, ExtractPropTypes, InjectionKey, Prop, PropType, VNode, VNodeChild } from 'vue';
|
|
4
|
+
|
|
5
|
+
export declare function getSlot(vm: ComponentPublicInstance | any, name?: string, data?: any | (() => any), optional?: boolean): VNode[] | undefined;
|
|
6
|
+
export declare function getUid(): number | undefined;
|
|
7
|
+
export declare function chooseProps<PropsOptions extends ComponentObjectPropsOptions>(props: any, target: PropsOptions): ExtractPropTypes<PropsOptions>;
|
|
8
|
+
export declare function bindClasses(classes: string | string[] | Record<string, any> | undefined): Record<string, boolean>;
|
|
9
|
+
export declare function getHtmlElement<N extends object | undefined>(node: N): Exclude<N, ComponentPublicInstance> | HTMLElement;
|
|
10
|
+
export declare function findChildrenWithProvide(key: InjectionKey<any> | symbol, vnode?: VNodeChild): ComponentInternalInstance[];
|
|
11
|
+
export declare function propsFactory<PropsOptions extends ComponentObjectPropsOptions>(props: PropsOptions, source: string): <Defaults extends PartialKeys<PropsOptions> = {}>(defaults?: Defaults) => OverwrittenPropOptions<PropsOptions, Defaults>;
|
|
12
|
+
export declare function hasEventProp(props: Record<string, any>, type: string): boolean;
|
|
13
|
+
type OverwrittenPropOptions<T extends ComponentObjectPropsOptions, D extends PartialKeys<T>> = {
|
|
14
|
+
[P in keyof T]-?: unknown extends D[P] ? T[P] : T[P] extends Record<string, unknown> ? Omit<T[P], 'type' | 'default'> & {
|
|
15
|
+
type: PropType<MergeDefault<T[P], D[P]>>;
|
|
16
|
+
default: MergeDefault<T[P], D[P]>;
|
|
17
|
+
} : {
|
|
18
|
+
type: PropType<MergeDefault<T[P], D[P]>>;
|
|
19
|
+
default: MergeDefault<T[P], D[P]>;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
type MergeDefault<T, D> = unknown extends D ? InferPropType<T> : NonNullable<InferPropType<T>> | D;
|
|
23
|
+
type PartialKeys<T> = {
|
|
24
|
+
[P in keyof T]?: unknown;
|
|
25
|
+
};
|
|
26
|
+
type InferPropType<T> = [T] extends [null] ? any : [T] extends [{
|
|
27
|
+
type: null | true;
|
|
28
|
+
}] ? any : [T] extends [ObjectConstructor | {
|
|
29
|
+
type: ObjectConstructor;
|
|
30
|
+
}] ? Record<string, any> : [T] extends [BooleanConstructor | {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
}] ? boolean : [T] extends [DateConstructor | {
|
|
33
|
+
type: DateConstructor;
|
|
34
|
+
}] ? Date : [T] extends [(infer U)[] | {
|
|
35
|
+
type: (infer U)[];
|
|
36
|
+
}] ? U extends DateConstructor ? Date | InferPropType<U> : InferPropType<U> : [T] extends [Prop<infer V, infer D>] ? unknown extends V ? IfAny<V, V, D> : V : T;
|
|
37
|
+
export type EventProp<T extends any[] = any[], F = (...args: T) => any> = F | F[];
|
|
38
|
+
export declare const EventPropOption: <T extends any[] = any[]>() => PropType<EventProp<T, (...args: T) => any>>;
|
|
39
|
+
export {};
|
|
File without changes
|