@pb33f/cowboy-components 0.6.7 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/equalizer.worker-DyLD5JTU.js +1 -0
- package/dist/assets/search-problems.worker-BAF8L2rX.js +1 -0
- package/dist/components/changelog/changelog.js +1 -1
- package/dist/components/charts/beefy-chart.d.ts +21 -0
- package/dist/components/charts/beefy-chart.js +159 -0
- package/dist/components/charts/chart-colors.d.ts +27 -0
- package/dist/components/charts/chart-colors.js +76 -0
- package/dist/components/charts/config.d.ts +15 -0
- package/dist/components/charts/config.js +35 -0
- package/dist/components/charts/doughnut-chart.d.ts +22 -0
- package/dist/components/charts/doughnut-chart.js +128 -0
- package/dist/components/editor/editor.d.ts +9 -3
- package/dist/components/editor/editor.js +115 -60
- package/dist/components/editor/init.d.ts +0 -0
- package/dist/components/editor/init.js +28 -0
- package/dist/components/editor/schemas/openapi3.json +1651 -0
- package/dist/components/editor/schemas/openapi31.json +1449 -0
- package/dist/components/model-icon/model-icon.js +3 -0
- package/dist/components/model-renderer/callback.js +2 -1
- package/dist/components/model-renderer/change.css.d.ts +2 -0
- package/dist/components/model-renderer/change.css.js +254 -0
- package/dist/components/model-renderer/changes.d.ts +19 -0
- package/dist/components/model-renderer/changes.js +306 -0
- package/dist/components/model-renderer/clickable-ref.d.ts +10 -6
- package/dist/components/model-renderer/clickable-ref.js +9 -0
- package/dist/components/model-renderer/components.js +1 -0
- package/dist/components/model-renderer/contact.js +2 -1
- package/dist/components/model-renderer/document.js +11 -9
- package/dist/components/model-renderer/encoding.js +1 -0
- package/dist/components/model-renderer/example.js +1 -0
- package/dist/components/model-renderer/external-docs.js +1 -0
- package/dist/components/model-renderer/has-changes.d.ts +8 -0
- package/dist/components/model-renderer/has-changes.js +50 -0
- package/dist/components/model-renderer/header.js +1 -0
- package/dist/components/model-renderer/info.js +3 -1
- package/dist/components/model-renderer/license.js +3 -3
- package/dist/components/model-renderer/link.js +1 -1
- package/dist/components/model-renderer/media-type.js +1 -1
- package/dist/components/model-renderer/oauth-flows.js +2 -1
- package/dist/components/model-renderer/operation.js +2 -1
- package/dist/components/model-renderer/parameter.js +1 -0
- package/dist/components/model-renderer/path-item.js +1 -0
- package/dist/components/model-renderer/paths.js +1 -0
- package/dist/components/model-renderer/rendered-node.js +20 -20
- package/dist/components/model-renderer/rendered-property.css.js +4 -0
- package/dist/components/model-renderer/rendered-property.js +5 -2
- package/dist/components/model-renderer/request-body.js +1 -1
- package/dist/components/model-renderer/response.js +1 -1
- package/dist/components/model-renderer/schema.js +57 -54
- package/dist/components/model-renderer/security-scheme.js +1 -1
- package/dist/components/model-renderer/server.js +1 -0
- package/dist/components/model-renderer/tag.js +3 -1
- package/dist/components/model-tree/tree.d.ts +7 -4
- package/dist/components/model-tree/tree.js +54 -25
- package/dist/components/paginator/paginator.css.js +5 -2
- package/dist/components/problem-list/problem-mainview.js +8 -1
- package/dist/components/rodeo/npm/download-statistic.d.ts +41 -0
- package/dist/components/rodeo/npm/download-statistic.js +634 -0
- package/dist/components/rodeo/rodeo-nav.js +1 -0
- package/dist/components/rodeo/rodeo.d.ts +1 -0
- package/dist/components/rodeo/rodeo.js +9 -2
- package/dist/components/rodeo/statistic.css.js +17 -0
- package/dist/components/rodeo/statistic.d.ts +4 -2
- package/dist/components/rodeo/statistic.js +15 -4
- package/dist/components/the-doctor/settings.css.d.ts +2 -0
- package/dist/components/the-doctor/settings.css.js +28 -0
- package/dist/components/the-doctor/settings.d.ts +13 -0
- package/dist/components/the-doctor/settings.js +83 -2
- package/dist/components/the-doctor/the-doctor.css.js +80 -47
- package/dist/components/the-doctor/the-doctor.d.ts +24 -6
- package/dist/components/the-doctor/the-doctor.js +344 -109
- package/dist/components/the-doctor/upload-archive.js +1 -1
- package/dist/components/theme-switcher/theme-switcher.d.ts +1 -1
- package/dist/components/theme-switcher/theme-switcher.js +5 -2
- package/dist/components/time-vortex/change-list-item.css.d.ts +2 -0
- package/dist/components/time-vortex/change-list-item.css.js +96 -0
- package/dist/components/time-vortex/change-list-item.d.ts +10 -0
- package/dist/components/time-vortex/change-list-item.js +58 -0
- package/dist/components/time-vortex/history-picker.css.d.ts +2 -0
- package/dist/components/time-vortex/history-picker.css.js +90 -0
- package/dist/components/time-vortex/history-picker.d.ts +18 -0
- package/dist/components/time-vortex/history-picker.js +143 -0
- package/dist/components/time-vortex/spec-summary-timeline-item.css.d.ts +2 -0
- package/dist/components/time-vortex/spec-summary-timeline-item.css.js +144 -0
- package/dist/components/time-vortex/spec-summary-timeline-item.d.ts +11 -0
- package/dist/components/time-vortex/spec-summary-timeline-item.js +153 -0
- package/dist/components/time-vortex/tardis-control.css.d.ts +2 -0
- package/dist/components/time-vortex/tardis-control.css.js +103 -0
- package/dist/components/time-vortex/tardis-control.d.ts +32 -0
- package/dist/components/time-vortex/tardis-control.js +286 -0
- package/dist/components/time-vortex/time-vortex.d.ts +17 -0
- package/dist/components/time-vortex/time-vortex.js +75 -0
- package/dist/components/time-vortex/timeline-view.css.d.ts +2 -0
- package/dist/components/time-vortex/timeline-view.css.js +28 -0
- package/dist/components/time-vortex/timeline-view.d.ts +32 -0
- package/dist/components/time-vortex/timeline-view.js +233 -0
- package/dist/components/timeline/timeline-item.css.js +95 -48
- package/dist/components/timeline/timeline-item.d.ts +1 -0
- package/dist/components/timeline/timeline-item.js +20 -1
- package/dist/components/timeline/timeline.css.js +46 -40
- package/dist/components/timeline/timeline.d.ts +1 -0
- package/dist/components/timeline/timeline.js +9 -5
- package/dist/components/toast/toast-component.css.js +4 -0
- package/dist/components/visualizer/equalizer.d.ts +2 -0
- package/dist/components/visualizer/equalizer.js +13 -5
- package/dist/components/visualizer/explorer.d.ts +5 -0
- package/dist/components/visualizer/explorer.js +41 -37
- package/dist/components/visualizer/foreign-object.js +3 -0
- package/dist/components/visualizer/nodes/callback.js +3 -1
- package/dist/components/visualizer/nodes/changes.css.d.ts +2 -0
- package/dist/components/visualizer/nodes/changes.css.js +33 -0
- package/dist/components/visualizer/nodes/components.js +3 -1
- package/dist/components/visualizer/nodes/contact.js +3 -1
- package/dist/components/visualizer/nodes/document.js +1 -0
- package/dist/components/visualizer/nodes/graph-node.d.ts +8 -7
- package/dist/components/visualizer/nodes/graph-node.js +55 -1
- package/dist/components/visualizer/nodes/header.js +3 -1
- package/dist/components/visualizer/nodes/info.js +3 -1
- package/dist/components/visualizer/nodes/license.js +8 -1
- package/dist/components/visualizer/nodes/link.js +3 -1
- package/dist/components/visualizer/nodes/media-type.js +3 -1
- package/dist/components/visualizer/nodes/operation.js +4 -1
- package/dist/components/visualizer/nodes/parameter.js +3 -1
- package/dist/components/visualizer/nodes/path-item.js +3 -1
- package/dist/components/visualizer/nodes/request-body.js +3 -1
- package/dist/components/visualizer/nodes/response.js +3 -1
- package/dist/components/visualizer/nodes/schema.js +3 -1
- package/dist/components/visualizer/nodes/security-scheme.js +3 -1
- package/dist/components/visualizer/nodes/server.js +3 -1
- package/dist/components/visualizer/nodes/tag.js +3 -1
- package/dist/components/visualizer/nodes/xml.js +3 -1
- package/dist/components/visualizer/orientation-controls.d.ts +1 -0
- package/dist/components/visualizer/orientation-controls.js +31 -16
- package/dist/components/visualizer/search.js +4 -3
- package/dist/components/warning-stripe/warning-stripe.d.ts +20 -0
- package/dist/components/warning-stripe/warning-stripe.js +124 -0
- package/dist/cowboy-components.umd.cjs +3840 -2216
- package/dist/css/panels.css.d.ts +2 -0
- package/dist/css/panels.css.js +44 -0
- package/dist/css/pb33f-theme.css +8 -1
- package/dist/css/scrollbar.css.d.ts +2 -0
- package/dist/css/scrollbar.css.js +16 -0
- package/dist/css/tabs.css.js +1 -1
- package/dist/events/doctor.d.ts +15 -1
- package/dist/events/doctor.js +5 -0
- package/dist/model/api-response.d.ts +6 -0
- package/dist/model/api-response.js +2 -0
- package/dist/model/chart-data.d.ts +15 -0
- package/dist/model/chart-data.js +1 -0
- package/dist/model/diagnostic-report.d.ts +5 -0
- package/dist/model/diagnostic-report.js +3 -0
- package/dist/model/document.d.ts +1 -0
- package/dist/model/graph.d.ts +26 -0
- package/dist/model/media-type.d.ts +2 -0
- package/dist/model/media-type.js +7 -0
- package/dist/model/node_type.d.ts +2 -0
- package/dist/model/node_type.js +2 -0
- package/dist/model/settings.d.ts +5 -0
- package/dist/model/settings.js +1 -0
- package/dist/model/timeline.d.ts +33 -0
- package/dist/model/timeline.js +1 -0
- package/dist/monacoeditorwork/css.worker.bundle.js +53460 -0
- package/dist/monacoeditorwork/editor.worker.bundle.js +13517 -0
- package/dist/monacoeditorwork/html.worker.bundle.js +29660 -0
- package/dist/monacoeditorwork/json.worker.bundle.js +21318 -0
- package/dist/monacoeditorwork/yaml.worker..bundle.js +37321 -0
- package/dist/services/color-service.d.ts +1 -0
- package/dist/services/color-service.js +13 -0
- package/dist/services/linting-service.d.ts +1 -3
- package/dist/services/linting-service.js +21 -29
- package/dist/services/model-service.d.ts +1 -1
- package/dist/services/model-service.js +35 -8
- package/dist/services/rodeo-service.d.ts +6 -0
- package/dist/services/rodeo-service.js +134 -0
- package/dist/services/timeline-service.d.ts +8 -0
- package/dist/services/timeline-service.js +85 -0
- package/dist/style.css +1 -1
- package/dist/workers/equalizer.worker.js +1 -1
- package/dist/workers/search-problems.worker.js +1 -1
- package/package.json +6 -1
- package/dist/assets/css.worker-Byh--afc.js +0 -84
- package/dist/assets/editor.worker-CYC0jP-p.js +0 -12
- package/dist/assets/equalizer.worker-CdIiiqfH.js +0 -1
- package/dist/assets/html.worker-DArWg-Dy.js +0 -461
- package/dist/assets/json.worker-heCfXoJw.js +0 -49
- package/dist/assets/search-problems.worker-VJi4P9Gj.js +0 -1
|
@@ -19,6 +19,7 @@ import { AuthController } from "../../controllers/auth.js";
|
|
|
19
19
|
import { RodeoService } from "../../services/rodeo-service.js";
|
|
20
20
|
import { RodeoRoundup } from "./roundup.js";
|
|
21
21
|
import { PlatformEventType } from "../../model/platform-events.js";
|
|
22
|
+
import { RodeoDownloadStatistics } from "./npm/download-statistic";
|
|
22
23
|
let Rodeo = class Rodeo extends LitElement {
|
|
23
24
|
constructor() {
|
|
24
25
|
super();
|
|
@@ -29,6 +30,7 @@ let Rodeo = class Rodeo extends LitElement {
|
|
|
29
30
|
this.bus.mapChannelToBrokerDestination(QueuePrefix + DoctorServiceChannel, DoctorServiceChannel);
|
|
30
31
|
this.doctorChannelSubscription = this.doctorServiceChannel.subscribe(this.doctorServiceHandler());
|
|
31
32
|
this.roundupComponent = new RodeoRoundup();
|
|
33
|
+
this.downloadStatisticsComponent = new RodeoDownloadStatistics();
|
|
32
34
|
// extract port from session storage.
|
|
33
35
|
this.busPort = sessionStorage.getItem("pb33f-doctor-port");
|
|
34
36
|
this.busHost = sessionStorage.getItem("pb33f-doctor-host");
|
|
@@ -74,8 +76,8 @@ let Rodeo = class Rodeo extends LitElement {
|
|
|
74
76
|
const router = new Router(this.shadowRoot?.getElementById('outlet'));
|
|
75
77
|
router?.setRoutes([
|
|
76
78
|
{
|
|
77
|
-
path: '
|
|
78
|
-
return this.
|
|
79
|
+
path: 'rodeo.html', action: () => {
|
|
80
|
+
return this.downloadStatisticsComponent;
|
|
79
81
|
}
|
|
80
82
|
},
|
|
81
83
|
{
|
|
@@ -83,6 +85,11 @@ let Rodeo = class Rodeo extends LitElement {
|
|
|
83
85
|
return this.roundupComponent;
|
|
84
86
|
}
|
|
85
87
|
},
|
|
88
|
+
{
|
|
89
|
+
path: '/rodeo/download-stats', action: () => {
|
|
90
|
+
return this.downloadStatisticsComponent;
|
|
91
|
+
}
|
|
92
|
+
},
|
|
86
93
|
{
|
|
87
94
|
path: '/rodeo/', action: () => {
|
|
88
95
|
return this.roundupComponent;
|
|
@@ -11,6 +11,13 @@ export default css `
|
|
|
11
11
|
padding: 10px;
|
|
12
12
|
margin: 10px;
|
|
13
13
|
}
|
|
14
|
+
|
|
15
|
+
.statistic.small {
|
|
16
|
+
width: 170px;
|
|
17
|
+
height: 40px;
|
|
18
|
+
padding: 5px;
|
|
19
|
+
}
|
|
20
|
+
|
|
14
21
|
.title {
|
|
15
22
|
height: 30px;
|
|
16
23
|
font-size: 1.2rem;
|
|
@@ -18,6 +25,11 @@ export default css `
|
|
|
18
25
|
color: var(--secondary-color)
|
|
19
26
|
}
|
|
20
27
|
|
|
28
|
+
.title.small {
|
|
29
|
+
font-size: 0.9rem;
|
|
30
|
+
height: 20px;
|
|
31
|
+
}
|
|
32
|
+
|
|
21
33
|
.details {
|
|
22
34
|
display: flex;
|
|
23
35
|
flex-wrap: wrap;
|
|
@@ -29,6 +41,11 @@ export default css `
|
|
|
29
41
|
color: var(--primary-color);
|
|
30
42
|
text-shadow: 0 0 20px var(--primary-color-lowalpha);
|
|
31
43
|
}
|
|
44
|
+
|
|
45
|
+
.value.small {
|
|
46
|
+
font-size: 1rem;
|
|
47
|
+
font-family: var(--font-stack-bold), sans-serif;
|
|
48
|
+
}
|
|
32
49
|
|
|
33
50
|
@keyframes pulse {
|
|
34
51
|
0% {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { LitElement } from "lit";
|
|
1
|
+
import { LitElement, TemplateResult } from "lit";
|
|
2
2
|
import '@shoelace-style/shoelace/dist/components/format-number/format-number.js';
|
|
3
3
|
export declare class Statistic extends LitElement {
|
|
4
4
|
static styles: import("lit").CSSResult[];
|
|
5
5
|
title: string;
|
|
6
6
|
value: number;
|
|
7
|
+
label: string;
|
|
8
|
+
small: boolean;
|
|
7
9
|
constructor();
|
|
8
|
-
render():
|
|
10
|
+
render(): TemplateResult<1>;
|
|
9
11
|
updated(changedProperties: Map<string, unknown>): void;
|
|
10
12
|
}
|
|
@@ -12,16 +12,21 @@ let Statistic = class Statistic extends LitElement {
|
|
|
12
12
|
constructor() {
|
|
13
13
|
super();
|
|
14
14
|
this.title = 'statistic';
|
|
15
|
+
this.small = false;
|
|
15
16
|
}
|
|
16
17
|
render() {
|
|
18
|
+
let val = html `<sl-format-number value="${this.value}"></sl-format-number></span>`;
|
|
19
|
+
if (!this.value && this.label !== "") {
|
|
20
|
+
val = html `${this.label}`;
|
|
21
|
+
}
|
|
17
22
|
return html `
|
|
18
|
-
<div class="statistic">
|
|
19
|
-
<div class="title">
|
|
23
|
+
<div class="statistic ${this.small ? 'small' : ''}">
|
|
24
|
+
<div class="title ${this.small ? 'small' : ''}">
|
|
20
25
|
${this.title}
|
|
21
26
|
</div>
|
|
22
27
|
<div class="details">
|
|
23
|
-
<span class="value">
|
|
24
|
-
|
|
28
|
+
<span class="value ${this.small ? 'small' : ''}">
|
|
29
|
+
${val}
|
|
25
30
|
</div>
|
|
26
31
|
</div>`;
|
|
27
32
|
}
|
|
@@ -53,6 +58,12 @@ __decorate([
|
|
|
53
58
|
__decorate([
|
|
54
59
|
property({ type: Number })
|
|
55
60
|
], Statistic.prototype, "value", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
property({ type: String })
|
|
63
|
+
], Statistic.prototype, "label", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
property({ type: Boolean })
|
|
66
|
+
], Statistic.prototype, "small", void 0);
|
|
56
67
|
Statistic = __decorate([
|
|
57
68
|
customElement('pb33f-rodeo-statistic')
|
|
58
69
|
], Statistic);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
export default css `
|
|
3
|
+
:host {
|
|
4
|
+
font-size: 0.8rem;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
header {
|
|
8
|
+
font-size: 0.9rem;
|
|
9
|
+
border-bottom: 1px solid var(--secondary-color);
|
|
10
|
+
margin-bottom: 10px;
|
|
11
|
+
padding-bottom: 10px;
|
|
12
|
+
padding-top: 10px;
|
|
13
|
+
}
|
|
14
|
+
small {
|
|
15
|
+
display: block;
|
|
16
|
+
padding-top: 10px;
|
|
17
|
+
color: var(--font-color-sub1);
|
|
18
|
+
font-size: 0.7rem;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.setting-control {
|
|
22
|
+
width: 500px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.control {
|
|
26
|
+
margin-bottom: 20px;
|
|
27
|
+
}
|
|
28
|
+
`;
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
+
import { SlDialog } from "@shoelace-style/shoelace";
|
|
3
|
+
import { Bag } from "@pb33f/saddlebag";
|
|
4
|
+
import { DoctorConfiguration } from "../../model/settings.js";
|
|
5
|
+
import '../theme-switcher/theme-switcher.js';
|
|
2
6
|
export declare class DoctorSettings extends LitElement {
|
|
7
|
+
static styles: import("lit").CSSResult[];
|
|
8
|
+
opened: boolean;
|
|
9
|
+
dialog: SlDialog;
|
|
10
|
+
settings: DoctorConfiguration;
|
|
11
|
+
settingsBag: Bag<DoctorConfiguration> | undefined;
|
|
3
12
|
constructor();
|
|
13
|
+
updateSettings(): void;
|
|
14
|
+
bootstrap(): DoctorConfiguration;
|
|
15
|
+
open(): void;
|
|
16
|
+
close(): void;
|
|
4
17
|
render(): import("lit-html").TemplateResult<1>;
|
|
5
18
|
}
|
|
@@ -4,16 +4,97 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { customElement } from "lit/decorators.js";
|
|
7
|
+
import { customElement, query, state } from "lit/decorators.js";
|
|
8
8
|
import { html, LitElement } from "lit";
|
|
9
|
+
import dialogCss from "../../css/dialog.css.js";
|
|
10
|
+
import buttonCss from "../../css/button.css.js";
|
|
11
|
+
import { SettingsBag } from "./the-doctor.js";
|
|
12
|
+
import settingsCss from "./settings.css.js";
|
|
13
|
+
import '../theme-switcher/theme-switcher.js';
|
|
14
|
+
import { AttentionType } from "../attention-box/attention-box";
|
|
9
15
|
let DoctorSettings = class DoctorSettings extends LitElement {
|
|
10
16
|
constructor() {
|
|
11
17
|
super();
|
|
18
|
+
this.opened = false;
|
|
19
|
+
}
|
|
20
|
+
updateSettings() {
|
|
21
|
+
const autoDiagnose = this.shadowRoot?.querySelector('sl-switch#autoDiagnose');
|
|
22
|
+
const skipTimeline = this.shadowRoot?.querySelector('sl-switch#skipTimeline');
|
|
23
|
+
if (this.settings) {
|
|
24
|
+
this.settings.autoDiagnose = autoDiagnose.checked;
|
|
25
|
+
this.settings.skipTimeline = !skipTimeline.checked;
|
|
26
|
+
this.settingsBag?.set(SettingsBag, this.settings);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
bootstrap() {
|
|
30
|
+
const initial = {
|
|
31
|
+
autoDiagnose: true,
|
|
32
|
+
skipTimeline: false,
|
|
33
|
+
applicationVersion: "bootstrap"
|
|
34
|
+
};
|
|
35
|
+
if (!this.settingsBag) {
|
|
36
|
+
return initial;
|
|
37
|
+
}
|
|
38
|
+
const bagSettings = this.settingsBag.get(SettingsBag);
|
|
39
|
+
if (bagSettings) {
|
|
40
|
+
this.settings = bagSettings;
|
|
41
|
+
return bagSettings;
|
|
42
|
+
}
|
|
43
|
+
this.settings = initial;
|
|
44
|
+
return this.settings;
|
|
45
|
+
}
|
|
46
|
+
open() {
|
|
47
|
+
this.opened = true;
|
|
48
|
+
this.dialog.show();
|
|
49
|
+
this.requestUpdate();
|
|
50
|
+
}
|
|
51
|
+
close() {
|
|
52
|
+
this.opened = false;
|
|
53
|
+
this.dialog.hide();
|
|
54
|
+
this.requestUpdate();
|
|
12
55
|
}
|
|
13
56
|
render() {
|
|
14
|
-
return html
|
|
57
|
+
return html `
|
|
58
|
+
<sl-dialog label="Settings" class="dialog-width" style="--width: 550px;">
|
|
59
|
+
<div class="setting-control">
|
|
60
|
+
<div class="control">
|
|
61
|
+
<header>Auto Diagnosis</header>
|
|
62
|
+
<sl-switch @sl-change="${this.updateSettings}" id="autoDiagnose"
|
|
63
|
+
?checked="${this.settings?.autoDiagnose}"></sl-switch>
|
|
64
|
+
Automatically diagnose when editing<br/>
|
|
65
|
+
<small>The doctor will run a diagnosis and record a change every time you type.
|
|
66
|
+
To stop this, disable auto diagnosis and a manual button will appear.</small>
|
|
67
|
+
</div>
|
|
68
|
+
<div class="control">
|
|
69
|
+
<header>Tardis control</header>
|
|
70
|
+
<sl-switch @sl-change="${this.updateSettings}" id="skipTimeline"
|
|
71
|
+
?checked="${!this.settings?.skipTimeline}"></sl-switch> Track changes and quality<br/>
|
|
72
|
+
<small>Every diagnosis will track all the changes made to the OpenAPI document
|
|
73
|
+
and keep a full audit trail, like a time machine.</small>
|
|
74
|
+
</div>
|
|
75
|
+
<div class="control">
|
|
76
|
+
<header>Dark / Light Mode (experimental)</header>
|
|
77
|
+
<pb33f-attention-box type="${AttentionType.Warning}">
|
|
78
|
+
<strong>This is experimental and incomplete</strong><br/><br/>
|
|
79
|
+
<strong>A lot of the colors are going to be wrong or missing</strong>.
|
|
80
|
+
</pb33f-attention-box>
|
|
81
|
+
<pb33f-theme-switcher></pb33f-theme-switcher>
|
|
82
|
+
<small>
|
|
83
|
+
Switch between light and dark mode (it's going to look bad in light mode) <strong>
|
|
84
|
+
</small>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
<sl-button slot="footer" variant="primary" @click="${this.close}">Close</sl-button>
|
|
88
|
+
</sl-dialog>`;
|
|
15
89
|
}
|
|
16
90
|
};
|
|
91
|
+
DoctorSettings.styles = [settingsCss, dialogCss, buttonCss];
|
|
92
|
+
__decorate([
|
|
93
|
+
query('sl-dialog')
|
|
94
|
+
], DoctorSettings.prototype, "dialog", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
state()
|
|
97
|
+
], DoctorSettings.prototype, "settings", void 0);
|
|
17
98
|
DoctorSettings = __decorate([
|
|
18
99
|
customElement("pb33f-doctor-settings")
|
|
19
100
|
], DoctorSettings);
|
|
@@ -51,47 +51,47 @@ export default css `
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
sl-split-panel {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
sl-split-panel::part(divider) {
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
sl-icon.divider-vert {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
sl-icon.divider-horiz {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
sl-split-panel::part(divider):focus-visible {
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
sl-split-panel:focus-within sl-icon {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
54
|
+
//sl-split-panel {
|
|
55
|
+
// width: 100%;
|
|
56
|
+
// height: 100%;
|
|
57
|
+
// --divider-width: 2px;
|
|
58
|
+
//}
|
|
59
|
+
//
|
|
60
|
+
//
|
|
61
|
+
//sl-split-panel::part(divider) {
|
|
62
|
+
// background-color: var(--secondary-color);
|
|
63
|
+
//}
|
|
64
|
+
//
|
|
65
|
+
//sl-icon.divider-vert {
|
|
66
|
+
// position: absolute;
|
|
67
|
+
// left: 2px;
|
|
68
|
+
// border-radius: 0;
|
|
69
|
+
// background: var(--secondary-color);
|
|
70
|
+
// color: var(--background-color);
|
|
71
|
+
// padding: 0;
|
|
72
|
+
// width: 10px;
|
|
73
|
+
// height: 40px;
|
|
74
|
+
//}
|
|
75
|
+
//
|
|
76
|
+
//sl-icon.divider-horiz {
|
|
77
|
+
// position: absolute;
|
|
78
|
+
// border-radius: 0;
|
|
79
|
+
// background: var(--secondary-color);
|
|
80
|
+
// color: var(--background-color);
|
|
81
|
+
// padding: 0;
|
|
82
|
+
// width: 40px;
|
|
83
|
+
// height: 8px;
|
|
84
|
+
//}
|
|
85
|
+
//
|
|
86
|
+
//
|
|
87
|
+
//sl-split-panel::part(divider):focus-visible {
|
|
88
|
+
// background-color: var(--primary-color);
|
|
89
|
+
//}
|
|
90
|
+
//
|
|
91
|
+
//sl-split-panel:focus-within sl-icon {
|
|
92
|
+
// background-color: var(--primary-color);
|
|
93
|
+
// color: var(--background-color);
|
|
94
|
+
//}
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
.unavailable {
|
|
@@ -184,12 +184,12 @@ export default css `
|
|
|
184
184
|
}
|
|
185
185
|
|
|
186
186
|
.tab-panel {
|
|
187
|
-
height:
|
|
188
|
-
width: 100%;
|
|
187
|
+
//height: calc(100vh - 125px);
|
|
188
|
+
width: 100%;
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
.tab-group {
|
|
192
|
-
height: 100%
|
|
192
|
+
//height: 100%
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
sl-tab-panel.tab-panel::part(base) {
|
|
@@ -238,7 +238,7 @@ export default css `
|
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
pb33f-toast-manager {
|
|
241
|
-
|
|
241
|
+
|
|
242
242
|
position: absolute;
|
|
243
243
|
top: 10px;
|
|
244
244
|
right: 0;
|
|
@@ -355,10 +355,18 @@ export default css `
|
|
|
355
355
|
line-height: 1.2rem;
|
|
356
356
|
margin-top: 0;
|
|
357
357
|
}
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
.settings-toggle {
|
|
361
|
+
position: absolute;
|
|
362
|
+
right: 10px;
|
|
363
|
+
top: -5px;
|
|
364
|
+
z-index: 10;
|
|
365
|
+
}
|
|
358
366
|
|
|
359
367
|
.minimap-toggle {
|
|
360
368
|
position: absolute;
|
|
361
|
-
right:
|
|
369
|
+
right: 40px;
|
|
362
370
|
top: -5px;
|
|
363
371
|
z-index: 10;
|
|
364
372
|
}
|
|
@@ -366,6 +374,10 @@ export default css `
|
|
|
366
374
|
sl-tooltip.minimap-tip::part(base) {
|
|
367
375
|
font-size: 1rem;
|
|
368
376
|
}
|
|
377
|
+
|
|
378
|
+
sl-tooltip.settings-tip::part(base) {
|
|
379
|
+
font-size: 1rem;
|
|
380
|
+
}
|
|
369
381
|
|
|
370
382
|
.minimap-toggle.active {
|
|
371
383
|
color: var(--warn-color)
|
|
@@ -376,6 +388,20 @@ export default css `
|
|
|
376
388
|
margin: 0 10px 0 10px;
|
|
377
389
|
}
|
|
378
390
|
|
|
391
|
+
.diagnose-button {
|
|
392
|
+
position: absolute;
|
|
393
|
+
right: 80px;
|
|
394
|
+
top: -5px;
|
|
395
|
+
z-index: 10;
|
|
396
|
+
height: 20px;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.diagnose-button::part(base) {
|
|
400
|
+
height: 20px;
|
|
401
|
+
padding: 0;
|
|
402
|
+
line-height: 18px;
|
|
403
|
+
}
|
|
404
|
+
|
|
379
405
|
.nuke-session-button::part(base) {
|
|
380
406
|
padding: 0;
|
|
381
407
|
}
|
|
@@ -408,7 +434,14 @@ export default css `
|
|
|
408
434
|
font-size: 5rem;
|
|
409
435
|
animation: spin 2s linear infinite;
|
|
410
436
|
}
|
|
411
|
-
|
|
437
|
+
.model-tree-panel {
|
|
438
|
+
height: calc(100vh - 165px);
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
.timevortex {
|
|
442
|
+
padding-top: 5px;
|
|
443
|
+
}
|
|
444
|
+
|
|
412
445
|
@keyframes spin {
|
|
413
446
|
0% {
|
|
414
447
|
transform: rotate(0deg);
|
|
@@ -9,7 +9,7 @@ import '@shoelace-style/shoelace/dist/components/badge/badge.js';
|
|
|
9
9
|
import '@shoelace-style/shoelace/dist/components/avatar/avatar.js';
|
|
10
10
|
import { LitElement } from "lit";
|
|
11
11
|
import { SpecEditor } from "../editor/editor.js";
|
|
12
|
-
import { AddToastEvent, ArchiveURLRequestedEvent, DocumentReference, EditorUpdatedEvent, ExplorerEqualizerChangedEvent, NodeClickedEvent, NodeReferenceEvent, ProblemRuleFilterChangedEvent, RuleClickedEvent, RulesetSavedEvent } from "../../events/doctor.js";
|
|
12
|
+
import { AddToastEvent, ArchiveURLRequestedEvent, DocumentReference, EditorUpdatedEvent, ExplorerEqualizerChangedEvent, LoadRenderedNodeIntoInspectorEvent, NodeClickedEvent, NodeReferenceEvent, ProblemRuleFilterChangedEvent, RuleClickedEvent, RulesetSavedEvent } from "../../events/doctor.js";
|
|
13
13
|
import { ProblemDrawerEvent } from "../problem-list/details-drawer.js";
|
|
14
14
|
import { Problem } from "../../model/problem.js";
|
|
15
15
|
import { SlButton, SlDialog, SlIcon, SlInput, SlRadioGroup, SlSplitPanel, SlTab, SlTabGroup } from "@shoelace-style/shoelace";
|
|
@@ -22,6 +22,7 @@ import { ModelTree } from "../model-tree/tree.js";
|
|
|
22
22
|
import { ExplorerComponent } from "../visualizer/explorer.js";
|
|
23
23
|
import { RenderedNodeComponent } from "../model-renderer/rendered-node.js";
|
|
24
24
|
import { BusCallback, CommandResponse } from "@pb33f/ranch";
|
|
25
|
+
import { DoctorConfiguration } from "../../model/settings.js";
|
|
25
26
|
export declare const GraphBag = "pb33f-doctor-graph";
|
|
26
27
|
export declare const PanelStateBag = "pb33f-doctor-panel-state";
|
|
27
28
|
export declare const RolodexResponseBag = "pb33f-doctor-rolodex-response";
|
|
@@ -42,6 +43,7 @@ export declare const FunctionsSchemaBag = "pb33f-doctor-function-schema";
|
|
|
42
43
|
export declare const CustomRulesetBag = "pb33f-doctor-custom-ruleset";
|
|
43
44
|
export declare const RuleConfigurationBag = "pb33f-doctor-rule-configuration";
|
|
44
45
|
export declare const SessionRulesetMapBag = "pb33f-doctor-session-rulesetmap";
|
|
46
|
+
export declare const SettingsBag = "pb33f-doctor-settings";
|
|
45
47
|
export declare const DefaultDocument = "pb33f-doctor-document";
|
|
46
48
|
export declare const DocumentProblems = "pb33f-doctor-problems";
|
|
47
49
|
export declare const DoctorEndpoint = "doctor-endpoint";
|
|
@@ -51,6 +53,7 @@ export declare class TheDoctor extends LitElement {
|
|
|
51
53
|
problemsPanel: SlTab;
|
|
52
54
|
viewerPanel: SlTab;
|
|
53
55
|
explorerPanel: SlTab;
|
|
56
|
+
historyPanel: SlTab;
|
|
54
57
|
controlTabGroup: SlTabGroup;
|
|
55
58
|
editorTabGroup: SlTabGroup;
|
|
56
59
|
welcomeBox: AttentionBox;
|
|
@@ -82,6 +85,9 @@ export declare class TheDoctor extends LitElement {
|
|
|
82
85
|
explorerBooted: boolean;
|
|
83
86
|
activeURL: string;
|
|
84
87
|
rolodexNeedsReset: boolean;
|
|
88
|
+
private autoDiagnose;
|
|
89
|
+
private skipTimeline;
|
|
90
|
+
private showDiagnosisButton;
|
|
85
91
|
editor: SpecEditor;
|
|
86
92
|
rolodexRoot: Node;
|
|
87
93
|
rolodexProblemMap: Map<string, Problem[]>;
|
|
@@ -106,6 +112,7 @@ export declare class TheDoctor extends LitElement {
|
|
|
106
112
|
private rolodexStateBag;
|
|
107
113
|
private referenceMapBag;
|
|
108
114
|
private panelStateBag;
|
|
115
|
+
private settingsBag;
|
|
109
116
|
private docExpirationBag;
|
|
110
117
|
private graphBag;
|
|
111
118
|
private ruleDocsBag;
|
|
@@ -130,10 +137,12 @@ export declare class TheDoctor extends LitElement {
|
|
|
130
137
|
private customRuleset;
|
|
131
138
|
private functions;
|
|
132
139
|
private readonly toastManager;
|
|
140
|
+
private readonly settingsComponent;
|
|
133
141
|
private editorMap;
|
|
134
142
|
private selectedEditorTab;
|
|
135
143
|
private sidebarClosed;
|
|
136
144
|
private importDisabled;
|
|
145
|
+
private currentVersion;
|
|
137
146
|
renderedNodeMap: Map<string, Node>;
|
|
138
147
|
selectedNodeHashId: string;
|
|
139
148
|
modelTree: ModelTree;
|
|
@@ -162,7 +171,15 @@ export declare class TheDoctor extends LitElement {
|
|
|
162
171
|
private pendingLine;
|
|
163
172
|
private rolodexDividerPosition;
|
|
164
173
|
private authController;
|
|
174
|
+
private timeVortex;
|
|
175
|
+
rolodexRootPath: string;
|
|
176
|
+
rolodexRootHash: string;
|
|
177
|
+
rolodexActivePath: string | undefined;
|
|
178
|
+
rolodexActiveHash: string | undefined;
|
|
165
179
|
constructor(doctorEndpoint?: string);
|
|
180
|
+
openSettings(): void;
|
|
181
|
+
settingsChanged(_: string, config: DoctorConfiguration | undefined): void;
|
|
182
|
+
loadRenderedNodeIntoInspector(evt: CustomEvent<LoadRenderedNodeIntoInspectorEvent>): void;
|
|
166
183
|
tickRandomly(): void;
|
|
167
184
|
nukeWorkspaceHandler(): void;
|
|
168
185
|
minimapToggled(): void;
|
|
@@ -179,14 +196,10 @@ export declare class TheDoctor extends LitElement {
|
|
|
179
196
|
filterTreeModel(event: CustomEvent<ExplorerEqualizerChangedEvent>): void;
|
|
180
197
|
documentReferenceClicked(evt: CustomEvent<DocumentReference>): void;
|
|
181
198
|
explorerReferenceClicked(evt: CustomEvent<NodeReferenceEvent>): void;
|
|
182
|
-
rolodexRootPath: string;
|
|
183
|
-
rolodexRootHash: string;
|
|
184
|
-
rolodexActivePath: string | undefined;
|
|
185
|
-
rolodexActiveHash: string | undefined;
|
|
186
199
|
rolodexTreeNodeClicked(evt: CustomEvent<NodeClickedEvent>): void;
|
|
187
200
|
rolodexRootFileSelected(evt: CustomEvent<NodeClickedEvent>): void;
|
|
188
201
|
modelTreeNodeClicked(evt: CustomEvent<NodeClickedEvent>): void;
|
|
189
|
-
explorerNodeClicked(evt: CustomEvent<NodeClickedEvent
|
|
202
|
+
explorerNodeClicked(evt: CustomEvent<NodeClickedEvent>, replaceRenderedNode?: boolean): void;
|
|
190
203
|
exportRuleset(): void;
|
|
191
204
|
addToastEvent(event: CustomEvent<AddToastEvent>): void;
|
|
192
205
|
sendToast(toast: Toast): void;
|
|
@@ -218,6 +231,7 @@ export declare class TheDoctor extends LitElement {
|
|
|
218
231
|
builtInRulesetSelected(): void;
|
|
219
232
|
rulesetManuallyChanged(): void;
|
|
220
233
|
specChanged(event: CustomEvent<EditorUpdatedEvent>): void;
|
|
234
|
+
runDiagnostics(): void;
|
|
221
235
|
boostrap(): void;
|
|
222
236
|
exportJSON(): void;
|
|
223
237
|
exportYAML(): void;
|
|
@@ -226,8 +240,11 @@ export declare class TheDoctor extends LitElement {
|
|
|
226
240
|
selectEditorTab(event: CustomEvent): void;
|
|
227
241
|
selectControlTab(event: CustomEvent): void;
|
|
228
242
|
toggleSidebar(): void;
|
|
243
|
+
showHistory(): void;
|
|
229
244
|
toggleExplorer(): void;
|
|
230
245
|
hideMinimapIcon(): void;
|
|
246
|
+
hideDiagnosisButton(): void;
|
|
247
|
+
enableDiagnosisButton(): void;
|
|
231
248
|
showMinimapIcon(): void;
|
|
232
249
|
closeExplorer(): void;
|
|
233
250
|
render(): import("lit-html").TemplateResult<1>;
|
|
@@ -235,4 +252,5 @@ export declare class TheDoctor extends LitElement {
|
|
|
235
252
|
hideUrlError(): void;
|
|
236
253
|
showUrlError(e: PlatformError): void;
|
|
237
254
|
ungrabExplorer(): void;
|
|
255
|
+
selectTardis(): void;
|
|
238
256
|
}
|