@jsenv/core 29.8.6 → 29.9.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/README.md +1 -1
- package/dist/js/autoreload.js +1 -1
- package/dist/main.js +50 -2085
- package/package.json +2 -2
- package/src/build/build.js +33 -33
- package/src/plugins/plugins.js +1 -1
- package/src/plugins/ribbon/jsenv_plugin_ribbon.js +6 -1
- package/src/plugins/url_resolution/jsenv_plugin_url_resolution.js +6 -2
- package/src/plugins/url_resolution/node_esm_resolver.js +6 -1
- package/dist/js/html_src_set.js +0 -20
- package/src/plugins/toolbar/client/animation/toolbar_animation.js +0 -39
- package/src/plugins/toolbar/client/eventsource/eventsource.css +0 -83
- package/src/plugins/toolbar/client/eventsource/toolbar_eventsource.js +0 -57
- package/src/plugins/toolbar/client/execution/execution.css +0 -79
- package/src/plugins/toolbar/client/execution/toolbar_execution.js +0 -88
- package/src/plugins/toolbar/client/focus/focus.css +0 -61
- package/src/plugins/toolbar/client/focus/toolbar_focus.js +0 -19
- package/src/plugins/toolbar/client/jsenv_logo.svg +0 -140
- package/src/plugins/toolbar/client/notification/toolbar_notification.js +0 -181
- package/src/plugins/toolbar/client/responsive/overflow_menu.css +0 -61
- package/src/plugins/toolbar/client/responsive/toolbar_responsive.js +0 -103
- package/src/plugins/toolbar/client/settings/settings.css +0 -201
- package/src/plugins/toolbar/client/settings/toolbar_settings.js +0 -47
- package/src/plugins/toolbar/client/theme/jsenv_theme.css +0 -77
- package/src/plugins/toolbar/client/theme/light_theme.css +0 -106
- package/src/plugins/toolbar/client/theme/toolbar_theme.js +0 -34
- package/src/plugins/toolbar/client/toolbar.html +0 -457
- package/src/plugins/toolbar/client/toolbar_injector.js +0 -218
- package/src/plugins/toolbar/client/toolbar_main.css +0 -172
- package/src/plugins/toolbar/client/toolbar_main.js +0 -197
- package/src/plugins/toolbar/client/tooltip/tooltip.css +0 -61
- package/src/plugins/toolbar/client/tooltip/tooltip.js +0 -39
- package/src/plugins/toolbar/client/util/animation.js +0 -305
- package/src/plugins/toolbar/client/util/dom.js +0 -108
- package/src/plugins/toolbar/client/util/fetch_using_xhr.js +0 -400
- package/src/plugins/toolbar/client/util/fetching.js +0 -14
- package/src/plugins/toolbar/client/util/iframe_to_parent_href.js +0 -10
- package/src/plugins/toolbar/client/util/jsenv_logger.js +0 -28
- package/src/plugins/toolbar/client/util/preferences.js +0 -10
- package/src/plugins/toolbar/client/util/responsive.js +0 -112
- package/src/plugins/toolbar/client/util/util.js +0 -19
- package/src/plugins/toolbar/client/variant/variant.js +0 -74
- package/src/plugins/toolbar/jsenv_plugin_toolbar.js +0 -62
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
toolbarSectionIsActive,
|
|
3
|
-
deactivateToolbarSection,
|
|
4
|
-
activateToolbarSection,
|
|
5
|
-
updateIframeOverflowOnParentWindow,
|
|
6
|
-
} from "../util/dom.js"
|
|
7
|
-
import { enableVariant } from "../variant/variant.js"
|
|
8
|
-
|
|
9
|
-
export const renderToolbarSettings = () => {
|
|
10
|
-
document.querySelector("#settings-button").onclick = toggleSettings
|
|
11
|
-
document.querySelector("#button-close-settings").onclick = toggleSettings
|
|
12
|
-
disableWarningStyle()
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const toggleSettings = () => {
|
|
16
|
-
if (settingsAreVisible()) {
|
|
17
|
-
hideSettings()
|
|
18
|
-
} else {
|
|
19
|
-
showSettings()
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export const enableWarningStyle = () => {
|
|
24
|
-
enableVariant(document.querySelector("#settings-button"), {
|
|
25
|
-
has_warning: "yes",
|
|
26
|
-
})
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export const disableWarningStyle = () => {
|
|
30
|
-
enableVariant(document.querySelector("#settings-button"), {
|
|
31
|
-
has_warning: "no",
|
|
32
|
-
})
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export const settingsAreVisible = () => {
|
|
36
|
-
return toolbarSectionIsActive(document.querySelector(`#settings`))
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export const hideSettings = () => {
|
|
40
|
-
deactivateToolbarSection(document.querySelector(`#settings`))
|
|
41
|
-
updateIframeOverflowOnParentWindow()
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export const showSettings = () => {
|
|
45
|
-
activateToolbarSection(document.querySelector(`#settings`))
|
|
46
|
-
updateIframeOverflowOnParentWindow()
|
|
47
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/* icons */
|
|
2
|
-
html[data-theme="jsenv"] .iconToolbar {
|
|
3
|
-
fill: #de5600;
|
|
4
|
-
}
|
|
5
|
-
html[data-theme="jsenv"] .iconToolbar:hover {
|
|
6
|
-
fill: #9a5300 !important;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
/* loaders */
|
|
10
|
-
html[data-theme="jsenv"] #loader-icon {
|
|
11
|
-
color: #404040;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/* settings */
|
|
15
|
-
html[data-theme="jsenv"] #settings-box,
|
|
16
|
-
html[data-theme="jsenv"] #settings[data-active] button {
|
|
17
|
-
background: #f7931e;
|
|
18
|
-
}
|
|
19
|
-
html[data-theme="jsenv"] .settings-box-item {
|
|
20
|
-
background: #ffa641;
|
|
21
|
-
}
|
|
22
|
-
html[data-theme="jsenv"] #settings-box-header .settings-icon {
|
|
23
|
-
stroke: #076570;
|
|
24
|
-
}
|
|
25
|
-
html[data-theme="jsenv"] #button-close-settings {
|
|
26
|
-
fill: #076570;
|
|
27
|
-
}
|
|
28
|
-
html[data-theme="jsenv"] #settings-box h3,
|
|
29
|
-
html[data-theme="jsenv"] #settings-box .category-title {
|
|
30
|
-
color: #076570;
|
|
31
|
-
}
|
|
32
|
-
html[data-theme="jsenv"] #settings-box .category-title svg {
|
|
33
|
-
fill: #076570;
|
|
34
|
-
}
|
|
35
|
-
html[data-theme="jsenv"] #settings-box .category-subtitle {
|
|
36
|
-
color: #076570;
|
|
37
|
-
}
|
|
38
|
-
html[data-theme="jsenv"] label {
|
|
39
|
-
color: #002e33;
|
|
40
|
-
}
|
|
41
|
-
html[data-theme="jsenv"] input:checked + .slider,
|
|
42
|
-
html[data-theme="jsenv"] .switch input:checked + .slider:before {
|
|
43
|
-
background-color: #de5600;
|
|
44
|
-
}
|
|
45
|
-
html[data-theme="jsenv"] .switch .slider,
|
|
46
|
-
html[data-theme="jsenv"] .switch .slider:before {
|
|
47
|
-
background-color: grey;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/* tooltips */
|
|
51
|
-
html[data-theme="jsenv"] .tooltip {
|
|
52
|
-
background-color: #ffd390;
|
|
53
|
-
color: #884900;
|
|
54
|
-
}
|
|
55
|
-
html[data-theme="jsenv"] .tooltipAction {
|
|
56
|
-
border-color: #884900;
|
|
57
|
-
}
|
|
58
|
-
html[data-theme="jsenv"] .tooltipAction a {
|
|
59
|
-
color: #884900;
|
|
60
|
-
}
|
|
61
|
-
html[data-theme="jsenv"] .tooltipIcon {
|
|
62
|
-
fill: #884900;
|
|
63
|
-
}
|
|
64
|
-
html[data-theme="jsenv"] .tooltip::after {
|
|
65
|
-
border-color: #ffd390 transparent transparent transparent;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/* page file list */
|
|
69
|
-
html[data-theme="jsenv"] h2 {
|
|
70
|
-
color: orange;
|
|
71
|
-
}
|
|
72
|
-
html[data-theme="jsenv"] #fileIconSvgConfig {
|
|
73
|
-
fill: orange;
|
|
74
|
-
}
|
|
75
|
-
html[data-theme="jsenv"] #explorables h2 span {
|
|
76
|
-
color: #24b1b0;
|
|
77
|
-
}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
/* general */
|
|
2
|
-
html[data-theme="light"] #toolbar {
|
|
3
|
-
background: #e8eff3;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
/* icons */
|
|
7
|
-
html[data-theme="light"] .iconToolbar {
|
|
8
|
-
fill: #404040;
|
|
9
|
-
}
|
|
10
|
-
html[data-theme="light"] .iconToolbar:hover {
|
|
11
|
-
fill: #757575 !important;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/* loaders */
|
|
15
|
-
html[data-theme="light"] #loader-icon {
|
|
16
|
-
color: #404040;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/* settings */
|
|
20
|
-
html[data-theme="light"] #settings-box,
|
|
21
|
-
html[data-theme="light"] #settings[data-active] button {
|
|
22
|
-
background: #87acd3;
|
|
23
|
-
}
|
|
24
|
-
html[data-theme="light"] .settings-box-item {
|
|
25
|
-
background: #97b9da;
|
|
26
|
-
}
|
|
27
|
-
html[data-theme="light"] #settings-box-header .settings-icon {
|
|
28
|
-
stroke: #076570;
|
|
29
|
-
}
|
|
30
|
-
html[data-theme="light"] #button-close-settings {
|
|
31
|
-
fill: #076570;
|
|
32
|
-
}
|
|
33
|
-
html[data-theme="light"] #settings-box h3,
|
|
34
|
-
html[data-theme="light"] #settings-box .category-title {
|
|
35
|
-
color: #076570;
|
|
36
|
-
}
|
|
37
|
-
html[data-theme="light"] #settings-box .category-title svg {
|
|
38
|
-
fill: #076570;
|
|
39
|
-
}
|
|
40
|
-
html[data-theme="light"] #settings-box .category-subtitle {
|
|
41
|
-
color: #5d5d5d;
|
|
42
|
-
}
|
|
43
|
-
html[data-theme="light"] label {
|
|
44
|
-
color: #002e33;
|
|
45
|
-
}
|
|
46
|
-
html[data-theme="light"] .switch input + * .slider,
|
|
47
|
-
html[data-theme="light"] .switch input + * .square {
|
|
48
|
-
background-color: grey;
|
|
49
|
-
}
|
|
50
|
-
html[data-theme="light"] .switch input:checked + * .slider,
|
|
51
|
-
html[data-theme="light"] .switch input:checked + * .square {
|
|
52
|
-
background-color: #076570;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/* tooltips */
|
|
56
|
-
html[data-theme="light"] .tooltip {
|
|
57
|
-
background-color: rgb(138, 145, 154);
|
|
58
|
-
color: #fff;
|
|
59
|
-
}
|
|
60
|
-
html[data-theme="light"] .tooltipAction {
|
|
61
|
-
border-color: #fff;
|
|
62
|
-
}
|
|
63
|
-
html[data-theme="light"] .tooltip::after {
|
|
64
|
-
border-color: rgb(138, 145, 154) transparent transparent transparent;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/* overflow menu */
|
|
68
|
-
html[data-theme="light"] #overflow-menu-button {
|
|
69
|
-
background: #e8eff3;
|
|
70
|
-
}
|
|
71
|
-
html[data-theme="light"]
|
|
72
|
-
#toolbar[data-overflow-menu-visible]
|
|
73
|
-
#overflow-menu-button {
|
|
74
|
-
background: #a5a9ad;
|
|
75
|
-
}
|
|
76
|
-
html[data-theme="light"] #overflow-menu {
|
|
77
|
-
background: #dfe4e7;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/* page file list */
|
|
81
|
-
html[data-theme="light"] h2,
|
|
82
|
-
html[data-theme="light"] h4 {
|
|
83
|
-
color: #076570;
|
|
84
|
-
}
|
|
85
|
-
html[data-theme="light"] #fileIconSvgConfig {
|
|
86
|
-
fill: #076570;
|
|
87
|
-
}
|
|
88
|
-
html[data-theme="light"] #explorables h2 span {
|
|
89
|
-
color: #ff8d00;
|
|
90
|
-
}
|
|
91
|
-
html[data-theme="light"] article[data-page="file-list"],
|
|
92
|
-
html[data-theme="light"] #file-list-link[data-active] a {
|
|
93
|
-
background: #bbd5ea;
|
|
94
|
-
}
|
|
95
|
-
html[data-theme="light"] #explorables fieldset input:checked + * {
|
|
96
|
-
color: #ff8d00;
|
|
97
|
-
background: #bbd5ea;
|
|
98
|
-
}
|
|
99
|
-
html[data-theme="light"] #explorables #explorables-header,
|
|
100
|
-
html[data-theme="light"] #explorables fieldset label input + * {
|
|
101
|
-
background: #ddf0ff;
|
|
102
|
-
}
|
|
103
|
-
html[data-theme="light"] .execution-link {
|
|
104
|
-
background: #ddf0ff;
|
|
105
|
-
color: #076570;
|
|
106
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { createPreference } from "../util/preferences.js"
|
|
2
|
-
|
|
3
|
-
const DARK_THEME = "dark"
|
|
4
|
-
const LIGHT_THEME = "light"
|
|
5
|
-
const themePreference = createPreference("theme")
|
|
6
|
-
|
|
7
|
-
export const renderToolbarTheme = () => {
|
|
8
|
-
const theme = getThemePreference()
|
|
9
|
-
const checkbox = document.querySelector("#checkbox-dark-theme")
|
|
10
|
-
checkbox.checked = theme === DARK_THEME
|
|
11
|
-
setTheme(theme)
|
|
12
|
-
checkbox.onchange = () => {
|
|
13
|
-
if (checkbox.checked) {
|
|
14
|
-
setThemePreference(DARK_THEME)
|
|
15
|
-
setTheme(DARK_THEME)
|
|
16
|
-
} else {
|
|
17
|
-
setThemePreference(LIGHT_THEME)
|
|
18
|
-
setTheme(LIGHT_THEME)
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const getThemePreference = () => {
|
|
24
|
-
return themePreference.has() ? themePreference.get() : DARK_THEME
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const setThemePreference = (value) => {
|
|
28
|
-
themePreference.set(value)
|
|
29
|
-
setTheme(value)
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const setTheme = (theme) => {
|
|
33
|
-
document.querySelector("html").setAttribute("data-theme", theme)
|
|
34
|
-
}
|