@diagrammo/dgmo 0.8.26 → 0.8.28

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.js CHANGED
@@ -5028,8 +5028,8 @@ function parseClassDiagram(content, palette) {
5028
5028
  if (classDecl) {
5029
5029
  const prefixModifier = classDecl[1];
5030
5030
  const name = classDecl[2];
5031
- const relKeyword = classDecl[3];
5032
- const parentName = classDecl[4];
5031
+ const extendsParent = classDecl[3];
5032
+ const implementsInterface = classDecl[4];
5033
5033
  const bracketModifier = classDecl[5];
5034
5034
  const modifier = prefixModifier ?? bracketModifier;
5035
5035
  const colorName = classDecl[6]?.trim();
@@ -5043,12 +5043,21 @@ function parseClassDiagram(content, palette) {
5043
5043
  if (modifier) node.modifier = modifier;
5044
5044
  if (color) node.color = color;
5045
5045
  node.lineNumber = lineNumber;
5046
- if (relKeyword && parentName) {
5047
- getOrCreateClass(parentName, lineNumber);
5046
+ if (extendsParent) {
5047
+ getOrCreateClass(extendsParent, lineNumber);
5048
5048
  result.relationships.push({
5049
5049
  source: classId(name),
5050
- target: classId(parentName),
5051
- type: relKeyword,
5050
+ target: classId(extendsParent),
5051
+ type: "extends",
5052
+ lineNumber
5053
+ });
5054
+ }
5055
+ if (implementsInterface) {
5056
+ getOrCreateClass(implementsInterface, lineNumber);
5057
+ result.relationships.push({
5058
+ source: classId(name),
5059
+ target: classId(implementsInterface),
5060
+ type: "implements",
5052
5061
  lineNumber
5053
5062
  });
5054
5063
  }
@@ -5165,7 +5174,7 @@ var init_parser2 = __esm({
5165
5174
  init_diagnostics();
5166
5175
  init_arrows();
5167
5176
  init_parsing();
5168
- CLASS_DECL_RE = /^(?:(abstract|interface|enum)\s+)?([A-Z][A-Za-z0-9_]*)(?:\s+(extends|implements)\s+([A-Z][A-Za-z0-9_]*))?(?:\s+\[(abstract|interface|enum)\])?(?:\s+\(([^)]+)\))?\s*$/;
5177
+ CLASS_DECL_RE = /^(?:(abstract|interface|enum)\s+)?([A-Z][A-Za-z0-9_]*)(?:\s+extends\s+([A-Z][A-Za-z0-9_]*))?(?:\s+implements\s+([A-Z][A-Za-z0-9_]*))?(?:\s+\[(abstract|interface|enum)\])?(?:\s+\(([^)]+)\))?\s*$/;
5169
5178
  INDENT_REL_ARROW_RE = /^(--\|>|\.\.\|>|\*--|o--|\.\.>|->)\s*([A-Z][A-Za-z0-9_]*)(?:\s+:?\s*(.+))?$/;
5170
5179
  REL_ARROW_RE = /^([A-Z][A-Za-z0-9_]*)\s*(--\|>|\.\.\|>|\*--|o--|\.\.>|->)\s*([A-Z][A-Za-z0-9_]*)(?:\s+:?\s*(.+))?$/;
5171
5180
  VISIBILITY_RE = /^([+\-#])\s*/;
@@ -13579,7 +13588,7 @@ var init_parser13 = __esm({
13579
13588
  "bottom-left"
13580
13589
  ];
13581
13590
  KNOWN_OPTIONS8 = /* @__PURE__ */ new Set([]);
13582
- KNOWN_BOOLEANS5 = /* @__PURE__ */ new Set([]);
13591
+ KNOWN_BOOLEANS5 = /* @__PURE__ */ new Set(["show-blip-legend"]);
13583
13592
  }
13584
13593
  });
13585
13594
 
@@ -31922,7 +31931,8 @@ function renderTechRadar(container, parsed, palette, isDark, onClickItem, export
31922
31931
  );
31923
31932
  return;
31924
31933
  }
31925
- const showListing = exportDims ? true : options?.showListing ?? false;
31934
+ const directiveOn = parsed.options["show-blip-legend"] === "on";
31935
+ const showListing = exportDims ? true : options?.showListing ?? directiveOn;
31926
31936
  const listingHeight = showListing ? estimateListingHeight(parsed) : 0;
31927
31937
  const init2 = initRadarSvg(container, palette, exportDims);
31928
31938
  if (!init2) return;
@@ -40487,8 +40497,8 @@ async function renderForExport(content, theme, palette, viewState, options) {
40487
40497
  const effectivePalette2 = await resolveExportPalette(theme, palette);
40488
40498
  const radarParsed = parseTechRadar2(content);
40489
40499
  if (radarParsed.error || radarParsed.quadrants.length === 0) return "";
40490
- const RADAR_EXPORT_W = 1600;
40491
- const RADAR_EXPORT_H = 1200;
40500
+ const RADAR_EXPORT_W = 1300;
40501
+ const RADAR_EXPORT_H = 1500;
40492
40502
  const container2 = createExportContainer(RADAR_EXPORT_W, RADAR_EXPORT_H);
40493
40503
  renderTechRadarForExport2(
40494
40504
  container2,