@cardenelabs/dragon 0.40.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/dist/index.d.cts CHANGED
@@ -60,19 +60,8 @@ type Read = {
60
60
  ok: false;
61
61
  errors: FieldError[];
62
62
  };
63
- interface Migrated {
64
- changed: boolean;
65
- from: number;
66
- to: number;
67
- }
68
63
  /** 原本を読む。道具より新しい版は描かずに断り、形の誤りは検査の誤りとして返す。誤りの文は `options.lang` (渡さなければ日本語) で出す。 */
69
64
  declare function readDiagram(input: unknown, options?: CheckOptions): Read;
70
- /**
71
- * 原本の file を今の版へ移す。今の版の file には触れない。
72
- *
73
- * file を読むので、画面で描く入口からは呼ばない。node の file の命令は呼んだ時に初めて読み込む。
74
- */
75
- declare function migrateFile(path: string): Promise<Migrated>;
76
65
 
77
66
  /** 秒で表した、見えている間。`end` の時刻は含まない。 */
78
67
  interface Span {
@@ -203,4 +192,4 @@ declare function chooseView(rendered: Pick<Rendered, "layout" | "view">, frameWi
203
192
  textPx: number;
204
193
  };
205
194
 
206
- export { type CarrierTime, CheckOptions, Diagram, type EdgeTime, type EventTime, FORMAT_VERSION, type Fence, FieldError, ICONS, type LabelTime, Layout, type LineError, type Migrated, 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, migrateFile, mountDiagram, parseNotation, printNotation, readDiagram, renderDiagram };
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
@@ -60,19 +60,8 @@ type Read = {
60
60
  ok: false;
61
61
  errors: FieldError[];
62
62
  };
63
- interface Migrated {
64
- changed: boolean;
65
- from: number;
66
- to: number;
67
- }
68
63
  /** 原本を読む。道具より新しい版は描かずに断り、形の誤りは検査の誤りとして返す。誤りの文は `options.lang` (渡さなければ日本語) で出す。 */
69
64
  declare function readDiagram(input: unknown, options?: CheckOptions): Read;
70
- /**
71
- * 原本の file を今の版へ移す。今の版の file には触れない。
72
- *
73
- * file を読むので、画面で描く入口からは呼ばない。node の file の命令は呼んだ時に初めて読み込む。
74
- */
75
- declare function migrateFile(path: string): Promise<Migrated>;
76
65
 
77
66
  /** 秒で表した、見えている間。`end` の時刻は含まない。 */
78
67
  interface Span {
@@ -203,4 +192,4 @@ declare function chooseView(rendered: Pick<Rendered, "layout" | "view">, frameWi
203
192
  textPx: number;
204
193
  };
205
194
 
206
- export { type CarrierTime, CheckOptions, Diagram, type EdgeTime, type EventTime, FORMAT_VERSION, type Fence, FieldError, ICONS, type LabelTime, Layout, type LineError, type Migrated, 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, migrateFile, mountDiagram, parseNotation, printNotation, readDiagram, renderDiagram };
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.js CHANGED
@@ -3163,13 +3163,6 @@ function readDiagram(input, options = {}) {
3163
3163
  if (!checked.ok) return checked;
3164
3164
  return { ok: true, diagram: input, warnings: [] };
3165
3165
  }
3166
- async function migrateFile(path2) {
3167
- const { readFile } = await import('fs/promises');
3168
- const input = JSON.parse(await readFile(path2, "utf8"));
3169
- const read = readDiagram(input);
3170
- if (!read.ok) throw new Error(`${path2} \u3092\u79FB\u305B\u306A\u3044: ${read.errors.map((error) => `${error.pointer} ${error.message}`).join(" / ")}`);
3171
- return { changed: false, from: read.diagram.version, to: FORMAT_VERSION };
3172
- }
3173
3166
 
3174
3167
  // src/parser.ts
3175
3168
  var NotationError = class extends Error {
@@ -7401,6 +7394,6 @@ function mountDiagram(host, diagram, options = {}) {
7401
7394
  };
7402
7395
  }
7403
7396
 
7404
- export { DEFAULT_PALETTE, FONTS, FORMAT_VERSION, ICONS, PALETTES, READABLE_PX, chooseView, describeOverlap, extractDiagrams, iconSvg, migrateFile, mountDiagram, parseNotation, printNotation, readDiagram, renderDiagram, resolvePalette, validateDiagram };
7397
+ export { DEFAULT_PALETTE, FONTS, FORMAT_VERSION, ICONS, PALETTES, READABLE_PX, chooseView, describeOverlap, extractDiagrams, iconSvg, mountDiagram, parseNotation, printNotation, readDiagram, renderDiagram, resolvePalette, validateDiagram };
7405
7398
  //# sourceMappingURL=index.js.map
7406
7399
  //# sourceMappingURL=index.js.map