@jsenv/core 29.4.1 → 29.4.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/autoreload.js +1 -1
- package/dist/js/html_src_set.js +20 -0
- package/dist/main.js +2187 -406
- package/package.json +3 -2
- package/src/build/build.js +0 -1
- package/src/plugins/url_resolution/node_esm_resolver.js +2 -2
package/dist/js/autoreload.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { urlHotMetas } from "./import_meta_hot.js";
|
|
2
|
-
import { parseSrcSet, stringifySrcSet } from "
|
|
2
|
+
import { p as parseSrcSet, s as stringifySrcSet } from "./html_src_set.js";
|
|
3
3
|
|
|
4
4
|
const isAutoreloadEnabled = () => {
|
|
5
5
|
const value = window.localStorage.getItem("autoreload");
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
const stringifySrcSet = srcCandidates => {
|
|
13
|
+
const srcset = srcCandidates.map(({
|
|
14
|
+
specifier,
|
|
15
|
+
descriptor
|
|
16
|
+
}) => `${specifier} ${descriptor}`).join(", ");
|
|
17
|
+
return srcset;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { parseSrcSet as p, stringifySrcSet as s };
|