@vertigis/react-ui 11.35.1 → 12.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/Autocomplete/index.d.ts +1 -0
- package/Autocomplete/index.js +1 -0
- package/ColorInput/ColorInput.js +2 -2
- package/FormLabelAutocompleteField/FormLabelAutocompleteField .d.ts +37 -0
- package/FormLabelAutocompleteField/FormLabelAutocompleteField .js +20 -0
- package/FormLabelAutocompleteField/index.d.ts +2 -0
- package/FormLabelAutocompleteField/index.js +2 -0
- package/SymbolInput/FontInput.d.ts +28 -0
- package/SymbolInput/FontInput.js +101 -0
- package/SymbolInput/SimpleFillSymbolInput.d.ts +49 -0
- package/SymbolInput/SimpleFillSymbolInput.js +175 -0
- package/SymbolInput/SimpleLineSymbolInput.d.ts +38 -0
- package/SymbolInput/SimpleLineSymbolInput.js +125 -0
- package/SymbolInput/SimpleMarkerSymbolInput.d.ts +38 -0
- package/SymbolInput/SimpleMarkerSymbolInput.js +162 -0
- package/SymbolInput/SymbolInput.d.ts +15 -64
- package/SymbolInput/SymbolInput.js +18 -449
- package/SymbolInput/SymbolJson.d.ts +111 -1
- package/SymbolInput/TextSymbolInput.d.ts +58 -0
- package/SymbolInput/TextSymbolInput.js +131 -0
- package/SymbolInput/UnsupportedSymbol.d.ts +21 -0
- package/SymbolInput/UnsupportedSymbol.js +22 -0
- package/SymbolInput/fonts.d.ts +9 -0
- package/SymbolInput/fonts.js +352 -0
- package/SymbolInput/utilities.d.ts +83 -0
- package/SymbolInput/utilities.js +158 -0
- package/package.json +1 -1
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { FontInput } from "./FontInput.js";
|
|
3
|
+
import UnsupportedSymbol, {} from "./UnsupportedSymbol.js";
|
|
4
|
+
import { toRgbaString, toColor, DEFAULT_LANGUAGE } from "./utilities.js";
|
|
5
|
+
import Box from "../Box/index.js";
|
|
6
|
+
import FormLabelColorField, {} from "../FormLabelColorField/index.js";
|
|
7
|
+
import FormLabelSliderField, {} from "../FormLabelSliderField/index.js";
|
|
8
|
+
import FormLabelTextField, {} from "../FormLabelTextField/index.js";
|
|
9
|
+
export function symbolIsSupported(symbol) {
|
|
10
|
+
const type = symbol.type;
|
|
11
|
+
return type === "esriTS";
|
|
12
|
+
}
|
|
13
|
+
const TextSymbolInput = props => {
|
|
14
|
+
const { onChange, displayOptions: initialDisplayOptions, children, symbol, isSupported = symbolIsSupported, colorResources, languageResources, TextInputComponent, NumberInputComponent, ColorInputComponent, AutoCompleteComponent, fontFamilies, ...others } = props;
|
|
15
|
+
const isSupportedSymbol = isSupported(symbol);
|
|
16
|
+
const text = {
|
|
17
|
+
...DEFAULT_LANGUAGE,
|
|
18
|
+
...languageResources,
|
|
19
|
+
};
|
|
20
|
+
const FormTextInput = TextInputComponent ?? FormLabelTextField;
|
|
21
|
+
const FormNumberInput = NumberInputComponent ?? FormLabelSliderField;
|
|
22
|
+
const FormColorInput = ColorInputComponent ?? FormLabelColorField;
|
|
23
|
+
const displayOptions = {
|
|
24
|
+
showColor: true,
|
|
25
|
+
showFont: true,
|
|
26
|
+
showHalo: true,
|
|
27
|
+
...initialDisplayOptions,
|
|
28
|
+
};
|
|
29
|
+
const clampValue = (key, minValue = 0, maxValue = 100) => {
|
|
30
|
+
const clampedValue = Math.min(maxValue, Math.max(minValue, symbol[key] ?? minValue));
|
|
31
|
+
if (symbol[key] !== clampedValue) {
|
|
32
|
+
onChange({ ...symbol, [key]: clampedValue });
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const updateValue = (key, value) => {
|
|
36
|
+
onChange({ ...symbol, [key]: value });
|
|
37
|
+
};
|
|
38
|
+
return (_jsxs(Box, { ...others, children: [!isSupportedSymbol && (_jsx(UnsupportedSymbol, { languageResources: languageResources, colorResources: colorResources })), children, isSupportedSymbol && (_jsxs(_Fragment, { children: [displayOptions.showFont && (_jsx(FontInput, { font: symbol.font, onChange: value => updateValue("font", value), languageResources: text, fontFamilies: fontFamilies, AutoCompleteComponent: AutoCompleteComponent })), displayOptions.showAlignments && (_jsxs(_Fragment, { children: [(displayOptions.showAlignments === true ||
|
|
39
|
+
displayOptions.showAlignments.showHorizontal) && (_jsx(FormTextInput, { fullWidth: true, nativeSelect: true, label: text.horizontalAlignment, value: symbol.horizontalAlignment, onChange: event => {
|
|
40
|
+
const { value } = event.target;
|
|
41
|
+
updateValue("horizontalAlignment", value);
|
|
42
|
+
}, children: getHorizontalAlignmentValues(text).map(ls => (_jsx("option", { value: ls.id, children: ls.label }, ls.id))) })), (displayOptions.showAlignments === true ||
|
|
43
|
+
displayOptions.showAlignments.showVertical) && (_jsx(FormTextInput, { fullWidth: true, nativeSelect: true, label: text.verticalAlignment, value: symbol.verticalAlignment, onChange: event => {
|
|
44
|
+
const { value } = event.target;
|
|
45
|
+
updateValue("verticalAlignment", value);
|
|
46
|
+
}, children: getVerticalAlignmentValues(text).map(ls => (_jsx("option", { value: ls.id, children: ls.label }, ls.id))) }))] })), displayOptions.showColor && (_jsx(FormColorInput, { fullWidth: true, label: text.color, onChange: (value) => {
|
|
47
|
+
updateValue("color", toColor(value));
|
|
48
|
+
}, value: toRgbaString(symbol.color) })), displayOptions.showHalo && (_jsxs(_Fragment, { children: [_jsx(FormColorInput, { fullWidth: true, label: text.haloColor, onChange: (value) => {
|
|
49
|
+
updateValue("haloColor", toColor(value));
|
|
50
|
+
}, value: toRgbaString(symbol.haloColor) }), _jsx(FormNumberInput, { fullWidth: true, SliderProps: {
|
|
51
|
+
step: 0.5,
|
|
52
|
+
min: 0,
|
|
53
|
+
max: 10,
|
|
54
|
+
}, InputProps: {
|
|
55
|
+
onBlur: (event) => {
|
|
56
|
+
clampValue("haloSize", 0, 10);
|
|
57
|
+
},
|
|
58
|
+
min: 0,
|
|
59
|
+
max: 100,
|
|
60
|
+
}, label: text.haloSize, value: symbol.haloSize, onChange: value => {
|
|
61
|
+
updateValue("haloSize", value);
|
|
62
|
+
} })] })), displayOptions.showColor && (_jsx(FormColorInput, { fullWidth: true, label: text.backgroundColor, onChange: (value) => {
|
|
63
|
+
updateValue("backgroundColor", toColor(value));
|
|
64
|
+
}, value: toRgbaString(symbol.backgroundColor) })), displayOptions.showBorder && (_jsxs(_Fragment, { children: [_jsx(FormColorInput, { fullWidth: true, label: text.borderLineColor, onChange: (value) => {
|
|
65
|
+
updateValue("borderLineColor", toColor(value));
|
|
66
|
+
}, value: toRgbaString(symbol.borderLineColor) }), _jsx(FormNumberInput, { fullWidth: true, SliderProps: {
|
|
67
|
+
step: 0.5,
|
|
68
|
+
min: 0,
|
|
69
|
+
max: 100,
|
|
70
|
+
}, InputProps: {
|
|
71
|
+
onBlur: (event) => {
|
|
72
|
+
clampValue("borderLineSize", 0, 100);
|
|
73
|
+
},
|
|
74
|
+
min: 0,
|
|
75
|
+
max: 100,
|
|
76
|
+
}, label: text.borderLineSize, value: symbol.borderLineSize, onChange: value => {
|
|
77
|
+
updateValue("borderLineSize", value);
|
|
78
|
+
} })] })), displayOptions.showAngle && (_jsx(FormNumberInput, { fullWidth: true, SliderProps: {
|
|
79
|
+
step: 0.5,
|
|
80
|
+
min: 0,
|
|
81
|
+
max: 360,
|
|
82
|
+
}, InputProps: {
|
|
83
|
+
onBlur: (event) => {
|
|
84
|
+
clampValue("angle", 0, 360);
|
|
85
|
+
},
|
|
86
|
+
min: 0,
|
|
87
|
+
max: 360,
|
|
88
|
+
}, label: text.angleTitle, value: symbol.angle, onChange: value => {
|
|
89
|
+
updateValue("angle", value);
|
|
90
|
+
} })), displayOptions.showOffset && (_jsxs(_Fragment, { children: [_jsx(FormNumberInput, { fullWidth: true, SliderProps: {
|
|
91
|
+
step: 0.5,
|
|
92
|
+
min: 0,
|
|
93
|
+
max: 100,
|
|
94
|
+
}, InputProps: {
|
|
95
|
+
onBlur: (event) => {
|
|
96
|
+
clampValue("xoffset", 0, 100);
|
|
97
|
+
},
|
|
98
|
+
min: 0,
|
|
99
|
+
max: 100,
|
|
100
|
+
}, label: text.xOffsetTitle, value: symbol.xoffset, onChange: value => {
|
|
101
|
+
updateValue("xoffset", value);
|
|
102
|
+
} }), _jsx(FormNumberInput, { fullWidth: true, SliderProps: {
|
|
103
|
+
step: 0.5,
|
|
104
|
+
min: 0,
|
|
105
|
+
max: 100,
|
|
106
|
+
}, InputProps: {
|
|
107
|
+
onBlur: (event) => {
|
|
108
|
+
clampValue("yoffset", 0, 100);
|
|
109
|
+
},
|
|
110
|
+
min: 0,
|
|
111
|
+
max: 100,
|
|
112
|
+
}, label: text.yOffsetTitle, value: symbol.yoffset, onChange: value => {
|
|
113
|
+
updateValue("yoffset", value);
|
|
114
|
+
} })] }))] }))] }));
|
|
115
|
+
};
|
|
116
|
+
export default TextSymbolInput;
|
|
117
|
+
const getHorizontalAlignmentValues = (t) => {
|
|
118
|
+
return [
|
|
119
|
+
{ id: "left", label: t.horizontalAlignmentLeft },
|
|
120
|
+
{ id: "right", label: t.horizontalAlignmentRight },
|
|
121
|
+
{ id: "center", label: t.horizontalAlignmentCenter },
|
|
122
|
+
];
|
|
123
|
+
};
|
|
124
|
+
const getVerticalAlignmentValues = (t) => {
|
|
125
|
+
return [
|
|
126
|
+
{ id: "baseline", label: t.verticalAlignmentBaseline },
|
|
127
|
+
{ id: "top", label: t.verticalAlignmentTop },
|
|
128
|
+
{ id: "middle", label: t.verticalAlignmentMiddle },
|
|
129
|
+
{ id: "bottom", label: t.verticalAlignmentBottom },
|
|
130
|
+
];
|
|
131
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { FC } from "react";
|
|
2
|
+
export interface LanguageResources {
|
|
3
|
+
symbolUnsupportedErrorMessage?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ColorResources {
|
|
6
|
+
/**
|
|
7
|
+
* Color value for error text, in any valid CSS format.
|
|
8
|
+
*/
|
|
9
|
+
errorForeground?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Color value for error text background, in any valid CSS format.
|
|
12
|
+
*/
|
|
13
|
+
errorBackground?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const DEFAULT_COLORS: ColorResources;
|
|
16
|
+
export interface UnsupportedSymbolProps {
|
|
17
|
+
languageResources?: LanguageResources;
|
|
18
|
+
colorResources?: ColorResources;
|
|
19
|
+
}
|
|
20
|
+
declare const UnsupportedSymbol: FC<UnsupportedSymbolProps>;
|
|
21
|
+
export default UnsupportedSymbol;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DEFAULT_LANGUAGE } from "./utilities.js";
|
|
3
|
+
import Typography from "../Typography/index.js";
|
|
4
|
+
export const DEFAULT_COLORS = {
|
|
5
|
+
errorBackground: "#B22222",
|
|
6
|
+
errorForeground: "#FFFFFF",
|
|
7
|
+
};
|
|
8
|
+
const UnsupportedSymbol = ({ colorResources, languageResources }) => {
|
|
9
|
+
const text = {
|
|
10
|
+
...DEFAULT_LANGUAGE,
|
|
11
|
+
...languageResources,
|
|
12
|
+
};
|
|
13
|
+
const colors = { ...DEFAULT_COLORS, ...colorResources };
|
|
14
|
+
return (_jsx(Typography, { sx: {
|
|
15
|
+
mb: 1,
|
|
16
|
+
p: 0.5,
|
|
17
|
+
backgroundColor: colors.errorBackground,
|
|
18
|
+
color: colors.errorForeground,
|
|
19
|
+
borderRadius: 1,
|
|
20
|
+
}, children: text.symbolUnsupportedErrorMessage }));
|
|
21
|
+
};
|
|
22
|
+
export default UnsupportedSymbol;
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
// Standard Esri supported Fonts pulled from the Esri font sandbox.
|
|
2
|
+
export const fonts = [
|
|
3
|
+
{
|
|
4
|
+
name: "Abril Fatface Regular",
|
|
5
|
+
font: { family: "Abril Fatface", style: "normal", weight: "normal" },
|
|
6
|
+
},
|
|
7
|
+
{ name: "Alegreya Bold", font: { family: "Alegreya", style: "normal", weight: "bold" } },
|
|
8
|
+
{ name: "Alegreya Bold Italic", font: { family: "Alegreya", style: "italic", weight: "bold" } },
|
|
9
|
+
{ name: "Alegreya Italic", font: { family: "Alegreya", style: "italic", weight: "normal" } },
|
|
10
|
+
{ name: "Alegreya Regular", font: { family: "Alegreya", style: "normal", weight: "normal" } },
|
|
11
|
+
{ name: "Alegreya SC Bold", font: { family: "Alegreya SC", style: "normal", weight: "bold" } },
|
|
12
|
+
{
|
|
13
|
+
name: "Alegreya SC Italic",
|
|
14
|
+
font: { family: "Alegreya SC", style: "italic", weight: "normal" },
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: "Alegreya SC Regular",
|
|
18
|
+
font: { family: "Alegreya SC", style: "normal", weight: "normal" },
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: "Alegreya Sans Italic",
|
|
22
|
+
font: { family: "Alegreya Sans", style: "italic", weight: "normal" },
|
|
23
|
+
},
|
|
24
|
+
{ name: "Amarante Regular", font: { family: "Amarante", style: "normal", weight: "normal" } },
|
|
25
|
+
{ name: "Amatic SC Bold", font: { family: "Amatic SC", style: "normal", weight: "bold" } },
|
|
26
|
+
{ name: "Arial Bold", font: { family: "Arial", style: "normal", weight: "bold" } },
|
|
27
|
+
{ name: "Arial Bold Italic", font: { family: "Arial", style: "italic", weight: "bold" } },
|
|
28
|
+
{ name: "Arial Italic", font: { family: "Arial", style: "italic", weight: "normal" } },
|
|
29
|
+
{ name: "Arial Regular", font: { family: "Arial", style: "normal", weight: "normal" } },
|
|
30
|
+
{
|
|
31
|
+
name: "Arial Unicode MS Bold",
|
|
32
|
+
font: { family: "Arial Unicode MS", style: "normal", weight: "bold" },
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: "Arial Unicode MS Regular",
|
|
36
|
+
font: { family: "Arial Unicode MS", style: "normal", weight: "normal" },
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "Atomic Age Regular",
|
|
40
|
+
font: { family: "Atomic Age", style: "normal", weight: "normal" },
|
|
41
|
+
},
|
|
42
|
+
{ name: "Audiowide Regular", font: { family: "Audiowide", style: "normal", weight: "normal" } },
|
|
43
|
+
{
|
|
44
|
+
name: "Avenir Next LT Pro Bold",
|
|
45
|
+
font: { family: "Avenir Next LT Pro", style: "normal", weight: "bold" },
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "Avenir Next LT Pro Bold Italic",
|
|
49
|
+
font: { family: "Avenir Next LT Pro", style: "italic", weight: "bold" },
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: "Avenir Next LT Pro Demi Italic",
|
|
53
|
+
font: { family: "Avenir Next LT Pro Demi", style: "italic", weight: "normal" },
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: "Avenir Next LT Pro Italic",
|
|
57
|
+
font: { family: "Avenir Next LT Pro", style: "italic", weight: "normal" },
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: "Avenir Next LT Pro Light",
|
|
61
|
+
font: { family: "Avenir Next LT Pro Light", style: "normal", weight: "normal" },
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: "Avenir Next LT Pro Light Italic",
|
|
65
|
+
font: { family: "Avenir Next LT Pro Light", style: "italic", weight: "normal" },
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: "Avenir Next LT Pro Medium Bold",
|
|
69
|
+
font: { family: "Avenir Next LT Pro Medium", style: "normal", weight: "bold" },
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "Avenir Next LT Pro Medium Bold Italic",
|
|
73
|
+
font: { family: "Avenir Next LT Pro Medium", style: "italic", weight: "bold" },
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "Avenir Next LT Pro Regular",
|
|
77
|
+
font: { family: "Avenir Next LT Pro", style: "normal", weight: "normal" },
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: "Avenir Next LT Pro Regular Bold",
|
|
81
|
+
font: { family: "Avenir Next LT Pro Regular", style: "normal", weight: "bold" },
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "BellTopo Sans Bold",
|
|
85
|
+
font: { family: "BellTopo Sans", style: "normal", weight: "bold" },
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: "BellTopo Sans Bold Italic",
|
|
89
|
+
font: { family: "BellTopo Sans", style: "italic", weight: "bold" },
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: "BellTopo Sans Italic",
|
|
93
|
+
font: { family: "BellTopo Sans", style: "italic", weight: "normal" },
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "BellTopo Sans Regular",
|
|
97
|
+
font: { family: "BellTopo Sans", style: "normal", weight: "normal" },
|
|
98
|
+
},
|
|
99
|
+
{ name: "Belleza Regular", font: { family: "Belleza", style: "normal", weight: "normal" } },
|
|
100
|
+
{
|
|
101
|
+
name: "Black Ops One Regular",
|
|
102
|
+
font: { family: "Black Ops One", style: "normal", weight: "normal" },
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: "Cabin Sketch Bold",
|
|
106
|
+
font: { family: "Cabin Sketch", style: "normal", weight: "bold" },
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: "Cabin Sketch Regular",
|
|
110
|
+
font: { family: "Cabin Sketch", style: "normal", weight: "normal" },
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
name: "Coming Soon Regular",
|
|
114
|
+
font: { family: "Coming Soon", style: "normal", weight: "normal" },
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
name: "FGDC GeoAge Regular",
|
|
118
|
+
font: { family: "FGDC GeoAge", style: "normal", weight: "normal" },
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
name: "Homemade Apple Regular",
|
|
122
|
+
font: { family: "Homemade Apple", style: "normal", weight: "normal" },
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: "IM FELL DW Pica PRO Italic",
|
|
126
|
+
font: { family: "IM FELL DW Pica PRO", style: "italic", weight: "normal" },
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: "IM FELL DW Pica PRO Regular",
|
|
130
|
+
font: { family: "IM FELL DW Pica PRO", style: "normal", weight: "normal" },
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
name: "Josefin Sans Regular",
|
|
134
|
+
font: { family: "Josefin Sans", style: "normal", weight: "normal" },
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
name: "Josefin Sans Semibold Italic",
|
|
138
|
+
font: { family: "Josefin Sans Semibold", style: "italic", weight: "bold" },
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: "Josefin Slab Bold",
|
|
142
|
+
font: { family: "Josefin Slab", style: "normal", weight: "bold" },
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
name: "Josefin Slab Bold Italic",
|
|
146
|
+
font: { family: "Josefin Slab", style: "italic", weight: "bold" },
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
name: "Josefin Slab Italic",
|
|
150
|
+
font: { family: "Josefin Slab", style: "italic", weight: "normal" },
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: "Josefin Slab Light Italic",
|
|
154
|
+
font: { family: "Josefin Slab Light", style: "italic", weight: "normal" },
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
name: "Josefin Slab Regular",
|
|
158
|
+
font: { family: "Josefin Slab", style: "normal", weight: "normal" },
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
name: "Josefin Slab Thin Italic",
|
|
162
|
+
font: { family: "Josefin Slab Thin", style: "italic", weight: "normal" },
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
name: "Just Another Hand Regular",
|
|
166
|
+
font: { family: "Just Another Hand", style: "normal", weight: "normal" },
|
|
167
|
+
},
|
|
168
|
+
{ name: "Kranky Regular", font: { family: "Kranky", style: "normal", weight: "normal" } },
|
|
169
|
+
{ name: "Life Savers Bold", font: { family: "Life Savers", style: "normal", weight: "bold" } },
|
|
170
|
+
{
|
|
171
|
+
name: "Loved by the King Regular",
|
|
172
|
+
font: { family: "Loved by the King", style: "normal", weight: "normal" },
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
name: "Merriweather Bold",
|
|
176
|
+
font: { family: "Merriweather", style: "normal", weight: "bold" },
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
name: "Merriweather Bold Italic",
|
|
180
|
+
font: { family: "Merriweather", style: "italic", weight: "bold" },
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
name: "Merriweather Italic",
|
|
184
|
+
font: { family: "Merriweather", style: "italic", weight: "normal" },
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
name: "Merriweather Regular",
|
|
188
|
+
font: { family: "Merriweather", style: "normal", weight: "normal" },
|
|
189
|
+
},
|
|
190
|
+
{ name: "Montserrat Bold", font: { family: "Montserrat", style: "normal", weight: "bold" } },
|
|
191
|
+
{
|
|
192
|
+
name: "Montserrat Italic",
|
|
193
|
+
font: { family: "Montserrat", style: "italic", weight: "normal" },
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
name: "Montserrat Medium Italic",
|
|
197
|
+
font: { family: "Montserrat Medium", style: "italic", weight: "normal" },
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
name: "Montserrat Regular",
|
|
201
|
+
font: { family: "Montserrat", style: "normal", weight: "normal" },
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
name: "Montserrat Semibold Italic",
|
|
205
|
+
font: { family: "Montserrat Semibold", style: "italic", weight: "bold" },
|
|
206
|
+
},
|
|
207
|
+
{ name: "Noto Sans Bold", font: { family: "Noto Sans", style: "normal", weight: "bold" } },
|
|
208
|
+
{
|
|
209
|
+
name: "Noto Sans Bold Italic",
|
|
210
|
+
font: { family: "Noto Sans", style: "italic", weight: "bold" },
|
|
211
|
+
},
|
|
212
|
+
{ name: "Noto Sans Italic", font: { family: "Noto Sans", style: "italic", weight: "normal" } },
|
|
213
|
+
{ name: "Noto Sans Regular", font: { family: "Noto Sans", style: "normal", weight: "normal" } },
|
|
214
|
+
{ name: "Noto Serif Bold", font: { family: "Noto Serif", style: "normal", weight: "bold" } },
|
|
215
|
+
{
|
|
216
|
+
name: "Noto Serif Bold Italic",
|
|
217
|
+
font: { family: "Noto Serif", style: "italic", weight: "bold" },
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
name: "Noto Serif Italic",
|
|
221
|
+
font: { family: "Noto Serif", style: "italic", weight: "normal" },
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
name: "Noto Serif Regular",
|
|
225
|
+
font: { family: "Noto Serif", style: "normal", weight: "normal" },
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
name: "Old Standard TT Bold",
|
|
229
|
+
font: { family: "Old Standard TT", style: "normal", weight: "bold" },
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
name: "Old Standard TT Italic",
|
|
233
|
+
font: { family: "Old Standard TT", style: "italic", weight: "normal" },
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
name: "Old Standard TT Regular",
|
|
237
|
+
font: { family: "Old Standard TT", style: "normal", weight: "normal" },
|
|
238
|
+
},
|
|
239
|
+
{ name: "Orbitron Bold", font: { family: "Orbitron", style: "normal", weight: "bold" } },
|
|
240
|
+
{ name: "Orbitron Regular", font: { family: "Orbitron", style: "normal", weight: "normal" } },
|
|
241
|
+
{ name: "Oregano Italic", font: { family: "Oregano", style: "italic", weight: "normal" } },
|
|
242
|
+
{ name: "Oregano Regular", font: { family: "Oregano", style: "normal", weight: "normal" } },
|
|
243
|
+
{ name: "Oswald Bold", font: { family: "Oswald", style: "normal", weight: "bold" } },
|
|
244
|
+
{ name: "Oswald Regular", font: { family: "Oswald", style: "normal", weight: "normal" } },
|
|
245
|
+
{ name: "Pacifico Regular", font: { family: "Pacifico", style: "normal", weight: "normal" } },
|
|
246
|
+
{
|
|
247
|
+
name: "Palatino Linotype Regular",
|
|
248
|
+
font: { family: "Palatino Linotype", style: "normal", weight: "normal" },
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
name: "Playfair Display Black",
|
|
252
|
+
font: { family: "Playfair Display Black", style: "normal", weight: "normal" },
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
name: "Playfair Display Bold",
|
|
256
|
+
font: { family: "Playfair Display", style: "normal", weight: "bold" },
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
name: "Playfair Display Bold Italic",
|
|
260
|
+
font: { family: "Playfair Display", style: "italic", weight: "bold" },
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
name: "Playfair Display Italic",
|
|
264
|
+
font: { family: "Playfair Display", style: "italic", weight: "normal" },
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
name: "Playfair Display Regular",
|
|
268
|
+
font: { family: "Playfair Display", style: "normal", weight: "normal" },
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
name: "Playfair Display SC Bold",
|
|
272
|
+
font: { family: "Playfair Display SC", style: "normal", weight: "bold" },
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
name: "Playfair Display SC Regular",
|
|
276
|
+
font: { family: "Playfair Display SC", style: "normal", weight: "normal" },
|
|
277
|
+
},
|
|
278
|
+
{ name: "Redressed Regular", font: { family: "Redressed", style: "normal", weight: "normal" } },
|
|
279
|
+
{ name: "Risque Regular", font: { family: "Risque", style: "normal", weight: "normal" } },
|
|
280
|
+
{
|
|
281
|
+
name: "Roboto Condensed Italic",
|
|
282
|
+
font: { family: "Roboto Condensed", style: "italic", weight: "normal" },
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
name: "Roboto Condensed Light Italic",
|
|
286
|
+
font: { family: "Roboto Condensed Light", style: "italic", weight: "normal" },
|
|
287
|
+
},
|
|
288
|
+
{ name: "Rye Regular", font: { family: "Rye", style: "normal", weight: "normal" } },
|
|
289
|
+
{
|
|
290
|
+
name: "Special Elite Regular",
|
|
291
|
+
font: { family: "Special Elite", style: "normal", weight: "normal" },
|
|
292
|
+
},
|
|
293
|
+
{ name: "Sans Serif", font: { family: "sans-serif", style: "normal", weight: "normal" } },
|
|
294
|
+
{ name: "Sans Serif Bold", font: { family: "sans-serif", style: "normal", weight: "bold" } },
|
|
295
|
+
{
|
|
296
|
+
name: "Sans Serif Italic",
|
|
297
|
+
font: { family: "sans-serif", style: "italic", weight: "normal" },
|
|
298
|
+
},
|
|
299
|
+
{ name: "Syncopate Bold", font: { family: "Syncopate", style: "normal", weight: "bold" } },
|
|
300
|
+
{ name: "Syncopate Regular", font: { family: "Syncopate", style: "normal", weight: "normal" } },
|
|
301
|
+
{ name: "Tangerine Regular", font: { family: "Tangerine", style: "normal", weight: "normal" } },
|
|
302
|
+
{ name: "Ubuntu Bold", font: { family: "Ubuntu", style: "normal", weight: "bold" } },
|
|
303
|
+
{ name: "Ubuntu Bold Italic", font: { family: "Ubuntu", style: "italic", weight: "bold" } },
|
|
304
|
+
{
|
|
305
|
+
name: "Ubuntu Condensed Regular",
|
|
306
|
+
font: { family: "Ubuntu Condensed", style: "normal", weight: "normal" },
|
|
307
|
+
},
|
|
308
|
+
{ name: "Ubuntu Italic", font: { family: "Ubuntu", style: "italic", weight: "normal" } },
|
|
309
|
+
{ name: "Ubuntu Light", font: { family: "Ubuntu Light", style: "normal", weight: "normal" } },
|
|
310
|
+
{
|
|
311
|
+
name: "Ubuntu Light Bold",
|
|
312
|
+
font: { family: "Ubuntu Light", style: "normal", weight: "bold" },
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
name: "Ubuntu Light Bold Italic",
|
|
316
|
+
font: { family: "Ubuntu Light", style: "italic", weight: "bold" },
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
name: "Ubuntu Light Italic",
|
|
320
|
+
font: { family: "Ubuntu Light", style: "italic", weight: "normal" },
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
name: "Ubuntu Medium Italic",
|
|
324
|
+
font: { family: "Ubuntu Medium", style: "italic", weight: "normal" },
|
|
325
|
+
},
|
|
326
|
+
{ name: "Ubuntu Mono Bold", font: { family: "Ubuntu Mono", style: "normal", weight: "bold" } },
|
|
327
|
+
{
|
|
328
|
+
name: "Ubuntu Mono Bold Italic",
|
|
329
|
+
font: { family: "Ubuntu Mono", style: "italic", weight: "bold" },
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
name: "Ubuntu Mono Italic",
|
|
333
|
+
font: { family: "Ubuntu Mono", style: "italic", weight: "normal" },
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
name: "Ubuntu Mono Regular",
|
|
337
|
+
font: { family: "Ubuntu Mono", style: "normal", weight: "normal" },
|
|
338
|
+
},
|
|
339
|
+
{ name: "Ubuntu Regular", font: { family: "Ubuntu", style: "normal", weight: "normal" } },
|
|
340
|
+
{
|
|
341
|
+
name: "UnifrakturCook Bold",
|
|
342
|
+
font: { family: "UnifrakturCook", style: "normal", weight: "bold" },
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
name: "Vast Shadow Regular",
|
|
346
|
+
font: { family: "Vast Shadow", style: "normal", weight: "normal" },
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
name: "Walter Turncoat Regular",
|
|
350
|
+
font: { family: "Walter Turncoat", style: "normal", weight: "normal" },
|
|
351
|
+
},
|
|
352
|
+
];
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { ColorJson, SimpleFillSymbolJson, SimpleLineSymbolJson, SimpleMarkerSymbolJson, SymbolJson } from "./SymbolJson";
|
|
2
|
+
export declare const DEFAULT_LANGUAGE: {
|
|
3
|
+
fillColorTitle: string;
|
|
4
|
+
fillStyleTitle: string;
|
|
5
|
+
lineColorTitle: string;
|
|
6
|
+
lineStyleTitle: string;
|
|
7
|
+
lineWidthTitle: string;
|
|
8
|
+
markerAngleTitle: string;
|
|
9
|
+
xOffsetTitle: string;
|
|
10
|
+
yOffsetTitle: string;
|
|
11
|
+
markerSizeTitle: string;
|
|
12
|
+
markerStyleTitle: string;
|
|
13
|
+
symbolUnsupportedErrorMessage: string;
|
|
14
|
+
markerStyleCircle: string;
|
|
15
|
+
markerStyleCross: string;
|
|
16
|
+
markerStyleDiamond: string;
|
|
17
|
+
markerStyleSquare: string;
|
|
18
|
+
markerStyleTriangle: string;
|
|
19
|
+
markerStyleX: string;
|
|
20
|
+
lineStyleDash: string;
|
|
21
|
+
lineStyleDashDot: string;
|
|
22
|
+
lineStyleDot: string;
|
|
23
|
+
lineStyleLongDashDot: string;
|
|
24
|
+
lineStyleLongDash: string;
|
|
25
|
+
lineStyleNone: string;
|
|
26
|
+
lineStyleShortDashDotDot: string;
|
|
27
|
+
lineStyleShortDashDot: string;
|
|
28
|
+
lineStyleShortDash: string;
|
|
29
|
+
lineStyleShortDot: string;
|
|
30
|
+
lineStyleSolid: string;
|
|
31
|
+
fillStyleBackwardDiagonal: string;
|
|
32
|
+
fillStyleCross: string;
|
|
33
|
+
fillStyleDiagonalCross: string;
|
|
34
|
+
fillStyleForwardDiagonal: string;
|
|
35
|
+
fillStyleHorizontal: string;
|
|
36
|
+
fillStyleNone: string;
|
|
37
|
+
fillStyleSolid: string;
|
|
38
|
+
fillStyleVertical: string;
|
|
39
|
+
angleTitle: string;
|
|
40
|
+
backgroundColor: string;
|
|
41
|
+
borderLineColor: string;
|
|
42
|
+
borderLineSize: string;
|
|
43
|
+
color: string;
|
|
44
|
+
font: string;
|
|
45
|
+
fontSize: string;
|
|
46
|
+
fontFamily: string;
|
|
47
|
+
fontStyle: string;
|
|
48
|
+
fontWeight: string;
|
|
49
|
+
haloColor: string;
|
|
50
|
+
haloSize: string;
|
|
51
|
+
horizontalAlignment: string;
|
|
52
|
+
horizontalAlignmentLeft: string;
|
|
53
|
+
horizontalAlignmentRight: string;
|
|
54
|
+
horizontalAlignmentCenter: string;
|
|
55
|
+
verticalAlignment: string;
|
|
56
|
+
verticalAlignmentBaseline: string;
|
|
57
|
+
verticalAlignmentTop: string;
|
|
58
|
+
verticalAlignmentMiddle: string;
|
|
59
|
+
verticalAlignmentBottom: string;
|
|
60
|
+
decoration: string;
|
|
61
|
+
decorationNone: string;
|
|
62
|
+
decorationLineThrough: string;
|
|
63
|
+
decorationLineUnderline: string;
|
|
64
|
+
};
|
|
65
|
+
export declare const NO_FILL_MARKER_STYLES: SimpleMarkerSymbolJson["style"][];
|
|
66
|
+
export declare const DEFAULT_PARSE_NUMBER: (s: string | undefined) => number;
|
|
67
|
+
export declare const DEFAULT_FORMAT_NUMBER: (n: number | undefined) => string;
|
|
68
|
+
export type SelectValues<T extends string = string, U extends string = string> = {
|
|
69
|
+
id: T;
|
|
70
|
+
label: U;
|
|
71
|
+
}[];
|
|
72
|
+
export declare const getLineStyle: (symbol: SymbolJson) => SimpleLineSymbolJson["style"] | undefined;
|
|
73
|
+
export declare const getFillStyle: (symbol: SymbolJson) => SimpleFillSymbolJson["style"] | undefined;
|
|
74
|
+
export declare const getLineColor: (symbol: SymbolJson) => ColorJson | undefined;
|
|
75
|
+
export declare const getFillColor: (symbol: SymbolJson) => ColorJson | undefined;
|
|
76
|
+
export declare const getLineWidth: (symbol: SymbolJson) => number | undefined;
|
|
77
|
+
export declare const getMarkerProperty: <T extends keyof SimpleMarkerSymbolJson, U extends SimpleMarkerSymbolJson[T]>(symbol: SymbolJson, property: T) => U | undefined;
|
|
78
|
+
export declare const toRgbaString: (color: ColorJson | undefined) => string;
|
|
79
|
+
export declare const toColor: (color: string | undefined) => ColorJson;
|
|
80
|
+
export declare const fromRgbString: (color: string) => ColorJson | undefined;
|
|
81
|
+
export declare const fromRgbaString: (color: string) => ColorJson | undefined;
|
|
82
|
+
export declare const DEFAULT_COLOR: number[];
|
|
83
|
+
export declare const DEFAULT_RGBA_STRING = "rgba(255, 255, 255, 1)";
|