schematex 0.9.12 → 0.9.14

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 (76) hide show
  1. package/dist/ai/ai-sdk.cjs +16 -16
  2. package/dist/ai/ai-sdk.js +11 -11
  3. package/dist/ai/index.cjs +25 -25
  4. package/dist/ai/index.js +12 -12
  5. package/dist/browser.cjs +17 -17
  6. package/dist/browser.js +11 -11
  7. package/dist/{chunk-HEGDKO2E.cjs → chunk-24YHD4YI.cjs} +3 -2
  8. package/dist/chunk-24YHD4YI.cjs.map +1 -0
  9. package/dist/{chunk-6KW7XSUR.js → chunk-2PRNDY5I.js} +3 -3
  10. package/dist/{chunk-6KW7XSUR.js.map → chunk-2PRNDY5I.js.map} +1 -1
  11. package/dist/{chunk-NP7N3DZG.js → chunk-2ZHP4TXP.js} +3 -3
  12. package/dist/{chunk-NP7N3DZG.js.map → chunk-2ZHP4TXP.js.map} +1 -1
  13. package/dist/{chunk-32LOZTNP.js → chunk-37WDY4G4.js} +3 -2
  14. package/dist/chunk-37WDY4G4.js.map +1 -0
  15. package/dist/{chunk-3KRL2EGN.cjs → chunk-3TGOOZ36.cjs} +13 -6
  16. package/dist/chunk-3TGOOZ36.cjs.map +1 -0
  17. package/dist/{chunk-Q5MQLUOH.js → chunk-6GVFKOSH.js} +3 -3
  18. package/dist/{chunk-Q5MQLUOH.js.map → chunk-6GVFKOSH.js.map} +1 -1
  19. package/dist/{chunk-2KTQ75LN.js → chunk-6KRSBSNT.js} +12 -7
  20. package/dist/chunk-6KRSBSNT.js.map +1 -0
  21. package/dist/{chunk-246OJILS.cjs → chunk-7DQXFTA7.cjs} +4 -4
  22. package/dist/{chunk-246OJILS.cjs.map → chunk-7DQXFTA7.cjs.map} +1 -1
  23. package/dist/{chunk-YLG7S4SM.cjs → chunk-7ZABGRZZ.cjs} +5 -5
  24. package/dist/{chunk-YLG7S4SM.cjs.map → chunk-7ZABGRZZ.cjs.map} +1 -1
  25. package/dist/{chunk-YFPDZVB7.cjs → chunk-AQENURKO.cjs} +4 -4
  26. package/dist/{chunk-YFPDZVB7.cjs.map → chunk-AQENURKO.cjs.map} +1 -1
  27. package/dist/{chunk-OGF7QM74.cjs → chunk-AWUUGDN4.cjs} +4 -4
  28. package/dist/{chunk-OGF7QM74.cjs.map → chunk-AWUUGDN4.cjs.map} +1 -1
  29. package/dist/{chunk-ZRFKIERV.js → chunk-BGFKTJBZ.js} +3 -3
  30. package/dist/{chunk-ZRFKIERV.js.map → chunk-BGFKTJBZ.js.map} +1 -1
  31. package/dist/{chunk-F5RYWDWO.cjs → chunk-CYBBBBMZ.cjs} +4 -4
  32. package/dist/{chunk-F5RYWDWO.cjs.map → chunk-CYBBBBMZ.cjs.map} +1 -1
  33. package/dist/{chunk-QC2RICQ4.cjs → chunk-F3JYKM6M.cjs} +4 -4
  34. package/dist/{chunk-QC2RICQ4.cjs.map → chunk-F3JYKM6M.cjs.map} +1 -1
  35. package/dist/{chunk-NB7MFQCZ.js → chunk-HZTHSNUN.js} +3 -3
  36. package/dist/{chunk-NB7MFQCZ.js.map → chunk-HZTHSNUN.js.map} +1 -1
  37. package/dist/{chunk-W4UVDMUC.js → chunk-I7UYVCKH.js} +3 -3
  38. package/dist/{chunk-W4UVDMUC.js.map → chunk-I7UYVCKH.js.map} +1 -1
  39. package/dist/{chunk-HIWJMJJB.js → chunk-ITNCO3MZ.js} +3 -3
  40. package/dist/{chunk-HIWJMJJB.js.map → chunk-ITNCO3MZ.js.map} +1 -1
  41. package/dist/{chunk-JLLDJCLW.js → chunk-JG5CVYXC.js} +63 -15
  42. package/dist/{chunk-JLLDJCLW.js.map → chunk-JG5CVYXC.js.map} +1 -1
  43. package/dist/{chunk-AETIGJXP.js → chunk-KWY52MLQ.js} +3 -3
  44. package/dist/{chunk-AETIGJXP.js.map → chunk-KWY52MLQ.js.map} +1 -1
  45. package/dist/{chunk-DLXDR2E7.cjs → chunk-TIHHISCK.cjs} +4 -4
  46. package/dist/{chunk-DLXDR2E7.cjs.map → chunk-TIHHISCK.cjs.map} +1 -1
  47. package/dist/{chunk-GTCGATOL.cjs → chunk-US4QZ7J7.cjs} +4 -4
  48. package/dist/{chunk-GTCGATOL.cjs.map → chunk-US4QZ7J7.cjs.map} +1 -1
  49. package/dist/{chunk-MGMR6V6N.cjs → chunk-V5TY3N2W.cjs} +74 -26
  50. package/dist/chunk-V5TY3N2W.cjs.map +1 -0
  51. package/dist/diagrams/circuit/index.cjs +8 -8
  52. package/dist/diagrams/circuit/index.js +1 -1
  53. package/dist/diagrams/ecomap/index.cjs +7 -7
  54. package/dist/diagrams/ecomap/index.js +2 -2
  55. package/dist/diagrams/fishbone/index.cjs +8 -8
  56. package/dist/diagrams/fishbone/index.js +2 -2
  57. package/dist/diagrams/flowchart/index.cjs +8 -8
  58. package/dist/diagrams/flowchart/index.js +2 -2
  59. package/dist/diagrams/genogram/index.cjs +9 -9
  60. package/dist/diagrams/genogram/index.js +2 -2
  61. package/dist/diagrams/ladder/index.cjs +6 -6
  62. package/dist/diagrams/ladder/index.js +2 -2
  63. package/dist/diagrams/pedigree/index.cjs +7 -7
  64. package/dist/diagrams/pedigree/index.js +2 -2
  65. package/dist/diagrams/sld/index.cjs +8 -8
  66. package/dist/diagrams/sld/index.js +2 -2
  67. package/dist/index.cjs +60 -60
  68. package/dist/index.js +14 -14
  69. package/dist/react.cjs +11 -11
  70. package/dist/react.js +10 -10
  71. package/package.json +1 -1
  72. package/dist/chunk-2KTQ75LN.js.map +0 -1
  73. package/dist/chunk-32LOZTNP.js.map +0 -1
  74. package/dist/chunk-3KRL2EGN.cjs.map +0 -1
  75. package/dist/chunk-HEGDKO2E.cjs.map +0 -1
  76. package/dist/chunk-MGMR6V6N.cjs.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/core/dsl-preprocess.ts"],"names":[],"mappings":";;;AAoCA,IAAM,iBAAA,GAAoB,YAAA;AAWnB,SAAS,iBAAiB,IAAA,EAA8B;A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AAU,CAAC,OAAA;AACX,MAAA;AAAA,IACF;AACA,IAAA,IAAI,OAAA,EAAS;AACb,IAAA,IAAI,EAAA,KAAO,GAAA,IAAO,IAAA,CAAK,CAAA,GAAI,CAAC,CAAA,KAAM,GAAA,EAAK,OAAO,IAAA,CAAK,KAAA,CAAM,CAAA,EAAG,CAAC,CAAA;AAC7D,IAAA,IAAI,EAAA,KAAO,GAAA,IAAO,IAAA,CAAK,CAAA,GAAI,CAAC,CAAA,KAAM,GAAA,EAAK,OAAO,IAAA,CAAK,KAAA,CAAM,CAAA,EAAG,CAAC,CAAA;AAC7D,IAAA,IAAI,OAAO,GAAA,EAAK,OAAO,IAAA,CAAK,KAAA,CAAM,GAAG,CAAC,CAAA;AAAA,EACxC;AACA,EAAA,OAAO,IAAA;AACT;AAQO,SAAS,iBAAiB,IAAA,EAAkC;AACjE,EAAA,KAAA,MAAW,GAAA,IAAO,IAAA,CAAK,KAAA,CAAM,OAAO,CAAA,EAAG;AACrC,IAAA,MAAM,IAAA,GAAO,gBAAA,CAAiB,GAAG,CAAA,CAAE,IAAA,EAAK;AACxC,IAAA,IAAI,IAAA,KAAS,IAAI,OAAO,IAAA;AAAA,EAC1B;AACA,EAAA,OAAO,MAAA;AACT","file":"chunk-3KRL2EGN.cjs","sourcesContent":["/**\n * DSL preprocessing shared across all diagram parsers.\n *\n * Two cross-cutting Mermaid-compat features are normalized here so each\n * per-diagram parser sees a consistent surface:\n *\n * 1. **Frontmatter** — Mermaid allows a YAML-style block at the top of\n * the input:\n *\n * ---\n * title: My diagram\n * ---\n * flowchart TD\n * ...\n *\n * We strip the block before the parser runs and return the parsed\n * keys as a metadata bag. Parsers that already accept an inline title\n * (`flowchart TD \"...\"`, `genogram \"...\"`) can merge the frontmatter\n * title in if no inline one was provided.\n *\n * 2. **Comments** — different parsers historically supported different\n * comment markers (`#`, `//`, Mermaid's `%%`). {@link stripLineComment}\n * strips all three, respecting double-quoted regions so URLs with `//`\n * and CSS-style values containing `#` don't get truncated.\n *\n * Both helpers are intentionally narrow: they only do what every parser\n * needs. Diagram-specific lexing stays in each parser.\n */\n\nexport interface DslFrontmatter {\n /** Parsed key/value pairs from the `---` block. Empty if no block found. */\n data: Record<string, string>;\n /** Input with the frontmatter block removed, ready for the diagram parser. */\n body: string;\n}\n\nconst FRONTMATTER_DELIM = /^-{3,}\\s*$/;\n\n/**\n * Strip a Mermaid-style YAML frontmatter block from the start of `text`.\n *\n * Accepts any whitespace-only or blank lines before the opening `---`. The\n * parser is deliberately tiny: one `key: value` per line, no nesting, no\n * quoted/multiline values. Anything fancier we treat as \"not a frontmatter\n * block\" and return the original text unchanged — better to no-op than\n * to silently swallow malformed YAML.\n */\nexport function parseFrontmatter(text: string): DslFrontmatter {\n const lines = text.split(/\\r?\\n/);\n let i = 0;\n while (i < lines.length && lines[i]!.trim() === \"\") i++;\n if (i >= lines.length || !FRONTMATTER_DELIM.test(lines[i]!)) {\n return { data: {}, body: text };\n }\n const openIdx = i;\n i++;\n const data: Record<string, string> = {};\n while (i < lines.length && !FRONTMATTER_DELIM.test(lines[i]!)) {\n const line = lines[i]!;\n const trimmed = line.trim();\n if (trimmed === \"\" || trimmed.startsWith(\"#\")) {\n i++;\n continue;\n }\n const colonIdx = trimmed.indexOf(\":\");\n if (colonIdx <= 0) {\n // Malformed line inside the block — bail out, treat the whole thing\n // as not-a-frontmatter so the user sees their original input back.\n return { data: {}, body: text };\n }\n const key = trimmed.slice(0, colonIdx).trim();\n let value = trimmed.slice(colonIdx + 1).trim();\n // Strip matching surrounding quotes (single, double, or smart) without\n // pulling in the full quotes.ts helpers — frontmatter values are dumb.\n if (\n value.length >= 2 &&\n ((value.startsWith('\"') && value.endsWith('\"')) ||\n (value.startsWith(\"'\") && value.endsWith(\"'\")) ||\n (value.startsWith(\"“\") && value.endsWith(\"”\")))\n ) {\n value = value.slice(1, -1);\n }\n data[key] = value;\n i++;\n }\n if (i >= lines.length) {\n // Opened a `---` block but never closed it — leave input untouched.\n return { data: {}, body: text };\n }\n // i now points at the closing `---`; body starts on the next line.\n const body = lines.slice(i + 1).join(\"\\n\");\n // If we found an opening delim but the body is empty and data is empty,\n // it was probably just a separator someone typed. Return raw text.\n if (Object.keys(data).length === 0 && openIdx === 0) {\n return { data: {}, body: text };\n }\n return { data, body };\n}\n\n/**\n * Strip an inline comment from a line.\n *\n * Recognized markers (in order of precedence):\n * - `%%` — Mermaid's comment style\n * - `//` — C-style line comment\n * - `#` — shell/python style\n *\n * Markers inside ASCII double-quoted regions are preserved verbatim so URLs\n * (`\"https://...\"`) and CSS-color values (`\"#ff0\"`) survive. Smart-quoted\n * regions are NOT special-cased — they're rare inside attribute strings,\n * and the cost of full Unicode quote tracking for every line isn't worth\n * the protection.\n */\nexport function stripLineComment(line: string): string {\n let inQuote = false;\n for (let i = 0; i < line.length; i++) {\n const ch = line[i]!;\n if (ch === '\"') {\n // Respect a backslash escape so `\"foo\\\"\"` stays inside the quote.\n if (i > 0 && line[i - 1] === \"\\\\\") continue;\n inQuote = !inQuote;\n continue;\n }\n if (inQuote) continue;\n if (ch === \"%\" && line[i + 1] === \"%\") return line.slice(0, i);\n if (ch === \"/\" && line[i + 1] === \"/\") return line.slice(0, i);\n if (ch === \"#\") return line.slice(0, i);\n }\n return line;\n}\n\n/** Returns true if the trimmed line is blank or a pure comment. */\nexport function isBlankOrComment(line: string): boolean {\n return stripLineComment(line).trim() === \"\";\n}\n\n/** Return the first non-blank, non-comment line after comment stripping. */\nexport function firstContentLine(text: string): string | undefined {\n for (const raw of text.split(/\\r?\\n/)) {\n const line = stripLineComment(raw).trim();\n if (line !== \"\") return line;\n }\n return undefined;\n}\n"]}