@markdy/core 0.8.1 → 0.8.2
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 +14 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -355,7 +355,18 @@ function nodeRole(kind) {
|
|
|
355
355
|
return TECHNICAL_NODE_KINDS[kind] ?? "compute";
|
|
356
356
|
}
|
|
357
357
|
function humanizeId(id) {
|
|
358
|
-
|
|
358
|
+
const acronyms = /* @__PURE__ */ new Set(["api", "cdn", "db", "dns", "http", "https", "id", "jwt", "oidc", "sdk", "tls", "ui", "url"]);
|
|
359
|
+
const exactCase = /* @__PURE__ */ new Map([
|
|
360
|
+
["etcd", "etcd"],
|
|
361
|
+
["kubectl", "kubectl"]
|
|
362
|
+
]);
|
|
363
|
+
return id.replace(/[_-]+/g, " ").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replace(/([a-z\d])([A-Z])/g, "$1 $2").split(/\s+/).filter(Boolean).map((word) => {
|
|
364
|
+
const lower = word.toLowerCase();
|
|
365
|
+
const exact = exactCase.get(lower);
|
|
366
|
+
if (exact) return exact;
|
|
367
|
+
if (acronyms.has(lower)) return lower.toUpperCase();
|
|
368
|
+
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
369
|
+
}).join(" ");
|
|
359
370
|
}
|
|
360
371
|
var NODE_ALIASES = {
|
|
361
372
|
db: "database",
|
|
@@ -372,8 +383,8 @@ function canonicalNodeKind(kind) {
|
|
|
372
383
|
// src/compiler.ts
|
|
373
384
|
var SAFE = 64;
|
|
374
385
|
var TITLE_BAND = 96;
|
|
375
|
-
var NODE_W =
|
|
376
|
-
var NODE_H =
|
|
386
|
+
var NODE_W = 168;
|
|
387
|
+
var NODE_H = 72;
|
|
377
388
|
var DEFAULTS = {
|
|
378
389
|
show: 0.35,
|
|
379
390
|
hide: 0.35,
|
package/package.json
CHANGED