@cardenelabs/dragon 0.39.0 → 0.41.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 +39 -1
- package/dist/cli.cjs +1921 -429
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +1926 -434
- package/dist/cli.js.map +1 -1
- package/dist/export.cjs +1718 -353
- package/dist/export.cjs.map +1 -1
- package/dist/export.d.cts +1 -1
- package/dist/export.d.ts +1 -1
- package/dist/export.js +1723 -358
- package/dist/export.js.map +1 -1
- package/dist/index.cjs +1835 -342
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -15
- package/dist/index.d.ts +5 -15
- package/dist/index.js +1836 -342
- package/dist/index.js.map +1 -1
- package/dist/{ink-Cg-v6XSG.d.cts → ink-B_7OXxtb.d.cts} +27 -2
- package/dist/{ink-Cg-v6XSG.d.ts → ink-B_7OXxtb.d.ts} +27 -2
- package/dist/node.cjs +2946 -0
- package/dist/node.cjs.map +1 -0
- package/dist/node.d.cts +9 -0
- package/dist/node.d.ts +9 -0
- package/dist/node.js +2944 -0
- package/dist/node.js.map +1 -0
- package/dist/player.global.js +2 -2
- package/package.json +11 -1
- package/src/field-messages.ts +8 -0
- package/src/index.ts +5 -2
- package/src/layout/git.ts +728 -0
- package/src/look/values.ts +40 -1
- package/src/messages.ts +47 -4
- package/src/node.ts +23 -0
- package/src/parser.ts +142 -7
- package/src/printer.ts +16 -4
- package/src/render/git.ts +161 -0
- package/src/render/parts.ts +1 -1
- package/src/render/svg.ts +26 -1
- package/src/schema.ts +47 -13
- package/src/schemas/diagram.schema.json +75 -8
- package/src/schemas/validate-diagram.js +1 -1
- package/src/timeline.ts +18 -3
- package/src/version.ts +1 -20
- package/src/words.ts +19 -3
|
@@ -93,7 +93,29 @@ type DiagramEvent = {
|
|
|
93
93
|
field: string;
|
|
94
94
|
value?: string;
|
|
95
95
|
tag?: string;
|
|
96
|
+
} | GitCommit | {
|
|
97
|
+
type: "branch";
|
|
98
|
+
branch: string;
|
|
99
|
+
from: string;
|
|
96
100
|
};
|
|
101
|
+
/**
|
|
102
|
+
* 枝分かれの図 (#3164) の commit を積む出来事。積んだ枝の札と、その枝を指す HEAD が新しい commit へ進む。
|
|
103
|
+
* 当て直し (`copy`) は枝の札を動かさず、merge commit (`merge`) は取り込む枝の先端も親に持つ
|
|
104
|
+
*/
|
|
105
|
+
interface GitCommit {
|
|
106
|
+
type: "commit";
|
|
107
|
+
id: string;
|
|
108
|
+
branch: string;
|
|
109
|
+
copy?: string;
|
|
110
|
+
merge?: string;
|
|
111
|
+
hash?: string;
|
|
112
|
+
note?: string;
|
|
113
|
+
}
|
|
114
|
+
/** 枝分かれの図の枝。上から宣言した順に帯を並べる */
|
|
115
|
+
interface GitBranch {
|
|
116
|
+
id: string;
|
|
117
|
+
note?: string;
|
|
118
|
+
}
|
|
97
119
|
/** 状態遷移図の、最初の段より前に書いた移れる道。`from` に `start`、`to` に `finish` を書ける */
|
|
98
120
|
interface StatePath {
|
|
99
121
|
from: string;
|
|
@@ -108,7 +130,7 @@ interface Step {
|
|
|
108
130
|
}
|
|
109
131
|
interface Diagram {
|
|
110
132
|
version: number;
|
|
111
|
-
kind: "sequence" | "architecture" | "state";
|
|
133
|
+
kind: "sequence" | "architecture" | "state" | "git";
|
|
112
134
|
title: string;
|
|
113
135
|
view?: ViewMode;
|
|
114
136
|
regions?: Region[];
|
|
@@ -124,6 +146,9 @@ interface Diagram {
|
|
|
124
146
|
state?: {
|
|
125
147
|
paths: StatePath[];
|
|
126
148
|
};
|
|
149
|
+
git?: {
|
|
150
|
+
branches: GitBranch[];
|
|
151
|
+
};
|
|
127
152
|
}
|
|
128
153
|
interface FieldError {
|
|
129
154
|
/** 誤った欄の場所 (JSON Pointer) */
|
|
@@ -332,4 +357,4 @@ type Overlap = {
|
|
|
332
357
|
*/
|
|
333
358
|
declare function describeOverlap(overlap: Overlap, lang?: NotationLang): string;
|
|
334
359
|
|
|
335
|
-
export { type
|
|
360
|
+
export { type SceneTrail as A, type Box as B, type CheckOptions as C, type Diagram as D, type StatePath as E, type FieldError as F, type GitBranch as G, type Step as H, type InkPart as I, describeOverlap as J, resolvePalette as K, type Layout as L, validateDiagram as M, type NotationLang as N, type Overlap as O, PALETTES as P, type Rect as R, type SceneAction as S, type Theme as T, type ViewMode as V, type Carry as a, type Checked as b, type Color as c, type ColorKey as d, DEFAULT_PALETTE as e, type DiagramEvent as f, FONTS as g, type Family as h, type GitCommit as i, type LabelSide as j, type OverlapSpot as k, type Palette as l, type Point as m, READABLE_PX as n, type Region as o, type SceneBadge as p, type SceneBox as q, type SceneEdge as r, type SceneEnd as s, type SceneField as t, type SceneLabel as u, type SceneLifeline as v, type ScenePath as w, type SceneRegion as x, type SceneSide as y, type SceneStrip as z };
|
|
@@ -93,7 +93,29 @@ type DiagramEvent = {
|
|
|
93
93
|
field: string;
|
|
94
94
|
value?: string;
|
|
95
95
|
tag?: string;
|
|
96
|
+
} | GitCommit | {
|
|
97
|
+
type: "branch";
|
|
98
|
+
branch: string;
|
|
99
|
+
from: string;
|
|
96
100
|
};
|
|
101
|
+
/**
|
|
102
|
+
* 枝分かれの図 (#3164) の commit を積む出来事。積んだ枝の札と、その枝を指す HEAD が新しい commit へ進む。
|
|
103
|
+
* 当て直し (`copy`) は枝の札を動かさず、merge commit (`merge`) は取り込む枝の先端も親に持つ
|
|
104
|
+
*/
|
|
105
|
+
interface GitCommit {
|
|
106
|
+
type: "commit";
|
|
107
|
+
id: string;
|
|
108
|
+
branch: string;
|
|
109
|
+
copy?: string;
|
|
110
|
+
merge?: string;
|
|
111
|
+
hash?: string;
|
|
112
|
+
note?: string;
|
|
113
|
+
}
|
|
114
|
+
/** 枝分かれの図の枝。上から宣言した順に帯を並べる */
|
|
115
|
+
interface GitBranch {
|
|
116
|
+
id: string;
|
|
117
|
+
note?: string;
|
|
118
|
+
}
|
|
97
119
|
/** 状態遷移図の、最初の段より前に書いた移れる道。`from` に `start`、`to` に `finish` を書ける */
|
|
98
120
|
interface StatePath {
|
|
99
121
|
from: string;
|
|
@@ -108,7 +130,7 @@ interface Step {
|
|
|
108
130
|
}
|
|
109
131
|
interface Diagram {
|
|
110
132
|
version: number;
|
|
111
|
-
kind: "sequence" | "architecture" | "state";
|
|
133
|
+
kind: "sequence" | "architecture" | "state" | "git";
|
|
112
134
|
title: string;
|
|
113
135
|
view?: ViewMode;
|
|
114
136
|
regions?: Region[];
|
|
@@ -124,6 +146,9 @@ interface Diagram {
|
|
|
124
146
|
state?: {
|
|
125
147
|
paths: StatePath[];
|
|
126
148
|
};
|
|
149
|
+
git?: {
|
|
150
|
+
branches: GitBranch[];
|
|
151
|
+
};
|
|
127
152
|
}
|
|
128
153
|
interface FieldError {
|
|
129
154
|
/** 誤った欄の場所 (JSON Pointer) */
|
|
@@ -332,4 +357,4 @@ type Overlap = {
|
|
|
332
357
|
*/
|
|
333
358
|
declare function describeOverlap(overlap: Overlap, lang?: NotationLang): string;
|
|
334
359
|
|
|
335
|
-
export { type
|
|
360
|
+
export { type SceneTrail as A, type Box as B, type CheckOptions as C, type Diagram as D, type StatePath as E, type FieldError as F, type GitBranch as G, type Step as H, type InkPart as I, describeOverlap as J, resolvePalette as K, type Layout as L, validateDiagram as M, type NotationLang as N, type Overlap as O, PALETTES as P, type Rect as R, type SceneAction as S, type Theme as T, type ViewMode as V, type Carry as a, type Checked as b, type Color as c, type ColorKey as d, DEFAULT_PALETTE as e, type DiagramEvent as f, FONTS as g, type Family as h, type GitCommit as i, type LabelSide as j, type OverlapSpot as k, type Palette as l, type Point as m, READABLE_PX as n, type Region as o, type SceneBadge as p, type SceneBox as q, type SceneEdge as r, type SceneEnd as s, type SceneField as t, type SceneLabel as u, type SceneLifeline as v, type ScenePath as w, type SceneRegion as x, type SceneSide as y, type SceneStrip as z };
|