@jsenv/core 25.4.3 → 25.4.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.
Files changed (24) hide show
  1. package/dist/build_manifest.js +2 -2
  2. package/dist/toolbar/asset-manifest.json +5 -5
  3. package/dist/toolbar/assets/{compilation.css_e37c747b.map → compilation.css_7421bd55.map} +3 -3
  4. package/dist/toolbar/assets/settings.css_942b5a9e.map +12 -0
  5. package/dist/toolbar/assets/{toolbar.main.css_269d7ce2.map → toolbar.main.css_b7d8bec1.map} +4 -4
  6. package/dist/toolbar/{toolbar.main_279b3a68.js.map → toolbar.main_2c56a4e0.js.map} +24 -12
  7. package/dist/toolbar/{toolbar_0a91ca3b.html → toolbar_9a52325b.html} +97 -63
  8. package/dist/toolbar_injector/asset-manifest.json +2 -2
  9. package/dist/toolbar_injector/{toolbar_injector_34f6ad8e.js → toolbar_injector_1e193101.js} +2 -2
  10. package/dist/toolbar_injector/{toolbar_injector_34f6ad8e.js.map → toolbar_injector_1e193101.js.map} +2 -2
  11. package/package.json +4 -3
  12. package/src/buildProject.js +9 -6
  13. package/src/executeTestPlan.js +12 -8
  14. package/src/internal/compiling/jsenv_directory/comparison_utils.js +4 -1
  15. package/src/internal/compiling/jsenv_directory/compile_context.js +4 -3
  16. package/src/internal/compiling/jsenv_directory/jsenv_directory.js +1 -1
  17. package/src/internal/dev_server/toolbar/compilation/compilation.css +3 -2
  18. package/src/internal/dev_server/toolbar/compilation/toolbar.compilation.js +19 -19
  19. package/src/internal/dev_server/toolbar/notification/toolbar.notification.js +66 -37
  20. package/src/internal/dev_server/toolbar/settings/settings.css +1 -2
  21. package/src/internal/dev_server/toolbar/toolbar.html +9 -5
  22. package/src/internal/dev_server/toolbar/toolbar.main.js +5 -3
  23. package/src/internal/dev_server/toolbar/util/iframe_to_parent_href.js +10 -0
  24. package/dist/toolbar/assets/settings.css_61548139.map +0 -12
@@ -281,7 +281,7 @@
281
281
  Send system notification when execution fails or is fixed.
282
282
  <div class="notification-text">
283
283
  <a
284
- data-when="notif_permission:no"
284
+ data-when="notif_granted:no"
285
285
  class="request_notification_permission"
286
286
  href="javascript:void(0);"
287
287
  >Enable notification</a
@@ -475,13 +475,17 @@
475
475
  <div data-when="has_warning:yes">
476
476
  <svg
477
477
  xmlns="http://www.w3.org/2000/svg"
478
- viewBox="0 0 511.999 511.999"
479
- width="24px"
480
- height="24px"
478
+ viewBox="0 0 45.818 45.818"
479
+ width="20px"
480
+ height="20px"
481
481
  class="iconToolbar"
482
+ style="transform: rotate(180deg)"
482
483
  >
483
484
  <path
484
- d="M506.43 421.536 291.573 49.394c-15.814-27.391-55.327-27.401-71.147 0L5.568 421.536c-15.814 27.391 3.934 61.616 35.574 61.616h429.714c31.629.001 51.394-34.214 35.574-61.616zm-231.609-36.502c0 10.394-8.427 18.821-18.821 18.821s-18.821-8.427-18.821-18.821v-11.239c0-10.394 8.427-18.821 18.821-18.821s18.821 8.427 18.821 18.821v11.239zm0-73.332c0 10.394-8.427 18.821-18.821 18.821s-18.821-8.427-18.821-18.821v-107.89c0-10.394 8.427-18.821 18.821-18.821s18.821 8.427 18.821 18.821v107.89z"
485
+ d="M22.909,0C10.258,0,0,10.257,0,22.908c0,12.652,10.258,22.91,22.909,22.91s22.909-10.258,22.909-22.91
486
+ C45.818,10.257,35.561,0,22.909,0z M26.411,35.417c0,1.921-1.573,3.478-3.492,3.478c-1.92,0-3.492-1.557-3.492-3.478V20.201
487
+ c0-1.92,1.572-3.477,3.492-3.477c1.919,0,3.492,1.556,3.492,3.477V35.417z M22.909,13.851c-2.119,0-3.837-1.718-3.837-3.836
488
+ c0-2.12,1.718-3.836,3.837-3.836c2.118,0,3.837,1.716,3.837,3.836C26.746,12.133,25.027,13.851,22.909,13.851z"
485
489
  />
