schematex 0.5.0 → 0.5.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/README.md +15 -7
- package/dist/ai/ai-sdk.cjs +18 -12
- package/dist/ai/ai-sdk.cjs.map +1 -1
- package/dist/ai/ai-sdk.d.cts +4 -3
- package/dist/ai/ai-sdk.d.ts +4 -3
- package/dist/ai/ai-sdk.js +14 -8
- package/dist/ai/ai-sdk.js.map +1 -1
- package/dist/ai/index.cjs +15 -11
- package/dist/ai/index.d.cts +20 -153
- package/dist/ai/index.d.ts +20 -153
- package/dist/ai/index.js +3 -3
- package/dist/api-C5SECOxZ.d.cts +69 -0
- package/dist/api-Cr_MxttI.d.ts +69 -0
- package/dist/browser.cjs +23 -5
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +12 -3
- package/dist/browser.d.ts +12 -3
- package/dist/browser.js +13 -5
- package/dist/browser.js.map +1 -1
- package/dist/{chunk-3YUUC6RN.cjs → chunk-4QPDZJAL.cjs} +1421 -37
- package/dist/chunk-4QPDZJAL.cjs.map +1 -0
- package/dist/{chunk-NWPCY65Z.cjs → chunk-HK56GQQP.cjs} +544 -61
- package/dist/chunk-HK56GQQP.cjs.map +1 -0
- package/dist/{chunk-GTDQAN2Z.js → chunk-OK5ZS3LU.js} +1419 -38
- package/dist/chunk-OK5ZS3LU.js.map +1 -0
- package/dist/{chunk-XRCY75UV.cjs → chunk-QMTWG6JL.cjs} +947 -916
- package/dist/chunk-QMTWG6JL.cjs.map +1 -0
- package/dist/{chunk-HUPDIRBX.js → chunk-VCH7RI5H.js} +947 -916
- package/dist/chunk-VCH7RI5H.js.map +1 -0
- package/dist/{chunk-IM4RCUHA.js → chunk-VKPCR7BG.js} +544 -62
- package/dist/chunk-VKPCR7BG.js.map +1 -0
- package/dist/diagrams/blockdiagram/index.d.cts +1 -1
- package/dist/diagrams/blockdiagram/index.d.ts +1 -1
- package/dist/diagrams/circuit/index.cjs +7 -7
- package/dist/diagrams/circuit/index.d.cts +1 -1
- package/dist/diagrams/circuit/index.d.ts +1 -1
- package/dist/diagrams/circuit/index.js +1 -1
- package/dist/diagrams/ecomap/index.d.cts +1 -1
- package/dist/diagrams/ecomap/index.d.ts +1 -1
- package/dist/diagrams/entity/index.d.cts +1 -1
- package/dist/diagrams/entity/index.d.ts +1 -1
- package/dist/diagrams/fishbone/index.d.cts +1 -1
- package/dist/diagrams/fishbone/index.d.ts +1 -1
- package/dist/diagrams/flowchart/index.d.cts +2 -2
- package/dist/diagrams/flowchart/index.d.ts +2 -2
- package/dist/diagrams/genogram/index.d.cts +1 -1
- package/dist/diagrams/genogram/index.d.ts +1 -1
- package/dist/diagrams/ladder/index.d.cts +1 -1
- package/dist/diagrams/ladder/index.d.ts +1 -1
- package/dist/diagrams/logic/index.d.cts +1 -1
- package/dist/diagrams/logic/index.d.ts +1 -1
- package/dist/diagrams/orgchart/index.d.cts +1 -1
- package/dist/diagrams/orgchart/index.d.ts +1 -1
- package/dist/diagrams/pedigree/index.d.cts +1 -1
- package/dist/diagrams/pedigree/index.d.ts +1 -1
- package/dist/diagrams/phylo/index.d.cts +1 -1
- package/dist/diagrams/phylo/index.d.ts +1 -1
- package/dist/diagrams/sld/index.d.cts +1 -1
- package/dist/diagrams/sld/index.d.ts +1 -1
- package/dist/diagrams/sociogram/index.d.cts +1 -1
- package/dist/diagrams/sociogram/index.d.ts +1 -1
- package/dist/diagrams/timing/index.d.cts +1 -1
- package/dist/diagrams/timing/index.d.ts +1 -1
- package/dist/diagrams/venn/index.d.cts +1 -1
- package/dist/diagrams/venn/index.d.ts +1 -1
- package/dist/{index-C9A0h-CB.d.cts → index-BD2yDfQM.d.cts} +1 -1
- package/dist/{index-CJai_TEZ.d.ts → index-C30zQWZI.d.ts} +1 -1
- package/dist/index.cjs +24 -12
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/react.cjs +7 -9
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +3 -2
- package/dist/react.d.ts +3 -2
- package/dist/react.js +7 -9
- package/dist/react.js.map +1 -1
- package/dist/tools-BHWaJPOl.d.ts +153 -0
- package/dist/tools-DlpuE76u.d.cts +153 -0
- package/dist/{types-BOAsqHoU.d.cts → types-WTr9W5Ud.d.cts} +2 -2
- package/dist/{types-BOAsqHoU.d.ts → types-WTr9W5Ud.d.ts} +2 -2
- package/package.json +2 -2
- package/dist/api-C5UcmT7n.d.cts +0 -22
- package/dist/api-C5UcmT7n.d.ts +0 -22
- package/dist/chunk-3YUUC6RN.cjs.map +0 -1
- package/dist/chunk-GTDQAN2Z.js.map +0 -1
- package/dist/chunk-HUPDIRBX.js.map +0 -1
- package/dist/chunk-IM4RCUHA.js.map +0 -1
- package/dist/chunk-NWPCY65Z.cjs.map +0 -1
- package/dist/chunk-XRCY75UV.cjs.map +0 -1
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { S as SchematexConfig } from './api-Cr_MxttI.js';
|
|
2
|
+
import { q as DiagramType } from './types-WTr9W5Ud.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Diagram registry — metadata for every diagram type Schematex supports.
|
|
6
|
+
*
|
|
7
|
+
* This is the index an LLM sees when calling `listDiagrams()`. Descriptions
|
|
8
|
+
* are tuned to help the model pick the right type for a user request.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
type DiagramCluster = "relationships" | "electrical-industrial" | "corporate-legal" | "causality-analysis" | "generic" | "strategy" | "knowledge" | "behavior-modeling" | "research" | "project-management";
|
|
12
|
+
interface DiagramMeta {
|
|
13
|
+
/** Canonical type id — matches `DiagramType` and plugin keys. */
|
|
14
|
+
type: DiagramType;
|
|
15
|
+
/** Human-readable name. */
|
|
16
|
+
name: string;
|
|
17
|
+
/** One-sentence tagline. */
|
|
18
|
+
tagline: string;
|
|
19
|
+
/** When should an LLM pick this diagram? Written in "use X when …" form. */
|
|
20
|
+
useWhen: string;
|
|
21
|
+
/** Domain cluster for grouping. */
|
|
22
|
+
cluster: DiagramCluster;
|
|
23
|
+
/** Published standard the parser and layout follow. */
|
|
24
|
+
standard: string;
|
|
25
|
+
/** Path to the syntax doc key in the generated content bundle. */
|
|
26
|
+
syntaxKey: string;
|
|
27
|
+
}
|
|
28
|
+
declare const DIAGRAM_REGISTRY: readonly DiagramMeta[];
|
|
29
|
+
declare function resolveDiagramType(type: string): DiagramType | undefined;
|
|
30
|
+
declare function getDiagramMeta(type: string): DiagramMeta | undefined;
|
|
31
|
+
declare function getAllDiagramTypes(): DiagramType[];
|
|
32
|
+
|
|
33
|
+
/** Structured error type returned by the AI tool layer. */
|
|
34
|
+
interface SchematexValidationError {
|
|
35
|
+
/** 1-based line number where the error occurred, if the parser reported it. */
|
|
36
|
+
line?: number;
|
|
37
|
+
/** 1-based column, if reported. */
|
|
38
|
+
column?: number;
|
|
39
|
+
/** Source snippet from the offending line, if the parser captured it. */
|
|
40
|
+
source?: string;
|
|
41
|
+
/** Human-readable error message. */
|
|
42
|
+
message: string;
|
|
43
|
+
/** Optional remediation hint. */
|
|
44
|
+
hint?: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* AUTO-GENERATED by scripts/build-ai-content.mjs — do not edit by hand.
|
|
49
|
+
* Regenerate with: npm run build:ai
|
|
50
|
+
*
|
|
51
|
+
* Compiled content bundle for the AI tool layer. Keeps MDX content
|
|
52
|
+
* available to the published npm package without runtime fs access.
|
|
53
|
+
*/
|
|
54
|
+
interface GeneratedExample {
|
|
55
|
+
slug: string;
|
|
56
|
+
diagram: string;
|
|
57
|
+
title: string;
|
|
58
|
+
description: string;
|
|
59
|
+
standard: string;
|
|
60
|
+
tags: readonly string[];
|
|
61
|
+
complexity: number;
|
|
62
|
+
featured: boolean;
|
|
63
|
+
dsl: string;
|
|
64
|
+
notes: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Example library — runtime lookup over the bundled MDX examples.
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
type Example = GeneratedExample;
|
|
72
|
+
interface GetExamplesOptions {
|
|
73
|
+
/** Maximum number of examples to return. Default 5. */
|
|
74
|
+
limit?: number;
|
|
75
|
+
/** Prefer examples marked `featured: true` when set. */
|
|
76
|
+
preferFeatured?: boolean;
|
|
77
|
+
/** Maximum complexity (1–5). */
|
|
78
|
+
maxComplexity?: number;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Syntax lookup — LLM-facing per-diagram grammar reference.
|
|
83
|
+
*
|
|
84
|
+
* The default "canonical" view stays intentionally narrow for first-shot
|
|
85
|
+
* generation. The "reference" view preserves the fuller stripped-MDX docs
|
|
86
|
+
* when a caller needs advanced syntax or adapter coverage.
|
|
87
|
+
*/
|
|
88
|
+
|
|
89
|
+
type SyntaxDetail = "canonical" | "reference";
|
|
90
|
+
interface SyntaxDoc {
|
|
91
|
+
key: string;
|
|
92
|
+
title: string;
|
|
93
|
+
detail: SyntaxDetail;
|
|
94
|
+
content: string;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* AI-facing tool functions — the five tools an LLM uses to work with Schematex.
|
|
99
|
+
*
|
|
100
|
+
* Pure TypeScript, zero framework deps. Both the Vercel AI SDK adapter
|
|
101
|
+
* (ai-sdk.ts) and the MCP server wrap these functions.
|
|
102
|
+
*/
|
|
103
|
+
|
|
104
|
+
interface DiagramListItem {
|
|
105
|
+
type: string;
|
|
106
|
+
name: string;
|
|
107
|
+
tagline: string;
|
|
108
|
+
useWhen: string;
|
|
109
|
+
cluster: DiagramMeta["cluster"];
|
|
110
|
+
standard: string;
|
|
111
|
+
}
|
|
112
|
+
declare function listDiagrams(): DiagramListItem[];
|
|
113
|
+
interface GetSyntaxResult {
|
|
114
|
+
type: string;
|
|
115
|
+
name: string;
|
|
116
|
+
standard: string;
|
|
117
|
+
syntax: SyntaxDoc;
|
|
118
|
+
}
|
|
119
|
+
interface GetSyntaxOptions {
|
|
120
|
+
/** `canonical` is the compact first-shot generation surface. */
|
|
121
|
+
detail?: SyntaxDetail;
|
|
122
|
+
}
|
|
123
|
+
declare function getSyntax(type: string, opts?: GetSyntaxOptions): GetSyntaxResult;
|
|
124
|
+
interface GetExamplesResult {
|
|
125
|
+
type: string;
|
|
126
|
+
count: number;
|
|
127
|
+
examples: Example[];
|
|
128
|
+
}
|
|
129
|
+
declare function getExamples(type: string, opts?: GetExamplesOptions): GetExamplesResult;
|
|
130
|
+
type ValidateDslResult = {
|
|
131
|
+
ok: true;
|
|
132
|
+
type: string | null;
|
|
133
|
+
} | {
|
|
134
|
+
ok: false;
|
|
135
|
+
type: string | null;
|
|
136
|
+
errors: SchematexValidationError[];
|
|
137
|
+
};
|
|
138
|
+
declare function validateDsl(type: string | undefined, dsl: string): ValidateDslResult;
|
|
139
|
+
type RenderDslResult = {
|
|
140
|
+
ok: true;
|
|
141
|
+
status: "valid" | "partial";
|
|
142
|
+
type: string | null;
|
|
143
|
+
svg: string;
|
|
144
|
+
} | {
|
|
145
|
+
ok: false;
|
|
146
|
+
status: "invalid";
|
|
147
|
+
type: string | null;
|
|
148
|
+
svg: string;
|
|
149
|
+
errors: SchematexValidationError[];
|
|
150
|
+
};
|
|
151
|
+
declare function renderDsl(type: string | undefined, dsl: string, options?: Omit<SchematexConfig, "type">): RenderDslResult;
|
|
152
|
+
|
|
153
|
+
export { DIAGRAM_REGISTRY as D, type Example as E, type GetExamplesOptions as G, type RenderDslResult as R, type SchematexValidationError as S, type ValidateDslResult as V, type DiagramCluster as a, type DiagramListItem as b, type DiagramMeta as c, type GetExamplesResult as d, type GetSyntaxOptions as e, type GetSyntaxResult as f, type SyntaxDetail as g, type SyntaxDoc as h, getAllDiagramTypes as i, getDiagramMeta as j, getExamples as k, getSyntax as l, listDiagrams as m, resolveDiagramType as n, renderDsl as r, validateDsl as v };
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { S as SchematexConfig } from './api-C5SECOxZ.cjs';
|
|
2
|
+
import { q as DiagramType } from './types-WTr9W5Ud.cjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Diagram registry — metadata for every diagram type Schematex supports.
|
|
6
|
+
*
|
|
7
|
+
* This is the index an LLM sees when calling `listDiagrams()`. Descriptions
|
|
8
|
+
* are tuned to help the model pick the right type for a user request.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
type DiagramCluster = "relationships" | "electrical-industrial" | "corporate-legal" | "causality-analysis" | "generic" | "strategy" | "knowledge" | "behavior-modeling" | "research" | "project-management";
|
|
12
|
+
interface DiagramMeta {
|
|
13
|
+
/** Canonical type id — matches `DiagramType` and plugin keys. */
|
|
14
|
+
type: DiagramType;
|
|
15
|
+
/** Human-readable name. */
|
|
16
|
+
name: string;
|
|
17
|
+
/** One-sentence tagline. */
|
|
18
|
+
tagline: string;
|
|
19
|
+
/** When should an LLM pick this diagram? Written in "use X when …" form. */
|
|
20
|
+
useWhen: string;
|
|
21
|
+
/** Domain cluster for grouping. */
|
|
22
|
+
cluster: DiagramCluster;
|
|
23
|
+
/** Published standard the parser and layout follow. */
|
|
24
|
+
standard: string;
|
|
25
|
+
/** Path to the syntax doc key in the generated content bundle. */
|
|
26
|
+
syntaxKey: string;
|
|
27
|
+
}
|
|
28
|
+
declare const DIAGRAM_REGISTRY: readonly DiagramMeta[];
|
|
29
|
+
declare function resolveDiagramType(type: string): DiagramType | undefined;
|
|
30
|
+
declare function getDiagramMeta(type: string): DiagramMeta | undefined;
|
|
31
|
+
declare function getAllDiagramTypes(): DiagramType[];
|
|
32
|
+
|
|
33
|
+
/** Structured error type returned by the AI tool layer. */
|
|
34
|
+
interface SchematexValidationError {
|
|
35
|
+
/** 1-based line number where the error occurred, if the parser reported it. */
|
|
36
|
+
line?: number;
|
|
37
|
+
/** 1-based column, if reported. */
|
|
38
|
+
column?: number;
|
|
39
|
+
/** Source snippet from the offending line, if the parser captured it. */
|
|
40
|
+
source?: string;
|
|
41
|
+
/** Human-readable error message. */
|
|
42
|
+
message: string;
|
|
43
|
+
/** Optional remediation hint. */
|
|
44
|
+
hint?: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* AUTO-GENERATED by scripts/build-ai-content.mjs — do not edit by hand.
|
|
49
|
+
* Regenerate with: npm run build:ai
|
|
50
|
+
*
|
|
51
|
+
* Compiled content bundle for the AI tool layer. Keeps MDX content
|
|
52
|
+
* available to the published npm package without runtime fs access.
|
|
53
|
+
*/
|
|
54
|
+
interface GeneratedExample {
|
|
55
|
+
slug: string;
|
|
56
|
+
diagram: string;
|
|
57
|
+
title: string;
|
|
58
|
+
description: string;
|
|
59
|
+
standard: string;
|
|
60
|
+
tags: readonly string[];
|
|
61
|
+
complexity: number;
|
|
62
|
+
featured: boolean;
|
|
63
|
+
dsl: string;
|
|
64
|
+
notes: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Example library — runtime lookup over the bundled MDX examples.
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
type Example = GeneratedExample;
|
|
72
|
+
interface GetExamplesOptions {
|
|
73
|
+
/** Maximum number of examples to return. Default 5. */
|
|
74
|
+
limit?: number;
|
|
75
|
+
/** Prefer examples marked `featured: true` when set. */
|
|
76
|
+
preferFeatured?: boolean;
|
|
77
|
+
/** Maximum complexity (1–5). */
|
|
78
|
+
maxComplexity?: number;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Syntax lookup — LLM-facing per-diagram grammar reference.
|
|
83
|
+
*
|
|
84
|
+
* The default "canonical" view stays intentionally narrow for first-shot
|
|
85
|
+
* generation. The "reference" view preserves the fuller stripped-MDX docs
|
|
86
|
+
* when a caller needs advanced syntax or adapter coverage.
|
|
87
|
+
*/
|
|
88
|
+
|
|
89
|
+
type SyntaxDetail = "canonical" | "reference";
|
|
90
|
+
interface SyntaxDoc {
|
|
91
|
+
key: string;
|
|
92
|
+
title: string;
|
|
93
|
+
detail: SyntaxDetail;
|
|
94
|
+
content: string;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* AI-facing tool functions — the five tools an LLM uses to work with Schematex.
|
|
99
|
+
*
|
|
100
|
+
* Pure TypeScript, zero framework deps. Both the Vercel AI SDK adapter
|
|
101
|
+
* (ai-sdk.ts) and the MCP server wrap these functions.
|
|
102
|
+
*/
|
|
103
|
+
|
|
104
|
+
interface DiagramListItem {
|
|
105
|
+
type: string;
|
|
106
|
+
name: string;
|
|
107
|
+
tagline: string;
|
|
108
|
+
useWhen: string;
|
|
109
|
+
cluster: DiagramMeta["cluster"];
|
|
110
|
+
standard: string;
|
|
111
|
+
}
|
|
112
|
+
declare function listDiagrams(): DiagramListItem[];
|
|
113
|
+
interface GetSyntaxResult {
|
|
114
|
+
type: string;
|
|
115
|
+
name: string;
|
|
116
|
+
standard: string;
|
|
117
|
+
syntax: SyntaxDoc;
|
|
118
|
+
}
|
|
119
|
+
interface GetSyntaxOptions {
|
|
120
|
+
/** `canonical` is the compact first-shot generation surface. */
|
|
121
|
+
detail?: SyntaxDetail;
|
|
122
|
+
}
|
|
123
|
+
declare function getSyntax(type: string, opts?: GetSyntaxOptions): GetSyntaxResult;
|
|
124
|
+
interface GetExamplesResult {
|
|
125
|
+
type: string;
|
|
126
|
+
count: number;
|
|
127
|
+
examples: Example[];
|
|
128
|
+
}
|
|
129
|
+
declare function getExamples(type: string, opts?: GetExamplesOptions): GetExamplesResult;
|
|
130
|
+
type ValidateDslResult = {
|
|
131
|
+
ok: true;
|
|
132
|
+
type: string | null;
|
|
133
|
+
} | {
|
|
134
|
+
ok: false;
|
|
135
|
+
type: string | null;
|
|
136
|
+
errors: SchematexValidationError[];
|
|
137
|
+
};
|
|
138
|
+
declare function validateDsl(type: string | undefined, dsl: string): ValidateDslResult;
|
|
139
|
+
type RenderDslResult = {
|
|
140
|
+
ok: true;
|
|
141
|
+
status: "valid" | "partial";
|
|
142
|
+
type: string | null;
|
|
143
|
+
svg: string;
|
|
144
|
+
} | {
|
|
145
|
+
ok: false;
|
|
146
|
+
status: "invalid";
|
|
147
|
+
type: string | null;
|
|
148
|
+
svg: string;
|
|
149
|
+
errors: SchematexValidationError[];
|
|
150
|
+
};
|
|
151
|
+
declare function renderDsl(type: string | undefined, dsl: string, options?: Omit<SchematexConfig, "type">): RenderDslResult;
|
|
152
|
+
|
|
153
|
+
export { DIAGRAM_REGISTRY as D, type Example as E, type GetExamplesOptions as G, type RenderDslResult as R, type SchematexValidationError as S, type ValidateDslResult as V, type DiagramCluster as a, type DiagramListItem as b, type DiagramMeta as c, type GetExamplesResult as d, type GetSyntaxOptions as e, type GetSyntaxResult as f, type SyntaxDetail as g, type SyntaxDoc as h, getAllDiagramTypes as i, getDiagramMeta as j, getExamples as k, getSyntax as l, listDiagrams as m, resolveDiagramType as n, renderDsl as r, validateDsl as v };
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - Layout: DiagramAST → LayoutResult
|
|
9
9
|
* - Renderer: LayoutResult → SVG string
|
|
10
10
|
*/
|
|
11
|
-
type DiagramType = "genogram" | "ecomap" | "pedigree" | "phylo" | "sociogram" | "timing" | "logic" | "circuit" | "blockdiagram" | "ladder" | "sld" | "entity" | "fishbone" | "venn" | "flowchart" | "mindmap" | "matrix" | "orgchart" | "decisiontree" | "timeline" | "state" | "pid" | "erd" | "breadboard" | "bpmn" | "fbd" | "sfc" | "prisma" | "usecase" | "pert";
|
|
11
|
+
type DiagramType = "genogram" | "ecomap" | "pedigree" | "phylo" | "sociogram" | "timing" | "logic" | "circuit" | "blockdiagram" | "ladder" | "sld" | "entity" | "fishbone" | "venn" | "flowchart" | "mindmap" | "matrix" | "orgchart" | "decisiontree" | "timeline" | "state" | "pid" | "erd" | "breadboard" | "bpmn" | "fbd" | "sfc" | "prisma" | "usecase" | "pert" | "sequence";
|
|
12
12
|
type GenogramMode = "medical" | "heritage";
|
|
13
13
|
/**
|
|
14
14
|
* Standard legend positions:
|
|
@@ -823,4 +823,4 @@ interface FlowchartLayoutResult {
|
|
|
823
823
|
clusters: FlowchartLayoutCluster[];
|
|
824
824
|
}
|
|
825
825
|
|
|
826
|
-
export type { BlockAST as B, CircuitAST as C, DiagramPlugin as D, EntityAST as E, FishboneAST as F, Individual as I, LayoutConfig as L, PhyloTreeAST as P, RenderConfig as R, SLDAST as S, TimingAST as T, VennAST as V, DiagramAST as a, LayoutResult as b, PhyloLayoutNode as c, LegendOverrides as d,
|
|
826
|
+
export type { BlockAST as B, CircuitAST as C, DiagramPlugin as D, EntityAST as E, FishboneAST as F, Individual as I, LayoutConfig as L, PhyloTreeAST as P, RenderConfig as R, SLDAST as S, TimingAST as T, VennAST as V, DiagramAST as a, LayoutResult as b, PhyloLayoutNode as c, LegendOverrides as d, LogicGateAST as e, CircuitComponent as f, LadderAST as g, LadderRung as h, LadderElement as i, SLDNode as j, SLDNodeType as k, EntityNode as l, EntityEdge as m, VennLayoutResult as n, FlowchartAST as o, FlowchartLayoutResult as p, DiagramType as q };
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - Layout: DiagramAST → LayoutResult
|
|
9
9
|
* - Renderer: LayoutResult → SVG string
|
|
10
10
|
*/
|
|
11
|
-
type DiagramType = "genogram" | "ecomap" | "pedigree" | "phylo" | "sociogram" | "timing" | "logic" | "circuit" | "blockdiagram" | "ladder" | "sld" | "entity" | "fishbone" | "venn" | "flowchart" | "mindmap" | "matrix" | "orgchart" | "decisiontree" | "timeline" | "state" | "pid" | "erd" | "breadboard" | "bpmn" | "fbd" | "sfc" | "prisma" | "usecase" | "pert";
|
|
11
|
+
type DiagramType = "genogram" | "ecomap" | "pedigree" | "phylo" | "sociogram" | "timing" | "logic" | "circuit" | "blockdiagram" | "ladder" | "sld" | "entity" | "fishbone" | "venn" | "flowchart" | "mindmap" | "matrix" | "orgchart" | "decisiontree" | "timeline" | "state" | "pid" | "erd" | "breadboard" | "bpmn" | "fbd" | "sfc" | "prisma" | "usecase" | "pert" | "sequence";
|
|
12
12
|
type GenogramMode = "medical" | "heritage";
|
|
13
13
|
/**
|
|
14
14
|
* Standard legend positions:
|
|
@@ -823,4 +823,4 @@ interface FlowchartLayoutResult {
|
|
|
823
823
|
clusters: FlowchartLayoutCluster[];
|
|
824
824
|
}
|
|
825
825
|
|
|
826
|
-
export type { BlockAST as B, CircuitAST as C, DiagramPlugin as D, EntityAST as E, FishboneAST as F, Individual as I, LayoutConfig as L, PhyloTreeAST as P, RenderConfig as R, SLDAST as S, TimingAST as T, VennAST as V, DiagramAST as a, LayoutResult as b, PhyloLayoutNode as c, LegendOverrides as d,
|
|
826
|
+
export type { BlockAST as B, CircuitAST as C, DiagramPlugin as D, EntityAST as E, FishboneAST as F, Individual as I, LayoutConfig as L, PhyloTreeAST as P, RenderConfig as R, SLDAST as S, TimingAST as T, VennAST as V, DiagramAST as a, LayoutResult as b, PhyloLayoutNode as c, LegendOverrides as d, LogicGateAST as e, CircuitComponent as f, LadderAST as g, LadderRung as h, LadderElement as i, SLDNode as j, SLDNodeType as k, EntityNode as l, EntityEdge as m, VennLayoutResult as n, FlowchartAST as o, FlowchartLayoutResult as p, DiagramType as q };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "schematex",
|
|
3
|
-
"version": "0.5.
|
|
4
|
-
"description": "Every diagram a doctor, engineer, or lawyer would actually use.
|
|
3
|
+
"version": "0.5.2",
|
|
4
|
+
"description": "Every diagram a doctor, engineer, or lawyer would actually use. 31 industry-standard diagrams (genogram, pedigree, ladder logic, SLD, FBD, SFC, P&ID, UML use case, UML sequence, PRISMA, phylo, fishbone, entity structure, ...) from a text DSL. Free, fully open source, made for AI. Pure SVG, zero dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|
package/dist/api-C5UcmT7n.d.cts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
interface SchematexConfig {
|
|
2
|
-
type?: "genogram" | "ecomap" | "pedigree" | "phylo" | "sociogram" | "timing" | "logic" | "circuit" | "blockdiagram" | "ladder" | "sld" | "entity" | "fishbone" | "venn" | "flowchart" | "mindmap" | "matrix" | "orgchart" | "decisiontree" | "timeline" | "state" | "pid" | "erd" | "breadboard" | "bpmn" | "fbd" | "sfc" | "prisma" | "usecase" | "pert";
|
|
3
|
-
width?: number;
|
|
4
|
-
height?: number;
|
|
5
|
-
padding?: number;
|
|
6
|
-
theme?: string;
|
|
7
|
-
fontFamily?: string;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Parse DSL text to the diagram's AST and return it as a plain object.
|
|
11
|
-
* Useful for JSON serialization, programmatic inspection, or custom renderers.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```ts
|
|
15
|
-
* const ast = parse('genogram\n alice [female]');
|
|
16
|
-
* console.log(JSON.stringify(ast, null, 2));
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
declare function parse(text: string, config?: SchematexConfig): unknown;
|
|
20
|
-
declare function render(text: string, config?: SchematexConfig): string;
|
|
21
|
-
|
|
22
|
-
export { type SchematexConfig as S, parse as p, render as r };
|
package/dist/api-C5UcmT7n.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
interface SchematexConfig {
|
|
2
|
-
type?: "genogram" | "ecomap" | "pedigree" | "phylo" | "sociogram" | "timing" | "logic" | "circuit" | "blockdiagram" | "ladder" | "sld" | "entity" | "fishbone" | "venn" | "flowchart" | "mindmap" | "matrix" | "orgchart" | "decisiontree" | "timeline" | "state" | "pid" | "erd" | "breadboard" | "bpmn" | "fbd" | "sfc" | "prisma" | "usecase" | "pert";
|
|
3
|
-
width?: number;
|
|
4
|
-
height?: number;
|
|
5
|
-
padding?: number;
|
|
6
|
-
theme?: string;
|
|
7
|
-
fontFamily?: string;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Parse DSL text to the diagram's AST and return it as a plain object.
|
|
11
|
-
* Useful for JSON serialization, programmatic inspection, or custom renderers.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```ts
|
|
15
|
-
* const ast = parse('genogram\n alice [female]');
|
|
16
|
-
* console.log(JSON.stringify(ast, null, 2));
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
declare function parse(text: string, config?: SchematexConfig): unknown;
|
|
20
|
-
declare function render(text: string, config?: SchematexConfig): string;
|
|
21
|
-
|
|
22
|
-
export { type SchematexConfig as S, parse as p, render as r };
|