@jsenv/plugin-toolbar 0.1.2 → 0.1.3

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.
Files changed (66) hide show
  1. package/dist/css/toolbar.css +683 -7
  2. package/dist/js/toolbar_core.js +1792 -8
  3. package/dist/js/toolbar_injector.js +4 -2
  4. package/dist/jsenv_plugin_toolbar.js +6 -3
  5. package/package.json +1 -1
  6. package/dist/css/document_execution_indicator.css +0 -87
  7. package/dist/css/globals.css +0 -75
  8. package/dist/css/server_indicator.css +0 -83
  9. package/dist/css/theme_light.css +0 -110
  10. package/dist/css/toolbar_menu_overflow.css +0 -59
  11. package/dist/css/toolbar_settings.css +0 -202
  12. package/dist/css/tooltips.css +0 -67
  13. package/dist/js/animation.js +0 -282
  14. package/dist/js/animation_actions.js +0 -7
  15. package/dist/js/animation_effects.js +0 -10
  16. package/dist/js/animation_signals.js +0 -4
  17. package/dist/js/changes_actions.js +0 -7
  18. package/dist/js/changes_indicator.js +0 -57
  19. package/dist/js/changes_signals.js +0 -2
  20. package/dist/js/document_execution_indicator.js +0 -62
  21. package/dist/js/document_index_link.js +0 -4
  22. package/dist/js/dom.js +0 -48
  23. package/dist/js/execution_actions.js +0 -46
  24. package/dist/js/execution_effects.js +0 -16
  25. package/dist/js/execution_signals.js +0 -17
  26. package/dist/js/hooks.mjs +0 -185
  27. package/dist/js/iframe_to_parent_href.js +0 -10
  28. package/dist/js/notification_actions.js +0 -60
  29. package/dist/js/notification_context.js +0 -1
  30. package/dist/js/notification_effects.js +0 -9
  31. package/dist/js/notification_signals.js +0 -5
  32. package/dist/js/parent_window_actions.js +0 -39
  33. package/dist/js/parent_window_context.js +0 -6
  34. package/dist/js/parent_window_effects.js +0 -15
  35. package/dist/js/parent_window_signals.js +0 -25
  36. package/dist/js/preact.mjs +0 -316
  37. package/dist/js/responsive.js +0 -104
  38. package/dist/js/server_actions.js +0 -7
  39. package/dist/js/server_effects.js +0 -9
  40. package/dist/js/server_indicator.js +0 -52
  41. package/dist/js/server_signals.js +0 -10
  42. package/dist/js/settings_actions.js +0 -7
  43. package/dist/js/settings_signals.js +0 -2
  44. package/dist/js/signals-core.mjs +0 -339
  45. package/dist/js/signals.mjs +0 -202
  46. package/dist/js/theme_actions.js +0 -7
  47. package/dist/js/theme_effects.js +0 -6
  48. package/dist/js/theme_signals.js +0 -4
  49. package/dist/js/toolbar_animation_setting.js +0 -21
  50. package/dist/js/toolbar_autoreload_setting.js +0 -67
  51. package/dist/js/toolbar_close_button.js +0 -14
  52. package/dist/js/toolbar_menu_overflow.js +0 -81
  53. package/dist/js/toolbar_notification_setting.js +0 -72
  54. package/dist/js/toolbar_open_actions.js +0 -7
  55. package/dist/js/toolbar_open_effects.js +0 -4
  56. package/dist/js/toolbar_open_signals.js +0 -4
  57. package/dist/js/toolbar_opening.js +0 -65
  58. package/dist/js/toolbar_overlay.js +0 -69
  59. package/dist/js/toolbar_settings.js +0 -44
  60. package/dist/js/toolbar_state_context.js +0 -1
  61. package/dist/js/toolbar_state_effects.js +0 -8
  62. package/dist/js/toolbar_state_signals.js +0 -17
  63. package/dist/js/toolbar_theme_setting.js +0 -13
  64. package/dist/js/toolbar_ui.js +0 -20
  65. package/dist/js/tooltip_actions.js +0 -6
  66. package/dist/js/variant.js +0 -53
