@pipelex/mthds-ui 0.6.5 → 0.7.0
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/graph/react/detail/DetailPanel.css +64 -8
- package/dist/graph/react/index.css +40 -8
- package/dist/graph/react/index.css.map +1 -1
- package/dist/graph/react/index.d.ts +9 -1
- package/dist/graph/react/index.js +141 -67
- package/dist/graph/react/index.js.map +1 -1
- package/dist/shiki/index.d.ts +16 -3
- package/dist/shiki/index.js +226 -15
- package/dist/shiki/index.js.map +1 -1
- package/dist/standalone/graph-standalone.html +73 -17
- package/dist/standalone/graph-viewer.css +64 -8
- package/dist/standalone/graph-viewer.js +9 -9
- package/package.json +1 -1
package/dist/shiki/index.d.ts
CHANGED
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
import { LanguageRegistration, ThemeRegistrationRaw } from '@shikijs/core';
|
|
2
2
|
|
|
3
|
-
declare const MTHDS_THEMES: readonly ["pipelex-dark", "
|
|
3
|
+
declare const MTHDS_THEMES: readonly ["pipelex-dark", "pipelex-light"];
|
|
4
4
|
type MthdsThemeName = (typeof MTHDS_THEMES)[number];
|
|
5
5
|
|
|
6
6
|
declare function highlightMthds(code: string, theme?: MthdsThemeName): Promise<string>;
|
|
7
7
|
declare function getAvailableThemes(): MthdsThemeName[];
|
|
8
8
|
declare function getMthdsGrammar(): LanguageRegistration;
|
|
9
|
-
declare function getMthdsTheme(): ThemeRegistrationRaw;
|
|
9
|
+
declare function getMthdsTheme(name?: MthdsThemeName): ThemeRegistrationRaw;
|
|
10
|
+
/** Both pipelex themes, for editors that register every theme up front (e.g. Monaco). */
|
|
11
|
+
declare function getMthdsThemes(): ThemeRegistrationRaw[];
|
|
10
12
|
|
|
11
13
|
declare const pipelexDarkTheme: ThemeRegistrationRaw;
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Light counterpart of `pipelexDarkTheme` — same scopes, one-for-one.
|
|
17
|
+
* Surfaces and neutrals match the pipelex-app light theme (warm cream
|
|
18
|
+
* `--card` background, warm near-black `--foreground` text, warm muted
|
|
19
|
+
* grays) so the editor sits naturally inside the app instead of reading
|
|
20
|
+
* as a stark-white third-party widget. The Pipelex brand accents (coral,
|
|
21
|
+
* teal, green, magenta, orange) keep their dark-theme hues, darkened so
|
|
22
|
+
* they hold contrast on the cream background.
|
|
23
|
+
*/
|
|
24
|
+
declare const pipelexLightTheme: ThemeRegistrationRaw;
|
|
25
|
+
|
|
26
|
+
export { type MthdsThemeName, getAvailableThemes, getMthdsGrammar, getMthdsTheme, getMthdsThemes, highlightMthds, pipelexDarkTheme, pipelexLightTheme };
|
package/dist/shiki/index.js
CHANGED
|
@@ -8,10 +8,6 @@ import {
|
|
|
8
8
|
createHighlighterCore
|
|
9
9
|
} from "@shikijs/core";
|
|
10
10
|
import { createOnigurumaEngine } from "@shikijs/engine-oniguruma";
|
|
11
|
-
import darkPlus from "@shikijs/themes/dark-plus";
|
|
12
|
-
import dracula from "@shikijs/themes/dracula";
|
|
13
|
-
import monokai from "@shikijs/themes/monokai";
|
|
14
|
-
import oneDarkPro from "@shikijs/themes/one-dark-pro";
|
|
15
11
|
|
|
16
12
|
// src/shiki/mthds.tmLanguage.json
|
|
17
13
|
var mthds_tmLanguage_default = {
|
|
@@ -1280,14 +1276,224 @@ var pipelexDarkTheme = {
|
|
|
1280
1276
|
]
|
|
1281
1277
|
};
|
|
1282
1278
|
|
|
1279
|
+
// src/shiki/pipelexLightTheme.ts
|
|
1280
|
+
var pipelexLightTheme = {
|
|
1281
|
+
name: "pipelex-light",
|
|
1282
|
+
type: "light",
|
|
1283
|
+
colors: {
|
|
1284
|
+
"editor.background": "#F6F3EF",
|
|
1285
|
+
"editor.foreground": "#1B1713"
|
|
1286
|
+
},
|
|
1287
|
+
settings: [
|
|
1288
|
+
// Default text
|
|
1289
|
+
{
|
|
1290
|
+
scope: [],
|
|
1291
|
+
settings: {
|
|
1292
|
+
foreground: "#1B1713"
|
|
1293
|
+
}
|
|
1294
|
+
},
|
|
1295
|
+
// ── Coral Red #D32F2F bold (dark: #FF6B6B) ──────────────
|
|
1296
|
+
// Pipe sections, pipe types, pipe names
|
|
1297
|
+
{
|
|
1298
|
+
scope: [
|
|
1299
|
+
"entity.name.tag.pipe.mthds",
|
|
1300
|
+
"entity.name.tag.pipe-type.mthds",
|
|
1301
|
+
"entity.name.tag.pipe-name.mthds"
|
|
1302
|
+
],
|
|
1303
|
+
settings: {
|
|
1304
|
+
foreground: "#D32F2F",
|
|
1305
|
+
fontStyle: "bold"
|
|
1306
|
+
}
|
|
1307
|
+
},
|
|
1308
|
+
// ── Teal #0F766E bold (dark: #4ECDC4) ───────────────────
|
|
1309
|
+
// Concept sections, concept types
|
|
1310
|
+
{
|
|
1311
|
+
scope: ["entity.name.type.concept.mthds"],
|
|
1312
|
+
settings: {
|
|
1313
|
+
foreground: "#0F766E",
|
|
1314
|
+
fontStyle: "bold"
|
|
1315
|
+
}
|
|
1316
|
+
},
|
|
1317
|
+
// ── Green #15803D bold (dark: #98FB98) ──────────────────
|
|
1318
|
+
// Data variables
|
|
1319
|
+
{
|
|
1320
|
+
scope: ["variable.other.readwrite.mthds"],
|
|
1321
|
+
settings: {
|
|
1322
|
+
foreground: "#15803D",
|
|
1323
|
+
fontStyle: "bold"
|
|
1324
|
+
}
|
|
1325
|
+
},
|
|
1326
|
+
// ── Magenta #C2255C (dark: #FF79C6, no bold) ────────────
|
|
1327
|
+
// Template markers, sigils, escape sequences
|
|
1328
|
+
{
|
|
1329
|
+
scope: ["storage.modifier.mthds", "constant.character.escape.mthds"],
|
|
1330
|
+
settings: {
|
|
1331
|
+
foreground: "#C2255C"
|
|
1332
|
+
}
|
|
1333
|
+
},
|
|
1334
|
+
// ── Magenta #C2255C bold (Jinja keywords) ───────────────
|
|
1335
|
+
{
|
|
1336
|
+
scope: ["keyword.control.jinja.mthds"],
|
|
1337
|
+
settings: {
|
|
1338
|
+
foreground: "#C2255C",
|
|
1339
|
+
fontStyle: "bold"
|
|
1340
|
+
}
|
|
1341
|
+
},
|
|
1342
|
+
// ── Magenta #C2255C (Jinja operators) ───────────────────
|
|
1343
|
+
{
|
|
1344
|
+
scope: ["keyword.operator.jinja.mthds"],
|
|
1345
|
+
settings: {
|
|
1346
|
+
foreground: "#C2255C"
|
|
1347
|
+
}
|
|
1348
|
+
},
|
|
1349
|
+
// ── Magenta #C2255C (HTML tags) ─────────────────────────
|
|
1350
|
+
{
|
|
1351
|
+
scope: ["entity.name.tag.html.mthds"],
|
|
1352
|
+
settings: {
|
|
1353
|
+
foreground: "#C2255C"
|
|
1354
|
+
}
|
|
1355
|
+
},
|
|
1356
|
+
// ── Orange #C2410C bold (model refs; dark: #FFB86C) ─────
|
|
1357
|
+
{
|
|
1358
|
+
scope: ["constant.other.symbol.mthds"],
|
|
1359
|
+
settings: {
|
|
1360
|
+
foreground: "#C2410C",
|
|
1361
|
+
fontStyle: "bold"
|
|
1362
|
+
}
|
|
1363
|
+
},
|
|
1364
|
+
// ── Orange #C2410C (Jinja delimiters) ───────────────────
|
|
1365
|
+
{
|
|
1366
|
+
scope: ["punctuation.definition.jinja.mthds"],
|
|
1367
|
+
settings: {
|
|
1368
|
+
foreground: "#C2410C"
|
|
1369
|
+
}
|
|
1370
|
+
},
|
|
1371
|
+
// ── Dark red #A31515 (strings; Light+ default) ──────────
|
|
1372
|
+
{
|
|
1373
|
+
scope: [
|
|
1374
|
+
"string.quoted.triple.basic.block.mthds",
|
|
1375
|
+
"string.quoted.single.basic.line.mthds",
|
|
1376
|
+
"string.quoted.triple.literal.block.mthds",
|
|
1377
|
+
"string.quoted.single.literal.line.mthds",
|
|
1378
|
+
"string.quoted.triple.basic.block.jinja2.mthds",
|
|
1379
|
+
"string.quoted.single.basic.line.jinja2.mthds",
|
|
1380
|
+
"string.quoted.triple.basic.block.prompt.mthds",
|
|
1381
|
+
"string.quoted.single.basic.line.prompt.mthds",
|
|
1382
|
+
"string.quoted.html.mthds"
|
|
1383
|
+
],
|
|
1384
|
+
settings: {
|
|
1385
|
+
foreground: "#A31515"
|
|
1386
|
+
}
|
|
1387
|
+
},
|
|
1388
|
+
// ── Green #008000 italic (comments; Light+ default) ─────
|
|
1389
|
+
{
|
|
1390
|
+
scope: [
|
|
1391
|
+
"comment",
|
|
1392
|
+
"comment.line.number-sign.mthds",
|
|
1393
|
+
"comment.block.jinja.mthds",
|
|
1394
|
+
"comment.block.html.mthds"
|
|
1395
|
+
],
|
|
1396
|
+
settings: {
|
|
1397
|
+
foreground: "#008000",
|
|
1398
|
+
fontStyle: "italic"
|
|
1399
|
+
}
|
|
1400
|
+
},
|
|
1401
|
+
// ── Green #008000 italic (preprocessor directives) ──────
|
|
1402
|
+
{
|
|
1403
|
+
scope: ["meta.preprocessor.mthds"],
|
|
1404
|
+
settings: {
|
|
1405
|
+
foreground: "#008000",
|
|
1406
|
+
fontStyle: "italic"
|
|
1407
|
+
}
|
|
1408
|
+
},
|
|
1409
|
+
// ── Navy #001080 (generic property names; Light+) ───────
|
|
1410
|
+
{
|
|
1411
|
+
scope: ["support.type.property-name.mthds"],
|
|
1412
|
+
settings: {
|
|
1413
|
+
foreground: "#001080"
|
|
1414
|
+
}
|
|
1415
|
+
},
|
|
1416
|
+
// ── Blue #0000FF (booleans; Light+) ─────────────────────
|
|
1417
|
+
{
|
|
1418
|
+
scope: ["constant.language.boolean.mthds"],
|
|
1419
|
+
settings: {
|
|
1420
|
+
foreground: "#0000FF"
|
|
1421
|
+
}
|
|
1422
|
+
},
|
|
1423
|
+
// ── Dark green #098658 (numbers; Light+) ────────────────
|
|
1424
|
+
{
|
|
1425
|
+
scope: ["constant.numeric", "constant.other.time"],
|
|
1426
|
+
settings: {
|
|
1427
|
+
foreground: "#098658"
|
|
1428
|
+
}
|
|
1429
|
+
},
|
|
1430
|
+
// ── Navy #001080 (table/array property names) ───────────
|
|
1431
|
+
{
|
|
1432
|
+
scope: ["support.type.property-name.table.mthds", "support.type.property-name.array.mthds"],
|
|
1433
|
+
settings: {
|
|
1434
|
+
foreground: "#001080"
|
|
1435
|
+
}
|
|
1436
|
+
},
|
|
1437
|
+
// ── Brown #795E26 (Jinja functions, HTML attributes; Light+) ─
|
|
1438
|
+
{
|
|
1439
|
+
scope: ["support.function.jinja.mthds", "entity.other.attribute-name.html.mthds"],
|
|
1440
|
+
settings: {
|
|
1441
|
+
foreground: "#795E26"
|
|
1442
|
+
}
|
|
1443
|
+
},
|
|
1444
|
+
// ── Navy #001080 (Jinja variables) ──────────────────────
|
|
1445
|
+
{
|
|
1446
|
+
scope: ["variable.other.jinja.mthds"],
|
|
1447
|
+
settings: {
|
|
1448
|
+
foreground: "#001080"
|
|
1449
|
+
}
|
|
1450
|
+
},
|
|
1451
|
+
// ── Standard foreground #1B1713 (punctuation) ───────────
|
|
1452
|
+
{
|
|
1453
|
+
scope: [
|
|
1454
|
+
"punctuation.definition.table.mthds",
|
|
1455
|
+
"punctuation.definition.array.table.mthds",
|
|
1456
|
+
"punctuation.definition.array.mthds",
|
|
1457
|
+
"punctuation.definition.table.inline.mthds",
|
|
1458
|
+
"punctuation.separator.dot.mthds",
|
|
1459
|
+
"punctuation.separator.array.mthds",
|
|
1460
|
+
"punctuation.separator.table.inline.mthds",
|
|
1461
|
+
"punctuation.eq.mthds",
|
|
1462
|
+
"punctuation.definition.string.begin.mthds",
|
|
1463
|
+
"punctuation.definition.string.end.mthds"
|
|
1464
|
+
],
|
|
1465
|
+
settings: {
|
|
1466
|
+
foreground: "#1B1713"
|
|
1467
|
+
}
|
|
1468
|
+
},
|
|
1469
|
+
// ── Magenta #C2255C (pipe ref arrow) ────────────────────
|
|
1470
|
+
{
|
|
1471
|
+
scope: ["keyword.operator.arrow.mthds"],
|
|
1472
|
+
settings: {
|
|
1473
|
+
foreground: "#C2255C"
|
|
1474
|
+
}
|
|
1475
|
+
},
|
|
1476
|
+
// ── Warm muted #6A6158 (namespace/package address) ──────
|
|
1477
|
+
// Matches the app's light --muted-foreground.
|
|
1478
|
+
{
|
|
1479
|
+
scope: ["punctuation.separator.namespace.mthds"],
|
|
1480
|
+
settings: {
|
|
1481
|
+
foreground: "#6A6158"
|
|
1482
|
+
}
|
|
1483
|
+
},
|
|
1484
|
+
// ── Red #C00000 underline (invalid) ─────────────────────
|
|
1485
|
+
{
|
|
1486
|
+
scope: ["invalid.illegal.escape.mthds"],
|
|
1487
|
+
settings: {
|
|
1488
|
+
foreground: "#C00000",
|
|
1489
|
+
fontStyle: "underline"
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
]
|
|
1493
|
+
};
|
|
1494
|
+
|
|
1283
1495
|
// src/shiki/themes.ts
|
|
1284
|
-
var MTHDS_THEMES = [
|
|
1285
|
-
"pipelex-dark",
|
|
1286
|
-
"dark-plus",
|
|
1287
|
-
"monokai",
|
|
1288
|
-
"dracula",
|
|
1289
|
-
"one-dark-pro"
|
|
1290
|
-
];
|
|
1496
|
+
var MTHDS_THEMES = ["pipelex-dark", "pipelex-light"];
|
|
1291
1497
|
|
|
1292
1498
|
// src/shiki/highlighter.ts
|
|
1293
1499
|
var mthdsLang = __spreadProps(__spreadValues({}, mthds_tmLanguage_default), {
|
|
@@ -1298,7 +1504,7 @@ function getHighlighter() {
|
|
|
1298
1504
|
if (!highlighterPromise) {
|
|
1299
1505
|
highlighterPromise = createHighlighterCore({
|
|
1300
1506
|
engine: createOnigurumaEngine(import("@shikijs/engine-oniguruma/wasm-inlined")),
|
|
1301
|
-
themes: [pipelexDarkTheme,
|
|
1507
|
+
themes: [pipelexDarkTheme, pipelexLightTheme],
|
|
1302
1508
|
langs: [mthdsLang]
|
|
1303
1509
|
}).catch((err) => {
|
|
1304
1510
|
highlighterPromise = null;
|
|
@@ -1320,14 +1526,19 @@ function getAvailableThemes() {
|
|
|
1320
1526
|
function getMthdsGrammar() {
|
|
1321
1527
|
return mthdsLang;
|
|
1322
1528
|
}
|
|
1323
|
-
function getMthdsTheme() {
|
|
1324
|
-
return pipelexDarkTheme;
|
|
1529
|
+
function getMthdsTheme(name = "pipelex-dark") {
|
|
1530
|
+
return name === "pipelex-light" ? pipelexLightTheme : pipelexDarkTheme;
|
|
1531
|
+
}
|
|
1532
|
+
function getMthdsThemes() {
|
|
1533
|
+
return [pipelexDarkTheme, pipelexLightTheme];
|
|
1325
1534
|
}
|
|
1326
1535
|
export {
|
|
1327
1536
|
getAvailableThemes,
|
|
1328
1537
|
getMthdsGrammar,
|
|
1329
1538
|
getMthdsTheme,
|
|
1539
|
+
getMthdsThemes,
|
|
1330
1540
|
highlightMthds,
|
|
1331
|
-
pipelexDarkTheme
|
|
1541
|
+
pipelexDarkTheme,
|
|
1542
|
+
pipelexLightTheme
|
|
1332
1543
|
};
|
|
1333
1544
|
//# sourceMappingURL=index.js.map
|