From a65578f2b1d455a735b7a8663e40accf30aaf051 Mon Sep 17 00:00:00 2001 From: ecmel Date: Wed, 25 Sep 2024 17:39:34 +0300 Subject: [PATCH 01/57] ported datasource to shoelace --- package-lock.json | 120 ++ package.json | 1 + src/services/dataSourceEditorProvider.ts | 20 +- src/webview/components/kdbDataSourceView.ts | 1096 +++++++++---------- src/webview/main.ts | 12 + src/webview/styles/dark.css | 483 ++++++++ src/webview/styles/light.css | 484 ++++++++ src/webview/styles/style.css | 22 + 8 files changed, 1679 insertions(+), 559 deletions(-) create mode 100644 src/webview/styles/dark.css create mode 100644 src/webview/styles/light.css create mode 100644 src/webview/styles/style.css diff --git a/package-lock.json b/package-lock.json index 875901c3..cb404763 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,6 +29,7 @@ "vscode-uri": "^3.0.8" }, "devDependencies": { + "@shoelace-style/shoelace": "^2.17.1", "@types/extract-zip": "^2.0.1", "@types/fs-extra": "^11.0.4", "@types/glob": "^8.1.0", @@ -353,6 +354,15 @@ "resolved": "https://registry.npmjs.org/@chevrotain/utils/-/utils-10.5.0.tgz", "integrity": "sha512-hBzuU5+JjB2cqNZyszkDHZgOSrUUT8V3dhgRl8Q9Gp6dAj/H5+KILGjbhDpc3Iy9qmqlm/akuOI2ut9VUtzJxQ==" }, + "node_modules/@ctrl/tinycolor": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-4.1.0.tgz", + "integrity": "sha512-WyOx8cJQ+FQus4Mm4uPIZA64gbk3Wxh0so5Lcii0aJifqwoVOlfFtorjLE0Hen4OYyHZMXDWqMmaQemBhgxFRQ==", + "dev": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.23.1", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz", @@ -906,6 +916,31 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, + "node_modules/@floating-ui/core": { + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.8.tgz", + "integrity": "sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA==", + "dev": true, + "dependencies": { + "@floating-ui/utils": "^0.2.8" + } + }, + "node_modules/@floating-ui/dom": { + "version": "1.6.11", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.11.tgz", + "integrity": "sha512-qkMCxSR24v2vGkhYDo/UzxfJN3D4syqSjyuTFz6C7XcpU1pASPRieNI0Kj5VP3/503mOfYiGY891ugBX1GlABQ==", + "dev": true, + "dependencies": { + "@floating-ui/core": "^1.6.0", + "@floating-ui/utils": "^0.2.8" + } + }, + "node_modules/@floating-ui/utils": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.8.tgz", + "integrity": "sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig==", + "dev": true + }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -1091,6 +1126,15 @@ "dev": true, "license": "BSD-3-Clause" }, + "node_modules/@lit/react": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@lit/react/-/react-1.0.5.tgz", + "integrity": "sha512-RSHhrcuSMa4vzhqiTenzXvtQ6QDq3hSPsnHHO3jaPmmvVFeoNNm4DHoQ0zLdKAUvY3wP3tTENSUf7xpyVfrDEA==", + "dev": true, + "peerDependencies": { + "@types/react": "17 || 18" + } + }, "node_modules/@lit/reactive-element": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-2.0.4.tgz", @@ -1188,6 +1232,45 @@ "node": ">=14" } }, + "node_modules/@shoelace-style/animations": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@shoelace-style/animations/-/animations-1.2.0.tgz", + "integrity": "sha512-avvo1xxkLbv2dgtabdewBbqcJfV0e0zCwFqkPMnHFGbJbBHorRFfMAHh1NG9ymmXn0jW95ibUVH03E1NYXD6Gw==", + "dev": true, + "funding": { + "type": "individual", + "url": "https://github.com/sponsors/claviska" + } + }, + "node_modules/@shoelace-style/localize": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@shoelace-style/localize/-/localize-3.2.1.tgz", + "integrity": "sha512-r4C9C/5kSfMBIr0D9imvpRdCNXtUNgyYThc4YlS6K5Hchv1UyxNQ9mxwj+BTRH2i1Neits260sR3OjKMnplsFA==", + "dev": true + }, + "node_modules/@shoelace-style/shoelace": { + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/@shoelace-style/shoelace/-/shoelace-2.17.1.tgz", + "integrity": "sha512-fB9+bPHLg5zVwPbBKEqY3ghyttkJq9RuUzFMTZKweKrNKKDMUACtI8DlMYUqNwpdZMJhf7a0xeak6vFVBSxcbQ==", + "dev": true, + "dependencies": { + "@ctrl/tinycolor": "^4.0.2", + "@floating-ui/dom": "^1.5.3", + "@lit/react": "^1.0.0", + "@shoelace-style/animations": "^1.1.0", + "@shoelace-style/localize": "^3.1.2", + "composed-offset-position": "^0.0.4", + "lit": "^3.0.0", + "qr-creator": "^1.0.0" + }, + "engines": { + "node": ">=14.17.0" + }, + "funding": { + "type": "individual", + "url": "https://github.com/sponsors/claviska" + } + }, "node_modules/@sinonjs/commons": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", @@ -1354,6 +1437,24 @@ "form-data": "^4.0.0" } }, + "node_modules/@types/prop-types": { + "version": "15.7.13", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.13.tgz", + "integrity": "sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==", + "dev": true, + "peer": true + }, + "node_modules/@types/react": { + "version": "18.3.9", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.9.tgz", + "integrity": "sha512-+BpAVyTpJkNWWSSnaLBk6ePpHLOGJKnEQNbINNovPWzvEUyAe3e+/d494QdEh71RekM/qV7lw6jzf1HGrJyAtQ==", + "dev": true, + "peer": true, + "dependencies": { + "@types/prop-types": "*", + "csstype": "^3.0.2" + } + }, "node_modules/@types/semver": { "version": "7.5.8", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", @@ -1981,6 +2082,12 @@ "node": ">= 0.8" } }, + "node_modules/composed-offset-position": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/composed-offset-position/-/composed-offset-position-0.0.4.tgz", + "integrity": "sha512-vMlvu1RuNegVE0YsCDSV/X4X10j56mq7PCIyOKK74FxkXzGLwhOUmdkJLSdOBOMwWycobGUMgft2lp+YgTe8hw==", + "dev": true + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -2016,6 +2123,13 @@ "node": "*" } }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "dev": true, + "peer": true + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -4089,6 +4203,12 @@ "node": ">=6" } }, + "node_modules/qr-creator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/qr-creator/-/qr-creator-1.0.0.tgz", + "integrity": "sha512-C0cqfbS1P5hfqN4NhsYsUXePlk9BO+a45bAQ3xLYjBL3bOIFzoVEjs79Fado9u9BPBD3buHi3+vY+C8tHh4qMQ==", + "dev": true + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", diff --git a/package.json b/package.json index 4ac52d0e..898ea8c2 100644 --- a/package.json +++ b/package.json @@ -955,6 +955,7 @@ "bracketSameLine": true }, "devDependencies": { + "@shoelace-style/shoelace": "^2.17.1", "@types/extract-zip": "^2.0.1", "@types/fs-extra": "^11.0.4", "@types/glob": "^8.1.0", diff --git a/src/services/dataSourceEditorProvider.ts b/src/services/dataSourceEditorProvider.ts index 2fed725c..14f44270 100644 --- a/src/services/dataSourceEditorProvider.ts +++ b/src/services/dataSourceEditorProvider.ts @@ -12,6 +12,7 @@ */ import { + ColorThemeKind, CustomTextEditorProvider, Disposable, ExtensionContext, @@ -118,6 +119,7 @@ export class DataSourceEditorProvider implements CustomTextEditorProvider { dataSourceFile: this.getDocumentAsJson(document), insightsMeta: await this.getMeta(selectedServer), isInsights: true, + theme: window.activeColorTheme.kind, }); } }; @@ -129,6 +131,10 @@ export class DataSourceEditorProvider implements CustomTextEditorProvider { } }); + window.onDidChangeActiveColorTheme(() => { + updateWebview(); + }); + const changeDocumentSubscription = workspace.onDidChangeTextDocument( (event) => { if (event.document.uri.toString() === document.uri.toString()) { @@ -220,23 +226,23 @@ export class DataSourceEditorProvider implements CustomTextEditorProvider { } private getWebviewContent(webview: Webview) { - const webviewUri = getUri(webview, this.context.extensionUri, [ - "out", - "webview.js", - ]); - const nonce = getNonce(); + const getResource = (resource: string) => + getUri(webview, this.context.extensionUri, ["out", resource]); return /* html */ ` - + + + + + DataSource - `; diff --git a/src/webview/components/kdbDataSourceView.ts b/src/webview/components/kdbDataSourceView.ts index 5c8af2e6..dee3fcee 100644 --- a/src/webview/components/kdbDataSourceView.ts +++ b/src/webview/components/kdbDataSourceView.ts @@ -32,7 +32,6 @@ import { filterOperators, } from "../../models/dataSource"; import { MetaObjectPayload } from "../../models/meta"; -import { kdbStyles, vscodeStyles } from "./styles"; import { DataSourceCommand, DataSourceMessage2 } from "../../models/messages"; const MAX_RULES = 32; @@ -40,16 +39,69 @@ const MAX_RULES = 32; @customElement("kdb-data-source-view") export class KdbDataSourceView extends LitElement { static styles = [ - vscodeStyles, - kdbStyles, css` - vscode-text-area::part(control) { - width: 48em !important; + *, + *::before, + *::after { + box-sizing: border-box; } - .panel { - width: 50em; - margin-top: 0.5em; + * { + margin: 0; + } + + :host { + overflow: hidden; + } + + .container { + display: flex; + flex-flow: row nowrap; + overflow: hidden; + } + + .tabs { + flex-grow: 1; + } + + .actions { + display: flex; + flex-flow: column nowrap; + gap: 0.5rem; + padding: 1rem; + } + + .actions sl-button-group > sl-button { + flex-grow: 1; + } + + sl-tab-panel { + height: calc(100vh - 57.2px); + overflow: scroll; + padding: 0.5rem; + } + + sl-input, + sl-select { + min-width: 12rem; + max-width: 12rem; + } + + sl-checkbox { + padding-bottom: 0.275rem; + } + + .col { + display: flex; + flex-direction: column; + gap: 0.5em; + } + + .row { + display: flex; + flex-direction: row; + gap: 0.5em; + align-items: flex-end; } `, ]; @@ -121,6 +173,12 @@ export class KdbDataSourceView extends LitElement { this.aggs = optional.aggs; this.groups = optional.groups; } + if ("theme" in msg) { + document.documentElement.className = + msg.theme === 1 || msg.theme === 4 + ? "sl-theme-light" + : "sl-theme-dark"; + } this.requestUpdate(); } }; @@ -232,8 +290,8 @@ export class KdbDataSourceView extends LitElement { const value = api.api === ".kxi.getData" ? api.api.replace(".kxi.", "") : api.api; return html` - ${value}${value} `; }); @@ -245,9 +303,7 @@ export class KdbDataSourceView extends LitElement { if (this.isInsights && this.isMetaLoaded) { return this.insightsMeta.assembly.flatMap((assembly) => assembly.tbls.map( - (value) => html` - ${value} - `, + (value) => html` ${value} `, ), ); } @@ -262,7 +318,7 @@ export class KdbDataSourceView extends LitElement { if (found) { return found.columns.map( ({ column }) => html` - ${column} + ${column} `, ); } @@ -278,7 +334,7 @@ export class KdbDataSourceView extends LitElement { if (!this.qsqlTarget) { this.qsqlTarget = value; } - return html`${value}`; + return html`${value}`; }); } return []; @@ -287,76 +343,62 @@ export class KdbDataSourceView extends LitElement { renderFilter(filter: Filter) { return html`
- { filter.active = (event.target as HTMLInputElement).checked; this.requestChange(); - }}"> - - - + + ${filter.operator || "(none)"} + Operators + ${filterOperators.map( + (operator) => + html`${operator}`, + )} + + ${this.filters.indexOf(filter) === 0 ? "Set Parameter" : ""} - -
- + + ++ - -- -
+
`; } @@ -391,36 +434,35 @@ export class KdbDataSourceView extends LitElement { renderLabel(label: Label) { return html`
- { label.active = (event.target as HTMLInputElement).checked; this.requestChange(); - }}"> - + ${this.labels.indexOf(label) === 0 - ? "Filter By Label" - : ""} - + ${this.labels.indexOf(label) === 0 ? "Value" : ""} -
- + + ++ - -- -
+
`; } @@ -453,40 +496,34 @@ export class KdbDataSourceView extends LitElement { renderSort(sort: Sort) { return html`
- { sort.active = (event.target as HTMLInputElement).checked; this.requestChange(); - }}"> - -
- ${this.isMetaLoaded ? "Meta Columns" : "Meta Not Loaded"} + ${this.renderColumnOptions()} + + + ++ - -- -
+
`; } @@ -519,76 +557,63 @@ export class KdbDataSourceView extends LitElement { renderAgg(agg: Agg) { return html`
- { agg.active = (event.target as HTMLInputElement).checked; this.requestChange(); - }}"> - + ${this.aggs.indexOf(agg) === 0 - ? "Define Output Aggregate" - : ""} - - -
- ${this.isMetaLoaded ? "Meta Columns" : "Meta Not Loaded"} + ${this.renderColumnOptions()} + + + ++ - -- -
+
`; } @@ -621,42 +647,36 @@ export class KdbDataSourceView extends LitElement { renderGroup(group: Group) { return html`
- { group.active = (event.target as HTMLInputElement).checked; this.requestChange(); - }}"> - -
- ${this.isMetaLoaded ? "Meta Columns" : "Meta Not Loaded"} + ${this.renderColumnOptions()} + + + ++ - -- -
+
`; } - render() { + renderAPI() { return html` -
-
-
- - API - QSQL - SQL - -
-
- - - -
- -
- Start Time - - End Time -
- -
- - -
- -
- - -
- -
- ${repeat( - this.filters, - (filter) => filter, - (filter) => this.renderFilter(filter), - )} -
-
- ${repeat( - this.labels, - (label) => label, - (label) => this.renderLabel(label), - )} -
-
- ${repeat( - this.sorts, - (sort) => sort, - (sort) => this.renderSort(sort), - )} -
-
- ${repeat( - this.aggs, - (agg) => agg, - (agg) => this.renderAgg(agg), - )} -
-
- ${repeat( - this.groups, - (group) => group, - (group) => this.renderGroup(group), - )} -
-
-
- - -
-
- -
-
- Query -
-
-
- - -
-
- Query -
-
-
-
-
+
+
+ + ${this.selectedApi || "(none)"} + ${this.isMetaLoaded ? "Meta APIs" : "Meta Not Loaded"} + ${this.renderApiOptions()} + + + + ${this.selectedTable || "(none)"} + ${this.isMetaLoaded ? "Meta Tables" : "Meta Not Loaded"} + ${this.renderTableOptions()} +
-
- -
- Save + + + +
+ +
+ + + ${this.fill || "(none)"} - RefreshOptions + zero + forward + +
+ +
+ + + + ${this.temporality || "(none)"} -
- Run - Populate Scratchpad + Options + snapshot + slice + +
+ +
+ ${repeat( + this.filters, + (filter) => filter, + (filter) => this.renderFilter(filter), + )}
+
+ ${repeat( + this.labels, + (label) => label, + (label) => this.renderLabel(label), + )} +
+
+ ${repeat( + this.sorts, + (sort) => sort, + (sort) => this.renderSort(sort), + )} +
+
+ ${repeat( + this.aggs, + (agg) => agg, + (agg) => this.renderAgg(agg), + )} +
+
+ ${repeat( + this.groups, + (group) => group, + (group) => this.renderGroup(group), + )} +
+
+ `; + } + + renderQSQL() { + return html` + + ${this.qsqlTarget || "(none)"} + ${this.isMetaLoaded ? "Meta Targets" : "Meta Not Loaded"} + ${this.renderTargetOptions()} + + + `; + } + + renderSQL() { + return html` + + + `; + } + + renderTabGroup() { + return html` + + API + QSQL + SQL + ${this.renderAPI()} + ${this.renderQSQL()} + ${this.renderSQL()} + + `; + } + + renderActions() { + return html` + + ${this.selectedServer || "(none)"} + Connections + ${this.servers.map( + (server) => html` + ${server} + `, + )} + + + Save + Refresh + + Run + Populate Scratchpad + `; + } + + render() { + return html` +
+
${this.renderTabGroup()}
+
${this.renderActions()}
`; } diff --git a/src/webview/main.ts b/src/webview/main.ts index 6609d97a..5a770d39 100644 --- a/src/webview/main.ts +++ b/src/webview/main.ts @@ -11,6 +11,18 @@ * specific language governing permissions and limitations under the License. */ +import "@shoelace-style/shoelace/dist/components/button/button.js"; +import "@shoelace-style/shoelace/dist/components/checkbox/checkbox.js"; +import "@shoelace-style/shoelace/dist/components/button-group/button-group.js"; +import "@shoelace-style/shoelace/dist/components/input/input.js"; +import "@shoelace-style/shoelace/dist/components/textarea/textarea.js"; +import "@shoelace-style/shoelace/dist/components/select/select.js"; +import "@shoelace-style/shoelace/dist/components/option/option.js"; +import "@shoelace-style/shoelace/dist/components/divider/divider.js"; +import "@shoelace-style/shoelace/dist/components/tab-group/tab-group.js"; +import "@shoelace-style/shoelace/dist/components/tab-panel/tab-panel.js"; +import "@shoelace-style/shoelace/dist/components/tab/tab.js"; + import { allComponents, provideVSCodeDesignSystem, diff --git a/src/webview/styles/dark.css b/src/webview/styles/dark.css new file mode 100644 index 00000000..dad0b514 --- /dev/null +++ b/src/webview/styles/dark.css @@ -0,0 +1,483 @@ +:host, +.sl-theme-dark { + color-scheme: dark; + + --sl-color-gray-50: hsl(240 5.1% 15%); + --sl-color-gray-100: hsl(240 5.7% 18.2%); + --sl-color-gray-200: hsl(240 4.6% 22%); + --sl-color-gray-300: hsl(240 5% 27.6%); + --sl-color-gray-400: hsl(240 5% 35.5%); + --sl-color-gray-500: hsl(240 3.7% 44%); + --sl-color-gray-600: hsl(240 5.3% 58%); + --sl-color-gray-700: hsl(240 5.6% 73%); + --sl-color-gray-800: hsl(240 7.3% 84%); + --sl-color-gray-900: hsl(240 9.1% 91.8%); + --sl-color-gray-950: hsl(0 0% 95%); + + --sl-color-red-50: hsl(0 56% 23.9%); + --sl-color-red-100: hsl(0.6 60% 33.9%); + --sl-color-red-200: hsl(0.9 67.2% 37.1%); + --sl-color-red-300: hsl(1.1 71.3% 43.7%); + --sl-color-red-400: hsl(1 76% 52.5%); + --sl-color-red-500: hsl(0.7 89.6% 57.2%); + --sl-color-red-600: hsl(0 98.6% 67.9%); + --sl-color-red-700: hsl(0 100% 72.3%); + --sl-color-red-800: hsl(0 100% 85.6%); + --sl-color-red-900: hsl(0 100% 90.3%); + --sl-color-red-950: hsl(0 100% 95.9%); + + --sl-color-orange-50: hsl(15 64.2% 23.3%); + --sl-color-orange-100: hsl(15.1 70.9% 31.1%); + --sl-color-orange-200: hsl(15.3 75.7% 35.5%); + --sl-color-orange-300: hsl(17.1 83.5% 42.7%); + --sl-color-orange-400: hsl(20.1 88% 50.8%); + --sl-color-orange-500: hsl(24.3 100% 50.5%); + --sl-color-orange-600: hsl(27.2 100% 57.7%); + --sl-color-orange-700: hsl(31.3 100% 68.7%); + --sl-color-orange-800: hsl(33.8 100% 79.3%); + --sl-color-orange-900: hsl(38.9 100% 87.7%); + --sl-color-orange-950: hsl(46.2 100% 95%); + + --sl-color-amber-50: hsl(21.9 66.3% 21.1%); + --sl-color-amber-100: hsl(21.5 73.6% 29.7%); + --sl-color-amber-200: hsl(22.3 77.6% 33.3%); + --sl-color-amber-300: hsl(25.4 84.2% 39.6%); + --sl-color-amber-400: hsl(31.4 87.4% 46.7%); + --sl-color-amber-500: hsl(37 96.6% 48.3%); + --sl-color-amber-600: hsl(43.3 100% 53.4%); + --sl-color-amber-700: hsl(46.5 100% 61.1%); + --sl-color-amber-800: hsl(49.3 100% 73%); + --sl-color-amber-900: hsl(51.8 100% 85%); + --sl-color-amber-950: hsl(60 100% 94.6%); + + --sl-color-yellow-50: hsl(32.5 60% 18.2%); + --sl-color-yellow-100: hsl(28.1 68.6% 29%); + --sl-color-yellow-200: hsl(31.3 75.8% 30.8%); + --sl-color-yellow-300: hsl(34.7 84.4% 35.3%); + --sl-color-yellow-400: hsl(40.1 87.3% 43.3%); + --sl-color-yellow-500: hsl(44.7 88% 46%); + --sl-color-yellow-600: hsl(47.7 100% 50.9%); + --sl-color-yellow-700: hsl(51.3 100% 59.9%); + --sl-color-yellow-800: hsl(54.6 100% 73%); + --sl-color-yellow-900: hsl(58.9 100% 84.2%); + --sl-color-yellow-950: hsl(60 100% 94%); + + --sl-color-lime-50: hsl(86.5 54.4% 18%); + --sl-color-lime-100: hsl(87.6 56.8% 23.3%); + --sl-color-lime-200: hsl(85.8 63.2% 24.5%); + --sl-color-lime-300: hsl(86.1 72% 29.4%); + --sl-color-lime-400: hsl(85.5 76.8% 37.3%); + --sl-color-lime-500: hsl(84.3 74.2% 42.1%); + --sl-color-lime-600: hsl(82.8 81.5% 52.6%); + --sl-color-lime-700: hsl(82 89.9% 64%); + --sl-color-lime-800: hsl(80.9 97.9% 76.6%); + --sl-color-lime-900: hsl(77.9 100% 85.8%); + --sl-color-lime-950: hsl(69.5 100% 93.8%); + + --sl-color-green-50: hsl(144.3 53.6% 16%); + --sl-color-green-100: hsl(143.2 55.4% 23.5%); + --sl-color-green-200: hsl(141.5 58.2% 26.3%); + --sl-color-green-300: hsl(140.8 64.2% 31.8%); + --sl-color-green-400: hsl(140.3 68% 39.2%); + --sl-color-green-500: hsl(141.1 64.9% 43%); + --sl-color-green-600: hsl(141.6 72.4% 55.2%); + --sl-color-green-700: hsl(141.7 82.7% 70.1%); + --sl-color-green-800: hsl(141 90.9% 82.1%); + --sl-color-green-900: hsl(142 100% 89.1%); + --sl-color-green-950: hsl(144 100% 95.5%); + + --sl-color-emerald-50: hsl(164.3 75% 13.5%); + --sl-color-emerald-100: hsl(163.5 72.6% 20.1%); + --sl-color-emerald-200: hsl(162.1 73.7% 22.4%); + --sl-color-emerald-300: hsl(161.3 77.3% 27.6%); + --sl-color-emerald-400: hsl(159.6 77.1% 34.3%); + --sl-color-emerald-500: hsl(159.1 73.5% 37.9%); + --sl-color-emerald-600: hsl(157.8 66.8% 48.9%); + --sl-color-emerald-700: hsl(156.2 76.1% 63.8%); + --sl-color-emerald-800: hsl(152.4 84.4% 77.4%); + --sl-color-emerald-900: hsl(149.3 100% 87%); + --sl-color-emerald-950: hsl(158.6 100% 94.8%); + + --sl-color-teal-50: hsl(176.5 51.5% 15.4%); + --sl-color-teal-100: hsl(175.9 54.7% 22.3%); + --sl-color-teal-200: hsl(175.9 60.7% 23.9%); + --sl-color-teal-300: hsl(174.5 67.3% 28.8%); + --sl-color-teal-400: hsl(174.4 71.9% 34.9%); + --sl-color-teal-500: hsl(173.1 71% 38.3%); + --sl-color-teal-600: hsl(172.3 68.2% 48.1%); + --sl-color-teal-700: hsl(170.5 81.3% 61.5%); + --sl-color-teal-800: hsl(168.4 92.1% 75.2%); + --sl-color-teal-900: hsl(168.3 100% 86%); + --sl-color-teal-950: hsl(180 100% 95.5%); + + --sl-color-cyan-50: hsl(197.1 53.8% 20.3%); + --sl-color-cyan-100: hsl(196.8 57.3% 27.2%); + --sl-color-cyan-200: hsl(195.3 62.7% 29.4%); + --sl-color-cyan-300: hsl(193.5 71.3% 34.1%); + --sl-color-cyan-400: hsl(192.5 76.8% 40.6%); + --sl-color-cyan-500: hsl(189.4 78.6% 42.6%); + --sl-color-cyan-600: hsl(188.2 89.1% 51.7%); + --sl-color-cyan-700: hsl(187 98.6% 66.2%); + --sl-color-cyan-800: hsl(184.9 100% 78.3%); + --sl-color-cyan-900: hsl(180 100% 86.6%); + --sl-color-cyan-950: hsl(180 100% 94.8%); + + --sl-color-sky-50: hsl(203 63.8% 20.9%); + --sl-color-sky-100: hsl(203.4 70.4% 28%); + --sl-color-sky-200: hsl(202.7 75.8% 30.8%); + --sl-color-sky-300: hsl(203.1 80.4% 36.1%); + --sl-color-sky-400: hsl(202.1 80.5% 44.3%); + --sl-color-sky-500: hsl(199.7 85.9% 47.7%); + --sl-color-sky-600: hsl(198.7 97.9% 57.2%); + --sl-color-sky-700: hsl(198.7 100% 70.5%); + --sl-color-sky-800: hsl(198.8 100% 82.5%); + --sl-color-sky-900: hsl(198.5 100% 89.9%); + --sl-color-sky-950: hsl(186 100% 95.5%); + + --sl-color-blue-50: hsl(227.1 49.5% 22.7%); + --sl-color-blue-100: hsl(225.8 58.9% 36.8%); + --sl-color-blue-200: hsl(227.7 64.4% 42.9%); + --sl-color-blue-300: hsl(226.1 72.7% 51.2%); + --sl-color-blue-400: hsl(222.6 86.5% 56.3%); + --sl-color-blue-500: hsl(217.8 95.8% 57.4%); + --sl-color-blue-600: hsl(213.3 100% 65%); + --sl-color-blue-700: hsl(210.9 100% 74.8%); + --sl-color-blue-800: hsl(211.5 100% 83.4%); + --sl-color-blue-900: hsl(211 100% 88.9%); + --sl-color-blue-950: hsl(201.8 100% 95.3%); + + --sl-color-indigo-50: hsl(243.5 40.8% 27%); + --sl-color-indigo-100: hsl(242.9 45.7% 37.6%); + --sl-color-indigo-200: hsl(244.7 52.7% 43.1%); + --sl-color-indigo-300: hsl(245.3 60.5% 52.4%); + --sl-color-indigo-400: hsl(244.1 79.2% 60.4%); + --sl-color-indigo-500: hsl(239.6 88.7% 63.8%); + --sl-color-indigo-600: hsl(234.5 96.7% 70.9%); + --sl-color-indigo-700: hsl(229.4 100% 78.3%); + --sl-color-indigo-800: hsl(227.1 100% 85%); + --sl-color-indigo-900: hsl(223.8 100% 89.9%); + --sl-color-indigo-950: hsl(220 100% 95.1%); + + --sl-color-violet-50: hsl(265.1 57.3% 25.4%); + --sl-color-violet-100: hsl(263.5 63.8% 39.4%); + --sl-color-violet-200: hsl(263.4 66.2% 44.1%); + --sl-color-violet-300: hsl(263.7 72.8% 52.4%); + --sl-color-violet-400: hsl(262.5 87.3% 59.8%); + --sl-color-violet-500: hsl(258.3 95.1% 63.2%); + --sl-color-violet-600: hsl(255.1 100% 67.2%); + --sl-color-violet-700: hsl(253 100% 81.5%); + --sl-color-violet-800: hsl(251.7 100% 87.9%); + --sl-color-violet-900: hsl(254.1 100% 91.7%); + --sl-color-violet-950: hsl(257.1 100% 96.1%); + + --sl-color-purple-50: hsl(276 54.3% 20.5%); + --sl-color-purple-100: hsl(273.6 61.8% 35.4%); + --sl-color-purple-200: hsl(272.9 64% 41.4%); + --sl-color-purple-300: hsl(271.9 68.1% 49.2%); + --sl-color-purple-400: hsl(271.5 85.1% 57.8%); + --sl-color-purple-500: hsl(270.7 96.4% 62.1%); + --sl-color-purple-600: hsl(270.5 100% 71.9%); + --sl-color-purple-700: hsl(270.9 100% 81.3%); + --sl-color-purple-800: hsl(272.4 100% 87.7%); + --sl-color-purple-900: hsl(276.7 100% 91.5%); + --sl-color-purple-950: hsl(300 100% 96.5%); + + --sl-color-fuchsia-50: hsl(297.1 51.2% 18.6%); + --sl-color-fuchsia-100: hsl(296.7 59.5% 31.5%); + --sl-color-fuchsia-200: hsl(295.4 65.4% 35.1%); + --sl-color-fuchsia-300: hsl(294.6 67.4% 42.2%); + --sl-color-fuchsia-400: hsl(293.3 68.7% 51.2%); + --sl-color-fuchsia-500: hsl(292.1 88.4% 57.7%); + --sl-color-fuchsia-600: hsl(292 98.5% 59.5%); + --sl-color-fuchsia-700: hsl(292.4 100% 79.5%); + --sl-color-fuchsia-800: hsl(292.9 100% 86.8%); + --sl-color-fuchsia-900: hsl(300 100% 91.5%); + --sl-color-fuchsia-950: hsl(300 100% 96.3%); + + --sl-color-pink-50: hsl(336.2 59.6% 20%); + --sl-color-pink-100: hsl(336.8 63.9% 34%); + --sl-color-pink-200: hsl(336.8 68.7% 37.6%); + --sl-color-pink-300: hsl(336.1 71.8% 44.5%); + --sl-color-pink-400: hsl(333.9 74.9% 53.1%); + --sl-color-pink-500: hsl(330.7 86.3% 57.7%); + --sl-color-pink-600: hsl(328.6 91.5% 67.2%); + --sl-color-pink-700: hsl(327.4 97.6% 78.7%); + --sl-color-pink-800: hsl(325.1 100% 86.6%); + --sl-color-pink-900: hsl(322.1 100% 91.3%); + --sl-color-pink-950: hsl(315 100% 95.9%); + + --sl-color-rose-50: hsl(342.3 62.9% 21.5%); + --sl-color-rose-100: hsl(342.8 68.9% 34.2%); + --sl-color-rose-200: hsl(344.8 72.6% 37.3%); + --sl-color-rose-300: hsl(346.9 75.8% 43.7%); + --sl-color-rose-400: hsl(348.2 80.1% 52.7%); + --sl-color-rose-500: hsl(350.4 94.8% 57.5%); + --sl-color-rose-600: hsl(351.2 100% 58.1%); + --sl-color-rose-700: hsl(352.3 100% 78.1%); + --sl-color-rose-800: hsl(352 100% 86.2%); + --sl-color-rose-900: hsl(354.5 100% 90.7%); + --sl-color-rose-950: hsl(353.3 100% 95.7%); + + --sl-color-primary-50: var(--sl-color-sky-50); + --sl-color-primary-100: var(--sl-color-sky-100); + --sl-color-primary-200: var(--sl-color-sky-200); + --sl-color-primary-300: var(--sl-color-sky-300); + --sl-color-primary-400: var(--sl-color-sky-400); + --sl-color-primary-500: var(--sl-color-sky-500); + --sl-color-primary-600: var(--sl-color-sky-600); + --sl-color-primary-700: var(--sl-color-sky-700); + --sl-color-primary-800: var(--sl-color-sky-800); + --sl-color-primary-900: var(--sl-color-sky-900); + --sl-color-primary-950: var(--sl-color-sky-950); + + --sl-color-success-50: var(--sl-color-green-50); + --sl-color-success-100: var(--sl-color-green-100); + --sl-color-success-200: var(--sl-color-green-200); + --sl-color-success-300: var(--sl-color-green-300); + --sl-color-success-400: var(--sl-color-green-400); + --sl-color-success-500: var(--sl-color-green-500); + --sl-color-success-600: var(--sl-color-green-600); + --sl-color-success-700: var(--sl-color-green-700); + --sl-color-success-800: var(--sl-color-green-800); + --sl-color-success-900: var(--sl-color-green-900); + --sl-color-success-950: var(--sl-color-green-950); + + --sl-color-warning-50: var(--sl-color-amber-50); + --sl-color-warning-100: var(--sl-color-amber-100); + --sl-color-warning-200: var(--sl-color-amber-200); + --sl-color-warning-300: var(--sl-color-amber-300); + --sl-color-warning-400: var(--sl-color-amber-400); + --sl-color-warning-500: var(--sl-color-amber-500); + --sl-color-warning-600: var(--sl-color-amber-600); + --sl-color-warning-700: var(--sl-color-amber-700); + --sl-color-warning-800: var(--sl-color-amber-800); + --sl-color-warning-900: var(--sl-color-amber-900); + --sl-color-warning-950: var(--sl-color-amber-950); + + --sl-color-danger-50: var(--sl-color-red-50); + --sl-color-danger-100: var(--sl-color-red-100); + --sl-color-danger-200: var(--sl-color-red-200); + --sl-color-danger-300: var(--sl-color-red-300); + --sl-color-danger-400: var(--sl-color-red-400); + --sl-color-danger-500: var(--sl-color-red-500); + --sl-color-danger-600: var(--sl-color-red-600); + --sl-color-danger-700: var(--sl-color-red-700); + --sl-color-danger-800: var(--sl-color-red-800); + --sl-color-danger-900: var(--sl-color-red-900); + --sl-color-danger-950: var(--sl-color-red-950); + + --sl-color-neutral-50: var(--sl-color-gray-50); + --sl-color-neutral-100: var(--sl-color-gray-100); + --sl-color-neutral-200: var(--sl-color-gray-200); + --sl-color-neutral-300: var(--sl-color-gray-300); + --sl-color-neutral-400: var(--sl-color-gray-400); + --sl-color-neutral-500: var(--sl-color-gray-500); + --sl-color-neutral-600: var(--sl-color-gray-600); + --sl-color-neutral-700: var(--sl-color-gray-700); + --sl-color-neutral-800: var(--sl-color-gray-800); + --sl-color-neutral-900: var(--sl-color-gray-900); + --sl-color-neutral-950: var(--sl-color-gray-950); + + --sl-color-neutral-0: hsl(240, 5.9%, 11%); + --sl-color-neutral-1000: hsl(0, 0%, 100%); + + --sl-border-radius-small: 0.1875rem; + --sl-border-radius-medium: 0.25rem; + --sl-border-radius-large: 0.5rem; + --sl-border-radius-x-large: 1rem; + + --sl-border-radius-circle: 50%; + --sl-border-radius-pill: 9999px; + + --sl-shadow-x-small: 0 1px 2px rgb(0 0 0 / 18%); + --sl-shadow-small: 0 1px 2px rgb(0 0 0 / 24%); + --sl-shadow-medium: 0 2px 4px rgb(0 0 0 / 24%); + --sl-shadow-large: 0 2px 8px rgb(0 0 0 / 24%); + --sl-shadow-x-large: 0 4px 16px rgb(0 0 0 / 24%); + + --sl-spacing-3x-small: 0.125rem; + --sl-spacing-2x-small: 0.25rem; + --sl-spacing-x-small: 0.5rem; + --sl-spacing-small: 0.75rem; + --sl-spacing-medium: 1rem; + --sl-spacing-large: 1.25rem; + --sl-spacing-x-large: 1.75rem; + --sl-spacing-2x-large: 2.25rem; + --sl-spacing-3x-large: 3rem; + --sl-spacing-4x-large: 4.5rem; + + --sl-transition-x-slow: 1000ms; + --sl-transition-slow: 500ms; + --sl-transition-medium: 250ms; + --sl-transition-fast: 150ms; + --sl-transition-x-fast: 50ms; + + --sl-font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; + --sl-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, + Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", + "Segoe UI Symbol"; + --sl-font-serif: Georgia, "Times New Roman", serif; + + --sl-font-size-2x-small: 0.625rem; + --sl-font-size-x-small: 0.75rem; + --sl-font-size-small: 0.875rem; + --sl-font-size-medium: 1rem; + --sl-font-size-large: 1.25rem; + --sl-font-size-x-large: 1.5rem; + --sl-font-size-2x-large: 2.25rem; + --sl-font-size-3x-large: 3rem; + --sl-font-size-4x-large: 4.5rem; + + --sl-font-weight-light: 300; + --sl-font-weight-normal: 400; + --sl-font-weight-semibold: 500; + --sl-font-weight-bold: 700; + + --sl-letter-spacing-denser: -0.03em; + --sl-letter-spacing-dense: -0.015em; + --sl-letter-spacing-normal: normal; + --sl-letter-spacing-loose: 0.075em; + --sl-letter-spacing-looser: 0.15em; + + --sl-line-height-denser: 1; + --sl-line-height-dense: 1.4; + --sl-line-height-normal: 1.8; + --sl-line-height-loose: 2.2; + --sl-line-height-looser: 2.6; + + --sl-focus-ring-color: var(--sl-color-primary-700); + --sl-focus-ring-style: solid; + --sl-focus-ring-width: 3px; + --sl-focus-ring: var(--sl-focus-ring-style) var(--sl-focus-ring-width) + var(--sl-focus-ring-color); + --sl-focus-ring-offset: 1px; + + --sl-button-font-size-small: var(--sl-font-size-x-small); + --sl-button-font-size-medium: var(--sl-font-size-small); + --sl-button-font-size-large: var(--sl-font-size-medium); + + --sl-input-height-small: 1.875rem; + --sl-input-height-medium: 2.5rem; + --sl-input-height-large: 3.125rem; + + --sl-input-background-color: var(--sl-color-neutral-0); + --sl-input-background-color-hover: var(--sl-input-background-color); + --sl-input-background-color-focus: var(--sl-input-background-color); + --sl-input-background-color-disabled: var(--sl-color-neutral-100); + --sl-input-border-color: var(--sl-color-neutral-400); + --sl-input-border-color-hover: var(--sl-color-neutral-500); + --sl-input-border-color-focus: var(--sl-color-primary-600); + --sl-input-border-color-disabled: var(--sl-color-neutral-400); + --sl-input-border-width: 1px; + --sl-input-required-content: "*"; + --sl-input-required-content-offset: -2px; + --sl-input-required-content-color: var(--sl-input-label-color); + + --sl-input-border-radius-small: var(--sl-border-radius-medium); + --sl-input-border-radius-medium: var(--sl-border-radius-medium); + --sl-input-border-radius-large: var(--sl-border-radius-medium); + + --sl-input-font-family: var(--sl-font-sans); + --sl-input-font-weight: var(--sl-font-weight-normal); + --sl-input-font-size-small: var(--sl-font-size-small); + --sl-input-font-size-medium: var(--sl-font-size-medium); + --sl-input-font-size-large: var(--sl-font-size-large); + --sl-input-letter-spacing: var(--sl-letter-spacing-normal); + + --sl-input-color: var(--sl-color-neutral-700); + --sl-input-color-hover: var(--sl-color-neutral-700); + --sl-input-color-focus: var(--sl-color-neutral-700); + --sl-input-color-disabled: var(--sl-color-neutral-900); + --sl-input-icon-color: var(--sl-color-neutral-500); + --sl-input-icon-color-hover: var(--sl-color-neutral-600); + --sl-input-icon-color-focus: var(--sl-color-neutral-600); + --sl-input-placeholder-color: var(--sl-color-neutral-500); + --sl-input-placeholder-color-disabled: var(--sl-color-neutral-600); + --sl-input-spacing-small: var(--sl-spacing-small); + --sl-input-spacing-medium: var(--sl-spacing-medium); + --sl-input-spacing-large: var(--sl-spacing-large); + + --sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%); + --sl-input-focus-ring-offset: 0; + + --sl-input-filled-background-color: var(--sl-color-neutral-100); + --sl-input-filled-background-color-hover: var(--sl-color-neutral-100); + --sl-input-filled-background-color-focus: var(--sl-color-neutral-100); + --sl-input-filled-background-color-disabled: var(--sl-color-neutral-100); + --sl-input-filled-color: var(--sl-color-neutral-800); + --sl-input-filled-color-hover: var(--sl-color-neutral-800); + --sl-input-filled-color-focus: var(--sl-color-neutral-700); + --sl-input-filled-color-disabled: var(--sl-color-neutral-800); + + --sl-input-label-font-size-small: var(--sl-font-size-small); + --sl-input-label-font-size-medium: var(--sl-font-size-medium); + --sl-input-label-font-size-large: var(--sl-font-size-large); + --sl-input-label-color: inherit; + + --sl-input-help-text-font-size-small: var(--sl-font-size-x-small); + --sl-input-help-text-font-size-medium: var(--sl-font-size-small); + --sl-input-help-text-font-size-large: var(--sl-font-size-medium); + --sl-input-help-text-color: var(--sl-color-neutral-600); + + --sl-toggle-size-small: 0.875rem; + --sl-toggle-size-medium: 1.125rem; + --sl-toggle-size-large: 1.375rem; + + --sl-overlay-background-color: hsl(0 0% 0% / 43%); + + --sl-panel-background-color: var(--sl-color-neutral-50); + --sl-panel-border-color: var(--sl-color-neutral-200); + --sl-panel-border-width: 1px; + + --sl-tooltip-border-radius: var(--sl-border-radius-medium); + --sl-tooltip-background-color: var(--sl-color-neutral-800); + --sl-tooltip-color: var(--sl-color-neutral-0); + --sl-tooltip-font-family: var(--sl-font-sans); + --sl-tooltip-font-weight: var(--sl-font-weight-normal); + --sl-tooltip-font-size: var(--sl-font-size-small); + --sl-tooltip-line-height: var(--sl-line-height-dense); + --sl-tooltip-padding: var(--sl-spacing-2x-small) var(--sl-spacing-x-small); + --sl-tooltip-arrow-size: 6px; + + --sl-z-index-drawer: 700; + --sl-z-index-dialog: 800; + --sl-z-index-dropdown: 900; + --sl-z-index-toast: 950; + --sl-z-index-tooltip: 1000; +} + +@supports (scrollbar-gutter: stable) { + .sl-scroll-lock { + scrollbar-gutter: var(--sl-scroll-lock-gutter) !important; + } + + .sl-scroll-lock body { + overflow: hidden !important; + } +} + +@supports not (scrollbar-gutter: stable) { + .sl-scroll-lock body { + padding-right: var(--sl-scroll-lock-size) !important; + overflow: hidden !important; + } +} + +.sl-toast-stack { + position: fixed; + top: 0; + inset-inline-end: 0; + z-index: var(--sl-z-index-toast); + width: 28rem; + max-width: 100%; + max-height: 100%; + overflow: auto; +} + +.sl-toast-stack sl-alert { + margin: var(--sl-spacing-medium); +} + +.sl-toast-stack sl-alert::part(base) { + box-shadow: var(--sl-shadow-large); +} diff --git a/src/webview/styles/light.css b/src/webview/styles/light.css new file mode 100644 index 00000000..9c6acc4a --- /dev/null +++ b/src/webview/styles/light.css @@ -0,0 +1,484 @@ +:root, +:host, +.sl-theme-light { + color-scheme: light; + + --sl-color-gray-50: hsl(0 0% 97.5%); + --sl-color-gray-100: hsl(240 4.8% 95.9%); + --sl-color-gray-200: hsl(240 5.9% 90%); + --sl-color-gray-300: hsl(240 4.9% 83.9%); + --sl-color-gray-400: hsl(240 5% 64.9%); + --sl-color-gray-500: hsl(240 3.8% 46.1%); + --sl-color-gray-600: hsl(240 5.2% 33.9%); + --sl-color-gray-700: hsl(240 5.3% 26.1%); + --sl-color-gray-800: hsl(240 3.7% 15.9%); + --sl-color-gray-900: hsl(240 5.9% 10%); + --sl-color-gray-950: hsl(240 7.3% 8%); + + --sl-color-red-50: hsl(0 85.7% 97.3%); + --sl-color-red-100: hsl(0 93.3% 94.1%); + --sl-color-red-200: hsl(0 96.3% 89.4%); + --sl-color-red-300: hsl(0 93.5% 81.8%); + --sl-color-red-400: hsl(0 90.6% 70.8%); + --sl-color-red-500: hsl(0 84.2% 60.2%); + --sl-color-red-600: hsl(0 72.2% 50.6%); + --sl-color-red-700: hsl(0 73.7% 41.8%); + --sl-color-red-800: hsl(0 70% 35.3%); + --sl-color-red-900: hsl(0 62.8% 30.6%); + --sl-color-red-950: hsl(0 60% 19.6%); + + --sl-color-orange-50: hsl(33.3 100% 96.5%); + --sl-color-orange-100: hsl(34.3 100% 91.8%); + --sl-color-orange-200: hsl(32.1 97.7% 83.1%); + --sl-color-orange-300: hsl(30.7 97.2% 72.4%); + --sl-color-orange-400: hsl(27 96% 61%); + --sl-color-orange-500: hsl(24.6 95% 53.1%); + --sl-color-orange-600: hsl(20.5 90.2% 48.2%); + --sl-color-orange-700: hsl(17.5 88.3% 40.4%); + --sl-color-orange-800: hsl(15 79.1% 33.7%); + --sl-color-orange-900: hsl(15.3 74.6% 27.8%); + --sl-color-orange-950: hsl(15.2 69.1% 19%); + + --sl-color-amber-50: hsl(48 100% 96.1%); + --sl-color-amber-100: hsl(48 96.5% 88.8%); + --sl-color-amber-200: hsl(48 96.6% 76.7%); + --sl-color-amber-300: hsl(45.9 96.7% 64.5%); + --sl-color-amber-400: hsl(43.3 96.4% 56.3%); + --sl-color-amber-500: hsl(37.7 92.1% 50.2%); + --sl-color-amber-600: hsl(32.1 94.6% 43.7%); + --sl-color-amber-700: hsl(26 90.5% 37.1%); + --sl-color-amber-800: hsl(22.7 82.5% 31.4%); + --sl-color-amber-900: hsl(21.7 77.8% 26.5%); + --sl-color-amber-950: hsl(22.9 74.1% 16.7%); + + --sl-color-yellow-50: hsl(54.5 91.7% 95.3%); + --sl-color-yellow-100: hsl(54.9 96.7% 88%); + --sl-color-yellow-200: hsl(52.8 98.3% 76.9%); + --sl-color-yellow-300: hsl(50.4 97.8% 63.5%); + --sl-color-yellow-400: hsl(47.9 95.8% 53.1%); + --sl-color-yellow-500: hsl(45.4 93.4% 47.5%); + --sl-color-yellow-600: hsl(40.6 96.1% 40.4%); + --sl-color-yellow-700: hsl(35.5 91.7% 32.9%); + --sl-color-yellow-800: hsl(31.8 81% 28.8%); + --sl-color-yellow-900: hsl(28.4 72.5% 25.7%); + --sl-color-yellow-950: hsl(33.1 69% 13.9%); + + --sl-color-lime-50: hsl(78.3 92% 95.1%); + --sl-color-lime-100: hsl(79.6 89.1% 89.2%); + --sl-color-lime-200: hsl(80.9 88.5% 79.6%); + --sl-color-lime-300: hsl(82 84.5% 67.1%); + --sl-color-lime-400: hsl(82.7 78% 55.5%); + --sl-color-lime-500: hsl(83.7 80.5% 44.3%); + --sl-color-lime-600: hsl(84.8 85.2% 34.5%); + --sl-color-lime-700: hsl(85.9 78.4% 27.3%); + --sl-color-lime-800: hsl(86.3 69% 22.7%); + --sl-color-lime-900: hsl(87.6 61.2% 20.2%); + --sl-color-lime-950: hsl(86.5 60.6% 13.9%); + + --sl-color-green-50: hsl(138.5 76.5% 96.7%); + --sl-color-green-100: hsl(140.6 84.2% 92.5%); + --sl-color-green-200: hsl(141 78.9% 85.1%); + --sl-color-green-300: hsl(141.7 76.6% 73.1%); + --sl-color-green-400: hsl(141.9 69.2% 58%); + --sl-color-green-500: hsl(142.1 70.6% 45.3%); + --sl-color-green-600: hsl(142.1 76.2% 36.3%); + --sl-color-green-700: hsl(142.4 71.8% 29.2%); + --sl-color-green-800: hsl(142.8 64.2% 24.1%); + --sl-color-green-900: hsl(143.8 61.2% 20.2%); + --sl-color-green-950: hsl(144.3 60.7% 12%); + + --sl-color-emerald-50: hsl(151.8 81% 95.9%); + --sl-color-emerald-100: hsl(149.3 80.4% 90%); + --sl-color-emerald-200: hsl(152.4 76% 80.4%); + --sl-color-emerald-300: hsl(156.2 71.6% 66.9%); + --sl-color-emerald-400: hsl(158.1 64.4% 51.6%); + --sl-color-emerald-500: hsl(160.1 84.1% 39.4%); + --sl-color-emerald-600: hsl(161.4 93.5% 30.4%); + --sl-color-emerald-700: hsl(162.9 93.5% 24.3%); + --sl-color-emerald-800: hsl(163.1 88.1% 19.8%); + --sl-color-emerald-900: hsl(164.2 85.7% 16.5%); + --sl-color-emerald-950: hsl(164.3 87.5% 9.4%); + + --sl-color-teal-50: hsl(166.2 76.5% 96.7%); + --sl-color-teal-100: hsl(167.2 85.5% 89.2%); + --sl-color-teal-200: hsl(168.4 83.8% 78.2%); + --sl-color-teal-300: hsl(170.6 76.9% 64.3%); + --sl-color-teal-400: hsl(172.5 66% 50.4%); + --sl-color-teal-500: hsl(173.4 80.4% 40%); + --sl-color-teal-600: hsl(174.7 83.9% 31.6%); + --sl-color-teal-700: hsl(175.3 77.4% 26.1%); + --sl-color-teal-800: hsl(176.1 69.4% 21.8%); + --sl-color-teal-900: hsl(175.9 60.8% 19%); + --sl-color-teal-950: hsl(176.5 58.6% 11.4%); + + --sl-color-cyan-50: hsl(183.2 100% 96.3%); + --sl-color-cyan-100: hsl(185.1 95.9% 90.4%); + --sl-color-cyan-200: hsl(186.2 93.5% 81.8%); + --sl-color-cyan-300: hsl(187 92.4% 69%); + --sl-color-cyan-400: hsl(187.9 85.7% 53.3%); + --sl-color-cyan-500: hsl(188.7 94.5% 42.7%); + --sl-color-cyan-600: hsl(191.6 91.4% 36.5%); + --sl-color-cyan-700: hsl(192.9 82.3% 31%); + --sl-color-cyan-800: hsl(194.4 69.6% 27.1%); + --sl-color-cyan-900: hsl(196.4 63.6% 23.7%); + --sl-color-cyan-950: hsl(196.8 61% 16.1%); + + --sl-color-sky-50: hsl(204 100% 97.1%); + --sl-color-sky-100: hsl(204 93.8% 93.7%); + --sl-color-sky-200: hsl(200.6 94.4% 86.1%); + --sl-color-sky-300: hsl(199.4 95.5% 73.9%); + --sl-color-sky-400: hsl(198.4 93.2% 59.6%); + --sl-color-sky-500: hsl(198.6 88.7% 48.4%); + --sl-color-sky-600: hsl(200.4 98% 39.4%); + --sl-color-sky-700: hsl(201.3 96.3% 32.2%); + --sl-color-sky-800: hsl(201 90% 27.5%); + --sl-color-sky-900: hsl(202 80.3% 23.9%); + --sl-color-sky-950: hsl(202.3 73.8% 16.5%); + + --sl-color-blue-50: hsl(213.8 100% 96.9%); + --sl-color-blue-100: hsl(214.3 94.6% 92.7%); + --sl-color-blue-200: hsl(213.3 96.9% 87.3%); + --sl-color-blue-300: hsl(211.7 96.4% 78.4%); + --sl-color-blue-400: hsl(213.1 93.9% 67.8%); + --sl-color-blue-500: hsl(217.2 91.2% 59.8%); + --sl-color-blue-600: hsl(221.2 83.2% 53.3%); + --sl-color-blue-700: hsl(224.3 76.3% 48%); + --sl-color-blue-800: hsl(225.9 70.7% 40.2%); + --sl-color-blue-900: hsl(224.4 64.3% 32.9%); + --sl-color-blue-950: hsl(226.2 55.3% 18.4%); + + --sl-color-indigo-50: hsl(225.9 100% 96.7%); + --sl-color-indigo-100: hsl(226.5 100% 93.9%); + --sl-color-indigo-200: hsl(228 96.5% 88.8%); + --sl-color-indigo-300: hsl(229.7 93.5% 81.8%); + --sl-color-indigo-400: hsl(234.5 89.5% 73.9%); + --sl-color-indigo-500: hsl(238.7 83.5% 66.7%); + --sl-color-indigo-600: hsl(243.4 75.4% 58.6%); + --sl-color-indigo-700: hsl(244.5 57.9% 50.6%); + --sl-color-indigo-800: hsl(243.7 54.5% 41.4%); + --sl-color-indigo-900: hsl(242.2 47.4% 34.3%); + --sl-color-indigo-950: hsl(243.5 43.6% 22.9%); + + --sl-color-violet-50: hsl(250 100% 97.6%); + --sl-color-violet-100: hsl(251.4 91.3% 95.5%); + --sl-color-violet-200: hsl(250.5 95.2% 91.8%); + --sl-color-violet-300: hsl(252.5 94.7% 85.1%); + --sl-color-violet-400: hsl(255.1 91.7% 76.3%); + --sl-color-violet-500: hsl(258.3 89.5% 66.3%); + --sl-color-violet-600: hsl(262.1 83.3% 57.8%); + --sl-color-violet-700: hsl(263.4 70% 50.4%); + --sl-color-violet-800: hsl(263.4 69.3% 42.2%); + --sl-color-violet-900: hsl(263.5 67.4% 34.9%); + --sl-color-violet-950: hsl(265.1 61.5% 21.4%); + + --sl-color-purple-50: hsl(270 100% 98%); + --sl-color-purple-100: hsl(268.7 100% 95.5%); + --sl-color-purple-200: hsl(268.6 100% 91.8%); + --sl-color-purple-300: hsl(269.2 97.4% 85.1%); + --sl-color-purple-400: hsl(270 95.2% 75.3%); + --sl-color-purple-500: hsl(270.7 91% 65.1%); + --sl-color-purple-600: hsl(271.5 81.3% 55.9%); + --sl-color-purple-700: hsl(272.1 71.7% 47.1%); + --sl-color-purple-800: hsl(272.9 67.2% 39.4%); + --sl-color-purple-900: hsl(273.6 65.6% 32%); + --sl-color-purple-950: hsl(276 59.5% 16.5%); + + --sl-color-fuchsia-50: hsl(289.1 100% 97.8%); + --sl-color-fuchsia-100: hsl(287 100% 95.5%); + --sl-color-fuchsia-200: hsl(288.3 95.8% 90.6%); + --sl-color-fuchsia-300: hsl(291.1 93.1% 82.9%); + --sl-color-fuchsia-400: hsl(292 91.4% 72.5%); + --sl-color-fuchsia-500: hsl(292.2 84.1% 60.6%); + --sl-color-fuchsia-600: hsl(293.4 69.5% 48.8%); + --sl-color-fuchsia-700: hsl(294.7 72.4% 39.8%); + --sl-color-fuchsia-800: hsl(295.4 70.2% 32.9%); + --sl-color-fuchsia-900: hsl(296.7 63.6% 28%); + --sl-color-fuchsia-950: hsl(297.1 56.8% 14.5%); + + --sl-color-pink-50: hsl(327.3 73.3% 97.1%); + --sl-color-pink-100: hsl(325.7 77.8% 94.7%); + --sl-color-pink-200: hsl(325.9 84.6% 89.8%); + --sl-color-pink-300: hsl(327.4 87.1% 81.8%); + --sl-color-pink-400: hsl(328.6 85.5% 70.2%); + --sl-color-pink-500: hsl(330.4 81.2% 60.4%); + --sl-color-pink-600: hsl(333.3 71.4% 50.6%); + --sl-color-pink-700: hsl(335.1 77.6% 42%); + --sl-color-pink-800: hsl(335.8 74.4% 35.3%); + --sl-color-pink-900: hsl(335.9 69% 30.4%); + --sl-color-pink-950: hsl(336.2 65.4% 15.9%); + + --sl-color-rose-50: hsl(355.7 100% 97.3%); + --sl-color-rose-100: hsl(355.6 100% 94.7%); + --sl-color-rose-200: hsl(352.7 96.1% 90%); + --sl-color-rose-300: hsl(352.6 95.7% 81.8%); + --sl-color-rose-400: hsl(351.3 94.5% 71.4%); + --sl-color-rose-500: hsl(349.7 89.2% 60.2%); + --sl-color-rose-600: hsl(346.8 77.2% 49.8%); + --sl-color-rose-700: hsl(345.3 82.7% 40.8%); + --sl-color-rose-800: hsl(343.4 79.7% 34.7%); + --sl-color-rose-900: hsl(341.5 75.5% 30.4%); + --sl-color-rose-950: hsl(341.3 70.1% 17.1%); + + --sl-color-primary-50: var(--sl-color-sky-50); + --sl-color-primary-100: var(--sl-color-sky-100); + --sl-color-primary-200: var(--sl-color-sky-200); + --sl-color-primary-300: var(--sl-color-sky-300); + --sl-color-primary-400: var(--sl-color-sky-400); + --sl-color-primary-500: var(--sl-color-sky-500); + --sl-color-primary-600: var(--sl-color-sky-600); + --sl-color-primary-700: var(--sl-color-sky-700); + --sl-color-primary-800: var(--sl-color-sky-800); + --sl-color-primary-900: var(--sl-color-sky-900); + --sl-color-primary-950: var(--sl-color-sky-950); + + --sl-color-success-50: var(--sl-color-green-50); + --sl-color-success-100: var(--sl-color-green-100); + --sl-color-success-200: var(--sl-color-green-200); + --sl-color-success-300: var(--sl-color-green-300); + --sl-color-success-400: var(--sl-color-green-400); + --sl-color-success-500: var(--sl-color-green-500); + --sl-color-success-600: var(--sl-color-green-600); + --sl-color-success-700: var(--sl-color-green-700); + --sl-color-success-800: var(--sl-color-green-800); + --sl-color-success-900: var(--sl-color-green-900); + --sl-color-success-950: var(--sl-color-green-950); + + --sl-color-warning-50: var(--sl-color-amber-50); + --sl-color-warning-100: var(--sl-color-amber-100); + --sl-color-warning-200: var(--sl-color-amber-200); + --sl-color-warning-300: var(--sl-color-amber-300); + --sl-color-warning-400: var(--sl-color-amber-400); + --sl-color-warning-500: var(--sl-color-amber-500); + --sl-color-warning-600: var(--sl-color-amber-600); + --sl-color-warning-700: var(--sl-color-amber-700); + --sl-color-warning-800: var(--sl-color-amber-800); + --sl-color-warning-900: var(--sl-color-amber-900); + --sl-color-warning-950: var(--sl-color-amber-950); + + --sl-color-danger-50: var(--sl-color-red-50); + --sl-color-danger-100: var(--sl-color-red-100); + --sl-color-danger-200: var(--sl-color-red-200); + --sl-color-danger-300: var(--sl-color-red-300); + --sl-color-danger-400: var(--sl-color-red-400); + --sl-color-danger-500: var(--sl-color-red-500); + --sl-color-danger-600: var(--sl-color-red-600); + --sl-color-danger-700: var(--sl-color-red-700); + --sl-color-danger-800: var(--sl-color-red-800); + --sl-color-danger-900: var(--sl-color-red-900); + --sl-color-danger-950: var(--sl-color-red-950); + + --sl-color-neutral-50: var(--sl-color-gray-50); + --sl-color-neutral-100: var(--sl-color-gray-100); + --sl-color-neutral-200: var(--sl-color-gray-200); + --sl-color-neutral-300: var(--sl-color-gray-300); + --sl-color-neutral-400: var(--sl-color-gray-400); + --sl-color-neutral-500: var(--sl-color-gray-500); + --sl-color-neutral-600: var(--sl-color-gray-600); + --sl-color-neutral-700: var(--sl-color-gray-700); + --sl-color-neutral-800: var(--sl-color-gray-800); + --sl-color-neutral-900: var(--sl-color-gray-900); + --sl-color-neutral-950: var(--sl-color-gray-950); + + --sl-color-neutral-0: hsl(0, 0%, 100%); + --sl-color-neutral-1000: hsl(0, 0%, 0%); + + --sl-border-radius-small: 0.1875rem; + --sl-border-radius-medium: 0.25rem; + --sl-border-radius-large: 0.5rem; + --sl-border-radius-x-large: 1rem; + + --sl-border-radius-circle: 50%; + --sl-border-radius-pill: 9999px; + + --sl-shadow-x-small: 0 1px 2px hsl(240 3.8% 46.1% / 6%); + --sl-shadow-small: 0 1px 2px hsl(240 3.8% 46.1% / 12%); + --sl-shadow-medium: 0 2px 4px hsl(240 3.8% 46.1% / 12%); + --sl-shadow-large: 0 2px 8px hsl(240 3.8% 46.1% / 12%); + --sl-shadow-x-large: 0 4px 16px hsl(240 3.8% 46.1% / 12%); + + --sl-spacing-3x-small: 0.125rem; + --sl-spacing-2x-small: 0.25rem; + --sl-spacing-x-small: 0.5rem; + --sl-spacing-small: 0.75rem; + --sl-spacing-medium: 1rem; + --sl-spacing-large: 1.25rem; + --sl-spacing-x-large: 1.75rem; + --sl-spacing-2x-large: 2.25rem; + --sl-spacing-3x-large: 3rem; + --sl-spacing-4x-large: 4.5rem; + + --sl-transition-x-slow: 1000ms; + --sl-transition-slow: 500ms; + --sl-transition-medium: 250ms; + --sl-transition-fast: 150ms; + --sl-transition-x-fast: 50ms; + + --sl-font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; + --sl-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, + Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", + "Segoe UI Symbol"; + --sl-font-serif: Georgia, "Times New Roman", serif; + + --sl-font-size-2x-small: 0.625rem; + --sl-font-size-x-small: 0.75rem; + --sl-font-size-small: 0.875rem; + --sl-font-size-medium: 1rem; + --sl-font-size-large: 1.25rem; + --sl-font-size-x-large: 1.5rem; + --sl-font-size-2x-large: 2.25rem; + --sl-font-size-3x-large: 3rem; + --sl-font-size-4x-large: 4.5rem; + + --sl-font-weight-light: 300; + --sl-font-weight-normal: 400; + --sl-font-weight-semibold: 500; + --sl-font-weight-bold: 700; + + --sl-letter-spacing-denser: -0.03em; + --sl-letter-spacing-dense: -0.015em; + --sl-letter-spacing-normal: normal; + --sl-letter-spacing-loose: 0.075em; + --sl-letter-spacing-looser: 0.15em; + + --sl-line-height-denser: 1; + --sl-line-height-dense: 1.4; + --sl-line-height-normal: 1.8; + --sl-line-height-loose: 2.2; + --sl-line-height-looser: 2.6; + + --sl-focus-ring-color: var(--sl-color-primary-600); + --sl-focus-ring-style: solid; + --sl-focus-ring-width: 3px; + --sl-focus-ring: var(--sl-focus-ring-style) var(--sl-focus-ring-width) + var(--sl-focus-ring-color); + --sl-focus-ring-offset: 1px; + + --sl-button-font-size-small: var(--sl-font-size-x-small); + --sl-button-font-size-medium: var(--sl-font-size-small); + --sl-button-font-size-large: var(--sl-font-size-medium); + + --sl-input-height-small: 1.875rem; + --sl-input-height-medium: 2.5rem; + --sl-input-height-large: 3.125rem; + + --sl-input-background-color: var(--sl-color-neutral-0); + --sl-input-background-color-hover: var(--sl-input-background-color); + --sl-input-background-color-focus: var(--sl-input-background-color); + --sl-input-background-color-disabled: var(--sl-color-neutral-100); + --sl-input-border-color: var(--sl-color-neutral-300); + --sl-input-border-color-hover: var(--sl-color-neutral-400); + --sl-input-border-color-focus: var(--sl-color-primary-500); + --sl-input-border-color-disabled: var(--sl-color-neutral-300); + --sl-input-border-width: 1px; + --sl-input-required-content: "*"; + --sl-input-required-content-offset: -2px; + --sl-input-required-content-color: var(--sl-input-label-color); + + --sl-input-border-radius-small: var(--sl-border-radius-medium); + --sl-input-border-radius-medium: var(--sl-border-radius-medium); + --sl-input-border-radius-large: var(--sl-border-radius-medium); + + --sl-input-font-family: var(--sl-font-sans); + --sl-input-font-weight: var(--sl-font-weight-normal); + --sl-input-font-size-small: var(--sl-font-size-small); + --sl-input-font-size-medium: var(--sl-font-size-medium); + --sl-input-font-size-large: var(--sl-font-size-large); + --sl-input-letter-spacing: var(--sl-letter-spacing-normal); + + --sl-input-color: var(--sl-color-neutral-700); + --sl-input-color-hover: var(--sl-color-neutral-700); + --sl-input-color-focus: var(--sl-color-neutral-700); + --sl-input-color-disabled: var(--sl-color-neutral-900); + --sl-input-icon-color: var(--sl-color-neutral-500); + --sl-input-icon-color-hover: var(--sl-color-neutral-600); + --sl-input-icon-color-focus: var(--sl-color-neutral-600); + --sl-input-placeholder-color: var(--sl-color-neutral-500); + --sl-input-placeholder-color-disabled: var(--sl-color-neutral-600); + --sl-input-spacing-small: var(--sl-spacing-small); + --sl-input-spacing-medium: var(--sl-spacing-medium); + --sl-input-spacing-large: var(--sl-spacing-large); + + --sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%); + --sl-input-focus-ring-offset: 0; + + --sl-input-filled-background-color: var(--sl-color-neutral-100); + --sl-input-filled-background-color-hover: var(--sl-color-neutral-100); + --sl-input-filled-background-color-focus: var(--sl-color-neutral-100); + --sl-input-filled-background-color-disabled: var(--sl-color-neutral-100); + --sl-input-filled-color: var(--sl-color-neutral-800); + --sl-input-filled-color-hover: var(--sl-color-neutral-800); + --sl-input-filled-color-focus: var(--sl-color-neutral-700); + --sl-input-filled-color-disabled: var(--sl-color-neutral-800); + + --sl-input-label-font-size-small: var(--sl-font-size-small); + --sl-input-label-font-size-medium: var(--sl-font-size-medium); + --sl-input-label-font-size-large: var(--sl-font-size-large); + --sl-input-label-color: inherit; + + --sl-input-help-text-font-size-small: var(--sl-font-size-x-small); + --sl-input-help-text-font-size-medium: var(--sl-font-size-small); + --sl-input-help-text-font-size-large: var(--sl-font-size-medium); + --sl-input-help-text-color: var(--sl-color-neutral-500); + + --sl-toggle-size-small: 0.875rem; + --sl-toggle-size-medium: 1.125rem; + --sl-toggle-size-large: 1.375rem; + + --sl-overlay-background-color: hsl(240 3.8% 46.1% / 33%); + + --sl-panel-background-color: var(--sl-color-neutral-0); + --sl-panel-border-color: var(--sl-color-neutral-200); + --sl-panel-border-width: 1px; + + --sl-tooltip-border-radius: var(--sl-border-radius-medium); + --sl-tooltip-background-color: var(--sl-color-neutral-800); + --sl-tooltip-color: var(--sl-color-neutral-0); + --sl-tooltip-font-family: var(--sl-font-sans); + --sl-tooltip-font-weight: var(--sl-font-weight-normal); + --sl-tooltip-font-size: var(--sl-font-size-small); + --sl-tooltip-line-height: var(--sl-line-height-dense); + --sl-tooltip-padding: var(--sl-spacing-2x-small) var(--sl-spacing-x-small); + --sl-tooltip-arrow-size: 6px; + + --sl-z-index-drawer: 700; + --sl-z-index-dialog: 800; + --sl-z-index-dropdown: 900; + --sl-z-index-toast: 950; + --sl-z-index-tooltip: 1000; +} + +@supports (scrollbar-gutter: stable) { + .sl-scroll-lock { + scrollbar-gutter: var(--sl-scroll-lock-gutter) !important; + } + + .sl-scroll-lock body { + overflow: hidden !important; + } +} + +@supports not (scrollbar-gutter: stable) { + .sl-scroll-lock body { + padding-right: var(--sl-scroll-lock-size) !important; + overflow: hidden !important; + } +} + +.sl-toast-stack { + position: fixed; + top: 0; + inset-inline-end: 0; + z-index: var(--sl-z-index-toast); + width: 28rem; + max-width: 100%; + max-height: 100%; + overflow: auto; +} + +.sl-toast-stack sl-alert { + margin: var(--sl-spacing-medium); +} + +.sl-toast-stack sl-alert::part(base) { + box-shadow: var(--sl-shadow-large); +} diff --git a/src/webview/styles/style.css b/src/webview/styles/style.css new file mode 100644 index 00000000..6682dbbd --- /dev/null +++ b/src/webview/styles/style.css @@ -0,0 +1,22 @@ +html, +body { + margin: 0; + padding: 0; + height: 100%; + box-sizing: border-box; + line-height: var(--sl-line-height-dense); +} + +body { + font-size: var(--vscode-font-size); + font-family: var(--vscode-font-family); + font-weight: var(--vscode-font-weight); + line-height: var(--sl-line-height-normal); + color: var(--sl-color-neutral-900); + background-color: var(--sl-color-neutral-0); + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + -moz-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; + overflow: hidden; +} From fef742f212c1b6d3ddf3d14457680d7eda6fe111 Mon Sep 17 00:00:00 2001 From: ecmel Date: Wed, 25 Sep 2024 18:00:03 +0300 Subject: [PATCH 02/57] fixed startup --- src/services/dataSourceEditorProvider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/dataSourceEditorProvider.ts b/src/services/dataSourceEditorProvider.ts index 14f44270..07134646 100644 --- a/src/services/dataSourceEditorProvider.ts +++ b/src/services/dataSourceEditorProvider.ts @@ -231,7 +231,7 @@ export class DataSourceEditorProvider implements CustomTextEditorProvider { return /* html */ ` - + From 04b752418499b41ec51b3f55a556e361971890ea Mon Sep 17 00:00:00 2001 From: ecmel Date: Thu, 26 Sep 2024 11:55:51 +0300 Subject: [PATCH 03/57] fixed scrolling --- src/webview/components/kdbDataSourceView.ts | 38 +++++++++++++-------- src/webview/styles/style.css | 15 ++++---- 2 files changed, 31 insertions(+), 22 deletions(-) diff --git a/src/webview/components/kdbDataSourceView.ts b/src/webview/components/kdbDataSourceView.ts index dee3fcee..4891609b 100644 --- a/src/webview/components/kdbDataSourceView.ts +++ b/src/webview/components/kdbDataSourceView.ts @@ -50,14 +50,10 @@ export class KdbDataSourceView extends LitElement { margin: 0; } - :host { - overflow: hidden; - } - .container { display: flex; flex-flow: row nowrap; - overflow: hidden; + overflow-x: auto; } .tabs { @@ -67,40 +63,52 @@ export class KdbDataSourceView extends LitElement { .actions { display: flex; flex-flow: column nowrap; - gap: 0.5rem; - padding: 1rem; + flex-grow: 0; + gap: var(--sl-spacing-x-small); + padding: var(--sl-spacing-medium); } .actions sl-button-group > sl-button { flex-grow: 1; } + sl-tab::part(base) { + padding: var(--sl-spacing-medium); + } + + sl-select::part(listbox) { + min-width: max-content; + } + sl-tab-panel { - height: calc(100vh - 57.2px); - overflow: scroll; - padding: 0.5rem; + --padding: 0; + overflow-y: scroll; + padding: var(--sl-spacing-medium); + height: calc( + 100vh - 1rem - 2 * var(--sl-spacing-medium) - var(--track-width) + ); } sl-input, sl-select { - min-width: 12rem; - max-width: 12rem; + min-width: 11rem; + max-width: 11rem; } sl-checkbox { - padding-bottom: 0.275rem; + padding-bottom: var(--sl-spacing-2x-small); } .col { display: flex; flex-direction: column; - gap: 0.5em; + gap: var(--sl-spacing-x-small); } .row { display: flex; flex-direction: row; - gap: 0.5em; + gap: var(--sl-spacing-x-small); align-items: flex-end; } `, diff --git a/src/webview/styles/style.css b/src/webview/styles/style.css index 6682dbbd..69aa527f 100644 --- a/src/webview/styles/style.css +++ b/src/webview/styles/style.css @@ -3,20 +3,21 @@ body { margin: 0; padding: 0; height: 100%; - box-sizing: border-box; line-height: var(--sl-line-height-dense); } body { + overflow: hidden; font-size: var(--vscode-font-size); font-family: var(--vscode-font-family); font-weight: var(--vscode-font-weight); - line-height: var(--sl-line-height-normal); - color: var(--sl-color-neutral-900); - background-color: var(--sl-color-neutral-0); - -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; - -moz-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; - overflow: hidden; + color: var(--vscode-foreground); + background-color: var(--vscode-panel-background); +} + +html.sl-theme-dark .only-light, +html:not(.sl-theme-dark) .only-dark { + display: none !important; } From 815257773e6cf83f29c33b3bab7b29f2809a2718 Mon Sep 17 00:00:00 2001 From: ecmel Date: Thu, 26 Sep 2024 16:00:37 +0300 Subject: [PATCH 04/57] added focus ring --- src/webview/styles/style.css | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/webview/styles/style.css b/src/webview/styles/style.css index 69aa527f..96c96ead 100644 --- a/src/webview/styles/style.css +++ b/src/webview/styles/style.css @@ -1,3 +1,8 @@ +:root { + --sl-focus-ring-color: var(--vscode-focusBorder); + --sl-focus-ring-width: 1px; +} + html, body { margin: 0; @@ -16,8 +21,3 @@ body { color: var(--vscode-foreground); background-color: var(--vscode-panel-background); } - -html.sl-theme-dark .only-light, -html:not(.sl-theme-dark) .only-dark { - display: none !important; -} From caca90c4d97940368840affb5c09f097f5e73ca4 Mon Sep 17 00:00:00 2001 From: ecmel Date: Sun, 29 Sep 2024 09:03:23 +0300 Subject: [PATCH 05/57] fixed border-box --- src/webview/components/kdbDataSourceView.ts | 11 +++-------- src/webview/styles/style.css | 1 + 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/webview/components/kdbDataSourceView.ts b/src/webview/components/kdbDataSourceView.ts index 4891609b..7d2c5d96 100644 --- a/src/webview/components/kdbDataSourceView.ts +++ b/src/webview/components/kdbDataSourceView.ts @@ -40,16 +40,10 @@ const MAX_RULES = 32; export class KdbDataSourceView extends LitElement { static styles = [ css` - *, - *::before, - *::after { + :host { box-sizing: border-box; } - * { - margin: 0; - } - .container { display: flex; flex-flow: row nowrap; @@ -85,7 +79,8 @@ export class KdbDataSourceView extends LitElement { overflow-y: scroll; padding: var(--sl-spacing-medium); height: calc( - 100vh - 1rem - 2 * var(--sl-spacing-medium) - var(--track-width) + 100vh - 1rem * var(--sl-line-height-dense) - 2 * + var(--sl-spacing-medium) ); } diff --git a/src/webview/styles/style.css b/src/webview/styles/style.css index 96c96ead..c25e1c10 100644 --- a/src/webview/styles/style.css +++ b/src/webview/styles/style.css @@ -18,6 +18,7 @@ body { font-weight: var(--vscode-font-weight); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; + box-sizing: border-box; color: var(--vscode-foreground); background-color: var(--vscode-panel-background); } From 23134163ecae613e88ff2f1db4a31eff1add1f42 Mon Sep 17 00:00:00 2001 From: ecmel Date: Sun, 6 Oct 2024 02:00:27 +0300 Subject: [PATCH 06/57] more tokens --- src/webview/components/kdbDataSourceView.ts | 72 +++++++-------------- src/webview/components/styles.ts | 21 ++++++ src/webview/styles/style.css | 38 +++++++++-- 3 files changed, 76 insertions(+), 55 deletions(-) diff --git a/src/webview/components/kdbDataSourceView.ts b/src/webview/components/kdbDataSourceView.ts index 7d2c5d96..60999757 100644 --- a/src/webview/components/kdbDataSourceView.ts +++ b/src/webview/components/kdbDataSourceView.ts @@ -33,17 +33,15 @@ import { } from "../../models/dataSource"; import { MetaObjectPayload } from "../../models/meta"; import { DataSourceCommand, DataSourceMessage2 } from "../../models/messages"; +import { shoelaceStyles } from "./styles"; const MAX_RULES = 32; @customElement("kdb-data-source-view") export class KdbDataSourceView extends LitElement { static styles = [ + shoelaceStyles, css` - :host { - box-sizing: border-box; - } - .container { display: flex; flex-flow: row nowrap; @@ -86,8 +84,8 @@ export class KdbDataSourceView extends LitElement { sl-input, sl-select { - min-width: 11rem; - max-width: 11rem; + min-width: 14rem; + max-width: 14rem; } sl-checkbox { @@ -263,15 +261,10 @@ export class KdbDataSourceView extends LitElement { requestChange() { this.requestUpdate(); - if (this.debounce) { - clearTimeout(this.debounce); - } - this.debounce = setTimeout(() => { - this.postMessage({ - command: DataSourceCommand.Change, - dataSourceFile: this.data, - }); - }, 200); + this.postMessage({ + command: DataSourceCommand.Change, + dataSourceFile: this.data, + }); } requestServerChange(event: Event) { @@ -353,7 +346,6 @@ export class KdbDataSourceView extends LitElement { this.requestChange(); }}">
@@ -978,17 +942,27 @@ export class KdbDataSourceView extends LitElement { )} - Save - Refresh - Run - Populate Scratchpad `; diff --git a/src/webview/components/styles.ts b/src/webview/components/styles.ts index f5b6f22e..89200fe4 100644 --- a/src/webview/components/styles.ts +++ b/src/webview/components/styles.ts @@ -13,6 +13,27 @@ import { css } from "lit"; +export const shoelaceStyles = css` + :host { + box-sizing: border-box; + } + + sl-button::part(base) { + color: var(--vscode-button-secondaryForeground); + background-color: var(--vscode-button-secondaryBackground); + border-color: var( + --vscode-button-border, + var(--vscode-button-secondaryBackground) + ); + } + + sl-button[variant="primary"]::part(base) { + color: var(--vscode-button-foreground); + background-color: var(--vscode-button-background); + border-color: var(--vscode-button-border, var(--vscode-button-background)); + } +`; + export const vscodeStyles = css` .dropdown-container { box-sizing: border-box; diff --git a/src/webview/styles/style.css b/src/webview/styles/style.css index c25e1c10..2e6b868a 100644 --- a/src/webview/styles/style.css +++ b/src/webview/styles/style.css @@ -1,24 +1,50 @@ :root { - --sl-focus-ring-color: var(--vscode-focusBorder); --sl-focus-ring-width: 1px; + --sl-focus-ring-offset: 1px; + --sl-focus-ring-style: solid; + --sl-focus-ring-color: var(--vscode-focusBorder); + --sl-input-focus-ring-offset: -1px; + --sl-input-focus-ring-color: var(--vscode-focusBorder); + + --sl-button-font-size-small: var(--vscode-font-size); + --sl-input-font-size-small: var(--vscode-font-size); + --sl-input-label-font-size-small: var(--vscode-font-size); + --sl-input-font-family: var(--vscode-font-family); + --sl-input-font-weight: var(--vscode-font-weight); + + --sl-input-border-width: 1px; + --sl-input-border-radius-small: 2px; + --sl-input-border-radius-medium: 2px; + --sl-input-border-radius-large: 2px; + --sl-input-border-color: var(--vscode-input-border, transparent); + --sl-input-border-color-hover: var(--vscode-input-border, transparent); + --sl-input-border-color-focus: var(--vscode-input-border, transparent); + + --sl-input-height-small: calc(2rem + 2 * var(--sl-input-border-width)); + --sl-input-spacing-small: var(--sl-spacing-x-small); + --sl-input-color: var(--vscode-input-foreground); + --sl-input-color-hover: var(--vscode-input-foreground); + --sl-input-color-focus: var(--vscode-input-foreground); + --sl-input-background-color: var(--vscode-input-background); + --sl-input-background-color-hover: var(--vscode-input-background); + --sl-input-background-color-focus: var(--vscode-input-background); + --sl-panel-background-color: var(--vscode-input-background); } html, body { margin: 0; - padding: 0; - height: 100%; - line-height: var(--sl-line-height-dense); + line-height: 1.6; + font-size: var(--vscode-font-size); } body { overflow: hidden; - font-size: var(--vscode-font-size); + box-sizing: border-box; font-family: var(--vscode-font-family); font-weight: var(--vscode-font-weight); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; - box-sizing: border-box; color: var(--vscode-foreground); background-color: var(--vscode-panel-background); } From 331bc53880646d5f2999796636274d018b57b32f Mon Sep 17 00:00:00 2001 From: ecmel Date: Sun, 6 Oct 2024 12:07:41 +0300 Subject: [PATCH 07/57] more tokens --- src/webview/components/kdbDataSourceView.ts | 48 ++------------------- src/webview/styles/style.css | 14 +++--- 2 files changed, 10 insertions(+), 52 deletions(-) diff --git a/src/webview/components/kdbDataSourceView.ts b/src/webview/components/kdbDataSourceView.ts index 60999757..fe466d4b 100644 --- a/src/webview/components/kdbDataSourceView.ts +++ b/src/webview/components/kdbDataSourceView.ts @@ -346,7 +346,6 @@ export class KdbDataSourceView extends LitElement { this.requestChange(); }}">
@@ -942,27 +912,17 @@ export class KdbDataSourceView extends LitElement { )} - Save - Refresh - Run - Populate Scratchpad `; diff --git a/src/webview/styles/style.css b/src/webview/styles/style.css index 2e6b868a..5dbf7197 100644 --- a/src/webview/styles/style.css +++ b/src/webview/styles/style.css @@ -6,22 +6,20 @@ --sl-input-focus-ring-offset: -1px; --sl-input-focus-ring-color: var(--vscode-focusBorder); - --sl-button-font-size-small: var(--vscode-font-size); - --sl-input-font-size-small: var(--vscode-font-size); - --sl-input-label-font-size-small: var(--vscode-font-size); + --sl-button-font-size-medium: var(--vscode-font-size); + --sl-input-font-size-medium: var(--vscode-font-size); + --sl-input-label-font-size-medium: var(--vscode-font-size); --sl-input-font-family: var(--vscode-font-family); --sl-input-font-weight: var(--vscode-font-weight); --sl-input-border-width: 1px; - --sl-input-border-radius-small: 2px; --sl-input-border-radius-medium: 2px; - --sl-input-border-radius-large: 2px; --sl-input-border-color: var(--vscode-input-border, transparent); --sl-input-border-color-hover: var(--vscode-input-border, transparent); --sl-input-border-color-focus: var(--vscode-input-border, transparent); - --sl-input-height-small: calc(2rem + 2 * var(--sl-input-border-width)); - --sl-input-spacing-small: var(--sl-spacing-x-small); + --sl-input-height-medium: calc(2rem + 2 * var(--sl-input-border-width)); + --sl-input-spacing-medium: var(--sl-spacing-x-small); --sl-input-color: var(--vscode-input-foreground); --sl-input-color-hover: var(--vscode-input-foreground); --sl-input-color-focus: var(--vscode-input-foreground); @@ -34,7 +32,7 @@ html, body { margin: 0; - line-height: 1.6; + line-height: 1.5; font-size: var(--vscode-font-size); } From 367d956a1241ad0b7ec80534be40d7bf6bd031cc Mon Sep 17 00:00:00 2001 From: ecmel Date: Sun, 6 Oct 2024 18:58:17 +0300 Subject: [PATCH 08/57] more tokens --- src/services/dataSourceEditorProvider.ts | 8 +- src/webview/components/kdbDataSourceView.ts | 35 +- src/webview/components/styles.ts | 40 +- src/webview/styles/dark.css | 483 -------------------- 4 files changed, 53 insertions(+), 513 deletions(-) delete mode 100644 src/webview/styles/dark.css diff --git a/src/services/dataSourceEditorProvider.ts b/src/services/dataSourceEditorProvider.ts index 07134646..cf53e74b 100644 --- a/src/services/dataSourceEditorProvider.ts +++ b/src/services/dataSourceEditorProvider.ts @@ -12,7 +12,6 @@ */ import { - ColorThemeKind, CustomTextEditorProvider, Disposable, ExtensionContext, @@ -131,10 +130,6 @@ export class DataSourceEditorProvider implements CustomTextEditorProvider { } }); - window.onDidChangeActiveColorTheme(() => { - updateWebview(); - }); - const changeDocumentSubscription = workspace.onDidChangeTextDocument( (event) => { if (event.document.uri.toString() === document.uri.toString()) { @@ -231,12 +226,11 @@ export class DataSourceEditorProvider implements CustomTextEditorProvider { return /* html */ ` - + - DataSource diff --git a/src/webview/components/kdbDataSourceView.ts b/src/webview/components/kdbDataSourceView.ts index fe466d4b..bfe60cd9 100644 --- a/src/webview/components/kdbDataSourceView.ts +++ b/src/webview/components/kdbDataSourceView.ts @@ -84,8 +84,8 @@ export class KdbDataSourceView extends LitElement { sl-input, sl-select { - min-width: 14rem; - max-width: 14rem; + min-width: 13rem; + max-width: 13rem; } sl-checkbox { @@ -174,12 +174,6 @@ export class KdbDataSourceView extends LitElement { this.aggs = optional.aggs; this.groups = optional.groups; } - if ("theme" in msg) { - document.documentElement.className = - msg.theme === 1 || msg.theme === 4 - ? "sl-theme-light" - : "sl-theme-dark"; - } this.requestUpdate(); } }; @@ -387,6 +381,7 @@ export class KdbDataSourceView extends LitElement { }}"> Save - Refresh - Run - Populate Scratchpad `; diff --git a/src/webview/components/styles.ts b/src/webview/components/styles.ts index 89200fe4..2bfdc889 100644 --- a/src/webview/components/styles.ts +++ b/src/webview/components/styles.ts @@ -18,19 +18,35 @@ export const shoelaceStyles = css` box-sizing: border-box; } + sl-select::part(listbox) { + --sl-panel-border-color: var(--vscode-focusBorder); + } + + sl-option::part(base) { + --sl-color-primary-600: var(--vscode-button-background); + --sl-color-neutral-700: var(--vscode-input-foreground); + --sl-color-neutral-1000: var(--vscode-input-foreground); + --sl-color-neutral-100: var(--vscode-button-secondaryHoverBackground); + } + sl-button::part(base) { - color: var(--vscode-button-secondaryForeground); - background-color: var(--vscode-button-secondaryBackground); - border-color: var( - --vscode-button-border, - var(--vscode-button-secondaryBackground) - ); - } - - sl-button[variant="primary"]::part(base) { - color: var(--vscode-button-foreground); - background-color: var(--vscode-button-background); - border-color: var(--vscode-button-border, var(--vscode-button-background)); + --sl-color-primary-600: var(--vscode-button-background); + --sl-color-primary-500: var(--vscode-button-hoverBackground); + --sl-color-neutral-600: var(--vscode-button-secondaryBackground); + --sl-color-neutral-500: var(--vscode-button-secondaryHoverBackground); + } + + sl-button[variant="neutral"]::part(base) { + --sl-color-neutral-0: var(--vscode-input-foreground); + } + + sl-tab-group::part(tabs) { + --track-color: var(--vscode-button-secondaryHoverBackground); + --indicator-color: var(--vscode-button-background); + } + + sl-tab::part(base) { + --sl-color-primary-600: var(--vscode-button-background); } `; diff --git a/src/webview/styles/dark.css b/src/webview/styles/dark.css deleted file mode 100644 index dad0b514..00000000 --- a/src/webview/styles/dark.css +++ /dev/null @@ -1,483 +0,0 @@ -:host, -.sl-theme-dark { - color-scheme: dark; - - --sl-color-gray-50: hsl(240 5.1% 15%); - --sl-color-gray-100: hsl(240 5.7% 18.2%); - --sl-color-gray-200: hsl(240 4.6% 22%); - --sl-color-gray-300: hsl(240 5% 27.6%); - --sl-color-gray-400: hsl(240 5% 35.5%); - --sl-color-gray-500: hsl(240 3.7% 44%); - --sl-color-gray-600: hsl(240 5.3% 58%); - --sl-color-gray-700: hsl(240 5.6% 73%); - --sl-color-gray-800: hsl(240 7.3% 84%); - --sl-color-gray-900: hsl(240 9.1% 91.8%); - --sl-color-gray-950: hsl(0 0% 95%); - - --sl-color-red-50: hsl(0 56% 23.9%); - --sl-color-red-100: hsl(0.6 60% 33.9%); - --sl-color-red-200: hsl(0.9 67.2% 37.1%); - --sl-color-red-300: hsl(1.1 71.3% 43.7%); - --sl-color-red-400: hsl(1 76% 52.5%); - --sl-color-red-500: hsl(0.7 89.6% 57.2%); - --sl-color-red-600: hsl(0 98.6% 67.9%); - --sl-color-red-700: hsl(0 100% 72.3%); - --sl-color-red-800: hsl(0 100% 85.6%); - --sl-color-red-900: hsl(0 100% 90.3%); - --sl-color-red-950: hsl(0 100% 95.9%); - - --sl-color-orange-50: hsl(15 64.2% 23.3%); - --sl-color-orange-100: hsl(15.1 70.9% 31.1%); - --sl-color-orange-200: hsl(15.3 75.7% 35.5%); - --sl-color-orange-300: hsl(17.1 83.5% 42.7%); - --sl-color-orange-400: hsl(20.1 88% 50.8%); - --sl-color-orange-500: hsl(24.3 100% 50.5%); - --sl-color-orange-600: hsl(27.2 100% 57.7%); - --sl-color-orange-700: hsl(31.3 100% 68.7%); - --sl-color-orange-800: hsl(33.8 100% 79.3%); - --sl-color-orange-900: hsl(38.9 100% 87.7%); - --sl-color-orange-950: hsl(46.2 100% 95%); - - --sl-color-amber-50: hsl(21.9 66.3% 21.1%); - --sl-color-amber-100: hsl(21.5 73.6% 29.7%); - --sl-color-amber-200: hsl(22.3 77.6% 33.3%); - --sl-color-amber-300: hsl(25.4 84.2% 39.6%); - --sl-color-amber-400: hsl(31.4 87.4% 46.7%); - --sl-color-amber-500: hsl(37 96.6% 48.3%); - --sl-color-amber-600: hsl(43.3 100% 53.4%); - --sl-color-amber-700: hsl(46.5 100% 61.1%); - --sl-color-amber-800: hsl(49.3 100% 73%); - --sl-color-amber-900: hsl(51.8 100% 85%); - --sl-color-amber-950: hsl(60 100% 94.6%); - - --sl-color-yellow-50: hsl(32.5 60% 18.2%); - --sl-color-yellow-100: hsl(28.1 68.6% 29%); - --sl-color-yellow-200: hsl(31.3 75.8% 30.8%); - --sl-color-yellow-300: hsl(34.7 84.4% 35.3%); - --sl-color-yellow-400: hsl(40.1 87.3% 43.3%); - --sl-color-yellow-500: hsl(44.7 88% 46%); - --sl-color-yellow-600: hsl(47.7 100% 50.9%); - --sl-color-yellow-700: hsl(51.3 100% 59.9%); - --sl-color-yellow-800: hsl(54.6 100% 73%); - --sl-color-yellow-900: hsl(58.9 100% 84.2%); - --sl-color-yellow-950: hsl(60 100% 94%); - - --sl-color-lime-50: hsl(86.5 54.4% 18%); - --sl-color-lime-100: hsl(87.6 56.8% 23.3%); - --sl-color-lime-200: hsl(85.8 63.2% 24.5%); - --sl-color-lime-300: hsl(86.1 72% 29.4%); - --sl-color-lime-400: hsl(85.5 76.8% 37.3%); - --sl-color-lime-500: hsl(84.3 74.2% 42.1%); - --sl-color-lime-600: hsl(82.8 81.5% 52.6%); - --sl-color-lime-700: hsl(82 89.9% 64%); - --sl-color-lime-800: hsl(80.9 97.9% 76.6%); - --sl-color-lime-900: hsl(77.9 100% 85.8%); - --sl-color-lime-950: hsl(69.5 100% 93.8%); - - --sl-color-green-50: hsl(144.3 53.6% 16%); - --sl-color-green-100: hsl(143.2 55.4% 23.5%); - --sl-color-green-200: hsl(141.5 58.2% 26.3%); - --sl-color-green-300: hsl(140.8 64.2% 31.8%); - --sl-color-green-400: hsl(140.3 68% 39.2%); - --sl-color-green-500: hsl(141.1 64.9% 43%); - --sl-color-green-600: hsl(141.6 72.4% 55.2%); - --sl-color-green-700: hsl(141.7 82.7% 70.1%); - --sl-color-green-800: hsl(141 90.9% 82.1%); - --sl-color-green-900: hsl(142 100% 89.1%); - --sl-color-green-950: hsl(144 100% 95.5%); - - --sl-color-emerald-50: hsl(164.3 75% 13.5%); - --sl-color-emerald-100: hsl(163.5 72.6% 20.1%); - --sl-color-emerald-200: hsl(162.1 73.7% 22.4%); - --sl-color-emerald-300: hsl(161.3 77.3% 27.6%); - --sl-color-emerald-400: hsl(159.6 77.1% 34.3%); - --sl-color-emerald-500: hsl(159.1 73.5% 37.9%); - --sl-color-emerald-600: hsl(157.8 66.8% 48.9%); - --sl-color-emerald-700: hsl(156.2 76.1% 63.8%); - --sl-color-emerald-800: hsl(152.4 84.4% 77.4%); - --sl-color-emerald-900: hsl(149.3 100% 87%); - --sl-color-emerald-950: hsl(158.6 100% 94.8%); - - --sl-color-teal-50: hsl(176.5 51.5% 15.4%); - --sl-color-teal-100: hsl(175.9 54.7% 22.3%); - --sl-color-teal-200: hsl(175.9 60.7% 23.9%); - --sl-color-teal-300: hsl(174.5 67.3% 28.8%); - --sl-color-teal-400: hsl(174.4 71.9% 34.9%); - --sl-color-teal-500: hsl(173.1 71% 38.3%); - --sl-color-teal-600: hsl(172.3 68.2% 48.1%); - --sl-color-teal-700: hsl(170.5 81.3% 61.5%); - --sl-color-teal-800: hsl(168.4 92.1% 75.2%); - --sl-color-teal-900: hsl(168.3 100% 86%); - --sl-color-teal-950: hsl(180 100% 95.5%); - - --sl-color-cyan-50: hsl(197.1 53.8% 20.3%); - --sl-color-cyan-100: hsl(196.8 57.3% 27.2%); - --sl-color-cyan-200: hsl(195.3 62.7% 29.4%); - --sl-color-cyan-300: hsl(193.5 71.3% 34.1%); - --sl-color-cyan-400: hsl(192.5 76.8% 40.6%); - --sl-color-cyan-500: hsl(189.4 78.6% 42.6%); - --sl-color-cyan-600: hsl(188.2 89.1% 51.7%); - --sl-color-cyan-700: hsl(187 98.6% 66.2%); - --sl-color-cyan-800: hsl(184.9 100% 78.3%); - --sl-color-cyan-900: hsl(180 100% 86.6%); - --sl-color-cyan-950: hsl(180 100% 94.8%); - - --sl-color-sky-50: hsl(203 63.8% 20.9%); - --sl-color-sky-100: hsl(203.4 70.4% 28%); - --sl-color-sky-200: hsl(202.7 75.8% 30.8%); - --sl-color-sky-300: hsl(203.1 80.4% 36.1%); - --sl-color-sky-400: hsl(202.1 80.5% 44.3%); - --sl-color-sky-500: hsl(199.7 85.9% 47.7%); - --sl-color-sky-600: hsl(198.7 97.9% 57.2%); - --sl-color-sky-700: hsl(198.7 100% 70.5%); - --sl-color-sky-800: hsl(198.8 100% 82.5%); - --sl-color-sky-900: hsl(198.5 100% 89.9%); - --sl-color-sky-950: hsl(186 100% 95.5%); - - --sl-color-blue-50: hsl(227.1 49.5% 22.7%); - --sl-color-blue-100: hsl(225.8 58.9% 36.8%); - --sl-color-blue-200: hsl(227.7 64.4% 42.9%); - --sl-color-blue-300: hsl(226.1 72.7% 51.2%); - --sl-color-blue-400: hsl(222.6 86.5% 56.3%); - --sl-color-blue-500: hsl(217.8 95.8% 57.4%); - --sl-color-blue-600: hsl(213.3 100% 65%); - --sl-color-blue-700: hsl(210.9 100% 74.8%); - --sl-color-blue-800: hsl(211.5 100% 83.4%); - --sl-color-blue-900: hsl(211 100% 88.9%); - --sl-color-blue-950: hsl(201.8 100% 95.3%); - - --sl-color-indigo-50: hsl(243.5 40.8% 27%); - --sl-color-indigo-100: hsl(242.9 45.7% 37.6%); - --sl-color-indigo-200: hsl(244.7 52.7% 43.1%); - --sl-color-indigo-300: hsl(245.3 60.5% 52.4%); - --sl-color-indigo-400: hsl(244.1 79.2% 60.4%); - --sl-color-indigo-500: hsl(239.6 88.7% 63.8%); - --sl-color-indigo-600: hsl(234.5 96.7% 70.9%); - --sl-color-indigo-700: hsl(229.4 100% 78.3%); - --sl-color-indigo-800: hsl(227.1 100% 85%); - --sl-color-indigo-900: hsl(223.8 100% 89.9%); - --sl-color-indigo-950: hsl(220 100% 95.1%); - - --sl-color-violet-50: hsl(265.1 57.3% 25.4%); - --sl-color-violet-100: hsl(263.5 63.8% 39.4%); - --sl-color-violet-200: hsl(263.4 66.2% 44.1%); - --sl-color-violet-300: hsl(263.7 72.8% 52.4%); - --sl-color-violet-400: hsl(262.5 87.3% 59.8%); - --sl-color-violet-500: hsl(258.3 95.1% 63.2%); - --sl-color-violet-600: hsl(255.1 100% 67.2%); - --sl-color-violet-700: hsl(253 100% 81.5%); - --sl-color-violet-800: hsl(251.7 100% 87.9%); - --sl-color-violet-900: hsl(254.1 100% 91.7%); - --sl-color-violet-950: hsl(257.1 100% 96.1%); - - --sl-color-purple-50: hsl(276 54.3% 20.5%); - --sl-color-purple-100: hsl(273.6 61.8% 35.4%); - --sl-color-purple-200: hsl(272.9 64% 41.4%); - --sl-color-purple-300: hsl(271.9 68.1% 49.2%); - --sl-color-purple-400: hsl(271.5 85.1% 57.8%); - --sl-color-purple-500: hsl(270.7 96.4% 62.1%); - --sl-color-purple-600: hsl(270.5 100% 71.9%); - --sl-color-purple-700: hsl(270.9 100% 81.3%); - --sl-color-purple-800: hsl(272.4 100% 87.7%); - --sl-color-purple-900: hsl(276.7 100% 91.5%); - --sl-color-purple-950: hsl(300 100% 96.5%); - - --sl-color-fuchsia-50: hsl(297.1 51.2% 18.6%); - --sl-color-fuchsia-100: hsl(296.7 59.5% 31.5%); - --sl-color-fuchsia-200: hsl(295.4 65.4% 35.1%); - --sl-color-fuchsia-300: hsl(294.6 67.4% 42.2%); - --sl-color-fuchsia-400: hsl(293.3 68.7% 51.2%); - --sl-color-fuchsia-500: hsl(292.1 88.4% 57.7%); - --sl-color-fuchsia-600: hsl(292 98.5% 59.5%); - --sl-color-fuchsia-700: hsl(292.4 100% 79.5%); - --sl-color-fuchsia-800: hsl(292.9 100% 86.8%); - --sl-color-fuchsia-900: hsl(300 100% 91.5%); - --sl-color-fuchsia-950: hsl(300 100% 96.3%); - - --sl-color-pink-50: hsl(336.2 59.6% 20%); - --sl-color-pink-100: hsl(336.8 63.9% 34%); - --sl-color-pink-200: hsl(336.8 68.7% 37.6%); - --sl-color-pink-300: hsl(336.1 71.8% 44.5%); - --sl-color-pink-400: hsl(333.9 74.9% 53.1%); - --sl-color-pink-500: hsl(330.7 86.3% 57.7%); - --sl-color-pink-600: hsl(328.6 91.5% 67.2%); - --sl-color-pink-700: hsl(327.4 97.6% 78.7%); - --sl-color-pink-800: hsl(325.1 100% 86.6%); - --sl-color-pink-900: hsl(322.1 100% 91.3%); - --sl-color-pink-950: hsl(315 100% 95.9%); - - --sl-color-rose-50: hsl(342.3 62.9% 21.5%); - --sl-color-rose-100: hsl(342.8 68.9% 34.2%); - --sl-color-rose-200: hsl(344.8 72.6% 37.3%); - --sl-color-rose-300: hsl(346.9 75.8% 43.7%); - --sl-color-rose-400: hsl(348.2 80.1% 52.7%); - --sl-color-rose-500: hsl(350.4 94.8% 57.5%); - --sl-color-rose-600: hsl(351.2 100% 58.1%); - --sl-color-rose-700: hsl(352.3 100% 78.1%); - --sl-color-rose-800: hsl(352 100% 86.2%); - --sl-color-rose-900: hsl(354.5 100% 90.7%); - --sl-color-rose-950: hsl(353.3 100% 95.7%); - - --sl-color-primary-50: var(--sl-color-sky-50); - --sl-color-primary-100: var(--sl-color-sky-100); - --sl-color-primary-200: var(--sl-color-sky-200); - --sl-color-primary-300: var(--sl-color-sky-300); - --sl-color-primary-400: var(--sl-color-sky-400); - --sl-color-primary-500: var(--sl-color-sky-500); - --sl-color-primary-600: var(--sl-color-sky-600); - --sl-color-primary-700: var(--sl-color-sky-700); - --sl-color-primary-800: var(--sl-color-sky-800); - --sl-color-primary-900: var(--sl-color-sky-900); - --sl-color-primary-950: var(--sl-color-sky-950); - - --sl-color-success-50: var(--sl-color-green-50); - --sl-color-success-100: var(--sl-color-green-100); - --sl-color-success-200: var(--sl-color-green-200); - --sl-color-success-300: var(--sl-color-green-300); - --sl-color-success-400: var(--sl-color-green-400); - --sl-color-success-500: var(--sl-color-green-500); - --sl-color-success-600: var(--sl-color-green-600); - --sl-color-success-700: var(--sl-color-green-700); - --sl-color-success-800: var(--sl-color-green-800); - --sl-color-success-900: var(--sl-color-green-900); - --sl-color-success-950: var(--sl-color-green-950); - - --sl-color-warning-50: var(--sl-color-amber-50); - --sl-color-warning-100: var(--sl-color-amber-100); - --sl-color-warning-200: var(--sl-color-amber-200); - --sl-color-warning-300: var(--sl-color-amber-300); - --sl-color-warning-400: var(--sl-color-amber-400); - --sl-color-warning-500: var(--sl-color-amber-500); - --sl-color-warning-600: var(--sl-color-amber-600); - --sl-color-warning-700: var(--sl-color-amber-700); - --sl-color-warning-800: var(--sl-color-amber-800); - --sl-color-warning-900: var(--sl-color-amber-900); - --sl-color-warning-950: var(--sl-color-amber-950); - - --sl-color-danger-50: var(--sl-color-red-50); - --sl-color-danger-100: var(--sl-color-red-100); - --sl-color-danger-200: var(--sl-color-red-200); - --sl-color-danger-300: var(--sl-color-red-300); - --sl-color-danger-400: var(--sl-color-red-400); - --sl-color-danger-500: var(--sl-color-red-500); - --sl-color-danger-600: var(--sl-color-red-600); - --sl-color-danger-700: var(--sl-color-red-700); - --sl-color-danger-800: var(--sl-color-red-800); - --sl-color-danger-900: var(--sl-color-red-900); - --sl-color-danger-950: var(--sl-color-red-950); - - --sl-color-neutral-50: var(--sl-color-gray-50); - --sl-color-neutral-100: var(--sl-color-gray-100); - --sl-color-neutral-200: var(--sl-color-gray-200); - --sl-color-neutral-300: var(--sl-color-gray-300); - --sl-color-neutral-400: var(--sl-color-gray-400); - --sl-color-neutral-500: var(--sl-color-gray-500); - --sl-color-neutral-600: var(--sl-color-gray-600); - --sl-color-neutral-700: var(--sl-color-gray-700); - --sl-color-neutral-800: var(--sl-color-gray-800); - --sl-color-neutral-900: var(--sl-color-gray-900); - --sl-color-neutral-950: var(--sl-color-gray-950); - - --sl-color-neutral-0: hsl(240, 5.9%, 11%); - --sl-color-neutral-1000: hsl(0, 0%, 100%); - - --sl-border-radius-small: 0.1875rem; - --sl-border-radius-medium: 0.25rem; - --sl-border-radius-large: 0.5rem; - --sl-border-radius-x-large: 1rem; - - --sl-border-radius-circle: 50%; - --sl-border-radius-pill: 9999px; - - --sl-shadow-x-small: 0 1px 2px rgb(0 0 0 / 18%); - --sl-shadow-small: 0 1px 2px rgb(0 0 0 / 24%); - --sl-shadow-medium: 0 2px 4px rgb(0 0 0 / 24%); - --sl-shadow-large: 0 2px 8px rgb(0 0 0 / 24%); - --sl-shadow-x-large: 0 4px 16px rgb(0 0 0 / 24%); - - --sl-spacing-3x-small: 0.125rem; - --sl-spacing-2x-small: 0.25rem; - --sl-spacing-x-small: 0.5rem; - --sl-spacing-small: 0.75rem; - --sl-spacing-medium: 1rem; - --sl-spacing-large: 1.25rem; - --sl-spacing-x-large: 1.75rem; - --sl-spacing-2x-large: 2.25rem; - --sl-spacing-3x-large: 3rem; - --sl-spacing-4x-large: 4.5rem; - - --sl-transition-x-slow: 1000ms; - --sl-transition-slow: 500ms; - --sl-transition-medium: 250ms; - --sl-transition-fast: 150ms; - --sl-transition-x-fast: 50ms; - - --sl-font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; - --sl-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, - Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", - "Segoe UI Symbol"; - --sl-font-serif: Georgia, "Times New Roman", serif; - - --sl-font-size-2x-small: 0.625rem; - --sl-font-size-x-small: 0.75rem; - --sl-font-size-small: 0.875rem; - --sl-font-size-medium: 1rem; - --sl-font-size-large: 1.25rem; - --sl-font-size-x-large: 1.5rem; - --sl-font-size-2x-large: 2.25rem; - --sl-font-size-3x-large: 3rem; - --sl-font-size-4x-large: 4.5rem; - - --sl-font-weight-light: 300; - --sl-font-weight-normal: 400; - --sl-font-weight-semibold: 500; - --sl-font-weight-bold: 700; - - --sl-letter-spacing-denser: -0.03em; - --sl-letter-spacing-dense: -0.015em; - --sl-letter-spacing-normal: normal; - --sl-letter-spacing-loose: 0.075em; - --sl-letter-spacing-looser: 0.15em; - - --sl-line-height-denser: 1; - --sl-line-height-dense: 1.4; - --sl-line-height-normal: 1.8; - --sl-line-height-loose: 2.2; - --sl-line-height-looser: 2.6; - - --sl-focus-ring-color: var(--sl-color-primary-700); - --sl-focus-ring-style: solid; - --sl-focus-ring-width: 3px; - --sl-focus-ring: var(--sl-focus-ring-style) var(--sl-focus-ring-width) - var(--sl-focus-ring-color); - --sl-focus-ring-offset: 1px; - - --sl-button-font-size-small: var(--sl-font-size-x-small); - --sl-button-font-size-medium: var(--sl-font-size-small); - --sl-button-font-size-large: var(--sl-font-size-medium); - - --sl-input-height-small: 1.875rem; - --sl-input-height-medium: 2.5rem; - --sl-input-height-large: 3.125rem; - - --sl-input-background-color: var(--sl-color-neutral-0); - --sl-input-background-color-hover: var(--sl-input-background-color); - --sl-input-background-color-focus: var(--sl-input-background-color); - --sl-input-background-color-disabled: var(--sl-color-neutral-100); - --sl-input-border-color: var(--sl-color-neutral-400); - --sl-input-border-color-hover: var(--sl-color-neutral-500); - --sl-input-border-color-focus: var(--sl-color-primary-600); - --sl-input-border-color-disabled: var(--sl-color-neutral-400); - --sl-input-border-width: 1px; - --sl-input-required-content: "*"; - --sl-input-required-content-offset: -2px; - --sl-input-required-content-color: var(--sl-input-label-color); - - --sl-input-border-radius-small: var(--sl-border-radius-medium); - --sl-input-border-radius-medium: var(--sl-border-radius-medium); - --sl-input-border-radius-large: var(--sl-border-radius-medium); - - --sl-input-font-family: var(--sl-font-sans); - --sl-input-font-weight: var(--sl-font-weight-normal); - --sl-input-font-size-small: var(--sl-font-size-small); - --sl-input-font-size-medium: var(--sl-font-size-medium); - --sl-input-font-size-large: var(--sl-font-size-large); - --sl-input-letter-spacing: var(--sl-letter-spacing-normal); - - --sl-input-color: var(--sl-color-neutral-700); - --sl-input-color-hover: var(--sl-color-neutral-700); - --sl-input-color-focus: var(--sl-color-neutral-700); - --sl-input-color-disabled: var(--sl-color-neutral-900); - --sl-input-icon-color: var(--sl-color-neutral-500); - --sl-input-icon-color-hover: var(--sl-color-neutral-600); - --sl-input-icon-color-focus: var(--sl-color-neutral-600); - --sl-input-placeholder-color: var(--sl-color-neutral-500); - --sl-input-placeholder-color-disabled: var(--sl-color-neutral-600); - --sl-input-spacing-small: var(--sl-spacing-small); - --sl-input-spacing-medium: var(--sl-spacing-medium); - --sl-input-spacing-large: var(--sl-spacing-large); - - --sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%); - --sl-input-focus-ring-offset: 0; - - --sl-input-filled-background-color: var(--sl-color-neutral-100); - --sl-input-filled-background-color-hover: var(--sl-color-neutral-100); - --sl-input-filled-background-color-focus: var(--sl-color-neutral-100); - --sl-input-filled-background-color-disabled: var(--sl-color-neutral-100); - --sl-input-filled-color: var(--sl-color-neutral-800); - --sl-input-filled-color-hover: var(--sl-color-neutral-800); - --sl-input-filled-color-focus: var(--sl-color-neutral-700); - --sl-input-filled-color-disabled: var(--sl-color-neutral-800); - - --sl-input-label-font-size-small: var(--sl-font-size-small); - --sl-input-label-font-size-medium: var(--sl-font-size-medium); - --sl-input-label-font-size-large: var(--sl-font-size-large); - --sl-input-label-color: inherit; - - --sl-input-help-text-font-size-small: var(--sl-font-size-x-small); - --sl-input-help-text-font-size-medium: var(--sl-font-size-small); - --sl-input-help-text-font-size-large: var(--sl-font-size-medium); - --sl-input-help-text-color: var(--sl-color-neutral-600); - - --sl-toggle-size-small: 0.875rem; - --sl-toggle-size-medium: 1.125rem; - --sl-toggle-size-large: 1.375rem; - - --sl-overlay-background-color: hsl(0 0% 0% / 43%); - - --sl-panel-background-color: var(--sl-color-neutral-50); - --sl-panel-border-color: var(--sl-color-neutral-200); - --sl-panel-border-width: 1px; - - --sl-tooltip-border-radius: var(--sl-border-radius-medium); - --sl-tooltip-background-color: var(--sl-color-neutral-800); - --sl-tooltip-color: var(--sl-color-neutral-0); - --sl-tooltip-font-family: var(--sl-font-sans); - --sl-tooltip-font-weight: var(--sl-font-weight-normal); - --sl-tooltip-font-size: var(--sl-font-size-small); - --sl-tooltip-line-height: var(--sl-line-height-dense); - --sl-tooltip-padding: var(--sl-spacing-2x-small) var(--sl-spacing-x-small); - --sl-tooltip-arrow-size: 6px; - - --sl-z-index-drawer: 700; - --sl-z-index-dialog: 800; - --sl-z-index-dropdown: 900; - --sl-z-index-toast: 950; - --sl-z-index-tooltip: 1000; -} - -@supports (scrollbar-gutter: stable) { - .sl-scroll-lock { - scrollbar-gutter: var(--sl-scroll-lock-gutter) !important; - } - - .sl-scroll-lock body { - overflow: hidden !important; - } -} - -@supports not (scrollbar-gutter: stable) { - .sl-scroll-lock body { - padding-right: var(--sl-scroll-lock-size) !important; - overflow: hidden !important; - } -} - -.sl-toast-stack { - position: fixed; - top: 0; - inset-inline-end: 0; - z-index: var(--sl-z-index-toast); - width: 28rem; - max-width: 100%; - max-height: 100%; - overflow: auto; -} - -.sl-toast-stack sl-alert { - margin: var(--sl-spacing-medium); -} - -.sl-toast-stack sl-alert::part(base) { - box-shadow: var(--sl-shadow-large); -} From 8a73b0e6fd253c65bbf21daea9d08b1974a85fa6 Mon Sep 17 00:00:00 2001 From: ecmel Date: Mon, 7 Oct 2024 07:19:11 +0300 Subject: [PATCH 09/57] more tokens --- src/webview/components/kdbDataSourceView.ts | 3 +++ src/webview/components/styles.ts | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/src/webview/components/kdbDataSourceView.ts b/src/webview/components/kdbDataSourceView.ts index bfe60cd9..239ecbd2 100644 --- a/src/webview/components/kdbDataSourceView.ts +++ b/src/webview/components/kdbDataSourceView.ts @@ -58,6 +58,9 @@ export class KdbDataSourceView extends LitElement { flex-grow: 0; gap: var(--sl-spacing-x-small); padding: var(--sl-spacing-medium); + margin-top: calc( + 1rem * var(--sl-line-height-dense) + 2 * var(--sl-spacing-medium) + ); } .actions sl-button-group > sl-button { diff --git a/src/webview/components/styles.ts b/src/webview/components/styles.ts index 2bfdc889..bb2c3e43 100644 --- a/src/webview/components/styles.ts +++ b/src/webview/components/styles.ts @@ -48,6 +48,11 @@ export const shoelaceStyles = css` sl-tab::part(base) { --sl-color-primary-600: var(--vscode-button-background); } + + sl-checkbox::part(base) { + --sl-color-primary-600: var(--vscode-button-background); + --sl-input-background-color-hover: var(--vscode-button-hoverBackground); + } `; export const vscodeStyles = css` From b5c6260d4f0aff83d3e6a7d0cd5c6b120da7207a Mon Sep 17 00:00:00 2001 From: ecmel Date: Mon, 7 Oct 2024 10:29:04 +0300 Subject: [PATCH 10/57] more tokens --- src/webview/components/styles.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/webview/components/styles.ts b/src/webview/components/styles.ts index bb2c3e43..41e2da44 100644 --- a/src/webview/components/styles.ts +++ b/src/webview/components/styles.ts @@ -23,21 +23,22 @@ export const shoelaceStyles = css` } sl-option::part(base) { - --sl-color-primary-600: var(--vscode-button-background); --sl-color-neutral-700: var(--vscode-input-foreground); + --sl-color-primary-600: var(--vscode-button-background); --sl-color-neutral-1000: var(--vscode-input-foreground); - --sl-color-neutral-100: var(--vscode-button-secondaryHoverBackground); + --sl-color-neutral-100: var(--vscode-inputOption-hoverBackground); } sl-button::part(base) { --sl-color-primary-600: var(--vscode-button-background); --sl-color-primary-500: var(--vscode-button-hoverBackground); - --sl-color-neutral-600: var(--vscode-button-secondaryBackground); - --sl-color-neutral-500: var(--vscode-button-secondaryHoverBackground); } sl-button[variant="neutral"]::part(base) { + --sl-color-neutral-600: var(--vscode-input-background); + --sl-color-neutral-500: var(--vscode-inputOption-hoverBackground); --sl-color-neutral-0: var(--vscode-input-foreground); + border-color: var(--vscode-input-border, transparent); } sl-tab-group::part(tabs) { @@ -46,7 +47,7 @@ export const shoelaceStyles = css` } sl-tab::part(base) { - --sl-color-primary-600: var(--vscode-button-background); + --sl-color-primary-600: var(--vscode-foreground); } sl-checkbox::part(base) { From 9c67366d28da920a8fa14d608325a386117ecb70 Mon Sep 17 00:00:00 2001 From: ecmel Date: Mon, 7 Oct 2024 10:51:08 +0300 Subject: [PATCH 11/57] added color-scheme --- src/services/dataSourceEditorProvider.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/services/dataSourceEditorProvider.ts b/src/services/dataSourceEditorProvider.ts index cf53e74b..f4d4739e 100644 --- a/src/services/dataSourceEditorProvider.ts +++ b/src/services/dataSourceEditorProvider.ts @@ -12,6 +12,7 @@ */ import { + ColorThemeKind, CustomTextEditorProvider, Disposable, ExtensionContext, @@ -223,6 +224,11 @@ export class DataSourceEditorProvider implements CustomTextEditorProvider { private getWebviewContent(webview: Webview) { const getResource = (resource: string) => getUri(webview, this.context.extensionUri, ["out", resource]); + const scheme = + window.activeColorTheme.kind === ColorThemeKind.Light || + window.activeColorTheme.kind === ColorThemeKind.HighContrastLight + ? "light" + : "dark"; return /* html */ ` @@ -232,6 +238,7 @@ export class DataSourceEditorProvider implements CustomTextEditorProvider { + DataSource From b4ee1a07bd70b5b267934db5740d13a96723de9e Mon Sep 17 00:00:00 2001 From: ecmel Date: Tue, 8 Oct 2024 00:59:42 +0300 Subject: [PATCH 12/57] more tokens --- src/services/dataSourceEditorProvider.ts | 13 +++-- src/webview/components/kdbDataSourceView.ts | 55 ++++++++++++--------- src/webview/components/styles.ts | 7 +-- src/webview/styles/style.css | 23 +++++++-- 4 files changed, 59 insertions(+), 39 deletions(-) diff --git a/src/services/dataSourceEditorProvider.ts b/src/services/dataSourceEditorProvider.ts index f4d4739e..e7fb2d7c 100644 --- a/src/services/dataSourceEditorProvider.ts +++ b/src/services/dataSourceEditorProvider.ts @@ -224,21 +224,20 @@ export class DataSourceEditorProvider implements CustomTextEditorProvider { private getWebviewContent(webview: Webview) { const getResource = (resource: string) => getUri(webview, this.context.extensionUri, ["out", resource]); - const scheme = - window.activeColorTheme.kind === ColorThemeKind.Light || - window.activeColorTheme.kind === ColorThemeKind.HighContrastLight - ? "light" - : "dark"; return /* html */ ` - + - DataSource diff --git a/src/webview/components/kdbDataSourceView.ts b/src/webview/components/kdbDataSourceView.ts index 239ecbd2..6defce81 100644 --- a/src/webview/components/kdbDataSourceView.ts +++ b/src/webview/components/kdbDataSourceView.ts @@ -46,6 +46,9 @@ export class KdbDataSourceView extends LitElement { display: flex; flex-flow: row nowrap; overflow-x: auto; + gap: var(--sl-spacing-medium); + padding-left: var(--sl-spacing-medium); + padding-right: var(--sl-spacing-medium); } .tabs { @@ -57,9 +60,8 @@ export class KdbDataSourceView extends LitElement { flex-flow: column nowrap; flex-grow: 0; gap: var(--sl-spacing-x-small); - padding: var(--sl-spacing-medium); margin-top: calc( - 1rem * var(--sl-line-height-dense) + 2 * var(--sl-spacing-medium) + 1rem * var(--sl-line-height-dense) + 3 * var(--sl-spacing-medium) ); } @@ -78,7 +80,8 @@ export class KdbDataSourceView extends LitElement { sl-tab-panel { --padding: 0; overflow-y: scroll; - padding: var(--sl-spacing-medium); + padding-top: var(--sl-spacing-medium); + padding-bottom: var(--sl-spacing-medium); height: calc( 100vh - 1rem * var(--sl-line-height-dense) - 2 * var(--sl-spacing-medium) @@ -821,27 +824,31 @@ export class KdbDataSourceView extends LitElement { renderQSQL() { return html` - - ${this.qsqlTarget || "(none)"} - ${this.isMetaLoaded ? "Meta Targets" : "Meta Not Loaded"} - ${this.renderTargetOptions()} - - +
+ + ${this.qsqlTarget || "(none)"} + ${this.isMetaLoaded ? "Meta Targets" : "Meta Not Loaded"} + ${this.renderTargetOptions()} + + +
`; } diff --git a/src/webview/components/styles.ts b/src/webview/components/styles.ts index 41e2da44..22c69453 100644 --- a/src/webview/components/styles.ts +++ b/src/webview/components/styles.ts @@ -23,8 +23,8 @@ export const shoelaceStyles = css` } sl-option::part(base) { - --sl-color-neutral-700: var(--vscode-input-foreground); --sl-color-primary-600: var(--vscode-button-background); + --sl-color-neutral-700: var(--vscode-input-foreground); --sl-color-neutral-1000: var(--vscode-input-foreground); --sl-color-neutral-100: var(--vscode-inputOption-hoverBackground); } @@ -38,11 +38,12 @@ export const shoelaceStyles = css` --sl-color-neutral-600: var(--vscode-input-background); --sl-color-neutral-500: var(--vscode-inputOption-hoverBackground); --sl-color-neutral-0: var(--vscode-input-foreground); - border-color: var(--vscode-input-border, transparent); + border-color: var(--sl-input-border-color); } sl-tab-group::part(tabs) { - --track-color: var(--vscode-button-secondaryHoverBackground); + --track-width: 1px; + --track-color: var(--vscode-inputOption-hoverBackground); --indicator-color: var(--vscode-button-background); } diff --git a/src/webview/styles/style.css b/src/webview/styles/style.css index 5dbf7197..d64642c4 100644 --- a/src/webview/styles/style.css +++ b/src/webview/styles/style.css @@ -1,4 +1,17 @@ -:root { +.sl-theme-dark { + color-scheme: dark; + --sl-input-border-color: var(--vscode-input-border, transparent); +} + +.sl-theme-light { + --sl-input-border-color: var( + --vscode-input-border, + var(--vscode-inputOption-hoverBackground) + ); +} + +.sl-theme-dark, +.sl-theme-light { --sl-focus-ring-width: 1px; --sl-focus-ring-offset: 1px; --sl-focus-ring-style: solid; @@ -14,9 +27,8 @@ --sl-input-border-width: 1px; --sl-input-border-radius-medium: 2px; - --sl-input-border-color: var(--vscode-input-border, transparent); - --sl-input-border-color-hover: var(--vscode-input-border, transparent); - --sl-input-border-color-focus: var(--vscode-input-border, transparent); + --sl-input-border-color-hover: var(--sl-input-border-color); + --sl-input-border-color-focus: var(--sl-input-border-color); --sl-input-height-medium: calc(2rem + 2 * var(--sl-input-border-width)); --sl-input-spacing-medium: var(--sl-spacing-x-small); @@ -32,6 +44,7 @@ html, body { margin: 0; + padding: 0; line-height: 1.5; font-size: var(--vscode-font-size); } @@ -44,5 +57,5 @@ body { -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; color: var(--vscode-foreground); - background-color: var(--vscode-panel-background); + background-color: var(--vscode-editor-background); } From ef8032c9eab7c1bfd78c70e7b9c97044d98c95e3 Mon Sep 17 00:00:00 2001 From: ecmel Date: Tue, 8 Oct 2024 01:34:15 +0300 Subject: [PATCH 13/57] fixed input focus ring --- src/webview/components/styles.ts | 7 ++++++- src/webview/styles/style.css | 4 +--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/webview/components/styles.ts b/src/webview/components/styles.ts index 22c69453..10c99503 100644 --- a/src/webview/components/styles.ts +++ b/src/webview/components/styles.ts @@ -18,6 +18,11 @@ export const shoelaceStyles = css` box-sizing: border-box; } + sl-input, + sl-select { + --sl-focus-ring-width: 0; + } + sl-select::part(listbox) { --sl-panel-border-color: var(--vscode-focusBorder); } @@ -44,7 +49,7 @@ export const shoelaceStyles = css` sl-tab-group::part(tabs) { --track-width: 1px; --track-color: var(--vscode-inputOption-hoverBackground); - --indicator-color: var(--vscode-button-background); + --indicator-color: var(--vscode-focusBorder); } sl-tab::part(base) { diff --git a/src/webview/styles/style.css b/src/webview/styles/style.css index d64642c4..d887b3e8 100644 --- a/src/webview/styles/style.css +++ b/src/webview/styles/style.css @@ -16,8 +16,6 @@ --sl-focus-ring-offset: 1px; --sl-focus-ring-style: solid; --sl-focus-ring-color: var(--vscode-focusBorder); - --sl-input-focus-ring-offset: -1px; - --sl-input-focus-ring-color: var(--vscode-focusBorder); --sl-button-font-size-medium: var(--vscode-font-size); --sl-input-font-size-medium: var(--vscode-font-size); @@ -28,7 +26,7 @@ --sl-input-border-width: 1px; --sl-input-border-radius-medium: 2px; --sl-input-border-color-hover: var(--sl-input-border-color); - --sl-input-border-color-focus: var(--sl-input-border-color); + --sl-input-border-color-focus: var(--vscode-focusBorder); --sl-input-height-medium: calc(2rem + 2 * var(--sl-input-border-width)); --sl-input-spacing-medium: var(--sl-spacing-x-small); From 7a0e3e8a48dc6760d0e43568220ccb69179b0706 Mon Sep 17 00:00:00 2001 From: ecmel Date: Tue, 8 Oct 2024 07:55:04 +0300 Subject: [PATCH 14/57] update merge --- src/webview/components/kdbDataSourceView.ts | 127 +++++++------------- src/webview/main.ts | 3 + 2 files changed, 48 insertions(+), 82 deletions(-) diff --git a/src/webview/components/kdbDataSourceView.ts b/src/webview/components/kdbDataSourceView.ts index 9019c0da..24bba165 100644 --- a/src/webview/components/kdbDataSourceView.ts +++ b/src/webview/components/kdbDataSourceView.ts @@ -176,9 +176,7 @@ export class KdbDataSourceView extends LitElement { this.rowLimitCount = ds.dataSource.api.rowCountLimit ? ds.dataSource.api.rowCountLimit : "100000"; - this.isRowLimitLast = ds.dataSource.api.isRowLimitLast - ? ds.dataSource.api.isRowLimitLast - : true; + this.isRowLimitLast = ds.dataSource.api.isRowLimitLast !== false; this.temporality = ds.dataSource.api.temporality; this.qsqlTarget = ds.dataSource.qsql.selectedTarget; this.qsql = ds.dataSource.qsql.query; @@ -303,59 +301,32 @@ export class KdbDataSourceView extends LitElement { if (compareVersions(this.selectedServerVersion.toString(), "1.11") >= 0) { return html`
- { this.rowLimit = (event.target as HTMLInputElement).checked; this.requestChange(); - }}"> - + }}"> + + - - - - + + First + Last +
`; } else { @@ -804,55 +775,47 @@ export class KdbDataSourceView extends LitElement {
- Start Time ${this.selectedServerVersion} + }}"> - End Time + }}">
${this.renderRowCountOptions()}
- { this.filled = (event.target as HTMLInputElement).checked; this.requestChange(); - }}"> - + }}"> + + ${this.fill || "(none)"} + Options + zero + forward +
diff --git a/src/webview/main.ts b/src/webview/main.ts index 5a770d39..f98d874e 100644 --- a/src/webview/main.ts +++ b/src/webview/main.ts @@ -13,6 +13,9 @@ import "@shoelace-style/shoelace/dist/components/button/button.js"; import "@shoelace-style/shoelace/dist/components/checkbox/checkbox.js"; +import "@shoelace-style/shoelace/dist/components/radio/radio.js"; +import "@shoelace-style/shoelace/dist/components/radio-button/radio-button.js"; +import "@shoelace-style/shoelace/dist/components/radio-group/radio-group.js"; import "@shoelace-style/shoelace/dist/components/button-group/button-group.js"; import "@shoelace-style/shoelace/dist/components/input/input.js"; import "@shoelace-style/shoelace/dist/components/textarea/textarea.js"; From da31daff958b9776478b72255a9e3ea29a064d33 Mon Sep 17 00:00:00 2001 From: ecmel Date: Tue, 8 Oct 2024 08:01:50 +0300 Subject: [PATCH 15/57] more tokens --- src/webview/components/styles.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/webview/components/styles.ts b/src/webview/components/styles.ts index 10c99503..4c0073f9 100644 --- a/src/webview/components/styles.ts +++ b/src/webview/components/styles.ts @@ -34,7 +34,8 @@ export const shoelaceStyles = css` --sl-color-neutral-100: var(--vscode-inputOption-hoverBackground); } - sl-button::part(base) { + sl-button::part(base), + sl-radio-button::part(base) { --sl-color-primary-600: var(--vscode-button-background); --sl-color-primary-500: var(--vscode-button-hoverBackground); } From 297ccdd6e199c086cecd55cdb1abc20d818a474a Mon Sep 17 00:00:00 2001 From: ecmel Date: Tue, 8 Oct 2024 09:04:09 +0300 Subject: [PATCH 16/57] fixed tab switch --- src/services/dataSourceEditorProvider.ts | 1 - src/webview/components/kdbDataSourceView.ts | 32 ++++++++++++++------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/src/services/dataSourceEditorProvider.ts b/src/services/dataSourceEditorProvider.ts index 0d45f4e0..64863863 100644 --- a/src/services/dataSourceEditorProvider.ts +++ b/src/services/dataSourceEditorProvider.ts @@ -123,7 +123,6 @@ export class DataSourceEditorProvider implements CustomTextEditorProvider { dataSourceFile: this.getDocumentAsJson(document), insightsMeta: await this.getMeta(selectedServer), isInsights: true, - theme: window.activeColorTheme.kind, }); } }; diff --git a/src/webview/components/kdbDataSourceView.ts b/src/webview/components/kdbDataSourceView.ts index 24bba165..94e86a6e 100644 --- a/src/webview/components/kdbDataSourceView.ts +++ b/src/webview/components/kdbDataSourceView.ts @@ -11,7 +11,7 @@ * specific language governing permissions and limitations under the License. */ -import { LitElement, html, css } from "lit"; +import { LitElement, html, css, PropertyValues } from "lit"; import { repeat } from "lit/directives/repeat.js"; import { live } from "lit/directives/live.js"; import { customElement } from "lit/decorators.js"; @@ -932,8 +932,8 @@ export class KdbDataSourceView extends LitElement { SQL - ${this.renderAPI()} - ${this.renderQSQL()} - ${this.renderSQL()} + ${this.renderAPI()} + ${this.renderQSQL()} + ${this.renderSQL()} `; } From 0ebc14c4c078dd7aac3020b362cf369b891e9d61 Mon Sep 17 00:00:00 2001 From: Philip Carneiro Date: Thu, 10 Oct 2024 12:21:28 +0100 Subject: [PATCH 17/57] fix for results tab --- src/services/resultsPanelProvider.ts | 67 +++++++++++++++++++++------- test/suite/panels.test.ts | 8 +++- 2 files changed, 56 insertions(+), 19 deletions(-) diff --git a/src/services/resultsPanelProvider.ts b/src/services/resultsPanelProvider.ts index 31dcf05a..145584c7 100644 --- a/src/services/resultsPanelProvider.ts +++ b/src/services/resultsPanelProvider.ts @@ -174,26 +174,52 @@ export class KdbResultsViewProvider implements WebviewViewProvider { convertToGrid(results: any, isInsights: boolean): any { const queryResult = isInsights ? results.rows : results; - const columnDefs = this.generateCoumnDefs(results, isInsights); let rowData = []; - if (!isInsights && typeof results[0] === "string") { - rowData = []; + let columnDefs = []; + + if (Array.isArray(queryResult[0])) { + if (typeof queryResult[0][0] === "object") { + rowData = queryResult[0].map((_, index) => { + const row: any = {}; + queryResult.forEach((subArray: any[]) => { + Object.assign(row, subArray[index]); + }); + return row; + }); + } else { + rowData = queryResult.map((element: any) => ({ value: element })); + } + } else { + rowData = queryResult; + } + + if (isInsights) { + results.rows = rowData; + columnDefs = this.generateCoumnDefs(results, isInsights); } else { - rowData = queryResult.map((row: any) => { - for (const key in row) { - if (Object.prototype.hasOwnProperty.call(row, key)) { - row[key] = - row[key] !== undefined && row[key] !== null - ? this.sanitizeString(row[key]) - : ""; - } - } - return row; + columnDefs = this.generateCoumnDefs(rowData, isInsights); + } + + if ( + !columnDefs.some( + (col: any) => col.field.toString().toLowerCase() === "index", + ) + ) { + rowData = rowData.map((row: any, index: any) => ({ + index: index + 1, + ...row, + })); + columnDefs.unshift({ + field: "index", + headerName: "Index", + cellDataType: "number", }); } + if (rowData.length > 0) { ext.resultPanelCSV = this.convertToCsv(rowData).join("\n"); } + return { defaultColDef: { sortable: true, @@ -202,8 +228,8 @@ export class KdbResultsViewProvider implements WebviewViewProvider { flex: 1, minWidth: 100, }, - rowData, - columnDefs, + rowData: rowData, + columnDefs: columnDefs, domLayout: "autoHeight", pagination: true, paginationPageSize: 100, @@ -212,6 +238,7 @@ export class KdbResultsViewProvider implements WebviewViewProvider { suppressContextMenu: true, suppressDragLeaveHidesColumns: true, tooltipShowDelay: 200, + loading: true, }; } @@ -304,7 +331,7 @@ export class KdbResultsViewProvider implements WebviewViewProvider { "ag-grid-community.min.js", )}"> - +
@@ -321,7 +348,7 @@ export class KdbResultsViewProvider implements WebviewViewProvider { function restoreColumnWidths(columnWidths) { if (!gridApi || !columnWidths) return; - gridApi.applyColumnState({state: columnWidths}); + gridApi.applyColumnState({state: columnWidths, applyOrder: true,}); } window.addEventListener('message', event => { @@ -333,8 +360,14 @@ export class KdbResultsViewProvider implements WebviewViewProvider { const resultsDiv = document.querySelector('#results .content-wrapper'); resultsDiv.innerHTML = ''; gridDiv.innerHTML = ''; + const rowData = gridOptions.rowData; + gridOptions.rowData = []; gridApi = agGrid.createGrid(gridDiv, gridOptions); restoreColumnWidths(columnWidths); + setTimeout(() => { + gridApi.setGridOption("rowData", rowData); + gridApi.setGridOption("loading", false); + }, 500); document.getElementById("results").scrollIntoView(); } else if (message.command === 'setResultsContent') { const resultsContent = message.results; diff --git a/test/suite/panels.test.ts b/test/suite/panels.test.ts index fe9d4e20..68c17459 100644 --- a/test/suite/panels.test.ts +++ b/test/suite/panels.test.ts @@ -196,10 +196,11 @@ describe("WebPanels", () => { minWidth: 100, }, rowData: [ - { prop1: "value1", prop2: "value2" }, - { prop1: "value3", prop2: "value4" }, + { index: 1, prop1: "value1", prop2: "value2" }, + { index: 2, prop1: "value3", prop2: "value4" }, ], columnDefs: [ + { field: "index", headerName: "Index", cellDataType: "number" }, { field: "prop1", headerName: "prop1", @@ -221,6 +222,7 @@ describe("WebPanels", () => { suppressContextMenu: true, suppressDragLeaveHidesColumns: true, tooltipShowDelay: 200, + loading: true, }); // Mock ext.connectionNode @@ -250,6 +252,7 @@ describe("WebPanels", () => { }, rowData: [], columnDefs: [ + { field: "index", headerName: "Index", cellDataType: "number" }, { field: "prop1", headerName: "prop1", @@ -271,6 +274,7 @@ describe("WebPanels", () => { suppressContextMenu: true, suppressDragLeaveHidesColumns: true, tooltipShowDelay: 200, + loading: true, }); // Mock ext.connectionNode From ed3ba2fadf8c8c02aac7996bc5509d30e2cc6243 Mon Sep 17 00:00:00 2001 From: Philip Carneiro Date: Thu, 10 Oct 2024 12:36:45 +0100 Subject: [PATCH 18/57] add test coverage --- test/suite/panels.test.ts | 109 +++++++++++++++++++++++++++++++++++++- 1 file changed, 107 insertions(+), 2 deletions(-) diff --git a/test/suite/panels.test.ts b/test/suite/panels.test.ts index 68c17459..20d6196f 100644 --- a/test/suite/panels.test.ts +++ b/test/suite/panels.test.ts @@ -178,7 +178,7 @@ describe("WebPanels", () => { }); describe("convertToGrid()", () => { - it("should convert results to grid format for inisights", () => { + it("should convert results to grid format for insights", () => { const results = { rows: [ { prop1: "value1", prop2: "value2" }, @@ -236,7 +236,7 @@ describe("WebPanels", () => { stub.restore(); }); - it("should convert results to grid format with empty rows ", () => { + it("should convert results to grid format with empty rows", () => { const results = { rows: [], meta: { prop1: "type1", prop2: "type2" }, @@ -287,6 +287,111 @@ describe("WebPanels", () => { // Restore the stub stub.restore(); }); + + it("should convert results to grid format when queryResult[0] is an array of objects", () => { + const results = { + rows: [ + [{ sym: "a" }, { sym: "b" }, { sym: "c" }], + [{ val: 1 }, { val: 2 }, { val: 3 }], + ], + meta: { sym: "type1", val: "type2" }, + }; + + const expectedOutput = JSON.stringify({ + defaultColDef: { + sortable: true, + resizable: true, + filter: true, + flex: 1, + minWidth: 100, + }, + rowData: [ + { index: 1, sym: "a", val: 1 }, + { index: 2, sym: "b", val: 2 }, + { index: 3, sym: "c", val: 3 }, + ], + columnDefs: [ + { field: "index", headerName: "Index", cellDataType: "number" }, + { + field: "sym", + headerName: "sym", + headerTooltip: "type1", + cellDataType: "text", + }, + { + field: "val", + headerName: "val", + headerTooltip: "type2", + cellDataType: "text", + }, + ], + domLayout: "autoHeight", + pagination: true, + paginationPageSize: 100, + enableCellTextSelection: true, + ensureDomOrder: true, + suppressContextMenu: true, + suppressDragLeaveHidesColumns: true, + tooltipShowDelay: 200, + loading: true, + }); + + // Mock ext.connectionNode + const stub = sinon.stub(ext, "activeConnection"); + stub.get(() => insightsConn); + + const output = resultsPanel.convertToGrid(results, true); + assert.equal(JSON.stringify(output), expectedOutput); + + // Restore the stub + stub.restore(); + }); + + it("should convert results to grid format when queryResult[0] is an array of non-objects", () => { + const results = { + rows: [[1, 2, 3]], + meta: { value: "type1" }, + }; + + const expectedOutput = JSON.stringify({ + defaultColDef: { + sortable: true, + resizable: true, + filter: true, + flex: 1, + minWidth: 100, + }, + rowData: [{ index: 1, value: [1, 2, 3] }], + columnDefs: [ + { field: "index", headerName: "Index", cellDataType: "number" }, + { + field: "value", + headerName: "value", + headerTooltip: "type1", + cellDataType: "text", + }, + ], + domLayout: "autoHeight", + pagination: true, + paginationPageSize: 100, + enableCellTextSelection: true, + ensureDomOrder: true, + suppressContextMenu: true, + suppressDragLeaveHidesColumns: true, + tooltipShowDelay: 200, + loading: true, + }); + + // Mock ext.connectionNode + const stub = sinon.stub(ext, "activeConnection"); + stub.get(() => insightsConn); + + const output = resultsPanel.convertToGrid(results, true); + assert.equal(JSON.stringify(output), expectedOutput); + + // Restore the stub + stub.restore(); + }); }); describe("generateColumnDefs", () => { From 95c9fac5238feee05791ab2ba9074da6c3c190f2 Mon Sep 17 00:00:00 2001 From: Philip Carneiro Date: Tue, 15 Oct 2024 15:33:06 +0100 Subject: [PATCH 19/57] add ping to scratchpad upon connection --- src/classes/insightsConnection.ts | 33 +++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/src/classes/insightsConnection.ts b/src/classes/insightsConnection.ts index 85edd732..56f932b4 100644 --- a/src/classes/insightsConnection.ts +++ b/src/classes/insightsConnection.ts @@ -63,6 +63,7 @@ export class InsightsConnection { if (token) { await this.getConfig(); await this.getMeta(); + await this.getScratchpadQuery(""); } }); return this.connected; @@ -447,18 +448,30 @@ export class InsightsConnection { httpsAgent: getHttpsAgent(this.node.details.insecure), }) .then((response: any) => { - kdbOutputLog(`[SCRATCHPAD] Status: ${response.status}`, "INFO"); - if (isTableView && !response.data.error) { - const buffer = new Uint8Array( - response.data.data.map((x: string) => parseInt(x, 16)), - ).buffer; - - response.data.data = handleWSResults(buffer); - response.data.data = handleScratchpadTableRes( - response.data.data, + if (response.data.error) { + kdbOutputLog( + `[SCRATCHPAD] Error occured while executing scratchpad: ${response.data.errorMsg}`, + "ERROR", + ); + } else if (query === "") { + kdbOutputLog( + `[SCRATCHPAD] scratchpad created for connection: ${this.connLabel}`, + "INFO", ); + } else { + kdbOutputLog(`[SCRATCHPAD] Status: ${response.status}`, "INFO"); + if (isTableView && !response.data.error) { + const buffer = new Uint8Array( + response.data.data.map((x: string) => parseInt(x, 16)), + ).buffer; + + response.data.data = handleWSResults(buffer); + response.data.data = handleScratchpadTableRes( + response.data.data, + ); + } + return response.data; } - return response.data; }); return spRes; }, From 2772c531abb085e190cd782b665d9920543bb55b Mon Sep 17 00:00:00 2001 From: Philip Carneiro Date: Wed, 16 Oct 2024 09:23:32 +0100 Subject: [PATCH 20/57] Update CHANGELOG.md --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16d7dc17..e79a57f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ All notable changes to the **kdb VS Code extension** are documented in this file. +# v1.9.0 + +### Enhancements + +### Fixes + +- Fix for results tab flickering , improving of UX +- Fix for Issue [#382](https://github.com/KxSystems/kx-vscode/issues/382) + # v1.8.0 ### Enhancements From ef6c387871d73e2fbecc10efbe60818841d56666 Mon Sep 17 00:00:00 2001 From: ecmel Date: Wed, 16 Oct 2024 11:28:13 +0300 Subject: [PATCH 21/57] fixed incoming --- src/webview/components/kdbDataSourceView.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/webview/components/kdbDataSourceView.ts b/src/webview/components/kdbDataSourceView.ts index d97cb963..50671e52 100644 --- a/src/webview/components/kdbDataSourceView.ts +++ b/src/webview/components/kdbDataSourceView.ts @@ -775,16 +775,15 @@ export class KdbDataSourceView extends LitElement {
- Start Time + }}"> + Date: Wed, 16 Oct 2024 11:42:49 +0300 Subject: [PATCH 22/57] removed floating import --- src/webview/components/kdbDataSourceView.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webview/components/kdbDataSourceView.ts b/src/webview/components/kdbDataSourceView.ts index 50671e52..e3587231 100644 --- a/src/webview/components/kdbDataSourceView.ts +++ b/src/webview/components/kdbDataSourceView.ts @@ -11,7 +11,7 @@ * specific language governing permissions and limitations under the License. */ -import { LitElement, html, css, PropertyValues } from "lit"; +import { LitElement, html, css } from "lit"; import { repeat } from "lit/directives/repeat.js"; import { live } from "lit/directives/live.js"; import { customElement } from "lit/decorators.js"; From 5a9ce692b15338e691263847f9ba3974166819a7 Mon Sep 17 00:00:00 2001 From: Philip Carneiro Date: Wed, 16 Oct 2024 09:43:24 +0100 Subject: [PATCH 23/57] change version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8b958450..d5e669de 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "kdb", "description": "IDE support for kdb product suite including the q programming language", "publisher": "KX", - "version": "1.8.0", + "version": "1.9.0", "engines": { "vscode": "^1.86.0" }, From f1fe8693f723601a44bb9abb0a01cf3ecc534a5a Mon Sep 17 00:00:00 2001 From: Philip Carneiro Date: Wed, 16 Oct 2024 09:58:53 +0100 Subject: [PATCH 24/57] update package lock --- package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 875901c3..d7b05d06 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "kdb", - "version": "1.8.0", + "version": "1.9.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "kdb", - "version": "1.8.0", + "version": "1.9.0", "license": "MIT", "dependencies": { "@vscode/webview-ui-toolkit": "^1.4.0", From 6a1f20a61a012760f66b3d20b358d814942a048d Mon Sep 17 00:00:00 2001 From: ecmel Date: Wed, 16 Oct 2024 12:01:06 +0300 Subject: [PATCH 25/57] moved css to styles --- src/webview/components/kdbDataSourceView.ts | 78 +-------------------- src/webview/components/styles.ts | 70 ++++++++++++++++++ 2 files changed, 73 insertions(+), 75 deletions(-) diff --git a/src/webview/components/kdbDataSourceView.ts b/src/webview/components/kdbDataSourceView.ts index e3587231..ee55fadd 100644 --- a/src/webview/components/kdbDataSourceView.ts +++ b/src/webview/components/kdbDataSourceView.ts @@ -11,7 +11,7 @@ * specific language governing permissions and limitations under the License. */ -import { LitElement, html, css } from "lit"; +import { LitElement, html } from "lit"; import { repeat } from "lit/directives/repeat.js"; import { live } from "lit/directives/live.js"; import { customElement } from "lit/decorators.js"; @@ -33,85 +33,13 @@ import { } from "../../models/dataSource"; import { MetaObjectPayload } from "../../models/meta"; import { DataSourceCommand, DataSourceMessage2 } from "../../models/messages"; -import { shoelaceStyles } from "./styles"; +import { dataSourceStyles, shoelaceStyles } from "./styles"; const MAX_RULES = 32; @customElement("kdb-data-source-view") export class KdbDataSourceView extends LitElement { - static styles = [ - shoelaceStyles, - css` - .container { - display: flex; - flex-flow: row nowrap; - overflow-x: auto; - gap: var(--sl-spacing-medium); - padding-left: var(--sl-spacing-medium); - padding-right: var(--sl-spacing-medium); - } - - .tabs { - flex-grow: 1; - } - - .actions { - display: flex; - flex-flow: column nowrap; - flex-grow: 0; - gap: var(--sl-spacing-x-small); - margin-top: calc( - 1rem * var(--sl-line-height-dense) + 3 * var(--sl-spacing-medium) - ); - } - - .actions sl-button-group > sl-button { - flex-grow: 1; - } - - sl-tab::part(base) { - padding: var(--sl-spacing-medium); - } - - sl-select::part(listbox) { - min-width: max-content; - } - - sl-tab-panel { - --padding: 0; - overflow-y: scroll; - padding-top: var(--sl-spacing-medium); - padding-bottom: var(--sl-spacing-medium); - height: calc( - 100vh - 1rem * var(--sl-line-height-dense) - 2 * - var(--sl-spacing-medium) - ); - } - - sl-input, - sl-select { - min-width: 13rem; - max-width: 13rem; - } - - sl-checkbox { - padding-bottom: var(--sl-spacing-2x-small); - } - - .col { - display: flex; - flex-direction: column; - gap: var(--sl-spacing-x-small); - } - - .row { - display: flex; - flex-direction: row; - gap: var(--sl-spacing-x-small); - align-items: flex-end; - } - `, - ]; + static styles = [shoelaceStyles, dataSourceStyles]; readonly vscode = acquireVsCodeApi(); private declare debounce; diff --git a/src/webview/components/styles.ts b/src/webview/components/styles.ts index 4c0073f9..ed6f0ca5 100644 --- a/src/webview/components/styles.ts +++ b/src/webview/components/styles.ts @@ -63,6 +63,76 @@ export const shoelaceStyles = css` } `; +export const dataSourceStyles = css` + .container { + display: flex; + flex-flow: row nowrap; + overflow-x: auto; + gap: var(--sl-spacing-medium); + padding-left: var(--sl-spacing-medium); + padding-right: var(--sl-spacing-medium); + } + + .tabs { + flex-grow: 1; + } + + .actions { + display: flex; + flex-flow: column nowrap; + flex-grow: 0; + gap: var(--sl-spacing-x-small); + margin-top: calc( + 1rem * var(--sl-line-height-dense) + 3 * var(--sl-spacing-medium) + ); + } + + .actions sl-button-group > sl-button { + flex-grow: 1; + } + + sl-tab::part(base) { + padding: var(--sl-spacing-medium); + } + + sl-select::part(listbox) { + min-width: max-content; + } + + sl-tab-panel { + --padding: 0; + overflow-y: scroll; + padding-top: var(--sl-spacing-medium); + padding-bottom: var(--sl-spacing-medium); + height: calc( + 100vh - 1rem * var(--sl-line-height-dense) - 2 * var(--sl-spacing-medium) + ); + } + + sl-input, + sl-select { + min-width: 13rem; + max-width: 13rem; + } + + sl-checkbox { + padding-bottom: var(--sl-spacing-2x-small); + } + + .col { + display: flex; + flex-direction: column; + gap: var(--sl-spacing-x-small); + } + + .row { + display: flex; + flex-direction: row; + gap: var(--sl-spacing-x-small); + align-items: flex-end; + } +`; + export const vscodeStyles = css` .dropdown-container { box-sizing: border-box; From f5d7833a1a65e3e5b891a73e595ac006f61aed41 Mon Sep 17 00:00:00 2001 From: Philip Carneiro Date: Thu, 17 Oct 2024 09:49:30 +0100 Subject: [PATCH 26/57] update package-lock json --- package-lock.json | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1a4bf84b..89f70656 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4087,10 +4087,11 @@ } }, "node_modules/path-to-regexp": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.2.tgz", - "integrity": "sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==", - "dev": true + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz", + "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==", + "dev": true, + "license": "MIT" }, "node_modules/pend": { "version": "1.2.0", From 844755f616e6e3fdee6353efe1d6e3e2c1419f18 Mon Sep 17 00:00:00 2001 From: Philip Carneiro Date: Thu, 17 Oct 2024 15:39:32 +0100 Subject: [PATCH 27/57] Move Server Object logic away from models code --- src/models/serverObject.ts | 123 -------------- src/services/kdbTreeProvider.ts | 29 ++-- src/services/kdbTreeService.ts | 128 ++++++++++++++ test/suite/models.test.ts | 284 -------------------------------- test/suite/services.test.ts | 256 ++++++++++++++++++++++++++++ 5 files changed, 399 insertions(+), 421 deletions(-) create mode 100644 src/services/kdbTreeService.ts delete mode 100644 test/suite/models.test.ts diff --git a/src/models/serverObject.ts b/src/models/serverObject.ts index 39c9d7c3..fe8ff9c7 100644 --- a/src/models/serverObject.ts +++ b/src/models/serverObject.ts @@ -11,10 +11,6 @@ * specific language governing permissions and limitations under the License. */ -import { LocalConnection } from "../classes/localConnection"; -import { loadServerObjects } from "../commands/serverCommand"; -import { ext } from "../extensionVariables"; - export interface ServerObject { id: number; pid: number; @@ -25,122 +21,3 @@ export interface ServerObject { context: object; isNs: boolean; } - -export async function loadNamespaces(root?: string): Promise { - const serverObjects = await loadServerObjects(); - if (serverObjects !== undefined) { - const ns = serverObjects.filter((value) => { - return value.isNs ? value : undefined; - }); - - const sorted = sortObjects(ns); - - return getNamespaces(sorted, root); - } - return new Array(); -} - -export async function loadDictionaries(ns: string): Promise { - const serverObjects = await loadServerObjects(); - if (serverObjects !== undefined) { - const dicts = serverObjects.filter((value) => { - return value.typeNum === 99 && !value.isNs && value.namespace === ns - ? value - : undefined; - }); - return sortObjects(dicts); - } - return new Array(); -} - -export async function loadFunctions(ns: string): Promise { - const serverObjects = await loadServerObjects(); - if (serverObjects !== undefined) { - const funcs = serverObjects.filter((value) => { - return value.typeNum === 100 && !value.isNs && value.namespace === ns - ? value - : undefined; - }); - return sortObjects(funcs); - } - return new Array(); -} - -export async function loadTables(ns: string): Promise { - const serverObjects = await loadServerObjects(); - if (serverObjects !== undefined) { - const tables = serverObjects.filter((value) => { - return value.typeNum === 98 && !value.isNs && value.namespace === ns - ? value - : undefined; - }); - return sortObjects(tables); - } - return new Array(); -} - -export async function loadVariables(ns: string): Promise { - const serverObjects = await loadServerObjects(); - const views = await loadViews(); - - if (serverObjects !== undefined) { - const vars = serverObjects.filter((value) => { - return views.indexOf(value.name) === -1 && - value.typeNum < 98 && - !value.isNs && - value.namespace === ns - ? value - : undefined; - }); - return sortObjects(vars); - } - return new Array(); -} - -export async function loadViews(): Promise { - if (ext.activeConnection instanceof LocalConnection) { - const rawViewArray = await ext.activeConnection?.executeQuery("views`"); - const views = rawViewArray?.filter((item: any) => { - return item !== "s#" && item !== "" && item !== ","; - }); - const sorted = views?.sort((object1: any, object2: any) => { - if (object1 < object2) { - return -1; - } else if (object1 > object2) { - return 1; - } - return 0; - }); - return sorted ?? new Array(); - } - return new Array(); -} - -function getNamespaces(input: ServerObject[], root = "."): ServerObject[] { - const output: ServerObject[] = []; - - input.forEach((v, i) => { - let index = -1; - if (root === v.namespace) { - index = i; - } - - if (index != -1) { - output.push(v); - } - }); - - return output; -} - -function sortObjects(input: ServerObject[]): ServerObject[] { - const sorted = input.sort((object1, object2) => { - if (object1.fname < object2.fname) { - return -1; - } else if (object1.fname > object2.fname) { - return 1; - } - return 0; - }); - return sorted; -} diff --git a/src/services/kdbTreeProvider.ts b/src/services/kdbTreeProvider.ts index 465d867a..22b5fb17 100644 --- a/src/services/kdbTreeProvider.ts +++ b/src/services/kdbTreeProvider.ts @@ -22,14 +22,6 @@ import { commands, } from "vscode"; import { ext } from "../extensionVariables"; -import { - loadDictionaries, - loadFunctions, - loadNamespaces, - loadTables, - loadVariables, - loadViews, -} from "../models/serverObject"; import { getInsightsAlias, getServerAlias, @@ -53,6 +45,7 @@ import { Server, ServerDetails, } from "../models/connectionsModels"; +import { KdbTreeService } from "./kdbTreeService"; export class KdbTreeProvider implements TreeDataProvider { private _onDidChangeTreeData: EventEmitter< @@ -214,7 +207,7 @@ export class KdbTreeProvider implements TreeDataProvider { /* istanbul ignore next */ private async getNamespaces(connLabel?: string): Promise { - const ns = await loadNamespaces(); + const ns = await KdbTreeService.loadNamespaces(); const result = ns.map( (x) => new QNamespaceNode( @@ -272,7 +265,9 @@ export class KdbTreeProvider implements TreeDataProvider { serverType instanceof QCategoryNode ? serverType.connLabel : ""; if (serverType.label === ext.qObjectCategories[0]) { // dictionaries - const dicts = await loadDictionaries(serverType.contextValue ?? ""); + const dicts = await KdbTreeService.loadDictionaries( + serverType.contextValue ?? "", + ); const result = dicts.map( (x) => new QServerNode( @@ -291,7 +286,9 @@ export class KdbTreeProvider implements TreeDataProvider { } } else if (serverType.label === ext.qObjectCategories[1]) { // functions - const funcs = await loadFunctions(serverType.contextValue ?? ""); + const funcs = await KdbTreeService.loadFunctions( + serverType.contextValue ?? "", + ); const result = funcs.map( (x) => new QServerNode( @@ -310,7 +307,9 @@ export class KdbTreeProvider implements TreeDataProvider { } } else if (serverType.label === ext.qObjectCategories[2]) { // tables - const tables = await loadTables(serverType.contextValue ?? ""); + const tables = await KdbTreeService.loadTables( + serverType.contextValue ?? "", + ); const result = tables.map( (x) => new QServerNode( @@ -329,7 +328,9 @@ export class KdbTreeProvider implements TreeDataProvider { } } else if (serverType.label === ext.qObjectCategories[3]) { // variables - const vars = await loadVariables(serverType.contextValue ?? ""); + const vars = await KdbTreeService.loadVariables( + serverType.contextValue ?? "", + ); const result = vars.map( (x) => new QServerNode( @@ -348,7 +349,7 @@ export class KdbTreeProvider implements TreeDataProvider { } } else if (serverType.label === ext.qObjectCategories[4]) { // views - const views = await loadViews(); + const views = await KdbTreeService.loadViews(); const result = views.map( (x) => new QServerNode( diff --git a/src/services/kdbTreeService.ts b/src/services/kdbTreeService.ts new file mode 100644 index 00000000..ba672795 --- /dev/null +++ b/src/services/kdbTreeService.ts @@ -0,0 +1,128 @@ +import { ServerObject } from "../models/serverObject"; +import { ext } from "../extensionVariables"; +import { loadServerObjects } from "../commands/serverCommand"; +import { LocalConnection } from "../classes/localConnection"; + +export class KdbTreeService { + static async loadNamespaces(root?: string): Promise { + const serverObjects = await loadServerObjects(); + if (serverObjects !== undefined) { + const ns = serverObjects.filter((value) => { + return value.isNs ? value : undefined; + }); + + const sorted = KdbTreeService.sortObjects(ns); + + return KdbTreeService.getNamespaces(sorted, root); + } + return new Array(); + } + + static async loadDictionaries(ns: string): Promise { + const serverObjects = await loadServerObjects(); + if (serverObjects !== undefined) { + const dicts = serverObjects.filter((value) => { + return value.typeNum === 99 && !value.isNs && value.namespace === ns + ? value + : undefined; + }); + return KdbTreeService.sortObjects(dicts); + } + return new Array(); + } + + static async loadFunctions(ns: string): Promise { + const serverObjects = await loadServerObjects(); + if (serverObjects !== undefined) { + const funcs = serverObjects.filter((value) => { + return value.typeNum === 100 && !value.isNs && value.namespace === ns + ? value + : undefined; + }); + return KdbTreeService.sortObjects(funcs); + } + return new Array(); + } + + static async loadTables(ns: string): Promise { + const serverObjects = await loadServerObjects(); + if (serverObjects !== undefined) { + const tables = serverObjects.filter((value) => { + return value.typeNum === 98 && !value.isNs && value.namespace === ns + ? value + : undefined; + }); + return KdbTreeService.sortObjects(tables); + } + return new Array(); + } + + static async loadVariables(ns: string): Promise { + const serverObjects = await loadServerObjects(); + const views = await KdbTreeService.loadViews(); + + if (serverObjects !== undefined) { + const vars = serverObjects.filter((value) => { + return views.indexOf(value.name) === -1 && + value.typeNum < 98 && + !value.isNs && + value.namespace === ns + ? value + : undefined; + }); + return KdbTreeService.sortObjects(vars); + } + return new Array(); + } + + static async loadViews(): Promise { + if (ext.activeConnection instanceof LocalConnection) { + const rawViewArray = await ext.activeConnection?.executeQuery("views`"); + const views = rawViewArray?.filter((item: any) => { + return item !== "s#" && item !== "" && item !== ","; + }); + const sorted = views?.sort((object1: any, object2: any) => { + if (object1 < object2) { + return -1; + } else if (object1 > object2) { + return 1; + } + return 0; + }); + return sorted ?? new Array(); + } + return new Array(); + } + + private static getNamespaces( + input: ServerObject[], + root = ".", + ): ServerObject[] { + const output: ServerObject[] = []; + + input.forEach((v, i) => { + let index = -1; + if (root === v.namespace) { + index = i; + } + + if (index != -1) { + output.push(v); + } + }); + + return output; + } + + private static sortObjects(input: ServerObject[]): ServerObject[] { + const sorted = input.sort((object1, object2) => { + if (object1.fname < object2.fname) { + return -1; + } else if (object1.fname > object2.fname) { + return 1; + } + return 0; + }); + return sorted; + } +} diff --git a/test/suite/models.test.ts b/test/suite/models.test.ts deleted file mode 100644 index 903593eb..00000000 --- a/test/suite/models.test.ts +++ /dev/null @@ -1,284 +0,0 @@ -/* - * Copyright (c) 1998-2023 Kx Systems Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -import assert from "assert"; -import sinon from "sinon"; -import { ext } from "../../src/extensionVariables"; -import { - ServerObject, - loadDictionaries, - loadFunctions, - loadNamespaces, - loadTables, - loadVariables, - loadViews, -} from "../../src/models/serverObject"; -import { LocalConnection } from "../../src/classes/localConnection"; - -// eslint-disable-next-line @typescript-eslint/no-var-requires -const so = require("../../src/commands/serverCommand"); -// eslint-disable-next-line @typescript-eslint/no-var-requires -const vw = require("../../src/models/serverObject"); - -describe("Models", () => { - it("Should return empty ServerObjects array when none are loaded", async () => { - sinon.stub(so, "loadServerObjects").resolves(undefined); - const result = await loadNamespaces(""); - assert.strictEqual(result.length, 0, "Namespaces returned should be zero."); - sinon.restore(); - }); - - it("Should return a single server object that ia a namespace", async () => { - const testObject: ServerObject[] = [ - { - id: 1, - pid: 1, - name: "test", - fname: "test1", - typeNum: 1, - namespace: ".", - context: {}, - isNs: true, - }, - { - id: 2, - pid: 2, - name: "test", - fname: "test2", - typeNum: 1, - namespace: ".", - context: {}, - isNs: true, - }, - ]; - sinon.stub(so, "loadServerObjects").resolves(testObject); - const result = await loadNamespaces(); - assert.strictEqual( - result[0], - testObject[0], - "Single server object that is a namespace should be returned.", - ); - sinon.restore(); - }); - - it("Should return a single server object that ia a namespace (reverse sort)", async () => { - const testObject0: ServerObject[] = [ - { - id: 1, - pid: 1, - name: "test", - fname: "test", - typeNum: 1, - namespace: ".", - context: {}, - isNs: true, - }, - { - id: 0, - pid: 0, - name: "test", - fname: "test0", - typeNum: 1, - namespace: ".", - context: {}, - isNs: true, - }, - ]; - sinon.stub(so, "loadServerObjects").resolves(testObject0); - const result = await loadNamespaces(); - assert.strictEqual( - result[0], - testObject0[0], - "Single server object that is a namespace should be returned.", - ); - sinon.restore(); - }); - - it("Should return a single server object that ia a namespace", async () => { - const testObject2: ServerObject[] = [ - { - id: 1, - pid: 1, - name: "test", - fname: "test", - typeNum: 1, - namespace: ".", - context: {}, - isNs: true, - }, - ]; - sinon.stub(so, "loadServerObjects").resolves(testObject2); - const result = await loadNamespaces("."); - assert.strictEqual( - result[0], - testObject2[0], - `Single server object that is a namespace should be returned: ${JSON.stringify( - result, - )}`, - ); - sinon.restore(); - }); - - it("Should return empty ServerObjects array when none are loaded", async () => { - sinon.stub(so, "loadServerObjects").resolves(undefined); - const result = await loadDictionaries(""); - assert.strictEqual( - result.length, - 0, - "ServerObjects returned should be zero.", - ); - sinon.restore(); - }); - - it("Should return a single server object that ia a dictionary", async () => { - const testObject: ServerObject[] = [ - { - id: 1, - pid: 1, - name: "test", - fname: "test", - typeNum: 99, - namespace: ".", - context: {}, - isNs: false, - }, - ]; - sinon.stub(so, "loadServerObjects").resolves(testObject); - const result = await loadDictionaries("."); - assert.strictEqual( - result[0], - testObject[0], - "Single server object that is a namespace should be returned.", - ); - sinon.restore(); - }); - - it("Should return empty ServerObjects array when none are loaded", async () => { - sinon.stub(so, "loadServerObjects").resolves(undefined); - const result = await loadFunctions("."); - assert.strictEqual( - result.length, - 0, - "ServerObjects returned should be zero.", - ); - sinon.restore(); - }); - - it("Should return a single server object that ia a function", async () => { - const testObject: ServerObject[] = [ - { - id: 1, - pid: 1, - name: "test", - fname: "test", - typeNum: 100, - namespace: ".", - context: {}, - isNs: false, - }, - ]; - sinon.stub(so, "loadServerObjects").resolves(testObject); - const result = await loadFunctions("."); - assert.strictEqual( - result[0], - testObject[0], - "Single server object that is a namespace should be returned.", - ); - sinon.restore(); - }); - - it("Should return empty ServerObjects array when none are loaded", async () => { - sinon.stub(so, "loadServerObjects").resolves(undefined); - const result = await loadTables("."); - assert.strictEqual( - result.length, - 0, - "ServerObjects returned should be zero.", - ); - sinon.restore(); - }); - - it("Should return a single server object that ia a table", async () => { - const testObject: ServerObject[] = [ - { - id: 1, - pid: 1, - name: "test", - fname: "test", - typeNum: 98, - namespace: ".", - context: {}, - isNs: false, - }, - ]; - sinon.stub(so, "loadServerObjects").resolves(testObject); - const result = await loadTables("."); - assert.strictEqual( - result[0], - testObject[0], - "Single server object that is a namespace should be returned.", - ); - sinon.restore(); - }); - - it("Should return empty ServerObjects array when none are loaded", async () => { - sinon.stub(so, "loadServerObjects").resolves(undefined); - const result = await loadVariables("."); - assert.strictEqual( - result.length, - 0, - "ServerObjects returned should be zero.", - ); - sinon.restore(); - }); - - it("Should return a single server object that ia a variable", async () => { - const testObject: ServerObject[] = [ - { - id: 1, - pid: 1, - name: "test", - fname: "test", - typeNum: -7, - namespace: ".", - context: {}, - isNs: false, - }, - ]; - sinon.stub(so, "loadServerObjects").resolves(testObject); - sinon.stub(vw, "loadViews").resolves([]); - const result = await loadVariables("."); - assert.strictEqual( - result[0], - testObject[0], - "Single server object that is a namespace should be returned.", - ); - sinon.restore(); - }); - - it("Should return sorted views", async () => { - ext.activeConnection = new LocalConnection("localhost:5001", "server1"); - sinon.stub(ext.activeConnection, "executeQuery").resolves(["vw1", "vw2"]); - const result = await loadViews(); - assert.strictEqual(result[0], "vw1", "Should return the first view"); - sinon.restore(); - }); - - it("Should return sorted views (reverse order)", async () => { - ext.activeConnection = new LocalConnection("localhost:5001", "server1"); - sinon.stub(ext.activeConnection, "executeQuery").resolves(["vw1", "vw2"]); - const result = await loadViews(); - assert.strictEqual(result[0], "vw1", "Should return the first view"); - sinon.restore(); - }); -}); diff --git a/test/suite/services.test.ts b/test/suite/services.test.ts index ea205c54..814c6322 100644 --- a/test/suite/services.test.ts +++ b/test/suite/services.test.ts @@ -70,6 +70,9 @@ import { } from "../../src/models/connectionsModels"; import AuthSettings from "../../src/utils/secretStorage"; import * as coreUtils from "../../src/utils/core"; +import { KdbTreeService } from "../../src/services/kdbTreeService"; +import * as serverCommand from "../../src/commands/serverCommand"; +import { ServerObject } from "../../src/models/serverObject"; // eslint-disable-next-line @typescript-eslint/no-var-requires const codeFlow = require("../../src/services/kdbInsights/codeFlowLogin"); @@ -2160,3 +2163,256 @@ describe("MetaContentProvider", () => { ); }); }); + +describe("kdbTreeService", () => { + it("Should return empty ServerObjects array when none are loaded", async () => { + sinon.stub(serverCommand, "loadServerObjects").resolves(undefined); + const result = await KdbTreeService.loadNamespaces(""); + assert.strictEqual(result.length, 0, "Namespaces returned should be zero."); + sinon.restore(); + }); + + it("Should return a single server object that ia a namespace", async () => { + const testObject: ServerObject[] = [ + { + id: 1, + pid: 1, + name: "test", + fname: "test1", + typeNum: 1, + namespace: ".", + context: {}, + isNs: true, + }, + { + id: 2, + pid: 2, + name: "test", + fname: "test2", + typeNum: 1, + namespace: ".", + context: {}, + isNs: true, + }, + ]; + sinon.stub(serverCommand, "loadServerObjects").resolves(testObject); + const result = await KdbTreeService.loadNamespaces(); + assert.strictEqual( + result[0], + testObject[0], + "Single server object that is a namespace should be returned.", + ); + sinon.restore(); + }); + + it("Should return a single server object that ia a namespace (reverse sort)", async () => { + const testObject0: ServerObject[] = [ + { + id: 1, + pid: 1, + name: "test", + fname: "test", + typeNum: 1, + namespace: ".", + context: {}, + isNs: true, + }, + { + id: 0, + pid: 0, + name: "test", + fname: "test0", + typeNum: 1, + namespace: ".", + context: {}, + isNs: true, + }, + ]; + sinon.stub(serverCommand, "loadServerObjects").resolves(testObject0); + const result = await KdbTreeService.loadNamespaces(); + assert.strictEqual( + result[0], + testObject0[0], + "Single server object that is a namespace should be returned.", + ); + sinon.restore(); + }); + + it("Should return a single server object that ia a namespace", async () => { + const testObject2: ServerObject[] = [ + { + id: 1, + pid: 1, + name: "test", + fname: "test", + typeNum: 1, + namespace: ".", + context: {}, + isNs: true, + }, + ]; + sinon.stub(serverCommand, "loadServerObjects").resolves(testObject2); + const result = await KdbTreeService.loadNamespaces("."); + assert.strictEqual( + result[0], + testObject2[0], + `Single server object that is a namespace should be returned: ${JSON.stringify( + result, + )}`, + ); + sinon.restore(); + }); + + it("Should return empty ServerObjects array when none are loaded", async () => { + sinon.stub(serverCommand, "loadServerObjects").resolves(undefined); + const result = await KdbTreeService.loadDictionaries(""); + assert.strictEqual( + result.length, + 0, + "ServerObjects returned should be zero.", + ); + sinon.restore(); + }); + + it("Should return a single server object that ia a dictionary", async () => { + const testObject: ServerObject[] = [ + { + id: 1, + pid: 1, + name: "test", + fname: "test", + typeNum: 99, + namespace: ".", + context: {}, + isNs: false, + }, + ]; + sinon.stub(serverCommand, "loadServerObjects").resolves(testObject); + const result = await KdbTreeService.loadDictionaries("."); + assert.strictEqual( + result[0], + testObject[0], + "Single server object that is a namespace should be returned.", + ); + sinon.restore(); + }); + + it("Should return empty ServerObjects array when none are loaded", async () => { + sinon.stub(serverCommand, "loadServerObjects").resolves(undefined); + const result = await KdbTreeService.loadFunctions("."); + assert.strictEqual( + result.length, + 0, + "ServerObjects returned should be zero.", + ); + sinon.restore(); + }); + + it("Should return a single server object that ia a function", async () => { + const testObject: ServerObject[] = [ + { + id: 1, + pid: 1, + name: "test", + fname: "test", + typeNum: 100, + namespace: ".", + context: {}, + isNs: false, + }, + ]; + sinon.stub(serverCommand, "loadServerObjects").resolves(testObject); + const result = await KdbTreeService.loadFunctions("."); + assert.strictEqual( + result[0], + testObject[0], + "Single server object that is a namespace should be returned.", + ); + sinon.restore(); + }); + + it("Should return empty ServerObjects array when none are loaded", async () => { + sinon.stub(serverCommand, "loadServerObjects").resolves(undefined); + const result = await KdbTreeService.loadTables("."); + assert.strictEqual( + result.length, + 0, + "ServerObjects returned should be zero.", + ); + sinon.restore(); + }); + + it("Should return a single server object that ia a table", async () => { + const testObject: ServerObject[] = [ + { + id: 1, + pid: 1, + name: "test", + fname: "test", + typeNum: 98, + namespace: ".", + context: {}, + isNs: false, + }, + ]; + sinon.stub(serverCommand, "loadServerObjects").resolves(testObject); + const result = await KdbTreeService.loadTables("."); + assert.strictEqual( + result[0], + testObject[0], + "Single server object that is a namespace should be returned.", + ); + sinon.restore(); + }); + + it("Should return empty ServerObjects array when none are loaded", async () => { + sinon.stub(serverCommand, "loadServerObjects").resolves(undefined); + const result = await KdbTreeService.loadVariables("."); + assert.strictEqual( + result.length, + 0, + "ServerObjects returned should be zero.", + ); + sinon.restore(); + }); + + it("Should return a single server object that ia a variable", async () => { + const testObject: ServerObject[] = [ + { + id: 1, + pid: 1, + name: "test", + fname: "test", + typeNum: -7, + namespace: ".", + context: {}, + isNs: false, + }, + ]; + sinon.stub(serverCommand, "loadServerObjects").resolves(testObject); + sinon.stub(KdbTreeService, "loadViews").resolves([]); + const result = await KdbTreeService.loadVariables("."); + assert.strictEqual( + result[0], + testObject[0], + "Single server object that is a namespace should be returned.", + ); + sinon.restore(); + }); + + it("Should return sorted views", async () => { + ext.activeConnection = new LocalConnection("localhost:5001", "server1"); + sinon.stub(ext.activeConnection, "executeQuery").resolves(["vw1", "vw2"]); + const result = await KdbTreeService.loadViews(); + assert.strictEqual(result[0], "vw1", "Should return the first view"); + sinon.restore(); + }); + + it("Should return sorted views (reverse order)", async () => { + ext.activeConnection = new LocalConnection("localhost:5001", "server1"); + sinon.stub(ext.activeConnection, "executeQuery").resolves(["vw1", "vw2"]); + const result = await KdbTreeService.loadViews(); + assert.strictEqual(result[0], "vw1", "Should return the first view"); + sinon.restore(); + }); +}); From 117ea955279756270a3657fd4e7849fdb003814d Mon Sep 17 00:00:00 2001 From: Philip Carneiro Date: Mon, 21 Oct 2024 09:43:31 +0100 Subject: [PATCH 28/57] add version to insights connection tooltip --- src/services/kdbTreeProvider.ts | 24 +++++++++++++++++------- test/suite/commands.test.ts | 20 ++++++++++++++++---- 2 files changed, 33 insertions(+), 11 deletions(-) diff --git a/src/services/kdbTreeProvider.ts b/src/services/kdbTreeProvider.ts index 22b5fb17..dec144a8 100644 --- a/src/services/kdbTreeProvider.ts +++ b/src/services/kdbTreeProvider.ts @@ -600,13 +600,18 @@ export class InsightsNode extends TreeItem { public readonly details: InsightDetails, public readonly collapsibleState: TreeItemCollapsibleState, ) { + super(label, collapsibleState); + this.initializeNode(); + } + + async initializeNode() { // set context for root nodes - if (ext.kdbinsightsNodes.indexOf(label) === -1) { - const indexOriginalLabel = ext.kdbinsightsNodes.indexOf(label); + if (ext.kdbinsightsNodes.indexOf(this.label) === -1) { + const indexOriginalLabel = ext.kdbinsightsNodes.indexOf(this.label); if (indexOriginalLabel !== -1) { ext.kdbinsightsNodes.splice(indexOriginalLabel, 1); } - ext.kdbinsightsNodes.push(label); + ext.kdbinsightsNodes.push(this.label); commands.executeCommand( "setContext", "kdb.insightsNodes", @@ -614,18 +619,23 @@ export class InsightsNode extends TreeItem { ); } - super(label, collapsibleState); - this.tooltip = this.getTooltip(); + this.tooltip = await this.getTooltip(); this.description = this.getDescription(); } - getTooltip(): MarkdownString { + async getTooltip(): Promise { + const connService = new ConnectionManagementService(); const tooltipMd = new MarkdownString(); const title = `${this.label} ${getStatus(this.label)}`; - tooltipMd.appendMarkdown(`### ${title}\n`); + tooltipMd.appendMarkdown(`### ${title} \n`); tooltipMd.appendMarkdown( `${this.details.server.replace(/:\/\//g, "://")}`, ); + tooltipMd.appendMarkdown(`${this.details.alias} \n`); + const version = await connService.retrieveInsightsConnVersion(this.label); + if (version !== 0) { + tooltipMd.appendMarkdown(`\nVersion: ${version}`); + } return tooltipMd; } diff --git a/test/suite/commands.test.ts b/test/suite/commands.test.ts index 7db3db72..8354a982 100644 --- a/test/suite/commands.test.ts +++ b/test/suite/commands.test.ts @@ -1163,6 +1163,7 @@ describe("serverCommand", () => { let showInformationMessageStub: sinon.SinonStub; let getInsightsStub: sinon.SinonStub; let getServersStub: sinon.SinonStub; + let retrieveVersionStub: sinon.SinonStub; const kdbNodeImport1: KdbNode = { label: "local", details: { @@ -1194,13 +1195,16 @@ describe("serverCommand", () => { collapsibleState: vscode.TreeItemCollapsibleState.None, contextValue: "insightsNode", children: [], - getTooltip: function (): vscode.MarkdownString { - throw new Error("Function not implemented."); + getTooltip(): Promise { + return Promise.resolve(new vscode.MarkdownString("")); }, - getDescription: function (): string { - throw new Error("Function not implemented."); + getDescription(): string { + return ""; }, iconPath: undefined, + initializeNode(): Promise { + return Promise.resolve(); + }, }; beforeEach(() => { @@ -1216,6 +1220,10 @@ describe("serverCommand", () => { vscode.window, "showInformationMessage", ); + retrieveVersionStub = sinon.stub( + ConnectionManagementService.prototype, + "retrieveInsightsConnVersion", + ); ext.connectionsList.length = 0; }); @@ -1244,6 +1252,8 @@ describe("serverCommand", () => { }, }; + retrieveVersionStub.resolves("1.0"); + await serverCommand.addImportedConnections(importedConnections); sinon.assert.notCalled(addKdbConnectionStub); @@ -1319,6 +1329,8 @@ describe("serverCommand", () => { }, }; + retrieveVersionStub.resolves("0"); + showInformationMessageStub.returns("Overwrite"); await serverCommand.addImportedConnections(importedConnections); sinon.assert.notCalled(addInsightsConnectionStub); From aac8c625f3460215e90570f432220027797a265c Mon Sep 17 00:00:00 2001 From: Philip Carneiro Date: Wed, 23 Oct 2024 09:48:04 +0100 Subject: [PATCH 29/57] start to implement 1.11 solution --- src/classes/insightsConnection.ts | 13 +++++++++++-- src/models/scratchpad.ts | 10 ++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/classes/insightsConnection.ts b/src/classes/insightsConnection.ts index 56f932b4..0254200c 100644 --- a/src/classes/insightsConnection.ts +++ b/src/classes/insightsConnection.ts @@ -35,6 +35,7 @@ import { } from "../utils/core"; import { InsightsConfig, InsightsEndpoints } from "../models/config"; import { convertTimeToTimestamp } from "../utils/dataSource"; +import { ScratchpadRequestBody } from "../models/scratchpad"; export class InsightsConnection { public connected: boolean; @@ -417,14 +418,22 @@ export class InsightsConnection { if (username === undefined || username.preferred_username === "") { invalidUsernameJWT(this.connLabel); } - const body = { + const body: ScratchpadRequestBody = { expression: query, - isTableView, language: !isPython ? "q" : "python", context: context || ".", sampleFn: "first", sampleSize: 10000, }; + + if (this.insightsVersion) { + if (this.insightsVersion >= 1.11) { + body.returnFormat = isTableView ? "structuredText" : "text"; + } else { + body.isTableView = isTableView; + } + } + const headers = { Authorization: `Bearer ${token.accessToken}`, Username: username.preferred_username, diff --git a/src/models/scratchpad.ts b/src/models/scratchpad.ts index be2fb455..f90d864d 100644 --- a/src/models/scratchpad.ts +++ b/src/models/scratchpad.ts @@ -17,3 +17,13 @@ export interface ScratchpadFile { activeConnection?: string; code: string; } + +export interface ScratchpadRequestBody { + expression: string; + language: string; + context: string; + sampleFn: string; + sampleSize: number; + isTableView?: boolean; + returnFormat?: string; +} From 17053bb638c48babb3554accf38818d507d5af7d Mon Sep 17 00:00:00 2001 From: Philip Carneiro Date: Tue, 29 Oct 2024 10:38:12 +0000 Subject: [PATCH 30/57] migrate from vscode ui to sl --- src/models/connectionsModels.ts | 6 +- src/models/messages.ts | 7 +- src/panels/newConnection.ts | 19 +- .../components/kdbNewConnectionView.ts | 531 ++++++++++-------- src/webview/components/styles.ts | 9 + src/webview/styles/style.css | 1 - 6 files changed, 313 insertions(+), 260 deletions(-) diff --git a/src/models/connectionsModels.ts b/src/models/connectionsModels.ts index d200d5b8..c9db79bf 100644 --- a/src/models/connectionsModels.ts +++ b/src/models/connectionsModels.ts @@ -11,7 +11,11 @@ * specific language governing permissions and limitations under the License. */ -//TODO: start to migrate all connections models to here +export const enum ConnectionType { + BundledQ, + Kdb, + Insights, +} export enum ServerType { INSIGHTS, diff --git a/src/models/messages.ts b/src/models/messages.ts index 222ebe4f..751a5382 100644 --- a/src/models/messages.ts +++ b/src/models/messages.ts @@ -11,6 +11,7 @@ * specific language governing permissions and limitations under the License. */ +import { ConnectionType } from "./connectionsModels"; import { DataSourceFiles } from "./dataSource"; import { MetaObjectPayload } from "./meta"; @@ -44,12 +45,6 @@ export interface DataSourceMessage2 { dataSourceFile: DataSourceFiles; } -export const enum ConnectionType { - BundledQ, - Kdb, - Insights, -} - export interface EditConnectionMessage { connType: ConnectionType; serverName: string; diff --git a/src/panels/newConnection.ts b/src/panels/newConnection.ts index b20fb989..9d2a3670 100644 --- a/src/panels/newConnection.ts +++ b/src/panels/newConnection.ts @@ -16,8 +16,9 @@ import { getUri } from "../utils/getUri"; import { getNonce } from "../utils/getNonce"; import { ext } from "../extensionVariables"; import { InsightsNode, KdbNode } from "../services/kdbTreeProvider"; -import { ConnectionType, EditConnectionMessage } from "../models/messages"; +import { EditConnectionMessage } from "../models/messages"; import { retrieveConnLabelsNames } from "../utils/connLabel"; +import { ConnectionType } from "../models/connectionsModels"; export class NewConnectionPannel { public static currentPanel: NewConnectionPannel | undefined; @@ -176,17 +177,25 @@ export class NewConnectionPannel { webview: vscode.Webview, extensionUri: vscode.Uri, ) { - const webviewUri = getUri(webview, extensionUri, ["out", "webview.js"]); - const nonce = getNonce(); + const getResource = (resource: string) => + getUri(webview, extensionUri, ["out", resource]); return /* html */ ` - + New Connection - + + + diff --git a/src/webview/components/kdbNewConnectionView.ts b/src/webview/components/kdbNewConnectionView.ts index de8b957c..55e91abf 100644 --- a/src/webview/components/kdbNewConnectionView.ts +++ b/src/webview/components/kdbNewConnectionView.ts @@ -13,12 +13,13 @@ import { LitElement, html } from "lit"; import { customElement } from "lit/decorators.js"; - -import { kdbStyles, newConnectionStyles, vscodeStyles } from "./styles"; +import { live } from "lit/directives/live.js"; +import { kdbStyles, newConnectionStyles, shoelaceStyles } from "./styles"; import { EditConnectionMessage } from "../../models/messages"; import { repeat } from "lit/directives/repeat.js"; import { LabelColors, Labels } from "../../models/labels"; import { + ConnectionType, InsightDetails, ServerDetails, ServerType, @@ -26,7 +27,8 @@ import { @customElement("kdb-new-connection-view") export class KdbNewConnectionView extends LitElement { - static styles = [vscodeStyles, kdbStyles, newConnectionStyles]; + static styles = [shoelaceStyles, kdbStyles, newConnectionStyles]; + selectedTab = ConnectionType.BundledQ; lblColorsList: LabelColors[] = []; lblNamesList: Labels[] = []; newLblName = ""; @@ -178,33 +180,30 @@ export class KdbNewConnectionView extends LitElement { renderServerNameField(serverType: ServerType, isBundleQ?: boolean) { return isBundleQ - ? html`Server Name - ` + label="Server Name">` : serverType === ServerType.KDB - ? html`Server Name - ` - : html`` + : html`Server Name - `; + label="Server Name">`; } renderServerName(serverType: ServerType, isBundleQ?: boolean) { @@ -233,19 +232,22 @@ export class KdbNewConnectionView extends LitElement { renderPortNumber(isBundleQ?: boolean) { return html`
- Set port number + label="Set port number">
${this.renderPortNumberDesc(isBundleQ)} @@ -266,39 +268,39 @@ export class KdbNewConnectionView extends LitElement { return isBundleQ ? html`
- Define connection address + label="Define connection address">
-
+
${this.renderConnAddDesc(serverType)}
` : html`
- Define connection address + label="Define connection address">
-
+
${this.renderConnAddDesc(serverType)}
`; @@ -307,20 +309,19 @@ export class KdbNewConnectionView extends LitElement { renderRealm() { return html`
- Define Realm (optional) + label="Define Realm (optional)">
-
+
Specify the Keycloak realm for authentication. Use this field to connect to a specific realm as configured on your server.
@@ -337,19 +338,19 @@ export class KdbNewConnectionView extends LitElement { renderLblDropdownColorOptions() { return html` - No Color Selected + No Color Selected ${repeat( this.lblColorsList, (color) => color, (color) => - html` + html`
${color.name}
-
`, + `, )} `; } @@ -357,27 +358,26 @@ export class KdbNewConnectionView extends LitElement { renderLblsDropdown(pos: number) { return html`
- ${this.renderLblDropdownOptions(pos)} - - + -- - ++
`; @@ -385,23 +385,25 @@ export class KdbNewConnectionView extends LitElement { renderLblDropdownOptions(pos: number) { return html` - No Label Selected - ${repeat( - this.lblNamesList, - (lbl) => lbl.name, - (lbl) => html` - - -
- ${lbl.name} -
-
- `, - )} + + No Label Selected + ${repeat( + this.lblNamesList, + (lbl) => lbl.name, + (lbl) => html` + + +
+ ${lbl.name} +
+
+ `, + )} +
`; } @@ -412,48 +414,49 @@ export class KdbNewConnectionView extends LitElement { @@ -462,13 +465,14 @@ export class KdbNewConnectionView extends LitElement { renderNewLblBtn() { return html` - Create New Label - + `; } @@ -489,6 +493,124 @@ export class KdbNewConnectionView extends LitElement {
`; } + renderNewBundleqConnectionForm() { + return html` +
+
+
+ ${this.renderServerName(ServerType.KDB, true)} +
+
+
+
+ ${this.renderConnAddress(ServerType.KDB, true)} +
+
+
+
${this.renderPortNumber(true)}
+
+ ${this.renderConnectionLabelsSection()} + ${this.renderCreateConnectionBtn()} +
+ `; + } + + renderNewMyQConnectionForm() { + return html`
+
+
${this.renderServerName(ServerType.KDB)}
+
+
+
${this.renderConnAddress(ServerType.KDB)}
+
+
+
${this.renderPortNumber()}
+
+
Add Authentication if enabled
+
+
+
+ Username +
+
+ Password +
+
+ Add required authentication to get access to the server connection + if enabled. +
+
+
+
+
+
Optional: Enable TLS Encryption
+
+ Enable TLS Encryption on the kdb connection +
+
+
+ ${this.renderConnectionLabelsSection()} + ${this.renderCreateConnectionBtn()} +
`; + } + + renderNewInsightsConnectionForm() { + return html`
+
+
+ ${this.renderServerName(ServerType.INSIGHTS)} +
+
+
+
+ ${this.renderConnAddress(ServerType.INSIGHTS)} +
+
+
+
+
+ Advanced + ${this.renderRealm()} +
+ Accept insecure SSL certifcates +
+
+
+
+ ${this.renderConnectionLabelsSection()} + ${this.renderCreateConnectionBtn()} +
`; + } + renderNewConnectionForm() { return html`
@@ -525,160 +647,70 @@ export class KdbNewConnectionView extends LitElement {
- - Bundled q - My q - Insights connection - -
-
-
- ${this.renderServerName(ServerType.KDB, true)} -
-
-
-
- ${this.renderConnAddress(ServerType.KDB, true)} -
-
-
-
${this.renderPortNumber(true)}
-
- ${this.renderConnectionLabelsSection()} - ${this.renderCreateConnectionBtn()} -
-
- -
-
-
- ${this.renderServerName(ServerType.KDB)} -
-
-
-
- ${this.renderConnAddress(ServerType.KDB)} -
-
-
-
${this.renderPortNumber()}
-
-
- Add Authentication if enabled -
-
-
-
- Username -
-
- Password -
-
- Add required authentication to get access to the server - connection if enabled. -
-
-
-
-
-
- Optional: Enable TLS Encryption -
-
- Enable TLS Encryption on the kdb - connection -
-
-
- ${this.renderConnectionLabelsSection()} - ${this.renderCreateConnectionBtn()} -
-
- -
-
-
- ${this.renderServerName(ServerType.INSIGHTS)} -
-
-
-
- ${this.renderConnAddress(ServerType.INSIGHTS)} -
-
-
-
-
- Advanced - ${this.renderRealm()} -
- Accept insecure SSL certifcates -
-
-
-
- ${this.renderConnectionLabelsSection()} - ${this.renderCreateConnectionBtn()} -
-
-
+
+ + Bundle q + My q + + Insights connection + + + ${this.renderNewBundleqConnectionForm()} + + + ${this.renderNewMyQConnectionForm()} + + + ${this.renderNewInsightsConnectionForm()} + + +
-
`; } renderCreateConnectionBtn() { return html`
- Create ConnectionCreate Connection
`; } @@ -687,11 +719,13 @@ export class KdbNewConnectionView extends LitElement { if (!this.connectionData) { return html`
No connection found to be edited
`; } - this.isBundledQ = this.connectionData.connType === 0; + this.isBundledQ = this.connectionData.connType === ConnectionType.BundledQ; this.oldAlias = this.connectionData.serverName; const connTypeName = this.defineConnTypeName(this.connectionData.connType); this.serverType = - this.connectionData.connType === 2 ? ServerType.INSIGHTS : ServerType.KDB; + this.connectionData.connType === ConnectionType.Insights + ? ServerType.INSIGHTS + : ServerType.KDB; return html`
${this.isModalOpen ? this.renderNewLabelModal() : ""} @@ -711,8 +745,11 @@ export class KdbNewConnectionView extends LitElement {
${this.renderEditConnFields()}
${this.renderConnectionLabelsSection()}
- Update ConnectionUpdate Connection
@@ -721,9 +758,9 @@ export class KdbNewConnectionView extends LitElement { } defineConnTypeName(connType: number) { - if (connType === 0) { + if (connType === ConnectionType.BundledQ) { return "Bundled q"; - } else if (connType === 1) { + } else if (connType === ConnectionType.Kdb) { return "My q"; } else { return "Insights"; diff --git a/src/webview/components/styles.ts b/src/webview/components/styles.ts index ed6f0ca5..f340968d 100644 --- a/src/webview/components/styles.ts +++ b/src/webview/components/styles.ts @@ -235,6 +235,10 @@ export const newConnectionStyles = css` word-wrap: break-word; } + .tabs { + flex-grow: 1; + } + .option-description { color: var(--vscode-foreground); font-size: 12px; @@ -249,6 +253,11 @@ export const newConnectionStyles = css` .content-wrapper { display: flex; + flex-flow: row nowrap; + overflow-x: auto; + gap: var(--sl-spacing-medium); + padding-left: var(--sl-spacing-medium); + padding-right: var(--sl-spacing-medium); align-content: center; justify-content: center; font-family: var(--vscode-font-family); diff --git a/src/webview/styles/style.css b/src/webview/styles/style.css index d887b3e8..07194abc 100644 --- a/src/webview/styles/style.css +++ b/src/webview/styles/style.css @@ -48,7 +48,6 @@ body { } body { - overflow: hidden; box-sizing: border-box; font-family: var(--vscode-font-family); font-weight: var(--vscode-font-weight); From b5857c00071b6bec819f7814ca7389805b393c9c Mon Sep 17 00:00:00 2001 From: Philip Carneiro Date: Tue, 29 Oct 2024 11:05:09 +0000 Subject: [PATCH 31/57] fix coverage --- src/webview/components/kdbNewConnectionView.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/webview/components/kdbNewConnectionView.ts b/src/webview/components/kdbNewConnectionView.ts index 55e91abf..b28b4316 100644 --- a/src/webview/components/kdbNewConnectionView.ts +++ b/src/webview/components/kdbNewConnectionView.ts @@ -178,6 +178,7 @@ export class KdbNewConnectionView extends LitElement { >`; } + /* istanbul ignore next */ renderServerNameField(serverType: ServerType, isBundleQ?: boolean) { return isBundleQ ? html` @@ -433,7 +440,9 @@ export class KdbNewConnectionView extends LitElement { id="label-color" value="${live(this.newLblColorName)}" @sl-change="${(event: Event) => { + /* istanbul ignore next */ this.newLblColorName = (event.target as HTMLInputElement).value; + /* istanbul ignore next */ this.requestUpdate(); }}" class="dropdown" @@ -515,6 +524,7 @@ export class KdbNewConnectionView extends LitElement { `; } + /* istanbul ignore next */ renderNewMyQConnectionForm() { return html`
@@ -596,6 +606,7 @@ export class KdbNewConnectionView extends LitElement { Bundle qMy q @@ -676,6 +689,7 @@ export class KdbNewConnectionView extends LitElement { this.selectedTab === ConnectionType.Insights, )}" @click="${() => { + /* istanbul ignore next */ this.selectedTab = ConnectionType.Insights; }}" >Insights connection From 4ad7c3256c4067fef42eab2f0e19337ae2083365 Mon Sep 17 00:00:00 2001 From: Philip Carneiro Date: Tue, 29 Oct 2024 11:13:49 +0000 Subject: [PATCH 32/57] improve code --- src/webview/components/kdbNewConnectionView.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webview/components/kdbNewConnectionView.ts b/src/webview/components/kdbNewConnectionView.ts index b28b4316..1578e283 100644 --- a/src/webview/components/kdbNewConnectionView.ts +++ b/src/webview/components/kdbNewConnectionView.ts @@ -27,7 +27,7 @@ import { @customElement("kdb-new-connection-view") export class KdbNewConnectionView extends LitElement { - static styles = [shoelaceStyles, kdbStyles, newConnectionStyles]; + static readonly styles = [shoelaceStyles, kdbStyles, newConnectionStyles]; selectedTab = ConnectionType.BundledQ; lblColorsList: LabelColors[] = []; lblNamesList: Labels[] = []; From 58bf260b7505329b47471b88eb002464beb43b5a Mon Sep 17 00:00:00 2001 From: ecmel Date: Tue, 5 Nov 2024 08:47:13 +0300 Subject: [PATCH 33/57] run q file use contents --- CHANGELOG.md | 10 ++++++++++ src/extension.ts | 17 ++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e79a57f4..9ce54939 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,10 +6,20 @@ All notable changes to the **kdb VS Code extension** are documented in this file ### Enhancements +- Semantic highlighting for local variables +- Display version of Insights server connected + ### Fixes - Fix for results tab flickering , improving of UX - Fix for Issue [#382](https://github.com/KxSystems/kx-vscode/issues/382) +- Fix for run q file not using the current editor contents +- Fix for autocomplete for new and unsaved documents + +### Internal Improvements + +- Migrate to Shoelace Web Components +- Move server object logic away from models code # v1.8.0 diff --git a/src/extension.ts b/src/extension.ts index 05c51176..996be557 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -417,9 +417,20 @@ export async function activate(context: ExtensionContext) { await stopLocalProcess(viewItem); }, ), - commands.registerCommand("kdb.terminal.run", () => { - const filename = ext.activeTextEditor?.document.fileName; - if (filename) runQFileTerminal(filename); + commands.registerCommand("kdb.terminal.run", async () => { + if (ext.activeTextEditor) { + const uri = Uri.joinPath( + ext.context.globalStorageUri, + "kdb-vscode-repl.q", + ); + const text = ext.activeTextEditor.document.getText(); + try { + await workspace.fs.writeFile(uri, Buffer.from(text, "utf-8")); + runQFileTerminal(`"${uri.fsPath}"`); + } catch (error) { + kdbOutputLog(`Unable to write temp file: ${error}`, "ERROR"); + } + } }), commands.registerCommand("kdb.terminal.start", () => { if (env.QHOME) { From 9be7801d34f9e077af8a318d739e356e9f10e2c5 Mon Sep 17 00:00:00 2001 From: ecmel Date: Tue, 5 Nov 2024 08:58:23 +0300 Subject: [PATCH 34/57] semantic highlighting for locals --- server/src/qLangServer.ts | 54 +++++++++++++++++++++++++++++----- test/suite/qLangServer.test.ts | 12 ++++++++ 2 files changed, 59 insertions(+), 7 deletions(-) diff --git a/server/src/qLangServer.ts b/server/src/qLangServer.ts index ea13469f..bd6940e7 100644 --- a/server/src/qLangServer.ts +++ b/server/src/qLangServer.ts @@ -39,6 +39,8 @@ import { RenameParams, SelectionRange, SelectionRangeParams, + SemanticTokens, + SemanticTokensParams, ServerCapabilities, SymbolKind, TextDocumentChangeEvent, @@ -71,6 +73,7 @@ import { SemiColon, WhiteSpace, RCurly, + local, } from "./parser"; import { lint } from "./linter"; import { readFileSync } from "node:fs"; @@ -125,6 +128,9 @@ export default class QLangServer { this.connection.languages.callHierarchy.onOutgoingCalls( this.onOutgoingCallsCallHierarchy.bind(this), ); + this.connection.languages.semanticTokens.on( + this.onSemanticTokens.bind(this), + ); this.connection.onDidChangeConfiguration( this.onDidChangeConfiguration.bind(this), ); @@ -149,6 +155,13 @@ export default class QLangServer { completionProvider: { resolveProvider: false }, selectionRangeProvider: true, callHierarchyProvider: true, + semanticTokensProvider: { + full: true, + legend: { + tokenTypes: ["variable"], + tokenModifiers: ["declaration", "readonly"], + }, + }, }; } @@ -445,6 +458,33 @@ export default class QLangServer { : []; } + public onSemanticTokens({ + textDocument, + }: SemanticTokensParams): SemanticTokens { + const tokens = this.parse({ uri: textDocument.uri }); + const result = { data: [] } as SemanticTokens; + let range: Range = Range.create(0, 0, 0, 0); + let line = 0; + let character = 0; + let delta = 0; + for (const token of tokens) { + if (assignable(token) && local(token, tokens)) { + line = range.start.line; + character = range.start.character; + range = rangeFromToken(token); + delta = range.start.line - line; + result.data.push( + delta, + delta ? range.start.character : range.start.character - character, + token.image.length, + 0, + 3, + ); + } + } + return result; + } + /* istanbul ignore next */ public scan() { const folders = this.params.workspaceFolders; @@ -487,13 +527,13 @@ export default class QLangServer { private context({ uri, tokens }: Tokenized, all = true): Tokenized[] { if (all) { this.documents.all().forEach((document) => { - const path = fileURLToPath(document.uri); - if (path) { - this.cached.set( - pathToFileURL(path).toString(), - document.uri === uri ? tokens : parse(document.getText()), - ); - } + const path = document.uri.startsWith("file://") + ? fileURLToPath(document.uri) + : ""; + this.cached.set( + path ? pathToFileURL(path).toString() : document.uri, + document.uri === uri ? tokens : parse(document.getText()), + ); }); return Array.from(this.cached.entries(), (entry) => ({ uri: entry[0], diff --git a/test/suite/qLangServer.test.ts b/test/suite/qLangServer.test.ts index 5d4e14c9..8ddb95b7 100644 --- a/test/suite/qLangServer.test.ts +++ b/test/suite/qLangServer.test.ts @@ -73,6 +73,9 @@ describe("qLangServer", () => { onIncomingCalls() {}, onOutgoingCalls() {}, }, + semanticTokens: { + on() {}, + }, }, sendDiagnostics() {}, }); @@ -99,6 +102,7 @@ describe("qLangServer", () => { assert.ok(capabilities.completionProvider); assert.ok(capabilities.selectionRangeProvider); assert.ok(capabilities.callHierarchyProvider); + assert.ok(capabilities.semanticTokensProvider); }); }); @@ -376,6 +380,14 @@ describe("qLangServer", () => { }); }); + describe("onSemanticTokens", () => { + it("should find semantic local variables", () => { + const params = createDocument("a:{[b;c]d:1;b*c*d}"); + const result = server.onSemanticTokens(params); + assert.strictEqual(result.data.length, 30); + }); + }); + describe("setSettings", () => { let defaultSettings = { debug: false, From f992c871011094d2611a894d425065e3adffe6aa Mon Sep 17 00:00:00 2001 From: ecmel Date: Wed, 6 Nov 2024 09:38:08 +0300 Subject: [PATCH 35/57] add option to open a workspace for workspace command --- package.json | 9 +++---- src/extension.ts | 61 ++++++++++++++++++++++++++--------------------- src/utils/core.ts | 14 +++++++++++ 3 files changed, 51 insertions(+), 33 deletions(-) diff --git a/package.json b/package.json index b85707ee..704287df 100644 --- a/package.json +++ b/package.json @@ -234,8 +234,7 @@ "category": "KX", "command": "kdb.createDataSource", "title": "New Datasource...", - "icon": "$(add)", - "enablement": "workspaceFolderCount > 0" + "icon": "$(add)" }, { "category": "KX", @@ -251,8 +250,7 @@ "icon": { "dark": "./resources/dark/add-scratchpad.svg", "light": "./resources/light/add-scratchpad.svg" - }, - "enablement": "workspaceFolderCount > 0" + } }, { "category": "KX", @@ -261,8 +259,7 @@ "icon": { "dark": "./resources/dark/add-scratchpad-python.svg", "light": "./resources/light/add-scratchpad-python.svg" - }, - "enablement": "workspaceFolderCount > 0" + } }, { "category": "KX", diff --git a/src/extension.ts b/src/extension.ts index 996be557..1b973f3b 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -82,6 +82,7 @@ import { fixUnnamedAlias, getInsights, getServers, + hasWorkspaceOrShowOption, initializeLocalServers, kdbOutputLog, } from "./utils/core"; @@ -470,25 +471,27 @@ export async function activate(context: ExtensionContext) { commands.registerCommand( "kdb.createDataSource", async (item: FileTreeItem) => { - const uri = await addWorkspaceFile(item, "datasource", ".kdb.json"); - - if (uri) { - const edit = new WorkspaceEdit(); - - edit.replace( - uri, - new Range(0, 0, 1, 0), - JSON.stringify(createDefaultDataSourceFile(), null, 2), - ); - - workspace.applyEdit(edit); - - await commands.executeCommand( - "vscode.openWith", - uri, - DataSourceEditorProvider.viewType, - ); - await commands.executeCommand("workbench.action.files.save", uri); + if (hasWorkspaceOrShowOption()) { + const uri = await addWorkspaceFile(item, "datasource", ".kdb.json"); + + if (uri) { + const edit = new WorkspaceEdit(); + + edit.replace( + uri, + new Range(0, 0, 1, 0), + JSON.stringify(createDefaultDataSourceFile(), null, 2), + ); + + workspace.applyEdit(edit); + + await commands.executeCommand( + "vscode.openWith", + uri, + DataSourceEditorProvider.viewType, + ); + await commands.executeCommand("workbench.action.files.save", uri); + } } }, ), @@ -498,20 +501,24 @@ export async function activate(context: ExtensionContext) { commands.registerCommand( "kdb.createScratchpad", async (item: FileTreeItem) => { - const uri = await addWorkspaceFile(item, "workbook", ".kdb.q"); - if (uri) { - await window.showTextDocument(uri); - await commands.executeCommand("workbench.action.files.save", uri); + if (hasWorkspaceOrShowOption()) { + const uri = await addWorkspaceFile(item, "workbook", ".kdb.q"); + if (uri) { + await window.showTextDocument(uri); + await commands.executeCommand("workbench.action.files.save", uri); + } } }, ), commands.registerCommand( "kdb.createPythonScratchpad", async (item: FileTreeItem) => { - const uri = await addWorkspaceFile(item, "workbook", ".kdb.py"); - if (uri) { - await window.showTextDocument(uri); - await commands.executeCommand("workbench.action.files.save", uri); + if (hasWorkspaceOrShowOption()) { + const uri = await addWorkspaceFile(item, "workbook", ".kdb.py"); + if (uri) { + await window.showTextDocument(uri); + await commands.executeCommand("workbench.action.files.save", uri); + } } }, ), diff --git a/src/utils/core.ts b/src/utils/core.ts index 4fd98856..a8577ffb 100644 --- a/src/utils/core.ts +++ b/src/utils/core.ts @@ -635,6 +635,20 @@ export function formatTable(headers_: any, rows_: any, opts: any) { return result.join("\n"); } +export function hasWorkspaceOrShowOption() { + if (workspace.workspaceFolders && workspace.workspaceFolders.length > 0) { + return true; + } + window + .showWarningMessage("No workspace folder is opened.", "Open") + .then((res) => { + if (res === "Open") { + commands.executeCommand("workbench.action.files.openFolder"); + } + }); + return false; +} + // eslint-disable-next-line @typescript-eslint/no-explicit-any function reduce(xs: any, f: any, init: any) { if (xs.reduce) { From cf36fcbac89327620c501dcafb9292cfb3b74d36 Mon Sep 17 00:00:00 2001 From: ecmel Date: Wed, 6 Nov 2024 10:16:33 +0300 Subject: [PATCH 36/57] added test --- test/suite/utils.test.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/suite/utils.test.ts b/test/suite/utils.test.ts index f3fd47e8..28649d0a 100644 --- a/test/suite/utils.test.ts +++ b/test/suite/utils.test.ts @@ -347,6 +347,25 @@ describe("Utils", () => { showErrorMessageSpy.calledWithMatch(connLabel); }); }); + + describe("hasWorkspaceOrShowOption", () => { + afterEach(() => { + sinon.restore(); + }); + + it("should return true if a workspace folder is opened", () => { + sinon.stub(vscode.workspace, "workspaceFolders").get(() => [{}]); + const result = coreUtils.hasWorkspaceOrShowOption(); + assert.strictEqual(result, true); + }); + + it("should return false and display message if no workspace", () => { + const stub = sinon.stub(vscode.window, "showWarningMessage").resolves(); + const result = coreUtils.hasWorkspaceOrShowOption(); + assert.strictEqual(result, false); + assert.ok(stub.calledOnce); + }); + }); }); describe("dataSource", () => { From eb4cc56186bbe0b14154810512a214c96e378bb1 Mon Sep 17 00:00:00 2001 From: Philip Carneiro Date: Wed, 6 Nov 2024 16:31:21 +0000 Subject: [PATCH 37/57] add new response format for table res --- src/classes/insightsConnection.ts | 28 ++++-- src/commands/serverCommand.ts | 16 +++- src/extension.ts | 4 +- src/models/queryResult.ts | 11 +++ src/services/resultsPanelProvider.ts | 136 +++++++++++++++++++-------- 5 files changed, 143 insertions(+), 52 deletions(-) diff --git a/src/classes/insightsConnection.ts b/src/classes/insightsConnection.ts index 0254200c..796ceab1 100644 --- a/src/classes/insightsConnection.ts +++ b/src/classes/insightsConnection.ts @@ -36,6 +36,7 @@ import { import { InsightsConfig, InsightsEndpoints } from "../models/config"; import { convertTimeToTimestamp } from "../utils/dataSource"; import { ScratchpadRequestBody } from "../models/scratchpad"; +import { StructuredTextResults } from "../models/queryResult"; export class InsightsConnection { public connected: boolean; @@ -469,15 +470,24 @@ export class InsightsConnection { ); } else { kdbOutputLog(`[SCRATCHPAD] Status: ${response.status}`, "INFO"); - if (isTableView && !response.data.error) { - const buffer = new Uint8Array( - response.data.data.map((x: string) => parseInt(x, 16)), - ).buffer; - - response.data.data = handleWSResults(buffer); - response.data.data = handleScratchpadTableRes( - response.data.data, - ); + if (!response.data.error) { + if (isTableView) { + if (this.insightsVersion && this.insightsVersion >= 1.11) { + response.data = JSON.parse( + response.data.data, + ) as StructuredTextResults; + } else { + const buffer = new Uint8Array( + response.data.data.map((x: string) => parseInt(x, 16)), + ).buffer; + + response.data.data = handleWSResults(buffer); + response.data.data = handleScratchpadTableRes( + response.data.data, + ); + } + } + return response.data; } return response.data; } diff --git a/src/commands/serverCommand.ts b/src/commands/serverCommand.ts index 3faba8dc..2222f756 100644 --- a/src/commands/serverCommand.ts +++ b/src/commands/serverCommand.ts @@ -801,6 +801,7 @@ export async function executeQuery( const selectedConn = connMngService.retrieveConnectedConnection(connLabel); const isInsights = selectedConn instanceof InsightsConnection; + const connVersion = isInsights ? (selectedConn.insightsVersion ?? 0) : 0; if (query.length === 0) { queryConsole.appendQueryError( query, @@ -839,6 +840,7 @@ export async function executeQuery( isPython, isWorkbook, duration, + connVersion, ); } else { /* istanbul ignore next */ @@ -853,6 +855,7 @@ export async function executeQuery( isPython, duration, isFromConnTree, + connVersion, ); } else { writeQueryResultsToConsole( @@ -1146,8 +1149,14 @@ export function writeQueryResultsToView( isPython?: boolean, duration?: string, isFromConnTree?: boolean, + connVersion?: number, ): void { - commands.executeCommand("kdb.resultsPanel.update", result, isInsights); + commands.executeCommand( + "kdb.resultsPanel.update", + result, + isInsights, + connVersion, + ); if (!checkIfIsDatasource(type)) { addQueryHistory( query, @@ -1173,6 +1182,7 @@ export function writeScratchpadResult( isPython: boolean, isWorkbook: boolean, duration: string, + connVersion: number, ): void { const queryConsole = ExecutionConsole.start(); @@ -1192,7 +1202,7 @@ export function writeScratchpadResult( } else { if (ext.isResultsTabVisible) { writeQueryResultsToView( - result.data, + result, query, connLabel, executorName, @@ -1200,6 +1210,8 @@ export function writeScratchpadResult( isWorkbook ? "WORKBOOK" : "SCRATCHPAD", isPython, duration, + false, + connVersion, ); } else { writeQueryResultsToConsole( diff --git a/src/extension.ts b/src/extension.ts index 05c51176..0b709cda 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -204,8 +204,8 @@ export async function activate(context: ExtensionContext) { ), commands.registerCommand( "kdb.resultsPanel.update", - (results: string, isInsights: boolean) => { - ext.resultsViewProvider.updateResults(results, isInsights); + (results: any, isInsights: boolean, connVersion?: number) => { + ext.resultsViewProvider.updateResults(results, isInsights, connVersion); }, ), commands.registerCommand("kdb.resultsPanel.clear", () => { diff --git a/src/models/queryResult.ts b/src/models/queryResult.ts index 450b3c95..29946719 100644 --- a/src/models/queryResult.ts +++ b/src/models/queryResult.ts @@ -38,3 +38,14 @@ export enum QueryResultType { export const queryConstants = { error: "Error:", }; + +export interface StructuredTextColumns { + name: string; + type: string; + values: any[]; + order: any[]; +} +export interface StructuredTextResults { + columns: StructuredTextColumns[]; + count: number; +} diff --git a/src/services/resultsPanelProvider.ts b/src/services/resultsPanelProvider.ts index 145584c7..5f061179 100644 --- a/src/services/resultsPanelProvider.ts +++ b/src/services/resultsPanelProvider.ts @@ -24,6 +24,7 @@ import * as utils from "../utils/execution"; import { getNonce } from "../utils/getNonce"; import { getUri } from "../utils/getUri"; import { kdbOutputLog } from "../utils/core"; +import { StructuredTextResults } from "../models/queryResult"; export class KdbResultsViewProvider implements WebviewViewProvider { public static readonly viewType = "kdb-results"; @@ -41,6 +42,31 @@ export class KdbResultsViewProvider implements WebviewViewProvider { ext.isResultsTabVisible = true; } + public kdbToAgGridCellType(kdbType: string): string { + const typeMapping: { [key: string]: string } = { + boolean: "boolean", + guid: "text", + byte: "number", + short: "number", + int: "number", + long: "number", + real: "number", + float: "number", + char: "text", + symbol: "text", + string: "text", + date: "date", + time: "time", + timestamp: "datetime", + timespan: "text", + minute: "text", + second: "text", + month: "text", + }; + + return typeMapping[kdbType.toLowerCase()] || "text"; + } + /* istanbul ignore next */ public resolveWebviewView(webviewView: WebviewView) { this._view = webviewView; @@ -65,11 +91,15 @@ export class KdbResultsViewProvider implements WebviewViewProvider { }); } - public updateResults(queryResults: any, isInsights?: boolean) { + public updateResults( + queryResults: any, + isInsights?: boolean, + connVersion?: number, + ) { if (this._view) { this._view.show?.(true); this.isInsights = !!isInsights; - this.updateWebView(queryResults); + this.updateWebView(queryResults, connVersion); } } @@ -109,19 +139,6 @@ export class KdbResultsViewProvider implements WebviewViewProvider { utils.exportToCsv(workspaceUri); } - defineDataType(type: string): string { - const typeMapping: { [key: string]: string } = { - short: "number", - int: "number", - long: "number", - float: "number", - real: "number", - boolean: "boolean", - }; - - return typeMapping[type] || "text"; - } - generateCoumnDefs(results: any, isInsights: boolean): any { if (isInsights) { if (results.rows.length === 0) { @@ -129,7 +146,7 @@ export class KdbResultsViewProvider implements WebviewViewProvider { const sanitizedKey = this.sanitizeString(key); const type = results.meta[key]; const headerTooltip = type; - const cellDataType = this.defineDataType(type); + const cellDataType = this.kdbToAgGridCellType(type); return { field: sanitizedKey, headerName: sanitizedKey, @@ -142,7 +159,7 @@ export class KdbResultsViewProvider implements WebviewViewProvider { const sanitizedKey = this.sanitizeString(key); const type = results.meta[key]; const headerTooltip = type; - const cellDataType = this.defineDataType(type); + const cellDataType = this.kdbToAgGridCellType(type); return { field: sanitizedKey, headerName: sanitizedKey, @@ -171,33 +188,70 @@ export class KdbResultsViewProvider implements WebviewViewProvider { } } - convertToGrid(results: any, isInsights: boolean): any { - const queryResult = isInsights ? results.rows : results; + updatedExtractRowData(results: StructuredTextResults) { + const { columns, count } = results; + const rowData: { [key: string]: any }[] = Array.from( + { length: count }, + () => ({}), + ); + + columns.forEach((column) => { + const { name, values, order } = column; + order.forEach((pos, index) => { + rowData[index][name] = values[pos]; + }); + }); + + return rowData; + } + + updatedExtractColumnDefs(results: StructuredTextResults) { + const { columns } = results; + const columnDefs = columns.map((column) => { + const cellDataType = this.kdbToAgGridCellType(column.type); + const headerName = `${column.name}`; + return { + field: column.name, + headerName, + cellDataType, + cellRendererParams: { disabled: cellDataType === "boolean" }, + headerTooltip: column.type ? column.type : undefined, + }; + }); + + return columnDefs; + } + convertToGrid(results: any, isInsights: boolean, connVersion?: number): any { let rowData = []; let columnDefs = []; - - if (Array.isArray(queryResult[0])) { - if (typeof queryResult[0][0] === "object") { - rowData = queryResult[0].map((_, index) => { - const row: any = {}; - queryResult.forEach((subArray: any[]) => { - Object.assign(row, subArray[index]); + if (connVersion && connVersion >= 1.11) { + rowData = this.updatedExtractRowData(results); + columnDefs = this.updatedExtractColumnDefs(results); + } else { + const queryResult = isInsights ? results.rows : results; + if (Array.isArray(queryResult[0])) { + if (typeof queryResult[0][0] === "object") { + rowData = queryResult[0].map((_, index) => { + const row: any = {}; + queryResult.forEach((subArray: any[]) => { + Object.assign(row, subArray[index]); + }); + return row; }); - return row; - }); + } else { + rowData = queryResult.map((element: any) => ({ value: element })); + } } else { - rowData = queryResult.map((element: any) => ({ value: element })); + rowData = queryResult; } - } else { - rowData = queryResult; - } - if (isInsights) { - results.rows = rowData; - columnDefs = this.generateCoumnDefs(results, isInsights); - } else { - columnDefs = this.generateCoumnDefs(rowData, isInsights); + if (isInsights) { + results.rows = rowData; + columnDefs = this.generateCoumnDefs(results, isInsights); + } else { + columnDefs = this.generateCoumnDefs(rowData, isInsights); + } } if ( @@ -273,7 +327,7 @@ export class KdbResultsViewProvider implements WebviewViewProvider { : ""; } - public updateWebView(queryResult: any) { + public updateWebView(queryResult: any, connVersion?: number) { ext.resultPanelCSV = ""; this._results = queryResult; let result = ""; @@ -290,7 +344,11 @@ export class KdbResultsViewProvider implements WebviewViewProvider { .replace(/\n/g, "
")}

` : "

No results to show

"; } else if (queryResult) { - gridOptions = this.convertToGrid(queryResult, this.isInsights); + gridOptions = this.convertToGrid( + queryResult, + this.isInsights, + connVersion, + ); } if (gridOptions) { this._view.webview.postMessage({ From dfd696b27375e8af44ed6224c34a5d798551af1b Mon Sep 17 00:00:00 2001 From: Philip Carneiro Date: Wed, 6 Nov 2024 16:45:54 +0000 Subject: [PATCH 38/57] update tests --- test/suite/commands.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/suite/commands.test.ts b/test/suite/commands.test.ts index 8354a982..5c6324c6 100644 --- a/test/suite/commands.test.ts +++ b/test/suite/commands.test.ts @@ -1499,6 +1499,7 @@ describe("serverCommand", () => { false, true, "2", + 0, ); sinon.assert.notCalled(writeQueryResultsToViewStub); sinon.assert.notCalled(writeQueryResultsToConsoleStub); @@ -1515,6 +1516,7 @@ describe("serverCommand", () => { true, true, "2", + 0, ); sinon.assert.notCalled(writeQueryResultsToConsoleStub); sinon.assert.notCalled(queryConsoleErrorStub); @@ -1531,6 +1533,7 @@ describe("serverCommand", () => { true, true, "2", + 0, ); sinon.assert.notCalled(writeQueryResultsToViewStub); }); From ae4e77548ad93905437ad8a96214e36380a9df43 Mon Sep 17 00:00:00 2001 From: Philip Carneiro Date: Wed, 6 Nov 2024 17:38:03 +0000 Subject: [PATCH 39/57] add tests --- test/suite/panels.test.ts | 130 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) diff --git a/test/suite/panels.test.ts b/test/suite/panels.test.ts index 20d6196f..be89e762 100644 --- a/test/suite/panels.test.ts +++ b/test/suite/panels.test.ts @@ -24,6 +24,7 @@ import { InsightsNode, KdbNode } from "../../src/services/kdbTreeProvider"; import { TreeItemCollapsibleState } from "vscode"; import { NewConnectionPannel } from "../../src/panels/newConnection"; import { InsightsConnection } from "../../src/classes/insightsConnection"; +import { StructuredTextResults } from "../../src/models/queryResult"; describe("WebPanels", () => { describe("DataSourcesPanel", () => { @@ -67,6 +68,7 @@ describe("WebPanels", () => { describe("ResultsPanelProvider", () => { const uriTest: vscode.Uri = vscode.Uri.parse("test"); let resultsPanel: KdbResultsViewProvider; + let viewStub: any; const insightsNode = new InsightsNode( [], @@ -85,6 +87,10 @@ describe("WebPanels", () => { ); beforeEach(() => { resultsPanel = new KdbResultsViewProvider(uriTest); + viewStub = { + show: sinon.stub(), + }; + resultsPanel["_view"] = viewStub; }); describe("defineAgGridTheme()", () => { @@ -615,6 +621,130 @@ describe("WebPanels", () => { assert.ok(actualOutput.includes(expectedOutput)); }); }); + + describe("updateResults", () => { + it("should show the view and update the web view with insights", () => { + const queryResults = { data: "test" }; + const isInsights = true; + const connVersion = 1.11; + + const updateWebViewStub = sinon.stub(resultsPanel, "updateWebView"); + + resultsPanel.updateResults(queryResults, isInsights, connVersion); + + assert.equal(viewStub.show.calledOnceWith(true), true); + assert.equal(resultsPanel.isInsights, true); + assert.equal( + updateWebViewStub.calledOnceWith(queryResults, connVersion), + true, + ); + }); + + it("should show the view and update the web view without insights", () => { + const queryResults = { data: "test" }; + const isInsights = false; + const connVersion = 1.11; + + const updateWebViewStub = sinon.stub(resultsPanel, "updateWebView"); + + resultsPanel.updateResults(queryResults, isInsights, connVersion); + + assert.equal(viewStub.show.calledOnceWith(true), true); + assert.equal(resultsPanel.isInsights, false); + assert.equal( + updateWebViewStub.calledOnceWith(queryResults, connVersion), + true, + ); + }); + + it("should not update the web view if _view is not defined", () => { + resultsPanel["_view"] = undefined; + const queryResults = { data: "test" }; + const isInsights = true; + const connVersion = 1.11; + + const updateWebViewStub = sinon.stub(resultsPanel, "updateWebView"); + + resultsPanel.updateResults(queryResults, isInsights, connVersion); + + assert.equal(viewStub.show.called, false); + assert.equal(updateWebViewStub.called, false); + }); + }); + describe("exportToCsv", () => { + it("should show an error message if there are no results to export", () => { + sinon.stub(ext, "resultPanelCSV").value(""); + const showErrorMessageStub = sinon.stub( + vscode.window, + "showErrorMessage", + ); + + resultsPanel.exportToCsv(); + + assert.equal( + showErrorMessageStub.calledOnceWith("No results to export"), + true, + ); + }); + + it("should export to CSV if there are results and a folder is open", () => { + sinon.stub(ext, "resultPanelCSV").value("some,csv,data"); + const workspaceUri = vscode.Uri.parse("file:///path/to/workspace"); + sinon + .stub(vscode.workspace, "workspaceFolders") + .value([{ uri: workspaceUri }]); + const exportToCsvStub = sinon.stub(utils, "exportToCsv"); + + resultsPanel.exportToCsv(); + + assert.equal(exportToCsvStub.calledOnceWith(workspaceUri), true); + }); + }); + + describe("updatedExtractRowData", () => { + it("should correctly extract row data from structured text results", () => { + const results: StructuredTextResults = { + columns: [ + { + name: "date", + type: "dates", + order: [0, 1, 2], + values: ["2024.10.21", "2024.10.22", "2024.10.23"], + }, + { + name: "instance", + type: "symbols", + order: [0, 1, 2], + values: ["`inst1", "`inst2", "`inst3"], + }, + ], + count: 3, + }; + + const expectedRowData = [ + { date: "2024.10.21", instance: "`inst1" }, + { date: "2024.10.22", instance: "`inst2" }, + { date: "2024.10.23", instance: "`inst3" }, + ]; + + const rowData = resultsPanel.updatedExtractRowData(results); + + assert.deepEqual(rowData, expectedRowData); + }); + + it("should handle empty results correctly", () => { + const results: StructuredTextResults = { + columns: [], + count: 0, + }; + + const expectedRowData: any[] = []; + + const rowData = resultsPanel.updatedExtractRowData(results); + + assert.deepEqual(rowData, expectedRowData); + }); + }); }); describe("kdbNewConnectionPanel", () => { From 1d02abcff07c8fe953a92ee7d71b59197944ae73 Mon Sep 17 00:00:00 2001 From: Philip Carneiro Date: Wed, 6 Nov 2024 17:43:25 +0000 Subject: [PATCH 40/57] add more tests --- test/suite/panels.test.ts | 56 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/test/suite/panels.test.ts b/test/suite/panels.test.ts index be89e762..684a2e57 100644 --- a/test/suite/panels.test.ts +++ b/test/suite/panels.test.ts @@ -745,6 +745,62 @@ describe("WebPanels", () => { assert.deepEqual(rowData, expectedRowData); }); }); + + describe("updatedExtractColumnDefs", () => { + it("should correctly extract column definitions from structured text results", () => { + const results: StructuredTextResults = { + columns: [ + { + name: "date", + type: "dates", + order: [0, 1, 2], + values: ["2024.10.21", "2024.10.22", "2024.10.23"], + }, + { + name: "instance", + type: "symbols", + order: [0, 1, 2], + values: ["`inst1", "`inst2", "`inst3"], + }, + ], + count: 3, + }; + + const expectedColumnDefs = [ + { + field: "date", + headerName: "date", + cellDataType: "text", + cellRendererParams: { disabled: false }, + headerTooltip: "dates", + }, + { + field: "instance", + headerName: "instance", + cellDataType: "text", + cellRendererParams: { disabled: false }, + headerTooltip: "symbols", + }, + ]; + + const columnDefs = resultsPanel.updatedExtractColumnDefs(results); + + assert.deepEqual(columnDefs, expectedColumnDefs); + }); + + it("should handle empty columns correctly", () => { + const results: StructuredTextResults = { + columns: [], + count: 0, + }; + + const expectedColumnDefs: any[] = []; + + const columnDefs = resultsPanel.updatedExtractColumnDefs(results); + + assert.deepEqual(columnDefs, expectedColumnDefs); + }); + }); }); describe("kdbNewConnectionPanel", () => { From 4c7010d609bd5374548a514d57568a1d7337c34b Mon Sep 17 00:00:00 2001 From: ecmel Date: Thu, 7 Nov 2024 10:12:50 +0300 Subject: [PATCH 41/57] more coverage and fixes --- server/src/parser/parser.ts | 8 ++------ server/src/parser/utils.ts | 7 +++++++ server/src/qLangServer.ts | 2 +- test/suite/qLangServer.test.ts | 14 +++++++++++++- 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/server/src/parser/parser.ts b/server/src/parser/parser.ts index ac4bc60f..566ba6e1 100644 --- a/server/src/parser/parser.ts +++ b/server/src/parser/parser.ts @@ -88,9 +88,8 @@ function assignment(state: State, token: Token) { if (top?.tokenType === Colon || top?.tokenType === DoubleColon) { token.assignment = [top]; stack.pop(); - top = stack.shift(); - if (top) { - token.assignment.push(top); + if (stack.length > 0) { + token.assignment.push(...stack); clear(stack); } } @@ -182,9 +181,6 @@ function expression(state: State, tokens: Token[]) { break; } break; - case RParen: - case LParen: - break; default: stack.push(token); break; diff --git a/server/src/parser/utils.ts b/server/src/parser/utils.ts index 9b78b8cf..1b9cc7da 100644 --- a/server/src/parser/utils.ts +++ b/server/src/parser/utils.ts @@ -122,6 +122,9 @@ export function amended(token: Token) { } export function local(token: Token, tokens: Token[]) { + if (qualified(token)) { + return false; + } const scope = inLambda(token); if (scope && !scope.tangled) { if (token.image === "x" || token.image === "y" || token.image === "z") { @@ -147,6 +150,10 @@ export function ordered(token: Token, next: Token) { return (token.order && next.order && next.order > token.order) || false; } +export function callable(token: Token) { + return token.assignment && token.assignment[1]?.tokenType === LCurly; +} + export function assigned(token: Token) { return token.assignment && token.assignment[1]; } diff --git a/server/src/qLangServer.ts b/server/src/qLangServer.ts index bd6940e7..016e316e 100644 --- a/server/src/qLangServer.ts +++ b/server/src/qLangServer.ts @@ -167,7 +167,7 @@ export default class QLangServer { public setSettings(settings: LSPAny) { this.settings = { - debug: settings.debug || false, + debug: settings.debug_parser || false, linting: settings.linting || false, refactoring: settings.refactoring || "Workspace", }; diff --git a/test/suite/qLangServer.test.ts b/test/suite/qLangServer.test.ts index 8ddb95b7..98bd75d6 100644 --- a/test/suite/qLangServer.test.ts +++ b/test/suite/qLangServer.test.ts @@ -381,11 +381,23 @@ describe("qLangServer", () => { }); describe("onSemanticTokens", () => { - it("should find semantic local variables", () => { + it("should tokenize local variables", () => { const params = createDocument("a:{[b;c]d:1;b*c*d}"); const result = server.onSemanticTokens(params); assert.strictEqual(result.data.length, 30); }); + + it("should ignore qualified variables", () => { + const params = createDocument("a:{.ns.b:1;.ns.b}"); + const result = server.onSemanticTokens(params); + assert.strictEqual(result.data.length, 0); + }); + + it("should detect empty lists", () => { + const params = createDocument("a:{b:();b}"); + const result = server.onSemanticTokens(params); + assert.strictEqual(result.data.length, 10); + }); }); describe("setSettings", () => { From 3079f5d3b2d82c1ec545f964a3d9cbea3e581964 Mon Sep 17 00:00:00 2001 From: ecmel Date: Thu, 7 Nov 2024 10:35:45 +0300 Subject: [PATCH 42/57] remove unused function --- CHANGELOG.md | 3 ++- server/src/parser/utils.ts | 4 ---- src/extension.ts | 6 +++--- src/utils/core.ts | 7 +++++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ce54939..dea4c5cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ All notable changes to the **kdb VS Code extension** are documented in this file ### Enhancements - Semantic highlighting for local variables -- Display version of Insights server connected +- Display version of connected Insights server ### Fixes @@ -15,6 +15,7 @@ All notable changes to the **kdb VS Code extension** are documented in this file - Fix for Issue [#382](https://github.com/KxSystems/kx-vscode/issues/382) - Fix for run q file not using the current editor contents - Fix for autocomplete for new and unsaved documents +- Fix for results tab ### Internal Improvements diff --git a/server/src/parser/utils.ts b/server/src/parser/utils.ts index 1b9cc7da..fb2569e1 100644 --- a/server/src/parser/utils.ts +++ b/server/src/parser/utils.ts @@ -150,10 +150,6 @@ export function ordered(token: Token, next: Token) { return (token.order && next.order && next.order > token.order) || false; } -export function callable(token: Token) { - return token.assignment && token.assignment[1]?.tokenType === LCurly; -} - export function assigned(token: Token) { return token.assignment && token.assignment[1]; } diff --git a/src/extension.ts b/src/extension.ts index 1b973f3b..7b19412f 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -471,7 +471,7 @@ export async function activate(context: ExtensionContext) { commands.registerCommand( "kdb.createDataSource", async (item: FileTreeItem) => { - if (hasWorkspaceOrShowOption()) { + if (hasWorkspaceOrShowOption("adding datasources")) { const uri = await addWorkspaceFile(item, "datasource", ".kdb.json"); if (uri) { @@ -501,7 +501,7 @@ export async function activate(context: ExtensionContext) { commands.registerCommand( "kdb.createScratchpad", async (item: FileTreeItem) => { - if (hasWorkspaceOrShowOption()) { + if (hasWorkspaceOrShowOption("adding workbooks")) { const uri = await addWorkspaceFile(item, "workbook", ".kdb.q"); if (uri) { await window.showTextDocument(uri); @@ -513,7 +513,7 @@ export async function activate(context: ExtensionContext) { commands.registerCommand( "kdb.createPythonScratchpad", async (item: FileTreeItem) => { - if (hasWorkspaceOrShowOption()) { + if (hasWorkspaceOrShowOption("adding workbooks")) { const uri = await addWorkspaceFile(item, "workbook", ".kdb.py"); if (uri) { await window.showTextDocument(uri); diff --git a/src/utils/core.ts b/src/utils/core.ts index a8577ffb..7584fdb6 100644 --- a/src/utils/core.ts +++ b/src/utils/core.ts @@ -635,12 +635,15 @@ export function formatTable(headers_: any, rows_: any, opts: any) { return result.join("\n"); } -export function hasWorkspaceOrShowOption() { +export function hasWorkspaceOrShowOption(action: string) { if (workspace.workspaceFolders && workspace.workspaceFolders.length > 0) { return true; } window - .showWarningMessage("No workspace folder is opened.", "Open") + .showWarningMessage( + `No workspace folder is open. Please open a folder to enable ${action}.`, + "Open", + ) .then((res) => { if (res === "Open") { commands.executeCommand("workbench.action.files.openFolder"); From cfd206397719f80b03deb2d5991e366373a0c7b5 Mon Sep 17 00:00:00 2001 From: ecmel Date: Thu, 7 Nov 2024 10:38:00 +0300 Subject: [PATCH 43/57] fixed test --- test/suite/utils.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/suite/utils.test.ts b/test/suite/utils.test.ts index 28649d0a..e63442c7 100644 --- a/test/suite/utils.test.ts +++ b/test/suite/utils.test.ts @@ -355,13 +355,13 @@ describe("Utils", () => { it("should return true if a workspace folder is opened", () => { sinon.stub(vscode.workspace, "workspaceFolders").get(() => [{}]); - const result = coreUtils.hasWorkspaceOrShowOption(); + const result = coreUtils.hasWorkspaceOrShowOption("Test"); assert.strictEqual(result, true); }); it("should return false and display message if no workspace", () => { const stub = sinon.stub(vscode.window, "showWarningMessage").resolves(); - const result = coreUtils.hasWorkspaceOrShowOption(); + const result = coreUtils.hasWorkspaceOrShowOption("Test"); assert.strictEqual(result, false); assert.ok(stub.calledOnce); }); From f635b5b7ba765358e17cc539024a7067b1abe3e2 Mon Sep 17 00:00:00 2001 From: ecmel Date: Thu, 7 Nov 2024 13:16:00 +0300 Subject: [PATCH 44/57] update changelog --- CHANGELOG.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dea4c5cf..98755f89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,21 +6,20 @@ All notable changes to the **kdb VS Code extension** are documented in this file ### Enhancements -- Semantic highlighting for local variables -- Display version of connected Insights server +- Highlight local variables semantically +- Display the version of the connected Insights server ### Fixes -- Fix for results tab flickering , improving of UX -- Fix for Issue [#382](https://github.com/KxSystems/kx-vscode/issues/382) -- Fix for run q file not using the current editor contents -- Fix for autocomplete for new and unsaved documents -- Fix for results tab +- Fixed flickering issue in the results tab, improving the UX +- Fixed Issue [#382](https://github.com/KxSystems/kx-vscode/issues/382) +- Fixed the run q file not using the current editor contents +- Fixed the autocomplete functionality for new and unsaved documents ### Internal Improvements - Migrate to Shoelace Web Components -- Move server object logic away from models code +- Move server object logic to separate it from model's code # v1.8.0 From 9e4d57fa7f3d308d83b3b5e9cd2180c05bd26b3b Mon Sep 17 00:00:00 2001 From: Philip Carneiro Date: Thu, 7 Nov 2024 10:52:23 +0000 Subject: [PATCH 45/57] fix issue with new connections --- src/webview/components/kdbNewConnectionView.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/webview/components/kdbNewConnectionView.ts b/src/webview/components/kdbNewConnectionView.ts index 1578e283..b1e278f1 100644 --- a/src/webview/components/kdbNewConnectionView.ts +++ b/src/webview/components/kdbNewConnectionView.ts @@ -669,6 +669,8 @@ export class KdbNewConnectionView extends LitElement { @click="${() => { /* istanbul ignore next */ this.selectedTab = ConnectionType.BundledQ; + this.serverType = ServerType.KDB; + this.isBundledQ = true; }}" >Bundle q @@ -678,6 +680,8 @@ export class KdbNewConnectionView extends LitElement { ?active="${live(this.selectedTab === ConnectionType.Kdb)}" @click="${() => { /* istanbul ignore next */ + this.isBundledQ = false; + this.serverType = ServerType.KDB; this.selectedTab = ConnectionType.Kdb; }}" >My q @@ -690,6 +694,8 @@ export class KdbNewConnectionView extends LitElement { )}" @click="${() => { /* istanbul ignore next */ + this.isBundledQ = false; + this.serverType = ServerType.INSIGHTS; this.selectedTab = ConnectionType.Insights; }}" >Insights connection From 5cb04a977f02828d735df08239ef7b209f49633f Mon Sep 17 00:00:00 2001 From: ecmel Date: Thu, 7 Nov 2024 13:59:34 +0300 Subject: [PATCH 46/57] add fix --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98755f89..3f015c52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ All notable changes to the **kdb VS Code extension** are documented in this file - Fixed Issue [#382](https://github.com/KxSystems/kx-vscode/issues/382) - Fixed the run q file not using the current editor contents - Fixed the autocomplete functionality for new and unsaved documents +- Fixed issues with results tab format when query insights connections version 1.11 or newer ### Internal Improvements From 491863e9f03952401e087ed05005b26f4de2d071 Mon Sep 17 00:00:00 2001 From: ecmel Date: Thu, 7 Nov 2024 15:29:16 +0300 Subject: [PATCH 47/57] capitalize insights --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f015c52..e4e96990 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ All notable changes to the **kdb VS Code extension** are documented in this file - Fixed Issue [#382](https://github.com/KxSystems/kx-vscode/issues/382) - Fixed the run q file not using the current editor contents - Fixed the autocomplete functionality for new and unsaved documents -- Fixed issues with results tab format when query insights connections version 1.11 or newer +- Fixed issues with results tab format when querying Insights connections version 1.11 or newer ### Internal Improvements From 058a04d6a065bdb71a246025a1ab9014758373c5 Mon Sep 17 00:00:00 2001 From: ecmel Date: Thu, 7 Nov 2024 17:57:29 +0300 Subject: [PATCH 48/57] added semantic highlighting --- README.md | 4 ++++ img/semantic.png | Bin 0 -> 35044 bytes 2 files changed, 4 insertions(+) create mode 100644 img/semantic.png diff --git a/README.md b/README.md index 34bc95dc..9e41bb0e 100644 --- a/README.md +++ b/README.md @@ -388,6 +388,10 @@ The extension provides keyword syntax highlighting, comments and linting help. Linting can be enabled by checking **Enable linting for q and quke files** in [extension settings](#settings). +Semantic highlighting is provided for local variables: + +![Semantic](https://github.com/KxSystems/kx-vscode/blob/main/img/semantic.png?raw=true) + ### Code navigation While developing q scripts you can: diff --git a/img/semantic.png b/img/semantic.png new file mode 100644 index 0000000000000000000000000000000000000000..770b681707fca61f6276119d888ac7cdf97af155 GIT binary patch literal 35044 zcma&NWmp|c6D^Eug1fs*aCetr!8N!$2^u5>cXxM!ySqCfKyY_=hdU(aoV?$6|6HDD zGqY#9x~r?Zt9z}g9i$*9@fHpT4g>_`t(2sw5(o$w6$l8ZHw+Z;B%nAc1q9@coVkdI zf|Q5|k%EJ*iMf?A2#91*oEo$`>KsPf2PI+%m~SNHmlT1LutenFFa+I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Ki zM}Q833adTixwwP@kZ9D7Xo7zWB+_I`kd>jt?$PQqi|7GpKzhUK<|IGs2NE D^_{`# literal 0 HcmV?d00001 From 9e3e880ba72e3b4936445b6ede365d643815f400 Mon Sep 17 00:00:00 2001 From: Philip Carneiro Date: Tue, 12 Nov 2024 12:56:29 +0000 Subject: [PATCH 49/57] update packages --- package-lock.json | 879 +++++++++++++++++++++++++++++++++------------- package.json | 30 +- 2 files changed, 654 insertions(+), 255 deletions(-) diff --git a/package-lock.json b/package-lock.json index 89f70656..3ba0c66d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@vscode/webview-ui-toolkit": "^1.4.0", "@windozer/node-q": "^2.6.0", - "ag-grid-community": "^32.1.0", + "ag-grid-community": "^32.3.2", "axios": "^1.7.7", "chevrotain": "^10.5.0", "extract-zip": "^2.0.1", @@ -19,7 +19,7 @@ "jwt-decode": "^4.0.0", "moment": "^2.30.1", "moment-duration-format": "^2.3.2", - "moment-timezone": "^0.5.45", + "moment-timezone": "^0.5.46", "node-fetch": "^2.7.0", "node-q": "^2.7.0", "pick-port": "^2.0.1", @@ -29,40 +29,38 @@ "vscode-uri": "^3.0.8" }, "devDependencies": { - "@shoelace-style/shoelace": "^2.17.1", - "@types/extract-zip": "^2.0.1", + "@shoelace-style/shoelace": "^2.18.0", "@types/fs-extra": "^11.0.4", "@types/glob": "^8.1.0", "@types/graceful-fs": "^4.1.9", "@types/istanbul-lib-coverage": "^2.0.6", "@types/istanbul-reports": "^3.0.4", - "@types/jwt-decode": "^3.1.0", - "@types/mocha": "^10.0.6", - "@types/node": "^18.19.33", - "@types/node-fetch": "^2.6.11", + "@types/mocha": "^10.0.9", + "@types/node": "^22.9.0", + "@types/node-fetch": "^2.6.12", "@types/semver": "^7.5.8", "@types/sinon": "^17.0.3", "@types/vscode": "^1.86.0", "@types/vscode-webview": "^1.57.5", - "@typescript-eslint/eslint-plugin": "^8.4.0", - "@typescript-eslint/parser": "^8.4.0", - "@vscode/test-electron": "^2.3.10", + "@typescript-eslint/eslint-plugin": "^8.14.0", + "@typescript-eslint/parser": "^8.14.0", + "@vscode/test-electron": "^2.4.1", "esbuild": "^0.23.1", - "eslint": "^9.10.0", + "eslint": "^9.14.0", "eslint-plugin-header": "^3.1.1", "eslint-plugin-license-header": "^0.6.1", - "eslint-plugin-unused-imports": "^4.1.3", + "eslint-plugin-unused-imports": "^4.1.4", "glob": "^8.1.0", "istanbul-lib-coverage": "^3.2.2", "istanbul-lib-instrument": "^3.3.0", "istanbul-lib-report": "^2.0.8", "istanbul-lib-source-maps": "^3.0.6", "istanbul-reports": "^3.1.7", - "lit": "^3.2.0", - "mocha": "^10.4.0", + "lit": "^3.2.1", + "mocha": "^10.8.2", "mocha-junit-reporter": "^2.2.1", "mocha-multi-reporters": "^1.5.1", - "mock-fs": "^5.2.0", + "mock-fs": "^5.4.1", "prettier": "^3.3.3", "rimraf": "^6.0.1", "sinon": "^17.0.1", @@ -787,9 +785,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", - "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", "dev": true, "license": "MIT", "engines": { @@ -835,6 +833,16 @@ "node": "*" } }, + "node_modules/@eslint/core": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.7.0.tgz", + "integrity": "sha512-xp5Jirz5DyPYlPiKat8jaq0EmYvDXKKpzTbxXMpT9eqlRJkRKIz9AGMdlvYjih+im+QlhWrpvVjl8IPC/lHlUw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@eslint/eslintrc": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", @@ -884,9 +892,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.10.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.10.0.tgz", - "integrity": "sha512-fuXtbiP5GWIn8Fz+LWoOMVf/Jxm+aajZYkhi6CuEm4SxymFM+eUWzbO9qXT+L0iCkL5+KGYMCSGxo686H19S1g==", + "version": "9.14.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.14.0.tgz", + "integrity": "sha512-pFoEtFWCPyDOl+C6Ift+wC7Ro89otjigCf5vcuWqWgqNSQbRrpjSvdeE6ofLz4dHmyxD5f7gIdGT4+p36L6Twg==", "dev": true, "license": "MIT", "engines": { @@ -904,9 +912,9 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.1.0.tgz", - "integrity": "sha512-autAXT203ixhqei9xt+qkYOvY8l6LAFIdT2UXc/RPNeUVfqRF1BV94GTJyVPFKT8nFM6MyVJhjLj9E8JWvf5zQ==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.2.tgz", + "integrity": "sha512-CXtq5nR4Su+2I47WPOlWud98Y5Lv8Kyxp2ukhgFx/eW6Blm18VXJO5WuQylPugRo8nbluoi6GvvxBLqHcvqUUw==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -941,6 +949,44 @@ "integrity": "sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig==", "dev": true }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -955,9 +1001,9 @@ } }, "node_modules/@humanwhocodes/retry": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.0.tgz", - "integrity": "sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz", + "integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -1249,10 +1295,11 @@ "dev": true }, "node_modules/@shoelace-style/shoelace": { - "version": "2.17.1", - "resolved": "https://registry.npmjs.org/@shoelace-style/shoelace/-/shoelace-2.17.1.tgz", - "integrity": "sha512-fB9+bPHLg5zVwPbBKEqY3ghyttkJq9RuUzFMTZKweKrNKKDMUACtI8DlMYUqNwpdZMJhf7a0xeak6vFVBSxcbQ==", + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/@shoelace-style/shoelace/-/shoelace-2.18.0.tgz", + "integrity": "sha512-uzpL0+8Qm8aE2ArcXBcKHkaPc6l7ymuVaN6xJM0yd2o3talcoXpuP+gRBsgggSZKuuJEa+JkEuLDdzzFnE/+jw==", "dev": true, + "license": "MIT", "dependencies": { "@ctrl/tinycolor": "^4.0.2", "@floating-ui/dom": "^1.5.3", @@ -1324,15 +1371,12 @@ "node": ">= 6" } }, - "node_modules/@types/extract-zip": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/extract-zip/-/extract-zip-2.0.1.tgz", - "integrity": "sha512-Rvy84OCUrbGquSMH2a2ifbHB3CEu95LguiihLf0gc4uFaZ7psB6Khq+s8a7rsPGztSlxihu1om7+ZVxBh8iJcg==", - "deprecated": "This is a stub types definition. extract-zip provides its own type definitions, so you do not need this installed.", + "node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", "dev": true, - "dependencies": { - "extract-zip": "*" - } + "license": "MIT" }, "node_modules/@types/fs-extra": { "version": "11.0.4", @@ -1387,6 +1431,13 @@ "@types/istanbul-lib-report": "*" } }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/jsonfile": { "version": "6.1.4", "resolved": "https://registry.npmjs.org/@types/jsonfile/-/jsonfile-6.1.4.tgz", @@ -1396,16 +1447,6 @@ "@types/node": "*" } }, - "node_modules/@types/jwt-decode": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@types/jwt-decode/-/jwt-decode-3.1.0.tgz", - "integrity": "sha512-tthwik7TKkou3mVnBnvVuHnHElbjtdbM63pdBCbZTirCt3WAdM73Y79mOri7+ljsS99ZVwUFZHLMxJuJnv/z1w==", - "deprecated": "This is a stub types definition. jwt-decode provides its own type definitions, so you do not need this installed.", - "dev": true, - "dependencies": { - "jwt-decode": "*" - } - }, "node_modules/@types/minimatch": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", @@ -1413,25 +1454,28 @@ "dev": true }, "node_modules/@types/mocha": { - "version": "10.0.6", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.6.tgz", - "integrity": "sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==", - "dev": true + "version": "10.0.9", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.9.tgz", + "integrity": "sha512-sicdRoWtYevwxjOHNMPTl3vSfJM6oyW8o1wXeI7uww6b6xHg8eBznQDNSGBCDJmsE8UMxP05JgZRtsKbTqt//Q==", + "dev": true, + "license": "MIT" }, "node_modules/@types/node": { - "version": "18.19.33", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.33.tgz", - "integrity": "sha512-NR9+KrpSajr2qBVp/Yt5TU/rp+b5Mayi3+OlMlcg2cVCfRmcG5PWZ7S4+MG9PZ5gWBoc9Pd0BKSRViuBCRPu0A==", + "version": "22.9.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.0.tgz", + "integrity": "sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==", "devOptional": true, + "license": "MIT", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.19.8" } }, "node_modules/@types/node-fetch": { - "version": "2.6.11", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.11.tgz", - "integrity": "sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==", + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.12.tgz", + "integrity": "sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*", "form-data": "^4.0.0" @@ -1505,17 +1549,17 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.4.0.tgz", - "integrity": "sha512-rg8LGdv7ri3oAlenMACk9e+AR4wUV0yrrG+XKsGKOK0EVgeEDqurkXMPILG2836fW4ibokTB5v4b6Z9+GYQDEw==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.14.0.tgz", + "integrity": "sha512-tqp8H7UWFaZj0yNO6bycd5YjMwxa6wIHOLZvWPkidwbgLCsBMetQoGj7DPuAlWa2yGO3H48xmPwjhsSPPCGU5w==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.4.0", - "@typescript-eslint/type-utils": "8.4.0", - "@typescript-eslint/utils": "8.4.0", - "@typescript-eslint/visitor-keys": "8.4.0", + "@typescript-eslint/scope-manager": "8.14.0", + "@typescript-eslint/type-utils": "8.14.0", + "@typescript-eslint/utils": "8.14.0", + "@typescript-eslint/visitor-keys": "8.14.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -1539,16 +1583,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.4.0.tgz", - "integrity": "sha512-NHgWmKSgJk5K9N16GIhQ4jSobBoJwrmURaLErad0qlLjrpP5bECYg+wxVTGlGZmJbU03jj/dfnb6V9bw+5icsA==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.14.0.tgz", + "integrity": "sha512-2p82Yn9juUJq0XynBXtFCyrBDb6/dJombnz6vbo6mgQEtWHfvHbQuEa9kAOVIt1c9YFwi7H6WxtPj1kg+80+RA==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "8.4.0", - "@typescript-eslint/types": "8.4.0", - "@typescript-eslint/typescript-estree": "8.4.0", - "@typescript-eslint/visitor-keys": "8.4.0", + "@typescript-eslint/scope-manager": "8.14.0", + "@typescript-eslint/types": "8.14.0", + "@typescript-eslint/typescript-estree": "8.14.0", + "@typescript-eslint/visitor-keys": "8.14.0", "debug": "^4.3.4" }, "engines": { @@ -1568,14 +1612,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.4.0.tgz", - "integrity": "sha512-n2jFxLeY0JmKfUqy3P70rs6vdoPjHK8P/w+zJcV3fk0b0BwRXC/zxRTEnAsgYT7MwdQDt/ZEbtdzdVC+hcpF0A==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.14.0.tgz", + "integrity": "sha512-aBbBrnW9ARIDn92Zbo7rguLnqQ/pOrUguVpbUwzOhkFg2npFDwTgPGqFqE0H5feXcOoJOfX3SxlJaKEVtq54dw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.4.0", - "@typescript-eslint/visitor-keys": "8.4.0" + "@typescript-eslint/types": "8.14.0", + "@typescript-eslint/visitor-keys": "8.14.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1586,14 +1630,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.4.0.tgz", - "integrity": "sha512-pu2PAmNrl9KX6TtirVOrbLPLwDmASpZhK/XU7WvoKoCUkdtq9zF7qQ7gna0GBZFN0hci0vHaSusiL2WpsQk37A==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.14.0.tgz", + "integrity": "sha512-Xcz9qOtZuGusVOH5Uk07NGs39wrKkf3AxlkK79RBK6aJC1l03CobXjJbwBPSidetAOV+5rEVuiT1VSBUOAsanQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.4.0", - "@typescript-eslint/utils": "8.4.0", + "@typescript-eslint/typescript-estree": "8.14.0", + "@typescript-eslint/utils": "8.14.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -1611,9 +1655,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.4.0.tgz", - "integrity": "sha512-T1RB3KQdskh9t3v/qv7niK6P8yvn7ja1mS7QK7XfRVL6wtZ8/mFs/FHf4fKvTA0rKnqnYxl/uHFNbnEt0phgbw==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.14.0.tgz", + "integrity": "sha512-yjeB9fnO/opvLJFAsPNYlKPnEM8+z4og09Pk504dkqonT02AyL5Z9SSqlE0XqezS93v6CXn49VHvB2G7XSsl0g==", "dev": true, "license": "MIT", "engines": { @@ -1625,14 +1669,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.4.0.tgz", - "integrity": "sha512-kJ2OIP4dQw5gdI4uXsaxUZHRwWAGpREJ9Zq6D5L0BweyOrWsL6Sz0YcAZGWhvKnH7fm1J5YFE1JrQL0c9dd53A==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.14.0.tgz", + "integrity": "sha512-OPXPLYKGZi9XS/49rdaCbR5j/S14HazviBlUQFvSKz3npr3NikF+mrgK7CFVur6XEt95DZp/cmke9d5i3vtVnQ==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "8.4.0", - "@typescript-eslint/visitor-keys": "8.4.0", + "@typescript-eslint/types": "8.14.0", + "@typescript-eslint/visitor-keys": "8.14.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -1654,16 +1698,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.4.0.tgz", - "integrity": "sha512-swULW8n1IKLjRAgciCkTCafyTHHfwVQFt8DovmaF69sKbOxTSFMmIZaSHjqO9i/RV0wIblaawhzvtva8Nmm7lQ==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.14.0.tgz", + "integrity": "sha512-OGqj6uB8THhrHj0Fk27DcHPojW7zKwKkPmHXHvQ58pLYp4hy8CSUdTKykKeh+5vFqTTVmjz0zCOOPKRovdsgHA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.4.0", - "@typescript-eslint/types": "8.4.0", - "@typescript-eslint/typescript-estree": "8.4.0" + "@typescript-eslint/scope-manager": "8.14.0", + "@typescript-eslint/types": "8.14.0", + "@typescript-eslint/typescript-estree": "8.14.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1677,13 +1721,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.4.0.tgz", - "integrity": "sha512-zTQD6WLNTre1hj5wp09nBIDiOc2U5r/qmzo7wxPn4ZgAjHql09EofqhF9WF+fZHzL5aCyaIpPcT2hyxl73kr9A==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.14.0.tgz", + "integrity": "sha512-vG0XZo8AdTH9OE6VFRwAZldNc7qtJ/6NLGWak+BtENuEUXGZgFpihILPiBvKXvJ2nFu27XNGC6rKiwuaoMbYzQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.4.0", + "@typescript-eslint/types": "8.14.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -1695,20 +1739,63 @@ } }, "node_modules/@vscode/test-electron": { - "version": "2.3.10", - "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.3.10.tgz", - "integrity": "sha512-FxMqrvUm6a8S5tP4CymNJ40e6kD+wUTWTc6K32U629yrCCa+kl/rmpkC2gKpN4F4zjg1r+0Hnk9sl0+N2atsYA==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.4.1.tgz", + "integrity": "sha512-Gc6EdaLANdktQ1t+zozoBVRynfIsMKMc94Svu1QreOBC8y76x4tvaK32TljrLi1LI2+PK58sDVbL7ALdqf3VRQ==", "dev": true, + "license": "MIT", "dependencies": { - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", + "http-proxy-agent": "^7.0.2", + "https-proxy-agent": "^7.0.5", "jszip": "^3.10.1", - "semver": "^7.5.2" + "ora": "^7.0.1", + "semver": "^7.6.2" }, "engines": { "node": ">=16" } }, + "node_modules/@vscode/test-electron/node_modules/agent-base": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@vscode/test-electron/node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@vscode/test-electron/node_modules/https-proxy-agent": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.0.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/@vscode/webview-ui-toolkit": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/@vscode/webview-ui-toolkit/-/webview-ui-toolkit-1.4.0.tgz", @@ -1737,9 +1824,9 @@ } }, "node_modules/acorn": { - "version": "8.12.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", - "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", "dev": true, "license": "MIT", "bin": { @@ -1760,18 +1847,18 @@ } }, "node_modules/ag-charts-types": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/ag-charts-types/-/ag-charts-types-10.1.0.tgz", - "integrity": "sha512-pk9ft8hbgTXJ/thI/SEUR1BoauNplYExpcHh7tMOqVikoDsta1O15TB1ZL4XWnl4TPIzROBmONKsz7d8a2HBuQ==", + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/ag-charts-types/-/ag-charts-types-10.3.1.tgz", + "integrity": "sha512-oZvu9vJLk6lmzaYi0TmVVmHFZJpVNFziU0bnllx4wR3muXCmnxz5LouKIZ8CYnNiC7VO5HmHNlFu+0DmEO5zxg==", "license": "MIT" }, "node_modules/ag-grid-community": { - "version": "32.1.0", - "resolved": "https://registry.npmjs.org/ag-grid-community/-/ag-grid-community-32.1.0.tgz", - "integrity": "sha512-RVvkjRH61nuCXwIqTKQPqNbKR+8cGBKw7S1qmmMXsy0pCBAJaQn4kL3v31hKHxDtV4bPscBXLFKGnKzHuss0GQ==", + "version": "32.3.2", + "resolved": "https://registry.npmjs.org/ag-grid-community/-/ag-grid-community-32.3.2.tgz", + "integrity": "sha512-ZrgS7+F0JKV6+sy7VQdt+9xhOJd6TAnXXEmw20ByG6AZdcIDEKBRHW7TfNwUqisXJjGKoaXnYByuMz7rL9PcPg==", "license": "MIT", "dependencies": { - "ag-charts-types": "10.1.0" + "ag-charts-types": "10.3.1" } }, "node_modules/agent-base": { @@ -1804,10 +1891,11 @@ } }, "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -1877,6 +1965,27 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/big-integer": { "version": "1.6.52", "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.52.tgz", @@ -1911,6 +2020,33 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/bl": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz", + "integrity": "sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^6.0.3", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bl/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/bluebird": { "version": "3.4.7", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz", @@ -1945,6 +2081,31 @@ "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, "node_modules/buffer-crc32": { "version": "0.2.13", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", @@ -2042,6 +2203,35 @@ "regexp-to-ast": "0.5.0" } }, + "node_modules/cli-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", + "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -2131,11 +2321,12 @@ "peer": true }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -2173,10 +2364,11 @@ } }, "node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } @@ -2273,29 +2465,32 @@ } }, "node_modules/eslint": { - "version": "9.10.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.10.0.tgz", - "integrity": "sha512-Y4D0IgtBZfOcOUAIQTSXBKoNGfY0REGqHJG6+Q81vNippW5YlKjHFj4soMxamKK1NXHUWuBZTLdU3Km+L/pcHw==", + "version": "9.14.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.14.0.tgz", + "integrity": "sha512-c2FHsVBr87lnUtjP4Yhvk4yEhKrQavGafRA/Se1ouse8PfbfC/Qh9Mxa00yWsZRlqeUB9raXip0aiiUZkgnr9g==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.11.0", + "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.18.0", + "@eslint/core": "^0.7.0", "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "9.10.0", - "@eslint/plugin-kit": "^0.1.0", + "@eslint/js": "9.14.0", + "@eslint/plugin-kit": "^0.2.0", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.3.0", - "@nodelib/fs.walk": "^1.2.8", + "@humanwhocodes/retry": "^0.4.0", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.0.2", - "eslint-visitor-keys": "^4.0.0", - "espree": "^10.1.0", + "eslint-scope": "^8.2.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -2305,13 +2500,11 @@ "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", "json-stable-stringify-without-jsonify": "^1.0.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", "text-table": "^0.2.0" }, "bin": { @@ -2351,9 +2544,9 @@ } }, "node_modules/eslint-plugin-unused-imports": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.3.tgz", - "integrity": "sha512-lqrNZIZjFMUr7P06eoKtQLwyVRibvG7N+LtfKtObYGizAAGrcqLkc3tDx+iAik2z7q0j/XI3ihjupIqxhFabFA==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.4.tgz", + "integrity": "sha512-YptD6IzQjDardkl0POxnnRBhU1OEePMV0nd6siHaRBbd+lyh6NAhFEobiznKU7kTsSsDeSD62Pe7kAM1b7dAZQ==", "dev": true, "license": "MIT", "peerDependencies": { @@ -2367,9 +2560,9 @@ } }, "node_modules/eslint-scope": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.0.2.tgz", - "integrity": "sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", + "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -2406,9 +2599,9 @@ } }, "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", - "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true, "license": "Apache-2.0", "engines": { @@ -2443,15 +2636,15 @@ } }, "node_modules/espree": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.1.0.tgz", - "integrity": "sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.12.0", + "acorn": "^8.14.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.0.0" + "eslint-visitor-keys": "^4.2.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2461,9 +2654,9 @@ } }, "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", - "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true, "license": "Apache-2.0", "engines": { @@ -2971,6 +3164,27 @@ "node": ">= 6" } }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, "node_modules/ignore": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", @@ -3076,6 +3290,19 @@ "node": ">=0.10.0" } }, + "node_modules/is-interactive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz", + "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -3086,15 +3313,6 @@ "node": ">=0.12.0" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-plain-obj": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", @@ -3491,9 +3709,9 @@ "dev": true }, "node_modules/lit": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lit/-/lit-3.2.0.tgz", - "integrity": "sha512-s6tI33Lf6VpDu7u4YqsSX78D28bYQulM+VAzsGch4fx2H0eLZnJsUBsPWmGYSGoKDNbjtRv02rio1o+UdPVwvw==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/lit/-/lit-3.2.1.tgz", + "integrity": "sha512-1BBa1E/z0O9ye5fZprPtdqnc0BFzxIxTTOO/tQFmyC/hj1O3jL4TfmLBw0WEwjAokdLwpclkvGgDJwTIh0/22w==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -3678,11 +3896,22 @@ "node": ">= 0.6" } }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -3728,31 +3957,32 @@ } }, "node_modules/mocha": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.4.0.tgz", - "integrity": "sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==", - "dev": true, - "dependencies": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "8.1.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" + "version": "10.8.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz", + "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-colors": "^4.1.3", + "browser-stdout": "^1.3.1", + "chokidar": "^3.5.3", + "debug": "^4.3.5", + "diff": "^5.2.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^8.1.0", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^5.1.6", + "ms": "^2.1.3", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9", + "yargs-unparser": "^2.0.0" }, "bin": { "_mocha": "bin/_mocha", @@ -3822,10 +4052,11 @@ } }, "node_modules/mocha/node_modules/minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -3833,12 +4064,6 @@ "node": ">=10" } }, - "node_modules/mocha/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, "node_modules/mocha/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -3855,10 +4080,11 @@ } }, "node_modules/mock-fs": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-5.2.0.tgz", - "integrity": "sha512-2dF2R6YMSZbpip1V1WHKGLNjr/k48uQClqMVb5H3MOvwc9qhYis3/IWbj02qIg/Y8MDXKFF4c5v0rxx2o6xTZw==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-5.4.1.tgz", + "integrity": "sha512-sz/Q8K1gXXXHR+qr0GZg2ysxCRr323kuN10O7CtQjraJsFDJ4SJ+0I5MzALz7aRp9lHk8Cc/YdsT95h9Ka1aFw==", "dev": true, + "license": "MIT", "engines": { "node": ">=12.0.0" } @@ -3877,9 +4103,10 @@ "integrity": "sha512-cBMXjSW+fjOb4tyaVHuaVE/A5TqkukDWiOfxxAjY+PEqmmBQlLwn+8OzwPiG3brouXKY5Un4pBjAeB6UToXHaQ==" }, "node_modules/moment-timezone": { - "version": "0.5.45", - "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.45.tgz", - "integrity": "sha512-HIWmqA86KcmCAhnMAN0wuDOARV/525R2+lOLotuGFzn4HO+FH+/645z2wx0Dt3iDv6/p61SIvKnDstISainhLQ==", + "version": "0.5.46", + "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.46.tgz", + "integrity": "sha512-ZXm9b36esbe7OmdABqIWJuBBiLLwAjrN7CE+7sYdCCx82Nabt1wHDj8TVseS59QIlfFPbOoiBPm6ca9BioG4hw==", + "license": "MIT", "dependencies": { "moment": "^2.29.4" }, @@ -3888,9 +4115,10 @@ } }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" }, "node_modules/natural-compare": { "version": "1.4.0", @@ -3969,6 +4197,22 @@ "wrappy": "1" } }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -3986,6 +4230,127 @@ "node": ">= 0.8.0" } }, + "node_modules/ora": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-7.0.1.tgz", + "integrity": "sha512-0TUxTiFJWv+JnjWm4o9yvuskpEJLXTcng8MJuKd+SzAzp2o+OP3HWqNhB4OdJRt1Vsd9/mR0oyaEYlOnL7XIRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^5.3.0", + "cli-cursor": "^4.0.0", + "cli-spinners": "^2.9.0", + "is-interactive": "^2.0.0", + "is-unicode-supported": "^1.3.0", + "log-symbols": "^5.1.0", + "stdin-discarder": "^0.1.0", + "string-width": "^6.1.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ora/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/ora/node_modules/emoji-regex": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", + "dev": true, + "license": "MIT" + }, + "node_modules/ora/node_modules/is-unicode-supported": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", + "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/log-symbols": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-5.1.0.tgz", + "integrity": "sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^5.0.0", + "is-unicode-supported": "^1.1.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/string-width": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-6.1.0.tgz", + "integrity": "sha512-k01swCJAgQmuADB0YIc+7TuatfNvTBVOoaUWJjTB9R4VJzR5vNWzf5t42ESVZFPS8xTySF7CAdV4t/aaIm3UnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^10.2.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -4235,6 +4600,7 @@ "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, + "license": "MIT", "dependencies": { "safe-buffer": "^5.1.0" } @@ -4311,6 +4677,30 @@ "node": ">=4" } }, + "node_modules/restore-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", + "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/restore-cursor/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -4422,10 +4812,11 @@ } }, "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "randombytes": "^2.1.0" } @@ -4488,15 +4879,6 @@ "url": "https://opencollective.com/sinon" } }, - "node_modules/sinon/node_modules/diff": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", - "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -4512,6 +4894,22 @@ "node": ">=0.10.0" } }, + "node_modules/stdin-discarder": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.1.0.tgz", + "integrity": "sha512-xhV7w8S+bUwlPTb4bAOUQhv8/cSS5offJuX8GQGq32ONF0ZtDWKfkdomM3HMRA+LhX6um/FZ0COqlwsjD53LeQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bl": "^5.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -4701,10 +5099,11 @@ } }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "devOptional": true + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "devOptional": true, + "license": "MIT" }, "node_modules/universalify": { "version": "2.0.1", @@ -5015,10 +5414,11 @@ } }, "node_modules/workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", - "dev": true + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", + "dev": true, + "license": "Apache-2.0" }, "node_modules/wrap-ansi": { "version": "7.0.0", @@ -5095,10 +5495,11 @@ } }, "node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, + "license": "ISC", "engines": { "node": ">=10" } diff --git a/package.json b/package.json index 704287df..e1192678 100644 --- a/package.json +++ b/package.json @@ -961,40 +961,38 @@ "bracketSameLine": true }, "devDependencies": { - "@shoelace-style/shoelace": "^2.17.1", - "@types/extract-zip": "^2.0.1", + "@shoelace-style/shoelace": "^2.18.0", "@types/fs-extra": "^11.0.4", "@types/glob": "^8.1.0", "@types/graceful-fs": "^4.1.9", "@types/istanbul-lib-coverage": "^2.0.6", "@types/istanbul-reports": "^3.0.4", - "@types/jwt-decode": "^3.1.0", - "@types/mocha": "^10.0.6", - "@types/node": "^18.19.33", - "@types/node-fetch": "^2.6.11", + "@types/mocha": "^10.0.9", + "@types/node": "^22.9.0", + "@types/node-fetch": "^2.6.12", "@types/semver": "^7.5.8", "@types/sinon": "^17.0.3", "@types/vscode": "^1.86.0", "@types/vscode-webview": "^1.57.5", - "@typescript-eslint/eslint-plugin": "^8.4.0", - "@typescript-eslint/parser": "^8.4.0", - "@vscode/test-electron": "^2.3.10", + "@typescript-eslint/eslint-plugin": "^8.14.0", + "@typescript-eslint/parser": "^8.14.0", + "@vscode/test-electron": "^2.4.1", "esbuild": "^0.23.1", - "eslint": "^9.10.0", + "eslint": "^9.14.0", "eslint-plugin-header": "^3.1.1", "eslint-plugin-license-header": "^0.6.1", - "eslint-plugin-unused-imports": "^4.1.3", + "eslint-plugin-unused-imports": "^4.1.4", "glob": "^8.1.0", "istanbul-lib-coverage": "^3.2.2", "istanbul-lib-instrument": "^3.3.0", "istanbul-lib-report": "^2.0.8", "istanbul-lib-source-maps": "^3.0.6", "istanbul-reports": "^3.1.7", - "lit": "^3.2.0", - "mocha": "^10.4.0", + "lit": "^3.2.1", + "mocha": "^10.8.2", "mocha-junit-reporter": "^2.2.1", "mocha-multi-reporters": "^1.5.1", - "mock-fs": "^5.2.0", + "mock-fs": "^5.4.1", "prettier": "^3.3.3", "rimraf": "^6.0.1", "sinon": "^17.0.1", @@ -1008,7 +1006,7 @@ "dependencies": { "@vscode/webview-ui-toolkit": "^1.4.0", "@windozer/node-q": "^2.6.0", - "ag-grid-community": "^32.1.0", + "ag-grid-community": "^32.3.2", "axios": "^1.7.7", "chevrotain": "^10.5.0", "extract-zip": "^2.0.1", @@ -1016,7 +1014,7 @@ "jwt-decode": "^4.0.0", "moment": "^2.30.1", "moment-duration-format": "^2.3.2", - "moment-timezone": "^0.5.45", + "moment-timezone": "^0.5.46", "node-fetch": "^2.7.0", "node-q": "^2.7.0", "pick-port": "^2.0.1", From 2ab0b010142f42a72bc1a15d691f67600c7f50a0 Mon Sep 17 00:00:00 2001 From: Philip Carneiro Date: Wed, 13 Nov 2024 10:59:25 +0000 Subject: [PATCH 50/57] fix for scratchpad 1.11 --- src/classes/insightsConnection.ts | 2 +- src/services/resultsPanelProvider.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/classes/insightsConnection.ts b/src/classes/insightsConnection.ts index 796ceab1..7f2a71cd 100644 --- a/src/classes/insightsConnection.ts +++ b/src/classes/insightsConnection.ts @@ -428,7 +428,7 @@ export class InsightsConnection { }; if (this.insightsVersion) { - if (this.insightsVersion >= 1.11) { + if (this.insightsVersion >= 1.12) { body.returnFormat = isTableView ? "structuredText" : "text"; } else { body.isTableView = isTableView; diff --git a/src/services/resultsPanelProvider.ts b/src/services/resultsPanelProvider.ts index 5f061179..243e91b2 100644 --- a/src/services/resultsPanelProvider.ts +++ b/src/services/resultsPanelProvider.ts @@ -225,7 +225,7 @@ export class KdbResultsViewProvider implements WebviewViewProvider { convertToGrid(results: any, isInsights: boolean, connVersion?: number): any { let rowData = []; let columnDefs = []; - if (connVersion && connVersion >= 1.11) { + if (connVersion && connVersion >= 1.12) { rowData = this.updatedExtractRowData(results); columnDefs = this.updatedExtractColumnDefs(results); } else { From cd58059a21506bed836439e713c08ce7e278c3fe Mon Sep 17 00:00:00 2001 From: Philip Carneiro Date: Thu, 14 Nov 2024 14:18:17 +0000 Subject: [PATCH 51/57] fix results tab --- src/classes/insightsConnection.ts | 10 +++++++--- src/services/resultsPanelProvider.ts | 23 +++++++++++++++++------ 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/classes/insightsConnection.ts b/src/classes/insightsConnection.ts index 7f2a71cd..6283ba47 100644 --- a/src/classes/insightsConnection.ts +++ b/src/classes/insightsConnection.ts @@ -65,7 +65,7 @@ export class InsightsConnection { if (token) { await this.getConfig(); await this.getMeta(); - await this.getScratchpadQuery(""); + await this.getScratchpadQuery("", undefined, false, true); } }); return this.connected; @@ -398,9 +398,13 @@ export class InsightsConnection { query: string, context?: string, isPython?: boolean, + isStarting?: boolean, ): Promise { if (this.connected && this.connEndpoints) { const isTableView = ext.isResultsTabVisible; + const queryMsg = isStarting + ? "Starting scratchpad..." + : "Query is executing..."; const scratchpadURL = new url.URL( this.connEndpoints.scratchpad.scratchpad, this.node.details.server, @@ -451,7 +455,7 @@ export class InsightsConnection { kdbOutputLog(`User cancelled the Scrathpad execution.`, "WARNING"); }); - progress.report({ message: "Query is executing..." }); + progress.report({ message: queryMsg }); const spRes = await axios .post(scratchpadURL.toString(), body, { headers, @@ -472,7 +476,7 @@ export class InsightsConnection { kdbOutputLog(`[SCRATCHPAD] Status: ${response.status}`, "INFO"); if (!response.data.error) { if (isTableView) { - if (this.insightsVersion && this.insightsVersion >= 1.11) { + if (this.insightsVersion && this.insightsVersion >= 1.12) { response.data = JSON.parse( response.data.data, ) as StructuredTextResults; diff --git a/src/services/resultsPanelProvider.ts b/src/services/resultsPanelProvider.ts index 243e91b2..902f85a4 100644 --- a/src/services/resultsPanelProvider.ts +++ b/src/services/resultsPanelProvider.ts @@ -55,7 +55,7 @@ export class KdbResultsViewProvider implements WebviewViewProvider { char: "text", symbol: "text", string: "text", - date: "date", + date: "text", time: "time", timestamp: "datetime", timespan: "text", @@ -159,7 +159,8 @@ export class KdbResultsViewProvider implements WebviewViewProvider { const sanitizedKey = this.sanitizeString(key); const type = results.meta[key]; const headerTooltip = type; - const cellDataType = this.kdbToAgGridCellType(type); + const cellDataType = + type != undefined ? this.kdbToAgGridCellType(type) : undefined; return { field: sanitizedKey, headerName: sanitizedKey, @@ -229,6 +230,7 @@ export class KdbResultsViewProvider implements WebviewViewProvider { rowData = this.updatedExtractRowData(results); columnDefs = this.updatedExtractColumnDefs(results); } else { + results = isInsights ? results.data : results; const queryResult = isInsights ? results.rows : results; if (Array.isArray(queryResult[0])) { if (typeof queryResult[0][0] === "object") { @@ -246,12 +248,21 @@ export class KdbResultsViewProvider implements WebviewViewProvider { rowData = queryResult; } + rowData = rowData.map((row: any) => { + const newRow = { ...row }; + Object.keys(newRow).forEach((key) => { + if (typeof newRow[key] === "object" && newRow[key] !== null) { + newRow[key] = newRow[key].toString(); + } + }); + return newRow; + }); + if (isInsights) { results.rows = rowData; - columnDefs = this.generateCoumnDefs(results, isInsights); - } else { - columnDefs = this.generateCoumnDefs(rowData, isInsights); } + + columnDefs = this.generateCoumnDefs(results, isInsights); } if ( @@ -406,7 +417,7 @@ export class KdbResultsViewProvider implements WebviewViewProvider { function restoreColumnWidths(columnWidths) { if (!gridApi || !columnWidths) return; - gridApi.applyColumnState({state: columnWidths, applyOrder: true,}); + gridApi.applyColumnState({state: columnWidths, }); } window.addEventListener('message', event => { From 184a058c43c2d0ca10c2a78ad3c553170a696c87 Mon Sep 17 00:00:00 2001 From: Philip Carneiro Date: Thu, 14 Nov 2024 14:38:00 +0000 Subject: [PATCH 52/57] fix tests --- test/suite/panels.test.ts | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/test/suite/panels.test.ts b/test/suite/panels.test.ts index 684a2e57..c03b9b99 100644 --- a/test/suite/panels.test.ts +++ b/test/suite/panels.test.ts @@ -186,11 +186,13 @@ describe("WebPanels", () => { describe("convertToGrid()", () => { it("should convert results to grid format for insights", () => { const results = { - rows: [ - { prop1: "value1", prop2: "value2" }, - { prop1: "value3", prop2: "value4" }, - ], - meta: { prop1: "type1", prop2: "type2" }, + data: { + rows: [ + { prop1: "value1", prop2: "value2" }, + { prop1: "value3", prop2: "value4" }, + ], + meta: { prop1: "type1", prop2: "type2" }, + }, }; const expectedOutput = JSON.stringify({ @@ -244,8 +246,10 @@ describe("WebPanels", () => { it("should convert results to grid format with empty rows", () => { const results = { - rows: [], - meta: { prop1: "type1", prop2: "type2" }, + data: { + rows: [], + meta: { prop1: "type1", prop2: "type2" }, + }, }; const expectedOutput = JSON.stringify({ @@ -296,11 +300,13 @@ describe("WebPanels", () => { it("should convert results to grid format when queryResult[0] is an array of objects", () => { const results = { - rows: [ - [{ sym: "a" }, { sym: "b" }, { sym: "c" }], - [{ val: 1 }, { val: 2 }, { val: 3 }], - ], - meta: { sym: "type1", val: "type2" }, + data: { + rows: [ + [{ sym: "a" }, { sym: "b" }, { sym: "c" }], + [{ val: 1 }, { val: 2 }, { val: 3 }], + ], + meta: { sym: "type1", val: "type2" }, + }, }; const expectedOutput = JSON.stringify({ @@ -355,8 +361,7 @@ describe("WebPanels", () => { it("should convert results to grid format when queryResult[0] is an array of non-objects", () => { const results = { - rows: [[1, 2, 3]], - meta: { value: "type1" }, + data: { rows: [[1, 2, 3]], meta: { value: "type1" } }, }; const expectedOutput = JSON.stringify({ @@ -367,7 +372,7 @@ describe("WebPanels", () => { flex: 1, minWidth: 100, }, - rowData: [{ index: 1, value: [1, 2, 3] }], + rowData: [{ index: 1, value: "1,2,3" }], columnDefs: [ { field: "index", headerName: "Index", cellDataType: "number" }, { From 0fbb8c7cc7af0c826bd44e242711c438445c7006 Mon Sep 17 00:00:00 2001 From: ecmel Date: Mon, 18 Nov 2024 17:46:40 +0300 Subject: [PATCH 53/57] fixed bundled connect error message --- src/classes/localConnection.ts | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/src/classes/localConnection.ts b/src/classes/localConnection.ts index ae6469fc..0dfc46dd 100644 --- a/src/classes/localConnection.ts +++ b/src/classes/localConnection.ts @@ -76,12 +76,31 @@ export class LocalConnection { if (err || !conn) { ext.serverProvider.reload(); - window.showErrorMessage( - `Connection to server ${this.options.host}:${this.options.port} failed! Details: ${err?.message}`, - ); + if (this.connLabel.endsWith("[local]")) { + window + .showErrorMessage( + `Connection to server ${this.options.host}:${this.options.port} failed.`, + "Start q process", + ) + .then((res) => { + if (res) { + commands.executeCommand( + "kdb.startLocalProcess", + ext.connectionsList.find( + (conn) => conn.label === this.connLabel, + ), + ); + } + }); + } else { + window.showErrorMessage( + `Connection to server ${this.options.host}:${this.options.port} failed.`, + ); + } + kdbOutputLog( `Connection to server ${this.options.host}:${this.options.port} failed! Details: ${err?.message}`, - "ERROR", + "CONNECTION", ); return; } From 48c25e8842020443b865aa6e04872d17bd9829c0 Mon Sep 17 00:00:00 2001 From: Philip Carneiro Date: Mon, 18 Nov 2024 16:03:17 +0000 Subject: [PATCH 54/57] fix labels issues --- .../components/kdbNewConnectionView.ts | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/webview/components/kdbNewConnectionView.ts b/src/webview/components/kdbNewConnectionView.ts index b1e278f1..f2df287c 100644 --- a/src/webview/components/kdbNewConnectionView.ts +++ b/src/webview/components/kdbNewConnectionView.ts @@ -143,6 +143,7 @@ export class KdbNewConnectionView extends LitElement { handleMessage(event: { data: any }) { const message = event.data; + console.log(message); if (message.command === "editConnection") { this.connectionData = message.data; this.labels = message.labels; @@ -366,7 +367,7 @@ export class KdbNewConnectionView extends LitElement { @@ -389,16 +390,17 @@ export class KdbNewConnectionView extends LitElement { } renderLblDropdownOptions(pos: number) { + console.log(this.labels); return html` - - No Label Selected - ${repeat( - this.lblNamesList, - (lbl) => lbl.name, - (lbl) => html` - + No Label Selected + ${repeat( + this.lblNamesList, + (lbl) => lbl, + (lbl) => { + console.log(lbl.name); + console.log(lbl.name === this.labels[pos]); + return html` +
Date: Tue, 19 Nov 2024 15:10:06 +0000 Subject: [PATCH 56/57] improve labels --- src/webview/components/kdbNewConnectionView.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/webview/components/kdbNewConnectionView.ts b/src/webview/components/kdbNewConnectionView.ts index f2df287c..b18ff5dc 100644 --- a/src/webview/components/kdbNewConnectionView.ts +++ b/src/webview/components/kdbNewConnectionView.ts @@ -1001,6 +1001,7 @@ export class KdbNewConnectionView extends LitElement { }); setTimeout(() => { this.labels.push(this.newLblName); + this.removeBlankLabels(); this.closeModal(); }, 500); } From fa8084b0caf4575fe2e27443a0aa40b375acbfbc Mon Sep 17 00:00:00 2001 From: ecmel Date: Wed, 20 Nov 2024 12:07:09 +0300 Subject: [PATCH 57/57] downgraded shoelace to 2.17.1 --- package-lock.json | 9 ++++----- package.json | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3ba0c66d..44769652 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,7 +29,7 @@ "vscode-uri": "^3.0.8" }, "devDependencies": { - "@shoelace-style/shoelace": "^2.18.0", + "@shoelace-style/shoelace": "2.17.1", "@types/fs-extra": "^11.0.4", "@types/glob": "^8.1.0", "@types/graceful-fs": "^4.1.9", @@ -1295,11 +1295,10 @@ "dev": true }, "node_modules/@shoelace-style/shoelace": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/@shoelace-style/shoelace/-/shoelace-2.18.0.tgz", - "integrity": "sha512-uzpL0+8Qm8aE2ArcXBcKHkaPc6l7ymuVaN6xJM0yd2o3talcoXpuP+gRBsgggSZKuuJEa+JkEuLDdzzFnE/+jw==", + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/@shoelace-style/shoelace/-/shoelace-2.17.1.tgz", + "integrity": "sha512-fB9+bPHLg5zVwPbBKEqY3ghyttkJq9RuUzFMTZKweKrNKKDMUACtI8DlMYUqNwpdZMJhf7a0xeak6vFVBSxcbQ==", "dev": true, - "license": "MIT", "dependencies": { "@ctrl/tinycolor": "^4.0.2", "@floating-ui/dom": "^1.5.3", diff --git a/package.json b/package.json index e1192678..5937e267 100644 --- a/package.json +++ b/package.json @@ -961,7 +961,7 @@ "bracketSameLine": true }, "devDependencies": { - "@shoelace-style/shoelace": "^2.18.0", + "@shoelace-style/shoelace": "2.17.1", "@types/fs-extra": "^11.0.4", "@types/glob": "^8.1.0", "@types/graceful-fs": "^4.1.9",