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 8b958450..11d84697 100644
--- a/package.json
+++ b/package.json
@@ -964,6 +964,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 ab5a7c93..64863863 100644
--- a/src/services/dataSourceEditorProvider.ts
+++ b/src/services/dataSourceEditorProvider.ts
@@ -12,6 +12,7 @@
*/
import {
+ ColorThemeKind,
CustomTextEditorProvider,
Disposable,
ExtensionContext,
@@ -223,23 +224,27 @@ 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 0dae141f..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";
@@ -32,27 +32,14 @@ import {
filterOperators,
} from "../../models/dataSource";
import { MetaObjectPayload } from "../../models/meta";
-import { kdbStyles, vscodeStyles } from "./styles";
import { DataSourceCommand, DataSourceMessage2 } from "../../models/messages";
+import { dataSourceStyles, shoelaceStyles } from "./styles";
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;
- }
-
- .panel {
- width: 50em;
- margin-top: 0.5em;
- }
- `,
- ];
+ static styles = [shoelaceStyles, dataSourceStyles];
readonly vscode = acquireVsCodeApi();
private declare debounce;
@@ -117,9 +104,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;
@@ -219,15 +204,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) {
@@ -249,59 +229,32 @@ export class KdbDataSourceView extends LitElement {
if (compareVersions(this.selectedServerVersion.toString(), "1.11") >= 0) {
return html`
-
{
- /* istanbul ignore next */
+ @sl-change="${(event: Event) => {
this.rowLimit = (event.target as HTMLInputElement).checked;
this.requestChange();
- }}">
-
- Row Limit
- {
- /* istanbul ignore next */
- this.rowLimitCount = (event.target as HTMLInputElement).value;
- this.requestChange();
- }}">
-
-
+ }}">
+
+
{
+ this.rowLimitCount = (event.target as HTMLInputElement).value;
+ this.requestChange();
+ }}">
-
-
- {
- /* istanbul ignore next */
- if ((event.target as HTMLInputElement).checked) {
- this.isRowLimitLast = false;
- this.requestChange();
- }
- }}"
- >First
-
-
- {
- /* istanbul ignore next */
- if ((event.target as HTMLInputElement).checked) {
- this.isRowLimitLast = true;
- this.requestChange();
- }
- }}"
- >Last
-
-
+
{
+ const value = (event.target as HTMLInputElement).value;
+ this.isRowLimitLast = value === "last";
+ this.requestChange();
+ }}">
+ First
+ Last
+
`;
} else {
@@ -321,8 +274,8 @@ export class KdbDataSourceView extends LitElement {
const value =
api.api === ".kxi.getData" ? api.api.replace(".kxi.", "") : api.api;
return html`
- ${value} ${value}
`;
});
@@ -334,9 +287,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} `,
),
);
}
@@ -351,7 +302,7 @@ export class KdbDataSourceView extends LitElement {
if (found) {
return found.columns.map(
({ column }) => html`
- ${column}
+ ${column}
`,
);
}
@@ -367,7 +318,7 @@ export class KdbDataSourceView extends LitElement {
if (!this.qsqlTarget) {
this.qsqlTarget = value;
}
- return html`${value} `;
+ return html`${value} `;
});
}
return [];
@@ -376,76 +327,55 @@ export class KdbDataSourceView extends LitElement {
renderFilter(filter: Filter) {
return html`
-
{
+ @sl-change="${(event: Event) => {
filter.active = (event.target as HTMLInputElement).checked;
this.requestChange();
- }}">
-
- ${this.filters.indexOf(filter) === 0
- ? "Filter By Column"
- : ""}
+ {
+ filter.column = (event.target as HTMLInputElement).value;
+ this.requestChange();
+ }}">
+ ${filter.column || "(none)"}
- {
- filter.column = (event.target as HTMLInputElement).value;
- this.requestChange();
- }}">
- ${filter.column || "(none)"}
- ${this.isMetaLoaded
- ? "Meta Columns"
- : "Meta Not Loaded"}
- ${this.renderColumnOptions()}
-
-
-
- ${this.filters.indexOf(filter) === 0
- ? "Apply Function"
- : ""} ${this.isMetaLoaded ? "Meta Columns" : "Meta Not Loaded"}
- {
- filter.operator = (event.target as HTMLInputElement).value;
- this.requestChange();
- }}">
- ${filter.operator || "(none)"}
- Operators
- ${filterOperators.map(
- (operator) =>
- html`${operator} `,
- )}
-
-
-
+ {
+ filter.operator = (event.target as HTMLInputElement).value;
+ this.requestChange();
+ }}">
+ ${filter.operator || "(none)"}
+ Operators
+ ${filterOperators.map(
+ (operator) =>
+ html`${operator} `,
+ )}
+
+ {
filter.values = (event.target as HTMLInputElement).value;
this.requestChange();
- }}"
- >${this.filters.indexOf(filter) === 0 ? "Set Parameter" : ""}
-
-
-
+
+ {
@@ -455,11 +385,11 @@ export class KdbDataSourceView extends LitElement {
this.requestChange();
}
}}"
- >+ +
- {
if (this.filters.length > 0) {
const index = this.filters.indexOf(filter);
@@ -470,9 +400,9 @@ export class KdbDataSourceView extends LitElement {
this.requestChange();
}
}}"
- >- -
-
+
`;
}
@@ -480,36 +410,30 @@ export class KdbDataSourceView extends LitElement {
renderLabel(label: Label) {
return html`
-
{
+ @sl-change="${(event: Event) => {
label.active = (event.target as HTMLInputElement).checked;
this.requestChange();
- }}">
-
+ {
label.key = (event.target as HTMLInputElement).value;
this.requestChange();
- }}"
- >${this.labels.indexOf(label) === 0
- ? "Filter By Label"
- : ""}
-
+ {
label.value = (event.target as HTMLInputElement).value;
this.requestChange();
- }}"
- >${this.labels.indexOf(label) === 0 ? "Value" : ""}
-
-
+
+ {
if (this.labels.length < MAX_RULES) {
const index = this.labels.indexOf(label);
@@ -517,11 +441,11 @@ export class KdbDataSourceView extends LitElement {
this.requestChange();
}
}}"
- >+ +
- {
if (this.labels.length > 0) {
const index = this.labels.indexOf(label);
@@ -532,9 +456,9 @@ export class KdbDataSourceView extends LitElement {
this.requestChange();
}
}}"
- >- -
-
+
`;
}
@@ -542,40 +466,31 @@ export class KdbDataSourceView extends LitElement {
renderSort(sort: Sort) {
return html`
-
{
+ @sl-change="${(event: Event) => {
sort.active = (event.target as HTMLInputElement).checked;
this.requestChange();
- }}">
-
- ${this.sorts.indexOf(sort) === 0 ? "Sort By" : ""}
+ {
+ sort.column = (event.target as HTMLInputElement).value;
+ this.requestChange();
+ }}">
+ ${sort.column || "(none)"}
- {
- sort.column = (event.target as HTMLInputElement).value;
- this.requestChange();
- }}">
- ${sort.column || "(none)"}
- ${this.isMetaLoaded
- ? "Meta Columns"
- : "Meta Not Loaded"}
- ${this.renderColumnOptions()}
-
-
-
- ${this.isMetaLoaded ? "Meta Columns" : "Meta Not Loaded"}
+ ${this.renderColumnOptions()}
+
+
+ {
if (this.sorts.length < MAX_RULES) {
const index = this.sorts.indexOf(sort);
@@ -583,11 +498,11 @@ export class KdbDataSourceView extends LitElement {
this.requestChange();
}
}}"
- >+ +
- {
if (this.sorts.length > 0) {
const index = this.sorts.indexOf(sort);
@@ -598,9 +513,9 @@ export class KdbDataSourceView extends LitElement {
this.requestChange();
}
}}"
- >- -
-
+
`;
}
@@ -608,76 +523,56 @@ export class KdbDataSourceView extends LitElement {
renderAgg(agg: Agg) {
return html`
-
{
+ @sl-change="${(event: Event) => {
agg.active = (event.target as HTMLInputElement).checked;
this.requestChange();
- }}">
-
+ {
agg.key = (event.target as HTMLInputElement).value;
this.requestChange();
- }}"
- >${this.aggs.indexOf(agg) === 0
- ? "Define Output Aggregate"
- : ""}
-
- ${this.aggs.indexOf(agg) === 0 ? "Choose Aggregation" : ""}
+ {
+ agg.operator = (event.target as HTMLInputElement).value;
+ this.requestChange();
+ }}">
+ ${agg.operator || "(none)"}
- {
- agg.operator = (event.target as HTMLInputElement).value;
- this.requestChange();
- }}">
- ${agg.operator || "(none)"}
- Operators
- ${aggOperators.map(
- (operator) =>
- html`${operator} `,
- )}
-
-
-
- ${this.aggs.indexOf(agg) === 0 ? "By Column" : ""} Operators
+ ${aggOperators.map(
+ (operator) =>
+ html`${operator} `,
+ )}
+
+ {
+ agg.column = (event.target as HTMLInputElement).value;
+ this.requestChange();
+ }}">
+ ${agg.column || "(none)"}
- {
- agg.column = (event.target as HTMLInputElement).value;
- this.requestChange();
- }}">
- ${agg.column || "(none)"}
- ${this.isMetaLoaded
- ? "Meta Columns"
- : "Meta Not Loaded"}
- ${this.renderColumnOptions()}
-
-
-
- ${this.isMetaLoaded ? "Meta Columns" : "Meta Not Loaded"}
+ ${this.renderColumnOptions()}
+
+
+ {
if (this.aggs.length < MAX_RULES) {
const index = this.aggs.indexOf(agg);
@@ -685,11 +580,11 @@ export class KdbDataSourceView extends LitElement {
this.requestChange();
}
}}"
- >+ +
- {
if (this.aggs.length > 0) {
const index = this.aggs.indexOf(agg);
@@ -700,9 +595,9 @@ export class KdbDataSourceView extends LitElement {
this.requestChange();
}
}}"
- >- -
-
+
`;
}
@@ -710,42 +605,33 @@ export class KdbDataSourceView extends LitElement {
renderGroup(group: Group) {
return html`
-
{
+ @sl-change="${(event: Event) => {
group.active = (event.target as HTMLInputElement).checked;
this.requestChange();
- }}">
-
- ${this.groups.indexOf(group) === 0
- ? "Group Aggregation By"
- : ""}
+ {
+ group.column = (event.target as HTMLInputElement).value;
+ this.requestChange();
+ }}">
+ ${group.column || "(none)"}
- {
- group.column = (event.target as HTMLInputElement).value;
- this.requestChange();
- }}">
- ${group.column || "(none)"}
- ${this.isMetaLoaded
- ? "Meta Columns"
- : "Meta Not Loaded"}
- ${this.renderColumnOptions()}
-
-
-
- ${this.isMetaLoaded ? "Meta Columns" : "Meta Not Loaded"}
+ ${this.renderColumnOptions()}
+
+
+ {
if (this.groups.length < MAX_RULES) {
const index = this.groups.indexOf(group);
@@ -753,11 +639,11 @@ export class KdbDataSourceView extends LitElement {
this.requestChange();
}
}}"
- >+ +
- {
if (this.groups.length > 0) {
const index = this.groups.indexOf(group);
@@ -768,331 +654,309 @@ export class KdbDataSourceView extends LitElement {
this.requestChange();
}
}}"
- >- -
-
+
`;
}
- render() {
+ renderAPI() {
return html`
-
-
-
-
- {
- this.selectedType = DataSourceTypes.API;
- this.requestChange();
- }}"
- >API
- {
- this.selectedType = DataSourceTypes.QSQL;
- this.requestChange();
- }}"
- >QSQL
- {
- this.selectedType = DataSourceTypes.SQL;
- this.requestChange();
- }}"
- >SQL
-
-
-
-
- Select API
- {
- this.selectedApi = (
- event.target as HTMLInputElement
- ).value;
- this.requestChange();
- }}">
- ${this.selectedApi || "(none)"}
- ${this.isMetaLoaded
- ? "Meta APIs"
- : "Meta Not Loaded"}
- ${this.renderApiOptions()}
-
-
-
-
- Table
- {
- this.selectedTable = (
- event.target as HTMLSelectElement
- ).value;
- this.requestChange();
- }}">
- ${this.selectedTable || "(none)"}
- ${this.isMetaLoaded
- ? "Meta Tables"
- : "Meta Not Loaded"}
- ${this.renderTableOptions()}
-
-
-
-
-
- {
- this.startTS = (
- event.target as HTMLSelectElement
- ).value;
- this.requestChange();
- }}"
- >Start Time
-
- {
- this.endTS = (event.target as HTMLSelectElement).value;
- this.requestChange();
- }}"
- >End Time
-
- ${this.renderRowCountOptions()}
-
-
{
- this.filled = (
- event.target as HTMLInputElement
- ).checked;
- this.requestChange();
- }}">
-
- Fill
- {
- this.fill = (event.target as HTMLSelectElement).value;
- this.requestChange();
- }}">
- ${this.fill || "(none)"}
- Options
- zero
- forward
-
-
-
+
+
+ {
+ this.selectedApi = (event.target as HTMLInputElement).value;
+ this.requestChange();
+ }}">
+ ${this.selectedApi || "(none)"}
+ ${this.isMetaLoaded ? "Meta APIs" : "Meta Not Loaded"}
+ ${this.renderApiOptions()}
+
+
+ {
+ this.selectedTable = (event.target as HTMLSelectElement).value;
+ this.requestChange();
+ }}">
+ ${this.selectedTable || "(none)"}
+ ${this.isMetaLoaded ? "Meta Tables" : "Meta Not Loaded"}
+ ${this.renderTableOptions()}
+
+
-
-
{
- this.temporal = (
- event.target as HTMLInputElement
- ).checked;
- this.requestChange();
- }}">
-
- Temporality
- {
- this.temporality = (
- event.target as HTMLSelectElement
- ).value;
- this.requestChange();
- }}">
- ${this.temporality || "(none)"}
- Options
- snapshot
- slice
-
-
-
+
+ {
+ this.startTS = (event.target as HTMLSelectElement).value;
+ this.requestChange();
+ }}">
+
+
+ {
+ this.endTS = (event.target as HTMLSelectElement).value;
+ this.requestChange();
+ }}">
+
+ ${this.renderRowCountOptions()}
+
+ {
+ this.filled = (event.target as HTMLInputElement).checked;
+ this.requestChange();
+ }}">
+ {
+ this.fill = (event.target as HTMLSelectElement).value;
+ this.requestChange();
+ }}">
+ ${this.fill || "(none)"}
+ Options
+ zero
+ forward
+
+
-
- ${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),
- )}
-
-
-
+
+
{
+ this.temporal = (event.target as HTMLInputElement).checked;
+ this.requestChange();
+ }}">
-
-
-
-
- Target
- {
- this.qsqlTarget = (
- event.target as HTMLSelectElement
- ).value;
- this.requestChange();
- }}">
- ${this.qsqlTarget || "(none)"}
- ${this.isMetaLoaded
- ? "Meta Targets"
- : "Meta Not Loaded"}
- ${this.renderTargetOptions()}
-
-
-
- {
- this.qsql = (event.target as HTMLSelectElement).value;
- this.requestChange();
- }}"
- >Query
-
-
-
+
{
+ this.temporality = (event.target as HTMLSelectElement).value;
+ this.requestChange();
+ }}">
+ ${this.temporality || "(none)"}
+ Options
+ snapshot
+ slice
+
+
-
-
-
- {
- this.sql = (event.target as HTMLSelectElement).value;
- this.requestChange();
- }}"
- >Query
-
-
-
-
-
+
+ ${repeat(
+ this.filters,
+ (filter) => filter,
+ (filter) => this.renderFilter(filter),
+ )}
-
- Connection
-
- ${this.selectedServer || "(none)"}
- Connections
- ${this.servers.map(
- (server) => html`
- ${server}
- `,
- )}
-
-
-
- Save
- Refresh
-
-
Run 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 = (event.target as HTMLSelectElement).value;
+ this.requestChange();
+ }}">
+ ${this.qsqlTarget || "(none)"}
- Populate Scratchpad ${this.isMetaLoaded ? "Meta Targets" : "Meta Not Loaded"}
-
+ ${this.renderTargetOptions()}
+
+
{
+ this.qsql = (event.target as HTMLSelectElement).value;
+ this.requestChange();
+ }}">
+
+ `;
+ }
+
+ renderSQL() {
+ return html`
+
{
+ this.sql = (event.target as HTMLSelectElement).value;
+ this.requestChange();
+ }}">
+
+ `;
+ }
+
+ renderTabGroup() {
+ return html`
+
+ {
+ this.selectedType = DataSourceTypes.API;
+ this.requestChange();
+ }}"
+ >API
+ {
+ this.selectedType = DataSourceTypes.QSQL;
+ this.requestChange();
+ }}"
+ >QSQL
+ {
+ this.selectedType = DataSourceTypes.SQL;
+ this.requestChange();
+ }}"
+ >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/components/styles.ts b/src/webview/components/styles.ts
index f5b6f22e..ed6f0ca5 100644
--- a/src/webview/components/styles.ts
+++ b/src/webview/components/styles.ts
@@ -13,6 +13,126 @@
import { css } from "lit";
+export const shoelaceStyles = css`
+ :host {
+ box-sizing: border-box;
+ }
+
+ sl-input,
+ sl-select {
+ --sl-focus-ring-width: 0;
+ }
+
+ 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-inputOption-hoverBackground);
+ }
+
+ 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);
+ }
+
+ 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(--sl-input-border-color);
+ }
+
+ sl-tab-group::part(tabs) {
+ --track-width: 1px;
+ --track-color: var(--vscode-inputOption-hoverBackground);
+ --indicator-color: var(--vscode-focusBorder);
+ }
+
+ sl-tab::part(base) {
+ --sl-color-primary-600: var(--vscode-foreground);
+ }
+
+ sl-checkbox::part(base) {
+ --sl-color-primary-600: var(--vscode-button-background);
+ --sl-input-background-color-hover: var(--vscode-button-hoverBackground);
+ }
+`;
+
+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;
diff --git a/src/webview/main.ts b/src/webview/main.ts
index 6609d97a..f98d874e 100644
--- a/src/webview/main.ts
+++ b/src/webview/main.ts
@@ -11,6 +11,21 @@
* 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/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";
+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/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..d887b3e8
--- /dev/null
+++ b/src/webview/styles/style.css
@@ -0,0 +1,59 @@
+.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;
+ --sl-focus-ring-color: var(--vscode-focusBorder);
+
+ --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-medium: 2px;
+ --sl-input-border-color-hover: 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);
+ --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;
+ line-height: 1.5;
+ font-size: var(--vscode-font-size);
+}
+
+body {
+ overflow: hidden;
+ 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%;
+ color: var(--vscode-foreground);
+ background-color: var(--vscode-editor-background);
+}