@diagrammo/dgmo 0.7.1 → 0.7.3
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 +165 -165
- package/dist/index.cjs +231 -72
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +231 -72
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/d3.ts +2 -0
- package/src/gantt/parser.ts +5 -0
- package/src/gantt/renderer.ts +353 -87
- package/src/gantt/types.ts +4 -0
- package/src/initiative-status/renderer.ts +41 -9
package/package.json
CHANGED
package/src/d3.ts
CHANGED
|
@@ -5816,6 +5816,8 @@ function finalizeSvgExport(
|
|
|
5816
5816
|
}
|
|
5817
5817
|
svgEl.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
|
|
5818
5818
|
svgEl.style.fontFamily = FONT_FAMILY;
|
|
5819
|
+
// Strip elements marked for export exclusion (e.g., inactive legend pills)
|
|
5820
|
+
svgEl.querySelectorAll('[data-export-ignore]').forEach((el) => el.remove());
|
|
5819
5821
|
const svgHtml = svgEl.outerHTML;
|
|
5820
5822
|
document.body.removeChild(container);
|
|
5821
5823
|
if (options?.branding !== false) {
|
package/src/gantt/parser.ts
CHANGED
|
@@ -107,6 +107,8 @@ export function parseGantt(content: string, palette?: PaletteColors): ParsedGant
|
|
|
107
107
|
dependencies: false,
|
|
108
108
|
sort: 'default',
|
|
109
109
|
defaultSwimlaneGroup: null,
|
|
110
|
+
optionLineNumbers: {},
|
|
111
|
+
holidaysLineNumber: null,
|
|
110
112
|
},
|
|
111
113
|
diagnostics,
|
|
112
114
|
error: null,
|
|
@@ -351,6 +353,7 @@ export function parseGantt(content: string, palette?: PaletteColors): ParsedGant
|
|
|
351
353
|
inHolidaysBlock = true;
|
|
352
354
|
holidaysBlockIndent = indent;
|
|
353
355
|
inHeaderBlock = false;
|
|
356
|
+
result.options.holidaysLineNumber = lineNumber;
|
|
354
357
|
continue;
|
|
355
358
|
}
|
|
356
359
|
|
|
@@ -382,6 +385,7 @@ export function parseGantt(content: string, palette?: PaletteColors): ParsedGant
|
|
|
382
385
|
endDate: eraMatch[2],
|
|
383
386
|
label: eraExtracted.label,
|
|
384
387
|
color: eraExtracted.color || null,
|
|
388
|
+
lineNumber,
|
|
385
389
|
});
|
|
386
390
|
inHeaderBlock = false;
|
|
387
391
|
continue;
|
|
@@ -407,6 +411,7 @@ export function parseGantt(content: string, palette?: PaletteColors): ParsedGant
|
|
|
407
411
|
if (optMatch && isKnownOption(optMatch[1].toLowerCase())) {
|
|
408
412
|
const key = optMatch[1].toLowerCase();
|
|
409
413
|
const value = optMatch[2].trim();
|
|
414
|
+
result.options.optionLineNumbers[key] = lineNumber;
|
|
410
415
|
|
|
411
416
|
switch (key) {
|
|
412
417
|
case 'start':
|