@takazudo/zudo-doc 5.16.1 → 5.16.2

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/CHANGELOG.md CHANGED
@@ -4,6 +4,13 @@ All notable changes to `@takazudo/zudo-doc` are documented in this file.
4
4
 
5
5
  The format is based on Keep a Changelog, and release notes are generated from the changelog MDX pages.
6
6
 
7
+ ## [5.16.2] - 2026-09-03
8
+
9
+ ### Bug Fixes
10
+
11
+ - Asset pages that fall back to the download panel (non-previewable or failed sniff) now render it through the shared media rail layout, so their details and linked-page sections line up with previewable assets instead of stacking. (`19e2166c9`)
12
+ - Manifest-backed block images now receive the `p-hsp-lg` inset on their figure, matching the surrounding content rhythm; `zd-enlargeable` and its enlarge button stay gated by the existing eligibility rule. (`b40ffb4c1`)
13
+
7
14
  ## [5.16.1] - 2026-09-02
8
15
 
9
16
  ### Other Changes
@@ -217,11 +217,7 @@ function createAssetPageView(ctx) {
217
217
  const downloadPanel = /* @__PURE__ */ jsx(AssetDownloadPanel, { asset, rawUrl, noPreview: t("asset.noPreview", locale), downloadLabel: t("asset.download", locale), copyLabel: t("asset.copy", locale) });
218
218
  let body;
219
219
  const isMedia = asset.previewable && asset.sniffOk && ["image", "video", "pdf"].includes(asset.kind);
220
- if (!asset.previewable || !asset.sniffOk) body = /* @__PURE__ */ jsxs(Fragment, { children: [
221
- downloadPanel,
222
- /* @__PURE__ */ jsx(AssetDetails, { asset, labels: detailsLabels }),
223
- linked
224
- ] });
220
+ if (!asset.previewable || !asset.sniffOk) body = /* @__PURE__ */ jsx(MediaLayout, { stage: downloadPanel, details, linked });
225
221
  else if (asset.kind === "image") body = /* @__PURE__ */ jsx(MediaLayout, { stage: /* @__PURE__ */ jsx(AssetImageStage, { asset, rawUrl, labels: imageStageLabels }), details, linked });
226
222
  else if (asset.kind === "video") body = /* @__PURE__ */ jsx(MediaLayout, { stage: /* @__PURE__ */ jsx(AssetVideoStage, { asset, rawUrl }), details, linked });
227
223
  else if (asset.kind === "pdf") body = /* @__PURE__ */ jsx(MediaLayout, { stage: /* @__PURE__ */ jsx(AssetPdfStage, { asset, rawUrl, children: downloadPanel }), details, linked });
@@ -146,7 +146,10 @@ function makeEnlargeableParagraph(imageEnlarge, ContentImg, assetOptions) {
146
146
  return {
147
147
  type: "figure",
148
148
  props: {
149
- ...canEnlarge ? { class: "zd-enlargeable" } : {},
149
+ class: [
150
+ canEnlarge ? "zd-enlargeable" : null,
151
+ imageEntry ? "p-hsp-lg" : null
152
+ ].filter((className) => className !== null).join(" "),
150
153
  children: [vnode, canEnlarge ? enlargeBtn : null, figcaption]
151
154
  },
152
155
  key: null,
@@ -205,8 +208,9 @@ function createMdxComponents(options) {
205
208
  a: ManifestAwareContentLink,
206
209
  // img override: rewrites root-relative src to include settings.base.
207
210
  img: ContentImg,
208
- // p override: wraps block-level images in <figure class="zd-enlargeable">.
209
- // Must come AFTER ...defaultComponents to override ContentParagraph.
211
+ // p override: wraps eligible block-level images in a figure; manifest-backed
212
+ // figures also receive the p-hsp-lg inset. Must come AFTER ...defaultComponents
213
+ // to override ContentParagraph.
210
214
  p: EnlargeableParagraph,
211
215
  // Admonitions — real typed Preact components emitting the
212
216
  // `.admonition` / `data-admonition` structure the design-system CSS
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takazudo/zudo-doc",
3
- "version": "5.16.1",
3
+ "version": "5.16.2",
4
4
  "type": "module",
5
5
  "description": "zudo-doc framework primitives layer that sits on top of zfb's engine — sidebar, theme, TOC, breadcrumb, layouts, head injection, View Transitions, SSR-skip wrappers (per ADR-003).",
6
6
  "license": "MIT",
@@ -720,7 +720,7 @@
720
720
  "typescript": "^5.0.0",
721
721
  "vitest": "^4.1.0",
722
722
  "zod": "^4.3.6",
723
- "@takazudo/zudo-doc-history-server": "5.16.1"
723
+ "@takazudo/zudo-doc-history-server": "5.16.2"
724
724
  },
725
725
  "scripts": {
726
726
  "gen:search-widget-script": "node scripts/gen-search-widget-script.mjs",