@xingwangzhe/stalux 1.21.9 → 1.21.11
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xingwangzhe/stalux",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.11",
|
|
4
4
|
"description": "A powerful, modern Astro blog theme — use as template or install as plugin",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"astro",
|
|
@@ -99,11 +99,11 @@
|
|
|
99
99
|
"temml": "^0.13.4"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
|
-
"astro": "^7.2.
|
|
103
|
-
"knip": "^6.32.
|
|
102
|
+
"astro": "^7.2.1",
|
|
103
|
+
"knip": "^6.32.2",
|
|
104
104
|
"license-checker-rseidelsohn": "5.0.1",
|
|
105
|
-
"oxfmt": "^0.
|
|
106
|
-
"oxlint": "^1.
|
|
105
|
+
"oxfmt": "^0.63.0",
|
|
106
|
+
"oxlint": "^1.78.0",
|
|
107
107
|
"typescript": "^7.0.2"
|
|
108
108
|
},
|
|
109
109
|
"peerDependencies": {
|
|
@@ -143,12 +143,21 @@ const mdSourceUrl = exportMd
|
|
|
143
143
|
let lightbox = null;
|
|
144
144
|
|
|
145
145
|
async function initLightbox() {
|
|
146
|
-
const [{ default: PhotoSwipeLightbox }, { default: PhotoSwipe }] = await Promise.all([
|
|
146
|
+
const [{ default: PhotoSwipeLightbox }, { default: PhotoSwipe }, { default: photoSwipeCss }] = await Promise.all([
|
|
147
147
|
import("photoswipe/lightbox"),
|
|
148
148
|
import("photoswipe"),
|
|
149
|
-
import("photoswipe/dist/photoswipe.css"),
|
|
149
|
+
import("photoswipe/dist/photoswipe.css?raw"),
|
|
150
150
|
]);
|
|
151
151
|
|
|
152
|
+
// `?raw` keeps Astro from extracting a static stylesheet link.
|
|
153
|
+
// Inject it only after the first gallery interaction.
|
|
154
|
+
if (!document.querySelector("style[data-photoswipe]") && photoSwipeCss) {
|
|
155
|
+
const style = document.createElement("style");
|
|
156
|
+
style.dataset.photoswipe = "true";
|
|
157
|
+
style.textContent = photoSwipeCss;
|
|
158
|
+
document.head.appendChild(style);
|
|
159
|
+
}
|
|
160
|
+
|
|
152
161
|
// 销毁旧实例(View Transition 导航后,旧 DOM 已移除,需安全销毁)
|
|
153
162
|
if (lightbox) {
|
|
154
163
|
try {
|