sdocs 0.0.49 → 0.0.50

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
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.0.50] - 2026-07-05
11
+
12
+ ### Fixed
13
+
14
+ - **The last block of a page no longer gets clipped.** Preview iframes size
15
+ themselves to the preview root's `scrollHeight`, but the first and last
16
+ child's margins collapsed through that root and weren't counted — so the
17
+ final block of `[PAGE]` content (a closing paragraph, a raw HTML block)
18
+ was cut off. The preview root is now a block formatting context
19
+ (`display: flow-root`), so the reported height includes everything.
20
+
10
21
  ## [0.0.49] - 2026-07-05
11
22
 
12
23
  ### Fixed
@@ -138,7 +138,10 @@ ${stateBroadcast}
138
138
 
139
139
  window.parent.postMessage({ type: 'sdocs:preview-ready' }, '*');
140
140
 
141
- // Report content height to parent for auto-sizing
141
+ // Report content height to parent for auto-sizing. The preview div is
142
+ // display: flow-root so child margins are contained — otherwise the
143
+ // first/last child's margins collapse through it, scrollHeight comes up
144
+ // short, and the iframe clips the final block of content.
142
145
  const ro = new ResizeObserver(() => {
143
146
  const height = document.getElementById('sdocs-preview')?.scrollHeight ?? 0;
144
147
  window.parent.postMessage({ type: 'sdocs:resize', height }, '*');
@@ -148,7 +151,7 @@ ${stateBroadcast}
148
151
  });
149
152
  </script>
150
153
 
151
- <div id="sdocs-preview">
154
+ <div id="sdocs-preview" style="display: flow-root">
152
155
  {#snippet SdocsPreview(args)}
153
156
  ${injectRootRef(snippetBody, componentName)}
154
157
  {/snippet}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdocs",
3
- "version": "0.0.49",
3
+ "version": "0.0.50",
4
4
  "description": "A lightweight documentation tool for Svelte 5 components",
5
5
  "type": "module",
6
6
  "license": "MIT",