@open-document/core 0.14.0 → 0.14.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.
Files changed (50) hide show
  1. package/dist/{build-CyBlmrjS.js → build-I0cgoERP.js} +1 -1
  2. package/dist/{check-DUKDEem-.js → check-Dys96QSL.js} +3 -3
  3. package/dist/cli/bin.js +9 -9
  4. package/dist/{context-BPApOW9n.js → context-C-osJW5f.js} +1 -1
  5. package/dist/{dev-DrnOvsX3.js → dev-CC4PrIOC.js} +1 -1
  6. package/dist/{diff-BPMD2Knh.js → diff-DhutD4TJ.js} +2 -2
  7. package/dist/{export-DeVtL8aX.js → export-KrajVJO7.js} +3 -3
  8. package/dist/{import-WAgWsuOv.js → import-Yv34za3L.js} +3 -3
  9. package/dist/ops/index.js +2 -2
  10. package/dist/{ops-raK6424A.js → ops-Dux5HlkH.js} +2 -422
  11. package/dist/{preview-B8Vw9QCh.js → preview-7eqn9Wzf.js} +1 -1
  12. package/dist/{config-cNpYUpF6.js → session-BSbrC5gK.js} +510 -4
  13. package/dist/{templates-D9jAFJ8R.js → templates-s-VLTSRc.js} +3 -3
  14. package/dist/vite/index.js +1 -1
  15. package/package.json +6 -1
  16. package/src/agent/check-after-turn.ts +59 -0
  17. package/src/agent/detect.ts +158 -0
  18. package/src/agent/install.ts +73 -0
  19. package/src/agent/prompt.ts +175 -0
  20. package/src/agent/provider.ts +126 -0
  21. package/src/agent/providers/codex.ts +209 -0
  22. package/src/agent/providers/index.ts +7 -0
  23. package/src/agent/providers/sdk-types.ts +71 -0
  24. package/src/agent/runner.ts +392 -0
  25. package/src/agent/status.ts +64 -0
  26. package/src/agent/store.ts +271 -0
  27. package/src/agent/types.ts +174 -0
  28. package/src/app/components/agent/agent-panel.tsx +6 -1
  29. package/src/app/components/agent/transcript.tsx +111 -3
  30. package/src/app/lib/i18n-ja/agent-panel.ts +8 -0
  31. package/src/app/lib/i18n-ko/agent-panel.ts +8 -0
  32. package/src/app/lib/i18n-zh-cn/agent-panel.ts +8 -0
  33. package/src/app/lib/i18n-zh-tw/agent-panel.ts +8 -0
  34. package/src/app/lib/use-locale.ts +7 -0
  35. package/src/diagram/index.ts +46 -0
  36. package/src/diagram/layout.ts +627 -0
  37. package/src/diagram/parse.ts +335 -0
  38. package/src/diagram/render.ts +162 -0
  39. package/src/editing/placeholder-id.ts +2 -0
  40. package/src/app/lib/chart.test.ts +0 -123
  41. package/src/app/lib/docx/ooxml.test.ts +0 -484
  42. package/src/app/lib/flow-measure.test.ts +0 -30
  43. package/src/app/lib/flow.test.ts +0 -129
  44. package/src/app/lib/footnotes.test.tsx +0 -102
  45. package/src/app/lib/i18n.test.ts +0 -24
  46. package/src/app/lib/inspector/inline-edit.test.ts +0 -244
  47. package/src/app/lib/page-range.test.ts +0 -104
  48. package/src/app/lib/records.test.ts +0 -38
  49. package/src/app/lib/sdk.test.ts +0 -30
  50. package/src/app/lib/view-mode.test.ts +0 -46
@@ -104,4 +104,12 @@ export const AGENT_PANEL: Record<string, string> = {
104
104
  'Waiting for you': 'あなたの回答待ち',
105
105
  'Draft with agent': 'エージェントで下書き',
106
106
  'Resize the agent panel': 'エージェントパネルの幅を変更',
107
+ 'Checking the document…': 'ドキュメントをチェック中…',
108
+ 'Could not check the document': 'ドキュメントをチェックできませんでした',
109
+ 'Checked · no problems': 'チェック済み · 問題なし',
110
+ 'Checked · no problems · {count} pages': 'チェック済み · 問題なし · {count} ページ',
111
+ 'The check found {count} problem': 'チェックで {count} 件の問題が見つかりました',
112
+ 'The check found {count} problems': 'チェックで {count} 件の問題が見つかりました',
113
+ '+{count} more': 'ほか {count} 件',
114
+ 'Ask the agent to fix': 'エージェントに修正を依頼',
107
115
  };
