@wireweave/core 2.6.1 → 2.6.2-beta.0

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/index.cjs CHANGED
@@ -8227,8 +8227,15 @@ function generateAnnotationStyles(_theme, prefix) {
8227
8227
  z-index: 10;
8228
8228
  }
8229
8229
 
8230
+ /* Page Wrapper - Contains page + annotations outside viewport overflow */
8231
+ .${prefix}-page-wrapper {
8232
+ display: flex;
8233
+ flex-direction: column;
8234
+ }
8235
+
8230
8236
  /* Annotations Panel - Documentation container */
8231
8237
  .${prefix}-annotations {
8238
+ margin-top: 16px;
8232
8239
  background: #fafafa;
8233
8240
  border: 2px dashed #d1d5db;
8234
8241
  border-radius: 8px;
@@ -56682,7 +56689,9 @@ var HtmlRenderer = class extends BaseRenderer {
56682
56689
  node.centered ? `${this.prefix}-page-centered` : void 0,
56683
56690
  ...this.getCommonClasses(node)
56684
56691
  ]);
56685
- const children = this.renderChildren(node.children);
56692
+ const uiChildren = node.children.filter((child) => child.type !== "Annotations");
56693
+ const annotationChildren = node.children.filter((child) => child.type === "Annotations");
56694
+ const uiContent = this.renderChildren(uiChildren);
56686
56695
  const title = node.title ? `<title>${this.escapeHtml(node.title)}</title>
56687
56696
  ` : "";
56688
56697
  const commonStyles = this.buildCommonStyles(node);
@@ -56692,9 +56701,17 @@ var HtmlRenderer = class extends BaseRenderer {
56692
56701
  }
56693
56702
  const combinedStyle = commonStyles ? `${viewportStyle}; ${commonStyles}` : viewportStyle;
56694
56703
  const dataAttrs = `data-viewport-width="${viewport.width}" data-viewport-height="${viewport.height}" data-viewport-label="${viewport.label}"`;
56695
- return `<div class="${classes}" style="${combinedStyle}" ${dataAttrs}>
56696
- ${title}${children}
56704
+ const pageDiv = `<div class="${classes}" style="${combinedStyle}" ${dataAttrs}>
56705
+ ${title}${uiContent}
56706
+ </div>`;
56707
+ if (annotationChildren.length > 0) {
56708
+ const annotationsContent = this.renderChildren(annotationChildren);
56709
+ return `<div class="${this.prefix}-page-wrapper" style="width: ${viewport.width}px">
56710
+ ${pageDiv}
56711
+ ${annotationsContent}
56697
56712
  </div>`;
56713
+ }
56714
+ return pageDiv;
56698
56715
  }
56699
56716
  /**
56700
56717
  * Render any AST node
package/dist/index.js CHANGED
@@ -8087,8 +8087,15 @@ function generateAnnotationStyles(_theme, prefix) {
8087
8087
  z-index: 10;
8088
8088
  }
8089
8089
 
8090
+ /* Page Wrapper - Contains page + annotations outside viewport overflow */
8091
+ .${prefix}-page-wrapper {
8092
+ display: flex;
8093
+ flex-direction: column;
8094
+ }
8095
+
8090
8096
  /* Annotations Panel - Documentation container */
8091
8097
  .${prefix}-annotations {
8098
+ margin-top: 16px;
8092
8099
  background: #fafafa;
8093
8100
  border: 2px dashed #d1d5db;
8094
8101
  border-radius: 8px;
@@ -56542,7 +56549,9 @@ var HtmlRenderer = class extends BaseRenderer {
56542
56549
  node.centered ? `${this.prefix}-page-centered` : void 0,
56543
56550
  ...this.getCommonClasses(node)
56544
56551
  ]);
56545
- const children = this.renderChildren(node.children);
56552
+ const uiChildren = node.children.filter((child) => child.type !== "Annotations");
56553
+ const annotationChildren = node.children.filter((child) => child.type === "Annotations");
56554
+ const uiContent = this.renderChildren(uiChildren);
56546
56555
  const title = node.title ? `<title>${this.escapeHtml(node.title)}</title>
56547
56556
  ` : "";
56548
56557
  const commonStyles = this.buildCommonStyles(node);
@@ -56552,9 +56561,17 @@ var HtmlRenderer = class extends BaseRenderer {
56552
56561
  }
56553
56562
  const combinedStyle = commonStyles ? `${viewportStyle}; ${commonStyles}` : viewportStyle;
56554
56563
  const dataAttrs = `data-viewport-width="${viewport.width}" data-viewport-height="${viewport.height}" data-viewport-label="${viewport.label}"`;
56555
- return `<div class="${classes}" style="${combinedStyle}" ${dataAttrs}>
56556
- ${title}${children}
56564
+ const pageDiv = `<div class="${classes}" style="${combinedStyle}" ${dataAttrs}>
56565
+ ${title}${uiContent}
56566
+ </div>`;
56567
+ if (annotationChildren.length > 0) {
56568
+ const annotationsContent = this.renderChildren(annotationChildren);
56569
+ return `<div class="${this.prefix}-page-wrapper" style="width: ${viewport.width}px">
56570
+ ${pageDiv}
56571
+ ${annotationsContent}
56557
56572
  </div>`;
56573
+ }
56574
+ return pageDiv;
56558
56575
  }
