@diagrammo/dgmo 0.8.27 → 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*/;
@@ -40488,8 +40497,8 @@ async function renderForExport(content, theme, palette, viewState, options) {
40488
40497
  const effectivePalette2 = await resolveExportPalette(theme, palette);
40489
40498
  const radarParsed = parseTechRadar2(content);
40490
40499
  if (radarParsed.error || radarParsed.quadrants.length === 0) return "";
40491
- const RADAR_EXPORT_W = 1600;
40492
- const RADAR_EXPORT_H = 1200;
40500
+ const RADAR_EXPORT_W = 1300;
40501
+ const RADAR_EXPORT_H = 1500;
40493
40502
  const container2 = createExportContainer(RADAR_EXPORT_W, RADAR_EXPORT_H);
40494
40503
  renderTechRadarForExport2(
40495
40504
  container2,