@lemonriver/core 0.8.0 → 1.0.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.
Files changed (45) hide show
  1. package/README.md +3 -1
  2. package/dist/{build-Bdagm0FU.js → build-CiT4CNey.js} +1 -1
  3. package/dist/cli/bin.js +11 -4
  4. package/dist/client-DpO_eR9X.js +57 -0
  5. package/dist/{config-Begts3gq.js → config-BI3VRI2n.js} +4557 -4596
  6. package/dist/{dev-DjjzmT28.js → dev-DpzBn_sf.js} +2 -2
  7. package/dist/index.js +1 -1
  8. package/dist/locale/index.js +1 -1
  9. package/dist/mcp-CjYDzcJa.js +262 -0
  10. package/dist/{preview-C9y9MTY1.js → preview-Dro8hl5_.js} +2 -2
  11. package/dist/vite/index.js +1 -1
  12. package/dist/{zh-tw-DcrDeKxr.js → zh-tw-BhYyMx0-.js} +40 -40
  13. package/package.json +1 -1
  14. package/skills/slide-authoring/SKILL.md +2 -0
  15. package/src/app/lemonriver/agent-providers/section.tsx +13 -4
  16. package/src/app/lemonriver/board/use-self-check.ts +1 -1
  17. package/src/app/lemonriver/chrome/app-chrome.tsx +6 -0
  18. package/src/app/lemonriver/chrome/sidebar-extras.tsx +9 -1
  19. package/src/app/lemonriver/guide/guide-prompt.tsx +89 -0
  20. package/src/app/lemonriver/guide/state.ts +29 -0
  21. package/src/app/lemonriver/guide/use-guide.ts +17 -0
  22. package/src/app/lemonriver/help/help-page.tsx +5 -0
  23. package/src/app/lemonriver/help/model.test.ts +72 -0
  24. package/src/app/lemonriver/help/model.ts +10 -1
  25. package/src/app/lemonriver/home/home-page.tsx +25 -7
  26. package/src/app/lemonriver/mcp/respond.ts +47 -0
  27. package/src/app/lemonriver/mcp/screenshot.tsx +155 -0
  28. package/src/app/lemonriver/mcp/self-check.tsx +65 -0
  29. package/src/app/lemonriver/outline/describe-page.tsx +3 -1
  30. package/src/app/lemonriver/settings/settings-page.tsx +3 -3
  31. package/src/app/lemonriver/share/freeze.ts +13 -5
  32. package/src/app/lemonriver/text/en.ts +222 -5
  33. package/src/app/lemonriver/text/es.ts +18 -4
  34. package/src/app/lemonriver/text/ja.ts +18 -4
  35. package/src/app/lemonriver/text/types.ts +13 -1
  36. package/src/app/lemonriver/text/zh-cn.ts +215 -4
  37. package/src/app/lemonriver/text/zh-tw.ts +215 -4
  38. package/src/app/lemonriver/update/beta-badge.tsx +3 -0
  39. package/src/app/lemonriver/update/version.test.ts +14 -0
  40. package/src/app/lemonriver/update/version.ts +5 -0
  41. package/src/locale/en.ts +8 -8
  42. package/src/locale/es.ts +10 -8
  43. package/src/locale/ja.ts +9 -8
  44. package/src/locale/zh-cn.ts +9 -8
  45. package/src/locale/zh-tw.ts +9 -8
@@ -8,7 +8,7 @@ import { updateAgentPrefs, useAgentPrefs } from '../agent-prefs/use-prefs';
8
8
  import { AgentProvidersSection } from '../agent-providers/section';
9
9
  import { HelperMascot, type HelperRole } from '../brand/mascot';
10
10
  import { isFeatureEnabled } from '../features';
11
- import { ONBOARDED_KEY } from '../onboarding/onboarding';
11
+ import { GUIDE_SEEN_KEY } from '../guide/state';
12
12
  import { useLrText } from '../text';
13
13
  import { setReduceMotionSetting, useReduceMotionSetting } from '../theme/motion';
14
14
  import { LR_THEME_CHOICES, type LrThemeChoice } from '../theme/themes';
