@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/cli.cjs +69 -69
- package/dist/index.cjs +21 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -11
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.js.map +1 -1
- package/package.json +1 -1
- package/src/class/parser.ts +22 -9
- package/src/d3.ts +2 -2
- package/src/tech-radar/parser.ts +1 -1
- package/src/tech-radar/renderer.ts +4 -2
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
|
|
5034
|
-
const
|
|
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 (
|
|
5049
|
-
getOrCreateClass(
|
|
5048
|
+
if (extendsParent) {
|
|
5049
|
+
getOrCreateClass(extendsParent, lineNumber);
|
|
5050
5050
|
result.relationships.push({
|
|
5051
5051
|
source: classId(name),
|
|
5052
|
-
target: classId(
|
|
5053
|
-
type:
|
|
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+(
|
|
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*/;
|
|
@@ -13563,7 +13572,7 @@ var init_parser13 = __esm({
|
|
|
13563
13572
|
"bottom-left"
|
|
13564
13573
|
];
|
|
13565
13574
|
KNOWN_OPTIONS8 = /* @__PURE__ */ new Set([]);
|
|
13566
|
-
KNOWN_BOOLEANS5 = /* @__PURE__ */ new Set([]);
|
|
13575
|
+
KNOWN_BOOLEANS5 = /* @__PURE__ */ new Set(["show-blip-legend"]);
|
|
13567
13576
|
}
|
|
13568
13577
|
});
|
|
13569
13578
|
|
|
@@ -31905,7 +31914,8 @@ function renderTechRadar(container, parsed, palette, isDark, onClickItem, export
|
|
|
31905
31914
|
);
|
|
31906
31915
|
return;
|
|
31907
31916
|
}
|
|
31908
|
-
const
|
|
31917
|
+
const directiveOn = parsed.options["show-blip-legend"] === "on";
|
|
31918
|
+
const showListing = exportDims ? true : options?.showListing ?? directiveOn;
|
|
31909
31919
|
const listingHeight = showListing ? estimateListingHeight(parsed) : 0;
|
|
31910
31920
|
const init2 = initRadarSvg(container, palette, exportDims);
|
|
31911
31921
|
if (!init2) return;
|
|
@@ -40466,8 +40476,8 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
40466
40476
|
const effectivePalette2 = await resolveExportPalette(theme, palette);
|
|
40467
40477
|
const radarParsed = parseTechRadar2(content);
|
|
40468
40478
|
if (radarParsed.error || radarParsed.quadrants.length === 0) return "";
|
|
40469
|
-
const RADAR_EXPORT_W =
|
|
40470
|
-
const RADAR_EXPORT_H =
|
|
40479
|
+
const RADAR_EXPORT_W = 1300;
|
|
40480
|
+
const RADAR_EXPORT_H = 1500;
|
|
40471
40481
|
const container2 = createExportContainer(RADAR_EXPORT_W, RADAR_EXPORT_H);
|
|
40472
40482
|
renderTechRadarForExport2(
|
|
40473
40483
|
container2,
|