process-graph 1.3.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 +21 -19
- package/dist/bin.js +2 -2
- package/dist/cli.d.ts +54 -74
- package/dist/cli.js +4 -3
- package/dist/{dist-BI01yxFA.js → dist-C8zDuW-y.js} +254 -469
- package/dist/dist-DipyhCvb.js +4 -0
- package/dist/graphql-3DSUSUvL.d.ts +17 -0
- package/dist/{index-D06bcdfw.d.ts → index-4f4PVH7K.d.ts} +23 -2
- package/dist/index-Bb90VKMc.d.ts +71 -0
- package/dist/{index-hri2a13-.d.ts → index-Cp5selgs.d.ts} +2 -1
- package/dist/{graphql-BE7xm5dB.d.ts → index-Cs1CWlEg.d.ts} +1 -15
- package/dist/index-DoMIav3D.d.ts +118 -0
- package/dist/{index-9Au8pAmP.d.ts → index-LWdwpjZG.d.ts} +2 -21
- package/dist/{index-BC4tmAuQ.d.ts → index-RwwlDYZ7.d.ts} +1 -1
- package/dist/index.d.ts +23 -2
- package/dist/index.js +3 -2
- package/dist/layout.d.ts +1 -1
- package/dist/project-CP_ye6KI.js +27 -0
- package/dist/react-flow.d.ts +3 -3
- package/dist/react.d.ts +2 -1
- package/dist/react.js +1 -24
- 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-D51N7K3A.js → source-lTKshktI.js} +2 -161
- package/dist/sync-CkaJO3OQ.js +213 -0
- package/dist/sync.d.ts +26 -0
- package/dist/sync.js +16 -0
- package/dist/ui.d.ts +2 -2
- package/dist/{version-Dagrkvwt.js → version-DMNBcTZ-.js} +1 -1
- package/dist/view-DTeNUhGG.js +392 -0
- package/package.json +13 -7
- package/dist/dist-81kTKnMq.js +0 -3
- package/dist/parse-C1Q1zsGt.js +0 -41
|
@@ -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 { A as Transition, F as Notation, K as IdSpace, N as FragmentOperator, P as MessageMode, R as PseudoRole, S as Element, _ as Model } from "./index-Dvz_I_uQ.js";
|
|
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 };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { s as GraphSourcePager } from "./index-Cs1CWlEg.js";
|
|
2
|
+
import { n as GraphqlFetch, t as GitHubTokenPort } from "./graphql-3DSUSUvL.js";
|
|
2
3
|
//#region ../../adapters/graph/source-github-issues/dist/source.d.ts
|
|
3
4
|
/** What the GitHub issues source needs. */
|
|
4
5
|
interface GitHubIssuesSourceOptions {
|
|
@@ -615,18 +615,4 @@ interface FakeGraphSourceOptions {
|
|
|
615
615
|
*/
|
|
616
616
|
declare const createFakeGraphSource: (options: FakeGraphSourceOptions) => GraphSourcePager;
|
|
617
617
|
//#endregion
|
|
618
|
-
|
|
619
|
-
/** GitHub's GraphQL endpoint. */
|
|
620
|
-
declare const githubGraphqlEndpoint = "https://api.github.com/graphql";
|
|
621
|
-
/**
|
|
622
|
-
* 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.
|
|
623
|
-
* @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.
|
|
624
|
-
* @param signal - The caller's abort signal.
|
|
625
|
-
* @returns The token.
|
|
626
|
-
* @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.
|
|
627
|
-
*/
|
|
628
|
-
type GitHubTokenPort = (owner: string | undefined, signal: AbortSignal | undefined) => Promise<string>;
|
|
629
|
-
/** The part of `fetch` this adapter uses: one POST to the GraphQL endpoint. The global `fetch` satisfies it. */
|
|
630
|
-
type GraphqlFetch = (url: string, init: RequestInit) => Promise<Response>;
|
|
631
|
-
//#endregion
|
|
632
|
-
export { scopeRootsInputSchema as $, ScopeEntry as A, badRequestReasons as B, Gap as C, Relation as D, OrderField as E, SourceParticipant as F, orderDirections as G, filterStates as H, SourceTransition as I, relationKinds as J, orderFields as K, SyncFilter as L, ScopeListingInput as M, ScopeRootsInput as N, RelationKind as O, SourceDescription as P, scopeListingSchema as Q, SyncInput as R, FilterState as S, OrderDirection as T, gapReasons as U, boundActivitySchema as V, gapSchema as W, scopeChildrenInputSchema as X, relationSchema as Y, scopeEntrySchema as Z, GraphSourceFailure as _, FakePage as a, BadRequestReason as b, assembleSync as c, GraphSourceRouter as d, sourceDescriptionSchema as et, GraphSourceScopes as f, GraphSourceError as g, createGraphSourceRouter as h, FakeGraphSourceOptions as i, transitionSchema as it, ScopeListing as j, ScopeChildrenInput as k, ChildrenRequest as l, PageRequest as m, GraphqlFetch as n, syncInputSchema as nt, createFakeGraphSource as o, ListingRequest as p, participantSchema as q, githubGraphqlEndpoint as r, syncPageSchema as rt, AssembledSync as s, GitHubTokenPort as t, syncFilterSchema as tt, GraphSourcePager as u, GraphSourceClient as v, GapReason as w, BoundActivity as x, graphSourceContract as y, SyncPage as z };
|
|
618
|
+
export { syncInputSchema as $, ScopeRootsInput as A, gapReasons as B, OrderField as C, ScopeEntry as D, ScopeChildrenInput as E, SyncInput as F, relationKinds as G, orderDirections as H, SyncPage as I, scopeEntrySchema as J, relationSchema as K, badRequestReasons as L, SourceParticipant as M, SourceTransition as N, ScopeListing as O, SyncFilter as P, syncFilterSchema as Q, boundActivitySchema as R, OrderDirection as S, RelationKind as T, orderFields as U, gapSchema as V, participantSchema as W, scopeRootsInputSchema as X, scopeListingSchema as Y, sourceDescriptionSchema as Z, BadRequestReason as _, assembleSync as a, Gap as b, GraphSourceRouter as c, PageRequest as d, syncPageSchema as et, createGraphSourceRouter as f, graphSourceContract as g, GraphSourceClient as h, AssembledSync as i, SourceDescription as j, ScopeListingInput as k, GraphSourceScopes as l, GraphSourceFailure as m, FakePage as n, ChildrenRequest as o, GraphSourceError as p, scopeChildrenInputSchema as q, createFakeGraphSource as r, GraphSourcePager as s, FakeGraphSourceOptions as t, transitionSchema as tt, ListingRequest as u, BoundActivity as v, Relation as w, GapReason as x, FilterState as y, filterStates as z };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { P as SyncFilter, b as Gap, h as GraphSourceClient } from "./index-Cs1CWlEg.js";
|
|
2
|
+
import { ut as GraphStoreClient } from "./index-CR8xUK3S.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region ../../core/graph/sync/dist/checkpoint.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Where a sync stopped: the model, every scope it was asked for in order, the filter it read them with, the prefix of the source to read next, and the cursor after the last page it wrote within that source's scopes (absent to read them from the start). Everything before it is in the store, so a sync started from it reads only what is left. A source's cursor is valid only with the scopes and filter it was issued for, which is why both are kept with it.
|
|
7
|
+
*/
|
|
8
|
+
declare const syncCheckpointSchema: z.ZodReadonly<z.ZodObject<{
|
|
9
|
+
modelId: z.ZodString;
|
|
10
|
+
scopes: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
11
|
+
filter: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
12
|
+
states: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
13
|
+
open: "open";
|
|
14
|
+
done: "done";
|
|
15
|
+
}>>>>;
|
|
16
|
+
labels: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
17
|
+
order: z.ZodExactOptional<z.ZodReadonly<z.ZodObject<{
|
|
18
|
+
field: z.ZodEnum<{
|
|
19
|
+
created: "created";
|
|
20
|
+
updated: "updated";
|
|
21
|
+
comments: "comments";
|
|
22
|
+
}>;
|
|
23
|
+
direction: z.ZodEnum<{
|
|
24
|
+
ascending: "ascending";
|
|
25
|
+
descending: "descending";
|
|
26
|
+
}>;
|
|
27
|
+
}, z.core.$strict>>>;
|
|
28
|
+
}, z.core.$strict>>>;
|
|
29
|
+
source: z.ZodString;
|
|
30
|
+
after: z.ZodOptional<z.ZodString>;
|
|
31
|
+
}, z.core.$strict>>;
|
|
32
|
+
type SyncCheckpoint = z.infer<typeof syncCheckpointSchema>;
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region ../../core/graph/sync/dist/sync.d.ts
|
|
35
|
+
/** Finds the source that reads scopes with an identifier prefix, such as `github`, or nothing when no source does. */
|
|
36
|
+
type SourceLookup = (prefix: string) => GraphSourceClient | undefined;
|
|
37
|
+
/** The part of the `GraphStore` client a sync calls: loading the model it merges into and upserting each page. */
|
|
38
|
+
interface SyncStore {
|
|
39
|
+
readonly v1: {
|
|
40
|
+
readonly models: Pick<GraphStoreClient["v1"]["models"], "load">;
|
|
41
|
+
readonly items: Pick<GraphStoreClient["v1"]["items"], "upsert">;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/** How far a sync has got. Each count is of distinct identifiers (relations by kind and both ends) written by this sync. */
|
|
45
|
+
interface SyncProgress {
|
|
46
|
+
/** Pages read and written. */
|
|
47
|
+
readonly pages: number;
|
|
48
|
+
/** The revision the last write took. */
|
|
49
|
+
readonly revision: number;
|
|
50
|
+
readonly participants: number;
|
|
51
|
+
/** Bound activities. */
|
|
52
|
+
readonly activities: number;
|
|
53
|
+
readonly transitions: number;
|
|
54
|
+
/** Relations: sub-issues to their parents, assignees, repositories to their owners. */
|
|
55
|
+
readonly relations: number;
|
|
56
|
+
/** The parts of the scope the sources could not read, in the order met. */
|
|
57
|
+
readonly gaps: readonly Gap[];
|
|
58
|
+
/** Where to resume; absent once every scope has been read. */
|
|
59
|
+
readonly checkpoint: SyncCheckpoint | undefined;
|
|
60
|
+
}
|
|
61
|
+
/** What to sync and where to. */
|
|
62
|
+
interface SyncRequest {
|
|
63
|
+
readonly store: SyncStore;
|
|
64
|
+
readonly sources: SourceLookup;
|
|
65
|
+
readonly modelId: string;
|
|
66
|
+
/** Source-qualified scopes, read in order, one source after another. */
|
|
67
|
+
readonly scopes: readonly string[];
|
|
68
|
+
/** Narrows and orders what each scope lists. It is recorded in every checkpoint, since a cursor is valid only with the filter it was issued under. */
|
|
69
|
+
readonly filter?: SyncFilter | undefined;
|
|
70
|
+
/** A checkpoint from an interrupted sync of the same model, scopes and filter: the sync carries on from it. */
|
|
71
|
+
readonly resume?: SyncCheckpoint | undefined;
|
|
72
|
+
/** Ends the sync between or during reads; what was written stays written. */
|
|
73
|
+
readonly signal?: AbortSignal | undefined;
|
|
74
|
+
/** Called after every page is written, with the progress so far. */
|
|
75
|
+
readonly onProgress?: ((progress: SyncProgress) => void) | undefined;
|
|
76
|
+
}
|
|
77
|
+
/** Thrown when a scope names a source no reader serves. */
|
|
78
|
+
declare class UnknownSourceError extends Error {
|
|
79
|
+
/** The source prefix no reader serves. */
|
|
80
|
+
readonly prefix: string;
|
|
81
|
+
/**
|
|
82
|
+
* @param prefix - The source prefix no reader serves.
|
|
83
|
+
*/
|
|
84
|
+
constructor(prefix: string);
|
|
85
|
+
}
|
|
86
|
+
/** Where a sync a source interrupted carries on, as data. */
|
|
87
|
+
interface SyncInterruption {
|
|
88
|
+
/** The checkpoint that continues the failing source: its prefix, after the cursor of the last page read from it, or from the start of its scopes when none was read. */
|
|
89
|
+
readonly resume: SyncCheckpoint;
|
|
90
|
+
/** The scopes of the sources after the failing one, which were not read. */
|
|
91
|
+
readonly remaining: readonly string[];
|
|
92
|
+
/** Whether this sync wrote any pages before the failure. */
|
|
93
|
+
readonly saved: boolean;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Thrown by `syncScopes` when a source fails while it is being read: opening its stream or reading a page. Its message is the source's, its cause is what the source threw, and where to carry on is data in `resume` and `remaining`. A failure of the store, or of the request itself (an unknown source, a malformed scope), is thrown as it is.
|
|
97
|
+
*/
|
|
98
|
+
declare class InterruptedSyncError extends Error implements SyncInterruption {
|
|
99
|
+
readonly resume: SyncCheckpoint;
|
|
100
|
+
readonly remaining: readonly string[];
|
|
101
|
+
readonly saved: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* @param interruption - Where the sync carries on.
|
|
104
|
+
* @param cause - What the source threw.
|
|
105
|
+
*/
|
|
106
|
+
constructor(interruption: SyncInterruption, cause: unknown);
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Reads the scopes from their sources page by page and merges each page into the stored model as soon as it is read: participants, bound activities, transitions, relations and run state. Progress is kept as it is made, so a sync that is cancelled, rate limited or interrupted leaves everything it read in the store, and a checkpoint to carry on from.
|
|
110
|
+
*
|
|
111
|
+
* A store rejects a write that leaves a transition or a relation naming an element or participant the model lacks, and a source may report a dependency or a sub-issue whose other end a later page brings. A transition or relation is therefore held back until the model has both of its ends, and written with the page that completes it. One whose end never arrives is written with the last page, where the store's rejection says which reference is missing.
|
|
112
|
+
* @param request - The store, sources, model, scopes, an optional filter and checkpoint, the signal and a progress listener.
|
|
113
|
+
* @returns The final progress, with no checkpoint.
|
|
114
|
+
* @throws InvalidScopeError for a scope that names no source; UnknownSourceError for a scope whose source no reader serves; an Error for a checkpoint naming a source none of the scopes use, and for a sync of no scopes; InterruptedSyncError, after the pages before it are written, when a source fails while it is read, an abort included; and whatever the store throws.
|
|
115
|
+
*/
|
|
116
|
+
declare const syncScopes: (request: SyncRequest) => Promise<SyncProgress>;
|
|
117
|
+
//#endregion
|
|
118
|
+
export { SyncRequest as a, syncScopes as c, SyncProgress as i, SyncCheckpoint as l, SourceLookup as n, SyncStore as o, SyncInterruption as r, UnknownSourceError as s, InterruptedSyncError as t, syncCheckpointSchema as u };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { A as Facts, B as Status, C as CriticalPath, _ as StatusRule, d as StatusExplanation, u as ChainLink } from "./index-D4CnOhNf.js";
|
|
2
2
|
import { K as IdSpace, S as Element, _ as Model, k as Projection, o as Overlay } from "./index-Dvz_I_uQ.js";
|
|
3
3
|
import { K as StoredModel, ut as GraphStoreClient } from "./index-CR8xUK3S.js";
|
|
4
|
-
import {
|
|
4
|
+
import { a as ProjectedView } from "./index-4f4PVH7K.js";
|
|
5
5
|
import { KeyboardEvent, ReactElement, ReactNode, RefCallback } from "react";
|
|
6
6
|
//#region ../../ui/graph/react/dist/run.d.ts
|
|
7
7
|
/**
|
|
@@ -114,25 +114,6 @@ declare const stepWeight: () => number;
|
|
|
114
114
|
declare const useCriticalPath: <I extends IdSpace>(run: Run<I>, weight?: (id: I["element"]) => number) => CriticalPath<I["element"]>;
|
|
115
115
|
//#endregion
|
|
116
116
|
//#region ../../ui/graph/react/dist/projection.d.ts
|
|
117
|
-
/** The view each projection notation produces. */
|
|
118
|
-
interface ViewsByNotation<I extends IdSpace> {
|
|
119
|
-
readonly flowchart: Flowchart<I>;
|
|
120
|
-
readonly swimlane: Swimlane<I>;
|
|
121
|
-
readonly stateMachine: StateMachine<I>;
|
|
122
|
-
readonly sequence: SequenceDiagram<I>;
|
|
123
|
-
}
|
|
124
|
-
/** A projection request together with the view it produced, discriminated by notation. */
|
|
125
|
-
type ProjectedView<I extends IdSpace> = { readonly [N in keyof ViewsByNotation<I>]: {
|
|
126
|
-
readonly notation: N;
|
|
127
|
-
readonly view: ViewsByNotation<I>[N];
|
|
128
|
-
}; }[keyof ViewsByNotation<I>];
|
|
129
|
-
/**
|
|
130
|
-
* Projects a model into the notation a projection names, with the input it records (a subject, a scenario).
|
|
131
|
-
* @param model - The model to project.
|
|
132
|
-
* @param projection - One of the model's declared projections, or one built the same way.
|
|
133
|
-
* @returns The notation and its view.
|
|
134
|
-
*/
|
|
135
|
-
declare const project: <I extends IdSpace>(model: Model<I>, projection: Projection<I>) => ProjectedView<I>;
|
|
136
117
|
/**
|
|
137
118
|
* A model's view in one notation, projected again only when the model or the projection changes.
|
|
138
119
|
* @param model - The model to project.
|
|
@@ -418,4 +399,4 @@ interface DetailPanelProps<I extends IdSpace> {
|
|
|
418
399
|
*/
|
|
419
400
|
declare const DetailPanel: <I extends IdSpace>(props: DetailPanelProps<I>) => ReactElement;
|
|
420
401
|
//#endregion
|
|
421
|
-
export {
|
|
402
|
+
export { useModel as $, ElementFilter as A, useElementFilter as B, ruleDescriptions as C, SelectionContainerProps as D, GraphSelectionOptions as E, emptyFilter as F, useBlockers as G, BlockedChain as H, filterElements as I, useReadySet as J, useCriticalPath as K, filterOptions as L, FilterOption as M, FilterOptions as N, SelectionItemProps as O, actorsOf as P, ModelState as Q, matchesFilter as R, elementLabel as S, GraphSelection as T, stepWeight as U, useProjection as V, useBlockedChain as W, useWhyStatus as X, useStatuses as Y, ModelClient as Z, ElementCardPart as _, FilterPanelPart as a, StatusBadge as b, LegendPart as c, LanePart as d, Run as et, LaneProps as f, ElementCard as g, TransitionItemProps as h, FilterPanel as i, ElementFilterState as j, useGraphSelection as k, LegendProps as l, TransitionItemPart as m, DetailPanelPart as n, FilterPanelProps as o, TransitionItem as p, useImpact as q, DetailPanelProps as r, Legend as s, DetailPanel as t, noFacts as tt, Lane as u, ElementCardProps as v, statusLabels as w, StatusBadgeProps as x, NamedElement as y, sourceScope as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { K as IdSpace, j as Views } from "./index-Dvz_I_uQ.js";
|
|
2
|
-
import {
|
|
2
|
+
import { N as Flowchart, k as Swimlane, w as StateMachine } from "./index-4f4PVH7K.js";
|
|
3
3
|
//#region ../../core/graph/layout/dist/engine.d.ts
|
|
4
4
|
/** A box with a fixed size, which the engine places. */
|
|
5
5
|
interface EngineLeaf {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { A as Facts, B as Status, C as CriticalPath, D as UnknownReference, E as NodeId, F as evaluateBranches, I as factNamesIn, L as factsFrom, M as artefactKey, N as elementStatusKey, O as buildDag, P as emptyFactRecord, R as layeredFacts, S as loopTransitions, T as Dag, V as statuses, _ as StatusRule, a as criticalPath, b as controlDag, c as unmetOutputs, d as StatusExplanation, f as explainStatus, g as StatusBasis, h as ProducerBasis, i as blockedBy, j as UnsupportedConditionError, k as FactRecord, l as whatIfDone, m as IncomingBasis, n as UnmetOutput, o as impact, p as ArtefactBasis, r as WhatIf, s as readySet, t as StatusChange, u as ChainLink, v as deriveStatuses, w as criticalPath$1, x as illegalCycles, y as statusRules, z as Branch } from "./index-D4CnOhNf.js";
|
|
2
2
|
import { A as Transition, B as fragmentOperators, C as EventDef, D as Participant, E as FragmentOperand, F as Notation, G as pseudoRoles, H as notations, I as OverlayStatus, K as IdSpace, L as ParticipantKind, M as ElementKind, N as FragmentOperator, O as Point, P as MessageMode, R as PseudoRole, S as Element, T as Fragment, U as overlayStatuses, V as messageModes, W as participantKinds, _ as Model, a as modelSchema, b as ActionDef, c as OverlayParseError, d as validateOverlay, f as Issue, g as outputsOf, h as inputsOf, i as ModelSchema, j as Views, k as Projection, l as overlaySchema, m as validate, n as ModelParseError, o as Overlay, p as IssueCode, q as OpenIds, r as parseModel, s as OverlayIssue, t as ModelIssue, u as parseOverlay, v as ModelParts, w as Extensions, x as ArtefactDef, y as defineModel, z as elementKinds } from "./index-Dvz_I_uQ.js";
|
|
3
|
-
import { A as
|
|
3
|
+
import { A as toSwimlane, C as toSequence, D as toStateMachine, E as StateMachineTransition, F as Handoff, I as handoffs, L as Loss, M as FlowNode, N as Flowchart, O as Lane, P as toFlowchart, R as UnrepresentedElement, S as SequenceOperand, T as StateMachineState, _ as applyModelDiff, a as ProjectedView, b as SequenceItem, c as Addressing, d as Ends, f as EventChange, g as UnconfirmedChangeError, h as TransitionFieldChange, i as diffSwimlane, j as FlowEdge, k as Swimlane, l as Change, m as TransitionChange, n as diffStateMachine, o as ViewsByNotation, p as ModelDiff, r as diffFlowchart, s as project, t as diffSequence, u as ElementChange, v as confirmChanges, w as StateMachine, x as SequenceMessage, y as SequenceDiagram, z as UnrepresentedKind } from "./index-4f4PVH7K.js";
|
|
4
|
+
import { a as flowchartToMermaid, c as swimlaneToMermaid, d as viewText, i as swimlaneToDot, l as ExportFormat, n as sequenceToDot, o as sequenceToMermaid, r as stateMachineToDot, s as stateMachineToMermaid, t as flowchartToDot, u as exportFormats } from "./index-Bb90VKMc.js";
|
|
4
5
|
//#region ../../core/graph/dag/dist/errors.d.ts
|
|
5
6
|
/**
|
|
6
7
|
* Thrown when an operation that is only defined on an acyclic graph is given one that contains a cycle.
|
|
@@ -108,4 +109,24 @@ declare namespace index_d_exports {
|
|
|
108
109
|
export { CriticalPath, CycleError, Dag, NodeId, TopologicalLayers, UnknownNodeError, UnknownReference, ancestorsOf, buildDag, criticalPath$1 as criticalPath, descendantsOf, findCycles, immediateDominators, stronglyConnectedComponents, topologicalLayers, transitiveReduction };
|
|
109
110
|
}
|
|
110
111
|
//#endregion
|
|
111
|
-
export
|
|
112
|
+
//#region ../../core/graph/export/dist/terminal-text.d.ts
|
|
113
|
+
/**
|
|
114
|
+
* Whether a character is one of the unsafe ones (see `unsafeCharacters`).
|
|
115
|
+
* @param character - One character: one code point, which may be two UTF-16 code units.
|
|
116
|
+
* @returns Whether it must be escaped.
|
|
117
|
+
*/
|
|
118
|
+
export declare const isUnsafeCharacter: (character: string) => boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Text made safe to write to a terminal. Each unsafe character (see `unsafeCharacters`) is written as the visible escape `\u{<hex>}` of its code point, such as `\u{1b}` for ESC, `\u{202e}` for a right-to-left override or `\u{e0041}` for a tag character, so nothing is lost and nothing acts on the terminal. Line feed, tab, the zero-width joiners and every other character, accented letters, CJK, Arabic and emoji included, pass through. A literal `\u{...}` already in the text is left as it is, so the escaped form is for reading, not for reversing.
|
|
121
|
+
* @param text - The text as written.
|
|
122
|
+
* @returns The text with every unsafe character escaped.
|
|
123
|
+
*/
|
|
124
|
+
export declare const terminalText: (text: string) => string;
|
|
125
|
+
/**
|
|
126
|
+
* A value as JSON that is also safe to write to a terminal. `JSON.stringify` escapes the C0 controls but writes every other unsafe character (see `unsafeCharacters`) as it is; this writes those as `\u` escapes too, a surrogate pair for a code point beyond the Basic Multilingual Plane, which leaves the JSON, and every value parsed from it, exactly the same.
|
|
127
|
+
* @param value - The value to write.
|
|
128
|
+
* @returns The JSON text, indented by two spaces and ending in a line break.
|
|
129
|
+
*/
|
|
130
|
+
export declare const terminalJson: (value: unknown) => string;
|
|
131
|
+
//#endregion
|
|
132
|
+
export { type ActionDef, type Addressing, type ArtefactBasis, type ArtefactDef, type Branch, type ChainLink, type Change, type Element, type ElementChange, type ElementKind, type Ends, type EventChange, type EventDef, type ExportFormat, type Extensions, type FactRecord, type Facts, type FlowEdge, type FlowNode, type Flowchart, type Fragment, type FragmentOperand, type FragmentOperator, type Handoff, type IdSpace, type IncomingBasis, type Issue, type IssueCode, type Lane, type Loss, type MessageMode, type Model, type ModelDiff, type ModelIssue, ModelParseError, type ModelParts, type ModelSchema, type Notation, type OpenIds, type Overlay, type OverlayIssue, OverlayParseError, type OverlayStatus, type Participant, type ParticipantKind, type Point, type ProducerBasis, type ProjectedView, type Projection, type PseudoRole, type SequenceDiagram, type SequenceItem, type SequenceMessage, type SequenceOperand, type StateMachine, type StateMachineState, type StateMachineTransition, type Status, type StatusBasis, type StatusChange, type StatusExplanation, type StatusRule, type Swimlane, type Transition, type TransitionChange, type TransitionFieldChange, UnconfirmedChangeError, type UnmetOutput, type UnrepresentedElement, type UnrepresentedKind, UnsupportedConditionError, type Views, type ViewsByNotation, type WhatIf, applyModelDiff, artefactKey, blockedBy, confirmChanges, controlDag, criticalPath, index_d_exports as dag, defineModel, deriveStatuses, diffFlowchart, diffSequence, diffStateMachine, diffSwimlane, elementKinds, elementStatusKey, emptyFactRecord, evaluateBranches, explainStatus, exportFormats, factNamesIn, factsFrom, flowchartToDot, flowchartToMermaid, fragmentOperators, handoffs, illegalCycles, impact, inputsOf, layeredFacts, loopTransitions, messageModes, modelSchema, notations, outputsOf, overlaySchema, overlayStatuses, parseModel, parseOverlay, participantKinds, project, pseudoRoles, readySet, sequenceToDot, sequenceToMermaid, stateMachineToDot, stateMachineToMermaid, statusRules, statuses, swimlaneToDot, swimlaneToMermaid, toFlowchart, toSequence, toStateMachine, toSwimlane, unmetOutputs, validate, validateOverlay, viewText, whatIfDone };
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
2
|
import { a as validateOverlay, c as fragmentOperators, d as overlayStatuses, f as participantKinds, i as parseOverlay, l as messageModes, n as OverlayParseError, p as pseudoRoles, r as overlaySchema, s as elementKinds, t as modelSchema, u as notations } from "./schema-BPT8fmfa.js";
|
|
3
3
|
import { t as validate } from "./validate-DF3mQZww.js";
|
|
4
|
-
import {
|
|
4
|
+
import { a as stateMachineToDot, c as sequenceToMermaid, d as isUnsafeCharacter, f as terminalJson, h as parseModel, i as sequenceToDot, l as stateMachineToMermaid, m as ModelParseError, n as viewText, o as swimlaneToDot, p as terminalText, r as flowchartToDot, s as flowchartToMermaid, t as exportFormats, u as swimlaneToMermaid } from "./view-DTeNUhGG.js";
|
|
5
5
|
import { _ as criticalPath$1, a as unmetOutputs, b as actorMap, c as deriveStatuses, d as stateMachineParts, f as toStateMachine, g as handoffs, h as toFlowchart, i as readySet, l as statusRules, m as flowchartParts, n as criticalPath, o as whatIfDone, p as toSwimlane, r as impact, s as explainStatus, t as blockedBy, u as toSequence, v as immediateDominators, y as topologicalLayers } from "./queries-C8kIDRiY.js";
|
|
6
6
|
import { S as UnknownNodeError, _ as descendantsOf, a as artefactKey, b as lookup, c as evaluateBranches, f as layeredFacts, g as ancestorsOf, h as stronglyConnectedComponents, i as UnsupportedConditionError, l as factNamesIn, m as findCycles, n as illegalCycles, o as elementStatusKey, p as assertAcyclic, r as loopTransitions, s as emptyFactRecord, t as controlDag, u as factsFrom, v as assembleDag, x as CycleError, y as buildDag } from "./control-DiygoEhm.js";
|
|
7
|
+
import { t as project } from "./project-CP_ye6KI.js";
|
|
7
8
|
import { t as statuses } from "./status-Bm1CGu9C.js";
|
|
8
9
|
//#region ../../core/graph/schema/dist/artefacts.js
|
|
9
10
|
/**
|
|
@@ -926,4 +927,4 @@ const diffSequence = (model, scenario, edited) => {
|
|
|
926
927
|
};
|
|
927
928
|
};
|
|
928
929
|
//#endregion
|
|
929
|
-
export { ModelParseError, OverlayParseError, UnconfirmedChangeError, UnsupportedConditionError, applyModelDiff, artefactKey, blockedBy, confirmChanges, controlDag, criticalPath, dist_exports as dag, defineModel, deriveStatuses, diffFlowchart, diffSequence, diffStateMachine, diffSwimlane, elementKinds, elementStatusKey, emptyFactRecord, evaluateBranches, explainStatus, factNamesIn, factsFrom, fragmentOperators, handoffs, illegalCycles, impact, inputsOf, layeredFacts, loopTransitions, messageModes, modelSchema, notations, outputsOf, overlaySchema, overlayStatuses, parseModel, parseOverlay, participantKinds, pseudoRoles, readySet, statusRules, statuses, toFlowchart, toSequence, toStateMachine, toSwimlane, unmetOutputs, validate, validateOverlay, whatIfDone };
|
|
930
|
+
export { ModelParseError, OverlayParseError, UnconfirmedChangeError, UnsupportedConditionError, applyModelDiff, artefactKey, blockedBy, confirmChanges, controlDag, criticalPath, dist_exports as dag, defineModel, deriveStatuses, diffFlowchart, diffSequence, diffStateMachine, diffSwimlane, elementKinds, elementStatusKey, emptyFactRecord, evaluateBranches, explainStatus, exportFormats, factNamesIn, factsFrom, flowchartToDot, flowchartToMermaid, fragmentOperators, handoffs, illegalCycles, impact, inputsOf, isUnsafeCharacter, layeredFacts, loopTransitions, messageModes, modelSchema, notations, outputsOf, overlaySchema, overlayStatuses, parseModel, parseOverlay, participantKinds, project, pseudoRoles, readySet, sequenceToDot, sequenceToMermaid, stateMachineToDot, stateMachineToMermaid, statusRules, statuses, swimlaneToDot, swimlaneToMermaid, terminalJson, terminalText, toFlowchart, toSequence, toStateMachine, toSwimlane, unmetOutputs, validate, validateOverlay, viewText, whatIfDone };
|
package/dist/layout.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as layout, c as EngineBox, d as EngineGroup, f as EngineLeaf, i as LayoutView, l as EngineEdge, m as LayoutEngine, n as LayoutOptions, o as Size, p as EngineNode, r as LayoutResult, s as Direction, t as LaneBounds, u as EngineGraph } from "./index-
|
|
1
|
+
import { a as layout, c as EngineBox, d as EngineGroup, f as EngineLeaf, i as LayoutView, l as EngineEdge, m as LayoutEngine, n as LayoutOptions, o as Size, p as EngineNode, r as LayoutResult, s as Direction, t as LaneBounds, u as EngineGraph } from "./index-RwwlDYZ7.js";
|
|
2
2
|
//#region ../../core/graph/layout/dist/elk-engine.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* The default engine: elkjs's layered algorithm, run in the calling context from the bundled build so it needs neither a Worker nor Node-only modules. Groups are laid out together with their children (`INCLUDE_CHILDREN`), so an edge between lanes takes part in layer assignment.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { f as toStateMachine, h as toFlowchart, p as toSwimlane, u as toSequence } from "./queries-C8kIDRiY.js";
|
|
2
|
+
//#region ../../core/graph/projection/dist/project.js
|
|
3
|
+
/**
|
|
4
|
+
* Projects a model into the notation a projection names, with the input it records (a subject, a scenario).
|
|
5
|
+
* @param model - The model to project.
|
|
6
|
+
* @param projection - One of the model's declared projections, or one built the same way.
|
|
7
|
+
* @returns The notation and its view.
|
|
8
|
+
*/
|
|
9
|
+
const project = (model, projection) => {
|
|
10
|
+
if (projection.notation === "stateMachine") return {
|
|
11
|
+
notation: "stateMachine",
|
|
12
|
+
view: toStateMachine(model, projection.subject)
|
|
13
|
+
};
|
|
14
|
+
if (projection.notation === "sequence") return {
|
|
15
|
+
notation: "sequence",
|
|
16
|
+
view: toSequence(model, projection.scenario)
|
|
17
|
+
};
|
|
18
|
+
return projection.notation === "swimlane" ? {
|
|
19
|
+
notation: "swimlane",
|
|
20
|
+
view: toSwimlane(model)
|
|
21
|
+
} : {
|
|
22
|
+
notation: "flowchart",
|
|
23
|
+
view: toFlowchart(model)
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { project as t };
|
package/dist/react-flow.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { B as Status } from "./index-D4CnOhNf.js";
|
|
2
2
|
import { K as IdSpace, S as Element, _ as Model, k as Projection } from "./index-Dvz_I_uQ.js";
|
|
3
|
-
import {
|
|
4
|
-
import { i as LayoutView, n as LayoutOptions, r as LayoutResult, s as Direction } from "./index-
|
|
5
|
-
import { A as ElementFilter,
|
|
3
|
+
import { N as Flowchart, k as Swimlane, w as StateMachine } from "./index-4f4PVH7K.js";
|
|
4
|
+
import { i as LayoutView, n as LayoutOptions, r as LayoutResult, s as Direction } from "./index-RwwlDYZ7.js";
|
|
5
|
+
import { A as ElementFilter, et as Run, y as NamedElement } from "./index-LWdwpjZG.js";
|
|
6
6
|
import { ReactElement } from "react";
|
|
7
7
|
import { ColorMode, Edge, EdgeProps, Node, NodeProps } from "@xyflow/react";
|
|
8
8
|
//#region ../../ui/graph/react-flow/dist/use-layout.d.ts
|
package/dist/react.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as ProjectedView, o as ViewsByNotation, s as project } from "./index-4f4PVH7K.js";
|
|
2
|
+
import { $ as useModel, A as ElementFilter, B as useElementFilter, C as ruleDescriptions, D as SelectionContainerProps, E as GraphSelectionOptions, F as emptyFilter, G as useBlockers, H as BlockedChain, I as filterElements, J as useReadySet, K as useCriticalPath, L as filterOptions, M as FilterOption, N as FilterOptions, O as SelectionItemProps, P as actorsOf, Q as ModelState, R as matchesFilter, S as elementLabel, T as GraphSelection, U as stepWeight, V as useProjection, W as useBlockedChain, X as useWhyStatus, Y as useStatuses, Z as ModelClient, _ as ElementCardPart, a as FilterPanelPart, b as StatusBadge, c as LegendPart, d as LanePart, et as Run, f as LaneProps, g as ElementCard, h as TransitionItemProps, i as FilterPanel, j as ElementFilterState, k as useGraphSelection, l as LegendProps, m as TransitionItemPart, n as DetailPanelPart, o as FilterPanelProps, p as TransitionItem, q as useImpact, r as DetailPanelProps, s as Legend, t as DetailPanel, tt as noFacts, u as Lane, v as ElementCardProps, w as statusLabels, x as StatusBadgeProps, y as NamedElement, z as sourceScope } from "./index-LWdwpjZG.js";
|
|
2
3
|
export { type BlockedChain, DetailPanel, type DetailPanelPart, type DetailPanelProps, ElementCard, type ElementCardPart, type ElementCardProps, type ElementFilter, type ElementFilterState, type FilterOption, type FilterOptions, FilterPanel, type FilterPanelPart, type FilterPanelProps, type GraphSelection, type GraphSelectionOptions, Lane, type LanePart, type LaneProps, Legend, type LegendPart, type LegendProps, type ModelClient, type ModelState, type NamedElement, type ProjectedView, type Run, type SelectionContainerProps, type SelectionItemProps, StatusBadge, type StatusBadgeProps, TransitionItem, type TransitionItemPart, type TransitionItemProps, type ViewsByNotation, actorsOf, elementLabel, emptyFilter, filterElements, filterOptions, matchesFilter, noFacts, project, ruleDescriptions, sourceScope, statusLabels, stepWeight, useBlockedChain, useBlockers, useCriticalPath, useElementFilter, useGraphSelection, useImpact, useModel, useProjection, useReadySet, useStatuses, useWhyStatus };
|
package/dist/react.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as project } from "./project-CP_ye6KI.js";
|
|
2
2
|
import { a as filterOptions, c as useElementFilter, d as useBlockers, f as useCriticalPath, g as useWhyStatus, h as useStatuses, i as filterElements, l as stepWeight, m as useReadySet, n as actorsOf, o as matchesFilter, p as useImpact, r as emptyFilter, s as sourceScope, t as useGraphSelection, u as useBlockedChain } from "./selection-iet5RAlP.js";
|
|
3
3
|
import { a as TransitionItem, c as elementLabel, i as Lane, l as ruleDescriptions, n as FilterPanel, o as ElementCard, r as Legend, s as StatusBadge, t as DetailPanel, u as statusLabels } from "./detail-panel-B1ZmMuJT.js";
|
|
4
4
|
import { ORPCError } from "@orpc/client";
|
|
@@ -73,29 +73,6 @@ const useModel = (client, modelId) => {
|
|
|
73
73
|
//#endregion
|
|
74
74
|
//#region ../../ui/graph/react/dist/projection.js
|
|
75
75
|
/**
|
|
76
|
-
* Projects a model into the notation a projection names, with the input it records (a subject, a scenario).
|
|
77
|
-
* @param model - The model to project.
|
|
78
|
-
* @param projection - One of the model's declared projections, or one built the same way.
|
|
79
|
-
* @returns The notation and its view.
|
|
80
|
-
*/
|
|
81
|
-
const project = (model, projection) => {
|
|
82
|
-
if (projection.notation === "stateMachine") return {
|
|
83
|
-
notation: "stateMachine",
|
|
84
|
-
view: toStateMachine(model, projection.subject)
|
|
85
|
-
};
|
|
86
|
-
if (projection.notation === "sequence") return {
|
|
87
|
-
notation: "sequence",
|
|
88
|
-
view: toSequence(model, projection.scenario)
|
|
89
|
-
};
|
|
90
|
-
return projection.notation === "swimlane" ? {
|
|
91
|
-
notation: "swimlane",
|
|
92
|
-
view: toSwimlane(model)
|
|
93
|
-
} : {
|
|
94
|
-
notation: "flowchart",
|
|
95
|
-
view: toFlowchart(model)
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
|
-
/**
|
|
99
76
|
* A model's view in one notation, projected again only when the model or the projection changes.
|
|
100
77
|
* @param model - The model to project.
|
|
101
78
|
* @param projection - The projection to draw. Keep it stable between renders, for instance one of `model.projections`.
|