@jsenv/plugin-toolbar 0.1.0 → 0.1.2

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/document_execution_indicator.css +87 -0
  2. package/dist/css/globals.css +75 -0
  3. package/dist/css/server_indicator.css +83 -0
  4. package/dist/css/theme_light.css +110 -0
  5. package/dist/css/toolbar.css +7 -683
  6. package/dist/css/toolbar_menu_overflow.css +59 -0
  7. package/dist/css/toolbar_settings.css +202 -0
  8. package/dist/css/tooltips.css +67 -0
  9. package/dist/js/animation.js +282 -0
  10. package/dist/js/animation_actions.js +7 -0
  11. package/dist/js/animation_effects.js +10 -0
  12. package/dist/js/animation_signals.js +4 -0
  13. package/dist/js/changes_actions.js +7 -0
  14. package/dist/js/changes_indicator.js +57 -0
  15. package/dist/js/changes_signals.js +2 -0
  16. package/dist/js/document_execution_indicator.js +62 -0
  17. package/dist/js/document_index_link.js +4 -0
  18. package/dist/js/dom.js +48 -0
  19. package/dist/js/execution_actions.js +46 -0
  20. package/dist/js/execution_effects.js +16 -0
  21. package/dist/js/execution_signals.js +17 -0
  22. package/dist/js/hooks.mjs +185 -0
  23. package/dist/js/iframe_to_parent_href.js +10 -0
  24. package/dist/js/notification_actions.js +60 -0
  25. package/dist/js/notification_context.js +1 -0
  26. package/dist/js/notification_effects.js +9 -0
  27. package/dist/js/notification_signals.js +5 -0
  28. package/dist/js/parent_window_actions.js +39 -0
  29. package/dist/js/parent_window_context.js +6 -0
  30. package/dist/js/parent_window_effects.js +15 -0
  31. package/dist/js/parent_window_signals.js +25 -0
  32. package/dist/js/preact.mjs +316 -0
  33. package/dist/js/responsive.js +104 -0
  34. package/dist/js/server_actions.js +7 -0
  35. package/dist/js/server_effects.js +9 -0
  36. package/dist/js/server_indicator.js +52 -0
  37. package/dist/js/server_signals.js +10 -0
  38. package/dist/js/settings_actions.js +7 -0
  39. package/dist/js/settings_signals.js +2 -0
  40. package/dist/js/signals-core.mjs +339 -0
  41. package/dist/js/signals.mjs +202 -0
  42. package/dist/js/theme_actions.js +7 -0
  43. package/dist/js/theme_effects.js +6 -0
  44. package/dist/js/theme_signals.js +4 -0
  45. package/dist/js/toolbar_animation_setting.js +21 -0
  46. package/dist/js/toolbar_autoreload_setting.js +67 -0
  47. package/dist/js/toolbar_close_button.js +14 -0
  48. package/dist/js/toolbar_core.js +8 -1792
  49. package/dist/js/toolbar_injector.js +2 -4
  50. package/dist/js/toolbar_menu_overflow.js +81 -0
  51. package/dist/js/toolbar_notification_setting.js +72 -0
  52. package/dist/js/toolbar_open_actions.js +7 -0
  53. package/dist/js/toolbar_open_effects.js +4 -0
  54. package/dist/js/toolbar_open_signals.js +4 -0
  55. package/dist/js/toolbar_opening.js +65 -0
  56. package/dist/js/toolbar_overlay.js +69 -0
  57. package/dist/js/toolbar_settings.js +44 -0
  58. package/dist/js/toolbar_state_context.js +1 -0
  59. package/dist/js/toolbar_state_effects.js +8 -0
  60. package/dist/js/toolbar_state_signals.js +17 -0
  61. package/dist/js/toolbar_theme_setting.js +13 -0
  62. package/dist/js/toolbar_ui.js +20 -0
  63. package/dist/js/tooltip_actions.js +6 -0
  64. package/dist/js/variant.js +53 -0
  65. package/dist/jsenv_plugin_toolbar.js +3 -6
  66. package/package.json +2 -2
