@myst-theme/common 0.5.10 → 0.5.12
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/utils.d.ts.map +1 -1
- package/dist/utils.js +24 -6
- package/package.json +4 -4
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAkB,UAAU,EAAE,MAAM,YAAY,CAAC;AAMnF,KAAK,eAAe,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAG7D,wBAAgB,UAAU,CACxB,MAAM,CAAC,EAAE,YAAY,EACrB,WAAW,CAAC,EAAE,MAAM,GACnB,eAAe,GAAG,SAAS,CAK7B;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,YAAY,EACpB,WAAW,CAAC,EAAE,MAAM,EACpB,IAAI,GAAE;IAAE,SAAS,EAAE,OAAO,CAAA;CAAyB,GAClD,OAAO,EAAE,GAAG,SAAS,CA0BvB;AAeD,wBAAgB,cAAc,CAC5B,MAAM,CAAC,EAAE,YAAY,EACrB,WAAW,CAAC,EAAE,MAAM,EACpB,IAAI,CAAC,EAAE,MAAM,GACZ,WAAW,CAab;AAED,KAAK,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;AAEzC,wBAAgB,oCAAoC,CAClD,IAAI,EAAE,YAAY,EAClB,SAAS,EAAE,SAAS,GACnB,YAAY,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAkB,UAAU,EAAE,MAAM,YAAY,CAAC;AAMnF,KAAK,eAAe,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAG7D,wBAAgB,UAAU,CACxB,MAAM,CAAC,EAAE,YAAY,EACrB,WAAW,CAAC,EAAE,MAAM,GACnB,eAAe,GAAG,SAAS,CAK7B;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,YAAY,EACpB,WAAW,CAAC,EAAE,MAAM,EACpB,IAAI,GAAE;IAAE,SAAS,EAAE,OAAO,CAAA;CAAyB,GAClD,OAAO,EAAE,GAAG,SAAS,CA0BvB;AAeD,wBAAgB,cAAc,CAC5B,MAAM,CAAC,EAAE,YAAY,EACrB,WAAW,CAAC,EAAE,MAAM,EACpB,IAAI,CAAC,EAAE,MAAM,GACZ,WAAW,CAab;AAED,KAAK,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;AAEzC,wBAAgB,oCAAoC,CAClD,IAAI,EAAE,YAAY,EAClB,SAAS,EAAE,SAAS,GACnB,YAAY,CA+Cd;AAED,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,GAAG,UAAU,CA4C/F;AAED,wBAAgB,UAAU,CAAC,MAAM,CAAC,EAAE,YAAY,GAAG,OAAO,CAEzD"}
|
package/dist/utils.js
CHANGED
|
@@ -70,19 +70,37 @@ export function getFooterLinks(config, projectSlug, slug) {
|
|
|
70
70
|
return footer;
|
|
71
71
|
}
|
|
72
72
|
export function updateSiteManifestStaticLinksInplace(data, updateUrl) {
|
|
73
|
-
var _a, _b;
|
|
73
|
+
var _a, _b, _c;
|
|
74
74
|
(_a = data.actions) === null || _a === void 0 ? void 0 : _a.forEach((action) => {
|
|
75
75
|
if (!action.static)
|
|
76
76
|
return;
|
|
77
77
|
action.url = updateUrl(action.url);
|
|
78
78
|
});
|
|
79
79
|
// TODO: this needs to be based on the template.yml in the future
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
if (data.
|
|
83
|
-
data.
|
|
80
|
+
// We have moved logo/logo_dark to options in v1.1.28
|
|
81
|
+
(_b = data.options) !== null && _b !== void 0 ? _b : (data.options = {});
|
|
82
|
+
if (data.logo) {
|
|
83
|
+
data.options.logo = data.logo;
|
|
84
|
+
delete data.logo;
|
|
85
|
+
}
|
|
86
|
+
if (data.logo_dark) {
|
|
87
|
+
data.options.logo_dark = data.logo_dark;
|
|
88
|
+
delete data.logo_dark;
|
|
89
|
+
}
|
|
90
|
+
if (data.logoText) {
|
|
91
|
+
data.options.logo_text = data.logoText;
|
|
92
|
+
delete data.logoText;
|
|
93
|
+
}
|
|
94
|
+
if (data.logo_text) {
|
|
95
|
+
data.options.logo_text = data.logo_text;
|
|
96
|
+
delete data.logo_text;
|
|
97
|
+
}
|
|
98
|
+
if (data.options.logo)
|
|
99
|
+
data.options.logo = updateUrl(data.options.logo);
|
|
100
|
+
if (data.options.logo_dark)
|
|
101
|
+
data.options.logo_dark = updateUrl(data.options.logo_dark);
|
|
84
102
|
// Update the thumbnails to point at the CDN
|
|
85
|
-
(
|
|
103
|
+
(_c = data.projects) === null || _c === void 0 ? void 0 : _c.forEach((project) => {
|
|
86
104
|
if (project.banner)
|
|
87
105
|
project.banner = updateUrl(project.banner);
|
|
88
106
|
if (project.bannerOptimized)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myst-theme/common",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"build": "npm-run-all -l clean -p build:esm"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"myst-common": "^1.1.
|
|
23
|
-
"myst-config": "^1.1.
|
|
24
|
-
"myst-spec-ext": "^1.1.
|
|
22
|
+
"myst-common": "^1.1.12",
|
|
23
|
+
"myst-config": "^1.1.12",
|
|
24
|
+
"myst-spec-ext": "^1.1.12",
|
|
25
25
|
"nbtx": "^0.2.3",
|
|
26
26
|
"unist-util-select": "^4.0.3"
|
|
27
27
|
}
|