@cardenelabs/dragon 0.34.0 → 0.35.1
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 +53 -27
- 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
package/src/v05/index.ts
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
// このファイルは自動生成です。 手で編集しないでください。
|
|
2
|
-
//
|
|
3
|
-
// 出どころ = 描画側 (`@cardenelabs/cdl`) の型定義 `CdlInput`。
|
|
4
|
-
// 作り直す = `node packages/dragon/scripts/gen-input-table.mjs`
|
|
5
|
-
// ずれの検知 = `packages/dragon/test/input-table-generated.test.ts`
|
|
6
|
-
|
|
7
|
-
import type { 図形の定義 } from "./parser-types";
|
|
8
|
-
|
|
9
|
-
/** 記法が受けるつまみと、その欄 (`CdlInput` の全種を覆う) */
|
|
10
|
-
export const つまみの表: Record<string, 図形の定義> = {
|
|
11
|
-
color: {
|
|
12
|
-
必須: ["defaultValue"],
|
|
13
|
-
欄: {
|
|
14
|
-
defaultValue: "文字列",
|
|
15
|
-
label: "文字列",
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
datetime: {
|
|
19
|
-
必須: ["defaultValue"],
|
|
20
|
-
欄: {
|
|
21
|
-
defaultValue: "文字列",
|
|
22
|
-
label: "文字列",
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
dropdown: {
|
|
26
|
-
必須: ["options", "defaultValue"],
|
|
27
|
-
欄: {
|
|
28
|
-
options: "選択肢の並び",
|
|
29
|
-
defaultValue: "文字列",
|
|
30
|
-
label: "文字列",
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
"multi-select": {
|
|
34
|
-
必須: ["options", "defaultValues"],
|
|
35
|
-
欄: {
|
|
36
|
-
options: "選択肢の並び",
|
|
37
|
-
defaultValues: "文字列の並び",
|
|
38
|
-
label: "文字列",
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
number: {
|
|
42
|
-
必須: ["defaultValue"],
|
|
43
|
-
欄: {
|
|
44
|
-
min: "数",
|
|
45
|
-
max: "数",
|
|
46
|
-
defaultValue: "数",
|
|
47
|
-
label: "文字列",
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
radio: {
|
|
51
|
-
必須: ["options", "defaultValue"],
|
|
52
|
-
欄: {
|
|
53
|
-
options: "選択肢の並び",
|
|
54
|
-
defaultValue: "文字列",
|
|
55
|
-
label: "文字列",
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
range: {
|
|
59
|
-
必須: ["min", "max", "defaultLo", "defaultHi"],
|
|
60
|
-
欄: {
|
|
61
|
-
min: "数",
|
|
62
|
-
max: "数",
|
|
63
|
-
step: "数",
|
|
64
|
-
defaultLo: "数",
|
|
65
|
-
defaultHi: "数",
|
|
66
|
-
label: "文字列",
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
slider: {
|
|
70
|
-
必須: ["min", "max", "defaultValue"],
|
|
71
|
-
欄: {
|
|
72
|
-
min: "数",
|
|
73
|
-
max: "数",
|
|
74
|
-
step: "数",
|
|
75
|
-
defaultValue: "数",
|
|
76
|
-
label: "文字列",
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
stepper: {
|
|
80
|
-
必須: ["defaultValue"],
|
|
81
|
-
欄: {
|
|
82
|
-
min: "数",
|
|
83
|
-
max: "数",
|
|
84
|
-
step: "数",
|
|
85
|
-
defaultValue: "数",
|
|
86
|
-
label: "文字列",
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
tabs: {
|
|
90
|
-
必須: ["options", "defaultValue"],
|
|
91
|
-
欄: {
|
|
92
|
-
options: "選択肢の並び",
|
|
93
|
-
defaultValue: "文字列",
|
|
94
|
-
label: "文字列",
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
text: {
|
|
98
|
-
必須: ["defaultValue"],
|
|
99
|
-
欄: {
|
|
100
|
-
defaultValue: "文字列",
|
|
101
|
-
placeholder: "文字列",
|
|
102
|
-
maxLength: "数",
|
|
103
|
-
label: "文字列",
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
timeline: {
|
|
107
|
-
必須: ["duration"],
|
|
108
|
-
欄: {
|
|
109
|
-
duration: "数",
|
|
110
|
-
autoplay: "真偽",
|
|
111
|
-
loop: "真偽",
|
|
112
|
-
speeds: "数の並び",
|
|
113
|
-
defaultSpeedIdx: "数",
|
|
114
|
-
label: "文字列",
|
|
115
|
-
},
|
|
116
|
-
},
|
|
117
|
-
toggle: {
|
|
118
|
-
必須: ["defaultValue"],
|
|
119
|
-
欄: {
|
|
120
|
-
defaultValue: "真偽",
|
|
121
|
-
label: "文字列",
|
|
122
|
-
onLabel: "文字列",
|
|
123
|
-
offLabel: "文字列",
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
xypad: {
|
|
127
|
-
必須: ["xMin", "xMax", "yMin", "yMax", "defaultX", "defaultY"],
|
|
128
|
-
欄: {
|
|
129
|
-
xMin: "数",
|
|
130
|
-
xMax: "数",
|
|
131
|
-
yMin: "数",
|
|
132
|
-
yMax: "数",
|
|
133
|
-
defaultX: "数",
|
|
134
|
-
defaultY: "数",
|
|
135
|
-
label: "文字列",
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
};
|
package/src/v05/parser-types.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 中括弧の中身を表で読むための型 (#1385 で `parser.ts` から切り出した)。
|
|
3
|
-
*
|
|
4
|
-
* **生成した表 (`readout-table.generated.ts`) がこの型を使う**。 `parser.ts` に置いたままだと
|
|
5
|
-
* 生成した表 → `parser.ts` → 生成した表 の輪ができる。 型だけを別に置けば輪が消える。
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* 欄に書ける値の形。
|
|
10
|
-
*
|
|
11
|
-
* `真偽` は #1385 で足した。 描画側の部品に `boolean` の欄が 2 つあり、それまでの 5 形では
|
|
12
|
-
* 書けなかった。
|
|
13
|
-
*
|
|
14
|
-
* `数の並び` は #1389 で足した。 描画側のつまみに `readonly number[]` の欄が 1 つあり
|
|
15
|
-
* (`timeline` の再生速度の候補)、`文字列の並び` として読むと数が文字列のまま図に載る。
|
|
16
|
-
*
|
|
17
|
-
* `選択肢の並び` は #1920 で足した。 選択肢を持つ入力欄の `options` で、要素は文字列か
|
|
18
|
-
* `{ value, label }` の組 (描画側の `CdlInputOption`)。 `文字列の並び` として読むと組を `,` で割る。
|
|
19
|
-
*/
|
|
20
|
-
export type 欄の形 =
|
|
21
|
-
| "数"
|
|
22
|
-
| "文字列"
|
|
23
|
-
| "数か文字列"
|
|
24
|
-
| "文字列の並び"
|
|
25
|
-
| "数の並び"
|
|
26
|
-
| "向き"
|
|
27
|
-
| "組の並び"
|
|
28
|
-
| "真偽"
|
|
29
|
-
| "選択肢の並び";
|
|
30
|
-
|
|
31
|
-
/** 1 つの種類が受ける、必須の欄と全欄の形 */
|
|
32
|
-
export type 図形の定義 = { 必須: readonly string[]; 欄: Record<string, 欄の形> };
|