@jsenv/core 38.4.19 → 38.4.20
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/js/ribbon.js
CHANGED
|
@@ -37,26 +37,34 @@ const injectRibbon = ({ text }) => {
|
|
|
37
37
|
user-select: none;
|
|
38
38
|
}
|
|
39
39
|
`;
|
|
40
|
-
|
|
41
40
|
const html = /* html */ `<div id="jsenv_ribbon_container">
|
|
42
41
|
<style>${css}</style>
|
|
43
42
|
<div id="jsenv_ribbon">
|
|
44
43
|
<div id="jsenv_ribbon_text">${text}</div>
|
|
45
44
|
</div>
|
|
46
45
|
</div>`;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
class JsenvRibbonHtmlElement extends HTMLElement {
|
|
47
|
+
constructor({ hidden }) {
|
|
48
|
+
super();
|
|
49
|
+
const root = this.attachShadow({ mode: "open" });
|
|
50
|
+
root.innerHTML = html;
|
|
51
|
+
if (hidden) {
|
|
52
|
+
root.style.display = "none";
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
if (customElements && !customElements.get("jsenv-ribbon")) {
|
|
57
|
+
customElements.define("jsenv-ribbon", JsenvRibbonHtmlElement);
|
|
58
|
+
}
|
|
51
59
|
const toolbarStateInLocalStorage = localStorage.hasOwnProperty(
|
|
52
60
|
"jsenv_toolbar",
|
|
53
61
|
)
|
|
54
62
|
? JSON.parse(localStorage.getItem("jsenv_toolbar"))
|
|
55
63
|
: {};
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
document.body.appendChild(
|
|
64
|
+
const jsenvRibbonElement = new JsenvRibbonHtmlElement({
|
|
65
|
+
hidden: toolbarStateInLocalStorage.ribbonDisplayed === false,
|
|
66
|
+
});
|
|
67
|
+
document.body.appendChild(jsenvRibbonElement);
|
|
60
68
|
};
|
|
61
69
|
|
|
62
70
|
export { injectRibbon };
|
package/dist/jsenv_core.js
CHANGED
|
@@ -15928,7 +15928,8 @@ const jsenvPluginHtmlReferenceAnalysis = ({
|
|
|
15928
15928
|
line,
|
|
15929
15929
|
column,
|
|
15930
15930
|
});
|
|
15931
|
-
|
|
15931
|
+
urlInfo.kitchen.context.logger
|
|
15932
|
+
.error(`Error while handling ${urlInfo.context.request ? urlInfo.context.request.url : urlInfo.url}:
|
|
15932
15933
|
${e.reasonCode}
|
|
15933
15934
|
${urlInfo.url}:${line}:${column}
|
|
15934
15935
|
${htmlErrorContentFrame}`);
|
package/package.json
CHANGED
|
@@ -151,7 +151,8 @@ export const jsenvPluginHtmlReferenceAnalysis = ({
|
|
|
151
151
|
line,
|
|
152
152
|
column,
|
|
153
153
|
});
|
|
154
|
-
|
|
154
|
+
urlInfo.kitchen.context.logger
|
|
155
|
+
.error(`Error while handling ${urlInfo.context.request ? urlInfo.context.request.url : urlInfo.url}:
|
|
155
156
|
${e.reasonCode}
|
|
156
157
|
${urlInfo.url}:${line}:${column}
|
|
157
158
|
${htmlErrorContentFrame}`);
|
|
@@ -37,24 +37,32 @@ export const injectRibbon = ({ text }) => {
|
|
|
37
37
|
user-select: none;
|
|
38
38
|
}
|
|
39
39
|
`;
|
|
40
|
-
|
|
41
40
|
const html = /* html */ `<div id="jsenv_ribbon_container">
|
|
42
41
|
<style>${css}</style>
|
|
43
42
|
<div id="jsenv_ribbon">
|
|
44
43
|
<div id="jsenv_ribbon_text">${text}</div>
|
|
45
44
|
</div>
|
|
46
45
|
</div>`;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
class JsenvRibbonHtmlElement extends HTMLElement {
|
|
47
|
+
constructor({ hidden }) {
|
|
48
|
+
super();
|
|
49
|
+
const root = this.attachShadow({ mode: "open" });
|
|
50
|
+
root.innerHTML = html;
|
|
51
|
+
if (hidden) {
|
|
52
|
+
root.style.display = "none";
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
if (customElements && !customElements.get("jsenv-ribbon")) {
|
|
57
|
+
customElements.define("jsenv-ribbon", JsenvRibbonHtmlElement);
|
|
58
|
+
}
|
|
51
59
|
const toolbarStateInLocalStorage = localStorage.hasOwnProperty(
|
|
52
60
|
"jsenv_toolbar",
|
|
53
61
|
)
|
|
54
62
|
? JSON.parse(localStorage.getItem("jsenv_toolbar"))
|
|
55
63
|
: {};
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
document.body.appendChild(
|
|
64
|
+
const jsenvRibbonElement = new JsenvRibbonHtmlElement({
|
|
65
|
+
hidden: toolbarStateInLocalStorage.ribbonDisplayed === false,
|
|
66
|
+
});
|
|
67
|
+
document.body.appendChild(jsenvRibbonElement);
|
|
60
68
|
};
|