@markdy/core 0.8.3 → 0.8.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/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # @markdy/core
2
2
 
3
- The parser and AST types for [MarkdyScript](../../docs/SYNTAX.md) — a DSL for describing 2D animated scenes.
3
+ The parser and AST types for [MarkdyScript](../../docs/SYNTAX.md) — an AI-first DSL for animated architecture diagrams.
4
4
 
5
5
  ## Features
6
6
 
7
7
  - **Zero runtime dependencies** — pure TypeScript, no DOM or platform APIs
8
8
  - **Single-pass parser** — line-by-line state machine with strict `ParseError` diagnostics
9
- - **Rich type system** — `var`, `def`, `seq` expanded at parse time for composable scene authoring
9
+ - **Diagram-native grammar** — scene metadata, architecture nodes, groups, styles, beats, flow chains, and reusable patterns
10
10
  - **Isomorphic** — runs in Node.js, Deno, Bun, edge runtimes, and the browser
11
11
 
12
12
  ## Installation
@@ -47,7 +47,7 @@ const source = `
47
47
  try {
48
48
  const ast: DiagramAST = parse(source);
49
49
 
50
- console.log(ast.meta); // { width: 1280, height: 720, fps: 60, theme: "midnight", direction: "LR", title: "Request" }
50
+ console.log(ast.meta); // { width: 1280, height: 720, fps: 60, theme: "paper", direction: "LR", title: "Request" }
51
51
  console.log(ast.nodes); // { Web: { kind: "browser", ... }, API: { kind: "service", ... } }
52
52
  console.log(ast.beats); // [{ name: "main", cues: [...] }]
53
53
  } catch (e) {
@@ -71,7 +71,7 @@ try {
71
71
  | `NodeDecl` | type | Node declaration (kind, id, label, style) |
72
72
  | `EdgeDecl` | type | Edge declaration (kind, from, to, label) |
73
73
  | `BeatDecl` | type | Named beat with cues |
74
- | `THEMES` / `resolveTheme` | tokens | Semantic theme palettes (`midnight`, `paper`) |
74
+ | `THEMES` / `resolveTheme` | tokens | Semantic theme palettes (`paper`, `midnight`, `blueprint`, `graphite`) |
75
75
 
76
76
  ## Documentation
77
77
 
package/dist/index.js CHANGED
@@ -755,15 +755,6 @@ var ParseError = class extends Error {
755
755
  this.column = column;
756
756
  }
757
757
  };
758
- var LEGACY_PATTERNS = [
759
- { re: /^\s*actor\s+/i, message: 'MarkdyScript 0.8 removed `actor` declarations. Use node kinds instead: `service API "Label"`.' },
760
- { re: /^\s*@\d/, message: "MarkdyScript 0.8 removed `@time:` events. Use `beat` blocks with flow chains and cues." },
761
- { re: /^\s*def\s+/i, message: "MarkdyScript 0.8 removed `def`. Use `pattern name(...):` for reusable flows." },
762
- { re: /^\s*seq\s+/i, message: "MarkdyScript 0.8 removed `seq`. Use `pattern` + `use` inside beats." },
763
- { re: /^\s*preset\s+/i, message: "MarkdyScript 0.8 removed presets. Use `scene` + `beat` composition." },
764
- { re: /^\s*asset\s+/i, message: "MarkdyScript 0.8 is diagram-only; `asset` declarations are not supported." },
765
- { re: /figure\s*\(/i, message: "MarkdyScript 0.8 is diagram-only; `figure` actors were removed." }
766
- ];
767
758
  var FLOW_OP_RE = /(->|<-|~>|--)/;
768
759
  var PROP_RE = /(\w[\w.-]*)=(\S+)/g;
769
760
  function stripComment(line) {
@@ -991,14 +982,6 @@ function readIndentedBody(blocks, startIdx, parentIndent) {
991
982
  }
992
983
  function parse(source, opts = {}) {
993
984
  const lines = source.replace(/\r\n/g, "\n").split("\n");
994
- for (let i2 = 0; i2 < lines.length; i2++) {
995
- const line = stripComment(lines[i2]);
996
- for (const legacy of LEGACY_PATTERNS) {
997
- if (legacy.re.test(line)) {
998
- throw new ParseError(legacy.message, i2 + 1);
999
- }
1000
- }
1001
- }
1002
985
  const diagnostics = [];
1003
986
  const meta = {
1004
987
  width: 1280,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markdy/core",
3
- "version": "0.8.3",
3
+ "version": "0.8.5",
4
4
  "description": "MarkdyScript parser and diagram compiler (auto-layout, edge routing, cue scheduling) — zero runtime dependencies.",
5
5
  "license": "MIT",
6
6
  "type": "module",