yuyeon 0.3.5 → 0.3.6-beta.1
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 +2394 -2332
- package/dist/yuyeon.umd.cjs +3 -3
- package/lib/abstract/items.js.map +1 -1
- package/lib/components/alert/YAlert.js +2 -2
- package/lib/components/alert/YAlert.js.map +1 -1
- package/lib/components/badge/YBadge.js.map +1 -1
- package/lib/components/badge/YBadge.scss +87 -87
- package/lib/components/card/YCard.js.map +1 -1
- package/lib/components/checkbox/YCheckbox.js.map +1 -1
- package/lib/components/date-picker/YDateCalendar.js.map +1 -1
- package/lib/components/date-picker/YDatePicker.js.map +1 -1
- package/lib/components/date-picker/YDatePickerControl.js.map +1 -1
- package/lib/components/date-picker/YMonthPicker.js.map +1 -1
- package/lib/components/date-picker/YYearPicker.js.map +1 -1
- package/lib/components/dialog/YDialog.js.map +1 -1
- package/lib/components/divider/YDivider.js.map +1 -1
- package/lib/components/draggable/YDraggable.js.map +1 -1
- package/lib/components/draggable/index.js.map +1 -1
- package/lib/components/dropdown/YDropdown.js.map +1 -1
- package/lib/components/field-input/YFieldInput.js.map +1 -1
- package/lib/components/form/YForm.js.map +1 -1
- package/lib/components/hover/YHover.js.map +1 -1
- package/lib/components/icon/YIcon.js.map +1 -1
- package/lib/components/icons/YIconCheckbox.js.map +1 -1
- package/lib/components/icons/YIconCheckbox.scss +4 -5
- package/lib/components/icons/YIconClear.js.map +1 -1
- package/lib/components/icons/YIconDropdown.js.map +1 -1
- package/lib/components/icons/YIconExpand.js.map +1 -1
- package/lib/components/icons/YIconPageControl.js.map +1 -1
- package/lib/components/icons/YIconSort.js.map +1 -1
- package/lib/components/img/YImg.js +4 -4
- package/lib/components/img/YImg.js.map +1 -1
- package/lib/components/img/index.js.map +1 -1
- package/lib/components/index.js.map +1 -1
- package/lib/components/input/YInput.js.map +1 -1
- package/lib/components/layer/YLayer.js.map +1 -1
- package/lib/components/layer/base.js +2 -2
- package/lib/components/layer/base.js.map +1 -1
- package/lib/components/layer/content.js.map +1 -1
- package/lib/components/list/YListItem.js.map +1 -1
- package/lib/components/menu/YMenu.js +2 -2
- package/lib/components/menu/YMenu.js.map +1 -1
- package/lib/components/panel/YDividePanel.js.map +1 -1
- package/lib/components/panel/YDividePanel.scss +44 -44
- package/lib/components/plate/YPlate.js +2 -2
- package/lib/components/plate/YPlate.js.map +1 -1
- package/lib/components/radio/YRadio.js.map +1 -1
- package/lib/components/radio/YRadioIcon.js.map +1 -1
- package/lib/components/radio/index.js.map +1 -1
- package/lib/components/select/YSelect.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/switch/YSwitch.js.map +1 -1
- package/lib/components/tab/YTab.js.map +1 -1
- package/lib/components/tab/YTabs.js.map +1 -1
- package/lib/components/table/YDataTable.js.map +1 -1
- package/lib/components/table/YDataTableBody.js.map +1 -1
- package/lib/components/table/YDataTableControl.js.map +1 -1
- package/lib/components/table/YDataTableControl.scss +17 -17
- package/lib/components/table/YDataTableLayerRows.js.map +1 -1
- package/lib/components/table/YDataTableServer.js.map +1 -1
- 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.map +1 -1
- package/lib/components/table/composables/provides.js.map +1 -1
- package/lib/components/table/types/item.js.map +1 -1
- package/lib/components/text-ellipsis/YTextEllipsis.js.map +1 -1
- package/lib/components/text-highlighter/YTextHighlighter.js.map +1 -1
- package/lib/components/text-interpolation/YTi.js.map +1 -1
- package/lib/components/tooltip/YTooltip.js +2 -2
- package/lib/components/tooltip/YTooltip.js.map +1 -1
- package/lib/components/tree-view/YTreeView.js +23 -28
- package/lib/components/tree-view/YTreeView.js.map +1 -1
- package/lib/components/tree-view/YTreeViewNode.js +58 -20
- package/lib/components/tree-view/YTreeViewNode.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/composables/choice.js.map +1 -1
- package/lib/composables/coordinate/index.js.map +1 -1
- package/lib/composables/coordinate/levitation.js +2 -2
- package/lib/composables/coordinate/levitation.js.map +1 -1
- package/lib/composables/coordinate/types.js.map +1 -1
- package/lib/composables/defaults/types.js.map +1 -1
- package/lib/composables/form.js.map +1 -1
- package/lib/composables/style-color.js.map +1 -1
- package/lib/composables/theme/index.js.map +1 -1
- package/lib/composables/theme/types.js.map +1 -1
- package/lib/composables/timing.js.map +1 -1
- package/lib/composables/validation.js.map +1 -1
- package/lib/directives/index.js.map +1 -1
- package/lib/directives/plate-wave/index.js +2 -2
- package/lib/directives/plate-wave/index.js.map +1 -1
- package/lib/directives/plate-wave/plate-wave.scss +44 -44
- package/lib/directives/theme-class/index.js.map +1 -1
- 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.map +1 -1
- package/lib/locales/en.js.map +1 -1
- package/lib/locales/ko.js.map +1 -1
- package/lib/styles/settings/_provided.scss +33 -33
- package/lib/styles/theme/index.scss +4 -4
- package/lib/types/index.js.map +1 -1
- package/lib/util/color/apca.js +30 -30
- package/lib/util/color/apca.js.map +1 -1
- package/lib/util/color/const.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 +107 -107
- 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/index.js +12 -12
- package/lib/util/color/index.js.map +1 -1
- package/lib/util/common.js.map +1 -1
- package/lib/util/component/component.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/built-in.js.map +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.map +1 -1
- package/lib/util/dom.js.map +1 -1
- package/lib/util/index.js.map +1 -1
- package/lib/util/string.js.map +1 -1
- package/lib/util/ui.js.map +1 -1
- package/package.json +132 -132
- package/types/components/tree-view/YTreeView.d.ts +18 -26
- package/types/components/tree-view/YTreeViewNode.d.ts +71 -1
- package/types/components/tree-view/tree-view.d.ts +17 -1
- package/types/declares.d.ts +1 -1
- package/types/globals.d.ts +19 -19
- package/types/shims.d.ts +64 -64
|
@@ -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 '../conversion';\n\n/**\n * HCT, hue, chroma, and tone. A color system that provides a perceptually\n * accurate color measurement system that can also accurately render what colors\n * will appear as in different lighting environments.\n */\nexport class Hct {\n /**\n * @param hue 0 <= hue < 360; invalid values are corrected.\n * @param chroma 0 <= chroma < ?; Informally, colorfulness. The color\n * returned may be lower than the requested chroma. Chroma has a different\n * maximum for any given hue and tone.\n * @param tone 0 <= tone <= 100; invalid values are corrected.\n * @return HCT representation of a color in default viewing conditions.\n */\n\n internalHue: number;\n internalChroma: number;\n internalTone: number;\n\n static from(hue: number, chroma: number, tone: number) {\n return new Hct(HctSolver.solveToInt(hue, chroma, tone));\n }\n\n /**\n * @param argb ARGB representation of a color.\n * @return HCT representation of a color in default viewing conditions\n */\n static fromInt(argb: number) {\n return new Hct(argb);\n }\n\n toInt(): number {\n return this.argb;\n }\n\n /**\n * A number, in degrees, representing ex. red, orange, yellow, etc.\n * Ranges from 0 <= hue < 360.\n */\n get hue(): number {\n return this.internalHue;\n }\n\n /**\n * @param newHue 0 <= newHue < 360; invalid values are corrected.\n * Chroma may decrease because chroma has a different maximum for any given\n * hue and tone.\n */\n set hue(newHue: number) {\n this.setInternalState(\n HctSolver.solveToInt(newHue, this.internalChroma, this.internalTone),\n );\n }\n\n get chroma(): number {\n return this.internalChroma;\n }\n\n /**\n * @param newChroma 0 <= newChroma < ?\n * Chroma may decrease because chroma has a different maximum for any given\n * hue and tone.\n */\n set chroma(newChroma: number) {\n this.setInternalState(\n HctSolver.solveToInt(this.internalHue, newChroma, this.internalTone),\n );\n }\n\n /** Lightness. Ranges from 0 to 100. */\n get tone(): number {\n return this.internalTone;\n }\n\n /**\n * @param newTone 0 <= newTone <= 100; invalid valids are corrected.\n * Chroma may decrease because chroma has a different maximum for any given\n * hue and tone.\n */\n set tone(newTone: number) {\n this.setInternalState(\n HctSolver.solveToInt(this.internalHue, this.internalChroma, newTone),\n );\n }\n\n private constructor(private argb: number) {\n const cam = Cam16.fromInt(argb);\n this.internalHue = cam.hue;\n this.internalChroma = cam.chroma;\n this.internalTone = lstarFromArgb(argb);\n this.argb = argb;\n }\n\n private setInternalState(argb: number) {\n const cam = Cam16.fromInt(argb);\n this.internalHue = cam.hue;\n this.internalChroma = cam.chroma;\n this.internalTone = lstarFromArgb(argb);\n this.argb = argb;\n }\n\n /**\n * Translates a color into different [ViewingConditions].\n *\n * Colors change appearance. They look different with lights on versus off,\n * the same color, as in hex code, on white looks different when on black.\n * This is called color relativity, most famously explicated by Josef Albers\n * in Interaction of Color.\n *\n * In color science, color appearance models can account for this and\n * calculate the appearance of a color in different settings. HCT is based on\n * CAM16, a color appearance model, and uses it to make these calculations.\n *\n * See [ViewingConditions.make] for parameters affecting color appearance.\n */\n inViewingConditions(vc: ViewingConditions): Hct {\n // 1. Use CAM16 to find XYZ coordinates of color in specified VC.\n const cam = Cam16.fromInt(this.toInt());\n const viewedInVc = cam.xyzInViewingConditions(vc);\n\n // 2. Create CAM16 of those XYZ coordinates in default VC.\n const recastInVc = Cam16.fromXyzInViewingConditions(\n viewedInVc[0],\n viewedInVc[1],\n viewedInVc[2],\n ViewingConditions.make(),\n );\n\n // 3. Create HCT from:\n // - CAM16 using default VC with XYZ coordinates in specified VC.\n // - L* converted from Y in XYZ coordinates in specified VC.\n const recastHct = Hct.from(\n recastInVc.hue,\n recastInVc.chroma,\n lstarFromY(viewedInVc[1]),\n );\n return recastHct;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,SAeSA,KAAK;AAAA,SACLC,SAAS;AAAA,SACTC,iBAAiB;AAAA,SACjBC,aAAa,EAAEC,UAAU;AAElC;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,GAAG,CAAC;EACf;AACF;AACA;AACA;AACA;AACA;AACA;AACA;;EAME,OAAOC,IAAIA,CAACC,GAAW,EAAEC,MAAc,EAAEC,IAAY,EAAE;IACrD,OAAO,IAAIJ,GAAG,CAACJ,SAAS,CAACS,UAAU,CAACH,GAAG,EAAEC,MAAM,EAAEC,IAAI,CAAC,CAAC;EACzD;;EAEA;AACF;AACA;AACA;EACE,OAAOE,OAAOA,CAACC,IAAY,EAAE;IAC3B,OAAO,IAAIP,GAA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AClB;EAEQI,gBAAgBA,CAACJ,IAAY,EAAE;IACrC,MAAMU,GAAG,GAAGtB,KAAK,CAACW,OAAO,CAACC,IAAI,CAAC;IAC/B,IAAI,CAACE,WAAW,GAAGQ,GAAG,CAACf,GAAG;IAC1B,IAAI,CAACU,cAAc,GAAGK,GAAG,CAACd,MAAM;IAChC,IAAI,CAACU,YAAY,GAAGf,aAAa,CAACS,IAAI,CAAC;IACvC,IAAI,CAACA,IAAI,GAAGA,IAAI;EAClB;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEW,mBAAmBA,CAACC,EAAqB,EAAO;IAC9C;IACA,MAAMF,GAAG,GAAGtB,KAAK,CAACW,OAAO,CAAC,IAAI,CAACE,KAAK,CAAC,CAAC,CAAC;IACvC,MAAMY,UAAU,GAAGH,GAAG,CAACI,sBAAsB,CAACF,EAAE,CAAC;;IAEjD;IACA,MAAMG,UAAU,GAAG3B,KAAK,CAAC4B,0BAA0B,CACjDH,UAAU,CAAC,CAAC,CAAC,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
|
+
{"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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,SAeSA,KAAK;AAAA,SACLC,SAAS;AAAA,SACTC,iBAAiB;AAAA,SACjBC,aAAa,EAAEC,UAAU;AAElC;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,GAAG,CAAC;EACf;AACF;AACA;AACA;AACA;AACA;AACA;AACA;;EAME,OAAOC,IAAIA,CAACC,GAAW,EAAEC,MAAc,EAAEC,IAAY,EAAE;IACrD,OAAO,IAAIJ,GAAG,CAACJ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|
-
* 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
|
|
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
13
|
* */
|
|
14
14
|
import { HEX_COLOR_REGEX, RGBA_REGEX } from "./const.js";
|
|
15
15
|
import { rgbFromHex } from "./conversion.js";
|
|
@@ -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":["/*\n * yuyeon\n * Apache-2.0 license (Copyright 2023 yeonyew)\n *\n * Used Libs\n * - material-color-utilities\n * Apache-2.0 license (Copyright 2021 Google LLC)\n * https://github.com/material-foundation/material-color-utilities\n *\n * - Vuetify\n * MIT license (Copyright (c) 2016-2023 John Jeremy Leider)\n * https://github.com/vuetifyjs/vuetify\n * */\n\nimport { HEX_COLOR_REGEX, RGBA_REGEX } from './const';\nimport { rgbFromHex } from './conversion';\n\nexport function isColorValue(value: string): boolean {\n return RGBA_REGEX.test(value) || HEX_COLOR_REGEX.test(value);\n}\n\nexport function colorRgb(color: string): string {\n if (color?.startsWith('#')) {\n return rgbFromHex(color)?.join(',') || '';\n }\n const RGBA_REGEX = /rgb(a?)\\((?<v>.*)\\)/;\n if (RGBA_REGEX.test(color)) {\n const value = RGBA_REGEX.exec(color)?.[2] || '';\n if (value) {\n const valueArray = value.trim().split(',');\n valueArray.splice(3, 1);\n return valueArray.join(',');\n }\n }\n return '';\n}\n\nexport function isTextColorIsLight(r: number, g: number, b: number): boolean {\n const luminance = 1 - (0.299 * r + 0.587 * g + 0.114 * b) / 255;\n return luminance < 0.5;\n}\n\nexport * from './const';\nexport * from './conversion';\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
|
+
{"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":[]}
|
package/lib/util/common.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","names":["hasOwnProperty","object","property","Object","hasOwn","getNestedValue","obj","path","fallback","last","length","traversObj","undefined","i","mergeDeep","source","arguments","overwrite","arrayFn","ret","key","sourceValue","overwriteValue","Array","isArray","getObjectValueByPath","traversPath","replace","split","getPropertyFromItem","item","value","clamp","min","max","Math","getRangeArr","start","from","v","k","deepEqual","a","b","Date","getTime","props","keys","every","p","isObject","type","isEmpty","target","trim","omit","excludes","forEach","prop","noop","makeEventPromiseLike","event","promise","promiseMethods","method","defineProperty","bind","writable","enumerable"],"sources":["../../src/util/common.ts"],"sourcesContent":["/** biome-ignore-all lint/suspicious/useIterableCallbackReturn: <explanation> */\n\n// biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation>\nexport function hasOwnProperty(object: any, property: string) {\n if (object) {\n return Object.hasOwn(object, property);\n }\n return false;\n}\n\nexport function getNestedValue(\n obj: any,\n path: (string | number)[],\n fallback?: any\n): any {\n const last = path.length - 1;\n let traversObj = obj;\n\n if (last < 0) return traversObj === undefined ? fallback : traversObj;\n\n for (let i = 0; i < last; i += 1) {\n if (traversObj == null) {\n return fallback;\n }\n traversObj = traversObj[path[i]];\n }\n\n if (traversObj == null) return fallback;\n\n return traversObj[path[last]] === undefined\n ? fallback\n : traversObj[path[last]];\n}\n\nexport function mergeDeep(\n source: Record<string, any> = {},\n overwrite: Record<string, any> = {},\n arrayFn?: (source: unknown[], overwrite: unknown[]) => unknown[]\n) {\n const ret = { ...source };\n for (const key in overwrite) {\n const sourceValue = ret[key];\n const overwriteValue = overwrite[key];\n\n if (Array.isArray(sourceValue) && Array.isArray(overwriteValue)) {\n if (arrayFn) {\n ret[key] = arrayFn(sourceValue, overwriteValue);\n continue;\n }\n }\n\n if (typeof sourceValue === \"object\" && typeof overwriteValue === \"object\") {\n ret[key] = mergeDeep(sourceValue, overwriteValue, arrayFn);\n continue;\n }\n\n ret[key] = overwriteValue;\n }\n return ret;\n}\n\nexport function getObjectValueByPath(\n obj: any,\n path: string,\n fallback?: any\n): any {\n // credit: http://stackoverflow.com/questions/6491463/accessing-nested-javascript-objects-with-string-key#comment55278413_6491621\n let traversPath = path;\n if (obj == null || !traversPath || typeof traversPath !== \"string\") {\n return fallback;\n }\n if (obj[traversPath] !== undefined) return obj[traversPath];\n traversPath = traversPath.replace(/\\[(\\w+)\\]/g, \".$1\"); // convert indexes to properties\n traversPath = traversPath.replace(/^\\./, \"\"); // strip a leading dot\n return getNestedValue(obj, traversPath.split(\".\"), fallback);\n}\n\nexport type SelectItemKey =\n | boolean // Ignored\n | string // Lookup by key, can use dot notation for nested objects\n | (string | number)[] // Nested lookup by key, each array item is a key in the next level\n | ((item: Record<string, any>, fallback?: any) => any);\n\nexport function getPropertyFromItem(\n item: any,\n property: SelectItemKey,\n fallback?: any\n): any {\n if (property == null) return item === undefined ? fallback : item;\n\n if (item !== Object(item)) {\n if (typeof property !== \"function\") return fallback;\n\n const value = property(item, fallback);\n\n return typeof value === \"undefined\" ? fallback : value;\n }\n\n if (typeof property === \"string\")\n return getObjectValueByPath(item, property, fallback);\n\n if (Array.isArray(property)) return getNestedValue(item, property, fallback);\n\n if (typeof property !== \"function\") return fallback;\n\n const value = property(item, fallback);\n\n return typeof value === \"undefined\" ? fallback : value;\n}\n\nexport function clamp(value: number, min = 0, max = 1) {\n return Math.max(min, Math.min(max, value));\n}\n\nexport function getRangeArr(length: number, start = 0) {\n return Array.from({ length }, (v, k) => start + k);\n}\n\nexport function deepEqual(a: any, b: any): boolean {\n if (a === b) return true;\n\n if (a instanceof Date && b instanceof Date && a.getTime() !== b.getTime()) {\n return false;\n }\n\n if (a !== Object(a) || b !== Object(b)) {\n return false;\n }\n const props = Object.keys(a);\n if (props.length !== Object.keys(b).length) {\n return false;\n }\n return props.every((p) => deepEqual(a[p], b[p]));\n}\n\nexport function isObject(obj: unknown) {\n const type = typeof obj;\n return obj !== null && (type === \"object\" || type === \"function\");\n}\n\nexport function isEmpty(target: any) {\n return target == null || target?.trim() === \"\";\n}\n\nexport function omit<T extends object, U extends Extract<keyof T, string>>(\n obj: T,\n excludes: U[]\n): Omit<T, U> {\n const ret = { ...obj };\n excludes.forEach((prop) => delete ret[prop]);\n return ret;\n}\n\nexport const noop = () => void 0;\n\nexport function makeEventPromiseLike<T extends Event, P = any>(\n event: T,\n promise: Promise<P>\n): T & Promise<P> {\n const promiseMethods = [\"then\", \"catch\", \"finally\"] as const;\n\n promiseMethods.forEach((method) => {\n Object.defineProperty(event, method, {\n value: promise[method].bind(promise),\n writable: false,\n enumerable: false,\n });\n });\n\n return event as T & Promise<P>;\n}\n"],"mappings":"AAAA;;AAEA;AACA,OAAO,SAASA,cAAcA,CAACC,MAAW,EAAEC,QAAgB,EAAE;EAC5D,IAAID,MAAM,EAAE;IACV,OAAOE,MAAM,CAACC,MAAM,CAACH,MAAM,EAAEC,QAAQ,CAAC;EACxC;EACA,OAAO,KAAK;AACd;AAEA,OAAO,SAASG,cAAcA,CAC5BC,GAAQ,EACRC,IAAyB,EACzBC,QAAc,EACT;EACL,MAAMC,IAAI,GAAGF,IAAI,CAACG,MAAM,GAAG,CAAC;EAC5B,IAAIC,UAAU,GAAGL,GAAG;EAEpB,IAAIG,IAAI,GAAG,CAAC,EAAE,OAAOE,UAAU,KAAKC,SAAS,GAAGJ,QAAQ,GAAGG,UAAU;EAErE,KAAK,IAAIE,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGJ,IAAI,EAAEI,CAAC,IAAI,CAAC,EAAE;IAChC,IAAIF,UAAU,IAAI,IAAI,EAAE;MACtB,OAAOH,QAAQ;IACjB;IACAG,UAAU,GAAGA,UAAU,CAACJ,IAAI,CAACM,CAAC,CAAC,CAAC;EAClC;EAEA,IAAIF,UAAU,IAAI,IAAI,EAAE,OAAOH,QAAQ;EAE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;EACJ,CAAC,CAAC;EAEF,OAAOP,KAAK;AACd","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"common.js","names":["hasOwnProperty","object","property","Object","hasOwn","getNestedValue","obj","path","fallback","last","length","traversObj","undefined","i","mergeDeep","source","arguments","overwrite","arrayFn","ret","key","sourceValue","overwriteValue","Array","isArray","getObjectValueByPath","traversPath","replace","split","getPropertyFromItem","item","value","clamp","min","max","Math","getRangeArr","start","from","v","k","deepEqual","a","b","Date","getTime","props","keys","every","p","isObject","type","isEmpty","target","trim","omit","excludes","forEach","prop","noop","makeEventPromiseLike","event","promise","promiseMethods","method","defineProperty","bind","writable","enumerable"],"sources":["../../src/util/common.ts"],"sourcesContent":["/** biome-ignore-all lint/suspicious/useIterableCallbackReturn: <explanation> */\r\n\r\n// biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation>\r\nexport function hasOwnProperty(object: any, property: string) {\r\n if (object) {\r\n return Object.hasOwn(object, property);\r\n }\r\n return false;\r\n}\r\n\r\nexport function getNestedValue(\r\n obj: any,\r\n path: (string | number)[],\r\n fallback?: any\r\n): any {\r\n const last = path.length - 1;\r\n let traversObj = obj;\r\n\r\n if (last < 0) return traversObj === undefined ? fallback : traversObj;\r\n\r\n for (let i = 0; i < last; i += 1) {\r\n if (traversObj == null) {\r\n return fallback;\r\n }\r\n traversObj = traversObj[path[i]];\r\n }\r\n\r\n if (traversObj == null) return fallback;\r\n\r\n return traversObj[path[last]] === undefined\r\n ? fallback\r\n : traversObj[path[last]];\r\n}\r\n\r\nexport function mergeDeep(\r\n source: Record<string, any> = {},\r\n overwrite: Record<string, any> = {},\r\n arrayFn?: (source: unknown[], overwrite: unknown[]) => unknown[]\r\n) {\r\n const ret = { ...source };\r\n for (const key in overwrite) {\r\n const sourceValue = ret[key];\r\n const overwriteValue = overwrite[key];\r\n\r\n if (Array.isArray(sourceValue) && Array.isArray(overwriteValue)) {\r\n if (arrayFn) {\r\n ret[key] = arrayFn(sourceValue, overwriteValue);\r\n continue;\r\n }\r\n }\r\n\r\n if (typeof sourceValue === \"object\" && typeof overwriteValue === \"object\") {\r\n ret[key] = mergeDeep(sourceValue, overwriteValue, arrayFn);\r\n continue;\r\n }\r\n\r\n ret[key] = overwriteValue;\r\n }\r\n return ret;\r\n}\r\n\r\nexport function getObjectValueByPath(\r\n obj: any,\r\n path: string,\r\n fallback?: any\r\n): any {\r\n // credit: http://stackoverflow.com/questions/6491463/accessing-nested-javascript-objects-with-string-key#comment55278413_6491621\r\n let traversPath = path;\r\n if (obj == null || !traversPath || typeof traversPath !== \"string\") {\r\n return fallback;\r\n }\r\n if (obj[traversPath] !== undefined) return obj[traversPath];\r\n traversPath = traversPath.replace(/\\[(\\w+)\\]/g, \".$1\"); // convert indexes to properties\r\n traversPath = traversPath.replace(/^\\./, \"\"); // strip a leading dot\r\n return getNestedValue(obj, traversPath.split(\".\"), fallback);\r\n}\r\n\r\nexport type SelectItemKey =\r\n | boolean // Ignored\r\n | string // Lookup by key, can use dot notation for nested objects\r\n | (string | number)[] // Nested lookup by key, each array item is a key in the next level\r\n | ((item: Record<string, any>, fallback?: any) => any);\r\n\r\nexport function getPropertyFromItem(\r\n item: any,\r\n property: SelectItemKey,\r\n fallback?: any\r\n): any {\r\n if (property == null) return item === undefined ? fallback : item;\r\n\r\n if (item !== Object(item)) {\r\n if (typeof property !== \"function\") return fallback;\r\n\r\n const value = property(item, fallback);\r\n\r\n return typeof value === \"undefined\" ? fallback : value;\r\n }\r\n\r\n if (typeof property === \"string\")\r\n return getObjectValueByPath(item, property, fallback);\r\n\r\n if (Array.isArray(property)) return getNestedValue(item, property, fallback);\r\n\r\n if (typeof property !== \"function\") return fallback;\r\n\r\n const value = property(item, fallback);\r\n\r\n return typeof value === \"undefined\" ? fallback : value;\r\n}\r\n\r\nexport function clamp(value: number, min = 0, max = 1) {\r\n return Math.max(min, Math.min(max, value));\r\n}\r\n\r\nexport function getRangeArr(length: number, start = 0) {\r\n return Array.from({ length }, (v, k) => start + k);\r\n}\r\n\r\nexport function deepEqual(a: any, b: any): boolean {\r\n if (a === b) return true;\r\n\r\n if (a instanceof Date && b instanceof Date && a.getTime() !== b.getTime()) {\r\n return false;\r\n }\r\n\r\n if (a !== Object(a) || b !== Object(b)) {\r\n return false;\r\n }\r\n const props = Object.keys(a);\r\n if (props.length !== Object.keys(b).length) {\r\n return false;\r\n }\r\n return props.every((p) => deepEqual(a[p], b[p]));\r\n}\r\n\r\nexport function isObject(obj: unknown) {\r\n const type = typeof obj;\r\n return obj !== null && (type === \"object\" || type === \"function\");\r\n}\r\n\r\nexport function isEmpty(target: any) {\r\n return target == null || target?.trim() === \"\";\r\n}\r\n\r\nexport function omit<T extends object, U extends Extract<keyof T, string>>(\r\n obj: T,\r\n excludes: U[]\r\n): Omit<T, U> {\r\n const ret = { ...obj };\r\n excludes.forEach((prop) => delete ret[prop]);\r\n return ret;\r\n}\r\n\r\nexport const noop = () => void 0;\r\n\r\nexport function makeEventPromiseLike<T extends Event, P = any>(\r\n event: T,\r\n promise: Promise<P>\r\n): T & Promise<P> {\r\n const promiseMethods = [\"then\", \"catch\", \"finally\"] as const;\r\n\r\n promiseMethods.forEach((method) => {\r\n Object.defineProperty(event, method, {\r\n value: promise[method].bind(promise),\r\n writable: false,\r\n enumerable: false,\r\n });\r\n });\r\n\r\n return event as T & Promise<P>;\r\n}\r\n"],"mappings":"AAAA;;AAEA;AACA,OAAO,SAASA,cAAcA,CAACC,MAAW,EAAEC,QAAgB,EAAE;EAC5D,IAAID,MAAM,EAAE;IACV,OAAOE,MAAM,CAACC,MAAM,CAACH,MAAM,EAAEC,QAAQ,CAAC;EACxC;EACA,OAAO,KAAK;AACd;AAEA,OAAO,SAASG,cAAcA,CAC5BC,GAAQ,EACRC,IAAyB,EACzBC,QAAc,EACT;EACL,MAAMC,IAAI,GAAGF,IAAI,CAACG,MAAM,GAAG,CAAC;EAC5B,IAAIC,UAAU,GAAGL,GAAG;EAEpB,IAAIG,IAAI,GAAG,CAAC,EAAE,OA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AAQ,EACRC,OAAmB,EACH;EAChB,MAAMC,cAAc,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,CAAU;EAE5DA,cAAc,CAACN,OAAO,CAAEO,MAAM,IAAK;IACjC7D,MAAM,CAAC8D,cAAc,CAACJ,KAAK,EAAEG,MAAM,EAAE;MACnCjC,KAAK,EAAE+B,OAAO,CAACE,MAAM,CAAC,CAACE,IAAI,CAACJ,OAAO,CAAC;MACpCK,QAAQ,EAAE,KAAK;MACfC,UAAU,EAAE;IACd,CAAC,CAAC;EACJ,CAAC,CAAC;EAEF,OAAOP,KAAK;AACd","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","names":["useDefaultsModule","useSuperDefaults","redefineComponent","options","_setup","setup","props","ctx","defaults","value","_props","provideSubDefaults","name","setupBindings","defineFunctionalComponent","context","defineComponent"],"sources":["../../../src/util/component/component.ts"],"sourcesContent":["import type {\n Component,\n ComponentInjectOptions,\n ComponentOptions,\n ComponentOptionsMixin,\n ComponentProvideOptions,\n ComputedOptions,\n DefineComponent,\n Directive,\n EmitsOptions,\n MethodOptions,\n SlotsType,\n} from 'vue';\nimport {\n ComponentObjectPropsOptions,\n ComponentOptionsWithObjectProps,\n ComponentOptionsWithoutProps,\n ExtractDefaultPropTypes,\n ExtractPropTypes,\n FunctionalComponent,\n} from 'vue';\n\nimport {\n useDefaultsModule,\n useSuperDefaults,\n} from '../../composables/defaults';\nimport { EmitsToProps } from './types';\n\ntype ToResolvedProps<Props, Emits extends EmitsOptions> = Readonly<Props> &\n Readonly<EmitsToProps<Emits>>;\n\n// overload 1: no props from options\nfunction redefineComponent<\n // props\n PropsOptions = {},\n //\n RawBindings = {},\n // emits\n E extends EmitsOptions = {},\n EE extends string = string,\n // other options\n Data = {},\n SetupBindings = {},\n Computed extends ComputedOptions = {},\n Methods extends MethodOptions = {},\n Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,\n Extends extends ComponentOptionsMixin = ComponentOptionsMixin,\n InjectOptions extends ComponentInjectOptions = {},\n InjectKeys extends string = string,\n Slots extends SlotsType = {},\n LocalComponents extends Record<string, Component> = {},\n Directives extends Record<string, Directive> = {},\n Exposed extends string = string,\n Provide extends ComponentProvideOptions = ComponentProvideOptions,\n>(\n options: ComponentOptionsWithoutProps<\n PropsOptions,\n RawBindings,\n Data,\n Computed,\n Methods,\n Mixin,\n Extends,\n E,\n EE,\n InjectOptions,\n InjectKeys,\n Slots\n >,\n): DefineComponent<\n PropsOptions,\n RawBindings,\n Data,\n Computed,\n Methods,\n Mixin,\n Extends,\n E,\n EE\n>;\n\n// overload 2: defineComponent with options object, infer props from options\nfunction redefineComponent<\n // props\n PropsOptions = ComponentObjectPropsOptions,\n RawBindings = {},\n // emits\n E extends EmitsOptions = {},\n EE extends string = string,\n // other options\n Data = {},\n SetupBindings = {},\n Computed extends ComputedOptions = {},\n Methods extends MethodOptions = {},\n Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,\n Extends extends ComponentOptionsMixin = ComponentOptionsMixin,\n Defaults = ExtractDefaultPropTypes<PropsOptions>,\n InjectOptions extends {} = {},\n InjectKeys extends string = string,\n Slots extends SlotsType = {},\n LocalComponents extends Record<string, Component> = {},\n Directives extends Record<string, Directive> = {},\n Exposed extends string = string,\n Provide extends ComponentProvideOptions = ComponentProvideOptions,\n>(\n options: ComponentOptionsWithObjectProps<\n PropsOptions,\n RawBindings,\n Data,\n Computed,\n Methods,\n Mixin,\n Extends,\n E,\n EE,\n InjectOptions,\n InjectKeys,\n Slots\n >,\n): DefineComponent<\n PropsOptions,\n RawBindings,\n Data,\n Computed,\n Methods,\n Mixin,\n Extends,\n E,\n EE\n>;\n\nfunction redefineComponent(options: ComponentOptions) {\n options._setup = options._setup ?? options.setup;\n\n if (options._setup) {\n options.setup = function (props, ctx) {\n const defaults = useDefaultsModule();\n // Skip props proxy if defaults are not provided\n if (!defaults.value) return options._setup(props, ctx);\n\n const { props: _props, provideSubDefaults } = useSuperDefaults(\n props,\n options.name,\n defaults,\n );\n\n const setupBindings = options._setup(_props, ctx);\n\n provideSubDefaults();\n\n return setupBindings;\n };\n }\n\n return options;\n}\n\nfunction defineFunctionalComponent<\n T extends FunctionalComponent<Props>,\n PropsOptions = ComponentObjectPropsOptions,\n Defaults = ExtractDefaultPropTypes<PropsOptions>,\n Props = Readonly<ExtractPropTypes<PropsOptions>>,\n>(\n props: PropsOptions,\n context: T,\n): FunctionalComponent<Partial<Defaults> & Omit<Props, keyof Defaults>> {\n context.props = props as any;\n return context as any;\n}\n\nexport { redefineComponent as defineComponent };\n"],"mappings":"SAuBEA,iBAAiB,EACjBC,gBAAgB,+CAOlB;AAkDA;AAkDA,SAASC,iBAAiBA,CAACC,OAAyB,EAAE;EACpDA,OAAO,CAACC,MAAM,GAAGD,OAAO,CAACC,MAAM,IAAID,OAAO,CAACE,KAAK;EAEhD,IAAIF,OAAO,CAACC,MAAM,EAAE;IAClBD,OAAO,CAACE,KAAK,GAAG,UAAUC,KAAK,EAAEC,GAAG,EAAE;MACpC,MAAMC,QAAQ,GAAGR,iBAAiB,CAAC,CAAC;MACpC;MACA,IAAI,CAACQ,QAAQ,CAACC,KAAK,EAAE,OAAON,OAAO,CAACC,MAAM,CAACE,KAAK,EAAEC,GAAG,CAAC;MAEtD,MAAM;QAAED,KAAK,EAAEI,MAAM;QAAEC;MAAmB,CAAC,GAAGV,gBAAgB,CAC5DK,KAAK,EACLH,OAAO,CAACS,IAAI,EACZJ,QACF,CAAC;MAED,MAAMK,aAAa,GAAGV,OAAO,CAACC,MAAM,CAACM,MAAM,EAAEH,GAAG,CAAC;MAEjDI,kBAAkB,CAAC,CAAC;MAEpB,OAAOE,aAAa;IACtB,CAAC;EACH;EAEA,OAAOV,OAAO;AAChB;AAEA,SAASW,yBAAyBA,CAMhCR,KAAmB,EACnBS,OAAU,EAC4D;EACtEA,OAAO,CAACT,KAAK,GAAGA,KAAY;EAC5B,OAAOS,OAAO;AAChB;AAEA,SAASb,iBAAiB,IAAIc,eAAe","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"component.js","names":["useDefaultsModule","useSuperDefaults","redefineComponent","options","_setup","setup","props","ctx","defaults","value","_props","provideSubDefaults","name","setupBindings","defineFunctionalComponent","context","defineComponent"],"sources":["../../../src/util/component/component.ts"],"sourcesContent":["import type {\r\n Component,\r\n ComponentInjectOptions,\r\n ComponentOptions,\r\n ComponentOptionsMixin,\r\n ComponentProvideOptions,\r\n ComputedOptions,\r\n DefineComponent,\r\n Directive,\r\n EmitsOptions,\r\n MethodOptions,\r\n SlotsType,\r\n} from 'vue';\r\nimport {\r\n ComponentObjectPropsOptions,\r\n ComponentOptionsWithObjectProps,\r\n ComponentOptionsWithoutProps,\r\n ExtractDefaultPropTypes,\r\n ExtractPropTypes,\r\n FunctionalComponent,\r\n} from 'vue';\r\n\r\nimport {\r\n useDefaultsModule,\r\n useSuperDefaults,\r\n} from '../../composables/defaults';\r\nimport { EmitsToProps } from './types';\r\n\r\ntype ToResolvedProps<Props, Emits extends EmitsOptions> = Readonly<Props> &\r\n Readonly<EmitsToProps<Emits>>;\r\n\r\n// overload 1: no props from options\r\nfunction redefineComponent<\r\n // props\r\n PropsOptions = {},\r\n //\r\n RawBindings = {},\r\n // emits\r\n E extends EmitsOptions = {},\r\n EE extends string = string,\r\n // other options\r\n Data = {},\r\n SetupBindings = {},\r\n Computed extends ComputedOptions = {},\r\n Methods extends MethodOptions = {},\r\n Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,\r\n Extends extends ComponentOptionsMixin = ComponentOptionsMixin,\r\n InjectOptions extends ComponentInjectOptions = {},\r\n InjectKeys extends string = string,\r\n Slots extends SlotsType = {},\r\n LocalComponents extends Record<string, Component> = {},\r\n Directives extends Record<string, Directive> = {},\r\n Exposed extends string = string,\r\n Provide extends ComponentProvideOptions = ComponentProvideOptions,\r\n>(\r\n options: ComponentOptionsWithoutProps<\r\n PropsOptions,\r\n RawBindings,\r\n Data,\r\n Computed,\r\n Methods,\r\n Mixin,\r\n Extends,\r\n E,\r\n EE,\r\n InjectOptions,\r\n InjectKeys,\r\n Slots\r\n >,\r\n): DefineComponent<\r\n PropsOptions,\r\n RawBindings,\r\n Data,\r\n Computed,\r\n Methods,\r\n Mixin,\r\n Extends,\r\n E,\r\n EE\r\n>;\r\n\r\n// overload 2: defineComponent with options object, infer props from options\r\nfunction redefineComponent<\r\n // props\r\n PropsOptions = ComponentObjectPropsOptions,\r\n RawBindings = {},\r\n // emits\r\n E extends EmitsOptions = {},\r\n EE extends string = string,\r\n // other options\r\n Data = {},\r\n SetupBindings = {},\r\n Computed extends ComputedOptions = {},\r\n Methods extends MethodOptions = {},\r\n Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,\r\n Extends extends ComponentOptionsMixin = ComponentOptionsMixin,\r\n Defaults = ExtractDefaultPropTypes<PropsOptions>,\r\n InjectOptions extends {} = {},\r\n InjectKeys extends string = string,\r\n Slots extends SlotsType = {},\r\n LocalComponents extends Record<string, Component> = {},\r\n Directives extends Record<string, Directive> = {},\r\n Exposed extends string = string,\r\n Provide extends ComponentProvideOptions = ComponentProvideOptions,\r\n>(\r\n options: ComponentOptionsWithObjectProps<\r\n PropsOptions,\r\n RawBindings,\r\n Data,\r\n Computed,\r\n Methods,\r\n Mixin,\r\n Extends,\r\n E,\r\n EE,\r\n InjectOptions,\r\n InjectKeys,\r\n Slots\r\n >,\r\n): DefineComponent<\r\n PropsOptions,\r\n RawBindings,\r\n Data,\r\n Computed,\r\n Methods,\r\n Mixin,\r\n Extends,\r\n E,\r\n EE\r\n>;\r\n\r\nfunction redefineComponent(options: ComponentOptions) {\r\n options._setup = options._setup ?? options.setup;\r\n\r\n if (options._setup) {\r\n options.setup = function (props, ctx) {\r\n const defaults = useDefaultsModule();\r\n // Skip props proxy if defaults are not provided\r\n if (!defaults.value) return options._setup(props, ctx);\r\n\r\n const { props: _props, provideSubDefaults } = useSuperDefaults(\r\n props,\r\n options.name,\r\n defaults,\r\n );\r\n\r\n const setupBindings = options._setup(_props, ctx);\r\n\r\n provideSubDefaults();\r\n\r\n return setupBindings;\r\n };\r\n }\r\n\r\n return options;\r\n}\r\n\r\nfunction defineFunctionalComponent<\r\n T extends FunctionalComponent<Props>,\r\n PropsOptions = ComponentObjectPropsOptions,\r\n Defaults = ExtractDefaultPropTypes<PropsOptions>,\r\n Props = Readonly<ExtractPropTypes<PropsOptions>>,\r\n>(\r\n props: PropsOptions,\r\n context: T,\r\n): FunctionalComponent<Partial<Defaults> & Omit<Props, keyof Defaults>> {\r\n context.props = props as any;\r\n return context as any;\r\n}\r\n\r\nexport { redefineComponent as defineComponent };\r\n"],"mappings":"SAuBEA,iBAAiB,EACjBC,gBAAgB,+CAOlB;AAkDA;AAkDA,SAASC,iBAAiBA,CAACC,OAAyB,EAAE;EACpDA,OAAO,CAACC,MAAM,GAAGD,OAAO,CAACC,MAAM,IAAID,OAAO,CAACE,KAAK;EAEhD,IAAIF,OAAO,CAACC,MAAM,EAAE;IAClBD,OAAO,CAACE,KAAK,GAAG,UAAUC,KAAK,EAAEC,GAAG,EAAE;MACpC,MAAMC,QAAQ,GAAGR,iBAAiB,CAAC,CAAC;MACpC;MACA,IAAI,CAACQ,QAAQ,CAACC,KAAK,EAAE,OAAON,OAAO,CAACC,MAAM,CAACE,KAAK,EAAEC,GAAG,CAAC;MAEtD,MAAM;QAAED,KAAK,EAAEI,MAAM;QAAEC;MAAmB,CAAC,GAAGV,gBAAgB,CAC5DK,KAAK,EACLH,OAAO,CAACS,IAAI,EACZJ,QACF,CAAC;MAED,MAAMK,aAAa,GAAGV,OAAO,CAACC,MAAM,CAACM,MAAM,EAAEH,GAAG,CAAC;MAEjDI,kBAAkB,CAAC,CAAC;MAEpB,OAAOE,aAAa;IACtB,CAAC;EACH;EAEA,OAAOV,OAAO;AAChB;AAEA,SAASW,yBAAyBA,CAMhCR,KAAmB,EACnBS,OAAU,EAC4D;EACtEA,OAAO,CAACT,KAAK,GAAGA,KAAY;EAC5B,OAAOS,OAAO;AAChB;AAEA,SAASb,iBAAiB,IAAIc,eAAe","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inject-self.js","names":["getCurrentInstance","injectSelf","key","vm","arguments","length","undefined","provides"],"sources":["../../../src/util/component/inject-self.ts"],"sourcesContent":["import {\n type ComponentInternalInstance,\n getCurrentInstance,\n type InjectionKey,\n} from 'vue';\n\nexport function injectSelf<T>(\n key: InjectionKey<T> | string,\n vm?: ComponentInternalInstance,\n): T | undefined;\nexport function injectSelf(\n key: InjectionKey<any> | string,\n vm = getCurrentInstance(),\n) {\n const provides = vm?.provides;\n\n if (provides && (key as string | symbol) in provides) {\n return provides[key as string];\n }\n\n return undefined;\n}\n"],"mappings":"AAAA,SAEEA,kBAAkB,QAEb,KAAK;AAMZ,OAAO,SAASC,UAAUA,CACxBC,GAA+B,EAE/B;EAAA,IADAC,EAAE,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGJ,kBAAkB,CAAC,CAAC;EAEzB,MAAMO,QAAQ,GAAGJ,EAAE,EAAEI,QAAQ;EAE7B,IAAIA,QAAQ,IAAKL,GAAG,IAAwBK,QAAQ,EAAE;IACpD,OAAOA,QAAQ,CAACL,GAAG,CAAW;EAChC;EAEA,OAAOI,SAAS;AAClB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"inject-self.js","names":["getCurrentInstance","injectSelf","key","vm","arguments","length","undefined","provides"],"sources":["../../../src/util/component/inject-self.ts"],"sourcesContent":["import {\r\n type ComponentInternalInstance,\r\n getCurrentInstance,\r\n type InjectionKey,\r\n} from 'vue';\r\n\r\nexport function injectSelf<T>(\r\n key: InjectionKey<T> | string,\r\n vm?: ComponentInternalInstance,\r\n): T | undefined;\r\nexport function injectSelf(\r\n key: InjectionKey<any> | string,\r\n vm = getCurrentInstance(),\r\n) {\r\n const provides = vm?.provides;\r\n\r\n if (provides && (key as string | symbol) in provides) {\r\n return provides[key as string];\r\n }\r\n\r\n return undefined;\r\n}\r\n"],"mappings":"AAAA,SAEEA,kBAAkB,QAEb,KAAK;AAMZ,OAAO,SAASC,UAAUA,CACxBC,GAA+B,EAE/B;EAAA,IADAC,EAAE,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGJ,kBAAkB,CAAC,CAAC;EAEzB,MAAMO,QAAQ,GAAGJ,EAAE,EAAEI,QAAQ;EAE7B,IAAIA,QAAQ,IAAKL,GAAG,IAAwBK,QAAQ,EAAE;IACpD,OAAOA,QAAQ,CAACL,GAAG,CAAW;EAChC;EAEA,OAAOI,SAAS;AAClB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.js","names":["capitalize","toKebabCase","propsFactory","props","source","defaults","Object","keys","reduce","options","prop","option","isObjectOption","Array","isArray","objectOption","type","default","chooseProps","target","acc","hasEventProp","onType","propIsDefined","vnode"],"sources":["../../../src/util/component/props.ts"],"sourcesContent":["import type {\n ComponentObjectPropsOptions,\n ExtractPropTypes,\n Prop,\n PropType,\n VNode,\n} from 'vue';\nimport { capitalize } from 'vue';\nimport type { IfAny } from '@vue/shared';\n\nimport { toKebabCase } from '../string';\n\nexport function propsFactory<PropsOptions extends ComponentObjectPropsOptions>(\n props: PropsOptions,\n source: string,\n) {\n return <Defaults extends PartialKeys<PropsOptions> = {}>(\n defaults?: Defaults,\n ): OverwrittenPropOptions<PropsOptions, Defaults> => {\n return Object.keys(props).reduce<any>((options, prop) => {\n const option = props[prop];\n const isObjectOption =\n typeof option === 'object' && option != null && !Array.isArray(option);\n const objectOption = isObjectOption ? option : { type: option };\n if (defaults && prop in defaults) {\n options[prop] = {\n ...objectOption,\n default: defaults[prop],\n };\n } else {\n options[prop] = objectOption;\n }\n\n if (source && !options[prop].source) {\n options[prop].source = source;\n }\n return options;\n }, {} as PropsOptions);\n };\n}\n\nexport function chooseProps<PropsOptions extends ComponentObjectPropsOptions>(\n props: any,\n target: PropsOptions,\n): ExtractPropTypes<PropsOptions> {\n return Object.keys(target).reduce(\n (acc, prop) => {\n if (props && prop in props) {\n acc[prop as keyof ExtractPropTypes<PropsOptions>] = props[prop];\n }\n return acc;\n },\n {} as ExtractPropTypes<PropsOptions>,\n );\n}\n\nexport function hasEventProp(props: Record<string, any>, type: string) {\n const onType = `on${capitalize(type)}`;\n return !!(\n props[onType] ||\n props[`${onType}Once`] ||\n props[`${onType}Capture`] ||\n props[`${onType}OnceCapture`] ||\n props[`${onType}CaptureOnce`]\n );\n}\n\nexport function propIsDefined(vnode: VNode, prop: string) {\n return (\n typeof vnode.props?.[prop] !== 'undefined' ||\n typeof vnode.props?.[toKebabCase(prop)] !== 'undefined'\n );\n}\n\ntype OverwrittenPropOptions<\n T extends ComponentObjectPropsOptions,\n D extends PartialKeys<T>,\n> = {\n [P in keyof T]-?: unknown extends D[P]\n ? T[P]\n : T[P] extends Record<string, unknown>\n ? Omit<T[P], 'type' | 'default'> & {\n type: PropType<MergeDefault<T[P], D[P]>>;\n default: MergeDefault<T[P], D[P]>;\n }\n : {\n type: PropType<MergeDefault<T[P], D[P]>>;\n default: MergeDefault<T[P], D[P]>;\n };\n};\n\ntype MergeDefault<T, D> = unknown extends D\n ? InferPropType<T>\n : NonNullable<InferPropType<T>> | D;\n\ntype FollowPropType<T, P, D> = [T] extends [PropType<unknown>]\n ? T\n : PropType<MergeDefault<P, D>>;\n\ntype PartialKeys<T> = { [P in keyof T]?: unknown };\n\ntype InferPropType<T> = [T] extends [null]\n ? any // null & true would fail to infer\n : [T] extends [{ type: null | true }]\n ? // As TS issue https://github.com/Microsoft/TypeScript/issues/14829\n // somehow `ObjectConstructor` when inferred from { (): T } becomes `any`\n // `BooleanConstructor` when inferred from PropConstructor(with PropMethod) becomes `Boolean`\n any\n : [T] extends [ObjectConstructor | { type: ObjectConstructor }]\n ? Record<string, any>\n : [T] extends [BooleanConstructor | { type: BooleanConstructor }]\n ? boolean\n : [T] extends [DateConstructor | { type: DateConstructor }]\n ? Date\n : [T] extends [(infer U)[] | { type: (infer U)[] }]\n ? U extends DateConstructor\n ? Date | InferPropType<U>\n : InferPropType<U>\n : [T] extends [Prop<infer V, infer D>]\n ? unknown extends V\n ? IfAny<V, V, D>\n : V\n : T;\n"],"mappings":"AAOA,SAASA,UAAU,QAAQ,KAAK;AAAC,SAGxBC,WAAW;AAEpB,OAAO,SAASC,YAAYA,CAC1BC,KAAmB,EACnBC,MAAc,EACd;EACA,OACEC,QAAmB,IACgC;IACnD,OAAOC,MAAM,CAACC,IAAI,CAACJ,KAAK,CAAC,CAACK,MAAM,CAAM,CAACC,OAAO,EAAEC,IAAI,KAAK;MACvD,MAAMC,MAAM,GAAGR,KAAK,CAACO,IAAI,CAAC;MAC1B,MAAME,cAAc,GAClB,OAAOD,MAAM,KAAK,QAAQ,IAAIA,MAAM,IAAI,IAAI,IAAI,CAACE,KAAK,CAACC,OAAO,CAACH,MAAM,CAAC;MACxE,MAAMI,YAAY,GAAGH,cAAc,GAAGD,MAAM,GAAG;QAAEK,IAAI,EAAEL;MAAO,CAAC;MAC/D,IAAIN,QAAQ,IAAIK,IAAI,IAAIL,QAAQ,EAAE;QAChCI,OAAO,CAACC,IAAI,CAAC,GAAG;UACd,GAAGK,YAAY;UACfE,OAAO,EAAEZ,QAAQ,CAACK,IAAI;QACxB,CAAC;MACH,CAAC,MAAM;QACLD,OAAO,CAACC,IAAI,CAAC,GAAGK,YAAY;MAC9B;MAEA,IAAIX,MAAM,IAAI,CAACK,OAAO,CAACC,IAAI,CAAC,CAACN,MAAM,EAAE;QACnCK,OAAO,CAACC,IAAI,CAAC,CAACN,MAAM,GAAGA,MAAM;MAC/B;MACA,OAAOK,OAAO;IAChB,CAAC,EAAE,CAAC,CAAiB,CAAC;EACxB,CAAC;AACH;AAEA,OAAO,SAASS,WAAWA,CACzBf,KAAU,EACVgB,MAAoB,EACY;EAChC,OAAOb,MAAM,CAACC,IAAI,CAACY,MAAM,CAAC,CAACX,MAAM,CAC/B,CAACY,GAAG,EAAEV,IAAI,KAAK;IACb,IAAIP,KAAK,IAAIO,IAAI,IAAIP,KAAK,EAAE;MAC1BiB,GAAG,CAACV,IAAI,CAAyC,GAAGP,KAAK,CAACO,IAAI,CAAC;IACjE;IACA,OAAOU,GAAG;EACZ,CAAC,EACD,CAAC,CACH,CAAC;AACH;AAEA,OAAO,SAASC,YAAYA,CAAClB,KAA0B,EAAEa,IAAY,EAAE;EACrE,MAAMM,MAAM,GAAG,KAAKtB,UAAU,CAACgB,IAAI,CAAC,EAAE;EACtC,OAAO,CAAC,EACNb,KAAK,CAACmB,MAAM,CAAC,IACbnB,KAAK,CAAC,GAAGmB,MAAM,MAAM,CAAC,IACtBnB,KAAK,CAAC,GAAGmB,MAAM,SAAS,CAAC,IACzBnB,KAAK,CAAC,GAAGmB,MAAM,aAAa,CAAC,IAC7BnB,KAAK,CAAC,GAAGmB,MAAM,aAAa,CAAC,CAC9B;AACH;AAEA,OAAO,SAASC,aAAaA,CAACC,KAAY,EAAEd,IAAY,EAAE;EACxD,OACE,OAAOc,KAAK,CAACrB,KAAK,GAAGO,IAAI,CAAC,KAAK,WAAW,IAC1C,OAAOc,KAAK,CAACrB,KAAK,GAAGF,WAAW,CAACS,IAAI,CAAC,CAAC,KAAK,WAAW;AAE3D","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"props.js","names":["capitalize","toKebabCase","propsFactory","props","source","defaults","Object","keys","reduce","options","prop","option","isObjectOption","Array","isArray","objectOption","type","default","chooseProps","target","acc","hasEventProp","onType","propIsDefined","vnode"],"sources":["../../../src/util/component/props.ts"],"sourcesContent":["import type {\r\n ComponentObjectPropsOptions,\r\n ExtractPropTypes,\r\n Prop,\r\n PropType,\r\n VNode,\r\n} from 'vue';\r\nimport { capitalize } from 'vue';\r\nimport type { IfAny } from '@vue/shared';\r\n\r\nimport { toKebabCase } from '../string';\r\n\r\nexport function propsFactory<PropsOptions extends ComponentObjectPropsOptions>(\r\n props: PropsOptions,\r\n source: string,\r\n) {\r\n return <Defaults extends PartialKeys<PropsOptions> = {}>(\r\n defaults?: Defaults,\r\n ): OverwrittenPropOptions<PropsOptions, Defaults> => {\r\n return Object.keys(props).reduce<any>((options, prop) => {\r\n const option = props[prop];\r\n const isObjectOption =\r\n typeof option === 'object' && option != null && !Array.isArray(option);\r\n const objectOption = isObjectOption ? option : { type: option };\r\n if (defaults && prop in defaults) {\r\n options[prop] = {\r\n ...objectOption,\r\n default: defaults[prop],\r\n };\r\n } else {\r\n options[prop] = objectOption;\r\n }\r\n\r\n if (source && !options[prop].source) {\r\n options[prop].source = source;\r\n }\r\n return options;\r\n }, {} as PropsOptions);\r\n };\r\n}\r\n\r\nexport function chooseProps<PropsOptions extends ComponentObjectPropsOptions>(\r\n props: any,\r\n target: PropsOptions,\r\n): ExtractPropTypes<PropsOptions> {\r\n return Object.keys(target).reduce(\r\n (acc, prop) => {\r\n if (props && prop in props) {\r\n acc[prop as keyof ExtractPropTypes<PropsOptions>] = props[prop];\r\n }\r\n return acc;\r\n },\r\n {} as ExtractPropTypes<PropsOptions>,\r\n );\r\n}\r\n\r\nexport function hasEventProp(props: Record<string, any>, type: string) {\r\n const onType = `on${capitalize(type)}`;\r\n return !!(\r\n props[onType] ||\r\n props[`${onType}Once`] ||\r\n props[`${onType}Capture`] ||\r\n props[`${onType}OnceCapture`] ||\r\n props[`${onType}CaptureOnce`]\r\n );\r\n}\r\n\r\nexport function propIsDefined(vnode: VNode, prop: string) {\r\n return (\r\n typeof vnode.props?.[prop] !== 'undefined' ||\r\n typeof vnode.props?.[toKebabCase(prop)] !== 'undefined'\r\n );\r\n}\r\n\r\ntype OverwrittenPropOptions<\r\n T extends ComponentObjectPropsOptions,\r\n D extends PartialKeys<T>,\r\n> = {\r\n [P in keyof T]-?: unknown extends D[P]\r\n ? T[P]\r\n : T[P] extends Record<string, unknown>\r\n ? Omit<T[P], 'type' | 'default'> & {\r\n type: PropType<MergeDefault<T[P], D[P]>>;\r\n default: MergeDefault<T[P], D[P]>;\r\n }\r\n : {\r\n type: PropType<MergeDefault<T[P], D[P]>>;\r\n default: MergeDefault<T[P], D[P]>;\r\n };\r\n};\r\n\r\ntype MergeDefault<T, D> = unknown extends D\r\n ? InferPropType<T>\r\n : NonNullable<InferPropType<T>> | D;\r\n\r\ntype FollowPropType<T, P, D> = [T] extends [PropType<unknown>]\r\n ? T\r\n : PropType<MergeDefault<P, D>>;\r\n\r\ntype PartialKeys<T> = { [P in keyof T]?: unknown };\r\n\r\ntype InferPropType<T> = [T] extends [null]\r\n ? any // null & true would fail to infer\r\n : [T] extends [{ type: null | true }]\r\n ? // As TS issue https://github.com/Microsoft/TypeScript/issues/14829\r\n // somehow `ObjectConstructor` when inferred from { (): T } becomes `any`\r\n // `BooleanConstructor` when inferred from PropConstructor(with PropMethod) becomes `Boolean`\r\n any\r\n : [T] extends [ObjectConstructor | { type: ObjectConstructor }]\r\n ? Record<string, any>\r\n : [T] extends [BooleanConstructor | { type: BooleanConstructor }]\r\n ? boolean\r\n : [T] extends [DateConstructor | { type: DateConstructor }]\r\n ? Date\r\n : [T] extends [(infer U)[] | { type: (infer U)[] }]\r\n ? U extends DateConstructor\r\n ? Date | InferPropType<U>\r\n : InferPropType<U>\r\n : [T] extends [Prop<infer V, infer D>]\r\n ? unknown extends V\r\n ? IfAny<V, V, D>\r\n : V\r\n : T;\r\n"],"mappings":"AAOA,SAASA,UAAU,QAAQ,KAAK;AAAC,SAGxBC,WAAW;AAEpB,OAAO,SAASC,YAAYA,CAC1BC,KAAmB,EACnBC,MAAc,EACd;EACA,OACEC,QAAmB,IACgC;IACnD,OAAOC,MAAM,CAACC,IAAI,CAACJ,KAAK,CAAC,CAACK,MAAM,CAAM,CAACC,OAAO,EAAEC,IAAI,KAAK;MACvD,MAAMC,MAAM,GAAGR,KAAK,CAACO,IAAI,CAAC;MAC1B,MAAME,cAAc,GAClB,OAAOD,MAAM,KAAK,QAAQ,IAAIA,MAAM,IAAI,IAA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,KAAK,CAAC,GAAGmB,MAAM,aAAa,CAAC,CAC9B;AACH;AAEA,OAAO,SAASC,aAAaA,CAACC,KAAY,EAAEd,IAAY,EAAE;EACxD,OACE,OAAOc,KAAK,CAACrB,KAAK,GAAGO,IAAI,CAAC,KAAK,WAAW,IAC1C,OAAOc,KAAK,CAACrB,KAAK,GAAGF,WAAW,CAACS,IAAI,CAAC,CAAC,KAAK,WAAW;AAE3D","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["EventPropOption","Function","Array"],"sources":["../../../src/util/component/types.ts"],"sourcesContent":["import type { EmitsOptions, ObjectEmitsOptions, PropType } from 'vue';\n\nexport type EventProp<T extends any[] = any[], F = (...args: T) => any> =\n | F\n | F[];\n\nexport const EventPropOption = <T extends any[] = any[]>() =>\n [Function, Array] as PropType<EventProp<T>>;\n\nexport type ComponentTypeEmits =\n | ((...args: any[]) => any)\n | Record<string, any[]>;\n\nexport type EmitsToProps<T extends EmitsOptions | ComponentTypeEmits> =\n T extends string[]\n ? {\n [K in `on${Capitalize<T[number]>}`]?: (...args: any[]) => any;\n }\n : T extends ObjectEmitsOptions\n ? {\n [K in string & keyof T as `on${Capitalize<K>}`]?: (\n ...args: T[K] extends (...args: infer P) => any\n ? P\n : T[K] extends null\n ? any[]\n : never\n ) => any;\n }\n : {};\n\nexport type TypeEmitsToOptions<T extends ComponentTypeEmits> = {\n [K in keyof T & string]: T[K] extends [...args: infer Args]\n ? (...args: Args) => any\n : () => any;\n} & (T extends (...args: any[]) => any\n ? ParametersToFns<OverloadParameters<T>>\n : {});\n\ntype ParametersToFns<T extends any[]> = {\n [K in T[0]]: K extends `${infer C}`\n ? (...args: T extends [C, ...infer Args] ? Args : never) => any\n : never;\n};\n\nexport type OverloadParameters<T extends (...args: any[]) => any> = Parameters<\n OverloadUnion<T>\n>;\n\ntype OverloadProps<TOverload> = Pick<TOverload, keyof TOverload>;\n\ntype OverloadUnionRecursive<\n TOverload,\n TPartialOverload = unknown,\n> = TOverload extends (...args: infer TArgs) => infer TReturn\n ? TPartialOverload extends TOverload\n ? never\n :\n | OverloadUnionRecursive<\n TPartialOverload & TOverload,\n TPartialOverload &\n ((...args: TArgs) => TReturn) &\n OverloadProps<TOverload>\n >\n | ((...args: TArgs) => TReturn)\n : never;\n\ntype OverloadUnion<TOverload extends (...args: any[]) => any> = Exclude<\n OverloadUnionRecursive<(() => never) & TOverload>,\n TOverload extends () => never ? never : () => never\n>;\n"],"mappings":"AAMA,OAAO,MAAMA,eAAe,GAAGA,CAAA,KAC7B,CAACC,QAAQ,EAAEC,KAAK,CAA2B","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"types.js","names":["EventPropOption","Function","Array"],"sources":["../../../src/util/component/types.ts"],"sourcesContent":["import type { EmitsOptions, ObjectEmitsOptions, PropType } from 'vue';\r\n\r\nexport type EventProp<T extends any[] = any[], F = (...args: T) => any> =\r\n | F\r\n | F[];\r\n\r\nexport const EventPropOption = <T extends any[] = any[]>() =>\r\n [Function, Array] as PropType<EventProp<T>>;\r\n\r\nexport type ComponentTypeEmits =\r\n | ((...args: any[]) => any)\r\n | Record<string, any[]>;\r\n\r\nexport type EmitsToProps<T extends EmitsOptions | ComponentTypeEmits> =\r\n T extends string[]\r\n ? {\r\n [K in `on${Capitalize<T[number]>}`]?: (...args: any[]) => any;\r\n }\r\n : T extends ObjectEmitsOptions\r\n ? {\r\n [K in string & keyof T as `on${Capitalize<K>}`]?: (\r\n ...args: T[K] extends (...args: infer P) => any\r\n ? P\r\n : T[K] extends null\r\n ? any[]\r\n : never\r\n ) => any;\r\n }\r\n : {};\r\n\r\nexport type TypeEmitsToOptions<T extends ComponentTypeEmits> = {\r\n [K in keyof T & string]: T[K] extends [...args: infer Args]\r\n ? (...args: Args) => any\r\n : () => any;\r\n} & (T extends (...args: any[]) => any\r\n ? ParametersToFns<OverloadParameters<T>>\r\n : {});\r\n\r\ntype ParametersToFns<T extends any[]> = {\r\n [K in T[0]]: K extends `${infer C}`\r\n ? (...args: T extends [C, ...infer Args] ? Args : never) => any\r\n : never;\r\n};\r\n\r\nexport type OverloadParameters<T extends (...args: any[]) => any> = Parameters<\r\n OverloadUnion<T>\r\n>;\r\n\r\ntype OverloadProps<TOverload> = Pick<TOverload, keyof TOverload>;\r\n\r\ntype OverloadUnionRecursive<\r\n TOverload,\r\n TPartialOverload = unknown,\r\n> = TOverload extends (...args: infer TArgs) => infer TReturn\r\n ? TPartialOverload extends TOverload\r\n ? never\r\n :\r\n | OverloadUnionRecursive<\r\n TPartialOverload & TOverload,\r\n TPartialOverload &\r\n ((...args: TArgs) => TReturn) &\r\n OverloadProps<TOverload>\r\n >\r\n | ((...args: TArgs) => TReturn)\r\n : never;\r\n\r\ntype OverloadUnion<TOverload extends (...args: any[]) => any> = Exclude<\r\n OverloadUnionRecursive<(() => never) & TOverload>,\r\n TOverload extends () => never ? never : () => never\r\n>;\r\n"],"mappings":"AAMA,OAAO,MAAMA,eAAe,GAAGA,CAAA,KAC7B,CAACC,QAAQ,EAAEC,KAAK,CAA2B","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"built-in.js","names":["FIRST_DAY_INDEX","AD","AE","AF","AG","AI","AL","AM","AN","AR","AS","AT","AU","AX","AZ","BA","BD","BE","BG","BH","BM","BN","BR","BS","BT","BW","BY","BZ","CA","CH","CL","CM","CN","CO","CR","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","ES","ET","FI","FJ","FO","FR","GB","GE","GF","GP","GR","GT","GU","HK","HN","HR","HU","ID","IE","IL","IN","IQ","IR","IS","IT","JM","JO","JP","KE","KG","KH","KR","KW","KZ","LA","LB","LI","LK","LT","LU","LV","LY","MC","MD","ME","MH","MK","MM","MN","MO","MQ","MT","MV","MX","MY","MZ","NI","NL","NO","NP","NZ","OM","PA","PE","PH","PK","PL","PR","PT","PY","QA","RE","RO","RS","RU","SA","SD","SE","SG","SI","SK","SM","SV","SY","TH","TJ","TM","TR","TT","TW","UA","UM","US","UY","UZ","VA","VE","VI","VN","WS","XK","YE","ZA","ZW","ONE_DAY","YYYY_MM_DD_REGEX","FIRST_SUNDAY","Date","DateUtil","date","value","parsed","test","parseLocalDate","parse","isNaN","format","formatString","locale","formats","neo","formatFunction","options","weekday","day","month","year","timeZone","timeZoneName","Intl","DateTimeFormat","parts","split","map","Number","parseISO","toISO","adapter","toJsDate","getFullYear","getMonth","getDate","getWeekArray","weeks","currentWeek","firstDayOfMonth","startOfMonth","lastDayOfMonth","endOfMonth","firstDayWeekIndex","getDay","slice","toUpperCase","lastDayWeekIndex","i","adjacentDay","setDate","push","length","startOfDay","startOfYear","endOfDay","endOfYear","getYear","getNextMonth","getWeekdays","sundayIndex","Array","keys","getMeridians","amDate","setHours","pmDate","formatter","minute","hour","hour12","replace","trim","isAfter","comparing","getTime","isBefore","isEqual","isSameDay","isSameMonth","isValid","d","isWithinRange","range","addDays","amount","addMonths","setMonth","getDiff","unit","b","c","Math","floor","setYear","setFullYear","getHour","getHours","setHour","getMinute","getMinutes","setMinute","setMinutes"],"sources":["../../../src/util/date/built-in.ts"],"sourcesContent":["import type { DateAdapter, DateFormatOptions } from './types';\n\nconst FIRST_DAY_INDEX: Record<string, number> = {\n AD: 1,\n AE: 6,\n AF: 6,\n AG: 0,\n AI: 1,\n AL: 1,\n AM: 1,\n AN: 1,\n AR: 1,\n AS: 0,\n AT: 1,\n AU: 1,\n AX: 1,\n AZ: 1,\n BA: 1,\n BD: 0,\n BE: 1,\n BG: 1,\n BH: 6,\n BM: 1,\n BN: 1,\n BR: 0,\n BS: 0,\n BT: 0,\n BW: 0,\n BY: 1,\n BZ: 0,\n CA: 0,\n CH: 1,\n CL: 1,\n CM: 1,\n CN: 1,\n CO: 0,\n CR: 1,\n CY: 1,\n CZ: 1,\n DE: 1,\n DJ: 6,\n DK: 1,\n DM: 0,\n DO: 0,\n DZ: 6,\n EC: 1,\n EE: 1,\n EG: 6,\n ES: 1,\n ET: 0,\n FI: 1,\n FJ: 1,\n FO: 1,\n FR: 1,\n GB: 1,\n GE: 1,\n GF: 1,\n GP: 1,\n GR: 1,\n GT: 0,\n GU: 0,\n HK: 0,\n HN: 0,\n HR: 1,\n HU: 1,\n ID: 0,\n IE: 1,\n IL: 0,\n IN: 0,\n IQ: 6,\n IR: 6,\n IS: 1,\n IT: 1,\n JM: 0,\n JO: 6,\n JP: 0,\n KE: 0,\n KG: 1,\n KH: 0,\n KR: 0,\n KW: 6,\n KZ: 1,\n LA: 0,\n LB: 1,\n LI: 1,\n LK: 1,\n LT: 1,\n LU: 1,\n LV: 1,\n LY: 6,\n MC: 1,\n MD: 1,\n ME: 1,\n MH: 0,\n MK: 1,\n MM: 0,\n MN: 1,\n MO: 0,\n MQ: 1,\n MT: 0,\n MV: 5,\n MX: 0,\n MY: 1,\n MZ: 0,\n NI: 0,\n NL: 1,\n NO: 1,\n NP: 0,\n NZ: 1,\n OM: 6,\n PA: 0,\n PE: 0,\n PH: 0,\n PK: 0,\n PL: 1,\n PR: 0,\n PT: 0,\n PY: 0,\n QA: 6,\n RE: 1,\n RO: 1,\n RS: 1,\n RU: 1,\n SA: 0,\n SD: 6,\n SE: 1,\n SG: 0,\n SI: 1,\n SK: 1,\n SM: 1,\n SV: 0,\n SY: 6,\n TH: 0,\n TJ: 1,\n TM: 1,\n TR: 1,\n TT: 0,\n TW: 0,\n UA: 1,\n UM: 0,\n US: 0,\n UY: 1,\n UZ: 1,\n VA: 1,\n VE: 0,\n VI: 0,\n VN: 1,\n WS: 0,\n XK: 1,\n YE: 0,\n ZA: 0,\n ZW: 0,\n};\n\nexport const ONE_DAY = 1000 * 60 * 60 * 24;\nexport const YYYY_MM_DD_REGEX =\n /^([12]\\d{3}-([1-9]|0[1-9]|1[0-2])-([1-9]|0[1-9]|[12]\\d|3[01]))$/;\nexport const FIRST_SUNDAY = new Date(1970, 0, 4);\n\n// biome-ignore lint/complexity/noStaticOnlyClass: <explanation>\nexport class DateUtil {\n static date(value?: any): Date | null {\n if (value == null) return new Date();\n if (value instanceof Date) {\n return value;\n }\n let parsed: number;\n if (typeof value === 'string') {\n if (YYYY_MM_DD_REGEX.test(value)) {\n return DateUtil.parseLocalDate(value);\n } else {\n parsed = Date.parse(value);\n }\n\n if (!isNaN(parsed)) {\n return new Date(parsed);\n }\n }\n return null;\n }\n\n static format(\n value: Date,\n formatString: string,\n locale: string,\n formats?: Record<string, DateFormatOptions>,\n ): string {\n const neo = DateUtil.date(value) ?? new Date();\n const formatFunction = formats?.[formatString];\n\n if (typeof formatFunction === 'function') {\n return formatFunction(neo, formatString, locale);\n }\n\n let options: Intl.DateTimeFormatOptions = {};\n switch (formatString) {\n case 'fullDateWithWeekday':\n options = {\n weekday: 'long',\n day: 'numeric',\n month: 'long',\n year: 'numeric',\n };\n break;\n case 'normalDateWithWeekday':\n options = { weekday: 'short', day: 'numeric', month: 'short' };\n break;\n case 'keyboardDate':\n options = { day: '2-digit', month: '2-digit', year: 'numeric' };\n break;\n case 'monthAndDate':\n options = { month: 'long', day: 'numeric' };\n break;\n case 'monthAndYear':\n options = { month: 'long', year: 'numeric' };\n break;\n case 'year':\n options = { year: 'numeric' };\n break;\n case 'month':\n options = { month: 'long' };\n break;\n case 'monthShort':\n options = { month: 'short' };\n break;\n case 'dayOfMonth':\n options = { day: 'numeric' };\n break;\n case 'shortDate':\n options = { year: '2-digit', month: 'numeric', day: 'numeric' };\n break;\n default:\n options = formatFunction ?? { timeZone: 'UTC', timeZoneName: 'short' };\n }\n\n return new Intl.DateTimeFormat(locale, options).format(neo);\n }\n\n static parseLocalDate(value: string) {\n const parts = value.split('-').map(Number);\n return new Date(parts[0], parts[1] - 1, parts[2]);\n }\n\n static parseISO(value: string): Date {\n const [year, month, day] = value.split('-').map(Number);\n return new Date(year, month - 1, day);\n }\n\n static toISO(adapter: DateAdapter<any>, value: Date): string {\n const date = adapter.toJsDate(value);\n const year = date.getFullYear();\n const month =\n date.getMonth() + 1 < 10\n ? `0${date.getMonth() + 1}`\n : `${date.getMonth() + 1}`;\n const day =\n date.getDate() < 10 ? `0${date.getDate()}` : `${date.getDate()}`;\n return `${year}-${month}-${day}`;\n }\n\n static getWeekArray(date: Date, locale: string) {\n const weeks = [];\n let currentWeek = [];\n const firstDayOfMonth = DateUtil.startOfMonth(date);\n const lastDayOfMonth = DateUtil.endOfMonth(date);\n const firstDayWeekIndex =\n (firstDayOfMonth.getDay() -\n FIRST_DAY_INDEX[locale.slice(-2).toUpperCase()] +\n 7) %\n 7;\n const lastDayWeekIndex =\n (lastDayOfMonth.getDay() -\n FIRST_DAY_INDEX[locale.slice(-2).toUpperCase()] +\n 7) %\n 7;\n // prev month\n for (let i = 0; i < firstDayWeekIndex; i++) {\n const adjacentDay = new Date(firstDayOfMonth);\n adjacentDay.setDate(adjacentDay.getDate() - (firstDayWeekIndex - i));\n currentWeek.push(adjacentDay);\n }\n // this month\n for (let i = 1; i <= lastDayOfMonth.getDate(); i++) {\n currentWeek.push(new Date(date.getFullYear(), date.getMonth(), i));\n // flush full week\n if (currentWeek.length === 7) {\n weeks.push(currentWeek);\n currentWeek = [];\n }\n }\n // next month\n for (let i = 1; i < 7 - lastDayWeekIndex; i++) {\n const adjacentDay = new Date(lastDayOfMonth);\n adjacentDay.setDate(adjacentDay.getDate() + i);\n currentWeek.push(adjacentDay);\n }\n\n if (currentWeek.length > 0) {\n weeks.push(currentWeek);\n }\n\n return weeks;\n }\n\n static startOfMonth(date: Date) {\n return new Date(date.getFullYear(), date.getMonth(), 1);\n }\n\n static endOfMonth(date: Date) {\n return new Date(date.getFullYear(), date.getMonth() + 1, 0);\n }\n\n static startOfDay(date: Date) {\n return new Date(date.getFullYear(), date.getMonth(), date.getDate());\n }\n\n static startOfYear(date: Date) {\n return new Date(date.getFullYear(), 0, 1);\n }\n\n static endOfDay(date: Date) {\n return new Date(\n date.getFullYear(),\n date.getMonth(),\n date.getDate(),\n 23,\n 59,\n 59,\n 999,\n );\n }\n\n static endOfYear(date: Date) {\n return new Date(date.getFullYear(), 11, 31);\n }\n\n static getYear(date: Date) {\n return date.getFullYear();\n }\n\n static getMonth(date: Date): number {\n return date.getMonth();\n }\n\n static getDay(date: Date): number {\n return date.getDate();\n }\n\n static getNextMonth(date: Date) {\n return new Date(date.getFullYear(), date.getMonth() + 1, 1);\n }\n\n static getWeekdays(locale: string) {\n const sundayIndex = FIRST_DAY_INDEX[locale.slice(-2).toUpperCase()] ?? 0;\n return [...Array(7).keys()].map((i) => {\n const weekday = new Date(FIRST_SUNDAY);\n weekday.setDate(FIRST_SUNDAY.getDate() + sundayIndex + i);\n return new Intl.DateTimeFormat(locale, { weekday: 'narrow' }).format(\n weekday,\n );\n });\n }\n\n static getMeridians(locale: string) {\n const amDate = new Date(FIRST_SUNDAY).setHours(11);\n const pmDate = new Date(FIRST_SUNDAY).setHours(13);\n const formatter = Intl.DateTimeFormat(locale, {\n minute: 'numeric',\n hour: 'numeric',\n hour12: true,\n });\n return [\n formatter\n .format(amDate)\n .replace(/\\d+:\\d+/, '')\n .trim(),\n formatter\n .format(pmDate)\n .replace(/\\d+:\\d+/, '')\n .trim(),\n ];\n }\n\n static isAfter(date: Date, comparing: Date): boolean {\n return date.getTime() > comparing.getTime();\n }\n\n static isBefore(date: Date, comparing: Date): boolean {\n return date.getTime() < comparing.getTime();\n }\n\n static isEqual(date: Date, comparing: Date): boolean {\n return date.getTime() === comparing.getTime();\n }\n\n static isSameDay(date: Date, comparing: Date): boolean {\n return (\n date.getDate() === comparing.getDate() &&\n date.getMonth() === comparing.getMonth() &&\n date.getFullYear() === comparing.getFullYear()\n );\n }\n\n static isSameMonth(date: Date, comparing: Date): boolean {\n return !!(\n date.getMonth() === comparing.getMonth() &&\n date.getFullYear() &&\n comparing.getFullYear()\n );\n }\n\n static isValid(date: any): boolean {\n const d = new Date(date);\n return d instanceof Date && !isNaN(d.getTime());\n }\n\n static isWithinRange(date: Date, range: [Date, Date]): boolean {\n return (\n DateUtil.isAfter(date, range[0]) && DateUtil.isBefore(date, range[1])\n );\n }\n\n static addDays(date: Date, amount: number) {\n const d = new Date(date);\n d.setDate(d.getDate() + amount);\n return d;\n }\n\n static addMonths(date: Date, amount: number) {\n const d = new Date(date);\n d.setMonth(d.getMonth() + amount);\n return d;\n }\n\n static getDiff(\n date: Date,\n comparing: string | Date,\n unit?: 'month' | string,\n ): number {\n const b = new Date(date);\n const c = new Date(comparing);\n\n if (unit === 'month') {\n return (\n b.getMonth() - c.getMonth() + (b.getFullYear() - c.getFullYear()) * 12\n );\n }\n\n return Math.floor(b.getTime() - c.getTime()) / ONE_DAY;\n }\n\n static setMonth(date: Date, month: number) {\n const d = new Date(date);\n d.setMonth(month);\n return d;\n }\n\n static setYear(date: Date, year: number) {\n const d = new Date(date);\n d.setFullYear(year);\n return d;\n }\n\n static getHour(date: Date): number {\n return date.getHours();\n }\n\n static setHour(date: Date, hour: number) {\n const d = new Date(date);\n d.setHours(hour);\n return d;\n }\n\n static getMinute(date: Date): number {\n return date.getMinutes();\n }\n\n static setMinute(date: Date, minute: number) {\n const d = new Date(date);\n d.setMinutes(minute);\n return d;\n }\n}\n"],"mappings":"AAEA,MAAMA,eAAuC,GAAG;EAC9CC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACL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AC,GAAGgB,CAAC,CAAChB,OAAO,CAAC,CAAC,CAAC,GAAG7E,OAAO;EACxD;EAEA,OAAOyF,QAAQA,CAACpF,IAAU,EAAEgB,KAAa,EAAE;IACzC,MAAM8D,CAAC,GAAG,IAAIhF,IAAI,CAACE,IAAI,CAAC;IACxB8E,CAAC,CAACM,QAAQ,CAACpE,KAAK,CAAC;IACjB,OAAO8D,CAAC;EACV;EAEA,OAAOa,OAAOA,CAAC3F,IAAU,EAAEiB,IAAY,EAAE;IACvC,MAAM6D,CAAC,GAAG,IAAIhF,IAAI,CAACE,IAAI,CAAC;IACxB8E,CAAC,CAACc,WAAW,CAAC3E,IAAI,CAAC;IACnB,OAAO6D,CAAC;EACV;EAEA,OAAOe,OAAOA,CAAC7F,IAAU,EAAU;IACjC,OAAOA,IAAI,CAAC8F,QAAQ,CAAC,CAAC;EACxB;EAEA,OAAOC,OAAOA,CAAC/F,IAAU,EAAEkE,IAAY,EAAE;IACvC,MAAMY,CAAC,GAAG,IAAIhF,IAAI,CAACE,IAAI,CAAC;IACxB8E,CAAC,CAAChB,QAAQ,CAACI,IAAI,CAAC;IAChB,OAAOY,CAAC;EACV;EAEA,OAAOkB,SAASA,CAAChG,IAAU,EAAU;IACnC,OAAOA,IAAI,CAACiG,UAAU,CAAC,CAAC;EAC1B;EAEA,OAAOC,SAASA,CAAClG,IAAU,EAAEiE,MAAc,EAAE;IAC3C,MAAMa,CAAC,GAAG,IAAIhF,IAAI,CAACE,IAAI,CAAC;IACxB8E,CAAC,CAACqB,UAAU,CAAClC,MAAM,CAAC;IACpB,OAAOa,CAAC;EACV;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"built-in.js","names":["FIRST_DAY_INDEX","AD","AE","AF","AG","AI","AL","AM","AN","AR","AS","AT","AU","AX","AZ","BA","BD","BE","BG","BH","BM","BN","BR","BS","BT","BW","BY","BZ","CA","CH","CL","CM","CN","CO","CR","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","ES","ET","FI","FJ","FO","FR","GB","GE","GF","GP","GR","GT","GU","HK","HN","HR","HU","ID","IE","IL","IN","IQ","IR","IS","IT","JM","JO","JP","KE","KG","KH","KR","KW","KZ","LA","LB","LI","LK","LT","LU","LV","LY","MC","MD","ME","MH","MK","MM","MN","MO","MQ","MT","MV","MX","MY","MZ","NI","NL","NO","NP","NZ","OM","PA","PE","PH","PK","PL","PR","PT","PY","QA","RE","RO","RS","RU","SA","SD","SE","SG","SI","SK","SM","SV","SY","TH","TJ","TM","TR","TT","TW","UA","UM","US","UY","UZ","VA","VE","VI","VN","WS","XK","YE","ZA","ZW","ONE_DAY","YYYY_MM_DD_REGEX","FIRST_SUNDAY","Date","DateUtil","date","value","parsed","test","parseLocalDate","parse","isNaN","format","formatString","locale","formats","neo","formatFunction","options","weekday","day","month","year","timeZone","timeZoneName","Intl","DateTimeFormat","parts","split","map","Number","parseISO","toISO","adapter","toJsDate","getFullYear","getMonth","getDate","getWeekArray","weeks","currentWeek","firstDayOfMonth","startOfMonth","lastDayOfMonth","endOfMonth","firstDayWeekIndex","getDay","slice","toUpperCase","lastDayWeekIndex","i","adjacentDay","setDate","push","length","startOfDay","startOfYear","endOfDay","endOfYear","getYear","getNextMonth","getWeekdays","sundayIndex","Array","keys","getMeridians","amDate","setHours","pmDate","formatter","minute","hour","hour12","replace","trim","isAfter","comparing","getTime","isBefore","isEqual","isSameDay","isSameMonth","isValid","d","isWithinRange","range","addDays","amount","addMonths","setMonth","getDiff","unit","b","c","Math","floor","setYear","setFullYear","getHour","getHours","setHour","getMinute","getMinutes","setMinute","setMinutes"],"sources":["../../../src/util/date/built-in.ts"],"sourcesContent":["import type { DateAdapter, DateFormatOptions } from './types';\r\n\r\nconst FIRST_DAY_INDEX: Record<string, number> = {\r\n AD: 1,\r\n AE: 6,\r\n AF: 6,\r\n AG: 0,\r\n AI: 1,\r\n AL: 1,\r\n AM: 1,\r\n AN: 1,\r\n AR: 1,\r\n AS: 0,\r\n AT: 1,\r\n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 0,\r\n PT: 0,\r\n PY: 0,\r\n QA: 6,\r\n RE: 1,\r\n RO: 1,\r\n RS: 1,\r\n RU: 1,\r\n SA: 0,\r\n SD: 6,\r\n SE: 1,\r\n SG: 0,\r\n SI: 1,\r\n SK: 1,\r\n SM: 1,\r\n SV: 0,\r\n SY: 6,\r\n TH: 0,\r\n TJ: 1,\r\n TM: 1,\r\n TR: 1,\r\n TT: 0,\r\n TW: 0,\r\n UA: 1,\r\n UM: 0,\r\n US: 0,\r\n UY: 1,\r\n UZ: 1,\r\n VA: 1,\r\n VE: 0,\r\n VI: 0,\r\n VN: 1,\r\n WS: 0,\r\n XK: 1,\r\n YE: 0,\r\n ZA: 0,\r\n ZW: 0,\r\n};\r\n\r\nexport const ONE_DAY = 1000 * 60 * 60 * 24;\r\nexport const YYYY_MM_DD_REGEX =\r\n /^([12]\\d{3}-([1-9]|0[1-9]|1[0-2])-([1-9]|0[1-9]|[12]\\d|3[01]))$/;\r\nexport const FIRST_SUNDAY = new Date(1970, 0, 4);\r\n\r\n// biome-ignore lint/complexity/noStaticOnlyClass: <explanation>\r\nexport class DateUtil {\r\n static date(value?: any): Date | null {\r\n if (value == null) return new Date();\r\n if (value instanceof Date) {\r\n return value;\r\n }\r\n let parsed: number;\r\n if (typeof value === 'string') {\r\n if (YYYY_MM_DD_REGEX.test(value)) {\r\n return DateUtil.parseLocalDate(value);\r\n } else {\r\n parsed = Date.parse(value);\r\n }\r\n\r\n if (!isNaN(parsed)) {\r\n return new Date(parsed);\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n static format(\r\n value: Date,\r\n formatString: string,\r\n locale: string,\r\n formats?: Record<string, DateFormatOptions>,\r\n ): string {\r\n const neo = DateUtil.date(value) ?? new Date();\r\n const formatFunction = formats?.[formatString];\r\n\r\n if (typeof formatFunction === 'function') {\r\n return formatFunction(neo, formatString, locale);\r\n }\r\n\r\n let options: Intl.DateTimeFormatOptions = {};\r\n switch (formatString) {\r\n case 'fullDateWithWeekday':\r\n options = {\r\n weekday: 'long',\r\n day: 'numeric',\r\n month: 'long',\r\n year: 'numeric',\r\n };\r\n break;\r\n case 'normalDateWithWeekday':\r\n options = { weekday: 'short', day: 'numeric', month: 'short' };\r\n break;\r\n case 'keyboardDate':\r\n options = { day: '2-digit', month: '2-digit', year: 'numeric' };\r\n break;\r\n case 'monthAndDate':\r\n options = { month: 'long', day: 'numeric' };\r\n break;\r\n case 'monthAndYear':\r\n options = { month: 'long', year: 'numeric' };\r\n break;\r\n case 'year':\r\n options = { year: 'numeric' };\r\n break;\r\n case 'month':\r\n options = { month: 'long' };\r\n break;\r\n case 'monthShort':\r\n options = { month: 'short' };\r\n break;\r\n case 'dayOfMonth':\r\n options = { day: 'numeric' };\r\n break;\r\n case 'shortDate':\r\n options = { year: '2-digit', month: 'numeric', day: 'numeric' };\r\n break;\r\n default:\r\n options = formatFunction ?? { timeZone: 'UTC', timeZoneName: 'short' };\r\n }\r\n\r\n return new Intl.DateTimeFormat(locale, options).format(neo);\r\n }\r\n\r\n static parseLocalDate(value: string) {\r\n const parts = value.split('-').map(Number);\r\n return new Date(parts[0], parts[1] - 1, parts[2]);\r\n }\r\n\r\n static parseISO(value: string): Date {\r\n const [year, month, day] = value.split('-').map(Number);\r\n return new Date(year, month - 1, day);\r\n }\r\n\r\n static toISO(adapter: DateAdapter<any>, value: Date): string {\r\n const date = adapter.toJsDate(value);\r\n const year = date.getFullYear();\r\n const month =\r\n date.getMonth() + 1 < 10\r\n ? `0${date.getMonth() + 1}`\r\n : `${date.getMonth() + 1}`;\r\n const day =\r\n date.getDate() < 10 ? `0${date.getDate()}` : `${date.getDate()}`;\r\n return `${year}-${month}-${day}`;\r\n }\r\n\r\n static getWeekArray(date: Date, locale: string) {\r\n const weeks = [];\r\n let currentWeek = [];\r\n const firstDayOfMonth = DateUtil.startOfMonth(date);\r\n const lastDayOfMonth = DateUtil.endOfMonth(date);\r\n const firstDayWeekIndex =\r\n (firstDayOfMonth.getDay() -\r\n FIRST_DAY_INDEX[locale.slice(-2).toUpperCase()] +\r\n 7) %\r\n 7;\r\n const lastDayWeekIndex =\r\n (lastDayOfMonth.getDay() -\r\n FIRST_DAY_INDEX[locale.slice(-2).toUpperCase()] +\r\n 7) %\r\n 7;\r\n // prev month\r\n for (let i = 0; i < firstDayWeekIndex; i++) {\r\n const adjacentDay = new Date(firstDayOfMonth);\r\n adjacentDay.setDate(adjacentDay.getDate() - (firstDayWeekIndex - i));\r\n currentWeek.push(adjacentDay);\r\n }\r\n // this month\r\n for (let i = 1; i <= lastDayOfMonth.getDate(); i++) {\r\n currentWeek.push(new Date(date.getFullYear(), date.getMonth(), i));\r\n // flush full week\r\n if (currentWeek.length === 7) {\r\n weeks.push(currentWeek);\r\n currentWeek = [];\r\n }\r\n }\r\n // next month\r\n for (let i = 1; i < 7 - lastDayWeekIndex; i++) {\r\n const adjacentDay = new Date(lastDayOfMonth);\r\n adjacentDay.setDate(adjacentDay.getDate() + i);\r\n currentWeek.push(adjacentDay);\r\n }\r\n\r\n if (currentWeek.length > 0) {\r\n weeks.push(currentWeek);\r\n }\r\n\r\n return weeks;\r\n }\r\n\r\n static startOfMonth(date: Date) {\r\n return new Date(date.getFullYear(), date.getMonth(), 1);\r\n }\r\n\r\n static endOfMonth(date: Date) {\r\n return new Date(date.getFullYear(), date.getMonth() + 1, 0);\r\n }\r\n\r\n static startOfDay(date: Date) {\r\n return new Date(date.getFullYear(), date.getMonth(), date.getDate());\r\n }\r\n\r\n static startOfYear(date: Date) {\r\n return new Date(date.getFullYear(), 0, 1);\r\n }\r\n\r\n static endOfDay(date: Date) {\r\n return new Date(\r\n date.getFullYear(),\r\n date.getMonth(),\r\n date.getDate(),\r\n 23,\r\n 59,\r\n 59,\r\n 999,\r\n );\r\n }\r\n\r\n static endOfYear(date: Date) {\r\n return new Date(date.getFullYear(), 11, 31);\r\n }\r\n\r\n static getYear(date: Date) {\r\n return date.getFullYear();\r\n }\r\n\r\n static getMonth(date: Date): number {\r\n return date.getMonth();\r\n }\r\n\r\n static getDay(date: Date): number {\r\n return date.getDate();\r\n }\r\n\r\n static getNextMonth(date: Date) {\r\n return new Date(date.getFullYear(), date.getMonth() + 1, 1);\r\n }\r\n\r\n static getWeekdays(locale: string) {\r\n const sundayIndex = FIRST_DAY_INDEX[locale.slice(-2).toUpperCase()] ?? 0;\r\n return [...Array(7).keys()].map((i) => {\r\n const weekday = new Date(FIRST_SUNDAY);\r\n weekday.setDate(FIRST_SUNDAY.getDate() + sundayIndex + i);\r\n return new Intl.DateTimeFormat(locale, { weekday: 'narrow' }).format(\r\n weekday,\r\n );\r\n });\r\n }\r\n\r\n static getMeridians(locale: string) {\r\n const amDate = new Date(FIRST_SUNDAY).setHours(11);\r\n const pmDate = new Date(FIRST_SUNDAY).setHours(13);\r\n const formatter = Intl.DateTimeFormat(locale, {\r\n minute: 'numeric',\r\n hour: 'numeric',\r\n hour12: true,\r\n });\r\n return [\r\n formatter\r\n .format(amDate)\r\n .replace(/\\d+:\\d+/, '')\r\n .trim(),\r\n formatter\r\n .format(pmDate)\r\n .replace(/\\d+:\\d+/, '')\r\n .trim(),\r\n ];\r\n }\r\n\r\n static isAfter(date: Date, comparing: Date): boolean {\r\n return date.getTime() > comparing.getTime();\r\n }\r\n\r\n static isBefore(date: Date, comparing: Date): boolean {\r\n return date.getTime() < comparing.getTime();\r\n }\r\n\r\n static isEqual(date: Date, comparing: Date): boolean {\r\n return date.getTime() === comparing.getTime();\r\n }\r\n\r\n static isSameDay(date: Date, comparing: Date): boolean {\r\n return (\r\n date.getDate() === comparing.getDate() &&\r\n date.getMonth() === comparing.getMonth() &&\r\n date.getFullYear() === comparing.getFullYear()\r\n );\r\n }\r\n\r\n static isSameMonth(date: Date, comparing: Date): boolean {\r\n return !!(\r\n date.getMonth() === comparing.getMonth() &&\r\n date.getFullYear() &&\r\n comparing.getFullYear()\r\n );\r\n }\r\n\r\n static isValid(date: any): boolean {\r\n const d = new Date(date);\r\n return d instanceof Date && !isNaN(d.getTime());\r\n }\r\n\r\n static isWithinRange(date: Date, range: [Date, Date]): boolean {\r\n return (\r\n DateUtil.isAfter(date, range[0]) && DateUtil.isBefore(date, range[1])\r\n );\r\n }\r\n\r\n static addDays(date: Date, amount: number) {\r\n const d = new Date(date);\r\n d.setDate(d.getDate() + amount);\r\n return d;\r\n }\r\n\r\n static addMonths(date: Date, amount: number) {\r\n const d = new Date(date);\r\n d.setMonth(d.getMonth() + amount);\r\n return d;\r\n }\r\n\r\n static getDiff(\r\n date: Date,\r\n comparing: string | Date,\r\n unit?: 'month' | string,\r\n ): number {\r\n const b = new Date(date);\r\n const c = new Date(comparing);\r\n\r\n if (unit === 'month') {\r\n return (\r\n b.getMonth() - c.getMonth() + (b.getFullYear() - c.getFullYear()) * 12\r\n );\r\n }\r\n\r\n return Math.floor(b.getTime() - c.getTime()) / ONE_DAY;\r\n }\r\n\r\n static setMonth(date: Date, month: number) {\r\n const d = new Date(date);\r\n d.setMonth(month);\r\n return d;\r\n }\r\n\r\n static setYear(date: Date, year: number) {\r\n const d = new Date(date);\r\n d.setFullYear(year);\r\n return d;\r\n }\r\n\r\n static getHour(date: Date): number {\r\n return date.getHours();\r\n }\r\n\r\n static setHour(date: Date, hour: number) {\r\n const d = new Date(date);\r\n d.setHours(hour);\r\n return d;\r\n }\r\n\r\n static getMinute(date: Date): number {\r\n return date.getMinutes();\r\n }\r\n\r\n static setMinute(date: Date, minute: number) {\r\n const d = new Date(date);\r\n d.setMinutes(minute);\r\n return d;\r\n }\r\n}\r\n"],"mappings":"AAEA,MAAMA,eAAuC,GAAG;EAC9CC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;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C;EACV;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["YuyeonDateAdapter","createDateAdapter"],"sources":["../../../src/util/date/index.ts"],"sourcesContent":["export { YuyeonDateAdapter } from './adapters/yuyeon-date-adapter';\nexport * from './built-in';\n\nexport function createDateAdapter() {}\n"],"mappings":"SAASA,iBAAiB;AAAA;AAG1B,OAAO,SAASC,iBAAiBA,CAAA,EAAG,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["YuyeonDateAdapter","createDateAdapter"],"sources":["../../../src/util/date/index.ts"],"sourcesContent":["export { YuyeonDateAdapter } from './adapters/yuyeon-date-adapter';\r\nexport * from './built-in';\r\n\r\nexport function createDateAdapter() {}\r\n"],"mappings":"SAASA,iBAAiB;AAAA;AAG1B,OAAO,SAASC,iBAAiBA,CAAA,EAAG,CAAC","ignoreList":[]}
|