@elastic/eui-theme-common 0.0.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/LICENSE.txt +6 -0
- package/README.md +11 -0
- package/lib/cjs/.tsbuildinfo +1 -0
- package/lib/cjs/global_styling/functions/index.d.ts +2 -0
- package/lib/cjs/global_styling/functions/index.d.ts.map +1 -0
- package/lib/cjs/global_styling/functions/index.js +22 -0
- package/lib/cjs/global_styling/functions/index.js.map +1 -0
- package/lib/cjs/global_styling/functions/size.d.ts +13 -0
- package/lib/cjs/global_styling/functions/size.d.ts.map +1 -0
- package/lib/cjs/global_styling/functions/size.js +42 -0
- package/lib/cjs/global_styling/functions/size.js.map +1 -0
- package/lib/cjs/global_styling/index.d.ts +4 -0
- package/lib/cjs/global_styling/index.d.ts.map +1 -0
- package/lib/cjs/global_styling/index.js +44 -0
- package/lib/cjs/global_styling/index.js.map +1 -0
- package/lib/cjs/global_styling/types.d.ts +66 -0
- package/lib/cjs/global_styling/types.d.ts.map +1 -0
- package/lib/cjs/global_styling/types.js +21 -0
- package/lib/cjs/global_styling/types.js.map +1 -0
- package/lib/cjs/global_styling/variables/_colors_vis.d.ts +13 -0
- package/lib/cjs/global_styling/variables/_colors_vis.d.ts.map +1 -0
- package/lib/cjs/global_styling/variables/_colors_vis.js +69 -0
- package/lib/cjs/global_styling/variables/_colors_vis.js.map +1 -0
- package/lib/cjs/global_styling/variables/animations.d.ts +36 -0
- package/lib/cjs/global_styling/variables/animations.d.ts.map +1 -0
- package/lib/cjs/global_styling/variables/animations.js +38 -0
- package/lib/cjs/global_styling/variables/animations.js.map +1 -0
- package/lib/cjs/global_styling/variables/borders.d.ts +61 -0
- package/lib/cjs/global_styling/variables/borders.d.ts.map +1 -0
- package/lib/cjs/global_styling/variables/borders.js +7 -0
- package/lib/cjs/global_styling/variables/borders.js.map +1 -0
- package/lib/cjs/global_styling/variables/breakpoint.d.ts +15 -0
- package/lib/cjs/global_styling/variables/breakpoint.d.ts.map +1 -0
- package/lib/cjs/global_styling/variables/breakpoint.js +23 -0
- package/lib/cjs/global_styling/variables/breakpoint.js.map +1 -0
- package/lib/cjs/global_styling/variables/buttons.d.ts +44 -0
- package/lib/cjs/global_styling/variables/buttons.d.ts.map +1 -0
- package/lib/cjs/global_styling/variables/buttons.js +7 -0
- package/lib/cjs/global_styling/variables/buttons.js.map +1 -0
- package/lib/cjs/global_styling/variables/colors.d.ts +245 -0
- package/lib/cjs/global_styling/variables/colors.d.ts.map +1 -0
- package/lib/cjs/global_styling/variables/colors.js +7 -0
- package/lib/cjs/global_styling/variables/colors.js.map +1 -0
- package/lib/cjs/global_styling/variables/components.d.ts +69 -0
- package/lib/cjs/global_styling/variables/components.d.ts.map +1 -0
- package/lib/cjs/global_styling/variables/components.js +7 -0
- package/lib/cjs/global_styling/variables/components.js.map +1 -0
- package/lib/cjs/global_styling/variables/forms.d.ts +20 -0
- package/lib/cjs/global_styling/variables/forms.d.ts.map +1 -0
- package/lib/cjs/global_styling/variables/forms.js +7 -0
- package/lib/cjs/global_styling/variables/forms.js.map +1 -0
- package/lib/cjs/global_styling/variables/index.d.ts +14 -0
- package/lib/cjs/global_styling/variables/index.d.ts.map +1 -0
- package/lib/cjs/global_styling/variables/index.js +154 -0
- package/lib/cjs/global_styling/variables/index.js.map +1 -0
- package/lib/cjs/global_styling/variables/levels.d.ts +39 -0
- package/lib/cjs/global_styling/variables/levels.d.ts.map +1 -0
- package/lib/cjs/global_styling/variables/levels.js +33 -0
- package/lib/cjs/global_styling/variables/levels.js.map +1 -0
- package/lib/cjs/global_styling/variables/shadow.d.ts +11 -0
- package/lib/cjs/global_styling/variables/shadow.d.ts.map +1 -0
- package/lib/cjs/global_styling/variables/shadow.js +27 -0
- package/lib/cjs/global_styling/variables/shadow.js.map +1 -0
- package/lib/cjs/global_styling/variables/size.d.ts +26 -0
- package/lib/cjs/global_styling/variables/size.d.ts.map +1 -0
- package/lib/cjs/global_styling/variables/size.js +17 -0
- package/lib/cjs/global_styling/variables/size.js.map +1 -0
- package/lib/cjs/global_styling/variables/states.d.ts +25 -0
- package/lib/cjs/global_styling/variables/states.d.ts.map +1 -0
- package/lib/cjs/global_styling/variables/states.js +7 -0
- package/lib/cjs/global_styling/variables/states.js.map +1 -0
- package/lib/cjs/global_styling/variables/typography.d.ts +93 -0
- package/lib/cjs/global_styling/variables/typography.d.ts.map +1 -0
- package/lib/cjs/global_styling/variables/typography.js +48 -0
- package/lib/cjs/global_styling/variables/typography.js.map +1 -0
- package/lib/cjs/index.d.ts +4 -0
- package/lib/cjs/index.d.ts.map +1 -0
- package/lib/cjs/index.js +44 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/types.d.ts +33 -0
- package/lib/cjs/types.d.ts.map +1 -0
- package/lib/cjs/types.js +7 -0
- package/lib/cjs/types.js.map +1 -0
- package/lib/cjs/utils.d.ts +104 -0
- package/lib/cjs/utils.d.ts.map +1 -0
- package/lib/cjs/utils.js +382 -0
- package/lib/cjs/utils.js.map +1 -0
- package/lib/cjs/utils.test.js +411 -0
- package/lib/cjs/utils.test.js.map +1 -0
- package/lib/esm/.tsbuildinfo +1 -0
- package/lib/esm/global_styling/functions/index.d.ts +1 -0
- package/lib/esm/global_styling/functions/index.js +9 -0
- package/lib/esm/global_styling/functions/index.js.map +1 -0
- package/lib/esm/global_styling/functions/size.d.ts +12 -0
- package/lib/esm/global_styling/functions/size.js +21 -0
- package/lib/esm/global_styling/functions/size.js.map +1 -0
- package/lib/esm/global_styling/index.d.ts +3 -0
- package/lib/esm/global_styling/index.js +11 -0
- package/lib/esm/global_styling/index.js.map +1 -0
- package/lib/esm/global_styling/types.d.ts +65 -0
- package/lib/esm/global_styling/types.js +13 -0
- package/lib/esm/global_styling/types.js.map +1 -0
- package/lib/esm/global_styling/variables/_colors_vis.d.ts +12 -0
- package/lib/esm/global_styling/variables/_colors_vis.js +60 -0
- package/lib/esm/global_styling/variables/_colors_vis.js.map +1 -0
- package/lib/esm/global_styling/variables/animations.d.ts +35 -0
- package/lib/esm/global_styling/variables/animations.js +25 -0
- package/lib/esm/global_styling/variables/animations.js.map +1 -0
- package/lib/esm/global_styling/variables/borders.d.ts +60 -0
- package/lib/esm/global_styling/variables/borders.js +9 -0
- package/lib/esm/global_styling/variables/borders.js.map +1 -0
- package/lib/esm/global_styling/variables/breakpoint.d.ts +14 -0
- package/lib/esm/global_styling/variables/breakpoint.js +9 -0
- package/lib/esm/global_styling/variables/breakpoint.js.map +1 -0
- package/lib/esm/global_styling/variables/buttons.d.ts +43 -0
- package/lib/esm/global_styling/variables/buttons.js +9 -0
- package/lib/esm/global_styling/variables/buttons.js.map +1 -0
- package/lib/esm/global_styling/variables/colors.d.ts +244 -0
- package/lib/esm/global_styling/variables/colors.js +9 -0
- package/lib/esm/global_styling/variables/colors.js.map +1 -0
- package/lib/esm/global_styling/variables/components.d.ts +68 -0
- package/lib/esm/global_styling/variables/components.js +9 -0
- package/lib/esm/global_styling/variables/components.js.map +1 -0
- package/lib/esm/global_styling/variables/forms.d.ts +19 -0
- package/lib/esm/global_styling/variables/forms.js +9 -0
- package/lib/esm/global_styling/variables/forms.js.map +1 -0
- package/lib/esm/global_styling/variables/index.d.ts +13 -0
- package/lib/esm/global_styling/variables/index.js +21 -0
- package/lib/esm/global_styling/variables/index.js.map +1 -0
- package/lib/esm/global_styling/variables/levels.d.ts +38 -0
- package/lib/esm/global_styling/variables/levels.js +34 -0
- package/lib/esm/global_styling/variables/levels.js.map +1 -0
- package/lib/esm/global_styling/variables/shadow.d.ts +10 -0
- package/lib/esm/global_styling/variables/shadow.js +19 -0
- package/lib/esm/global_styling/variables/shadow.js.map +1 -0
- package/lib/esm/global_styling/variables/size.d.ts +25 -0
- package/lib/esm/global_styling/variables/size.js +20 -0
- package/lib/esm/global_styling/variables/size.js.map +1 -0
- package/lib/esm/global_styling/variables/states.d.ts +24 -0
- package/lib/esm/global_styling/variables/states.js +9 -0
- package/lib/esm/global_styling/variables/states.js.map +1 -0
- package/lib/esm/global_styling/variables/typography.d.ts +92 -0
- package/lib/esm/global_styling/variables/typography.js +35 -0
- package/lib/esm/global_styling/variables/typography.js.map +1 -0
- package/lib/esm/index.d.ts +3 -0
- package/lib/esm/index.js +11 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/types.d.ts +32 -0
- package/lib/esm/types.js +9 -0
- package/lib/esm/types.js.map +1 -0
- package/lib/esm/utils.d.ts +103 -0
- package/lib/esm/utils.js +300 -0
- package/lib/esm/utils.js.map +1 -0
- package/lib/esm/utils.test.d.ts +1 -0
- package/lib/esm/utils.test.js +233 -0
- package/lib/esm/utils.test.js.map +1 -0
- package/licenses/ELASTIC-LICENSE-2.0.md +93 -0
- package/licenses/SSPL-LICENSE.md +557 -0
- package/package.json +78 -0
- package/src/global_styling/functions/_colors.scss +138 -0
- package/src/global_styling/functions/_index.scss +5 -0
- package/src/global_styling/functions/_math.scss +1 -0
- package/src/global_styling/functions/_math_pow.scss +82 -0
- package/src/global_styling/index.scss +18 -0
- package/src/global_styling/mixins/_button.scss +149 -0
- package/src/global_styling/mixins/_form.scss +273 -0
- package/src/global_styling/mixins/_helpers.scss +126 -0
- package/src/global_styling/mixins/_index.scss +14 -0
- package/src/global_styling/mixins/_link.scss +11 -0
- package/src/global_styling/mixins/_loading.scss +6 -0
- package/src/global_styling/mixins/_panel.scss +55 -0
- package/src/global_styling/mixins/_range.scss +62 -0
- package/src/global_styling/mixins/_responsive.scss +44 -0
- package/src/global_styling/mixins/_shadow.scss +108 -0
- package/src/global_styling/mixins/_size.scss +4 -0
- package/src/global_styling/mixins/_states.scss +50 -0
- package/src/global_styling/mixins/_tool_tip.scss +25 -0
- package/src/global_styling/mixins/_typography.scss +167 -0
- package/src/global_styling/react_date_picker/_date_picker.scss +772 -0
- package/src/global_styling/react_date_picker/_index.scss +2 -0
- package/src/global_styling/react_date_picker/_variables.scss +1 -0
- package/src/global_styling/utility/_animations.scss +55 -0
- package/src/global_styling/utility/_index.scss +1 -0
- package/src/global_styling/variables/_animations.scss +13 -0
- package/src/global_styling/variables/_borders.scss +11 -0
- package/src/global_styling/variables/_buttons.scss +18 -0
- package/src/global_styling/variables/_colors_vis.scss +72 -0
- package/src/global_styling/variables/_font_weight.scss +10 -0
- package/src/global_styling/variables/_form.scss +8 -0
- package/src/global_styling/variables/_index.scss +23 -0
- package/src/global_styling/variables/_responsive.scss +9 -0
- package/src/global_styling/variables/_shadows.scss +2 -0
- package/src/global_styling/variables/_size.scss +15 -0
- package/src/global_styling/variables/_states.scss +14 -0
- package/src/global_styling/variables/_typography.scss +75 -0
- package/src/global_styling/variables/_z_index.scss +34 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Font units of measure
|
|
4
|
+
*/
|
|
5
|
+
export declare const EuiThemeFontUnits: readonly ["rem", "px", "em"];
|
|
6
|
+
export declare type _EuiThemeFontUnit = (typeof EuiThemeFontUnits)[number];
|
|
7
|
+
export declare const EuiThemeFontScales: readonly ["xxxs", "xxs", "xs", "s", "m", "l", "xl", "xxl"];
|
|
8
|
+
export declare type _EuiThemeFontScale = (typeof EuiThemeFontScales)[number];
|
|
9
|
+
export declare type _EuiThemeFontScales = Record<_EuiThemeFontScale, number>;
|
|
10
|
+
export declare type _EuiThemeFontBase = {
|
|
11
|
+
/**
|
|
12
|
+
* The whole font family stack for all parts of the UI.
|
|
13
|
+
* We encourage only customizing the first font in the stack.
|
|
14
|
+
*/
|
|
15
|
+
family: string;
|
|
16
|
+
/**
|
|
17
|
+
* The font family used for monospace UI elements like EuiCode
|
|
18
|
+
*/
|
|
19
|
+
familyCode?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The font family used for serif UI elements like blockquotes within EuiText
|
|
22
|
+
*/
|
|
23
|
+
familySerif?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Controls advanced features OpenType fonts.
|
|
26
|
+
* https://developer.mozilla.org/en-US/docs/Web/CSS/font-feature-settings
|
|
27
|
+
*/
|
|
28
|
+
featureSettings?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Sets the default units used for font size & line height set by UI components
|
|
31
|
+
* like EuiText or EuiTitle. Defaults to `rem`.
|
|
32
|
+
*
|
|
33
|
+
* NOTE: This may overridden by some internal usages, e.g.
|
|
34
|
+
* EuiText's `relative` size which must use `em`.
|
|
35
|
+
*
|
|
36
|
+
* @default 'rem'
|
|
37
|
+
*/
|
|
38
|
+
defaultUnits: _EuiThemeFontUnit;
|
|
39
|
+
/**
|
|
40
|
+
* A computed number that is 1/4 of `base`
|
|
41
|
+
*/
|
|
42
|
+
baseline: number;
|
|
43
|
+
/**
|
|
44
|
+
* Establishes the ideal line-height percentage, but it is the `baseline` integer that establishes the final pixel/rem value
|
|
45
|
+
*/
|
|
46
|
+
lineHeightMultiplier: number;
|
|
47
|
+
};
|
|
48
|
+
export declare const EuiThemeFontWeights: readonly ["light", "regular", "medium", "semiBold", "bold"];
|
|
49
|
+
export declare type _EuiThemeFontWeight = (typeof EuiThemeFontWeights)[number];
|
|
50
|
+
export declare type _EuiThemeFontWeights = {
|
|
51
|
+
/** - Default value: 300 */
|
|
52
|
+
light: CSSProperties['fontWeight'];
|
|
53
|
+
/** - Default value: 400 */
|
|
54
|
+
regular: CSSProperties['fontWeight'];
|
|
55
|
+
/** - Default value: 500 */
|
|
56
|
+
medium: CSSProperties['fontWeight'];
|
|
57
|
+
/** - Default value: 600 */
|
|
58
|
+
semiBold: CSSProperties['fontWeight'];
|
|
59
|
+
/** - Default value: 700 */
|
|
60
|
+
bold: CSSProperties['fontWeight'];
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Body / Base styles
|
|
64
|
+
*/
|
|
65
|
+
export interface _EuiThemeBody {
|
|
66
|
+
/**
|
|
67
|
+
* A sizing key from one of the font scales to set as the base body font-size
|
|
68
|
+
*/
|
|
69
|
+
scale: _EuiThemeFontScale;
|
|
70
|
+
/**
|
|
71
|
+
* A font weight key for setting the base body weight
|
|
72
|
+
*/
|
|
73
|
+
weight: keyof _EuiThemeFontWeights;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Title styles
|
|
77
|
+
*/
|
|
78
|
+
export interface _EuiThemeTitle {
|
|
79
|
+
/**
|
|
80
|
+
* A font weight key for setting the base weight for titles and headings
|
|
81
|
+
*/
|
|
82
|
+
weight: keyof _EuiThemeFontWeights;
|
|
83
|
+
}
|
|
84
|
+
export declare type _EuiThemeFont = _EuiThemeFontBase & {
|
|
85
|
+
scale: _EuiThemeFontScales;
|
|
86
|
+
/**
|
|
87
|
+
* @see {@link https://eui.elastic.co/#/theming/typography/values%23font-weight | Reference} for more information
|
|
88
|
+
*/
|
|
89
|
+
weight: _EuiThemeFontWeights;
|
|
90
|
+
body: _EuiThemeBody;
|
|
91
|
+
title: _EuiThemeTitle;
|
|
92
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Font units of measure
|
|
10
|
+
*/
|
|
11
|
+
export const EuiThemeFontUnits = ['rem', 'px', 'em'];
|
|
12
|
+
/*
|
|
13
|
+
* Font scale
|
|
14
|
+
*/
|
|
15
|
+
export const EuiThemeFontScales = [
|
|
16
|
+
'xxxs',
|
|
17
|
+
'xxs',
|
|
18
|
+
'xs',
|
|
19
|
+
's',
|
|
20
|
+
'm',
|
|
21
|
+
'l',
|
|
22
|
+
'xl',
|
|
23
|
+
'xxl',
|
|
24
|
+
];
|
|
25
|
+
/*
|
|
26
|
+
* Font weights
|
|
27
|
+
*/
|
|
28
|
+
export const EuiThemeFontWeights = [
|
|
29
|
+
'light',
|
|
30
|
+
'regular',
|
|
31
|
+
'medium',
|
|
32
|
+
'semiBold',
|
|
33
|
+
'bold',
|
|
34
|
+
];
|
|
35
|
+
//# sourceMappingURL=typography.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typography.js","sourceRoot":"","sources":["../../../../src/global_styling/variables/typography.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;GAEG;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAU,CAAC;AAI9D;;GAEG;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,MAAM;IACN,KAAK;IACL,IAAI;IACJ,GAAG;IACH,GAAG;IACH,GAAG;IACH,IAAI;IACJ,KAAK;CACG,CAAC;AAiDX;;GAEG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,OAAO;IACP,SAAS;IACT,QAAQ;IACR,UAAU;IACV,MAAM;CACE,CAAC"}
|
package/lib/esm/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
export * from './global_styling';
|
|
9
|
+
export * from './types';
|
|
10
|
+
export * from './utils';
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,kBAAkB,CAAC;AAEjC,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Like `keyof typeof`, but for getting values instead of keys
|
|
3
|
+
* ValueOf<typeof {key1: 'value1', key2: 'value2'}>
|
|
4
|
+
* Results in `'value1' | 'value2'`
|
|
5
|
+
*/
|
|
6
|
+
export declare type ValueOf<T> = T[keyof T];
|
|
7
|
+
/**
|
|
8
|
+
* Replaces all properties on any type as optional, includes nested types
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* interface Person {
|
|
13
|
+
* name: string;
|
|
14
|
+
* age?: number;
|
|
15
|
+
* spouse: Person;
|
|
16
|
+
* children: Person[];
|
|
17
|
+
* }
|
|
18
|
+
* type PartialPerson = RecursivePartial<Person>;
|
|
19
|
+
* // results in
|
|
20
|
+
* interface PartialPerson {
|
|
21
|
+
* name?: string;
|
|
22
|
+
* age?: number;
|
|
23
|
+
* spouse?: RecursivePartial<Person>;
|
|
24
|
+
* children?: RecursivePartial<Person>[]
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare type RecursivePartial<T> = {
|
|
29
|
+
[P in keyof T]?: T[P] extends NonAny[] ? T[P] : T[P] extends readonly NonAny[] ? T[P] : T[P] extends Array<infer U> ? Array<RecursivePartial<U>> : T[P] extends ReadonlyArray<infer U> ? ReadonlyArray<RecursivePartial<U>> : T[P] extends Set<infer V> ? Set<RecursivePartial<V>> : T[P] extends Map<infer K, infer V> ? Map<K, RecursivePartial<V>> : T[P] extends NonAny ? T[P] : RecursivePartial<T[P]>;
|
|
30
|
+
};
|
|
31
|
+
declare type NonAny = number | boolean | string | symbol | null;
|
|
32
|
+
export {};
|
package/lib/esm/types.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { EuiThemeColorMode, EuiThemeColorModeStandard, EuiThemeSystem, EuiThemeShape, EuiThemeComputed } from './global_styling';
|
|
2
|
+
export declare const DEFAULT_COLOR_MODE: "LIGHT";
|
|
3
|
+
/**
|
|
4
|
+
* Returns whether the provided color mode is `inverse`
|
|
5
|
+
* @param {string} colorMode - `light`, `dark`, or `inverse`
|
|
6
|
+
*/
|
|
7
|
+
export declare const isInverseColorMode: (colorMode?: string | undefined) => colorMode is "INVERSE";
|
|
8
|
+
/**
|
|
9
|
+
* Returns the color mode configured in the current EuiThemeProvider.
|
|
10
|
+
* Returns the parent color mode if none is explicity set.
|
|
11
|
+
* @param {string} colorMode - `light`, `dark`, or `inverse`
|
|
12
|
+
* @param {string} parentColorMode - `LIGHT` or `DARK`; used as the fallback
|
|
13
|
+
*/
|
|
14
|
+
export declare const getColorMode: (colorMode?: EuiThemeColorMode | undefined, parentColorMode?: EuiThemeColorModeStandard | undefined) => EuiThemeColorModeStandard;
|
|
15
|
+
/**
|
|
16
|
+
* Returns a value at a given path on an object.
|
|
17
|
+
* If `colorMode` is provided, will scope the value to the appropriate color mode key (LIGHT\DARK)
|
|
18
|
+
* @param {object} model - Object
|
|
19
|
+
* @param {string} _path - Dot-notated string to a path on the object
|
|
20
|
+
* @param {string} colorMode - `light` or `dark`
|
|
21
|
+
*/
|
|
22
|
+
export declare const getOn: (model: {
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
}, _path: string, colorMode?: EuiThemeColorModeStandard | undefined) => {
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
} | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Sets a value at a given path on an object.
|
|
29
|
+
* @param {object} model - Object
|
|
30
|
+
* @param {string} _path - Dot-notated string to a path on the object
|
|
31
|
+
* @param {any} string - The value to set
|
|
32
|
+
*/
|
|
33
|
+
export declare const setOn: (model: {
|
|
34
|
+
[key: string]: any;
|
|
35
|
+
}, _path: string, value: any) => boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Creates a class to store the `computer` method and its eventual parameters.
|
|
38
|
+
* Allows for on-demand computation with up-to-date parameters via `getValue` method.
|
|
39
|
+
* @constructor
|
|
40
|
+
* @param {function} computer - Function to be computed
|
|
41
|
+
* @param {string | array} dependencies - Dependencies passed to the `computer` as parameters
|
|
42
|
+
*/
|
|
43
|
+
export declare class Computed<T> {
|
|
44
|
+
computer: (...values: any[]) => T;
|
|
45
|
+
dependencies: string | string[];
|
|
46
|
+
constructor(computer: (...values: any[]) => T, dependencies?: string | string[]);
|
|
47
|
+
/**
|
|
48
|
+
* Executes the `computer` method with the current state of the theme
|
|
49
|
+
* by taking into account previously computed values and modifications.
|
|
50
|
+
* @param {Proxy | object} base - Computed or uncomputed theme
|
|
51
|
+
* @param {Proxy | object} modifications - Theme value overrides
|
|
52
|
+
* @param {object} working - Partially computed theme
|
|
53
|
+
* @param {string} colorMode - `light` or `dark`
|
|
54
|
+
*/
|
|
55
|
+
getValue(base: EuiThemeSystem | EuiThemeShape | null, modifications: import("./types").RecursivePartial<EuiThemeShape> | undefined, working: Partial<EuiThemeComputed>, colorMode?: EuiThemeColorModeStandard): T;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Returns a Class (`Computed`) that stores the arbitrary computer method
|
|
59
|
+
* and references to its optional dependecies.
|
|
60
|
+
* @param {function} computer - Arbitrary method to be called at compute time.
|
|
61
|
+
* @param {string | array} dependencies - Values that will be provided to `computer` at compute time.
|
|
62
|
+
*/
|
|
63
|
+
export declare function computed<T>(computer: (value: EuiThemeComputed) => T): T;
|
|
64
|
+
export declare function computed<T>(computer: (value: any[]) => T, dependencies: string[]): T;
|
|
65
|
+
export declare function computed<T>(computer: (value: any) => T, dependencies: string): T;
|
|
66
|
+
/**
|
|
67
|
+
* Takes an uncomputed theme, and computes and returns all values taking
|
|
68
|
+
* into consideration value overrides and configured color mode.
|
|
69
|
+
* Overrides take precedence, and only values in the current color mode
|
|
70
|
+
* are computed and returned.
|
|
71
|
+
* @param {Proxy} base - Object to transform into Proxy
|
|
72
|
+
* @param {Proxy | object} over - Unique identifier or name
|
|
73
|
+
* @param {string} colorMode - `light` or `dark`
|
|
74
|
+
*/
|
|
75
|
+
export declare const getComputed: <T = EuiThemeShape>(base: EuiThemeSystem<T>, over: Partial<EuiThemeSystem<T>>, colorMode: EuiThemeColorModeStandard) => EuiThemeComputed<T>;
|
|
76
|
+
/**
|
|
77
|
+
* Builds a Proxy with a custom `handler` designed to self-reference values
|
|
78
|
+
* and prevent arbitrary value overrides.
|
|
79
|
+
* @param {object} model - Object to transform into Proxy
|
|
80
|
+
* @param {string} key - Unique identifier or name
|
|
81
|
+
*/
|
|
82
|
+
export declare const buildTheme: <T extends {}>(model: T, key: string) => {
|
|
83
|
+
model: T;
|
|
84
|
+
root: T;
|
|
85
|
+
key: string;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Deeply merges two objects, using `source` values whenever possible.
|
|
89
|
+
* @param {object} _target - Object with fallback values
|
|
90
|
+
* @param {object} source - Object with desired values
|
|
91
|
+
*/
|
|
92
|
+
export declare const mergeDeep: (_target: {
|
|
93
|
+
[key: string]: any;
|
|
94
|
+
}, source?: {
|
|
95
|
+
[key: string]: any;
|
|
96
|
+
}) => {
|
|
97
|
+
[key: string]: any;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Returns token name string based on passed dynamic variants
|
|
101
|
+
* and additional prefix/suffix
|
|
102
|
+
*/
|
|
103
|
+
export declare const getTokenName: (prefix: string, variant: string, suffix?: string | undefined) => string;
|
package/lib/esm/utils.js
ADDED
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
import { COLOR_MODES_STANDARD, COLOR_MODES_INVERSE, } from './global_styling';
|
|
9
|
+
export const DEFAULT_COLOR_MODE = COLOR_MODES_STANDARD.light;
|
|
10
|
+
/**
|
|
11
|
+
* Returns whether the parameter is an object
|
|
12
|
+
* @param {any} obj - Anything
|
|
13
|
+
*/
|
|
14
|
+
const isObject = (obj) => obj && typeof obj === 'object';
|
|
15
|
+
/**
|
|
16
|
+
* Returns whether the provided color mode is `inverse`
|
|
17
|
+
* @param {string} colorMode - `light`, `dark`, or `inverse`
|
|
18
|
+
*/
|
|
19
|
+
export const isInverseColorMode = (colorMode) => {
|
|
20
|
+
return colorMode === COLOR_MODES_INVERSE;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Returns the color mode configured in the current EuiThemeProvider.
|
|
24
|
+
* Returns the parent color mode if none is explicity set.
|
|
25
|
+
* @param {string} colorMode - `light`, `dark`, or `inverse`
|
|
26
|
+
* @param {string} parentColorMode - `LIGHT` or `DARK`; used as the fallback
|
|
27
|
+
*/
|
|
28
|
+
export const getColorMode = (colorMode, parentColorMode) => {
|
|
29
|
+
if (colorMode == null) {
|
|
30
|
+
return parentColorMode || DEFAULT_COLOR_MODE;
|
|
31
|
+
}
|
|
32
|
+
const mode = colorMode.toUpperCase();
|
|
33
|
+
if (isInverseColorMode(mode)) {
|
|
34
|
+
return parentColorMode === COLOR_MODES_STANDARD.dark ||
|
|
35
|
+
parentColorMode === undefined
|
|
36
|
+
? COLOR_MODES_STANDARD.light
|
|
37
|
+
: COLOR_MODES_STANDARD.dark;
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
return mode;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Returns a value at a given path on an object.
|
|
45
|
+
* If `colorMode` is provided, will scope the value to the appropriate color mode key (LIGHT\DARK)
|
|
46
|
+
* @param {object} model - Object
|
|
47
|
+
* @param {string} _path - Dot-notated string to a path on the object
|
|
48
|
+
* @param {string} colorMode - `light` or `dark`
|
|
49
|
+
*/
|
|
50
|
+
export const getOn = (model, _path, colorMode) => {
|
|
51
|
+
const path = _path.split('.');
|
|
52
|
+
let node = model;
|
|
53
|
+
while (path.length) {
|
|
54
|
+
const segment = path.shift();
|
|
55
|
+
if (node.hasOwnProperty(segment) === false) {
|
|
56
|
+
if (colorMode &&
|
|
57
|
+
node.hasOwnProperty(colorMode) === true &&
|
|
58
|
+
node[colorMode].hasOwnProperty(segment) === true) {
|
|
59
|
+
if (node[colorMode][segment] instanceof Computed) {
|
|
60
|
+
node = node[colorMode][segment].getValue(null, {}, node, colorMode);
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
node = node[colorMode][segment];
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
return undefined;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
if (node[segment] instanceof Computed) {
|
|
72
|
+
node = node[segment].getValue(null, {}, node, colorMode);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
node = node[segment];
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return node;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Sets a value at a given path on an object.
|
|
83
|
+
* @param {object} model - Object
|
|
84
|
+
* @param {string} _path - Dot-notated string to a path on the object
|
|
85
|
+
* @param {any} string - The value to set
|
|
86
|
+
*/
|
|
87
|
+
export const setOn = (model, _path, value) => {
|
|
88
|
+
const path = _path.split('.');
|
|
89
|
+
const propertyName = path.pop();
|
|
90
|
+
let node = model;
|
|
91
|
+
while (path.length) {
|
|
92
|
+
const segment = path.shift();
|
|
93
|
+
if (node.hasOwnProperty(segment) === false) {
|
|
94
|
+
node[segment] = {};
|
|
95
|
+
}
|
|
96
|
+
node = node[segment];
|
|
97
|
+
}
|
|
98
|
+
node[propertyName] = value;
|
|
99
|
+
return true;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* Creates a class to store the `computer` method and its eventual parameters.
|
|
103
|
+
* Allows for on-demand computation with up-to-date parameters via `getValue` method.
|
|
104
|
+
* @constructor
|
|
105
|
+
* @param {function} computer - Function to be computed
|
|
106
|
+
* @param {string | array} dependencies - Dependencies passed to the `computer` as parameters
|
|
107
|
+
*/
|
|
108
|
+
export class Computed {
|
|
109
|
+
constructor(computer, dependencies = []) {
|
|
110
|
+
this.computer = computer;
|
|
111
|
+
this.dependencies = dependencies;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Executes the `computer` method with the current state of the theme
|
|
115
|
+
* by taking into account previously computed values and modifications.
|
|
116
|
+
* @param {Proxy | object} base - Computed or uncomputed theme
|
|
117
|
+
* @param {Proxy | object} modifications - Theme value overrides
|
|
118
|
+
* @param {object} working - Partially computed theme
|
|
119
|
+
* @param {string} colorMode - `light` or `dark`
|
|
120
|
+
*/
|
|
121
|
+
getValue(base, modifications = {}, working, colorMode) {
|
|
122
|
+
if (!this.dependencies.length) {
|
|
123
|
+
return this.computer(working);
|
|
124
|
+
}
|
|
125
|
+
if (!Array.isArray(this.dependencies)) {
|
|
126
|
+
return this.computer(getOn(working, this.dependencies) ??
|
|
127
|
+
getOn(modifications, this.dependencies, colorMode) ??
|
|
128
|
+
(base ? getOn(base, this.dependencies, colorMode) : working));
|
|
129
|
+
}
|
|
130
|
+
return this.computer(this.dependencies.map((dependency) => {
|
|
131
|
+
return (getOn(working, dependency) ??
|
|
132
|
+
getOn(modifications, dependency, colorMode) ??
|
|
133
|
+
(base ? getOn(base, dependency, colorMode) : working));
|
|
134
|
+
}));
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
export function computed(comp, dep) {
|
|
138
|
+
return new Computed(comp, dep);
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Type guard to check for a Computed object based on object shape
|
|
142
|
+
* without relying on the Computed class directly
|
|
143
|
+
*/
|
|
144
|
+
const isComputedLike = (key) => {
|
|
145
|
+
if (typeof key !== 'object' || Array.isArray(key))
|
|
146
|
+
return false;
|
|
147
|
+
return key.hasOwnProperty('dependencies') && key.hasOwnProperty('computer');
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* Takes an uncomputed theme, and computes and returns all values taking
|
|
151
|
+
* into consideration value overrides and configured color mode.
|
|
152
|
+
* Overrides take precedence, and only values in the current color mode
|
|
153
|
+
* are computed and returned.
|
|
154
|
+
* @param {Proxy} base - Object to transform into Proxy
|
|
155
|
+
* @param {Proxy | object} over - Unique identifier or name
|
|
156
|
+
* @param {string} colorMode - `light` or `dark`
|
|
157
|
+
*/
|
|
158
|
+
export const getComputed = (base, over, colorMode) => {
|
|
159
|
+
const output = { themeName: base.key };
|
|
160
|
+
function loop(base, over, checkExisting = false, path) {
|
|
161
|
+
Object.keys(base).forEach((key) => {
|
|
162
|
+
let newPath = path ? `${path}.${key}` : `${key}`;
|
|
163
|
+
// @ts-expect-error `key` is not necessarily a colorMode key
|
|
164
|
+
if ([...Object.values(COLOR_MODES_STANDARD), colorMode].includes(key)) {
|
|
165
|
+
if (key !== colorMode) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
const colorModeSegment = new RegExp(`(\\.${colorMode}\\b)|(\\b${colorMode}\\.)`);
|
|
170
|
+
newPath = newPath.replace(colorModeSegment, '');
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
const existing = checkExisting && getOn(output, newPath);
|
|
174
|
+
if (!existing || isObject(existing)) {
|
|
175
|
+
// NOTE: the class type check for Computed is not true for themes created externally;
|
|
176
|
+
// we additionally check on the object shape to confirm a Computed value
|
|
177
|
+
const baseValue = base[key] instanceof Computed || isComputedLike(base[key])
|
|
178
|
+
? base[key].getValue(base.root, over.root, output, colorMode)
|
|
179
|
+
: base[key];
|
|
180
|
+
const overValue = over[key] instanceof Computed || isComputedLike(over[key])
|
|
181
|
+
? over[key].getValue(base.root, over.root, output, colorMode)
|
|
182
|
+
: over[key];
|
|
183
|
+
if (isObject(baseValue) && !Array.isArray(baseValue)) {
|
|
184
|
+
loop(baseValue, overValue ?? {}, checkExisting, newPath);
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
setOn(output, newPath, overValue ?? baseValue);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
// Compute standard theme values and apply overrides
|
|
193
|
+
loop(base, over);
|
|
194
|
+
// Compute and apply extension values only
|
|
195
|
+
loop(over, {}, true);
|
|
196
|
+
return output;
|
|
197
|
+
};
|
|
198
|
+
/**
|
|
199
|
+
* Builds a Proxy with a custom `handler` designed to self-reference values
|
|
200
|
+
* and prevent arbitrary value overrides.
|
|
201
|
+
* @param {object} model - Object to transform into Proxy
|
|
202
|
+
* @param {string} key - Unique identifier or name
|
|
203
|
+
*/
|
|
204
|
+
export const buildTheme = (model, key) => {
|
|
205
|
+
const handler = {
|
|
206
|
+
getPrototypeOf(target) {
|
|
207
|
+
return Reflect.getPrototypeOf(target.model);
|
|
208
|
+
},
|
|
209
|
+
setPrototypeOf(target, prototype) {
|
|
210
|
+
return Reflect.setPrototypeOf(target.model, prototype);
|
|
211
|
+
},
|
|
212
|
+
isExtensible(target) {
|
|
213
|
+
return Reflect.isExtensible(target);
|
|
214
|
+
},
|
|
215
|
+
preventExtensions(target) {
|
|
216
|
+
return Reflect.preventExtensions(target.model);
|
|
217
|
+
},
|
|
218
|
+
getOwnPropertyDescriptor(target, key) {
|
|
219
|
+
return Reflect.getOwnPropertyDescriptor(target.model, key);
|
|
220
|
+
},
|
|
221
|
+
defineProperty(target, property, attributes) {
|
|
222
|
+
return Reflect.defineProperty(target.model, property, attributes);
|
|
223
|
+
},
|
|
224
|
+
has(target, property) {
|
|
225
|
+
return Reflect.has(target.model, property);
|
|
226
|
+
},
|
|
227
|
+
get(_target, property) {
|
|
228
|
+
if (property === 'key') {
|
|
229
|
+
return _target[property];
|
|
230
|
+
}
|
|
231
|
+
// prevent Safari from locking up when the proxy is used in dev tools
|
|
232
|
+
// as it doesn't support getPrototypeOf
|
|
233
|
+
if (property === '__proto__')
|
|
234
|
+
return {};
|
|
235
|
+
const target = property === 'root' ? _target : _target.model || _target;
|
|
236
|
+
// @ts-ignore `string` index signature
|
|
237
|
+
const value = target[property];
|
|
238
|
+
if (isObject(value) && !Array.isArray(value)) {
|
|
239
|
+
return new Proxy({
|
|
240
|
+
model: value,
|
|
241
|
+
root: _target.root,
|
|
242
|
+
key: `_${_target.key}`,
|
|
243
|
+
}, handler);
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
return value;
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
set(target) {
|
|
250
|
+
return target;
|
|
251
|
+
},
|
|
252
|
+
deleteProperty(target) {
|
|
253
|
+
return target;
|
|
254
|
+
},
|
|
255
|
+
ownKeys(target) {
|
|
256
|
+
return Reflect.ownKeys(target.model);
|
|
257
|
+
},
|
|
258
|
+
apply(target) {
|
|
259
|
+
return target;
|
|
260
|
+
},
|
|
261
|
+
construct(target) {
|
|
262
|
+
return target;
|
|
263
|
+
},
|
|
264
|
+
};
|
|
265
|
+
const themeProxy = new Proxy({ model, root: model, key }, handler);
|
|
266
|
+
return themeProxy;
|
|
267
|
+
};
|
|
268
|
+
/**
|
|
269
|
+
* Deeply merges two objects, using `source` values whenever possible.
|
|
270
|
+
* @param {object} _target - Object with fallback values
|
|
271
|
+
* @param {object} source - Object with desired values
|
|
272
|
+
*/
|
|
273
|
+
export const mergeDeep = (_target, source = {}) => {
|
|
274
|
+
const target = { ..._target };
|
|
275
|
+
if (!isObject(target) || !isObject(source)) {
|
|
276
|
+
return source;
|
|
277
|
+
}
|
|
278
|
+
Object.keys(source).forEach((key) => {
|
|
279
|
+
const targetValue = target[key];
|
|
280
|
+
const sourceValue = source[key];
|
|
281
|
+
if (isObject(targetValue) && isObject(sourceValue)) {
|
|
282
|
+
target[key] = mergeDeep({ ...targetValue }, { ...sourceValue });
|
|
283
|
+
}
|
|
284
|
+
else {
|
|
285
|
+
target[key] = sourceValue;
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
return target;
|
|
289
|
+
};
|
|
290
|
+
/**
|
|
291
|
+
* Returns token name string based on passed dynamic variants
|
|
292
|
+
* and additional prefix/suffix
|
|
293
|
+
*/
|
|
294
|
+
export const getTokenName = (prefix, variant, suffix) => {
|
|
295
|
+
const getCapitalized = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
|
296
|
+
const colorName = variant.charAt(0).toUpperCase() + variant.slice(1);
|
|
297
|
+
const _suffix = suffix ? getCapitalized(suffix) : '';
|
|
298
|
+
return `${prefix}${getCapitalized(colorName)}${_suffix}`;
|
|
299
|
+
};
|
|
300
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAQL,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,KAAK,CAAC;AAE7D;;;GAGG;AACH,MAAM,QAAQ,GAAG,CAAC,GAAQ,EAAE,EAAE,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,CAAC;AAE9D;;;GAGG;AACH,MAAM,CAAC,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