@matdata/yasgui 5.20.3 → 6.0.0
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 +76 -59
- package/build/ts/src/ConfigExportImport.js +1 -1
- package/build/ts/src/PersistentConfig.d.ts +2 -0
- package/build/ts/src/PersistentConfig.js +9 -1
- package/build/ts/src/PersistentConfig.js.map +1 -1
- package/build/ts/src/Tab.d.ts +1 -1
- package/build/ts/src/Tab.js +12 -17
- package/build/ts/src/Tab.js.map +1 -1
- package/build/ts/src/TabSettingsModal.js +19 -55
- package/build/ts/src/TabSettingsModal.js.map +1 -1
- package/build/ts/src/index.d.ts +1 -1
- package/build/ts/src/index.js +5 -1
- package/build/ts/src/index.js.map +1 -1
- package/build/ts/src/queryManagement/QueryBrowser.js +2 -2
- package/build/ts/src/queryManagement/WorkspaceSettingsForm.js +1 -1
- package/build/ts/src/version.d.ts +1 -1
- package/build/ts/src/version.js +1 -1
- package/build/ts/src/version.js.map +1 -1
- package/build/yasgui.min.css +1 -1
- package/build/yasgui.min.css.map +3 -3
- package/build/yasgui.min.js +257 -261
- package/build/yasgui.min.js.map +4 -4
- package/package.json +4 -4
- package/src/ConfigExportImport.ts +3 -3
- package/src/PersistentConfig.ts +17 -1
- package/src/Tab.ts +20 -21
- package/src/TabSettingsModal.ts +22 -61
- package/src/editor-themes.scss +268 -0
- package/src/endpointSelect.ts +3 -3
- package/src/github-dark-theme.scss +20 -39
- package/src/index.scss +1 -1
- package/src/index.ts +7 -1
- package/src/queryManagement/QueryBrowser.ts +2 -2
- package/src/queryManagement/WorkspaceSettingsForm.ts +1 -1
- package/src/tab.scss +13 -2
- package/src/themes.scss +10 -5
- package/src/version.ts +1 -1
|
@@ -1,58 +1,41 @@
|
|
|
1
1
|
// GitHub Dark Default CodeMirror Theme
|
|
2
2
|
// Based on GitHub's dark default color scheme
|
|
3
3
|
|
|
4
|
+
// Selectors target CodeMirror 6 DOM (.cm-editor / .cm-*). The theme class
|
|
5
|
+
// (cm-s-<name>) is set on the editor root element by the yasqe editor facade.
|
|
6
|
+
.cm-s-github-dark.cm-editor,
|
|
4
7
|
.cm-s-github-dark.CodeMirror {
|
|
5
8
|
background-color: #0d1117;
|
|
6
9
|
color: #c9d1d9;
|
|
7
10
|
}
|
|
8
11
|
|
|
9
12
|
// Selection styles - using GitHub's subtle blue highlight
|
|
10
|
-
.cm-s-github-dark
|
|
13
|
+
.cm-s-github-dark .cm-selectionBackground,
|
|
14
|
+
.cm-s-github-dark.cm-focused .cm-selectionBackground {
|
|
11
15
|
background: rgba(56, 138, 253, 0.5) !important;
|
|
12
16
|
}
|
|
13
17
|
|
|
14
|
-
.cm-s-github-dark.
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.cm-s-github-dark.CodeMirror ::-moz-selection {
|
|
19
|
-
background: rgba(56, 138, 253, 0.5) !important;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.cm-s-github-dark .CodeMirror-line::selection,
|
|
23
|
-
.cm-s-github-dark .CodeMirror-line > span::selection,
|
|
24
|
-
.cm-s-github-dark .CodeMirror-line > span > span::selection {
|
|
25
|
-
background: rgba(56, 138, 253, 0.5) !important;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.cm-s-github-dark .CodeMirror-line::-moz-selection,
|
|
29
|
-
.cm-s-github-dark .CodeMirror-line > span::-moz-selection,
|
|
30
|
-
.cm-s-github-dark .CodeMirror-line > span > span::-moz-selection {
|
|
31
|
-
background: rgba(56, 138, 253, 0.5) !important;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.cm-s-github-dark.CodeMirror-focused div.CodeMirror-selected {
|
|
18
|
+
.cm-s-github-dark .cm-content ::selection,
|
|
19
|
+
.cm-s-github-dark .cm-line::selection {
|
|
35
20
|
background: rgba(56, 138, 253, 0.5) !important;
|
|
36
21
|
}
|
|
37
22
|
|
|
38
|
-
.cm-s-github-dark .
|
|
23
|
+
.cm-s-github-dark .cm-gutters {
|
|
39
24
|
background: #0d1117;
|
|
40
25
|
border-right: 1px solid #30363d;
|
|
26
|
+
color: #6e7681;
|
|
41
27
|
}
|
|
42
28
|
|
|
43
|
-
.cm-s-github-dark .
|
|
44
|
-
color: #c9d1d9;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.cm-s-github-dark .CodeMirror-guttermarker-subtle {
|
|
29
|
+
.cm-s-github-dark .cm-gutterElement {
|
|
48
30
|
color: #6e7681;
|
|
49
31
|
}
|
|
50
32
|
|
|
51
|
-
.cm-s-github-dark .
|
|
52
|
-
color: #
|
|
33
|
+
.cm-s-github-dark .cm-foldGutter .cm-gutterElement {
|
|
34
|
+
color: #c9d1d9;
|
|
53
35
|
}
|
|
54
36
|
|
|
55
|
-
.cm-s-github-dark .
|
|
37
|
+
.cm-s-github-dark .cm-cursor,
|
|
38
|
+
.cm-s-github-dark .cm-dropCursor {
|
|
56
39
|
border-left: 1px solid #c9d1d9;
|
|
57
40
|
}
|
|
58
41
|
|
|
@@ -161,32 +144,30 @@
|
|
|
161
144
|
}
|
|
162
145
|
|
|
163
146
|
// Active line
|
|
164
|
-
.cm-s-github-dark .
|
|
147
|
+
.cm-s-github-dark .cm-activeLine,
|
|
148
|
+
.cm-s-github-dark .cm-activeLineGutter {
|
|
165
149
|
background: rgba(110, 118, 129, 0.1);
|
|
166
150
|
}
|
|
167
151
|
|
|
168
152
|
// Matching brackets
|
|
169
|
-
.cm-s-github-dark .
|
|
153
|
+
.cm-s-github-dark .cm-matchingBracket {
|
|
170
154
|
color: #7ee787 !important;
|
|
171
155
|
background-color: rgba(46, 160, 67, 0.15);
|
|
172
156
|
text-decoration: underline;
|
|
173
157
|
}
|
|
174
158
|
|
|
175
|
-
.cm-s-github-dark .
|
|
159
|
+
.cm-s-github-dark .cm-nonmatchingBracket {
|
|
176
160
|
color: #ff7b72 !important;
|
|
177
161
|
background-color: rgba(248, 81, 73, 0.15);
|
|
178
162
|
}
|
|
179
163
|
|
|
180
164
|
// Search highlighting
|
|
181
|
-
.cm-s-github-dark .
|
|
165
|
+
.cm-s-github-dark .cm-searchMatch {
|
|
182
166
|
background-color: rgba(255, 206, 0, 0.4);
|
|
183
167
|
}
|
|
184
168
|
|
|
185
169
|
// Override match highlight to use subtle selection color
|
|
170
|
+
.cm-s-github-dark .cm-selectionMatch,
|
|
186
171
|
.cm-s-github-dark .cm-matchhighlight {
|
|
187
172
|
background-color: rgba(56, 138, 253, 0.5) !important;
|
|
188
173
|
}
|
|
189
|
-
|
|
190
|
-
.cm-s-github-dark .CodeMirror-focused .CodeMirror-selected {
|
|
191
|
-
background: rgba(56, 138, 253, 0.5) !important;
|
|
192
|
-
}
|
package/src/index.scss
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
@import "@fortawesome/fontawesome-free/css/fontawesome.css";
|
|
3
3
|
@import "@fortawesome/fontawesome-free/css/solid.css";
|
|
4
4
|
|
|
5
|
-
// Main
|
|
5
|
+
// Main Matgui container - fills 100% of parent element
|
|
6
6
|
// Parent element (typically body) should have height: 100%; width: 100%
|
|
7
7
|
.yasgui {
|
|
8
8
|
display: flex;
|
package/src/index.ts
CHANGED
|
@@ -21,8 +21,8 @@ import QueryBrowser from "./queryManagement/QueryBrowser";
|
|
|
21
21
|
import "./index.scss";
|
|
22
22
|
import "./themes.scss";
|
|
23
23
|
import "./github-dark-theme.scss";
|
|
24
|
+
import "./editor-themes.scss";
|
|
24
25
|
import "../../yasr/src/scss/global.scss";
|
|
25
|
-
import "codemirror/theme/material-palenight.css";
|
|
26
26
|
import "@matdata/yasgui-geo-plugin/dist/yasgui-compat.css";
|
|
27
27
|
|
|
28
28
|
// Register plugins to Yasr
|
|
@@ -186,6 +186,12 @@ export class Yasgui extends EventEmitter {
|
|
|
186
186
|
this.config.showSnippetsBar = persistedShowSnippetsBar;
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
+
// Load persisted orientation if available
|
|
190
|
+
const persistedOrientation = this.persistentConfig.getOrientation();
|
|
191
|
+
if (persistedOrientation !== undefined) {
|
|
192
|
+
this.config.orientation = persistedOrientation;
|
|
193
|
+
}
|
|
194
|
+
|
|
189
195
|
this.tabElements = new TabElements(this);
|
|
190
196
|
this.tabPanelsEl = document.createElement("div");
|
|
191
197
|
|
|
@@ -158,7 +158,7 @@ export default class QueryBrowser {
|
|
|
158
158
|
helpButton.innerHTML = '<i class="fas fa-circle-question"></i>';
|
|
159
159
|
helpButton.addEventListener("click", () => {
|
|
160
160
|
window.open(
|
|
161
|
-
"https://
|
|
161
|
+
"https://matgui-doc.matdata.eu/docs/user-guide#managed-queries-and-workspaces",
|
|
162
162
|
"_blank",
|
|
163
163
|
"noopener,noreferrer",
|
|
164
164
|
);
|
|
@@ -406,7 +406,7 @@ export default class QueryBrowser {
|
|
|
406
406
|
|
|
407
407
|
const learnMoreLink = document.createElement("a");
|
|
408
408
|
addClass(learnMoreLink, "yasgui-query-browser__empty-link");
|
|
409
|
-
learnMoreLink.href = "https://
|
|
409
|
+
learnMoreLink.href = "https://matgui-doc.matdata.eu/docs/user-guide#managed-queries-and-workspaces";
|
|
410
410
|
learnMoreLink.target = "_blank";
|
|
411
411
|
learnMoreLink.rel = "noopener noreferrer";
|
|
412
412
|
learnMoreLink.textContent = "Learn more about workspaces";
|
|
@@ -400,7 +400,7 @@ ORDER BY ?workspace`;
|
|
|
400
400
|
const gitHelp = document.createElement("div");
|
|
401
401
|
addClass(gitHelp, "settingsHelp");
|
|
402
402
|
gitHelp.textContent =
|
|
403
|
-
"Supported Git providers: GitHub, GitLab, Bitbucket Cloud, Gitea. Note: ssh:// and SCP-style remotes are only parsed to identify the repository;
|
|
403
|
+
"Supported Git providers: GitHub, GitLab, Bitbucket Cloud, Gitea. Note: ssh:// and SCP-style remotes are only parsed to identify the repository; Matgui uses provider HTTPS APIs (not SSH) to read/write files.";
|
|
404
404
|
|
|
405
405
|
const remoteUrlInput = document.createElement("input");
|
|
406
406
|
remoteUrlInput.type = "url";
|
package/src/tab.scss
CHANGED
|
@@ -11,7 +11,17 @@
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.yasrWrapperEl {
|
|
14
|
-
|
|
14
|
+
flex: 1;
|
|
15
|
+
min-height: 0;
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Let YASR shrink within the available space so its results scroll instead of
|
|
21
|
+
// overflowing the tab panel (the 400px min-height on .yasr would otherwise force
|
|
22
|
+
// the results to grow past the viewport with no scrollbar).
|
|
23
|
+
.yasr {
|
|
24
|
+
min-height: 0;
|
|
15
25
|
}
|
|
16
26
|
|
|
17
27
|
// Hide editor wrapper when yasr is in fullscreen
|
|
@@ -77,7 +87,8 @@
|
|
|
77
87
|
height: 100%;
|
|
78
88
|
overflow: hidden;
|
|
79
89
|
|
|
80
|
-
.CodeMirror
|
|
90
|
+
.CodeMirror,
|
|
91
|
+
.cm-editor {
|
|
81
92
|
flex: 1;
|
|
82
93
|
height: 100%;
|
|
83
94
|
}
|
package/src/themes.scss
CHANGED
|
@@ -240,7 +240,8 @@
|
|
|
240
240
|
.yasqe {
|
|
241
241
|
background-color: var(--yasgui-bg-primary);
|
|
242
242
|
|
|
243
|
-
.CodeMirror
|
|
243
|
+
.CodeMirror,
|
|
244
|
+
.cm-editor {
|
|
244
245
|
background-color: var(--yasgui-bg-primary);
|
|
245
246
|
color: var(--yasgui-text-primary);
|
|
246
247
|
}
|
|
@@ -365,17 +366,21 @@
|
|
|
365
366
|
}
|
|
366
367
|
}
|
|
367
368
|
|
|
368
|
-
// CodeMirror hints theming
|
|
369
|
-
|
|
369
|
+
// CodeMirror hints (autocompletion tooltip) theming.
|
|
370
|
+
// yasqe gives the CodeMirror 6 autocompletion tooltip the legacy `CodeMirror-hints` class.
|
|
371
|
+
.CodeMirror-hints,
|
|
372
|
+
.cm-tooltip.CodeMirror-hints {
|
|
370
373
|
background: var(--yasgui-bg-primary) !important;
|
|
371
374
|
border-color: var(--yasgui-border-color) !important;
|
|
372
375
|
}
|
|
373
376
|
|
|
374
|
-
.CodeMirror-hint
|
|
377
|
+
.CodeMirror-hint,
|
|
378
|
+
.CodeMirror-hints > ul > li {
|
|
375
379
|
color: var(--yasgui-text-primary) !important;
|
|
376
380
|
}
|
|
377
381
|
|
|
378
|
-
li.CodeMirror-hint-active
|
|
382
|
+
li.CodeMirror-hint-active,
|
|
383
|
+
.CodeMirror-hints > ul > li[aria-selected] {
|
|
379
384
|
background: var(--yasgui-accent-color) !important;
|
|
380
385
|
color: var(--yasgui-bg-primary) !important;
|
|
381
386
|
}
|
package/src/version.ts
CHANGED