@@ -44,9 +44,9 @@ export function SettingsPage() {
44
44
 
45
45
  function replayOnboarding() {
46
46
  try {
47
- localStorage.removeItem(ONBOARDED_KEY);
47
+ localStorage.removeItem(GUIDE_SEEN_KEY);
48
48
  } catch {}
49
- navigate('/new');
49
+ navigate('/');
50
50
  }
51
51
 
52
52
  const helpers: {
@@ -34,18 +34,26 @@ export function canvasJpeg(canvas: HTMLCanvasElement, quality: number): Promise<
34
34
  });
35
35
  }
36
36
 
37
- /** Scales the full-size capture down instead of drawing the page a second time. */
38
- export async function canvasThumb(
37
+ export function canvasScaled(
39
38
  source: HTMLCanvasElement,
40
39
  width: number,
41
40
  height: number,
42
- quality: number,
43
- ): Promise<Uint8Array> {
41
+ ): HTMLCanvasElement {
44
42
  const canvas = document.createElement('canvas');
45
43
  canvas.width = width;
46
44
  canvas.height = height;
47
45
  const ctx = canvas.getContext('2d');
48
46
  if (!ctx) throw new Error('canvas is unavailable');
49
47
  ctx.drawImage(source, 0, 0, width, height);
50
- return canvasJpeg(canvas, quality);
48
+ return canvas;
49
+ }
50
+
51
+ /** Scales the full-size capture down instead of drawing the page a second time. */
52
+ export async function canvasThumb(
53
+ source: HTMLCanvasElement,
54
+ width: number,
55
+ height: number,
56
+ quality: number,
57
+ ): Promise<Uint8Array> {
58
+ return canvasJpeg(canvasScaled(source, width, height), quality);
51
59
  }
@@ -1,7 +1,7 @@
1
1
  import type { LrText } from './types';
2
2
 
3
3
  export const enHelp: LrText['help'] = {
4
- title: 'Help',
4
+ title: 'Usage guide and help',
5
5
  intro: 'How sharing, importing, backups and cloud drive setup work.',
6
6
  searchPlaceholder: 'Search help',
7
7
  noResults: 'Nothing matched. Try different words.',
@@ -20,8 +20,211 @@ export const enHelp: LrText['help'] = {
20
20
  change: 'Change',
21
21
  chooseOther: 'Choose another folder…',
22
22
  reveal: 'Show in Finder',
23
+ format: 'Format',
24
+ replaceImage: 'Replace image',
25
+ assets: 'Assets',
26
+ board: 'Story board',
27
+ notes: 'Speaker notes',
28
+ comments: 'Comment',
29
+ selfCheck: 'Self-check',
30
+ present: 'Present',
31
+ duplicate: 'Duplicate',
23
32
  },
24
33
  sections: [
34
+ {
35
+ id: 'guide',
36
+ title: 'Usage guide',
37
+ blocks: [
38
+ {
39
+ kind: 'p',
40
+ text: 'Slides in LemonRiver are written and changed by an AI agent, while you watch the result in the browser and adjust it by hand. Any agent works, as long as it can read and write files on your computer.',
41
+ },
42
+ {
43
+ kind: 'p',
44
+ text: 'There are two ways to work. Pick the one that suits you, or mix them:',
45
+ },
46
+ {
47
+ kind: 'list',
48
+ items: [
49
+ {
50
+ strong: 'Talk to your agent',
51
+ text: ': type to it, and it creates the deck and changes each page. Best if you like typing and want the agent to do most of the work.',
52
+ },
53
+ {
54
+ strong: 'Edit in the interface',
55
+ text: ': change text, styles, images and page order in LemonRiver itself, and leave comments for the agent where you cannot. Best if you like working by hand and seeing every change.',
56
+ },
57
+ ],
58
+ },
59
+ { kind: 'p', text: 'Both ways start with “Prepare”.' },
60
+ ],
61
+ },
62
+ {
63
+ id: 'guide-prepare',
64
+ title: 'Prepare (once)',
65
+ parent: 'guide',
66
+ blocks: [
67
+ {
68
+ kind: 'steps',
69
+ items: [
70
+ {
71
+ strong: 'Get an agent.',
72
+ text: 'Use the one you already have; all it needs is to open a folder on your computer and read and write the files in it. Common ones:',
73
+ children: [
74
+ 'Common elsewhere: Claude Code, Codex, Gemini CLI, Grok, Cursor, GitHub Copilot, OpenCode and others',
75
+ 'Common in China: WorkBuddy, DuMate, DeepSeek Harness, Trae, 千问办公, 豆包, Kimi CLI and others',
76
+ ],
77
+ },
78
+ {
79
+ strong: 'Let the agent work in the LemonRiver folder.',
80
+ text: 'If you installed LemonRiver with the installer, the folder is “Personal folder → LemonRiver”; if you set it up from the command line, it is the folder you created.',
81
+ children: [
82
+ 'Agents that run in a terminal: go into that folder first, then start the agent.',
83
+ 'Agents with a window: use their “Open folder” and pick this folder.',
84
+ 'The folder already holds notes for the agent: how to write slides, how to handle comments, and how to know which page you are looking at. Most agents read them on their own; if yours does not seem to, tell it “read the AGENTS.md in this folder first”.',
85
+ ],
86
+ },
87
+ {
88
+ strong: 'Open LemonRiver in the browser',
89
+ text: ' (click the lemon in the Dock or on the desktop) and put it side by side with the agent, so you can talk and watch at the same time.',
90
+ },
91
+ {
92
+ strong: 'Let the agent see the page',
93
+ text: ': add an MCP server in the agent’s settings, with the command node node_modules/@lemonriver/core/bin.js mcp and the LemonRiver folder as its working directory. Claude Code offers to enable it when you open this folder.',
94
+ },
95
+ ],
96
+ },
97
+ {
98
+ kind: 'p',
99
+ text: 'How to install, sign in to, or pay for an agent is up to its own instructions; LemonRiver does not handle any of that.',
100
+ },
101
+ ],
102
+ },
103
+ {
104
+ id: 'guide-agent',
105
+ title: 'Way 1: talk to your agent',
106
+ parent: 'guide',
107
+ blocks: [
108
+ {
109
+ kind: 'steps',
110
+ items: [
111
+ { text: 'Open the agent and make sure it is in the LemonRiver folder.' },
112
+ {
113
+ strong: 'Create',
114
+ text: ': just say what you need, for example “Make a Q3 business review, about 10 pages, for the leadership team; here is the data: …”. The agent asks a few questions first. The finished deck appears on the home page; refresh if it does not.',
115
+ },
116
+ {
117
+ strong: 'Change a page',
118
+ text: ': open that page in the browser and tell the agent “change this page: shorter title, bigger numbers”. The agent knows which page you are viewing. You can also name the page: “turn the bar chart on page 3 into a line chart”.',
119
+ },
120
+ {
121
+ strong: 'Add, remove or reorder pages',
122
+ text: ': “add a page about risks after page 4”, “swap the last two pages”.',
123
+ },
124
+ {
125
+ strong: 'Speaker notes',
126
+ text: ': “write about 150 words of notes for every page”. They go into each page’s “{notes}”, and the presenter view shows them while you present.',
127
+ },
128
+ {
129
+ text: 'Other things you can say: “make the whole deck darker and simpler”, “check the typos and numbers that do not add up”, “lay out page 2 like this screenshot” (send the agent the screenshot).',
130
+ },
131
+ ],
132
+ },
133
+ ],
134
+ },
135
+ {
136
+ id: 'guide-ui',
137
+ title: 'Way 2: edit in the interface',
138
+ parent: 'guide',
139
+ blocks: [
140
+ {
141
+ kind: 'steps',
142
+ items: [
143
+ {
144
+ strong: 'Start from a deck',
145
+ text: ': have the agent write a first draft (way 1, step 2), import a package someone shared, or “{duplicate}” a deck you already have on the home page. A new workspace comes with a short practice deck, so you can try every step below on it. For now you cannot add new text or images to a blank page.',
146
+ },
147
+ {
148
+ strong: 'Change text',
149
+ text: ': double-click the text on the page and type.',
150
+ },
151
+ {
152
+ strong: 'Change the look',
153
+ text: ': click to select, then use the “{format}” panel on the right to change size, weight, colour, background, alignment, position and size. Hold Shift to select several; ⌘Z undoes.',
154
+ },
155
+ {
156
+ strong: 'Swap an image',
157
+ text: ': select the image, click “{replaceImage}”, pick one from your assets, and crop it if you like. Upload new images in “{assets}” on the left first.',
158
+ },
159
+ {
160
+ strong: 'Manage pages',
161
+ text: ': drag the thumbnails on the left to reorder; right-click to “{duplicate}” or delete. Press B to open the “{board}” and see the whole structure and write notes for each page.',
162
+ },
163
+ {
164
+ strong: 'Speaker notes',
165
+ text: ': write them right in “{notes}”.',
166
+ },
167
+ {
168
+ strong: 'What the interface cannot do, leave a comment',
169
+ text: ': click “{comments}”, click an element or drag a box, and write the change you want, such as “make this three cards” or “add a year-on-year table”. You can leave as many as you like. When you are done, tell the agent “apply comments” (in Claude Code you can also type /apply-comments); it goes through them one by one, and each comment disappears once it is done.',
170
+ },
171
+ ],
172
+ },
173
+ ],
174
+ },
175
+ {
176
+ id: 'guide-finish',
177
+ title: 'Finish',
178
+ parent: 'guide',
179
+ blocks: [
180
+ {
181
+ kind: 'list',
182
+ items: [
183
+ {
184
+ strong: 'Self-check',
185
+ text: ': in the “{board}”, click “{selfCheck}” to look for type that is too small, content that runs off the page, text that crosses the edge, and missing speaker notes.',
186
+ },
187
+ {
188
+ strong: 'Present',
189
+ text: ': “{present}” at the top right of the editor goes full screen; the presenter view shows the current page, the next page, the notes and a timer.',
190
+ },
191
+ {
192
+ strong: 'Export',
193
+ text: ': PDF, PPTX (the text stays editable) and a web page. Sharing and backups are in the sections below.',
194
+ },
195
+ ],
196
+ },
197
+ ],
198
+ },
199
+ {
200
+ id: 'guide-faq',
201
+ title: 'Common questions',
202
+ parent: 'guide',
203
+ blocks: [
204
+ {
205
+ kind: 'list',
206
+ items: [
207
+ {
208
+ strong: 'The agent says it is done, but the browser shows nothing',
209
+ text: ': check that the agent opened the LemonRiver folder, then refresh the home page.',
210
+ },
211
+ {
212
+ strong:
213
+ 'What the agent wrote does not look like slides, or it edited the wrong files',
214
+ text: ': tell it “read the AGENTS.md in this folder first and follow its rules”.',
215
+ },
216
+ {
217
+ strong: 'I broke something',
218
+ text: ': ⌘Z undoes changes made in the interface; before a big change, “{duplicate}” a deck on the home page as a spare; deleted decks stay in the trash for 30 days.',
219
+ },
220
+ {
221
+ strong: 'My comments did nothing',
222
+ text: ': comments are only notes until you tell the agent to “apply comments”.',
223
+ },
224
+ ],
225
+ },
226
+ ],
227
+ },
25
228
  {
26
229
  id: 'share',
27
230
  title: 'Share a deck with someone',
@@ -447,6 +650,19 @@ export const enHelp: LrText['help'] = {
447
650
 
448
651
  export const en: LrText = {
449
652
  help: enHelp,
653
+ guide: {
654
+ promptTitle: 'How do you want to use LemonRiver?',
655
+ promptIntro:
656
+ 'Your own AI agent writes the slides; common ones from China and elsewhere both work. Pick a way to work and we will walk you through it.',
657
+ cardAgentTitle: 'Talk to your agent',
658
+ cardAgentBody: 'Type in the agent; it creates the deck and changes each page.',
659
+ cardUiTitle: 'Edit in the interface',
660
+ cardUiBody:
661
+ 'Change text, styles and images yourself, and leave comments for the agent when you cannot.',
662
+ skip: 'Skip for now — you can find this later under “Usage guide” in the sidebar.',
663
+ sidebar: 'Usage guide',
664
+ startHint: 'How do I start?',
665
+ },
450
666
  board: {
451
667
  title: 'Story board',
452
668
  openBoard: 'Story board (B)',
@@ -721,14 +937,15 @@ export const en: LrText = {
721
937
  },
722
938
  agents: {
723
939
  title: 'Agents',
724
- hint: 'Claude Code and Codex are always on. Turn on another agent you have installed and it shows up in the panel’s model menu.',
940
+ hint: 'Claude Code and Codex are always on and appear in the panel’s model menu.',
725
941
  detected: 'Found',
726
942
  missing: 'Not installed',
727
943
  missingHint: 'Not found — install it, then reopen this page.',
728
944
  alwaysOn: 'Always on',
729
945
  unlock: 'Turn on {name}',
730
- dumateReason:
731
- 'DuMate can’t be called from here yet: it ships as a desktop app only, with no command line another program can start.',
946
+ ownWindow:
947
+ 'Agents with their own window, like WorkBuddy and DuMate: open LemonRiver’s folder inside them to use it.',
948
+ ownWindowLink: 'How?',
732
949
  saveFailed: 'Couldn’t save — try again.',
733
950
  },
734
951
  feedback: {
@@ -763,7 +980,7 @@ export const en: LrText = {
763
980
  designDense: 'More content',
764
981
  reviewStrict: 'Check everything',
765
982
  reviewNumbers: 'Numbers only',
766
- replayOnboarding: 'See the welcome again',
983
+ replayOnboarding: 'Walk through the guide again',
767
984
  directNotice:
768
985
  'Set to start on its own: building begins as soon as the outline is ready. You can change this in Settings.',
769
986
  confirmPage: 'Page {k} is done — check it, then press Continue',
@@ -3,6 +3,19 @@ import type { LrText } from './types';
3
3
 
4
4
  export const es: LrText = {
5
5
  help: enHelp,
6
+ guide: {
7
+ promptTitle: 'How do you want to use LemonRiver?',
8
+ promptIntro:
9
+ 'Your own AI agent writes the slides; common ones from China and elsewhere both work. Pick a way to work and we will walk you through it.',
10
+ cardAgentTitle: 'Talk to your agent',
11
+ cardAgentBody: 'Type in the agent; it creates the deck and changes each page.',
12
+ cardUiTitle: 'Edit in the interface',
13
+ cardUiBody:
14
+ 'Change text, styles and images yourself, and leave comments for the agent when you cannot.',
15
+ skip: 'Skip for now — you can find this later under “Usage guide” in the sidebar.',
16
+ sidebar: 'Usage guide',
17
+ startHint: 'How do I start?',
18
+ },
6
19
  board: {
7
20
  title: 'Tablero de la historia',
8
21
  openBoard: 'Tablero de la historia (B)',
@@ -271,14 +284,15 @@ export const es: LrText = {
271
284
  },
272
285
  agents: {
273
286
  title: 'Agentes',
274
- hint: 'Claude Code y Codex siempre están activos. Activa otro agente que tengas instalado y aparecerá en el menú de modelos del panel.',
287
+ hint: 'Claude Code y Codex siempre están activos y aparecen en el menú de modelos del panel.',
275
288
  detected: 'Detectado',
276
289
  missing: 'No instalado',
277
290
  missingHint: 'No se encontró: instálalo y vuelve a abrir esta página.',
278
291
  alwaysOn: 'Siempre activo',
279
292
  unlock: 'Activar {name}',
280
- dumateReason:
281
- 'DuMate todavía no se puede usar desde aquí: solo existe como aplicación de escritorio, sin una línea de comandos que otro programa pueda iniciar.',
293
+ ownWindow:
294
+ 'Agentes con ventana propia, como WorkBuddy y DuMate: abre la carpeta de LemonRiver dentro de ellos para usarlos.',
295
+ ownWindowLink: '¿Cómo?',
282
296
  saveFailed: 'No se guardó. Inténtalo de nuevo.',
283
297
  },
284
298
  feedback: {
@@ -314,7 +328,7 @@ export const es: LrText = {
314
328
  designDense: 'Más contenido',
315
329
  reviewStrict: 'Revisar todo',
316
330
  reviewNumbers: 'Solo los números',
317
- replayOnboarding: 'Ver de nuevo la bienvenida',
331
+ replayOnboarding: 'Ver la guía de nuevo',
318
332
  directNotice:
319
333
  'Está en empezar solo: la maquetación arranca en cuanto el esquema esté listo. Puedes cambiarlo en Ajustes.',
320
334
  confirmPage: 'La página {k} está lista: revísala y pulsa Continuar',
@@ -3,6 +3,19 @@ import type { LrText } from './types';
3
3
 
4
4
  export const ja: LrText = {
5
5
  help: enHelp,
6
+ guide: {
7
+ promptTitle: 'How do you want to use LemonRiver?',
8
+ promptIntro:
9
+ 'Your own AI agent writes the slides; common ones from China and elsewhere both work. Pick a way to work and we will walk you through it.',
10
+ cardAgentTitle: 'Talk to your agent',
11
+ cardAgentBody: 'Type in the agent; it creates the deck and changes each page.',
12
+ cardUiTitle: 'Edit in the interface',
13
+ cardUiBody:
14
+ 'Change text, styles and images yourself, and leave comments for the agent when you cannot.',
15
+ skip: 'Skip for now — you can find this later under “Usage guide” in the sidebar.',
16
+ sidebar: 'Usage guide',
17
+ startHint: 'How do I start?',
18
+ },
6
19
  board: {
7
20
  title: 'ストーリーボード',
8
21
  openBoard: 'ストーリーボード (B)',
@@ -268,14 +281,15 @@ export const ja: LrText = {
268
281
  },
269
282
  agents: {
270
283
  title: 'エージェント',
271
- hint: 'Claude Code と Codex は常に有効です。インストール済みの別のエージェントをここでオンにすると、パネルのモデルメニューに表示されます。',
284
+ hint: 'Claude Code と Codex は常に有効で、パネルのモデルメニューに表示されます。',
272
285
  detected: '検出済み',
273
286
  missing: '未インストール',
274
287
  missingHint: '見つかりません。インストールしてから、このページを開き直してください。',
275
288
  alwaysOn: '常に有効',
276
289
  unlock: '{name} をオンにする',
277
- dumateReason:
278
- 'DuMate はまだここから呼び出せません。デスクトップアプリのみで、他のプログラムが起動できるコマンドラインがありません。',
290
+ ownWindow:
291
+ 'WorkBuddy や DuMate のように独自のウィンドウを持つエージェントは、その中で LemonRiver のフォルダを開いて使います。',
292
+ ownWindowLink: '使い方を見る',
279
293
  saveFailed: '保存できませんでした。もう一度お試しください。',
280
294
  },
281
295
  feedback: {
@@ -311,7 +325,7 @@ export const ja: LrText = {
311
325
  designDense: '情報多め',
312
326
  reviewStrict: '細かくチェック',
313
327
  reviewNumbers: '数字だけ',
314
- replayOnboarding: 'ウェルカムをもう一度見る',
328
+ replayOnboarding: 'ガイドをもう一度見る',
315
329
  directNotice:
316
330
  'そのまま作成に設定中:アウトラインができると自動で始まります。設定で変更できます。',
317
331
  confirmPage: 'ページ {k} ができました。確認して「続ける」を押してください',
@@ -5,6 +5,17 @@ import type { HelpContent } from '../help/model.ts';
5
5
 
6
6
  export type LrText = {
7
7
  help: HelpContent;
8
+ guide: {
9
+ promptTitle: string;
10
+ promptIntro: string;
11
+ cardAgentTitle: string;
12
+ cardAgentBody: string;
13
+ cardUiTitle: string;
14
+ cardUiBody: string;
15
+ skip: string;
16
+ sidebar: string;
17
+ startHint: string;
18
+ };
8
19
  board: {
9
20
  title: string;
10
21
  openBoard: string;
@@ -299,7 +310,8 @@ export type LrText = {
299
310
  alwaysOn: string;
300
311
  /** template: "Turn on {name}" */
301
312
  unlock: string;
302
- dumateReason: string;
313
+ ownWindow: string;
314
+ ownWindowLink: string;
303
315
  saveFailed: string;
304
316
  };
305
317
  feedback: {