baiten3d 0.1.1 → 0.1.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/adapters/react/ReaderOverlays.d.ts +1 -1
- package/dist/adapters/react/index.js +1 -1
- package/dist/adapters/react/readerUrl.d.ts +7 -1
- package/dist/adapters/static/index.js +21 -19
- package/dist/baiten3d.css +1 -1
- package/dist/{composeSite-CcP_4wa0.js → composeSite-BEb4A7zA.js} +1 -1
- package/dist/index.js +3 -3
- package/dist/{rack-DndsEqJP.js → rack-C76bUYRK.js} +27 -1
- package/dist/react-DuCJDW9m.js +6025 -0
- package/dist/site/assets/index-BJLzKbEb.js +69 -0
- package/dist/site/assets/{index-BSASOC5H.css → index-CvNzeShV.css} +1 -1
- package/dist/site/index.html +2 -2
- package/package.json +1 -1
- package/dist/react-CNogCJgk.js +0 -5959
- package/dist/site/assets/index-CjLqB61w.js +0 -69
|
@@ -5,7 +5,7 @@ export interface SheetListDrawerProps {
|
|
|
5
5
|
readonly publicationTitle: string;
|
|
6
6
|
readonly sheets: readonly ComposedSheet[];
|
|
7
7
|
readonly activeSpreadIndex: number;
|
|
8
|
-
readonly onJumpToSpread: (spreadIndex: number) => void;
|
|
8
|
+
readonly onJumpToSpread: (spreadIndex: number, sheetIndex?: number) => void;
|
|
9
9
|
readonly onSelectArticle: (slug: string, sheetIndex?: number) => void;
|
|
10
10
|
readonly onClose: () => void;
|
|
11
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { c as ArchiveIndexView, r as MagazineViewer, n as NewspaperViewer, t as NewsstandView } from "../../react-
|
|
1
|
+
export { c as ArchiveIndexView, r as MagazineViewer, n as NewspaperViewer, t as NewsstandView } from "../../react-DuCJDW9m.js";
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* URL を汚染しないよう `pathname` のプレフィックスを必ず検証する。
|
|
7
7
|
*/
|
|
8
8
|
export declare function readInitialPageParam(maxPages: number): number | null;
|
|
9
|
+
export declare function readInitialHashId(): string | null;
|
|
9
10
|
export interface SyncReaderUrlOptions {
|
|
10
11
|
readonly assetBase: string;
|
|
11
12
|
readonly publicationId: string;
|
|
@@ -17,7 +18,12 @@ export interface SyncReaderUrlOptions {
|
|
|
17
18
|
readonly omitPageOne?: boolean;
|
|
18
19
|
/** 記事拡大・全文リーダーで個別記事を開いている場合のスラッグ */
|
|
19
20
|
readonly articleSlug?: string | null;
|
|
21
|
+
/**
|
|
22
|
+
* 同一スラッグの記事が `paginateBy: "h2"` 等で複数ページへ分割されている場合に、
|
|
23
|
+
* 2ページ目以降でも `/{pub}/{slug}/?p=N` としてページ位置を URL へ保持する。
|
|
24
|
+
*/
|
|
25
|
+
readonly preservePageWithArticle?: boolean;
|
|
20
26
|
/** 記事を開く等の明示操作は pushState、ページめくりは replaceState */
|
|
21
27
|
readonly push?: boolean;
|
|
22
28
|
}
|
|
23
|
-
export declare function syncReaderUrl({ assetBase, publicationId, latestEditionId, activeEditionId, page, omitPageOne, articleSlug, push, }: SyncReaderUrlOptions): void;
|
|
29
|
+
export declare function syncReaderUrl({ assetBase, publicationId, latestEditionId, activeEditionId, page, omitPageOne, articleSlug, preservePageWithArticle, push, }: SyncReaderUrlOptions): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { access as e, copyFile as t, cp as n, mkdir as r, mkdtemp as i, readFile as a, readdir as o, realpath as s, rm as c, stat as l, writeFile as u } from "node:fs/promises";
|
|
2
2
|
import { basename as d, dirname as f, isAbsolute as p, join as m, relative as h, resolve as g, sep as _ } from "node:path";
|
|
3
3
|
import v from "yaml";
|
|
4
|
-
import { t as y } from "../../composeSite-
|
|
5
|
-
import { n as b } from "../../rack-
|
|
4
|
+
import { t as y } from "../../composeSite-BEb4A7zA.js";
|
|
5
|
+
import { n as b } from "../../rack-C76bUYRK.js";
|
|
6
6
|
import ee from "rehype-highlight";
|
|
7
7
|
import te, { defaultSchema as x } from "rehype-sanitize";
|
|
8
8
|
import ne from "rehype-stringify";
|
|
@@ -859,21 +859,23 @@ function G(e, t, n) {
|
|
|
859
859
|
return r ? K(e, t, r, n, !0) : q(e, t, n);
|
|
860
860
|
}
|
|
861
861
|
function K(e, t, n, r, i = !1, a) {
|
|
862
|
-
let o = Q(r), s = n.sheets.map((e) => {
|
|
863
|
-
let n = e.blocks.map((
|
|
864
|
-
let
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
${
|
|
869
|
-
|
|
862
|
+
let o = Q(r), s = /* @__PURE__ */ new Set(), c = n.sheets.map((e) => {
|
|
863
|
+
let n = e.blocks.map((n) => {
|
|
864
|
+
let r = s.has(n.article.slug);
|
|
865
|
+
s.add(n.article.slug);
|
|
866
|
+
let i = r ? `${o}${t.config.id}/${n.article.slug}/?p=${e.page}` : `${o}${t.config.id}/${n.article.slug}/`, a = n.article.heroImage ? `<img src="${o}${$(t.config.id)}/${$(n.article.heroImage)}" alt="${$(n.article.heroCaption ?? n.article.title)}" loading="lazy" width="640" height="480">` : "";
|
|
867
|
+
return `<article class="baiten-ssr-block" data-role="${$(n.role)}" data-col-span="${n.colSpan}" data-row-span="${n.rowSpan}">
|
|
868
|
+
<h3><a href="${$(i)}">${$(n.article.title)}</a></h3>
|
|
869
|
+
${n.article.subtitle ? `<p class="baiten-ssr-subtitle">${$(n.article.subtitle)}</p>` : ""}
|
|
870
|
+
${a}
|
|
871
|
+
<p class="baiten-ssr-summary">${$(n.article.summary)}</p>
|
|
870
872
|
</article>`;
|
|
871
873
|
}).join("\n");
|
|
872
874
|
return `<section class="baiten-ssr-sheet" aria-label="${e.page}面">
|
|
873
875
|
<h2>${e.page}面</h2>
|
|
874
876
|
${n}
|
|
875
877
|
</section>`;
|
|
876
|
-
}).join("\n"),
|
|
878
|
+
}).join("\n"), l = t.editions.map((e) => `<li><a href="${o}${$(t.config.id)}/editions/${$(e.id)}/">${$(e.label)} — ${$(e.title)} (${$(e.publishedAt)})</a></li>`).join("\n"), u = i ? `${t.config.title} | ${e.site.title}` : `${t.config.title} ${n.label}(${n.title}) | ${e.site.title}`, d = t.config.description ?? n.leadArticle?.summary ?? `${t.config.title}の紙面`, f = `<main class="baiten-ssr-edition" data-pub="${$(t.config.id)}" data-theme="${$(t.config.theme)}" data-scene="${$(t.config.scene)}" dir="${t.readingDirection}">
|
|
877
879
|
<header>
|
|
878
880
|
<nav aria-label="紙面ナビゲーション">
|
|
879
881
|
<a href="${o}">売店へ戻る</a>
|
|
@@ -882,20 +884,20 @@ function K(e, t, n, r, i = !1, a) {
|
|
|
882
884
|
<h1>${$(t.config.title)} — ${$(n.label)}</h1>
|
|
883
885
|
<p><time datetime="${$(n.publishedAt)}">${$(n.publishedAt)}</time></p>
|
|
884
886
|
</header>
|
|
885
|
-
${
|
|
887
|
+
${c}
|
|
886
888
|
<aside aria-label="バックナンバー">
|
|
887
889
|
<h2>バックナンバー</h2>
|
|
888
|
-
<ul>${
|
|
890
|
+
<ul>${l}</ul>
|
|
889
891
|
</aside>
|
|
890
|
-
</main>`,
|
|
892
|
+
</main>`, p = a ?? r;
|
|
891
893
|
return Y(e, {
|
|
892
|
-
title:
|
|
893
|
-
description:
|
|
894
|
+
title: u,
|
|
895
|
+
description: d,
|
|
894
896
|
routePath: r,
|
|
895
|
-
canonicalRoutePath:
|
|
897
|
+
canonicalRoutePath: p,
|
|
896
898
|
ogType: "website",
|
|
897
899
|
ogImage: n.leadArticle?.heroImage ? `${t.config.id}/${n.leadArticle.heroImage}` : void 0,
|
|
898
|
-
jsonLd: [X(e,
|
|
900
|
+
jsonLd: [X(e, u, d, p)],
|
|
899
901
|
initialView: i ? {
|
|
900
902
|
kind: "edition",
|
|
901
903
|
publicationId: t.config.id
|
|
@@ -904,7 +906,7 @@ function K(e, t, n, r, i = !1, a) {
|
|
|
904
906
|
publicationId: t.config.id,
|
|
905
907
|
editionId: n.id
|
|
906
908
|
},
|
|
907
|
-
body:
|
|
909
|
+
body: f
|
|
908
910
|
});
|
|
909
911
|
}
|
|
910
912
|
function q(e, t, n) {
|