@markdy/core 0.8.0 → 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.
Files changed (2) hide show
  1. package/dist/index.js +14 -3
  2. package/package.json +8 -8
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
- return id.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
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 = 184;
376
- var NODE_H = 88;
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@markdy/core",
3
- "version": "0.8.0",
4
- "description": "MarkdyScript parser and AST types — zero runtime dependencies.",
3
+ "version": "0.8.2",
4
+ "description": "MarkdyScript parser and diagram compiler (auto-layout, edge routing, cue scheduling) — zero runtime dependencies.",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "sideEffects": false,
@@ -21,13 +21,13 @@
21
21
  "keywords": [
22
22
  "markdy",
23
23
  "markdyscript",
24
- "animation",
25
- "dsl",
24
+ "diagram-as-code",
25
+ "architecture-diagram",
26
+ "mermaid-alternative",
26
27
  "parser",
27
- "ast",
28
- "declarative-animation",
29
- "text-to-motion",
30
- "markdown-animation"
28
+ "compiler",
29
+ "dsl",
30
+ "system-design"
31
31
  ],
32
32
  "author": "Hoang Yell <hoangyell@gmail.com> (https://hoangyell.com)",
33
33
  "homepage": "https://markdy.com",