@pb33f/cowboy-components 0.1.8 → 0.1.9
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/components/attention-box/attention-box.d.ts +5 -0
- package/dist/components/attention-box/attention-box.js +28 -5
- package/dist/components/footer/footer.css.d.ts +2 -0
- package/dist/components/footer/footer.css.js +21 -0
- package/dist/components/footer/footer.d.ts +8 -0
- package/dist/components/footer/footer.js +36 -0
- package/dist/components/header/header.css.js +98 -89
- package/dist/components/header/header.d.ts +1 -0
- package/dist/components/header/header.js +6 -2
- package/dist/components/the-doctor/activity-spinner.d.ts +8 -0
- package/dist/components/the-doctor/activity-spinner.js +43 -0
- package/dist/components/the-doctor/feedback.css.d.ts +2 -0
- package/dist/components/the-doctor/feedback.css.js +30 -0
- package/dist/components/the-doctor/feedback.d.ts +14 -0
- package/dist/components/the-doctor/feedback.js +83 -0
- package/dist/components/the-doctor/status-bar.js +2 -1
- package/dist/components/the-doctor/the-doctor.css.js +7 -3
- package/dist/components/the-doctor/the-doctor.d.ts +7 -1
- package/dist/components/the-doctor/the-doctor.js +58 -7
- package/dist/cowboy-components.d.ts +1 -0
- package/dist/cowboy-components.js +1 -0
- package/dist/cowboy-components.umd.cjs +480 -368
- package/dist/css/cowboy-components.css +0 -17
- package/dist/model/feedback.d.ts +4 -0
- package/dist/model/feedback.js +2 -0
- package/dist/services/feedback-service.d.ts +5 -0
- package/dist/services/feedback-service.js +30 -0
- package/dist/services/linting-service.d.ts +1 -0
- package/dist/services/linting-service.js +15 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -79,24 +79,7 @@ pre.chroma code {
|
|
|
79
79
|
background-color: transparent;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
footer {
|
|
83
|
-
padding: var(--footer-padding);
|
|
84
|
-
width: 100vw;
|
|
85
|
-
font-size: var(--footer-font-size);
|
|
86
|
-
height: var(--footer-height);
|
|
87
|
-
position: fixed;
|
|
88
|
-
bottom: 0;
|
|
89
|
-
background-color: var(--background-color);
|
|
90
|
-
z-index: 10;
|
|
91
|
-
border-top: 1px dashed var(--secondary-color);
|
|
92
|
-
}
|
|
93
82
|
|
|
94
|
-
footer > .generated-timestamp {
|
|
95
|
-
float: right;
|
|
96
|
-
margin-right: 15px;
|
|
97
|
-
font-weight: normal;
|
|
98
|
-
color: var(--font-color-sub2);
|
|
99
|
-
}
|
|
100
83
|
|
|
101
84
|
.table-of-contents ul {
|
|
102
85
|
list-style: none;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export class FeedbackService {
|
|
2
|
+
static async sendFeedback(email, message) {
|
|
3
|
+
return new Promise(async (resolve, reject) => {
|
|
4
|
+
try {
|
|
5
|
+
const feedbackResults = await fetch(FeedbackService.doctorEndpoint + '/feedback', {
|
|
6
|
+
method: 'POST',
|
|
7
|
+
credentials: 'include',
|
|
8
|
+
headers: {
|
|
9
|
+
'Content-Type': 'application/json'
|
|
10
|
+
},
|
|
11
|
+
body: JSON.stringify({ email: email, message: message })
|
|
12
|
+
});
|
|
13
|
+
const apiResult = await feedbackResults.json();
|
|
14
|
+
if (!apiResult) {
|
|
15
|
+
reject({ details: 'unable to send feedback' });
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
if (apiResult?.type && apiResult?.title && apiResult?.status) {
|
|
19
|
+
reject(apiResult);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
resolve(apiResult);
|
|
23
|
+
}
|
|
24
|
+
catch (e) {
|
|
25
|
+
reject({ details: 'unable to send feedback: ' + e });
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
FeedbackService.doctorEndpoint = 'https://doctor.pb33f.io';
|
|
@@ -117,5 +117,20 @@ export class LintingService {
|
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
|
+
static async bootstrapEditor() {
|
|
121
|
+
return new Promise(async (resolve, reject) => {
|
|
122
|
+
try {
|
|
123
|
+
const boostrapSpec = await fetch(LintingService.doctorEndpoint + '/bootstrap/train-travel', {
|
|
124
|
+
method: 'GET',
|
|
125
|
+
credentials: 'include',
|
|
126
|
+
});
|
|
127
|
+
const spec = await boostrapSpec.text();
|
|
128
|
+
resolve(spec);
|
|
129
|
+
}
|
|
130
|
+
catch (e) {
|
|
131
|
+
reject({ detail: "the pb33f platform is unresponsive" });
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
}
|
|
120
135
|
}
|
|
121
136
|
LintingService.doctorEndpoint = 'https://doctor.pb33f.io';
|