486
490
  </svg>
487
491
  </div>
@@ -3,6 +3,7 @@ import { urlToRelativeUrl } from "@jsenv/filesystem/src/urlToRelativeUrl.js"
3
3
 
4
4
  import { startJavaScriptAnimation } from "../toolbar/util/animation.js"
5
5
  import "./focus/toolbar.focus.js"
6
+ import { setLinkHrefForParentWindow } from "./util/iframe_to_parent_href.js"
6
7
  import {
7
8
  getToolbarIframe,
8
9
  deactivateToolbarSection,
@@ -52,9 +53,10 @@ const renderToolbar = async ({ exploringJSON }) => {
52
53
  hideToolbar({ animate: false })
53
54
  }
54
55
 
55
- document.querySelector(".toolbar-icon-wrapper").onclick = () => {
56
- window.parent.location.href = "/"
57
- }
56
+ setLinkHrefForParentWindow(
57
+ document.querySelector(".toolbar-icon-wrapper"),
58
+ "/",
59
+ )
58
60
 
59
61
  renderToolbarNotification()
60
62
  makeToolbarResponsive()
@@ -0,0 +1,10 @@
1
+ export const setLinkHrefForParentWindow = (a, href) => {
2
+ a.href = href
3
+ a.onclick = (e) => {
4
+ if (e.ctrlKey || e.metaKey) {
5
+ return
6
+ }
7
+ e.preventDefault()
8
+ window.parent.location.href = href
9
+ }
10
+ }
@@ -1,12 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [
4
- "../../../src/internal/dev_server/toolbar/settings/settings.css"
5
- ],
6
- "names": [],
7
- "mappings": "AAAA;EACE,kBAAkB;AACpB;;AAEA;EACE,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,2BAA2B;AAC7B;;AAEA;EACE,aAAa;EACb,kBAAkB;EAClB,YAAY;EACZ,QAAQ;EACR,kBAAkB;EAClB,aAAa;EACb,eAAe;EACf,WAAW;EACX,yBAAyB;EACzB,0BAA0B;EAC1B,gBAAgB;EAChB,iBAAiB;EACjB,WAAW;AACb;;AAEA;EACE,cAAc;EACd,2BAA2B;AAC7B;;AAEA;EACE;IACE,UAAU;IACV,6BAA6B;EAC/B;EACA;IACE,UAAU;IACV,0BAA0B;EAC5B;AACF;;AAEA;EACE,gBAAgB;EAChB,eAAe;EACf,gBAAgB;EAChB,cAAc;EACd,YAAY;EACZ,aAAa;EACb,uBAAuB;AACzB;;AAEA;EACE,gBAAgB;EAChB,aAAa;EACb,e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;AACjB;;AACA;;;EAGE,YAAY;AACd;;AACA;EACE,6BAA6B;AAC/B;;AACA;EACE,6BAA6B;AAC/B;;AACA;EACE,eAAe;AACjB",
8
- "file": "settings_b414e53b.css",
9
- "sourcesContent": [
10
- "#settings-button {\n position: relative;\n}\n\n#settings-button[data-warning] svg {\n fill: orange;\n stroke: darkorange;\n}\n\n#settings-button[data-warning] svg:hover {\n fill: darkorange !important;\n}\n\n#settings-box {\n display: none;\n position: absolute;\n bottom: 40px;\n right: 0;\n text-align: center;\n padding: 17px;\n font-size: 14px;\n color: #fff;\n background-color: #030713;\n border-radius: 5px 5px 0 0;\n min-width: 250px;\n min-height: 150px;\n z-index: -1;\n}\n\n[data-active] #settings-box {\n display: block;\n animation: comeUp ease 0.3s;\n}\n\n@keyframes comeUp {\n 0% {\n opacity: 0;\n transform: translate(0, 90px);\n }\n 100% {\n opacity: 1;\n transform: translate(0, 0);\n }\n}\n\n#settings-box-body {\n text-align: left;\n padding: 18px 0;\n max-height: 80vh;\n overflow: auto;\n width: 100vw;\n display: flex;\n justify-content: center;\n}\n\n.settings-box-items-wrapper {\n max-width: 700px;\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n}\n\n.settings-box-item {\n padding: 15px;\n background: #0c111b;\n width: 250px;\n margin: 9px 18px;\n}\n\n#settings-box-header .settings-icon {\n fill: none;\n stroke: #24b1b0;\n stroke-width: 2;\n margin-right: 10px;\n width: 22px;\n height: 22px;\n position: relative;\n top: 4px;\n}\n\n#settings-box h3 {\n display: inline-block;\n font-size: 20px;\n margin: 10px 0;\n color: #24b1b0;\n}\n\n#button-close-settings {\n float: right;\n fill: #24b1b0;\n}\n\n#button-close-settings:hover {\n opacity: 0.6;\n}\n\nlabel {\n color: #a9a8a8;\n font-size: 14px;\n padding-bottom: 3px;\n display: block;\n}\n\n#settings-box .category-title {\n color: #24b1b0;\n font-size: 16px;\n display: inline-block;\n margin-bottom: 15px;\n margin-top: 4px;\n}\n\n#settings-box .category-title svg {\n fill: currentColor;\n vertical-align: top;\n margin-right: 5px;\n width: 18px;\n height: 18px;\n}\n\n#settings-box .category-subtitle {\n color: #a9a8a8;\n font-size: 14px;\n max-width: 220px;\n}\n\n/* checkbox switch */\n.switch {\n position: relative;\n float: right;\n width: 3.5em;\n height: 2em;\n padding: 0;\n cursor: pointer;\n}\n.switch input {\n position: absolute;\n opacity: 0;\n width: 0;\n height: 0;\n}\n.switch .slider {\n position: absolute;\n vertical-align: middle;\n height: 0.3em;\n left: 0.5em;\n right: 0.5em;\n top: 50%;\n margin-top: -0.15em;\n background-color: #4c4c4c;\n transition: 0.4s;\n border-radius: 0.15em;\n}\n.switch .square {\n position: absolute;\n content: \"\";\n height: 1em;\n width: 1em;\n left: 0.5em;\n top: 50%;\n margin-top: -0.5em;\n background-color: #4c4c4c;\n color: #030713;\n transition: 0.4s;\n border-radius: 0.15em;\n}\n.switch input + * {\n position: relative;\n width: 100%;\n height: 100%;\n\n /* It's important to have a border (event transparent)\nTo be able to apply an outline to this element later*/\n border-width: 1px;\n border-color: transparent;\n border-style: solid;\n}\n.switch input:checked + * .slider {\n background-color: #24b1b0;\n}\n.switch input:checked + * .square {\n transform: translateX(1.6em);\n background-color: #24b1b0;\n}\n\n.settings-box-item[data-disabled] {\n background-color: rgba(12, 17, 27, 0.4);\n cursor: default;\n}\n.settings-box-item[data-disabled] .category-title,\n.settings-box-item[data-disabled] .switch,\n.settings-box-item[data-disabled] .category-subtitle {\n opacity: 0.4;\n}\n.settings-box-item[data-disabled] .category-title span {\n text-decoration: line-through;\n}\n.settings-box-item[data-disabled] .category-subtitle {\n text-decoration: line-through;\n}\n.settings-box-item[data-disabled] .switch {\n cursor: default;\n}\n"
11
- ]
12
- }