Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [2.6.2-beta.0](https://github.com/wireweave/core/compare/v2.6.1...v2.6.2-beta.0) (2026-03-09)

### Bug Fixes

* **renderer:** move annotations outside viewport overflow ([c593cfc](https://github.com/wireweave/core/commit/c593cfc1f7cadebb3a728d4465327623a21b60db))

## [2.6.1](https://github.com/wireweave/core/compare/v2.6.1-beta.2...v2.6.1) (2026-03-09)

## [2.6.1-beta.2](https://github.com/wireweave/core/compare/v2.6.1-beta.1...v2.6.1-beta.2) (2026-03-09)
Expand Down
70 changes: 70 additions & 0 deletions __tests__/snapshots/__snapshots__/render.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1776,8 +1776,15 @@ svg.wf-icon-xl { width: 32px; height: 32px; }
z-index: 10;
}

/* Page Wrapper - Contains page + annotations outside viewport overflow */
.wf-page-wrapper {
display: flex;
flex-direction: column;
}

/* Annotations Panel - Documentation container */
.wf-annotations {
margin-top: 16px;
background: #fafafa;
border: 2px dashed #d1d5db;
border-radius: 8px;
Expand Down Expand Up @@ -3631,8 +3638,15 @@ svg.wf-icon-xl { width: 32px; height: 32px; }
z-index: 10;
}

/* Page Wrapper - Contains page + annotations outside viewport overflow */
.wf-page-wrapper {
display: flex;
flex-direction: column;
}

/* Annotations Panel - Documentation container */
.wf-annotations {
margin-top: 16px;
background: #fafafa;
border: 2px dashed #d1d5db;
border-radius: 8px;
Expand Down Expand Up @@ -5563,8 +5577,15 @@ svg.wf-icon-xl { width: 32px; height: 32px; }
z-index: 10;
}

/* Page Wrapper - Contains page + annotations outside viewport overflow */
.wf-page-wrapper {
display: flex;
flex-direction: column;
}

/* Annotations Panel - Documentation container */
.wf-annotations {
margin-top: 16px;
background: #fafafa;
border: 2px dashed #d1d5db;
border-radius: 8px;
Expand Down Expand Up @@ -7448,8 +7469,15 @@ svg.wf-icon-xl { width: 32px; height: 32px; }
z-index: 10;
}

/* Page Wrapper - Contains page + annotations outside viewport overflow */
.wf-page-wrapper {
display: flex;
flex-direction: column;
}

/* Annotations Panel - Documentation container */
.wf-annotations {
margin-top: 16px;
background: #fafafa;
border: 2px dashed #d1d5db;
border-radius: 8px;
Expand Down Expand Up @@ -9458,8 +9486,15 @@ svg.wf-icon-xl { width: 32px; height: 32px; }
z-index: 10;
}

/* Page Wrapper - Contains page + annotations outside viewport overflow */
.wf-page-wrapper {
display: flex;
flex-direction: column;
}

/* Annotations Panel - Documentation container */
.wf-annotations {
margin-top: 16px;
background: #fafafa;
border: 2px dashed #d1d5db;
border-radius: 8px;
Expand Down Expand Up @@ -11337,8 +11372,15 @@ svg.wf-icon-xl { width: 32px; height: 32px; }
z-index: 10;
}

/* Page Wrapper - Contains page + annotations outside viewport overflow */
.wf-page-wrapper {
display: flex;
flex-direction: column;
}

/* Annotations Panel - Documentation container */
.wf-annotations {
margin-top: 16px;
background: #fafafa;
border: 2px dashed #d1d5db;
border-radius: 8px;
Expand Down Expand Up @@ -13217,8 +13259,15 @@ svg.wf-icon-xl { width: 32px; height: 32px; }
z-index: 10;
}

/* Page Wrapper - Contains page + annotations outside viewport overflow */
.wf-page-wrapper {
display: flex;
flex-direction: column;
}

/* Annotations Panel - Documentation container */
.wf-annotations {
margin-top: 16px;
background: #fafafa;
border: 2px dashed #d1d5db;
border-radius: 8px;
Expand Down Expand Up @@ -15098,8 +15147,15 @@ svg.wf-icon-xl { width: 32px; height: 32px; }
z-index: 10;
}

/* Page Wrapper - Contains page + annotations outside viewport overflow */
.wf-page-wrapper {
display: flex;
flex-direction: column;
}

/* Annotations Panel - Documentation container */
.wf-annotations {
margin-top: 16px;
background: #fafafa;
border: 2px dashed #d1d5db;
border-radius: 8px;
Expand Down Expand Up @@ -16983,8 +17039,15 @@ svg.wf-icon-xl { width: 32px; height: 32px; }
z-index: 10;
}

/* Page Wrapper - Contains page + annotations outside viewport overflow */
.wf-page-wrapper {
display: flex;
flex-direction: column;
}

/* Annotations Panel - Documentation container */
.wf-annotations {
margin-top: 16px;
background: #fafafa;
border: 2px dashed #d1d5db;
border-radius: 8px;
Expand Down Expand Up @@ -18860,8 +18923,15 @@ svg.wf-icon-xl { width: 32px; height: 32px; }
z-index: 10;
}

/* Page Wrapper - Contains page + annotations outside viewport overflow */
.wf-page-wrapper {
display: flex;
flex-direction: column;
}

/* Annotations Panel - Documentation container */
.wf-annotations {
margin-top: 16px;
background: #fafafa;
border: 2px dashed #d1d5db;
border-radius: 8px;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wireweave/core",
"version": "2.6.1",
"version": "2.6.2-beta.0",
"description": "Core parser and renderer for wireweave",
"type": "module",
"main": "dist/index.js",
Expand Down
17 changes: 15 additions & 2 deletions src/renderer/html/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,12 @@ export class HtmlRenderer extends BaseRenderer {
...this.getCommonClasses(node),
]);

const children = this.renderChildren(node.children);
// Separate UI children from annotation children
// Annotations render outside the viewport container to avoid overflow: hidden clipping
const uiChildren = node.children.filter(child => child.type !== 'Annotations');
const annotationChildren = node.children.filter(child => child.type === 'Annotations');

const uiContent = this.renderChildren(uiChildren);
const title = node.title ? `<title>${this.escapeHtml(node.title)}</title>\n` : '';

// Build common styles (padding, margin, etc.) and combine with viewport dimensions
Expand All @@ -341,7 +346,15 @@ export class HtmlRenderer extends BaseRenderer {
// Add data attributes for viewport info
const dataAttrs = `data-viewport-width="${viewport.width}" data-viewport-height="${viewport.height}" data-viewport-label="${viewport.label}"`;

return `<div class="${classes}" style="${combinedStyle}" ${dataAttrs}>\n${title}${children}\n</div>`;
const pageDiv = `<div class="${classes}" style="${combinedStyle}" ${dataAttrs}>\n${title}${uiContent}\n</div>`;

// If there are annotations, wrap page + annotations in a wrapper div
if (annotationChildren.length > 0) {
const annotationsContent = this.renderChildren(annotationChildren);
return `<div class="${this.prefix}-page-wrapper" style="width: ${viewport.width}px">\n${pageDiv}\n${annotationsContent}\n</div>`;
}

return pageDiv;
}

/**
Expand Down
7 changes: 7 additions & 0 deletions src/renderer/styles/annotation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,15 @@ export function generateAnnotationStyles(_theme: ThemeConfig, prefix: string): s
z-index: 10;
}

/* Page Wrapper - Contains page + annotations outside viewport overflow */
.${prefix}-page-wrapper {
display: flex;
flex-direction: column;
}

/* Annotations Panel - Documentation container */
.${prefix}-annotations {
margin-top: 16px;
background: #fafafa;
border: 2px dashed #d1d5db;
border-radius: 8px;
Expand Down