@@ -1,5 +1,5 @@
1
1
  const jsenvLogoSvgUrl = new URL("../other/jsenv_logo.svg", import.meta.url);
2
- export const injectToolbar = async ({
2
+ const injectToolbar = async ({
3
3
  toolbarUrl,
4
4
  logLevel,
5
5
  theme,
@@ -234,4 +234,6 @@ const iframeToLoadedPromise = iframe => {
234
234
  };
235
235
  iframe.addEventListener("load", onload, true);
236
236
  });
237
- };
237
+ };
238
+
239
+ export { injectToolbar };
@@ -1,5 +1,6 @@
1
- import { parseHtmlString, stringifyHtmlAst, injectScriptNodeAsEarlyAsPossible, createHtmlNode } from "@jsenv/ast";
2
- export const jsenvPluginToolbar = ({
1
+ import { parseHtmlString, injectScriptNodeAsEarlyAsPossible, createHtmlNode, stringifyHtmlAst } from "@jsenv/ast";
2
+
3
+ const jsenvPluginToolbar = ({
3
4
  logLevel = "warn",
4
5
  theme = "dark",
5
6
  opened = false,
@@ -51,4 +52,6 @@ injectToolbar(${JSON.stringify({
51
52
  }
52
53
  }
53
54
  };
54
- };
55
+ };
56
+
57
+ export { jsenvPluginToolbar };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/plugin-toolbar",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,87 +0,0 @@
1
- #execution_pending_icon {
2
- width: 20px;
3
- height: 20px;
4
- color: #cecece;
5
- margin: 10px;
6
- transform: scaleX(-1);
7
- }
8
-
9
- #execution_pending_icon[data-animate] {
10
- opacity: 0;
11
- transform-origin: center;
12
- animation: 1s linear infinite rotateLoader !important;
13
- }
14
-
15
- @keyframes rotateLoader {
16
- 0% {
17
- opacity: 1;
18
- transform: scaleX(-1)rotate(360deg);
19
- }
20
-
21
- 50% {
22
- opacity: 0;
23
- }
24
-
25
- 100% {
26
- opacity: 1;
27
- transform: scaleX(-1)rotate(0);
28
- }
29
- }
30
-
31
- #execution_completed_icon {
32
- width: 25px;
33
- height: 25px;
34
- opacity: 0;
35
- stroke-width: 5px;
36
- }
37
-
38
- #execution_completed_icon[data-animate] {
39
- opacity: 1;
40
- }
41
-
42
- #execution_completed_icon[data-animate] path {
43
- transform-origin: 50%;
44
- stroke-dasharray: 48;
45
- stroke-dashoffset: 48px;
46
- stroke: green;
47
- animation: .5s cubic-bezier(.65, 0, .45, 1) forwards stroke;
48
- }
49
-
50
- @keyframes stroke {
51
- 100% {
52
- stroke-dashoffset: 0;
53
- }
54
- }
55
-
56
- #execution_failed_icon {
57
- width: 20px;
58
- height: 20px;
59
- opacity: 0;
60
- stroke-width: 5px;
61
- margin: 10px;
62
- }
63
-
64
- #execution_failed_icon rect {
65
- width: 33px;
66
- height: 0;
67
- fill: #d74640;
68
- }
69
-
70
- #execution_failed_icon[data-animate] {
71
- opacity: 1;
72
- }
73
-
74
- #execution_failed_icon[data-animate] #cross_p1 {
75
- animation: .5s cubic-bezier(.65, 0, .45, 1) forwards draw;
76
- }
77
-
78
- #execution_failed_icon[data-animate] #cross_p2 {
79
- animation: .5s cubic-bezier(.65, 0, .45, 1) .2s forwards draw;
80
- }
81
-
82
- @keyframes draw {
83
- 100% {
84
- height: 376.964px;
85
- width: 45px;
86
- }
87
- }
@@ -1,75 +0,0 @@
1
- * {
2
- box-sizing: border-box;
3
- }
4
-
5
- html, body {
6
- height: 100%;
7
- margin: 0;
8
- padding: 0;
9
- }
10
-
11
- html {
12
- font-family: arial, sans;
13
- }
14
-
15
- html[data-animation-disabled] * {
16
- transition: none !important;
17
- animation-duration: 0s !important;
18
- animation-delay: 0s !important;
19
- }
20
-
21
- [data-when], [data-force-hide] {
22
- display: none !important;
23
- }
24
-
25
- button:focus, a:focus, input:focus, [data-contains-hidden-input] input:focus + * {
26
- outline-offset: -2px;
27
- outline-style: none;
28
- }
29
-
30
- [data-contains-hidden-input] input:focus + * {
31
- outline-offset: -2px;
32
- outline-width: 4px;
33
- }
34
-
35
- button:focus-visible, a:focus-visible, input:focus-visible, [data-contains-hidden-input] input:focus-visible + * {
36
- outline-style: auto;
37
- }
38
-
39
- [data-contains-hidden-input] input:focus-visible + * {
40
- outline-color: #0096ff;
41
- }
42
-
43
- @-moz-document url-prefix() {
44
- button:focus-visible, a:focus-visible, input:focus-visible, [data-input-customized] input:focus-visible + * {
45
- outline-offset: 0;
46
- outline: 2px solid #0096ff;
47
- }
48
- }
49
-
50
- ::-moz-focus-inner {
51
- border: 0;
52
- }
53
-
54
- #toolbar_wrapper {
55
- justify-content: center;
56
- display: flex;
57
- }
58
-
59
- #toolbar_overlay {
60
- width: 100%;
61
- height: 100%;
62
- filter: url(#better-blur);
63
- background-color: #0003;
64
- position: fixed;
65
- top: 0;
66
- left: 0;
67
- }
68
-
69
- #toolbar {
70
- height: 40px;
71
- width: 100%;
72
- background: #404040;
73
- position: fixed;
74
- bottom: 0;
75
- }
@@ -1,83 +0,0 @@
1
- #server_indicator button {
2
- position: relative;
3
- }
4
-
5
- #server_indicator button svg {
6
- width: 40px;
7
- height: 40px;
8
- }
9
-
10
- #server_indicator .autoreload {
11
- width: 32px;
12
- height: 32px;
13
- margin: 4px;
14
- position: absolute;
15
- top: 0;
16
- left: 0;
17
- }
18
-
19
- .autoreload[data-variant="enabled"] {
20
- color: green;
21
- }
22
-
23
- #server_indicator .icon {
24
- width: 40px;
25
- height: 40px;
26
- }
27
-
28
- .server_indicator_circle {
29
- stroke: #000;
30
- stroke-width: 0;
31
- }
32
-
33
- .server_indicator_circle[data-variant="connecting"] {
34
- fill: #cecece;
35
- transform-origin: center;
36
- animation: 1.2s ease-out infinite wink;
37
- }
38
-
39
- @keyframes wink {
40
- 0% {
41
- opacity: 0;
42
- }
43
-
44
- 80% {
45
- opacity: 1;
46
- }
47
-
48
- 100% {
49
- opacity: 0;
50
- }
51
- }
52
-
53
- .server_indicator_circle[data-variant="connected"] {
54
- fill: green;
55
- }
56
-
57
- .server_indicator_circle[data-variant="closed"] {
58
- fill: #c00;
59
- }
60
-
61
- .server_indicator_ring {
62
- stroke: #cecece75;
63
- stroke-width: 4px;
64
- fill: #0000;
65
- transform-origin: center;
66
- animation: 1.2s ease-out infinite pulse;
67
- }
68
-
69
- @keyframes pulse {
70
- 0% {
71
- opacity: 0;
72
- transform: scale(0);
73
- }
74
-
75
- 50% {
76
- opacity: 1;
77
- }
78
-
79
- 100% {
80
- opacity: 0;
81
- transform: scale(1);
82
- }
83
- }
@@ -1,110 +0,0 @@
1
- html[data-theme="light"] #toolbar {
2
- background: #e8eff3;
3
- }
4
-
5
- html[data-theme="light"] .toolbar_icon {
6
- fill: #404040;
7
- }
8
-
9
- html[data-theme="light"] .toolbar_icon:hover {
10
- fill: #757575 !important;
11
- }
12
-
13
- html[data-theme="light"] #loader-icon {
14
- color: #404040;
15
- }
16
-
17
- html[data-theme="light"] #settings-box, html[data-theme="light"] #settings[data-active] button {
18
- background: #87acd3;
19
- }
20
-
21
- html[data-theme="light"] .settings-box-item {
22
- background: #97b9da;
23
- }
24
-
25
- html[data-theme="light"] #settings-box-header .settings-icon {
26
- stroke: #076570;
27
- }
28
-
29
- html[data-theme="light"] #button-close-settings {
30
- fill: #076570;
31
- }
32
-
33
- html[data-theme="light"] #settings-box h3, html[data-theme="light"] #settings-box .category-title {
34
- color: #076570;
35
- }
36
-
37
- html[data-theme="light"] #settings-box .category-title svg {
38
- fill: #076570;
39
- }
40
-
41
- html[data-theme="light"] #settings-box .category-subtitle {
42
- color: #5d5d5d;
43
- }
44
-
45
- html[data-theme="light"] label {
46
- color: #002e33;
47
- }
48
-
49
- html[data-theme="light"] .switch input + * .slider, html[data-theme="light"] .switch input + * .square {
50
- background-color: gray;
51
- }
52
-
53
- html[data-theme="light"] .switch input:checked + * .slider, html[data-theme="light"] .switch input:checked + * .square {
54
- background-color: #076570;
55
- }
56
-
57
- html[data-theme="light"] .tooltip {
58
- color: #fff;
59
- background-color: #8a919a;
60
- }
61
-
62
- html[data-theme="light"] .tooltip_action {
63
- border-color: #fff;
64
- }
65
-
66
- html[data-theme="light"] .tooltip:after {
67
- border-color: #8a919a #0000 #0000;
68
- }
69
-
70
- html[data-theme="light"] #menu_overflow_button {
71
- background: #e8eff3;
72
- }
73
-
74
- html[data-theme="light"] #toolbar[data-menu-overflow-opened] #menu_overflow_button {
75
- background: #a5a9ad;
76
- }
77
-
78
- html[data-theme="light"] #menu_overflow {
79
- background: #dfe4e7;
80
- }
81
-
82
- html[data-theme="light"] h2, html[data-theme="light"] h4 {
83
- color: #076570;
84
- }
85
-
86
- html[data-theme="light"] #explorables_icon {
87
- fill: #076570;
88
- }
89
-
90
- html[data-theme="light"] #explorables h2 span {
91
- color: #ff8d00;
92
- }
93
-
94
- html[data-theme="light"] article[data-page="file-list"] {
95
- background: #bbd5ea;
96
- }
97
-
98
- html[data-theme="light"] #explorables fieldset input:checked + * {
99
- color: #ff8d00;
100
- background: #bbd5ea;
101
- }
102
-
103
- html[data-theme="light"] #explorables #explorables-header, html[data-theme="light"] #explorables fieldset label input + * {
104
- background: #ddf0ff;
105
- }
106
-
107
- html[data-theme="light"] .execution-link {
108
- color: #076570;
109
- background: #ddf0ff;
110
- }
@@ -1,59 +0,0 @@
1
- #menu_overflow_button {
2
- width: 40px;
3
- background: #404040;
4
- display: none;
5
- position: absolute;
6
- top: 0;
7
- right: 0;
8
- }
9
-
10
- #menu_overflow_icon {
11
- width: 25px;
12
- }
13
-
14
- #menu_overflow {
15
- visibility: hidden;
16
- width: 100%;
17
- height: 100%;
18
- opacity: 0;
19
- background: #404040;
20
- display: none;
21
- position: absolute;
22
- top: 0;
23
- bottom: 0;
24
- left: 100%;
25
- }
26
-
27
- #menu_overflow[data-animate] {
28
- transition-property: left, opacity;
29
- transition-duration: .3s;
30
- }
31
-
32
- #menu_overflow > * {
33
- vertical-align: middle;
34
- text-align: center;
35
- }
36
-
37
- #toolbar[data-menu-overflow-enabled] #menu_overflow_button {
38
- display: block;
39
- }
40
-
41
- #toolbar[data-menu-overflow-opened] #menu_overflow_button {
42
- background: #030713;
43
- }
44
-
45
- #toolbar[data-menu-overflow-enabled][data-menu-overflow-opened] #toolbar-wrapper {
46
- visibility: hidden;
47
- }
48
-
49
- #toolbar[data-menu-overflow-opened] #menu_overflow {
50
- visibility: visible;
51
- opacity: 1;
52
- margin-left: -40px;
53
- display: block;
54
- left: 0;
55
- }
56
-
57
- #toolbar[data-menu-overflow-enabled] #settings_box {
58
- right: -40px;
59
- }
@@ -1,202 +0,0 @@
1
- @import "./theme_light.css";
2
-
3
- #settings_button {
4
- position: relative;
5
- }
6
-
7
- #settings_button[data-warning] svg {
8
- fill: #cb5909;
9
- }
10
-
11
- #settings_button[data-warning] svg:hover {
12
- fill: #ff8c00 !important;
13
- }
14
-
15
- #settings_box {
16
- text-align: center;
17
- color: #fff;
18
- min-width: 250px;
19
- min-height: 150px;
20
- z-index: -1;
21
- background-color: #030713;
22
- border-radius: 5px 5px 0 0;
23
- padding: 17px;
24
- font-size: 14px;
25
- display: none;
26
- position: absolute;
27
- bottom: 40px;
28
- right: 0;
29
- }
30
-
31
- [data-active] #settings_box {
32
- animation: .3s comeUp;
33
- display: block;
34
- }
35
-
36
- @keyframes comeUp {
37
- 0% {
38
- opacity: 0;
39
- transform: translate(0, 90px);
40
- }
41
-
42
- 100% {
43
- opacity: 1;
44
- transform: translate(0);
45
- }
46
- }
47
-
48
- #settings_box_body {
49
- text-align: left;
50
- max-height: 80vh;
51
- width: 100vw;
52
- justify-content: center;
53
- padding: 18px 0;
54
- display: flex;
55
- overflow: auto;
56
- }
57
-
58
- .settings_box_items_wrapper {
59
- max-width: 700px;
60
- flex-wrap: wrap;
61
- justify-content: center;
62
- display: flex;
63
- }
64
-
65
- .settings_box_item {
66
- width: 250px;
67
- background: #0c111b;
68
- margin: 9px 18px;
69
- padding: 15px;
70
- }
71
-
72
- #settings_box_header .settings_icon {
73
- fill: none;
74
- stroke: #24b1b0;
75
- stroke-width: 2px;
76
- width: 22px;
77
- height: 22px;
78
- margin-right: 10px;
79
- position: relative;
80
- top: 4px;
81
- }
82
-
83
- #settings_box h3 {
84
- color: #24b1b0;
85
- margin: 10px 0;
86
- font-size: 20px;
87
- display: inline-block;
88
- }
89
-
90
- #settings_close_button {
91
- float: right;
92
- fill: #24b1b0;
93
- }
94
-
95
- #settings_close_button:hover {
96
- opacity: .6;
97
- }
98
-
99
- label {
100
- color: #a9a8a8;
101
- padding-bottom: 3px;
102
- font-size: 14px;
103
- display: block;
104
- }
105
-
106
- #settings_box .category_title {
107
- color: #24b1b0;
108
- margin-top: 4px;
109
- margin-bottom: 15px;
110
- font-size: 16px;
111
- display: inline-block;
112
- }
113
-
114
- #settings_box .category_title svg {
115
- fill: currentColor;
116
- vertical-align: top;
117
- width: 18px;
118
- height: 18px;
119
- margin-right: 5px;
120
- }
121
-
122
- #settings_box .category_subtitle {
123
- color: #a9a8a8;
124
- max-width: 220px;
125
- font-size: 14px;
126
- }
127
-
128
- .switch {
129
- float: right;
130
- width: 3.5em;
131
- height: 2em;
132
- cursor: pointer;
133
- padding: 0;
134
- position: relative;
135
- }
136
-
137
- .switch input {
138
- opacity: 0;
139
- width: 0;
140
- height: 0;
141
- position: absolute;
142
- }
143
-
144
- .switch .slider {
145
- vertical-align: middle;
146
- height: .3em;
147
- background-color: #4c4c4c;
148
- border-radius: .15em;
149
- margin-top: -.15em;
150
- transition: all .4s;
151
- position: absolute;
152
- top: 50%;
153
- left: .5em;
154
- right: .5em;
155
- }
156
-
157
- .switch .square {
158
- content: "";
159
- height: 1em;
160
- width: 1em;
161
- color: #030713;
162
- background-color: #4c4c4c;
163
- border-radius: .15em;
164
- margin-top: -.5em;
165
- transition: all .4s;
166
- position: absolute;
167
- top: 50%;
168
- left: .5em;
169
- }
170
-
171
- .switch input + * {
172
- width: 100%;
173
- height: 100%;
174
- border: 1px solid #0000;
175
- position: relative;
176
- }
177
-
178
- .switch input:checked + * .slider {
179
- background-color: #24b1b0;
180
- }
181
-
182
- .switch input:checked + * .square {
183
- background-color: #24b1b0;
184
- transform: translateX(1.6em);
185
- }
186
-
187
- .settings_box_item[data-disabled] {
188
- cursor: default;
189
- background-color: #0c111b66;
190
- }
191
-
192
- .settings_box_item[data-disabled] .category_title, .settings_box_item[data-disabled] .switch, .settings_box_item[data-disabled] .category_subtitle {
193
- opacity: .4;
194
- }
195
-
196
- .settings_box_item[data-disabled] .category_title span, .settings_box_item[data-disabled] .category_subtitle {
197
- text-decoration: line-through;
198
- }
199
-
200
- .settings_box_item[data-disabled] .switch {
201
- cursor: default;
202
- }
@@ -1,67 +0,0 @@
1
- .tooltip {
2
- color: #fff;
3
- text-align: center;
4
- max-width: 260px;
5
- cursor: default;
6
- background-color: #5e5e5e;
7
- border-radius: 6px;
8
- margin-bottom: 6px;
9
- padding: 10px;
10
- font-size: 14px;
11
- display: none;
12
- position: absolute;
13
- bottom: 100%;
14
- }
15
-
16
- .tooltip:after {
17
- content: "";
18
- border: 5px solid #0000;
19
- border-top-color: #5e5e5e;
20
- position: absolute;
21
- top: 100%;
22
- left: 14px;
23
- }
24
-
25
- .tooltip[data-toolip-left] {
26
- margin-right: 5px;
27
- }
28
-
29
- .tooltip[data-toolip-left]:after {
30
- left: 15px;
31
- }
32
-
33
- [data-tooltip-visible] .tooltip, [data-tooltip-auto-visible] .tooltip {
34
- animation: .4s fadeIn;
35
- display: block;
36
- }
37
-
38
- @keyframes fadeIn {
39
- 0% {
40
- opacity: 0;
41
- }
42
-
43
- 100% {
44
- opacity: 1;
45
- }
46
- }
47
-
48
- .tooltip_action {
49
- border: 1px solid #a0a0a0;
50
- border-radius: 3px;
51
- margin-top: 6px;
52
- padding: 3px 7px;
53
- display: inline-block;
54
- }
55
-
56
- .tooltip_action a {
57
- vertical-align: middle;
58
- color: #fff;
59
- text-decoration: none;
60
- }
61
-
62
- .tooltip_icon {
63
- fill: #fff;
64
- width: 20px;
65
- height: 20px;
66
- vertical-align: middle;
67
- }