@@ -1,685 +1,9 @@
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
- }
76
- #execution_pending_icon {
77
- width: 20px;
78
- height: 20px;
79
- color: #cecece;
80
- margin: 10px;
81
- transform: scaleX(-1);
82
- }
83
-
84
- #execution_pending_icon[data-animate] {
85
- opacity: 0;
86
- transform-origin: center;
87
- animation: 1s linear infinite rotateLoader !important;
88
- }
89
-
90
- @keyframes rotateLoader {
91
- 0% {
92
- opacity: 1;
93
- transform: scaleX(-1)rotate(360deg);
94
- }
95
-
96
- 50% {
97
- opacity: 0;
98
- }
99
-
100
- 100% {
101
- opacity: 1;
102
- transform: scaleX(-1)rotate(0);
103
- }
104
- }
105
-
106
- #execution_completed_icon {
107
- width: 25px;
108
- height: 25px;
109
- opacity: 0;
110
- stroke-width: 5px;
111
- }
112
-
113
- #execution_completed_icon[data-animate] {
114
- opacity: 1;
115
- }
116
-
117
- #execution_completed_icon[data-animate] path {
118
- transform-origin: 50%;
119
- stroke-dasharray: 48;
120
- stroke-dashoffset: 48px;
121
- stroke: green;
122
- animation: .5s cubic-bezier(.65, 0, .45, 1) forwards stroke;
123
- }
124
-
125
- @keyframes stroke {
126
- 100% {
127
- stroke-dashoffset: 0;
128
- }
129
- }
130
-
131
- #execution_failed_icon {
132
- width: 20px;
133
- height: 20px;
134
- opacity: 0;
135
- stroke-width: 5px;
136
- margin: 10px;
137
- }
138
-
139
- #execution_failed_icon rect {
140
- width: 33px;
141
- height: 0;
142
- fill: #d74640;
143
- }
144
-
145
- #execution_failed_icon[data-animate] {
146
- opacity: 1;
147
- }
148
-
149
- #execution_failed_icon[data-animate] #cross_p1 {
150
- animation: .5s cubic-bezier(.65, 0, .45, 1) forwards draw;
151
- }
152
-
153
- #execution_failed_icon[data-animate] #cross_p2 {
154
- animation: .5s cubic-bezier(.65, 0, .45, 1) .2s forwards draw;
155
- }
156
-
157
- @keyframes draw {
158
- 100% {
159
- height: 376.964px;
160
- width: 45px;
161
- }
162
- }
163
- #server_indicator button {
164
- position: relative;
165
- }
166
-
167
- #server_indicator button svg {
168
- width: 40px;
169
- height: 40px;
170
- }
171
-
172
- #server_indicator .autoreload {
173
- width: 32px;
174
- height: 32px;
175
- margin: 4px;
176
- position: absolute;
177
- top: 0;
178
- left: 0;
179
- }
180
-
181
- .autoreload[data-variant="enabled"] {
182
- color: green;
183
- }
184
-
185
- #server_indicator .icon {
186
- width: 40px;
187
- height: 40px;
188
- }
189
-
190
- .server_indicator_circle {
191
- stroke: #000;
192
- stroke-width: 0;
193
- }
194
-
195
- .server_indicator_circle[data-variant="connecting"] {
196
- fill: #cecece;
197
- transform-origin: center;
198
- animation: 1.2s ease-out infinite wink;
199
- }
200
-
201
- @keyframes wink {
202
- 0% {
203
- opacity: 0;
204
- }
205
-
206
- 80% {
207
- opacity: 1;
208
- }
209
-
210
- 100% {
211
- opacity: 0;
212
- }
213
- }
214
-
215
- .server_indicator_circle[data-variant="connected"] {
216
- fill: green;
217
- }
218
-
219
- .server_indicator_circle[data-variant="closed"] {
220
- fill: #c00;
221
- }
222
-
223
- .server_indicator_ring {
224
- stroke: #cecece75;
225
- stroke-width: 4px;
226
- fill: #0000;
227
- transform-origin: center;
228
- animation: 1.2s ease-out infinite pulse;
229
- }
230
-
231
- @keyframes pulse {
232
- 0% {
233
- opacity: 0;
234
- transform: scale(0);
235
- }
236
-
237
- 50% {
238
- opacity: 1;
239
- }
240
-
241
- 100% {
242
- opacity: 0;
243
- transform: scale(1);
244
- }
245
- }
246
- html[data-theme="light"] #toolbar {
247
- background: #e8eff3;
248
- }
249
-
250
- html[data-theme="light"] .toolbar_icon {
251
- fill: #404040;
252
- }
253
-
254
- html[data-theme="light"] .toolbar_icon:hover {
255
- fill: #757575 !important;
256
- }
257
-
258
- html[data-theme="light"] #loader-icon {
259
- color: #404040;
260
- }
261
-
262
- html[data-theme="light"] #settings-box, html[data-theme="light"] #settings[data-active] button {
263
- background: #87acd3;
264
- }
265
-
266
- html[data-theme="light"] .settings-box-item {
267
- background: #97b9da;
268
- }
269
-
270
- html[data-theme="light"] #settings-box-header .settings-icon {
271
- stroke: #076570;
272
- }
273
-
274
- html[data-theme="light"] #button-close-settings {
275
- fill: #076570;
276
- }
277
-
278
- html[data-theme="light"] #settings-box h3, html[data-theme="light"] #settings-box .category-title {
279
- color: #076570;
280
- }
281
-
282
- html[data-theme="light"] #settings-box .category-title svg {
283
- fill: #076570;
284
- }
285
-
286
- html[data-theme="light"] #settings-box .category-subtitle {
287
- color: #5d5d5d;
288
- }
289
-
290
- html[data-theme="light"] label {
291
- color: #002e33;
292
- }
293
-
294
- html[data-theme="light"] .switch input + * .slider, html[data-theme="light"] .switch input + * .square {
295
- background-color: gray;
296
- }
297
-
298
- html[data-theme="light"] .switch input:checked + * .slider, html[data-theme="light"] .switch input:checked + * .square {
299
- background-color: #076570;
300
- }
301
-
302
- html[data-theme="light"] .tooltip {
303
- color: #fff;
304
- background-color: #8a919a;
305
- }
306
-
307
- html[data-theme="light"] .tooltip_action {
308
- border-color: #fff;
309
- }
310
-
311
- html[data-theme="light"] .tooltip:after {
312
- border-color: #8a919a #0000 #0000;
313
- }
314
-
315
- html[data-theme="light"] #menu_overflow_button {
316
- background: #e8eff3;
317
- }
318
-
319
- html[data-theme="light"] #toolbar[data-menu-overflow-opened] #menu_overflow_button {
320
- background: #a5a9ad;
321
- }
322
-
323
- html[data-theme="light"] #menu_overflow {
324
- background: #dfe4e7;
325
- }
326
-
327
- html[data-theme="light"] h2, html[data-theme="light"] h4 {
328
- color: #076570;
329
- }
330
-
331
- html[data-theme="light"] #explorables_icon {
332
- fill: #076570;
333
- }
334
-
335
- html[data-theme="light"] #explorables h2 span {
336
- color: #ff8d00;
337
- }
338
-
339
- html[data-theme="light"] article[data-page="file-list"] {
340
- background: #bbd5ea;
341
- }
342
-
343
- html[data-theme="light"] #explorables fieldset input:checked + * {
344
- color: #ff8d00;
345
- background: #bbd5ea;
346
- }
347
-
348
- html[data-theme="light"] #explorables #explorables-header, html[data-theme="light"] #explorables fieldset label input + * {
349
- background: #ddf0ff;
350
- }
351
-
352
- html[data-theme="light"] .execution-link {
353
- color: #076570;
354
- background: #ddf0ff;
355
- }
356
-
357
- #settings_button {
358
- position: relative;
359
- }
360
-
361
- #settings_button[data-warning] svg {
362
- fill: #cb5909;
363
- }
364
-
365
- #settings_button[data-warning] svg:hover {
366
- fill: #ff8c00 !important;
367
- }
368
-
369
- #settings_box {
370
- text-align: center;
371
- color: #fff;
372
- min-width: 250px;
373
- min-height: 150px;
374
- z-index: -1;
375
- background-color: #030713;
376
- border-radius: 5px 5px 0 0;
377
- padding: 17px;
378
- font-size: 14px;
379
- display: none;
380
- position: absolute;
381
- bottom: 40px;
382
- right: 0;
383
- }
384
-
385
- [data-active] #settings_box {
386
- animation: .3s comeUp;
387
- display: block;
388
- }
389
-
390
- @keyframes comeUp {
391
- 0% {
392
- opacity: 0;
393
- transform: translate(0, 90px);
394
- }
395
-
396
- 100% {
397
- opacity: 1;
398
- transform: translate(0);
399
- }
400
- }
401
-
402
- #settings_box_body {
403
- text-align: left;
404
- max-height: 80vh;
405
- width: 100vw;
406
- justify-content: center;
407
- padding: 18px 0;
408
- display: flex;
409
- overflow: auto;
410
- }
411
-
412
- .settings_box_items_wrapper {
413
- max-width: 700px;
414
- flex-wrap: wrap;
415
- justify-content: center;
416
- display: flex;
417
- }
418
-
419
- .settings_box_item {
420
- width: 250px;
421
- background: #0c111b;
422
- margin: 9px 18px;
423
- padding: 15px;
424
- }
425
-
426
- #settings_box_header .settings_icon {
427
- fill: none;
428
- stroke: #24b1b0;
429
- stroke-width: 2px;
430
- width: 22px;
431
- height: 22px;
432
- margin-right: 10px;
433
- position: relative;
434
- top: 4px;
435
- }
436
-
437
- #settings_box h3 {
438
- color: #24b1b0;
439
- margin: 10px 0;
440
- font-size: 20px;
441
- display: inline-block;
442
- }
443
-
444
- #settings_close_button {
445
- float: right;
446
- fill: #24b1b0;
447
- }
448
-
449
- #settings_close_button:hover {
450
- opacity: .6;
451
- }
452
-
453
- label {
454
- color: #a9a8a8;
455
- padding-bottom: 3px;
456
- font-size: 14px;
457
- display: block;
458
- }
459
-
460
- #settings_box .category_title {
461
- color: #24b1b0;
462
- margin-top: 4px;
463
- margin-bottom: 15px;
464
- font-size: 16px;
465
- display: inline-block;
466
- }
467
-
468
- #settings_box .category_title svg {
469
- fill: currentColor;
470
- vertical-align: top;
471
- width: 18px;
472
- height: 18px;
473
- margin-right: 5px;
474
- }
475
-
476
- #settings_box .category_subtitle {
477
- color: #a9a8a8;
478
- max-width: 220px;
479
- font-size: 14px;
480
- }
481
-
482
- .switch {
483
- float: right;
484
- width: 3.5em;
485
- height: 2em;
486
- cursor: pointer;
487
- padding: 0;
488
- position: relative;
489
- }
490
-
491
- .switch input {
492
- opacity: 0;
493
- width: 0;
494
- height: 0;
495
- position: absolute;
496
- }
497
-
498
- .switch .slider {
499
- vertical-align: middle;
500
- height: .3em;
501
- background-color: #4c4c4c;
502
- border-radius: .15em;
503
- margin-top: -.15em;
504
- transition: all .4s;
505
- position: absolute;
506
- top: 50%;
507
- left: .5em;
508
- right: .5em;
509
- }
510
-
511
- .switch .square {
512
- content: "";
513
- height: 1em;
514
- width: 1em;
515
- color: #030713;
516
- background-color: #4c4c4c;
517
- border-radius: .15em;
518
- margin-top: -.5em;
519
- transition: all .4s;
520
- position: absolute;
521
- top: 50%;
522
- left: .5em;
523
- }
524
-
525
- .switch input + * {
526
- width: 100%;
527
- height: 100%;
528
- border: 1px solid #0000;
529
- position: relative;
530
- }
531
-
532
- .switch input:checked + * .slider {
533
- background-color: #24b1b0;
534
- }
535
-
536
- .switch input:checked + * .square {
537
- background-color: #24b1b0;
538
- transform: translateX(1.6em);
539
- }
540
-
541
- .settings_box_item[data-disabled] {
542
- cursor: default;
543
- background-color: #0c111b66;
544
- }
545
-
546
- .settings_box_item[data-disabled] .category_title, .settings_box_item[data-disabled] .switch, .settings_box_item[data-disabled] .category_subtitle {
547
- opacity: .4;
548
- }
549
-
550
- .settings_box_item[data-disabled] .category_title span, .settings_box_item[data-disabled] .category_subtitle {
551
- text-decoration: line-through;
552
- }
553
-
554
- .settings_box_item[data-disabled] .switch {
555
- cursor: default;
556
- }
557
- #menu_overflow_button {
558
- width: 40px;
559
- background: #404040;
560
- display: none;
561
- position: absolute;
562
- top: 0;
563
- right: 0;
564
- }
565
-
566
- #menu_overflow_icon {
567
- width: 25px;
568
- }
569
-
570
- #menu_overflow {
571
- visibility: hidden;
572
- width: 100%;
573
- height: 100%;
574
- opacity: 0;
575
- background: #404040;
576
- display: none;
577
- position: absolute;
578
- top: 0;
579
- bottom: 0;
580
- left: 100%;
581
- }
582
-
583
- #menu_overflow[data-animate] {
584
- transition-property: left, opacity;
585
- transition-duration: .3s;
586
- }
587
-
588
- #menu_overflow > * {
589
- vertical-align: middle;
590
- text-align: center;
591
- }
592
-
593
- #toolbar[data-menu-overflow-enabled] #menu_overflow_button {
594
- display: block;
595
- }
596
-
597
- #toolbar[data-menu-overflow-opened] #menu_overflow_button {
598
- background: #030713;
599
- }
600
-
601
- #toolbar[data-menu-overflow-enabled][data-menu-overflow-opened] #toolbar-wrapper {
602
- visibility: hidden;
603
- }
604
-
605
- #toolbar[data-menu-overflow-opened] #menu_overflow {
606
- visibility: visible;
607
- opacity: 1;
608
- margin-left: -40px;
609
- display: block;
610
- left: 0;
611
- }
612
-
613
- #toolbar[data-menu-overflow-enabled] #settings_box {
614
- right: -40px;
615
- }
616
- .tooltip {
617
- color: #fff;
618
- text-align: center;
619
- max-width: 260px;
620
- cursor: default;
621
- background-color: #5e5e5e;
622
- border-radius: 6px;
623
- margin-bottom: 6px;
624
- padding: 10px;
625
- font-size: 14px;
626
- display: none;
627
- position: absolute;
628
- bottom: 100%;
629
- }
630
-
631
- .tooltip:after {
632
- content: "";
633
- border: 5px solid #0000;
634
- border-top-color: #5e5e5e;
635
- position: absolute;
636
- top: 100%;
637
- left: 14px;
638
- }
639
-
640
- .tooltip[data-toolip-left] {
641
- margin-right: 5px;
642
- }
643
-
644
- .tooltip[data-toolip-left]:after {
645
- left: 15px;
646
- }
647
-
648
- [data-tooltip-visible] .tooltip, [data-tooltip-auto-visible] .tooltip {
649
- animation: .4s fadeIn;
650
- display: block;
651
- }
652
-
653
- @keyframes fadeIn {
654
- 0% {
655
- opacity: 0;
656
- }
657
-
658
- 100% {
659
- opacity: 1;
660
- }
661
- }
662
-
663
- .tooltip_action {
664
- border: 1px solid #a0a0a0;
665
- border-radius: 3px;
666
- margin-top: 6px;
667
- padding: 3px 7px;
668
- display: inline-block;
669
- }
670
-
671
- .tooltip_action a {
672
- vertical-align: middle;
673
- color: #fff;
674
- text-decoration: none;
675
- }
676
-
677
- .tooltip_icon {
678
- fill: #fff;
679
- width: 20px;
680
- height: 20px;
681
- vertical-align: middle;
682
- }
1
+ @import "./globals.css";
2
+ @import "./document_execution_indicator.css";
3
+ @import "./server_indicator.css";
4
+ @import "./toolbar_settings.css";
5
+ @import "./toolbar_menu_overflow.css";
6
+ @import "./tooltips.css";
683
7
 
684
8
  .toolbar_control {
685
9
  height: 40px;
@@ -747,4 +71,4 @@ label {
747
71
  .changes_text {
748
72
  align-items: center;
749
73
  display: flex;
750
- }
74
+ }