@softwarity/geojson-editor 1.0.24 → 1.0.26
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/README.md +172 -32
- package/dist/geojson-editor.js +2 -2
- package/package.json +9 -3
- package/src/constants.ts +0 -3
- package/src/geojson-editor.css +48 -43
- package/src/geojson-editor.ts +143 -90
- package/src/types.ts +0 -30
- package/src/utils.ts +0 -10
- package/themes/github.css +43 -0
- package/themes/monokai.css +43 -0
- package/themes/solarized.css +44 -0
- package/themes/vscode.css +43 -0
- package/types/types.d.ts +0 -28
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub Theme for @softwarity/geojson-editor
|
|
3
|
+
*
|
|
4
|
+
* Clean theme inspired by GitHub's code styling.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* <link rel="stylesheet" href="themes/github.css">
|
|
8
|
+
* <geojson-editor></geojson-editor>
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
:root {
|
|
12
|
+
/* Editor background and text */
|
|
13
|
+
--geojson-editor-bg-color: light-dark(#ffffff, #0d1117);
|
|
14
|
+
--geojson-editor-text-color: light-dark(#24292f, #c9d1d9);
|
|
15
|
+
--geojson-editor-caret-color: light-dark(#24292f, #c9d1d9);
|
|
16
|
+
|
|
17
|
+
/* Gutter (line numbers area) */
|
|
18
|
+
--geojson-editor-gutter-bg: light-dark(#f6f8fa, #161b22);
|
|
19
|
+
--geojson-editor-gutter-border: light-dark(#d0d7de, #30363d);
|
|
20
|
+
--geojson-editor-gutter-text: light-dark(#8c959f, #6e7681);
|
|
21
|
+
|
|
22
|
+
/* JSON syntax highlighting */
|
|
23
|
+
--geojson-editor-json-key: light-dark(#0550ae, #79c0ff);
|
|
24
|
+
--geojson-editor-json-string: light-dark(#0a3069, #a5d6ff);
|
|
25
|
+
--geojson-editor-json-number: light-dark(#0550ae, #79c0ff);
|
|
26
|
+
--geojson-editor-json-boolean: light-dark(#cf222e, #ff7b72);
|
|
27
|
+
--geojson-editor-json-punct: light-dark(#24292f, #c9d1d9);
|
|
28
|
+
--geojson-editor-json-error: light-dark(#cf222e, #ff7b72);
|
|
29
|
+
|
|
30
|
+
/* GeoJSON-specific */
|
|
31
|
+
--geojson-editor-geojson-key: light-dark(#8250df, #d2a8ff);
|
|
32
|
+
--geojson-editor-geojson-type: light-dark(#116329, #7ee787);
|
|
33
|
+
--geojson-editor-geojson-type-invalid: light-dark(#cf222e, #ff7b72);
|
|
34
|
+
|
|
35
|
+
/* Controls (checkboxes, color swatches) */
|
|
36
|
+
--geojson-editor-control-color: light-dark(#0550ae, #79c0ff);
|
|
37
|
+
--geojson-editor-control-bg: light-dark(#f6f8fa, #21262d);
|
|
38
|
+
--geojson-editor-control-border: light-dark(#d0d7de, #30363d);
|
|
39
|
+
|
|
40
|
+
/* Selection and errors */
|
|
41
|
+
--geojson-editor-selection-color: light-dark(rgba(5, 80, 174, 0.2), rgba(56, 139, 253, 0.3));
|
|
42
|
+
--geojson-editor-error-color: light-dark(#cf222e, #ff7b72);
|
|
43
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Monokai Theme for @softwarity/geojson-editor
|
|
3
|
+
*
|
|
4
|
+
* Classic dark theme inspired by Monokai color scheme.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* <link rel="stylesheet" href="themes/monokai.css">
|
|
8
|
+
* <geojson-editor></geojson-editor>
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
:root {
|
|
12
|
+
/* Editor background and text */
|
|
13
|
+
--geojson-editor-bg-color: light-dark(#fafafa, #272822);
|
|
14
|
+
--geojson-editor-text-color: light-dark(#49483e, #f8f8f2);
|
|
15
|
+
--geojson-editor-caret-color: light-dark(#49483e, #f8f8f0);
|
|
16
|
+
|
|
17
|
+
/* Gutter (line numbers area) */
|
|
18
|
+
--geojson-editor-gutter-bg: light-dark(#f0f0f0, #3e3d32);
|
|
19
|
+
--geojson-editor-gutter-border: light-dark(#e0e0e0, #49483e);
|
|
20
|
+
--geojson-editor-gutter-text: light-dark(#999, #75715e);
|
|
21
|
+
|
|
22
|
+
/* JSON syntax highlighting */
|
|
23
|
+
--geojson-editor-json-key: light-dark(#f92672, #f92672);
|
|
24
|
+
--geojson-editor-json-string: light-dark(#718c00, #e6db74);
|
|
25
|
+
--geojson-editor-json-number: light-dark(#ae81ff, #ae81ff);
|
|
26
|
+
--geojson-editor-json-boolean: light-dark(#66d9ef, #66d9ef);
|
|
27
|
+
--geojson-editor-json-punct: light-dark(#49483e, #f8f8f2);
|
|
28
|
+
--geojson-editor-json-error: light-dark(#f92672, #f92672);
|
|
29
|
+
|
|
30
|
+
/* GeoJSON-specific */
|
|
31
|
+
--geojson-editor-geojson-key: light-dark(#f92672, #a6e22e);
|
|
32
|
+
--geojson-editor-geojson-type: light-dark(#718c00, #e6db74);
|
|
33
|
+
--geojson-editor-geojson-type-invalid: light-dark(#f92672, #f92672);
|
|
34
|
+
|
|
35
|
+
/* Controls (checkboxes, color swatches) */
|
|
36
|
+
--geojson-editor-control-color: light-dark(#66d9ef, #66d9ef);
|
|
37
|
+
--geojson-editor-control-bg: light-dark(#e8e8e8, #3e3d32);
|
|
38
|
+
--geojson-editor-control-border: light-dark(#c0c0c0, #75715e);
|
|
39
|
+
|
|
40
|
+
/* Selection and errors */
|
|
41
|
+
--geojson-editor-selection-color: light-dark(rgba(174, 129, 255, 0.2), rgba(174, 129, 255, 0.3));
|
|
42
|
+
--geojson-editor-error-color: light-dark(#f92672, #f92672);
|
|
43
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Solarized Theme for @softwarity/geojson-editor
|
|
3
|
+
*
|
|
4
|
+
* Precision color scheme designed by Ethan Schoonover.
|
|
5
|
+
* Features carefully selected colors for reduced eye strain.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* <link rel="stylesheet" href="themes/solarized.css">
|
|
9
|
+
* <geojson-editor></geojson-editor>
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
:root {
|
|
13
|
+
/* Editor background and text */
|
|
14
|
+
--geojson-editor-bg-color: light-dark(#fdf6e3, #002b36);
|
|
15
|
+
--geojson-editor-text-color: light-dark(#657b83, #839496);
|
|
16
|
+
--geojson-editor-caret-color: light-dark(#657b83, #93a1a1);
|
|
17
|
+
|
|
18
|
+
/* Gutter (line numbers area) */
|
|
19
|
+
--geojson-editor-gutter-bg: light-dark(#eee8d5, #073642);
|
|
20
|
+
--geojson-editor-gutter-border: light-dark(#ddd6c1, #094553);
|
|
21
|
+
--geojson-editor-gutter-text: light-dark(#93a1a1, #586e75);
|
|
22
|
+
|
|
23
|
+
/* JSON syntax highlighting */
|
|
24
|
+
--geojson-editor-json-key: light-dark(#268bd2, #268bd2);
|
|
25
|
+
--geojson-editor-json-string: light-dark(#2aa198, #2aa198);
|
|
26
|
+
--geojson-editor-json-number: light-dark(#d33682, #d33682);
|
|
27
|
+
--geojson-editor-json-boolean: light-dark(#cb4b16, #cb4b16);
|
|
28
|
+
--geojson-editor-json-punct: light-dark(#657b83, #839496);
|
|
29
|
+
--geojson-editor-json-error: light-dark(#dc322f, #dc322f);
|
|
30
|
+
|
|
31
|
+
/* GeoJSON-specific */
|
|
32
|
+
--geojson-editor-geojson-key: light-dark(#6c71c4, #6c71c4);
|
|
33
|
+
--geojson-editor-geojson-type: light-dark(#859900, #859900);
|
|
34
|
+
--geojson-editor-geojson-type-invalid: light-dark(#dc322f, #dc322f);
|
|
35
|
+
|
|
36
|
+
/* Controls (checkboxes, color swatches) */
|
|
37
|
+
--geojson-editor-control-color: light-dark(#268bd2, #268bd2);
|
|
38
|
+
--geojson-editor-control-bg: light-dark(#eee8d5, #073642);
|
|
39
|
+
--geojson-editor-control-border: light-dark(#93a1a1, #586e75);
|
|
40
|
+
|
|
41
|
+
/* Selection and errors */
|
|
42
|
+
--geojson-editor-selection-color: light-dark(rgba(38, 139, 210, 0.2), rgba(38, 139, 210, 0.3));
|
|
43
|
+
--geojson-editor-error-color: light-dark(#dc322f, #dc322f);
|
|
44
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VS Code Theme for @softwarity/geojson-editor
|
|
3
|
+
*
|
|
4
|
+
* Theme inspired by Visual Studio Code's default dark and light themes.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* <link rel="stylesheet" href="themes/vscode.css">
|
|
8
|
+
* <geojson-editor></geojson-editor>
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
:root {
|
|
12
|
+
/* Editor background and text */
|
|
13
|
+
--geojson-editor-bg-color: light-dark(#ffffff, #1e1e1e);
|
|
14
|
+
--geojson-editor-text-color: light-dark(#000000, #d4d4d4);
|
|
15
|
+
--geojson-editor-caret-color: light-dark(#000000, #aeafad);
|
|
16
|
+
|
|
17
|
+
/* Gutter (line numbers area) */
|
|
18
|
+
--geojson-editor-gutter-bg: light-dark(#f3f3f3, #1e1e1e);
|
|
19
|
+
--geojson-editor-gutter-border: light-dark(#e0e0e0, #333333);
|
|
20
|
+
--geojson-editor-gutter-text: light-dark(#237893, #858585);
|
|
21
|
+
|
|
22
|
+
/* JSON syntax highlighting */
|
|
23
|
+
--geojson-editor-json-key: light-dark(#0451a5, #9cdcfe);
|
|
24
|
+
--geojson-editor-json-string: light-dark(#a31515, #ce9178);
|
|
25
|
+
--geojson-editor-json-number: light-dark(#098658, #b5cea8);
|
|
26
|
+
--geojson-editor-json-boolean: light-dark(#0000ff, #569cd6);
|
|
27
|
+
--geojson-editor-json-punct: light-dark(#000000, #d4d4d4);
|
|
28
|
+
--geojson-editor-json-error: light-dark(#cd3131, #f44747);
|
|
29
|
+
|
|
30
|
+
/* GeoJSON-specific */
|
|
31
|
+
--geojson-editor-geojson-key: light-dark(#800000, #9cdcfe);
|
|
32
|
+
--geojson-editor-geojson-type: light-dark(#008000, #4ec9b0);
|
|
33
|
+
--geojson-editor-geojson-type-invalid: light-dark(#cd3131, #f44747);
|
|
34
|
+
|
|
35
|
+
/* Controls (checkboxes, color swatches) */
|
|
36
|
+
--geojson-editor-control-color: light-dark(#0000ff, #569cd6);
|
|
37
|
+
--geojson-editor-control-bg: light-dark(#f3f3f3, #3c3c3c);
|
|
38
|
+
--geojson-editor-control-border: light-dark(#c0c0c0, #6b6b6b);
|
|
39
|
+
|
|
40
|
+
/* Selection and errors */
|
|
41
|
+
--geojson-editor-selection-color: light-dark(rgba(173, 214, 255, 0.5), rgba(38, 79, 120, 0.5));
|
|
42
|
+
--geojson-editor-error-color: light-dark(#cd3131, #f44747);
|
|
43
|
+
}
|
package/types/types.d.ts
CHANGED
|
@@ -14,31 +14,3 @@ export interface SetOptions {
|
|
|
14
14
|
*/
|
|
15
15
|
collapsed?: string[] | ((feature: Feature | null, index: number) => string[]);
|
|
16
16
|
}
|
|
17
|
-
/** Theme configuration */
|
|
18
|
-
export interface ThemeConfig {
|
|
19
|
-
bgColor?: string;
|
|
20
|
-
textColor?: string;
|
|
21
|
-
caretColor?: string;
|
|
22
|
-
gutterBg?: string;
|
|
23
|
-
gutterBorder?: string;
|
|
24
|
-
gutterText?: string;
|
|
25
|
-
jsonKey?: string;
|
|
26
|
-
jsonString?: string;
|
|
27
|
-
jsonNumber?: string;
|
|
28
|
-
jsonBoolean?: string;
|
|
29
|
-
jsonNull?: string;
|
|
30
|
-
jsonPunct?: string;
|
|
31
|
-
jsonError?: string;
|
|
32
|
-
controlColor?: string;
|
|
33
|
-
controlBg?: string;
|
|
34
|
-
controlBorder?: string;
|
|
35
|
-
geojsonKey?: string;
|
|
36
|
-
geojsonType?: string;
|
|
37
|
-
geojsonTypeInvalid?: string;
|
|
38
|
-
jsonKeyInvalid?: string;
|
|
39
|
-
}
|
|
40
|
-
/** Theme settings for dark and light modes */
|
|
41
|
-
export interface ThemeSettings {
|
|
42
|
-
dark?: ThemeConfig;
|
|
43
|
-
light?: ThemeConfig;
|
|
44
|
-
}
|