@@ -103,4 +103,12 @@ export const AGENT_PANEL: Record<string, string> = {
103
103
  'Waiting for you': '입력을 기다리는 중',
104
104
  'Draft with agent': '에이전트로 초안 작성',
105
105
  'Resize the agent panel': '에이전트 패널 너비 조절',
106
+ 'Checking the document…': '문서를 검사하는 중…',
107
+ 'Could not check the document': '문서를 검사할 수 없습니다',
108
+ 'Checked · no problems': '검사 완료 · 문제 없음',
109
+ 'Checked · no problems · {count} pages': '검사 완료 · 문제 없음 · {count}쪽',
110
+ 'The check found {count} problem': '검사에서 문제 {count}개를 찾았습니다',
111
+ 'The check found {count} problems': '검사에서 문제 {count}개를 찾았습니다',
112
+ '+{count} more': '그 외 {count}개',
113
+ 'Ask the agent to fix': '에이전트에게 수정 요청',
106
114
  };
@@ -102,4 +102,12 @@ export const AGENT_PANEL: Record<string, string> = {
102
102
  'Waiting for you': '等待你的回复',
103
103
  'Draft with agent': '用 Agent 起草',
104
104
  'Resize the agent panel': '调整 Agent 面板宽度',
105
+ 'Checking the document…': '正在检查文档…',
106
+ 'Could not check the document': '无法检查文档',
107
+ 'Checked · no problems': '已检查 · 没有问题',
108
+ 'Checked · no problems · {count} pages': '已检查 · 没有问题 · 共 {count} 页',
109
+ 'The check found {count} problem': '检查发现 {count} 个问题',
110
+ 'The check found {count} problems': '检查发现 {count} 个问题',
111
+ '+{count} more': '还有 {count} 个',
112
+ 'Ask the agent to fix': '请 agent 修正',
105
113
  };
@@ -102,4 +102,12 @@ export const AGENT_PANEL: Record<string, string> = {
102
102
  'Waiting for you': '等待你的回覆',
103
103
  'Draft with agent': '用 Agent 起草',
104
104
  'Resize the agent panel': '調整 Agent 面板寬度',
105
+ 'Checking the document…': '正在檢查文件…',
106
+ 'Could not check the document': '無法檢查文件',
107
+ 'Checked · no problems': '已檢查 · 沒有問題',
108
+ 'Checked · no problems · {count} pages': '已檢查 · 沒有問題 · 共 {count} 頁',
109
+ 'The check found {count} problem': '檢查發現 {count} 個問題',
110
+ 'The check found {count} problems': '檢查發現 {count} 個問題',
111
+ '+{count} more': '還有 {count} 個',
112
+ 'Ask the agent to fix': '請 agent 修正',
105
113
  };
@@ -113,6 +113,13 @@ const AGENT = {
113
113
  xhigh: 'Extra high',
114
114
  max: 'Max',
115
115
  },
116
+ checkRunning: 'Checking the document…',
117
+ checkFailed: 'Could not check the document',
118
+ checkClean: 'Checked · no problems',
119
+ checkCleanPages: 'Checked · no problems · {count} pages',
120
+ checkFound: { one: 'The check found {count} problem', other: 'The check found {count} problems' },
121
+ checkMore: '+{count} more',
122
+ checkFix: 'Ask the agent to fix',
116
123
  presenceEditing: '{provider} is editing',
117
124
  presenceThinking: 'Thinking',
118
125
  presenceWaiting: 'Waiting for you',
@@ -0,0 +1,46 @@
1
+ import { type LayoutOptions, layoutDiagram } from './layout.ts';
2
+ import { type Diagram, DiagramSyntaxError, parseDiagram } from './parse.ts';
3
+ import { type RenderOptions, renderDiagram } from './render.ts';
4
+
5
+ export type CompiledDiagram = {
6
+ svg: string;
7
+ width: number;
8
+ height: number;
9
+ /** The parsed graph, so a caller can inspect what was drawn without re-parsing. */
10
+ source: Diagram;
11
+ };
12
+
13
+ export type CompileOptions = LayoutOptions & RenderOptions;
14
+
15
+ /** Mermaid-flavoured text in, themed SVG out. One call, no browser. */
16
+ export function compileDiagram(source: string, options: CompileOptions = {}): CompiledDiagram {
17
+ const parsed = parseDiagram(source);
18
+ const laidOut = layoutDiagram(parsed, options);
19
+ return {
20
+ svg: renderDiagram(laidOut, options),
21
+ width: laidOut.width,
22
+ height: laidOut.height,
23
+ source: parsed,
24
+ };
25
+ }
26
+
27
+ export type {
28
+ LaidOutDiagram,
29
+ LaidOutEdge,
30
+ LaidOutLifeline,
31
+ LaidOutNode,
32
+ LaidOutSubgraph,
33
+ LayoutOptions,
34
+ } from './layout.ts';
35
+ export type {
36
+ Diagram,
37
+ DiagramEdge,
38
+ DiagramNode,
39
+ DiagramSubgraph,
40
+ Direction,
41
+ NodeShape,
42
+ SequenceMessage,
43
+ SequenceParticipant,
44
+ } from './parse.ts';
45
+ export type { RenderOptions } from './render.ts';
46
+ export { DiagramSyntaxError, layoutDiagram, parseDiagram, renderDiagram };