@rotorsoft/act-diagram 0.3.9 → 0.4.0
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 +27 -1
- package/dist/.tsbuildinfo +1 -0
- package/dist/@types/cli/colors.d.ts +19 -0
- package/dist/@types/cli/colors.d.ts.map +1 -0
- package/dist/@types/cli/contract-index.d.ts +57 -0
- package/dist/@types/cli/contract-index.d.ts.map +1 -0
- package/dist/@types/cli/format.d.ts +22 -0
- package/dist/@types/cli/format.d.ts.map +1 -0
- package/dist/@types/cli/index.d.ts +32 -0
- package/dist/@types/cli/index.d.ts.map +1 -0
- package/dist/@types/cli/json-schema.d.ts +13 -0
- package/dist/@types/cli/json-schema.d.ts.map +1 -0
- package/dist/@types/cli/load-project.d.ts +15 -0
- package/dist/@types/cli/load-project.d.ts.map +1 -0
- package/dist/@types/cli/markdown.d.ts +3 -0
- package/dist/@types/cli/markdown.d.ts.map +1 -0
- package/dist/@types/cli/open-editor.d.ts +23 -0
- package/dist/@types/cli/open-editor.d.ts.map +1 -0
- package/dist/@types/cli/repl.d.ts +3 -0
- package/dist/@types/cli/repl.d.ts.map +1 -0
- package/dist/@types/cli/vim-keys.d.ts +34 -0
- package/dist/@types/cli/vim-keys.d.ts.map +1 -0
- package/dist/@types/client/components/ActDiagram.d.ts +17 -0
- package/dist/@types/client/components/ActDiagram.d.ts.map +1 -0
- package/dist/@types/client/components/AiBar.d.ts +11 -0
- package/dist/@types/client/components/AiBar.d.ts.map +1 -0
- package/dist/@types/client/components/CodePreview.d.ts +10 -0
- package/dist/@types/client/components/CodePreview.d.ts.map +1 -0
- package/dist/@types/client/components/Diagram.d.ts +11 -0
- package/dist/@types/client/components/Diagram.d.ts.map +1 -0
- package/dist/@types/client/components/Logo.d.ts +6 -0
- package/dist/@types/client/components/Logo.d.ts.map +1 -0
- package/dist/@types/client/components/Tooltip.d.ts +16 -0
- package/dist/@types/client/components/Tooltip.d.ts.map +1 -0
- package/dist/@types/client/data/prompts.d.ts +5 -0
- package/dist/@types/client/data/prompts.d.ts.map +1 -0
- package/dist/@types/client/data/sample-files.d.ts +4 -0
- package/dist/@types/client/data/sample-files.d.ts.map +1 -0
- package/dist/@types/client/lib/build-model.d.ts +21 -0
- package/dist/@types/client/lib/build-model.d.ts.map +1 -0
- package/dist/@types/client/lib/evaluate.d.ts +10 -0
- package/dist/@types/client/lib/evaluate.d.ts.map +1 -0
- package/dist/@types/client/lib/layout.d.ts +82 -0
- package/dist/@types/client/lib/layout.d.ts.map +1 -0
- package/dist/@types/client/lib/mock-builders.d.ts +18 -0
- package/dist/@types/client/lib/mock-builders.d.ts.map +1 -0
- package/dist/@types/client/lib/navigate.d.ts +16 -0
- package/dist/@types/client/lib/navigate.d.ts.map +1 -0
- package/dist/@types/client/lib/schema-extract.d.ts +37 -0
- package/dist/@types/client/lib/schema-extract.d.ts.map +1 -0
- package/dist/@types/client/lib/sort.d.ts +4 -0
- package/dist/@types/client/lib/sort.d.ts.map +1 -0
- package/dist/@types/client/lib/strip-fences.d.ts +11 -0
- package/dist/@types/client/lib/strip-fences.d.ts.map +1 -0
- package/dist/@types/client/lib/validate.d.ts +4 -0
- package/dist/@types/client/lib/validate.d.ts.map +1 -0
- package/dist/@types/client/main.d.ts +2 -0
- package/dist/@types/client/main.d.ts.map +1 -0
- package/dist/@types/client/types/domain-model.d.ts +85 -0
- package/dist/@types/client/types/domain-model.d.ts.map +1 -0
- package/dist/@types/client/types/file-tab.d.ts +5 -0
- package/dist/@types/client/types/file-tab.d.ts.map +1 -0
- package/dist/@types/client/types/index.d.ts +5 -0
- package/dist/@types/client/types/index.d.ts.map +1 -0
- package/dist/@types/client/types/protocol.d.ts +29 -0
- package/dist/@types/client/types/protocol.d.ts.map +1 -0
- package/dist/@types/index.d.ts +17 -0
- package/dist/@types/index.d.ts.map +1 -0
- package/dist/@types/server/ai.d.ts +19 -0
- package/dist/@types/server/ai.d.ts.map +1 -0
- package/dist/@types/server/server.d.ts +2 -0
- package/dist/@types/server/server.d.ts.map +1 -0
- package/dist/cli/act.js +3324 -0
- package/dist/cli/act.js.map +1 -0
- package/dist/index.cjs +3268 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +3235 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +2 -0
- package/package.json +17 -7
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { FileTab } from "../client/types/file-tab.js";
|
|
2
|
+
export type LoadOptions = {
|
|
3
|
+
/** Maximum number of files to read. Default 5000 — protects against runaway scans. */
|
|
4
|
+
maxFiles?: number;
|
|
5
|
+
};
|
|
6
|
+
export type LoadResult = {
|
|
7
|
+
files: FileTab[];
|
|
8
|
+
truncated: boolean;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Walk `rootDir` and return every `.ts` file that survives the skip rules.
|
|
12
|
+
* Returned `FileTab.path` values are project-relative (POSIX separators).
|
|
13
|
+
*/
|
|
14
|
+
export declare function loadProject(rootDir: string, opts?: LoadOptions): Promise<LoadResult>;
|
|
15
|
+
//# sourceMappingURL=load-project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-project.d.ts","sourceRoot":"","sources":["../../../src/cli/load-project.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AA4B3D,MAAM,MAAM,WAAW,GAAG;IACxB,sFAAsF;IACtF,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,MAAM,EACf,IAAI,GAAE,WAAgB,GACrB,OAAO,CAAC,UAAU,CAAC,CAiDrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../src/cli/markdown.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,KAAK,aAAa,EAGnB,MAAM,qBAAqB,CAAC;AAoG7B,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAuNzD"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type EditorDeps = {
|
|
2
|
+
/** Project root the file path is relative to. */
|
|
3
|
+
rootDir: string;
|
|
4
|
+
/** Override the editor command (mainly for tests). */
|
|
5
|
+
editor?: string;
|
|
6
|
+
/** Override stdio (mainly for tests). */
|
|
7
|
+
stdio?: "inherit" | "ignore";
|
|
8
|
+
};
|
|
9
|
+
/** Resolve which editor to invoke. Exposed for testing. */
|
|
10
|
+
export declare function pickEditor(env: NodeJS.ProcessEnv, override?: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Build the argv passed to the editor. Public for testing.
|
|
13
|
+
*
|
|
14
|
+
* vim/nvim/nano/emacs → `+<line> <file>`
|
|
15
|
+
* code/cursor → `--goto <file>:<line>`
|
|
16
|
+
*/
|
|
17
|
+
export declare function editorArgs(editor: string, file: string, line?: number): string[];
|
|
18
|
+
/** Open `file` (project-relative) at `line` in the user's editor. */
|
|
19
|
+
export declare function openInEditor(file: string, line: number | undefined, deps: EditorDeps): Promise<{
|
|
20
|
+
ok: boolean;
|
|
21
|
+
reason?: string;
|
|
22
|
+
}>;
|
|
23
|
+
//# sourceMappingURL=open-editor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open-editor.d.ts","sourceRoot":"","sources":["../../../src/cli/open-editor.ts"],"names":[],"mappings":"AAWA,MAAM,MAAM,UAAU,GAAG;IACvB,iDAAiD;IACjD,OAAO,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,KAAK,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;CAC9B,CAAC;AAMF,2DAA2D;AAC3D,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAG5E;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,MAAM,GACZ,MAAM,EAAE,CAIV;AAED,qEAAqE;AACrE,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,IAAI,EAAE,UAAU,GACf,OAAO,CAAC;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAmB3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repl.d.ts","sourceRoot":"","sources":["../../../src/cli/repl.ts"],"names":[],"mappings":"AAUA,OAAO,EAEL,KAAK,aAAa,EAKnB,MAAM,qBAAqB,CAAC;AAyL7B,wBAAsB,cAAc,CAClC,GAAG,EAAE,aAAa,EAClB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC,CAef"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Patch a tty input stream so vim users can drive @clack/prompts.
|
|
3
|
+
*
|
|
4
|
+
* j → cursor down (\x1b[B)
|
|
5
|
+
* k → cursor up (\x1b[A)
|
|
6
|
+
* q → ESC (clack treats ESC as cancel, which doubles as "back")
|
|
7
|
+
* / → fires the registered "slash" callback AND emits ESC so
|
|
8
|
+
* the currently-active prompt cancels; the loop checks the
|
|
9
|
+
* callback's pending flag to decide whether to jump to
|
|
10
|
+
* search instead of going one level up.
|
|
11
|
+
*
|
|
12
|
+
* Arrow keys and every other byte pass through unchanged. `pause()`
|
|
13
|
+
* disables translation entirely — used during text-input prompts so
|
|
14
|
+
* `j`, `k`, `/`, etc. are typed literally.
|
|
15
|
+
*/
|
|
16
|
+
type Direction = "down" | "up" | "cancel" | "slash" | null;
|
|
17
|
+
/** Classify a chunk into one of our handled directions, or null. */
|
|
18
|
+
export declare function classify(chunk: Buffer): Direction;
|
|
19
|
+
type StreamLike = {
|
|
20
|
+
emit: (event: string, ...args: unknown[]) => boolean;
|
|
21
|
+
};
|
|
22
|
+
export type VimKeysHandle = {
|
|
23
|
+
/** Remove the patch entirely. Idempotent. */
|
|
24
|
+
restore: () => void;
|
|
25
|
+
/** Temporarily stop translating bytes (e.g. during a text-input prompt). */
|
|
26
|
+
pause: () => void;
|
|
27
|
+
/** Resume translating bytes after a `pause()`. */
|
|
28
|
+
resume: () => void;
|
|
29
|
+
/** Register a callback fired when `/` is pressed. Returns an unsubscribe fn. */
|
|
30
|
+
onSlash: (cb: () => void) => () => void;
|
|
31
|
+
};
|
|
32
|
+
export declare function enableVimKeys(stdin: StreamLike): VimKeysHandle;
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=vim-keys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vim-keys.d.ts","sourceRoot":"","sources":["../../../src/cli/vim-keys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,KAAK,SAAS,GAAG,MAAM,GAAG,IAAI,GAAG,QAAQ,GAAG,OAAO,GAAG,IAAI,CAAC;AAE3D,oEAAoE;AACpE,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAMjD;AAED,KAAK,UAAU,GAAG;IAChB,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC;CACtD,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,6CAA6C;IAC7C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,4EAA4E;IAC5E,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,kDAAkD;IAClD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,gFAAgF;IAChF,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;CACzC,CAAC;AAEF,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,aAAa,CAyC9D"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { FileTab } from "../types/index.js";
|
|
2
|
+
import { type AiOptions } from "./AiBar.js";
|
|
3
|
+
type Props = {
|
|
4
|
+
/** Direct file injection */
|
|
5
|
+
files?: FileTab[];
|
|
6
|
+
/** Called when a diagram element is clicked — provides file:line:col and element type */
|
|
7
|
+
onNavigate?: (file: string, line: number, col: number, type?: string) => void;
|
|
8
|
+
/** Listen to postMessage for HostMessage updates */
|
|
9
|
+
usePostMessage?: boolean;
|
|
10
|
+
/** Optional AI callback */
|
|
11
|
+
onAiRequest?: (prompt: string, files: FileTab[], options: AiOptions) => void;
|
|
12
|
+
/** Whether AI is generating */
|
|
13
|
+
generating?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare function ActDiagram({ files: propFiles, onNavigate, usePostMessage, onAiRequest, generating, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=ActDiagram.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActDiagram.d.ts","sourceRoot":"","sources":["../../../../src/client/components/ActDiagram.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAEV,OAAO,EAGR,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAS,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AA0DnD,KAAK,KAAK,GAAG;IACX,4BAA4B;IAC5B,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;IAClB,yFAAyF;IACzF,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9E,oDAAoD;IACpD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,2BAA2B;IAC3B,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,SAAS,KAAK,IAAI,CAAC;IAC7E,+BAA+B;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,wBAAgB,UAAU,CAAC,EACzB,KAAK,EAAE,SAAS,EAChB,UAAU,EACV,cAAc,EACd,WAAW,EACX,UAAU,GACX,EAAE,KAAK,2CAyEP"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type AiOptions = {
|
|
2
|
+
model: string;
|
|
3
|
+
maxTokens: number;
|
|
4
|
+
};
|
|
5
|
+
type Props = {
|
|
6
|
+
onSubmit: (prompt: string, options: AiOptions) => void;
|
|
7
|
+
generating?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare function AiBar({ onSubmit, generating }: Props): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=AiBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AiBar.d.ts","sourceRoot":"","sources":["../../../../src/client/components/AiBar.tsx"],"names":[],"mappings":"AAgBA,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,KAAK,IAAI,CAAC;IACvD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,wBAAgB,KAAK,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,KAAK,2CAmEpD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
filePath: string;
|
|
3
|
+
content: string;
|
|
4
|
+
targetLine: number;
|
|
5
|
+
elementType?: string;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare function CodePreview({ filePath, content, targetLine, elementType, onClose, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=CodePreview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodePreview.d.ts","sourceRoot":"","sources":["../../../../src/client/components/CodePreview.tsx"],"names":[],"mappings":"AAYA,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,OAAO,EACP,UAAU,EACV,WAAW,EACX,OAAO,GACR,EAAE,KAAK,2CAiFP"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DomainModel, ValidationWarning } from "../types/index.js";
|
|
2
|
+
type Props = {
|
|
3
|
+
model: DomainModel;
|
|
4
|
+
warnings: ValidationWarning[];
|
|
5
|
+
onClickElement?: (name: string, type?: string, file?: string) => void;
|
|
6
|
+
onFixWithAi?: (prompt: string) => void;
|
|
7
|
+
toolbarExtra?: React.ReactNode;
|
|
8
|
+
};
|
|
9
|
+
export declare function Diagram({ model, warnings, onClickElement, onFixWithAi, toolbarExtra, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=Diagram.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Diagram.d.ts","sourceRoot":"","sources":["../../../../src/client/components/Diagram.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,WAAW,EAEX,iBAAiB,EAClB,MAAM,mBAAmB,CAAC;AAmG3B,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACtE,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAChC,CAAC;AAEF,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,QAAQ,EACR,cAAc,EACd,WAAW,EACX,YAAY,GACb,EAAE,KAAK,2CAoxBP"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Logo.d.ts","sourceRoot":"","sources":["../../../../src/client/components/Logo.tsx"],"names":[],"mappings":"AAAA,KAAK,SAAS,GAAG;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,wBAAgB,IAAI,CAAC,EAAE,IAAS,EAAE,EAAE,SAAS,2CAqE5C"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
type DetailItem = {
|
|
3
|
+
label: string;
|
|
4
|
+
text: string;
|
|
5
|
+
};
|
|
6
|
+
type Props = {
|
|
7
|
+
title: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
details?: DetailItem[];
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
position?: "top" | "bottom";
|
|
12
|
+
align?: "center" | "right" | "left";
|
|
13
|
+
};
|
|
14
|
+
export declare function Tooltip({ title, description, details, children, position, align, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=Tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../../src/client/components/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGtE,KAAK,UAAU,GAAG;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;IACvB,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC5B,KAAK,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;CACrC,CAAC;AAEF,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,WAAW,EACX,OAAO,EACP,QAAQ,EACR,QAAmB,EACnB,KAAgB,GACjB,EAAE,KAAK,2CAuFP"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../../src/client/data/prompts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;GAgB5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sample-files.d.ts","sourceRoot":"","sources":["../../../../src/client/data/sample-files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,6DAA6D;AAC7D,eAAO,MAAM,YAAY,EAAE,OAAO,EAoGjC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bottom-up model builder: inventory → states → slices → act
|
|
3
|
+
*
|
|
4
|
+
* 1. Scan source for all state/slice/projection/act declarations (inventory)
|
|
5
|
+
* 2. Try to build each item independently from the raw mock results
|
|
6
|
+
* 3. Always show every item — with diagram on success, error on failure
|
|
7
|
+
*/
|
|
8
|
+
import type { DomainModel, FileTab } from "../types/index.js";
|
|
9
|
+
export type ExecuteResult = {
|
|
10
|
+
states: any[];
|
|
11
|
+
slices: any[];
|
|
12
|
+
projections: any[];
|
|
13
|
+
acts: any[];
|
|
14
|
+
error?: string;
|
|
15
|
+
fileErrors: Map<string, string>;
|
|
16
|
+
};
|
|
17
|
+
export declare function buildModel(result: ExecuteResult, files: FileTab[], expectedSlices: Map<string, string>): {
|
|
18
|
+
model: DomainModel;
|
|
19
|
+
error?: string;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=build-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-model.d.ts","sourceRoot":"","sources":["../../../../src/client/lib/build-model.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAGV,WAAW,EAEX,OAAO,EAGR,MAAM,mBAAmB,CAAC;AA4F3B,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,WAAW,EAAE,GAAG,EAAE,CAAC;IACnB,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC;AAIF,wBAAgB,UAAU,CACxB,MAAM,EAAE,aAAa,EACrB,KAAK,EAAE,OAAO,EAAE,EAChB,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAClC;IAAE,KAAK,EAAE,WAAW,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CA8SxC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DomainModel, FileTab } from "../types/index.js";
|
|
2
|
+
/** Replace non-executable content with same-length whitespace (preserving offsets).
|
|
3
|
+
* `level: "full"` strips comments + strings + template literals (for scanning).
|
|
4
|
+
* `level: "nav"` strips comments + template literals only (for navigation). */
|
|
5
|
+
export declare const stripNonCode: (src: string, level?: "full" | "nav") => string;
|
|
6
|
+
export declare function extractModel(files: FileTab[]): {
|
|
7
|
+
model: DomainModel;
|
|
8
|
+
error?: string;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=evaluate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluate.d.ts","sourceRoot":"","sources":["../../../../src/client/lib/evaluate.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAK9D;;gFAEgF;AAChF,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,EAAE,QAAO,MAAM,GAAG,KAAc,WAYvE,CAAC;AA+NF,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG;IAC9C,KAAK,EAAE,WAAW,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAGA"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure layout computation for Act domain model diagrams.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from Diagram.tsx so rendering rules can be unit-tested
|
|
5
|
+
* without React or DOM dependencies.
|
|
6
|
+
*/
|
|
7
|
+
import type { DomainModel } from "../types/index.js";
|
|
8
|
+
export declare const W = 100, H = 36, STATE_W = 80, STATE_H = 80, GAP = 12, PAD = 10, SLICE_PAD = 24, SLICE_INNER = 16, SLICE_GAP = 20, MARGIN = 30;
|
|
9
|
+
declare const COLORS: {
|
|
10
|
+
action: {
|
|
11
|
+
bg: string;
|
|
12
|
+
border: string;
|
|
13
|
+
text: string;
|
|
14
|
+
};
|
|
15
|
+
event: {
|
|
16
|
+
bg: string;
|
|
17
|
+
border: string;
|
|
18
|
+
text: string;
|
|
19
|
+
};
|
|
20
|
+
state: {
|
|
21
|
+
bg: string;
|
|
22
|
+
border: string;
|
|
23
|
+
text: string;
|
|
24
|
+
};
|
|
25
|
+
reaction: {
|
|
26
|
+
bg: string;
|
|
27
|
+
border: string;
|
|
28
|
+
text: string;
|
|
29
|
+
};
|
|
30
|
+
projection: {
|
|
31
|
+
bg: string;
|
|
32
|
+
border: string;
|
|
33
|
+
text: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export type Pos = {
|
|
37
|
+
x: number;
|
|
38
|
+
y: number;
|
|
39
|
+
};
|
|
40
|
+
export type N = {
|
|
41
|
+
key: string;
|
|
42
|
+
pos: Pos;
|
|
43
|
+
type: keyof typeof COLORS;
|
|
44
|
+
label: string;
|
|
45
|
+
sub?: string;
|
|
46
|
+
file?: string;
|
|
47
|
+
projections?: string[];
|
|
48
|
+
guards?: string[];
|
|
49
|
+
reactions?: string[];
|
|
50
|
+
/** Best-effort Zod source text for event nodes (see EventNode.schema). */
|
|
51
|
+
schema?: string;
|
|
52
|
+
/** Events this action emits — shown in action-node tooltips. */
|
|
53
|
+
emits?: string[];
|
|
54
|
+
/** Events this projection handles — shown in projection-node tooltips. */
|
|
55
|
+
handles?: string[];
|
|
56
|
+
};
|
|
57
|
+
export type E = {
|
|
58
|
+
from: Pos;
|
|
59
|
+
to: Pos;
|
|
60
|
+
color: string;
|
|
61
|
+
dash?: boolean;
|
|
62
|
+
};
|
|
63
|
+
export type Box = {
|
|
64
|
+
label: string;
|
|
65
|
+
x: number;
|
|
66
|
+
y: number;
|
|
67
|
+
w: number;
|
|
68
|
+
h: number;
|
|
69
|
+
error?: string;
|
|
70
|
+
};
|
|
71
|
+
export type Layout = {
|
|
72
|
+
ns: N[];
|
|
73
|
+
es: E[];
|
|
74
|
+
boxes: Box[];
|
|
75
|
+
minX: number;
|
|
76
|
+
minY: number;
|
|
77
|
+
width: number;
|
|
78
|
+
height: number;
|
|
79
|
+
};
|
|
80
|
+
export declare function computeLayout(viewModel: DomainModel): Layout;
|
|
81
|
+
export {};
|
|
82
|
+
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../src/client/lib/layout.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,WAAW,EAAa,MAAM,mBAAmB,CAAC;AAGhE,eAAO,MAAM,CAAC,MAAM,EAClB,CAAC,KAAK,EACN,OAAO,KAAK,EACZ,OAAO,KAAK,EACZ,GAAG,KAAK,EACR,GAAG,KAAK,EACR,SAAS,KAAK,EACd,WAAW,KAAK,EAChB,SAAS,KAAK,EACd,MAAM,KAAK,CAAC;AAEd,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;CAMX,CAAC;AAGF,MAAM,MAAM,GAAG,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAC3C,MAAM,MAAM,CAAC,GAAG;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,GAAG,CAAC;IACT,IAAI,EAAE,MAAM,OAAO,MAAM,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,0EAA0E;IAC1E,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AACF,MAAM,MAAM,CAAC,GAAG;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,EAAE,EAAE,GAAG,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AACtE,MAAM,MAAM,GAAG,GAAG;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AACF,MAAM,MAAM,MAAM,GAAG;IACnB,EAAE,EAAE,CAAC,EAAE,CAAC;IACR,EAAE,EAAE,CAAC,EAAE,CAAC;IACR,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAoNF,wBAAgB,aAAa,CAAC,SAAS,EAAE,WAAW,GAAG,MAAM,CA4kB5D"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Shared no-op function used as Proxy targets (body is never reached through the proxy) */
|
|
2
|
+
export declare function proxyTarget(): void;
|
|
3
|
+
export declare function mockState(entry: Record<string, any>, onBuild?: (info: any) => void): {
|
|
4
|
+
init: (_initFn?: any) => {
|
|
5
|
+
emits(events: Record<string, any>): any;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export declare function mockSlice(onBuild?: (info: any) => void): any;
|
|
9
|
+
export declare function mockProjection(target?: string, onBuild?: (info: any) => void): any;
|
|
10
|
+
export declare function mockAct(onBuild?: (info: any) => void): any;
|
|
11
|
+
/** Module map for the evaluator's require() */
|
|
12
|
+
export declare const MODULES: Record<string, Record<string, unknown>>;
|
|
13
|
+
/**
|
|
14
|
+
* Returns a deep Proxy for unknown modules — any property access
|
|
15
|
+
* returns a no-op function that also acts as a Proxy.
|
|
16
|
+
*/
|
|
17
|
+
export declare function unknownModuleProxy(): Record<string, unknown>;
|
|
18
|
+
//# sourceMappingURL=mock-builders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-builders.d.ts","sourceRoot":"","sources":["../../../../src/client/lib/mock-builders.ts"],"names":[],"mappings":"AAQA,4FAA4F;AAC5F,wBAAgB,WAAW,SAAK;AA2DhC,wBAAgB,SAAS,CACvB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC1B,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI;qBAyCV,GAAG;sBACJ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;EAatC;AAyDD,wBAAgB,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,OA4CtD;AAED,wBAAgB,cAAc,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,OA6B5E;AAED,wBAAgB,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,OAgEpD;AAWD,+CAA+C;AAC/C,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAoB3D,CAAC;AAEF;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAmB5D"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Navigate from a diagram element click to the exact definition in code.
|
|
3
|
+
* Builds type-specific regex patterns, searches all .ts files, and
|
|
4
|
+
* returns the file path, line, and column of the match.
|
|
5
|
+
*
|
|
6
|
+
* Pure function — no side effects, no VS Code / Monaco dependency.
|
|
7
|
+
*/
|
|
8
|
+
import type { FileTab } from "../types/index.js";
|
|
9
|
+
type NavigateResult = {
|
|
10
|
+
file: string;
|
|
11
|
+
line: number;
|
|
12
|
+
col: number;
|
|
13
|
+
};
|
|
14
|
+
export declare function navigateToCode(files: FileTab[], name: string, type?: string, targetFile?: string): NavigateResult | undefined;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=navigate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigate.d.ts","sourceRoot":"","sources":["../../../../src/client/lib/navigate.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAoFjD,KAAK,cAAc,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAElE,wBAAgB,cAAc,CAC5B,KAAK,EAAE,OAAO,EAAE,EAChB,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,MAAM,EACb,UAAU,CAAC,EAAE,MAAM,GAClB,cAAc,GAAG,SAAS,CA8J5B"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Best-effort capture of Zod schema source text for each event declared
|
|
3
|
+
* in `.emits({ ... })` blocks. The extractor walks the original source
|
|
4
|
+
* (not the transpiled JS), tracks strings/comments/templates, and slices
|
|
5
|
+
* out each value expression by balanced-bracket matching.
|
|
6
|
+
*
|
|
7
|
+
* Returned text is whatever the user wrote — `z.object({...})`,
|
|
8
|
+
* `z.string()`, `OrderPlacedSchema`, even a multi-line expression. The
|
|
9
|
+
* intent is fidelity to author intent rather than canonical form.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Build a map of every top-level identifier assignment in `src`.
|
|
13
|
+
*
|
|
14
|
+
* const Foo = z.object({...}); → Foo → "z.object({...})"
|
|
15
|
+
* export const Bar: T = someExpr; → Bar → "someExpr"
|
|
16
|
+
* let Baz = "literal"; → Baz → "\"literal\""
|
|
17
|
+
*
|
|
18
|
+
* Used so cross-file shorthand `.emits({ TicketOpened })` can resolve
|
|
19
|
+
* to the actual Zod expression defined in another module.
|
|
20
|
+
*/
|
|
21
|
+
export declare function extractIdentifierAssignments(src: string): Map<string, string>;
|
|
22
|
+
/**
|
|
23
|
+
* Find every `.emits( ... )` call in `src` and extract the Zod source
|
|
24
|
+
* text for any event name in `eventNames`. Resolves three indirection
|
|
25
|
+
* patterns:
|
|
26
|
+
*
|
|
27
|
+
* .emits({ Foo: z.object(...) }) → direct value capture
|
|
28
|
+
* .emits({ Foo }) → shorthand → chase `Foo` to its
|
|
29
|
+
* definition, locally or via
|
|
30
|
+
* `external` (cross-file)
|
|
31
|
+
* .emits(EventsObj) → chase the identifier to its
|
|
32
|
+
* `const EventsObj = { ... }`
|
|
33
|
+
*
|
|
34
|
+
* Returns a map keyed by event name; missing events stay absent.
|
|
35
|
+
*/
|
|
36
|
+
export declare function extractSchemasFromSource(src: string, eventNames: Set<string>, external?: Map<string, string>): Map<string, string>;
|
|
37
|
+
//# sourceMappingURL=schema-extract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-extract.d.ts","sourceRoot":"","sources":["../../../../src/client/lib/schema-extract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AA+PH;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAyB7E;AA+BD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,EACvB,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAC7B,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAkCrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../../../../src/client/lib/sort.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,mFAAmF;AACnF,wBAAgB,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CA+DtD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FileTab } from "../types/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Parse a multi-file AI response with path-annotated fenced blocks.
|
|
4
|
+
* Format: ```typescript:src/states.ts\n...code...\n```
|
|
5
|
+
* Falls back to a single src/app.ts file if no path annotations found.
|
|
6
|
+
*/
|
|
7
|
+
export declare function parseMultiFileResponse(raw: string): FileTab[];
|
|
8
|
+
export declare function stripFences(code: string): string;
|
|
9
|
+
/** Derive a project name from the prompt or generated code */
|
|
10
|
+
export declare function deriveProjectName(prompt: string, code?: string): string;
|
|
11
|
+
//# sourceMappingURL=strip-fences.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strip-fences.d.ts","sourceRoot":"","sources":["../../../../src/client/lib/strip-fences.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,EAAE,CAmB7D;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAqBhD;AAED,8DAA8D;AAC9D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAiBvE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../src/client/lib/validate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAExE,mDAAmD;AACnD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,iBAAiB,EAAE,CAiBhE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/client/main.tsx"],"names":[],"mappings":"AAOA,OAAO,cAAc,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/** Domain model extracted from Act builder code */
|
|
2
|
+
export type ActNode = {
|
|
3
|
+
slices: string[];
|
|
4
|
+
projections: string[];
|
|
5
|
+
states: string[];
|
|
6
|
+
line?: number;
|
|
7
|
+
};
|
|
8
|
+
export type EntryPoint = {
|
|
9
|
+
path: string;
|
|
10
|
+
states: StateNode[];
|
|
11
|
+
slices: SliceNode[];
|
|
12
|
+
projections: ProjectionNode[];
|
|
13
|
+
reactions: ReactionNode[];
|
|
14
|
+
};
|
|
15
|
+
export type DomainModel = {
|
|
16
|
+
entries: EntryPoint[];
|
|
17
|
+
states: StateNode[];
|
|
18
|
+
slices: SliceNode[];
|
|
19
|
+
projections: ProjectionNode[];
|
|
20
|
+
reactions: ReactionNode[];
|
|
21
|
+
orchestrator?: ActNode;
|
|
22
|
+
};
|
|
23
|
+
export type StateNode = {
|
|
24
|
+
name: string;
|
|
25
|
+
varName: string;
|
|
26
|
+
events: EventNode[];
|
|
27
|
+
actions: ActionNode[];
|
|
28
|
+
file?: string;
|
|
29
|
+
line?: number;
|
|
30
|
+
};
|
|
31
|
+
export type EventNode = {
|
|
32
|
+
name: string;
|
|
33
|
+
hasCustomPatch: boolean;
|
|
34
|
+
line?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Best-effort source text of the Zod schema expression as written in
|
|
37
|
+
* `.emits({ EventName: <expr> })`. Captured by re-scanning the source
|
|
38
|
+
* file after evaluation. Absent when the event was found but no source
|
|
39
|
+
* match could be made (synthetic events, unparseable blocks).
|
|
40
|
+
*/
|
|
41
|
+
schema?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Runtime Zod schema object captured during evaluation. Only present
|
|
44
|
+
* after parsing — never serialized. The act-contracts CLI uses this
|
|
45
|
+
* to emit JSON Schema via `z.toJSONSchema()`.
|
|
46
|
+
*/
|
|
47
|
+
zod?: unknown;
|
|
48
|
+
};
|
|
49
|
+
export type ActionNode = {
|
|
50
|
+
name: string;
|
|
51
|
+
emits: string[];
|
|
52
|
+
invariants: string[];
|
|
53
|
+
line?: number;
|
|
54
|
+
};
|
|
55
|
+
export type SliceNode = {
|
|
56
|
+
name: string;
|
|
57
|
+
states: string[];
|
|
58
|
+
stateVars: string[];
|
|
59
|
+
projections: string[];
|
|
60
|
+
reactions: ReactionNode[];
|
|
61
|
+
error?: string;
|
|
62
|
+
file?: string;
|
|
63
|
+
line?: number;
|
|
64
|
+
};
|
|
65
|
+
export type ProjectionNode = {
|
|
66
|
+
name: string;
|
|
67
|
+
varName: string;
|
|
68
|
+
handles: string[];
|
|
69
|
+
file?: string;
|
|
70
|
+
line?: number;
|
|
71
|
+
};
|
|
72
|
+
export type ReactionNode = {
|
|
73
|
+
event: string;
|
|
74
|
+
handlerName: string;
|
|
75
|
+
dispatches: string[];
|
|
76
|
+
file?: string;
|
|
77
|
+
line?: number;
|
|
78
|
+
};
|
|
79
|
+
export type ValidationWarning = {
|
|
80
|
+
message: string;
|
|
81
|
+
severity: "warning" | "error";
|
|
82
|
+
element?: string;
|
|
83
|
+
};
|
|
84
|
+
export declare function emptyModel(): DomainModel;
|
|
85
|
+
//# sourceMappingURL=domain-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domain-model.d.ts","sourceRoot":"","sources":["../../../../src/client/types/domain-model.ts"],"names":[],"mappings":"AAAA,mDAAmD;AAEnD,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,SAAS,EAAE,YAAY,EAAE,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,EAAE,UAAU,EAAE,CAAC;IAEtB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,OAAO,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,SAAS,GAAG,OAAO,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,wBAAgB,UAAU,IAAI,WAAW,CASxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-tab.d.ts","sourceRoot":"","sources":["../../../../src/client/types/file-tab.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { ActionNode, ActNode, DomainModel, EntryPoint, EventNode, ProjectionNode, ReactionNode, SliceNode, StateNode, ValidationWarning, } from "./domain-model.js";
|
|
2
|
+
export { emptyModel } from "./domain-model.js";
|
|
3
|
+
export type { FileTab } from "./file-tab.js";
|
|
4
|
+
export type { DiagramMessage, HostMessage } from "./protocol.js";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/client/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,OAAO,EACP,WAAW,EACX,UAAU,EACV,SAAS,EACT,cAAc,EACd,YAAY,EACZ,SAAS,EACT,SAAS,EACT,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,YAAY,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|