@jsenv/core 40.0.2 → 40.0.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.
- package/dist/{js → client/autoreload}/autoreload.js +45 -2
- package/dist/{html → client/directory_listing}/directory_listing.html +2 -2
- package/dist/{js → client/directory_listing/js}/directory_listing.js +3 -3
- package/dist/js/build.js +319 -15321
- package/dist/js/start_build_server.js +8 -4
- package/dist/js/start_dev_server.js +29 -35
- package/dist/jsenv_core.js +13 -1
- package/dist/jsenv_core_packages.js +10061 -0
- package/dist/main.js +117 -0
- package/dist/plugins.js +7944 -0
- package/package.json +9 -9
- package/src/build/build.js +61 -60
- package/src/build/build_params.js +20 -0
- package/src/build/build_specifier_manager.js +10 -0
- package/src/build/build_urls_generator.js +5 -1
- package/src/build/jsenv_plugin_subbuilds.js +71 -0
- package/src/dev/start_dev_server.js +21 -7
- package/src/kitchen/fetched_content_compliance.js +7 -3
- package/src/kitchen/kitchen.js +3 -0
- package/src/plugins/autoreload/jsenv_plugin_autoreload_client.js +1 -4
- package/src/plugins/html_syntax_error_fallback/jsenv_plugin_html_syntax_error_fallback.js +4 -3
- package/src/plugins/import_meta_hot/jsenv_plugin_import_meta_hot.js +2 -3
- package/src/plugins/protocol_file/jsenv_plugin_directory_listing.js +1 -2
- package/src/plugins/ribbon/jsenv_plugin_ribbon.js +2 -2
- package/dist/js/main.js +0 -994
- package/dist/js/process_teardown_events.js +0 -1848
- /package/dist/babel_helpers/{OverloadYield → overloadYield}/OverloadYield.js +0 -0
- /package/dist/{css → client/directory_listing/css}/directory_listing.css +0 -0
- /package/dist/{other → client/directory_listing/other}/dir.png +0 -0
- /package/dist/{other → client/directory_listing/other}/file.png +0 -0
- /package/dist/{other → client/directory_listing/other}/home.svg +0 -0
- /package/dist/{html → client/html_syntax_error}/html_syntax_error.html +0 -0
- /package/dist/{js → client/import_meta_hot}/import_meta_hot.js +0 -0
- /package/dist/{js → client/inline_content}/inline_content.js +0 -0
- /package/dist/{js → client/new_stylesheet}/new_stylesheet.js +0 -0
- /package/dist/{js → client/regenerator_runtime}/regenerator_runtime.js +0 -0
- /package/dist/{js → client/ribbon}/ribbon.js +0 -0
- /package/dist/{js → client/server_events_client}/server_events_client.js +0 -0
|
@@ -1,5 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
const parseSrcSet = (srcset) => {
|
|
2
|
+
const srcCandidates = [];
|
|
3
|
+
srcset.split(",").forEach((set) => {
|
|
4
|
+
const [specifier, descriptor] = set.trim().split(" ");
|
|
5
|
+
srcCandidates.push({
|
|
6
|
+
specifier,
|
|
7
|
+
descriptor,
|
|
8
|
+
});
|
|
9
|
+
});
|
|
10
|
+
return srcCandidates;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const stringifySrcSet = (srcCandidates) => {
|
|
14
|
+
const srcset = srcCandidates
|
|
15
|
+
.map(({ specifier, descriptor }) => `${specifier} ${descriptor}`)
|
|
16
|
+
.join(", ");
|
|
17
|
+
return srcset;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/*
|
|
21
|
+
* https://vitejs.dev/guide/api-hmr.html#hot-accept-deps-cb
|
|
22
|
+
* https://modern-web.dev/docs/dev-server/plugins/hmr/
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
const urlHotMetas = {};
|
|
26
|
+
|
|
27
|
+
const createEvent = () => {
|
|
28
|
+
const callbackSet = new Set();
|
|
29
|
+
const addCallback = (callback) => {
|
|
30
|
+
callbackSet.add(callback);
|
|
31
|
+
return () => {
|
|
32
|
+
callbackSet.delete(callback);
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
const dispatch = () => {
|
|
36
|
+
for (const callback of callbackSet) {
|
|
37
|
+
callback();
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
return [{ addCallback }, dispatch];
|
|
41
|
+
};
|
|
42
|
+
const [beforePartialReload, dispatchBeforePartialReload] = createEvent();
|
|
43
|
+
const [afterPartialReload, dispatchAfterPartialReload] = createEvent();
|
|
44
|
+
const [beforeFullReload, dispatchBeforeFullReload] = createEvent();
|
|
45
|
+
const [beforePrune, dispatchBeforePrune] = createEvent();
|
|
3
46
|
|
|
4
47
|
const initAutoreload = ({ mainFilePath }) => {
|
|
5
48
|
const reloader = {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<title>Directory explorer</title>
|
|
5
5
|
<meta charset="utf-8">
|
|
6
6
|
<link rel="icon" href="data:,">
|
|
7
|
-
<link rel="stylesheet" href="
|
|
7
|
+
<link rel="stylesheet" href="/client/directory_listing/css/directory_listing.css">
|
|
8
8
|
</head>
|
|
9
9
|
|
|
10
10
|
<body data-theme="dark">
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
// eslint-disable-next-line no-undef
|
|
14
14
|
window.DIRECTORY_LISTING = __DIRECTORY_LISTING__;
|
|
15
15
|
</script>
|
|
16
|
-
<script type="module" src="
|
|
16
|
+
<script type="module" src="/client/directory_listing/js/directory_listing.js"></script>
|
|
17
17
|
</body>
|
|
18
18
|
</html>
|
|
@@ -6,9 +6,9 @@ function g(n,t){for(var e in t)n[e]=t[e];return n}function E(n,t){for(var e in n
|
|
|
6
6
|
|
|
7
7
|
var f=0;function u(e,t,n,o,i,u){t||(t={});var a,c,p=t;if("ref"in p)for(c in p={},t)"ref"==c?a=t[c]:p[c]=t[c];var l={type:e,props:p,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--f,__i:-1,__u:0,__source:i,__self:u};if("function"==typeof e&&(a=e.defaultProps))for(c in a) void 0===p[c]&&(p[c]=a[c]);return l$1.vnode&&l$1.vnode(l),l}
|
|
8
8
|
|
|
9
|
-
const directoryIconUrl =
|
|
10
|
-
const fileIconUrl =
|
|
11
|
-
const homeIconUrl =
|
|
9
|
+
const directoryIconUrl = new URL("/client/directory_listing/other/dir.png", import.meta.url).href;
|
|
10
|
+
const fileIconUrl = new URL("/client/directory_listing/other/file.png", import.meta.url).href;
|
|
11
|
+
const homeIconUrl = new URL("/client/directory_listing/other/home.svg#root", import.meta.url).href;
|
|
12
12
|
let {
|
|
13
13
|
navItems,
|
|
14
14
|
mainFilePath,
|