@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.cjs CHANGED
@@ -5030,8 +5030,8 @@ function parseClassDiagram(content, palette) {
5030
5030
  if (classDecl) {
5031
5031
  const prefixModifier = classDecl[1];
5032
5032
  const name = classDecl[2];
5033
- const relKeyword = classDecl[3];
5034
- const parentName = classDecl[4];
5033
+ const extendsParent = classDecl[3];
5034
+ const implementsInterface = classDecl[4];
5035
5035
  const bracketModifier = classDecl[5];
5036
5036
  const modifier = prefixModifier ?? bracketModifier;
5037
5037
  const colorName = classDecl[6]?.trim();
@@ -5045,12 +5045,21 @@ function parseClassDiagram(content, palette) {
5045
5045
  if (modifier) node.modifier = modifier;
5046
5046
  if (color) node.color = color;
5047
5047
  node.lineNumber = lineNumber;
5048
- if (relKeyword && parentName) {
5049
- getOrCreateClass(parentName, lineNumber);
5048
+ if (extendsParent) {
5049
+ getOrCreateClass(extendsParent, lineNumber);
5050
5050
  result.relationships.push({
5051
5051
  source: classId(name),
5052
- target: classId(parentName),
5053
- type: relKeyword,
5052
+ target: classId(extendsParent),
5053
+ type: "extends",
5054
+ lineNumber
5055
+ });
5056
+ }
5057
+ if (implementsInterface) {
5058
+ getOrCreateClass(implementsInterface, lineNumber);
5059
+ result.relationships.push({
5060
+ source: classId(name),
5061
+ target: classId(implementsInterface),
5062
+ type: "implements",
5054
5063
  lineNumber
5055
5064
  });
5056
5065
  }
@@ -5167,7 +5176,7 @@ var init_parser2 = __esm({
5167
5176
  init_diagnostics();
5168
5177
  init_arrows();
5169
5178
  init_parsing();
5170
- 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*$/;
5179
+ 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*$/;
5171
5180
  INDENT_REL_ARROW_RE = /^(--\|>|\.\.\|>|\*--|o--|\.\.>|->)\s*([A-Z][A-Za-z0-9_]*)(?:\s+:?\s*(.+))?$/;
5172
5181
  REL_ARROW_RE = /^([A-Z][A-Za-z0-9_]*)\s*(--\|>|\.\.\|>|\*--|o--|\.\.>|->)\s*([A-Z][A-Za-z0-9_]*)(?:\s+:?\s*(.+))?$/;
5173
5182
  VISIBILITY_RE = /^([+\-#])\s*/;
@@ -40467,8 +40476,8 @@ async function renderForExport(content, theme, palette, viewState, options) {
40467
40476
  const effectivePalette2 = await resolveExportPalette(theme, palette);
40468
40477
  const radarParsed = parseTechRadar2(content);
40469
40478
  if (radarParsed.error || radarParsed.quadrants.length === 0) return "";
40470
- const RADAR_EXPORT_W = 1600;
40471
- const RADAR_EXPORT_H = 1200;
40479
+ const RADAR_EXPORT_W = 1300;
40480
+ const RADAR_EXPORT_H = 1500;
40472
40481
  const container2 = createExportContainer(RADAR_EXPORT_W, RADAR_EXPORT_H);
40473
40482
  renderTechRadarForExport2(
40474
40483
  container2,