@cardenelabs/dragon 0.34.0 → 0.35.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 -720
- package/dist/cli.cjs +4529 -0
- package/dist/cli.cjs.map +1 -0
- package/dist/cli.js +4523 -0
- package/dist/cli.js.map +1 -0
- package/dist/export.cjs +3912 -0
- package/dist/export.cjs.map +1 -0
- package/dist/export.d.cts +36 -0
- package/dist/export.d.ts +36 -0
- package/dist/export.js +3907 -0
- package/dist/export.js.map +1 -0
- package/dist/fonts.cjs +7 -0
- package/dist/fonts.cjs.map +1 -0
- package/dist/fonts.js +4 -0
- package/dist/fonts.js.map +1 -0
- package/dist/index.cjs +4105 -20356
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +227 -5522
- package/dist/index.d.ts +227 -5522
- package/dist/index.js +4091 -20283
- package/dist/index.js.map +1 -1
- package/dist/player.global.js +2 -0
- package/dist/schema-BBWfniwH.d.cts +112 -0
- package/dist/schema-BBWfniwH.d.ts +112 -0
- package/package.json +39 -24
- package/src/cli.ts +237 -0
- package/src/export/capture.ts +277 -0
- package/src/export/fonts.ts +68 -0
- package/src/export/html.ts +32 -0
- package/src/export/index.ts +146 -0
- package/src/field-messages.ts +104 -0
- package/src/figure-text.ts +42 -0
- package/src/index.ts +30 -283
- package/src/layout/architecture.ts +381 -0
- package/src/layout/measure.ts +21 -0
- package/src/layout/scene.ts +353 -0
- package/src/layout/sequence.ts +189 -0
- package/src/load-fonts.ts +8 -0
- package/src/look/fonts.ts +33 -0
- package/src/look/palettes.json +209 -0
- package/src/look/values.ts +155 -0
- package/src/markdown.ts +35 -0
- package/src/messages.ts +122 -0
- package/src/parser.ts +342 -310
- package/src/player-global.ts +4 -0
- package/src/player.ts +271 -0
- package/src/printer.ts +76 -0
- package/src/render/icons.ts +41 -0
- package/src/render/motion.ts +106 -0
- package/src/render/parts.ts +279 -0
- package/src/render/svg.ts +341 -0
- package/src/schema.ts +161 -16
- package/src/schemas/diagram.schema.json +150 -0
- package/src/schemas/validate-diagram.d.ts +12 -0
- package/src/schemas/validate-diagram.js +8 -0
- package/src/timeline.ts +166 -0
- package/src/tokenize.ts +20 -281
- package/src/version.ts +55 -0
- package/src/view.ts +16 -0
- package/src/words.ts +79 -0
- package/examples/quick-start.md +0 -142
- package/src/canvas-bounds.ts +0 -52
- package/src/color.ts +0 -197
- package/src/compile/actor-ids.ts +0 -297
- package/src/compile/actor-option-notice.ts +0 -379
- package/src/compile/actors.ts +0 -103
- package/src/compile/c4.ts +0 -74
- package/src/compile/chain.ts +0 -93
- package/src/compile/chart-fields.ts +0 -193
- package/src/compile/deep-rewrite.ts +0 -30
- package/src/compile/derived-source.ts +0 -18
- package/src/compile/direction.ts +0 -102
- package/src/compile/edge-option-notice.ts +0 -112
- package/src/compile/er-relation.ts +0 -200
- package/src/compile/flow.ts +0 -54
- package/src/compile/flowchart.ts +0 -344
- package/src/compile/funnel.ts +0 -87
- package/src/compile/gantt.ts +0 -337
- package/src/compile/generic.ts +0 -696
- package/src/compile/hierarchy.ts +0 -92
- package/src/compile/journey.ts +0 -93
- package/src/compile/kinds.ts +0 -139
- package/src/compile/lanes.ts +0 -138
- package/src/compile/metro.ts +0 -271
- package/src/compile/mind.ts +0 -393
- package/src/compile/node-title.ts +0 -24
- package/src/compile/notice.ts +0 -141
- package/src/compile/order.ts +0 -57
- package/src/compile/parts-lookup.ts +0 -17
- package/src/compile/parts.ts +0 -2709
- package/src/compile/placement-apply.ts +0 -689
- package/src/compile/placement.ts +0 -15
- package/src/compile/quadrant.ts +0 -265
- package/src/compile/record.ts +0 -75
- package/src/compile/row-marks.ts +0 -128
- package/src/compile/rows.ts +0 -40
- package/src/compile/sequence.ts +0 -305
- package/src/compile/slug.ts +0 -37
- package/src/compile/stages.ts +0 -247
- package/src/compile/subtitle.ts +0 -35
- package/src/compile/swimlane-marks.ts +0 -87
- package/src/compile/swimlane.ts +0 -82
- package/src/compile/timeline.ts +0 -213
- package/src/compile/topology.ts +0 -44
- package/src/compile/tree.ts +0 -69
- package/src/compile/value-chart.ts +0 -337
- package/src/compile/values.ts +0 -432
- package/src/compile/word-state.ts +0 -82
- package/src/compile.ts +0 -3168
- package/src/focus.ts +0 -46
- package/src/input-size.ts +0 -181
- package/src/json-line-map.ts +0 -30
- package/src/json-parser.ts +0 -4306
- package/src/keywords.ts +0 -417
- package/src/near-name.ts +0 -42
- package/src/notation-lint.ts +0 -342
- package/src/relative-pos.ts +0 -251
- package/src/schemas/diagram.json +0 -3088
- package/src/types.ts +0 -1009
- package/src/v05/index.ts +0 -9
- package/src/v05/input-table.generated.ts +0 -138
- package/src/v05/parser-types.ts +0 -32
- package/src/v05/parser.ts +0 -6668
- package/src/v05/readout-table.generated.ts +0 -1088
- package/src/v05/removed-syntax.ts +0 -115
- package/src/value-syntax.ts +0 -313
- package/src/write-position.ts +0 -270
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { T as Theme, N as NotationLang, V as ViewMode } from './schema-BBWfniwH.cjs';
|
|
2
|
+
|
|
3
|
+
type ExportFormat = "mp4" | "gif" | "html" | "png";
|
|
4
|
+
interface ExportOptions {
|
|
5
|
+
/** 書き出す先の dir。無ければ作り、書き出しに失敗した時は作った dir を残さない (#3013) */
|
|
6
|
+
outDir: string;
|
|
7
|
+
/** file の名前 (拡張子を除く)。既定は `diagram` */
|
|
8
|
+
name?: string;
|
|
9
|
+
/** 書き出す形。既定は 4 つ全て */
|
|
10
|
+
formats?: ExportFormat[];
|
|
11
|
+
/** 枠の幅 (CSS の px)。見せ方を選び、寄って見せる窓の幅になる */
|
|
12
|
+
width?: number;
|
|
13
|
+
palette?: string;
|
|
14
|
+
theme?: Theme;
|
|
15
|
+
/** mp4 の 1 秒のコマの数 */
|
|
16
|
+
fps?: number;
|
|
17
|
+
/** GIF の 1 秒のコマの数 */
|
|
18
|
+
gifFps?: number;
|
|
19
|
+
/** 図の中の字 (全体図の札、HTML の読み上げの名前、描けない時の断りの文) の言葉。書かなければ日本語 (#3001) */
|
|
20
|
+
lang?: NotationLang;
|
|
21
|
+
}
|
|
22
|
+
interface ExportResult {
|
|
23
|
+
/** 書き出した file の path */
|
|
24
|
+
files: Partial<Record<ExportFormat, string>>;
|
|
25
|
+
view: ViewMode;
|
|
26
|
+
/** 撮ったコマの数 */
|
|
27
|
+
frames: number;
|
|
28
|
+
/** 動画のコマの大きさ (CSS の px)。撮る画素はこの 2 倍 */
|
|
29
|
+
width: number;
|
|
30
|
+
height: number;
|
|
31
|
+
}
|
|
32
|
+
/** 書き出せる形。命令が `--format` の値を確かめる時にも使う */
|
|
33
|
+
declare const FORMATS: readonly ExportFormat[];
|
|
34
|
+
declare function exportDiagram(input: unknown, options: ExportOptions): Promise<ExportResult>;
|
|
35
|
+
|
|
36
|
+
export { type ExportFormat, type ExportOptions, type ExportResult, FORMATS, exportDiagram };
|
package/dist/export.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { T as Theme, N as NotationLang, V as ViewMode } from './schema-BBWfniwH.js';
|
|
2
|
+
|
|
3
|
+
type ExportFormat = "mp4" | "gif" | "html" | "png";
|
|
4
|
+
interface ExportOptions {
|
|
5
|
+
/** 書き出す先の dir。無ければ作り、書き出しに失敗した時は作った dir を残さない (#3013) */
|
|
6
|
+
outDir: string;
|
|
7
|
+
/** file の名前 (拡張子を除く)。既定は `diagram` */
|
|
8
|
+
name?: string;
|
|
9
|
+
/** 書き出す形。既定は 4 つ全て */
|
|
10
|
+
formats?: ExportFormat[];
|
|
11
|
+
/** 枠の幅 (CSS の px)。見せ方を選び、寄って見せる窓の幅になる */
|
|
12
|
+
width?: number;
|
|
13
|
+
palette?: string;
|
|
14
|
+
theme?: Theme;
|
|
15
|
+
/** mp4 の 1 秒のコマの数 */
|
|
16
|
+
fps?: number;
|
|
17
|
+
/** GIF の 1 秒のコマの数 */
|
|
18
|
+
gifFps?: number;
|
|
19
|
+
/** 図の中の字 (全体図の札、HTML の読み上げの名前、描けない時の断りの文) の言葉。書かなければ日本語 (#3001) */
|
|
20
|
+
lang?: NotationLang;
|
|
21
|
+
}
|
|
22
|
+
interface ExportResult {
|
|
23
|
+
/** 書き出した file の path */
|
|
24
|
+
files: Partial<Record<ExportFormat, string>>;
|
|
25
|
+
view: ViewMode;
|
|
26
|
+
/** 撮ったコマの数 */
|
|
27
|
+
frames: number;
|
|
28
|
+
/** 動画のコマの大きさ (CSS の px)。撮る画素はこの 2 倍 */
|
|
29
|
+
width: number;
|
|
30
|
+
height: number;
|
|
31
|
+
}
|
|
32
|
+
/** 書き出せる形。命令が `--format` の値を確かめる時にも使う */
|
|
33
|
+
declare const FORMATS: readonly ExportFormat[];
|
|
34
|
+
declare function exportDiagram(input: unknown, options: ExportOptions): Promise<ExportResult>;
|
|
35
|
+
|
|
36
|
+
export { type ExportFormat, type ExportOptions, type ExportResult, FORMATS, exportDiagram };
|