56559
56576
  /**
56560
56577
  * Render any AST node
package/dist/renderer.cjs CHANGED
@@ -1376,8 +1376,15 @@ function generateAnnotationStyles(_theme, prefix) {
1376
1376
  z-index: 10;
1377
1377
  }
1378
1378
 
1379
+ /* Page Wrapper - Contains page + annotations outside viewport overflow */
1380
+ .${prefix}-page-wrapper {
1381
+ display: flex;
1382
+ flex-direction: column;
1383
+ }
1384
+
1379
1385
  /* Annotations Panel - Documentation container */
1380
1386
  .${prefix}-annotations {
1387
+ margin-top: 16px;
1381
1388
  background: #fafafa;
1382
1389
  border: 2px dashed #d1d5db;
1383
1390
  border-radius: 8px;
@@ -49802,7 +49809,9 @@ var HtmlRenderer = class extends BaseRenderer {
49802
49809
  node.centered ? `${this.prefix}-page-centered` : void 0,
49803
49810
  ...this.getCommonClasses(node)
49804
49811
  ]);
49805
- const children = this.renderChildren(node.children);
49812
+ const uiChildren = node.children.filter((child) => child.type !== "Annotations");
49813
+ const annotationChildren = node.children.filter((child) => child.type === "Annotations");
49814
+ const uiContent = this.renderChildren(uiChildren);
49806
49815
  const title = node.title ? `<title>${this.escapeHtml(node.title)}</title>
49807
49816
  ` : "";
49808
49817
  const commonStyles = this.buildCommonStyles(node);
@@ -49812,9 +49821,17 @@ var HtmlRenderer = class extends BaseRenderer {
49812
49821
  }
49813
49822
  const combinedStyle = commonStyles ? `${viewportStyle}; ${commonStyles}` : viewportStyle;
49814
49823
  const dataAttrs = `data-viewport-width="${viewport.width}" data-viewport-height="${viewport.height}" data-viewport-label="${viewport.label}"`;
49815
- return `<div class="${classes}" style="${combinedStyle}" ${dataAttrs}>
49816
- ${title}${children}
49824
+ const pageDiv = `<div class="${classes}" style="${combinedStyle}" ${dataAttrs}>
49825
+ ${title}${uiContent}
49826
+ </div>`;
49827
+ if (annotationChildren.length > 0) {
49828
+ const annotationsContent = this.renderChildren(annotationChildren);
49829
+ return `<div class="${this.prefix}-page-wrapper" style="width: ${viewport.width}px">
49830
+ ${pageDiv}
49831
+ ${annotationsContent}
49817
49832
  </div>`;
49833
+ }
49834
+ return pageDiv;
49818
49835
  }
49819
49836
  /**
49820
49837
  * Render any AST node
package/dist/renderer.js CHANGED
@@ -1338,8 +1338,15 @@ function generateAnnotationStyles(_theme, prefix) {
1338
1338
  z-index: 10;
1339
1339
  }
1340
1340
 
1341
+ /* Page Wrapper - Contains page + annotations outside viewport overflow */
1342
+ .${prefix}-page-wrapper {
1343
+ display: flex;
1344
+ flex-direction: column;
1345
+ }
1346
+
1341
1347
  /* Annotations Panel - Documentation container */
1342
1348
  .${prefix}-annotations {
1349
+ margin-top: 16px;
1343
1350
  background: #fafafa;
1344
1351
  border: 2px dashed #d1d5db;
1345
1352
  border-radius: 8px;
@@ -49764,7 +49771,9 @@ var HtmlRenderer = class extends BaseRenderer {
49764
49771
  node.centered ? `${this.prefix}-page-centered` : void 0,
49765
49772
  ...this.getCommonClasses(node)
49766
49773
  ]);
49767
- const children = this.renderChildren(node.children);
49774
+ const uiChildren = node.children.filter((child) => child.type !== "Annotations");
49775
+ const annotationChildren = node.children.filter((child) => child.type === "Annotations");
49776
+ const uiContent = this.renderChildren(uiChildren);
49768
49777
  const title = node.title ? `<title>${this.escapeHtml(node.title)}</title>
49769
49778
  ` : "";
49770
49779
  const commonStyles = this.buildCommonStyles(node);
@@ -49774,9 +49783,17 @@ var HtmlRenderer = class extends BaseRenderer {
49774
49783
  }
49775
49784
  const combinedStyle = commonStyles ? `${viewportStyle}; ${commonStyles}` : viewportStyle;
49776
49785
  const dataAttrs = `data-viewport-width="${viewport.width}" data-viewport-height="${viewport.height}" data-viewport-label="${viewport.label}"`;
49777
- return `<div class="${classes}" style="${combinedStyle}" ${dataAttrs}>
49778
- ${title}${children}
49786
+ const pageDiv = `<div class="${classes}" style="${combinedStyle}" ${dataAttrs}>
49787
+ ${title}${uiContent}
49788
+ </div>`;
49789
+ if (annotationChildren.length > 0) {
49790
+ const annotationsContent = this.renderChildren(annotationChildren);
49791
+ return `<div class="${this.prefix}-page-wrapper" style="width: ${viewport.width}px">
49792
+ ${pageDiv}
49793
+ ${annotationsContent}
49779
49794
  </div>`;
49795
+ }
49796
+ return pageDiv;
49780
49797
  }
49781
49798
  /**
49782
49799
  * Render any AST node
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wireweave/core",
3
- "version": "2.6.1",
3
+ "version": "2.6.2-beta.0",
4
4
  "description": "Core parser and renderer for wireweave",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",