@zenuml/core 3.47.0 → 3.47.1

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.
@@ -27,7 +27,7 @@
27
27
  .diff-panel.visible { display: block; }
28
28
  .diff-panel .panel-content canvas { max-width: 100%; }
29
29
  #html-output .footer { display: none !important; }
30
- #html-output .privacy { visibility: hidden !important; }
30
+ #html-output .privacy { visibility: hidden !important; width: 0 !important; overflow: hidden !important; }
31
31
  </style>
32
32
  </head>
33
33
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenuml/core",
3
- "version": "3.47.0",
3
+ "version": "3.47.1",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -273,6 +273,24 @@ export async function collectLabelData(page) {
273
273
  return Array.from(byName.values());
274
274
  }
275
275
 
276
+ function collectHtmlTitle(root, rootRect) {
277
+ const titleEl = root.querySelector(".title");
278
+ if (!titleEl) return null;
279
+ const text = (titleEl.textContent ?? "").trim();
280
+ if (!text) return null;
281
+ const measured = measureTextEntry(titleEl, rootRect);
282
+ return { side: "html", kind: "title", text, box: measured.box, font: measured.font, letters: measured.letters };
283
+ }
284
+
285
+ function collectSvgTitle(root, rootRect) {
286
+ const titleEl = root.querySelector("text.frame-title");
287
+ if (!titleEl) return null;
288
+ const text = (titleEl.textContent ?? "").trim();
289
+ if (!text) return null;
290
+ const measured = measureTextEntry(titleEl, rootRect);
291
+ return { side: "svg", kind: "title", text, box: measured.box, font: measured.font, letters: measured.letters };
292
+ }
293
+
276
294
  function collectHtmlLabels(root, rootRect) {
277
295
  const labels = [];
278
296
  const selectorPairs = [
@@ -968,6 +986,8 @@ export async function collectLabelData(page) {
968
986
  htmlRootBox: { x: 0, y: 0, w: htmlRootRect.width, h: htmlRootRect.height },
969
987
  svgRootBox: { x: 0, y: 0, w: svgRootRect.width, h: svgRootRect.height },
970
988
  svgFrameBorderBox: boxOrNull(strokedElementOuterRect(svgFrameBorderEl, svgRootRect)),
989
+ htmlTitle: collectHtmlTitle(htmlRoot, htmlRootRect),
990
+ svgTitle: collectSvgTitle(svgRoot, svgRootRect),
971
991
  htmlLabels: collectHtmlLabels(htmlRoot, htmlRootRect),
972
992
  svgLabels: collectSvgLabels(svgRoot, svgRootRect),
973
993
  htmlNumbers: collectHtmlNumbers(htmlRoot, htmlRootRect),
@@ -123,6 +123,7 @@ export function buildReport(caseName, extracted, diffImage) {
123
123
 
124
124
  return {
125
125
  case: caseName,
126
+ title: sections.title,
126
127
  labels: sections.labels,
127
128
  numbers: sections.numbers,
128
129
  arrows: sections.arrows,
@@ -137,6 +138,7 @@ export function buildReport(caseName, extracted, diffImage) {
137
138
  fragment_dividers: sections.fragmentDividers,
138
139
  dividers: sections.dividers,
139
140
  residual_scopes: residualScopes.scopes,
141
+ title_summary: sections.title ? formatSectionSummary("title", sections.title) : null,
140
142
  summary: sections.labels.map((label) => formatSectionSummary("label", label)),
141
143
  number_summary: sections.numbers.map((number) => formatSectionSummary("number", number)),
142
144
  arrow_summary: sections.arrows.map((arrow) => `arrow:${arrow.key.text} -> ${formatArrowSummary(arrow)}`),
@@ -770,8 +770,19 @@ function buildFragmentDividerSection(htmlDividers, svgDividers) {
770
770
  return results;
771
771
  }
772
772
 
773
+ function buildTitleSection(htmlTitle, svgTitle, diffImage) {
774
+ if (!htmlTitle && !svgTitle) return null;
775
+ // Wrap as single-element arrays and reuse buildSection
776
+ const htmlItems = htmlTitle ? [htmlTitle] : [];
777
+ const svgItems = svgTitle ? [svgTitle] : [];
778
+ const results = buildSection(htmlItems, svgItems, diffImage);
779
+ return results.length > 0 ? results[0] : null;
780
+ }
781
+
773
782
  export function buildScoredSections(extracted, diffImage) {
774
783
  const {
784
+ htmlTitle,
785
+ svgTitle,
775
786
  htmlLabels,
776
787
  svgLabels,
777
788
  htmlNumbers,
@@ -799,6 +810,7 @@ export function buildScoredSections(extracted, diffImage) {
799
810
  const svgParticipantStereotypes = buildParticipantStereotypeItems(svgParticipants);
800
811
 
801
812
  return {
813
+ title: buildTitleSection(htmlTitle || null, svgTitle || null, diffImage),
802
814
  labels: buildSection(htmlLabels, svgLabels, diffImage),
803
815
  numbers: buildSection(htmlNumbers, svgNumbers, diffImage),
804
816
  arrows: buildArrowSection(htmlArrows, svgArrows, diffImage),