@cardenelabs/dragon 0.42.1 → 0.43.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 +34 -1
- package/dist/cli.cjs +1732 -501
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +1732 -501
- package/dist/cli.js.map +1 -1
- package/dist/export.cjs +1635 -496
- 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 +1635 -496
- package/dist/export.js.map +1 -1
- package/dist/index.cjs +1651 -417
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +66 -3
- package/dist/index.d.ts +66 -3
- package/dist/index.js +1651 -417
- package/dist/index.js.map +1 -1
- package/dist/{ink-B8EZL7JV.d.cts → ink-B6s_SMXG.d.cts} +23 -3
- package/dist/{ink-B8EZL7JV.d.ts → ink-B6s_SMXG.d.ts} +23 -3
- package/dist/node.cjs +1102 -475
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +1102 -475
- package/dist/node.js.map +1 -1
- package/dist/player.global.js +3 -2
- package/package.json +1 -1
- package/src/export/fonts.ts +13 -6
- package/src/index.ts +4 -1
- package/src/layout/tree.ts +458 -0
- package/src/look/values.ts +42 -0
- package/src/messages.ts +34 -2
- package/src/parser.ts +89 -1
- package/src/printer.ts +6 -1
- package/src/render/icons.ts +2 -0
- package/src/render/svg.ts +41 -3
- package/src/render/tree.ts +164 -0
- package/src/schema.ts +27 -3
- package/src/schemas/diagram.schema.json +79 -14
- package/src/schemas/validate-diagram.js +1 -1
- package/src/timeline.ts +2 -2
- package/src/words.ts +12 -2
|
@@ -36,6 +36,11 @@ type Colors = Partial<Record<ColorName, string>>;
|
|
|
36
36
|
/** 区画や箱を分ける色の役。灰 (slate) と硬貨 (coin) は分類の色として順に配らない。 */
|
|
37
37
|
declare const COLOR_ORDER: readonly ["blue", "amber", "green", "violet", "rose"];
|
|
38
38
|
type ColorKey = (typeof COLOR_ORDER)[number] | "slate" | "coin";
|
|
39
|
+
interface TextStyle {
|
|
40
|
+
size: number;
|
|
41
|
+
weight: number;
|
|
42
|
+
family: Family;
|
|
43
|
+
}
|
|
39
44
|
/** 見せ方を決める字の大きさ。全体を枠に収めた時の箱の名前がこれを下回ると寄って追う。 */
|
|
40
45
|
declare const READABLE_PX = 10.5;
|
|
41
46
|
|
|
@@ -114,7 +119,7 @@ type DiagramEvent = {
|
|
|
114
119
|
} | {
|
|
115
120
|
type: "now";
|
|
116
121
|
to: number;
|
|
117
|
-
} | TimeMarkEvent | TimeSpanEvent;
|
|
122
|
+
} | TimeMarkEvent | TimeSpanEvent | TreeLeaf | TreeNode;
|
|
118
123
|
/** 時間軸の図 (#3165) の、印の列 `row` の `from` から `to` の目盛りの印の色を変える出来事 */
|
|
119
124
|
interface TimeMarkEvent {
|
|
120
125
|
type: "mark";
|
|
@@ -187,6 +192,21 @@ interface GitCommit {
|
|
|
187
192
|
hash?: string;
|
|
188
193
|
note?: string;
|
|
189
194
|
}
|
|
195
|
+
/**
|
|
196
|
+
* 木の図 (#3233) の葉を出す出来事。書いた段で葉の箱が現れる。`hash` を書くと箱に値を出し、名札を葉の下の札に出す
|
|
197
|
+
*/
|
|
198
|
+
interface TreeLeaf {
|
|
199
|
+
type: "leaf";
|
|
200
|
+
id: string;
|
|
201
|
+
hash?: string;
|
|
202
|
+
}
|
|
203
|
+
/** 木の図の、1 つ以上の子から親を組む出来事。書いた段で親の箱と、子から親への木の線が現れる */
|
|
204
|
+
interface TreeNode {
|
|
205
|
+
type: "node";
|
|
206
|
+
id: string;
|
|
207
|
+
children: string[];
|
|
208
|
+
hash?: string;
|
|
209
|
+
}
|
|
190
210
|
/** 枝分かれの図の枝。上から宣言した順に帯を並べる */
|
|
191
211
|
interface GitBranch {
|
|
192
212
|
id: string;
|
|
@@ -213,7 +233,7 @@ interface Step {
|
|
|
213
233
|
}
|
|
214
234
|
interface Diagram {
|
|
215
235
|
version: number;
|
|
216
|
-
kind: "sequence" | "architecture" | "state" | "git" | "time";
|
|
236
|
+
kind: "sequence" | "architecture" | "state" | "git" | "time" | "tree";
|
|
217
237
|
title: string;
|
|
218
238
|
view?: ViewMode;
|
|
219
239
|
regions?: Region[];
|
|
@@ -449,4 +469,4 @@ type Overlap = {
|
|
|
449
469
|
*/
|
|
450
470
|
declare function describeOverlap(overlap: Overlap, lang?: NotationLang): string;
|
|
451
471
|
|
|
452
|
-
export { type
|
|
472
|
+
export { type TimeSpanEvent as $, type SceneRegion as A, type Box as B, type CheckOptions as C, type Diagram as D, type SceneSide as E, type FieldError as F, type GitBranch as G, type SceneStrip as H, type InkPart as I, type SceneTrail as J, type StatePath as K, type Layout as L, type Step as M, type NotationLang as N, type Overlap as O, type Point as P, type StepSource as Q, type Rect as R, type SceneBox as S, type Theme as T, type StripMeter as U, type ViewMode as V, type TimeMarkEvent as W, type TimePeriod as X, type TimePoint as Y, type TimeRow as Z, type TimeScale as _, type ColorKey as a, type TimeSpec as a0, type TreeLeaf as a1, type TreeNode as a2, describeOverlap as a3, resolvePalette as a4, validateDiagram as a5, type TextStyle as b, type Colors as c, type Carry as d, type Checked as e, type Color as f, type ColorName as g, DEFAULT_PALETTE as h, type DiagramEvent as i, FONTS as j, type Family as k, type GitCommit as l, type LabelSide as m, type OverlapSpot as n, PALETTES as o, type Palette as p, READABLE_PX as q, type Region as r, type SceneAction as s, type SceneBadge as t, type SceneEdge as u, type SceneEnd as v, type SceneField as w, type SceneLabel as x, type SceneLifeline as y, type ScenePath as z };
|
|
@@ -36,6 +36,11 @@ type Colors = Partial<Record<ColorName, string>>;
|
|
|
36
36
|
/** 区画や箱を分ける色の役。灰 (slate) と硬貨 (coin) は分類の色として順に配らない。 */
|
|
37
37
|
declare const COLOR_ORDER: readonly ["blue", "amber", "green", "violet", "rose"];
|
|
38
38
|
type ColorKey = (typeof COLOR_ORDER)[number] | "slate" | "coin";
|
|
39
|
+
interface TextStyle {
|
|
40
|
+
size: number;
|
|
41
|
+
weight: number;
|
|
42
|
+
family: Family;
|
|
43
|
+
}
|
|
39
44
|
/** 見せ方を決める字の大きさ。全体を枠に収めた時の箱の名前がこれを下回ると寄って追う。 */
|
|
40
45
|
declare const READABLE_PX = 10.5;
|
|
41
46
|
|
|
@@ -114,7 +119,7 @@ type DiagramEvent = {
|
|
|
114
119
|
} | {
|
|
115
120
|
type: "now";
|
|
116
121
|
to: number;
|
|
117
|
-
} | TimeMarkEvent | TimeSpanEvent;
|
|
122
|
+
} | TimeMarkEvent | TimeSpanEvent | TreeLeaf | TreeNode;
|
|
118
123
|
/** 時間軸の図 (#3165) の、印の列 `row` の `from` から `to` の目盛りの印の色を変える出来事 */
|
|
119
124
|
interface TimeMarkEvent {
|
|
120
125
|
type: "mark";
|
|
@@ -187,6 +192,21 @@ interface GitCommit {
|
|
|
187
192
|
hash?: string;
|
|
188
193
|
note?: string;
|
|
189
194
|
}
|
|
195
|
+
/**
|
|
196
|
+
* 木の図 (#3233) の葉を出す出来事。書いた段で葉の箱が現れる。`hash` を書くと箱に値を出し、名札を葉の下の札に出す
|
|
197
|
+
*/
|
|
198
|
+
interface TreeLeaf {
|
|
199
|
+
type: "leaf";
|
|
200
|
+
id: string;
|
|
201
|
+
hash?: string;
|
|
202
|
+
}
|
|
203
|
+
/** 木の図の、1 つ以上の子から親を組む出来事。書いた段で親の箱と、子から親への木の線が現れる */
|
|
204
|
+
interface TreeNode {
|
|
205
|
+
type: "node";
|
|
206
|
+
id: string;
|
|
207
|
+
children: string[];
|
|
208
|
+
hash?: string;
|
|
209
|
+
}
|
|
190
210
|
/** 枝分かれの図の枝。上から宣言した順に帯を並べる */
|
|
191
211
|
interface GitBranch {
|
|
192
212
|
id: string;
|
|
@@ -213,7 +233,7 @@ interface Step {
|
|
|
213
233
|
}
|
|
214
234
|
interface Diagram {
|
|
215
235
|
version: number;
|
|
216
|
-
kind: "sequence" | "architecture" | "state" | "git" | "time";
|
|
236
|
+
kind: "sequence" | "architecture" | "state" | "git" | "time" | "tree";
|
|
217
237
|
title: string;
|
|
218
238
|
view?: ViewMode;
|
|
219
239
|
regions?: Region[];
|
|
@@ -449,4 +469,4 @@ type Overlap = {
|
|
|
449
469
|
*/
|
|
450
470
|
declare function describeOverlap(overlap: Overlap, lang?: NotationLang): string;
|
|
451
471
|
|
|
452
|
-
export { type
|
|
472
|
+
export { type TimeSpanEvent as $, type SceneRegion as A, type Box as B, type CheckOptions as C, type Diagram as D, type SceneSide as E, type FieldError as F, type GitBranch as G, type SceneStrip as H, type InkPart as I, type SceneTrail as J, type StatePath as K, type Layout as L, type Step as M, type NotationLang as N, type Overlap as O, type Point as P, type StepSource as Q, type Rect as R, type SceneBox as S, type Theme as T, type StripMeter as U, type ViewMode as V, type TimeMarkEvent as W, type TimePeriod as X, type TimePoint as Y, type TimeRow as Z, type TimeScale as _, type ColorKey as a, type TimeSpec as a0, type TreeLeaf as a1, type TreeNode as a2, describeOverlap as a3, resolvePalette as a4, validateDiagram as a5, type TextStyle as b, type Colors as c, type Carry as d, type Checked as e, type Color as f, type ColorName as g, DEFAULT_PALETTE as h, type DiagramEvent as i, FONTS as j, type Family as k, type GitCommit as l, type LabelSide as m, type OverlapSpot as n, PALETTES as o, type Palette as p, READABLE_PX as q, type Region as r, type SceneAction as s, type SceneBadge as t, type SceneEdge as u, type SceneEnd as v, type SceneField as w, type SceneLabel as x, type SceneLifeline as y, type ScenePath as z };
|