@markdy/mcp-server 1.4.3 → 1.4.5
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 +35 -9
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -535,6 +535,7 @@ var FLAT = {
|
|
|
535
535
|
next_beat: CONTROLS.next_beat,
|
|
536
536
|
keyboard: INTERACTION.keyboard,
|
|
537
537
|
shortcuts: INTERACTION.shortcuts,
|
|
538
|
+
fit: CONTROLS.fit,
|
|
538
539
|
fitView: CONTROLS.fitView,
|
|
539
540
|
fit_view: CONTROLS.fit_view,
|
|
540
541
|
fitViewButton: CONTROLS.fitViewButton,
|
|
@@ -1918,11 +1919,19 @@ function parse(source, opts = {}) {
|
|
|
1918
1919
|
meta.title = title;
|
|
1919
1920
|
remainder = str.rest;
|
|
1920
1921
|
}
|
|
1921
|
-
const inlineLayout = remainder.match(/\b(?:layout|direction|rankdir)\s+(LR|RL|TB|BT)\b/i);
|
|
1922
|
+
const inlineLayout = remainder.match(/\b(?:layout|direction|rankdir)\s+(LR|RL|TB|BT|auto)\b/i);
|
|
1922
1923
|
if (inlineLayout) {
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1924
|
+
const val = inlineLayout[1].toUpperCase();
|
|
1925
|
+
if (val === "AUTO") {
|
|
1926
|
+
meta.direction = "LR";
|
|
1927
|
+
meta.explicitDirection = false;
|
|
1928
|
+
meta.layoutMode = "auto";
|
|
1929
|
+
} else {
|
|
1930
|
+
meta.direction = val;
|
|
1931
|
+
meta.explicitDirection = true;
|
|
1932
|
+
meta.layoutMode = "explicit";
|
|
1933
|
+
}
|
|
1934
|
+
remainder = remainder.replace(/\b(?:layout|direction|rankdir)\s+(LR|RL|TB|BT|auto)\b/i, " ");
|
|
1926
1935
|
}
|
|
1927
1936
|
const props = parseProps(remainder);
|
|
1928
1937
|
for (const [k, v] of Object.entries(props)) {
|
|
@@ -1944,8 +1953,16 @@ function parse(source, opts = {}) {
|
|
|
1944
1953
|
meta.theme = val;
|
|
1945
1954
|
meta.explicitTheme = val !== "auto";
|
|
1946
1955
|
} else if (k === "direction" || k === "layout" || k === "rankdir") {
|
|
1947
|
-
|
|
1948
|
-
|
|
1956
|
+
const val = String(v).toUpperCase();
|
|
1957
|
+
if (val === "AUTO") {
|
|
1958
|
+
meta.direction = "LR";
|
|
1959
|
+
meta.explicitDirection = false;
|
|
1960
|
+
meta.layoutMode = "auto";
|
|
1961
|
+
} else {
|
|
1962
|
+
meta.direction = val;
|
|
1963
|
+
meta.explicitDirection = true;
|
|
1964
|
+
meta.layoutMode = "explicit";
|
|
1965
|
+
}
|
|
1949
1966
|
} else if (PLAYER_FLAT_KEY_SET.has(k)) {
|
|
1950
1967
|
const error = applyPlayerSetting(meta.player ??= {}, "player", k, String(v));
|
|
1951
1968
|
if (error) diagnostics.push({ severity: "warning", message: error, line: lineNo });
|
|
@@ -1982,9 +1999,17 @@ function parse(source, opts = {}) {
|
|
|
1982
1999
|
i++;
|
|
1983
2000
|
continue;
|
|
1984
2001
|
}
|
|
1985
|
-
if (/^layout\s+(LR|RL|TB|BT)\b/i.test(line)) {
|
|
1986
|
-
|
|
1987
|
-
|
|
2002
|
+
if (/^layout\s+(LR|RL|TB|BT|auto)\b/i.test(line)) {
|
|
2003
|
+
const val = line.split(/\s+/)[1].toUpperCase();
|
|
2004
|
+
if (val === "AUTO") {
|
|
2005
|
+
meta.direction = "LR";
|
|
2006
|
+
meta.explicitDirection = false;
|
|
2007
|
+
meta.layoutMode = "auto";
|
|
2008
|
+
} else {
|
|
2009
|
+
meta.direction = val;
|
|
2010
|
+
meta.explicitDirection = true;
|
|
2011
|
+
meta.layoutMode = "explicit";
|
|
2012
|
+
}
|
|
1988
2013
|
i++;
|
|
1989
2014
|
continue;
|
|
1990
2015
|
}
|
|
@@ -3693,6 +3718,7 @@ function getIntelliCodeCompletions(docText, cursorLine, cursorCol) {
|
|
|
3693
3718
|
}
|
|
3694
3719
|
if (/(layout\s+|direction\s*=\s*)\w*$/i.test(ctx.linePrefix)) {
|
|
3695
3720
|
items.push(
|
|
3721
|
+
{ label: "auto", insertText: "auto", kind: "layout", detail: "Responsive Auto (LR / TB)", documentation: "Automatically adapts layout orientation between horizontal (LR) and vertical (TB) based on container width.", boost: 11 },
|
|
3696
3722
|
{ label: "LR", insertText: "LR", kind: "layout", detail: "Left-to-Right", documentation: "Horizontal left-to-right system flow layout.", boost: 10 },
|
|
3697
3723
|
{ label: "TB", insertText: "TB", kind: "layout", detail: "Top-to-Bottom", documentation: "Vertical top-to-bottom hierarchy layout.", boost: 9 },
|
|
3698
3724
|
{ label: "RL", insertText: "RL", kind: "layout", detail: "Right-to-Left", documentation: "Right-to-left reverse topology layout.", boost: 5 },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markdy/mcp-server",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.5",
|
|
4
4
|
"description": "Model Context Protocol server for Markdy diagram validation, transpilation, and generation.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@modelcontextprotocol/sdk": "^1.6.1",
|
|
42
|
-
"@markdy/
|
|
43
|
-
"@markdy/
|
|
42
|
+
"@markdy/compat": "1.4.5",
|
|
43
|
+
"@markdy/core": "1.4.5"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/node": "^25.9.5",
|