@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
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as NotationLang, D as Diagram, F as FieldError, C as CheckOptions, T as Theme, V as ViewMode, L as Layout, O as Overlap, R as Rect } from './ink-
|
|
2
|
-
export { B as Box, a as Carry, b as Checked, c as Color, d as ColorKey, e as DEFAULT_PALETTE, f as DiagramEvent, g as FONTS, h as Family, I as InkPart,
|
|
1
|
+
import { N as NotationLang, D as Diagram, F as FieldError, C as CheckOptions, T as Theme, V as ViewMode, L as Layout, O as Overlap, R as Rect } from './ink-B_7OXxtb.cjs';
|
|
2
|
+
export { B as Box, a as Carry, b as Checked, c as Color, d as ColorKey, e as DEFAULT_PALETTE, f as DiagramEvent, g as FONTS, h as Family, G as GitBranch, i as GitCommit, I as InkPart, j as LabelSide, k as OverlapSpot, P as PALETTES, l as Palette, m as Point, n as READABLE_PX, o as Region, S as SceneAction, p as SceneBadge, q as SceneBox, r as SceneEdge, s as SceneEnd, t as SceneField, u as SceneLabel, v as SceneLifeline, w as ScenePath, x as SceneRegion, y as SceneSide, z as SceneStrip, A as SceneTrail, E as StatePath, H as Step, J as describeOverlap, K as resolvePalette, M as validateDiagram } from './ink-B_7OXxtb.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Markdown の中の dragon の囲み (```dragon) を、囲みごとに取り出す。
|
|
@@ -45,6 +45,7 @@ declare function parseNotation(notation: string, options?: ParseOptions): Parsed
|
|
|
45
45
|
* 箱は JSON の並びのまま書き、同じ区画の箱が続く所を 1 つの `group … end` にする。
|
|
46
46
|
* 区画の箱が飛び飛びの時は同じ `group` を開き直す。区画の並びが箱の現れる順と違う時と、
|
|
47
47
|
* 箱の無い区画がある時は、先に全ての区画を中の無い `group … end` で宣言してから開き直す。
|
|
48
|
+
* 枝分かれの図 (#3164) は、枝の `branch` の行を箱より前に書き、札を動かす線の運ぶ物が送る側の名前の札なら書かない。
|
|
48
49
|
*/
|
|
49
50
|
|
|
50
51
|
declare function printNotation(diagram: Diagram): string;
|
|
@@ -59,26 +60,15 @@ type Read = {
|
|
|
59
60
|
ok: false;
|
|
60
61
|
errors: FieldError[];
|
|
61
62
|
};
|
|
62
|
-
interface Migrated {
|
|
63
|
-
changed: boolean;
|
|
64
|
-
from: number;
|
|
65
|
-
to: number;
|
|
66
|
-
}
|
|
67
63
|
/** 原本を読む。道具より新しい版は描かずに断り、形の誤りは検査の誤りとして返す。誤りの文は `options.lang` (渡さなければ日本語) で出す。 */
|
|
68
64
|
declare function readDiagram(input: unknown, options?: CheckOptions): Read;
|
|
69
|
-
/**
|
|
70
|
-
* 原本の file を今の版へ移す。今の版の file には触れない。
|
|
71
|
-
*
|
|
72
|
-
* file を読むので、画面で描く入口からは呼ばない。node の file の命令は呼んだ時に初めて読み込む。
|
|
73
|
-
*/
|
|
74
|
-
declare function migrateFile(path: string): Promise<Migrated>;
|
|
75
65
|
|
|
76
66
|
/** 秒で表した、見えている間。`end` の時刻は含まない。 */
|
|
77
67
|
interface Span {
|
|
78
68
|
start: number;
|
|
79
69
|
end: number;
|
|
80
70
|
}
|
|
81
|
-
/** 線を引いている間。`start` で引き始め、`drawn` で引き終わり、`end` (段の終わり)
|
|
71
|
+
/** 線を引いている間。`start` で引き始め、`drawn` で引き終わり、`end` (段の終わり) まで濃く残す。枝分かれの図では commit を積む出来事と枝を切る出来事も持つ */
|
|
82
72
|
interface EdgeTime extends Span {
|
|
83
73
|
step: number;
|
|
84
74
|
event: number;
|
|
@@ -202,4 +192,4 @@ declare function chooseView(rendered: Pick<Rendered, "layout" | "view">, frameWi
|
|
|
202
192
|
textPx: number;
|
|
203
193
|
};
|
|
204
194
|
|
|
205
|
-
export { type CarrierTime, CheckOptions, Diagram, type EdgeTime, type EventTime, FORMAT_VERSION, type Fence, FieldError, ICONS, type LabelTime, Layout, type LineError,
|
|
195
|
+
export { type CarrierTime, CheckOptions, Diagram, type EdgeTime, type EventTime, FORMAT_VERSION, type Fence, FieldError, ICONS, type LabelTime, Layout, type LineError, NotationLang, Overlap, type ParseOptions, type Parsed, type Player, type PlayerOptions, type Read, Rect, type RenderOptions, type Rendered, type Span, type StateTime, Theme, type Timeline, ViewMode, chooseView, extractDiagrams, iconSvg, mountDiagram, parseNotation, printNotation, readDiagram, renderDiagram };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as NotationLang, D as Diagram, F as FieldError, C as CheckOptions, T as Theme, V as ViewMode, L as Layout, O as Overlap, R as Rect } from './ink-
|
|
2
|
-
export { B as Box, a as Carry, b as Checked, c as Color, d as ColorKey, e as DEFAULT_PALETTE, f as DiagramEvent, g as FONTS, h as Family, I as InkPart,
|
|
1
|
+
import { N as NotationLang, D as Diagram, F as FieldError, C as CheckOptions, T as Theme, V as ViewMode, L as Layout, O as Overlap, R as Rect } from './ink-B_7OXxtb.js';
|
|
2
|
+
export { B as Box, a as Carry, b as Checked, c as Color, d as ColorKey, e as DEFAULT_PALETTE, f as DiagramEvent, g as FONTS, h as Family, G as GitBranch, i as GitCommit, I as InkPart, j as LabelSide, k as OverlapSpot, P as PALETTES, l as Palette, m as Point, n as READABLE_PX, o as Region, S as SceneAction, p as SceneBadge, q as SceneBox, r as SceneEdge, s as SceneEnd, t as SceneField, u as SceneLabel, v as SceneLifeline, w as ScenePath, x as SceneRegion, y as SceneSide, z as SceneStrip, A as SceneTrail, E as StatePath, H as Step, J as describeOverlap, K as resolvePalette, M as validateDiagram } from './ink-B_7OXxtb.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Markdown の中の dragon の囲み (```dragon) を、囲みごとに取り出す。
|
|
@@ -45,6 +45,7 @@ declare function parseNotation(notation: string, options?: ParseOptions): Parsed
|
|
|
45
45
|
* 箱は JSON の並びのまま書き、同じ区画の箱が続く所を 1 つの `group … end` にする。
|
|
46
46
|
* 区画の箱が飛び飛びの時は同じ `group` を開き直す。区画の並びが箱の現れる順と違う時と、
|
|
47
47
|
* 箱の無い区画がある時は、先に全ての区画を中の無い `group … end` で宣言してから開き直す。
|
|
48
|
+
* 枝分かれの図 (#3164) は、枝の `branch` の行を箱より前に書き、札を動かす線の運ぶ物が送る側の名前の札なら書かない。
|
|
48
49
|
*/
|
|
49
50
|
|
|
50
51
|
declare function printNotation(diagram: Diagram): string;
|
|
@@ -59,26 +60,15 @@ type Read = {
|
|
|
59
60
|
ok: false;
|
|
60
61
|
errors: FieldError[];
|
|
61
62
|
};
|
|
62
|
-
interface Migrated {
|
|
63
|
-
changed: boolean;
|
|
64
|
-
from: number;
|
|
65
|
-
to: number;
|
|
66
|
-
}
|
|
67
63
|
/** 原本を読む。道具より新しい版は描かずに断り、形の誤りは検査の誤りとして返す。誤りの文は `options.lang` (渡さなければ日本語) で出す。 */
|
|
68
64
|
declare function readDiagram(input: unknown, options?: CheckOptions): Read;
|
|
69
|
-
/**
|
|
70
|
-
* 原本の file を今の版へ移す。今の版の file には触れない。
|
|
71
|
-
*
|
|
72
|
-
* file を読むので、画面で描く入口からは呼ばない。node の file の命令は呼んだ時に初めて読み込む。
|
|
73
|
-
*/
|
|
74
|
-
declare function migrateFile(path: string): Promise<Migrated>;
|
|
75
65
|
|
|
76
66
|
/** 秒で表した、見えている間。`end` の時刻は含まない。 */
|
|
77
67
|
interface Span {
|
|
78
68
|
start: number;
|
|
79
69
|
end: number;
|
|
80
70
|
}
|
|
81
|
-
/** 線を引いている間。`start` で引き始め、`drawn` で引き終わり、`end` (段の終わり)
|
|
71
|
+
/** 線を引いている間。`start` で引き始め、`drawn` で引き終わり、`end` (段の終わり) まで濃く残す。枝分かれの図では commit を積む出来事と枝を切る出来事も持つ */
|
|
82
72
|
interface EdgeTime extends Span {
|
|
83
73
|
step: number;
|
|
84
74
|
event: number;
|
|
@@ -202,4 +192,4 @@ declare function chooseView(rendered: Pick<Rendered, "layout" | "view">, frameWi
|
|
|
202
192
|
textPx: number;
|
|
203
193
|
};
|
|
204
194
|
|
|
205
|
-
export { type CarrierTime, CheckOptions, Diagram, type EdgeTime, type EventTime, FORMAT_VERSION, type Fence, FieldError, ICONS, type LabelTime, Layout, type LineError,
|
|
195
|
+
export { type CarrierTime, CheckOptions, Diagram, type EdgeTime, type EventTime, FORMAT_VERSION, type Fence, FieldError, ICONS, type LabelTime, Layout, type LineError, NotationLang, Overlap, type ParseOptions, type Parsed, type Player, type PlayerOptions, type Read, Rect, type RenderOptions, type Rendered, type Span, type StateTime, Theme, type Timeline, ViewMode, chooseView, extractDiagrams, iconSvg, mountDiagram, parseNotation, printNotation, readDiagram, renderDiagram };
|