hono-decks 0.4.2 → 0.4.4
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/advanced.js +10 -1
- package/dist/mod.js +9 -0
- package/dist/node.js +10 -1
- package/package.json +1 -1
package/dist/advanced.js
CHANGED
|
@@ -1779,6 +1779,7 @@ function renderViewerScript(nonce) {
|
|
|
1779
1779
|
const iframe = root.querySelector("iframe");
|
|
1780
1780
|
const frameOrigin = iframe?.src ? new URL(iframe.src, window.location.href).origin : window.location.origin;
|
|
1781
1781
|
const position = root.querySelector("[data-slide-position]");
|
|
1782
|
+
const viewerLinks = Array.from(root.querySelectorAll("[data-hono-decks-viewer-link]"));
|
|
1782
1783
|
const printPath = root.getAttribute("data-hono-decks-print-path") || "";
|
|
1783
1784
|
|
|
1784
1785
|
if (position && viewport) viewport.append(position);
|
|
@@ -1834,6 +1835,14 @@ function renderViewerScript(nonce) {
|
|
|
1834
1835
|
params.set("slide", String(message.index + 1));
|
|
1835
1836
|
params.set("step", String(Number.isInteger(message.stepIndex) ? message.stepIndex : 0));
|
|
1836
1837
|
window.history.replaceState(null, "", url);
|
|
1838
|
+
for (const link of viewerLinks) {
|
|
1839
|
+
const href = link.getAttribute("href");
|
|
1840
|
+
if (!href) continue;
|
|
1841
|
+
const viewerUrl = new URL(href, window.location.href);
|
|
1842
|
+
viewerUrl.searchParams.set("slide", params.get("slide"));
|
|
1843
|
+
viewerUrl.searchParams.set("step", params.get("step"));
|
|
1844
|
+
link.setAttribute("href", viewerUrl.href);
|
|
1845
|
+
}
|
|
1837
1846
|
}
|
|
1838
1847
|
|
|
1839
1848
|
function handleMessage(event) {
|
|
@@ -2521,7 +2530,7 @@ function withFrameAncestors(currentPolicy, ancestors) {
|
|
|
2521
2530
|
return directives.join("; ");
|
|
2522
2531
|
}
|
|
2523
2532
|
function externalEmbedPageStyle() {
|
|
2524
|
-
return `:root{color-scheme:dark;background:#050816}html,body{width:100%;height:100%;margin:0;overflow:hidden}body{min-height:100vh}@supports (height:100dvh){body{min-height:100dvh}}.hono-decks-embedded-viewer{width:100%;height:100%;min-height:0}.hono-decks-embedded-viewer .hono-decks-viewer-shell{position:relative;height:100%;grid-template-rows:minmax(0,1fr)}.hono-decks-embedded-viewer .hono-decks-viewport{width:min(100%,calc(100vh * 16 / 9));max-height:100%}@supports (height:100dvh){.hono-decks-embedded-viewer .hono-decks-viewport{width:min(100%,calc(100dvh * 16 / 9))}}.hono-decks-embedded-viewer .hono-decks-viewer-controls{bottom:max(.25rem,env(safe-area-inset-bottom,0px));z-index:4}`;
|
|
2533
|
+
return `:root{color-scheme:dark;background:#050816}html,body{width:100%;height:100%;margin:0;overflow:hidden}body{min-height:100vh}@supports (height:100dvh){body{min-height:100dvh}}.hono-decks-embedded-viewer{width:100%;height:100%;min-height:0;overflow:hidden}.hono-decks-embedded-viewer .hono-decks-viewer-shell{position:relative;height:100%;grid-template-rows:minmax(0,1fr);overflow:hidden}.hono-decks-embedded-viewer .hono-decks-viewport{width:min(100%,calc(100vh * 16 / 9));max-height:100%}@supports (height:100dvh){.hono-decks-embedded-viewer .hono-decks-viewport{width:min(100%,calc(100dvh * 16 / 9))}}.hono-decks-embedded-viewer .hono-decks-viewer-controls{bottom:max(.25rem,env(safe-area-inset-bottom,0px));z-index:4}`;
|
|
2525
2534
|
}
|
|
2526
2535
|
function escapeHtml$1(value) {
|
|
2527
2536
|
return value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("\"", """).replaceAll("'", "'");
|
package/dist/mod.js
CHANGED
|
@@ -475,6 +475,7 @@ function renderViewerScript(nonce) {
|
|
|
475
475
|
const iframe = root.querySelector("iframe");
|
|
476
476
|
const frameOrigin = iframe?.src ? new URL(iframe.src, window.location.href).origin : window.location.origin;
|
|
477
477
|
const position = root.querySelector("[data-slide-position]");
|
|
478
|
+
const viewerLinks = Array.from(root.querySelectorAll("[data-hono-decks-viewer-link]"));
|
|
478
479
|
const printPath = root.getAttribute("data-hono-decks-print-path") || "";
|
|
479
480
|
|
|
480
481
|
if (position && viewport) viewport.append(position);
|
|
@@ -530,6 +531,14 @@ function renderViewerScript(nonce) {
|
|
|
530
531
|
params.set("slide", String(message.index + 1));
|
|
531
532
|
params.set("step", String(Number.isInteger(message.stepIndex) ? message.stepIndex : 0));
|
|
532
533
|
window.history.replaceState(null, "", url);
|
|
534
|
+
for (const link of viewerLinks) {
|
|
535
|
+
const href = link.getAttribute("href");
|
|
536
|
+
if (!href) continue;
|
|
537
|
+
const viewerUrl = new URL(href, window.location.href);
|
|
538
|
+
viewerUrl.searchParams.set("slide", params.get("slide"));
|
|
539
|
+
viewerUrl.searchParams.set("step", params.get("step"));
|
|
540
|
+
link.setAttribute("href", viewerUrl.href);
|
|
541
|
+
}
|
|
533
542
|
}
|
|
534
543
|
|
|
535
544
|
function handleMessage(event) {
|
package/dist/node.js
CHANGED
|
@@ -4139,6 +4139,7 @@ function renderViewerScript(nonce) {
|
|
|
4139
4139
|
const iframe = root.querySelector("iframe");
|
|
4140
4140
|
const frameOrigin = iframe?.src ? new URL(iframe.src, window.location.href).origin : window.location.origin;
|
|
4141
4141
|
const position = root.querySelector("[data-slide-position]");
|
|
4142
|
+
const viewerLinks = Array.from(root.querySelectorAll("[data-hono-decks-viewer-link]"));
|
|
4142
4143
|
const printPath = root.getAttribute("data-hono-decks-print-path") || "";
|
|
4143
4144
|
|
|
4144
4145
|
if (position && viewport) viewport.append(position);
|
|
@@ -4194,6 +4195,14 @@ function renderViewerScript(nonce) {
|
|
|
4194
4195
|
params.set("slide", String(message.index + 1));
|
|
4195
4196
|
params.set("step", String(Number.isInteger(message.stepIndex) ? message.stepIndex : 0));
|
|
4196
4197
|
window.history.replaceState(null, "", url);
|
|
4198
|
+
for (const link of viewerLinks) {
|
|
4199
|
+
const href = link.getAttribute("href");
|
|
4200
|
+
if (!href) continue;
|
|
4201
|
+
const viewerUrl = new URL(href, window.location.href);
|
|
4202
|
+
viewerUrl.searchParams.set("slide", params.get("slide"));
|
|
4203
|
+
viewerUrl.searchParams.set("step", params.get("step"));
|
|
4204
|
+
link.setAttribute("href", viewerUrl.href);
|
|
4205
|
+
}
|
|
4197
4206
|
}
|
|
4198
4207
|
|
|
4199
4208
|
function handleMessage(event) {
|
|
@@ -4881,7 +4890,7 @@ function withFrameAncestors(currentPolicy, ancestors) {
|
|
|
4881
4890
|
return directives.join("; ");
|
|
4882
4891
|
}
|
|
4883
4892
|
function externalEmbedPageStyle() {
|
|
4884
|
-
return `:root{color-scheme:dark;background:#050816}html,body{width:100%;height:100%;margin:0;overflow:hidden}body{min-height:100vh}@supports (height:100dvh){body{min-height:100dvh}}.hono-decks-embedded-viewer{width:100%;height:100%;min-height:0}.hono-decks-embedded-viewer .hono-decks-viewer-shell{position:relative;height:100%;grid-template-rows:minmax(0,1fr)}.hono-decks-embedded-viewer .hono-decks-viewport{width:min(100%,calc(100vh * 16 / 9));max-height:100%}@supports (height:100dvh){.hono-decks-embedded-viewer .hono-decks-viewport{width:min(100%,calc(100dvh * 16 / 9))}}.hono-decks-embedded-viewer .hono-decks-viewer-controls{bottom:max(.25rem,env(safe-area-inset-bottom,0px));z-index:4}`;
|
|
4893
|
+
return `:root{color-scheme:dark;background:#050816}html,body{width:100%;height:100%;margin:0;overflow:hidden}body{min-height:100vh}@supports (height:100dvh){body{min-height:100dvh}}.hono-decks-embedded-viewer{width:100%;height:100%;min-height:0;overflow:hidden}.hono-decks-embedded-viewer .hono-decks-viewer-shell{position:relative;height:100%;grid-template-rows:minmax(0,1fr);overflow:hidden}.hono-decks-embedded-viewer .hono-decks-viewport{width:min(100%,calc(100vh * 16 / 9));max-height:100%}@supports (height:100dvh){.hono-decks-embedded-viewer .hono-decks-viewport{width:min(100%,calc(100dvh * 16 / 9))}}.hono-decks-embedded-viewer .hono-decks-viewer-controls{bottom:max(.25rem,env(safe-area-inset-bottom,0px));z-index:4}`;
|
|
4885
4894
|
}
|
|
4886
4895
|
function escapeHtml$2(value) {
|
|
4887
4896
|
return value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("\"", """).replaceAll("'", "'");
|