@cardenelabs/dragon 0.36.0 → 0.36.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cardenelabs/dragon",
3
- "version": "0.36.0",
3
+ "version": "0.36.2",
4
4
  "description": "Dragon — 動く図を、人は行ごとの記法で、AI は JSON で書く。時系列図と構成図を段ごとに動かし、mp4・GIF・HTML・PNG に書き出す。",
5
5
  "license": "MIT",
6
6
  "author": "cardene777",
package/src/index.ts CHANGED
@@ -28,7 +28,7 @@ export { FORMAT_VERSION, type Migrated, migrateFile, type Read, readDiagram } fr
28
28
  export type { Layout } from "./layout/scene";
29
29
  export { FONTS } from "./look/fonts";
30
30
  export { DEFAULT_PALETTE, type Palette, PALETTES, READABLE_PX, resolvePalette, type Theme } from "./look/values";
31
- export { mountDiagram, type Player } from "./player";
31
+ export { mountDiagram, type Player, type PlayerOptions } from "./player";
32
32
  export { type Rendered, type RenderOptions, renderDiagram } from "./render/svg";
33
33
  export type { Timeline } from "./timeline";
34
34
  export { chooseView } from "./view";
package/src/messages.ts CHANGED
@@ -7,13 +7,13 @@
7
7
  import { COLORS } from "./schema";
8
8
  import { CARRIES, HEADS, KINDS, type NotationLang, SIDES, VIEWS } from "./words";
9
9
 
10
- /** 新しい形のどの行の書き方を示すか。今の形の行に当たった時に、誤りの文が書き方を示す */
10
+ /** 新しい形のどの行の書き方を示すか。前の形の行に当たった時に、誤りの文が書き方を示す */
11
11
  export type Shape = "sequence" | "architecture" | "group" | "box" | "strip" | "view" | "step" | "say" | "code" | "act" | "note" | "set";
12
12
 
13
13
  export interface Messages {
14
14
  noHead: string;
15
15
  badHead: string;
16
- /** 今の形の `word` を書いた行。`shape` の行の書き方を示す */
16
+ /** 前の形の `word` を書いた行。`shape` の行の書き方を示す */
17
17
  oldForm: (word: string, shape: Shape) => string;
18
18
  unknownHead: (word: string) => string;
19
19
  duplicate: (id: string) => string;
@@ -81,7 +81,7 @@ const ja = (): Messages => {
81
81
  return {
82
82
  noHead: `最初の行に図の種類 (${list(KINDS)}) と題を書く`,
83
83
  badHead: `最初の行は ${KINDS.join(" か ")} で始め、続けて題を書く`,
84
- oldForm: (word, shape) => `${word} は今の形の書き方。新しい形では ${shapes[shape]} と書く`,
84
+ oldForm: (word, shape) => `${word} は前の形の書き方。新しい形では ${shapes[shape]} と書く`,
85
85
  unknownHead: (word) => `${word} は行の頭に書けない。行は ${list(HEADS)} か、<名札> -> <名札> で始める`,
86
86
  duplicate: (id) => `${id} は既に宣言した名札`,
87
87
  needsId: (word) => `${word} の後ろに名札を書く`,
package/src/parser.ts CHANGED
@@ -214,7 +214,7 @@ function lookOf(source: SourceLine, attrs: Map<string, Attr>, m: Messages): { no
214
214
  }
215
215
 
216
216
  /**
217
- * 今の形 (#2997 まで) の行なら、その印と、新しい形で書く行の形。`inStep` は段の中の行か。
217
+ * 前の形 (#2997 まで) の行なら、その印と、新しい形で書く行の形。`inStep` は段の中の行か。
218
218
  * 新しい形で読めない行の誤りの文で、書き直し方を示すために引く。
219
219
  */
220
220
  function oldForm(text: string, inStep: boolean): { word: string; shape: Shape } | undefined {
package/src/words.ts CHANGED
@@ -40,8 +40,8 @@ export const VIEWS = keys<ViewMode>({ fixed: true, follow: true });
40
40
  export const SIDES = keys<LabelSide>({ above: true, below: true, left: true, right: true });
41
41
 
42
42
  /**
43
- * 今の形の行 (#2997 まで) が、新しい形のどの行に当たるか。誤りの文で新しい行の形を示すために引く。
44
- * 鍵は今の形の行の頭の語で、記号 (`#` など) で始まる行と、名札の後ろに `=` や「」が来る行は読む側が見分ける。
43
+ * 前の形の行 (#2997 まで) が、新しい形のどの行に当たるか。誤りの文で新しい行の形を示すために引く。
44
+ * 鍵は前の形の行の頭の語で、記号 (`#` など) で始まる行と、名札の後ろに `=` や「」が来る行は読む側が見分ける。
45
45
  */
46
46
  export const OLD_HEADS = {
47
47
  時系列図: "sequence",