process-graph 1.2.0 → 1.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 +25 -20
- package/dist/bin.js +4 -3
- package/dist/cli.d.ts +87 -75
- package/dist/cli.js +4 -2
- package/dist/data-file-BVMxkTug.js +95 -0
- package/dist/{dist-BxHnxpcT.js → dist-C8zDuW-y.js} +293 -510
- package/dist/dist-DipyhCvb.js +4 -0
- package/dist/{dist-BpCBmnMl.js → dist-arkejVz2.js} +2 -112
- package/dist/graphql-3DSUSUvL.d.ts +17 -0
- package/dist/{index-CoA6vXqe.d.ts → index-4f4PVH7K.d.ts} +23 -2
- package/dist/index-Bb90VKMc.d.ts +71 -0
- package/dist/{index-DxWOY8f9.d.ts → index-CR8xUK3S.d.ts} +5 -572
- package/dist/{index-CptUHq6F.d.ts → index-Cp5selgs.d.ts} +2 -1
- package/dist/{graphql-C1j5wQFz.d.ts → index-Cs1CWlEg.d.ts} +3 -16
- package/dist/{index-BH1aFqkJ.d.ts → index-D4CnOhNf.d.ts} +1 -1
- package/dist/index-DoMIav3D.d.ts +118 -0
- package/dist/{index-CmZOswkx.d.ts → index-Dvz_I_uQ.d.ts} +17 -8
- package/dist/{index-BUheRLdG.d.ts → index-LWdwpjZG.d.ts} +5 -24
- package/dist/{index-CrM5qWUA.d.ts → index-RwwlDYZ7.d.ts} +2 -2
- package/dist/index.d.ts +25 -4
- package/dist/index.js +4 -3
- package/dist/layout.d.ts +1 -1
- package/dist/project-CP_ye6KI.js +27 -0
- package/dist/react-flow.d.ts +5 -5
- package/dist/react-flow.js +1 -1
- package/dist/react.d.ts +2 -1
- package/dist/react.js +1 -24
- package/dist/{router-DvGGLnNt.js → router-Dk91O_9p.js} +2 -2
- package/dist/{schema-CVnS6HiX.js → schema-BPT8fmfa.js} +2 -2
- package/dist/schema-DVAttrJg.js +126 -0
- package/dist/source/github/node.d.ts +1 -1
- package/dist/source/github.d.ts +3 -2
- package/dist/source/github.js +38 -1
- package/dist/{source-DRDpEA8Q.js → source-lTKshktI.js} +24 -163
- package/dist/store/node.d.ts +27 -2
- package/dist/store/node.js +2 -2
- package/dist/store/wasm/worker.js +2 -2
- package/dist/store/wasm.d.ts +1 -1
- package/dist/{store-BJILV4JS.js → store-DKzvLGgl.js} +1 -1
- package/dist/store.d.ts +1 -1
- package/dist/store.js +2 -2
- package/dist/sync-CkaJO3OQ.js +213 -0
- package/dist/sync.d.ts +26 -0
- package/dist/sync.js +16 -0
- package/dist/theme-values-BJJhAkUn-ORyRUrPf.js +114 -0
- package/dist/theme-values-BybZ-cle.d.ts +116 -0
- package/dist/ui/theme.d.ts +2 -0
- package/dist/ui/theme.js +2 -0
- package/dist/ui.d.ts +6 -120
- package/dist/ui.js +2 -1
- package/dist/version-DMNBcTZ-.js +5 -0
- package/dist/view-DTeNUhGG.js +392 -0
- package/package.json +34 -23
- package/dist/dist-Cw63tKU9.js +0 -3
- package/dist/open-BF-UHqeW.js +0 -29
- package/dist/parse-CuipC_2K.js +0 -41
|
@@ -1,119 +1,9 @@
|
|
|
1
1
|
import { a as TransitionItem$1, i as Lane$1, n as FilterPanel$1, o as ElementCard$1, r as Legend$1, s as StatusBadge$1, t as DetailPanel$1 } from "./detail-panel-B1ZmMuJT.js";
|
|
2
|
+
import { r as lightTheme, t as darkTheme } from "./theme-values-BJJhAkUn-ORyRUrPf.js";
|
|
2
3
|
import { useId } from "react";
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
5
|
import { createRuntimeFn } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
5
6
|
//#region ../../ui/graph/ui/dist/index.js
|
|
6
|
-
var vars = {
|
|
7
|
-
colour: {
|
|
8
|
-
background: "var(--_1pqhw580)",
|
|
9
|
-
surface: "var(--_1pqhw581)",
|
|
10
|
-
text: "var(--_1pqhw582)",
|
|
11
|
-
muted: "var(--_1pqhw583)",
|
|
12
|
-
border: "var(--_1pqhw584)",
|
|
13
|
-
accent: "var(--_1pqhw585)",
|
|
14
|
-
focus: "var(--_1pqhw586)",
|
|
15
|
-
critical: "var(--_1pqhw587)",
|
|
16
|
-
handoff: "var(--_1pqhw588)",
|
|
17
|
-
status: {
|
|
18
|
-
done: "var(--_1pqhw589)",
|
|
19
|
-
ready: "var(--_1pqhw58a)",
|
|
20
|
-
blocked: "var(--_1pqhw58b)",
|
|
21
|
-
skipped: "var(--_1pqhw58c)",
|
|
22
|
-
unknown: "var(--_1pqhw58d)"
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
space: {
|
|
26
|
-
small: "var(--_1pqhw58e)",
|
|
27
|
-
medium: "var(--_1pqhw58f)",
|
|
28
|
-
large: "var(--_1pqhw58g)"
|
|
29
|
-
},
|
|
30
|
-
radius: {
|
|
31
|
-
small: "var(--_1pqhw58h)",
|
|
32
|
-
medium: "var(--_1pqhw58i)"
|
|
33
|
-
},
|
|
34
|
-
font: {
|
|
35
|
-
body: "var(--_1pqhw58j)",
|
|
36
|
-
mono: "var(--_1pqhw58k)",
|
|
37
|
-
sizeSmall: "var(--_1pqhw58l)",
|
|
38
|
-
sizeBody: "var(--_1pqhw58m)",
|
|
39
|
-
sizeHeading: "var(--_1pqhw58n)",
|
|
40
|
-
weightStrong: "var(--_1pqhw58o)"
|
|
41
|
-
},
|
|
42
|
-
stroke: {
|
|
43
|
-
thin: "var(--_1pqhw58p)",
|
|
44
|
-
thick: "var(--_1pqhw58q)"
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
var lightTheme = "_1pqhw58r";
|
|
48
|
-
var darkTheme = "_1pqhw58s";
|
|
49
|
-
/** What both themes share: everything but colour. */
|
|
50
|
-
var shared = {
|
|
51
|
-
space: {
|
|
52
|
-
small: "0.25rem",
|
|
53
|
-
medium: "0.5rem",
|
|
54
|
-
large: "1rem"
|
|
55
|
-
},
|
|
56
|
-
radius: {
|
|
57
|
-
small: "0.25rem",
|
|
58
|
-
medium: "0.5rem"
|
|
59
|
-
},
|
|
60
|
-
font: {
|
|
61
|
-
body: "system-ui, -apple-system, \"Segoe UI\", sans-serif",
|
|
62
|
-
mono: "ui-monospace, \"SFMono-Regular\", Menlo, monospace",
|
|
63
|
-
sizeSmall: "0.75rem",
|
|
64
|
-
sizeBody: "0.875rem",
|
|
65
|
-
sizeHeading: "1rem",
|
|
66
|
-
weightStrong: "600"
|
|
67
|
-
},
|
|
68
|
-
stroke: {
|
|
69
|
-
thin: "1px",
|
|
70
|
-
thick: "3px"
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
/** The light theme's values. Each status colour reads as text on both `surface` and `background`. */
|
|
74
|
-
var lightValues = {
|
|
75
|
-
...shared,
|
|
76
|
-
colour: {
|
|
77
|
-
background: "#ffffff",
|
|
78
|
-
surface: "#f6f8fa",
|
|
79
|
-
text: "#1f2328",
|
|
80
|
-
muted: "#59636e",
|
|
81
|
-
border: "#d1d9e0",
|
|
82
|
-
accent: "#0969da",
|
|
83
|
-
focus: "#0969da",
|
|
84
|
-
critical: "#9a6700",
|
|
85
|
-
handoff: "#6639ba",
|
|
86
|
-
status: {
|
|
87
|
-
done: "#1a7f37",
|
|
88
|
-
ready: "#0550ae",
|
|
89
|
-
blocked: "#cf222e",
|
|
90
|
-
skipped: "#59636e",
|
|
91
|
-
unknown: "#6639ba"
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
/** The dark theme's values. Each status colour reads as text on both `surface` and `background`. */
|
|
96
|
-
var darkValues = {
|
|
97
|
-
...shared,
|
|
98
|
-
colour: {
|
|
99
|
-
background: "#0d1117",
|
|
100
|
-
surface: "#161b22",
|
|
101
|
-
text: "#e6edf3",
|
|
102
|
-
muted: "#9198a1",
|
|
103
|
-
border: "#3d444d",
|
|
104
|
-
accent: "#4493f8",
|
|
105
|
-
focus: "#4493f8",
|
|
106
|
-
critical: "#d29922",
|
|
107
|
-
handoff: "#ab7df8",
|
|
108
|
-
status: {
|
|
109
|
-
done: "#3fb950",
|
|
110
|
-
ready: "#58a6ff",
|
|
111
|
-
blocked: "#f85149",
|
|
112
|
-
skipped: "#9198a1",
|
|
113
|
-
unknown: "#ab7df8"
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
7
|
var surfaceRoot = "xk03iz0";
|
|
118
8
|
var visuallyHidden = "xk03iz1";
|
|
119
9
|
var focusRing = "xk03iz2";
|
|
@@ -579,4 +469,4 @@ var SequenceDiagram = (props) => {
|
|
|
579
469
|
});
|
|
580
470
|
};
|
|
581
471
|
//#endregion
|
|
582
|
-
export {
|
|
472
|
+
export { Lane as a, StatusBadge as c, card as d, focusRing as f, visuallyHidden as h, GraphTheme as i, TransitionItem as l, themes as m, ElementCard as n, Legend as o, surfaceRoot as p, FilterPanel as r, SequenceDiagram as s, DetailPanel as t, badge as u };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "./index-Cs1CWlEg.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region ../../adapters/graph/source-github-issues/dist/graphql.d.ts
|
|
4
|
+
/** GitHub's GraphQL endpoint. */
|
|
5
|
+
declare const githubGraphqlEndpoint = "https://api.github.com/graphql";
|
|
6
|
+
/**
|
|
7
|
+
* Supplies the token for requests about one owner's repositories, so different organisations can use different credentials. The token is only ever sent in the `Authorization` header; this adapter never logs or returns it.
|
|
8
|
+
* @param owner - The login of the account whose repositories or board the request reads, or `undefined` for a request about the token's own holder (the viewer and the organisations it belongs to), which no owner names.
|
|
9
|
+
* @param signal - The caller's abort signal.
|
|
10
|
+
* @returns The token.
|
|
11
|
+
* @throws GraphSourceError with `unauthorised` when no token can be had, with a message saying how to get one; any other error is reported by the adapter as `unauthorised` too, naming the token port and the owner, with that error as the cause.
|
|
12
|
+
*/
|
|
13
|
+
type GitHubTokenPort = (owner: string | undefined, signal: AbortSignal | undefined) => Promise<string>;
|
|
14
|
+
/** The part of `fetch` this adapter uses: one POST to the GraphQL endpoint. The global `fetch` satisfies it. */
|
|
15
|
+
type GraphqlFetch = (url: string, init: RequestInit) => Promise<Response>;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { GraphqlFetch as n, githubGraphqlEndpoint as r, GitHubTokenPort as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as Transition, F as Notation, K as IdSpace, N as FragmentOperator, P as MessageMode, R as PseudoRole, S as Element, _ as Model, k as Projection } from "./index-Dvz_I_uQ.js";
|
|
2
2
|
//#region ../../core/graph/projection/dist/loss.d.ts
|
|
3
3
|
/** What an element that a notation cannot draw is: an element kind, or the role of a pseudo-state. A `message` element is one only when the notation would fold it but folding it would multiply edges. */
|
|
4
4
|
type UnrepresentedKind = "activity" | "decision" | "state" | "message" | PseudoRole;
|
|
@@ -345,6 +345,27 @@ declare const confirmChanges: <I extends IdSpace>(diff: ModelDiff<I>, accept: (c
|
|
|
345
345
|
*/
|
|
346
346
|
declare const applyModelDiff: <I extends IdSpace>(model: Model<I>, diff: ModelDiff<I>) => Model<I>;
|
|
347
347
|
//#endregion
|
|
348
|
+
//#region ../../core/graph/projection/dist/project.d.ts
|
|
349
|
+
/** The view each projection notation produces. */
|
|
350
|
+
interface ViewsByNotation<I extends IdSpace> {
|
|
351
|
+
readonly flowchart: Flowchart<I>;
|
|
352
|
+
readonly swimlane: Swimlane<I>;
|
|
353
|
+
readonly stateMachine: StateMachine<I>;
|
|
354
|
+
readonly sequence: SequenceDiagram<I>;
|
|
355
|
+
}
|
|
356
|
+
/** A projection request together with the view it produced, discriminated by notation. */
|
|
357
|
+
type ProjectedView<I extends IdSpace> = { readonly [N in keyof ViewsByNotation<I>]: {
|
|
358
|
+
readonly notation: N;
|
|
359
|
+
readonly view: ViewsByNotation<I>[N];
|
|
360
|
+
}; }[keyof ViewsByNotation<I>];
|
|
361
|
+
/**
|
|
362
|
+
* Projects a model into the notation a projection names, with the input it records (a subject, a scenario).
|
|
363
|
+
* @param model - The model to project.
|
|
364
|
+
* @param projection - One of the model's declared projections, or one built the same way.
|
|
365
|
+
* @returns The notation and its view.
|
|
366
|
+
*/
|
|
367
|
+
declare const project: <I extends IdSpace>(model: Model<I>, projection: Projection<I>) => ProjectedView<I>;
|
|
368
|
+
//#endregion
|
|
348
369
|
//#region ../../core/graph/projection/dist/inverse-flowchart.d.ts
|
|
349
370
|
/**
|
|
350
371
|
* The inverse of `toFlowchart`: what an edited flowchart changes in the model, matched by element and transition id.
|
|
@@ -401,4 +422,4 @@ declare const diffStateMachine: <I extends IdSpace>(model: Model<I>, edited: Rea
|
|
|
401
422
|
*/
|
|
402
423
|
declare const diffSequence: <I extends IdSpace>(model: Model<I>, scenario: readonly I["transition"][], edited: Readonly<Pick<SequenceDiagram<I>, "messages">>) => ModelDiff<I>;
|
|
403
424
|
//#endregion
|
|
404
|
-
export {
|
|
425
|
+
export { toSwimlane as A, toSequence as C, toStateMachine as D, StateMachineTransition as E, Handoff as F, handoffs as I, Loss as L, FlowNode as M, Flowchart as N, Lane as O, toFlowchart as P, UnrepresentedElement as R, SequenceOperand as S, StateMachineState as T, applyModelDiff as _, ProjectedView as a, SequenceItem as b, Addressing as c, Ends as d, EventChange as f, UnconfirmedChangeError as g, TransitionFieldChange as h, diffSwimlane as i, FlowEdge as j, Swimlane as k, Change as l, TransitionChange as m, diffStateMachine as n, ViewsByNotation as o, ModelDiff as p, diffFlowchart as r, project as s, diffSequence as t, ElementChange as u, confirmChanges as v, StateMachine as w, SequenceMessage as x, SequenceDiagram as y, UnrepresentedKind as z };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { K as IdSpace, _ as Model, q as OpenIds } from "./index-Dvz_I_uQ.js";
|
|
2
|
+
import { N as Flowchart, a as ProjectedView, k as Swimlane, w as StateMachine, y as SequenceDiagram } from "./index-4f4PVH7K.js";
|
|
3
|
+
//#region ../../core/graph/export/dist/view.d.ts
|
|
4
|
+
/** The text formats a view is written in: Mermaid, Graphviz DOT, and the projection itself as JSON. */
|
|
5
|
+
declare const exportFormats: readonly ["mermaid", "dot", "json"];
|
|
6
|
+
/** One of the text formats a view is written in. */
|
|
7
|
+
type ExportFormat = (typeof exportFormats)[number];
|
|
8
|
+
/**
|
|
9
|
+
* A projected view as text: Mermaid or Graphviz DOT source, or the projection as JSON indented by two spaces and ending in a line break, with every control, format, separator, unassigned and private-use character in it written as a JSON `\u` escape (see `terminalJson`), so the text shows nothing hidden or reordered wherever it is saved or printed and parses back to exactly the projection. This is the one writer of a view's text, so the command line's `show` and a download from the web app give the same text for the same view.
|
|
10
|
+
* @param model - The model the view was projected from, for the labels of a sequence diagram's participants.
|
|
11
|
+
* @param projected - The view, as graph-projection's `project` gives it.
|
|
12
|
+
* @param format - The format to write.
|
|
13
|
+
* @returns The text.
|
|
14
|
+
*/
|
|
15
|
+
declare const viewText: (model: Model<OpenIds>, projected: ProjectedView<OpenIds>, format: ExportFormat) => string;
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region ../../core/graph/export/dist/mermaid.d.ts
|
|
18
|
+
/**
|
|
19
|
+
* A flowchart as a Mermaid `flowchart`, top to bottom. Nodes are declared in the view's order, then edges, each with its guard as the edge label.
|
|
20
|
+
* @param view - The projected flowchart.
|
|
21
|
+
* @returns Mermaid source, ending with a line break.
|
|
22
|
+
*/
|
|
23
|
+
declare const flowchartToMermaid: <I extends IdSpace>(view: Flowchart<I>) => string;
|
|
24
|
+
/**
|
|
25
|
+
* A swimlane as a Mermaid `flowchart`, left to right, with one subgraph per lane in the view's lane order (an empty lane is an empty subgraph, so it stays visible) and nodes with no actor outside every lane. Hand-offs, the edges that change lane, are drawn thick.
|
|
26
|
+
* @param view - The projected swimlane.
|
|
27
|
+
* @returns Mermaid source, ending with a line break.
|
|
28
|
+
*/
|
|
29
|
+
declare const swimlaneToMermaid: <I extends IdSpace>(view: Swimlane<I>) => string;
|
|
30
|
+
/**
|
|
31
|
+
* A state machine as a Mermaid `stateDiagram-v2`. Initial and final pseudo-states are Mermaid's `[*]`; every other state is declared with its label. Each transition carries its event, guard and effect.
|
|
32
|
+
* @param view - The projected state machine.
|
|
33
|
+
* @returns Mermaid source, ending with a line break.
|
|
34
|
+
*/
|
|
35
|
+
declare const stateMachineToMermaid: <I extends IdSpace>(view: StateMachine<I>) => string;
|
|
36
|
+
/**
|
|
37
|
+
* A sequence diagram as a Mermaid `sequenceDiagram`. Lifelines are declared in order of first appearance, labelled through `participantLabel`; messages follow in scenario order, wrapped in the fragments the projection drew (`alt` operands separated by `else`, `par` operands by `and`), each operand headed by its guard.
|
|
38
|
+
* @param view - The projected sequence diagram.
|
|
39
|
+
* @param participantLabel - The label of a lifeline's participant.
|
|
40
|
+
* @returns Mermaid source, ending with a line break.
|
|
41
|
+
*/
|
|
42
|
+
declare const sequenceToMermaid: <I extends IdSpace>(view: SequenceDiagram<I>, participantLabel: (participant: I["actor"]) => string) => string;
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region ../../core/graph/export/dist/dot.d.ts
|
|
45
|
+
/**
|
|
46
|
+
* A flowchart as a Graphviz `digraph`, top to bottom. Nodes are named by their model identifiers, so the DOT source reads back to the model directly.
|
|
47
|
+
* @param view - The projected flowchart.
|
|
48
|
+
* @returns DOT source, ending with a line break.
|
|
49
|
+
*/
|
|
50
|
+
declare const flowchartToDot: <I extends IdSpace>(view: Flowchart<I>) => string;
|
|
51
|
+
/**
|
|
52
|
+
* A swimlane as a Graphviz `digraph`, left to right, with one `cluster` subgraph per lane in the view's lane order and nodes with no actor outside every lane. An empty lane holds one invisible point so Graphviz still draws it. Hand-offs, the edges that change lane, are drawn bold.
|
|
53
|
+
* @param view - The projected swimlane.
|
|
54
|
+
* @returns DOT source, ending with a line break.
|
|
55
|
+
*/
|
|
56
|
+
declare const swimlaneToDot: <I extends IdSpace>(view: Swimlane<I>) => string;
|
|
57
|
+
/**
|
|
58
|
+
* A state machine as a Graphviz `digraph`, left to right. Each transition is labelled with its event, guard and effect.
|
|
59
|
+
* @param view - The projected state machine.
|
|
60
|
+
* @returns DOT source, ending with a line break.
|
|
61
|
+
*/
|
|
62
|
+
declare const stateMachineToDot: <I extends IdSpace>(view: StateMachine<I>) => string;
|
|
63
|
+
/**
|
|
64
|
+
* A sequence diagram as a Graphviz `digraph`. DOT has no sequence notation, so the diagram is drawn as a grid: a column per lifeline, headed by its participant's label, with one row per message in scenario order. Each message is an arrow across its row, numbered by its step and prefixed with the fragments around it (operator and guard, outermost first), since DOT cannot draw a box around arrows.
|
|
65
|
+
* @param view - The projected sequence diagram.
|
|
66
|
+
* @param participantLabel - The label of a lifeline's participant.
|
|
67
|
+
* @returns DOT source, ending with a line break.
|
|
68
|
+
*/
|
|
69
|
+
declare const sequenceToDot: <I extends IdSpace>(view: SequenceDiagram<I>, participantLabel: (participant: I["actor"]) => string) => string;
|
|
70
|
+
//#endregion
|
|
71
|
+
export { flowchartToMermaid as a, swimlaneToMermaid as c, viewText as d, swimlaneToDot as i, ExportFormat as l, sequenceToDot as n, sequenceToMermaid as o, stateMachineToDot as r, stateMachineToMermaid as s, flowchartToDot as t, exportFormats as u };
|