@lemonriver/core 1.1.0 → 1.3.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 (98) hide show
  1. package/dist/{build-Dm7gVRhb.js → build-CSkdswfd.js} +1 -1
  2. package/dist/cli/bin.js +5 -5
  3. package/dist/{config-CubOIzrs.js → config-C5-myPY6.js} +129 -2
  4. package/dist/{dev-DgLeXPqp.js → dev-DHtYH8sw.js} +2 -2
  5. package/dist/{mcp-CjYDzcJa.js → mcp-B2UeO1un.js} +1 -1
  6. package/dist/{preview-CxXQpPk5.js → preview-C1B6-umF.js} +1 -1
  7. package/dist/{update-b1dSg_FW.js → update-DzL8fpcI.js} +1 -1
  8. package/dist/vite/index.js +1 -1
  9. package/package.json +5 -2
  10. package/release-notes.json +33 -0
  11. package/src/app/components/player.tsx +6 -1
  12. package/src/app/lemonriver/chrome/app-chrome.tsx +52 -0
  13. package/src/app/lemonriver/chrome/sidebar-extras.tsx +8 -1
  14. package/src/app/lemonriver/feedback/dialog.tsx +222 -0
  15. package/src/app/lemonriver/feedback/export.ts +21 -2
  16. package/src/app/lemonriver/feedback/first-success.ts +30 -0
  17. package/src/app/lemonriver/feedback/install.ts +18 -0
  18. package/src/app/lemonriver/feedback/model.ts +88 -0
  19. package/src/app/lemonriver/help/help-page.tsx +16 -1
  20. package/src/app/lemonriver/links.ts +16 -0
  21. package/src/app/lemonriver/present/dual-screen.ts +154 -0
  22. package/src/app/lemonriver/present/presenter-blocked-hint.tsx +28 -0
  23. package/src/app/lemonriver/present/wake-lock.ts +74 -0
  24. package/src/app/lemonriver/settings/backup-section.tsx +13 -0
  25. package/src/app/lemonriver/settings/settings-page.tsx +20 -0
  26. package/src/app/lemonriver/share/editor-share.tsx +6 -3
  27. package/src/app/lemonriver/share/share-dialog.tsx +2 -0
  28. package/src/app/lemonriver/text/en.ts +48 -0
  29. package/src/app/lemonriver/text/es.ts +45 -0
  30. package/src/app/lemonriver/text/ja.ts +44 -0
  31. package/src/app/lemonriver/text/types.ts +48 -0
  32. package/src/app/lemonriver/text/zh-cn.ts +48 -0
  33. package/src/app/lemonriver/text/zh-tw.ts +48 -0
  34. package/src/app/lemonriver/theme/pages.ts +4 -0
  35. package/src/app/lemonriver/update/release-notes.ts +22 -0
  36. package/src/app/lemonriver/update/update-prompt.tsx +28 -4
  37. package/src/app/routes/presenter.tsx +2 -0
  38. package/src/app/routes/slide.tsx +14 -1
  39. package/src/app/components/note-markdown.test.tsx +0 -42
  40. package/src/app/components/thumbnail-rail-scroll.test.ts +0 -60
  41. package/src/app/lemonriver/agent-prefs/prefs.test.ts +0 -173
  42. package/src/app/lemonriver/backup/guide.test.ts +0 -45
  43. package/src/app/lemonriver/backup/model.test.ts +0 -108
  44. package/src/app/lemonriver/backup/places.test.ts +0 -154
  45. package/src/app/lemonriver/board/blocks/classify.test.ts +0 -209
  46. package/src/app/lemonriver/board/layout.test.ts +0 -245
  47. package/src/app/lemonriver/board/model/agent-tasks.test.ts +0 -200
  48. package/src/app/lemonriver/board/model/apply-prompt.test.ts +0 -121
  49. package/src/app/lemonriver/board/model/cards.test.ts +0 -332
  50. package/src/app/lemonriver/board/model/changes.test.ts +0 -244
  51. package/src/app/lemonriver/board/model/filter.test.ts +0 -50
  52. package/src/app/lemonriver/board/model/history.test.ts +0 -71
  53. package/src/app/lemonriver/board/model/restructure.test.ts +0 -205
  54. package/src/app/lemonriver/board/model/self-check.test.ts +0 -329
  55. package/src/app/lemonriver/board/model/structure.test.ts +0 -350
  56. package/src/app/lemonriver/board/model/timing.test.ts +0 -113
  57. package/src/app/lemonriver/features.test.ts +0 -49
  58. package/src/app/lemonriver/feedback/pending-toast.test.ts +0 -44
  59. package/src/app/lemonriver/feedback/upload.test.ts +0 -26
  60. package/src/app/lemonriver/help/model.test.ts +0 -179
  61. package/src/app/lemonriver/home/brief.test.ts +0 -38
  62. package/src/app/lemonriver/home/drafts.test.ts +0 -23
  63. package/src/app/lemonriver/home/sorting.test.ts +0 -24
  64. package/src/app/lemonriver/home/time.test.ts +0 -33
  65. package/src/app/lemonriver/outline/files.test.ts +0 -90
  66. package/src/app/lemonriver/outline/model.test.ts +0 -751
  67. package/src/app/lemonriver/public-links.test.ts +0 -32
  68. package/src/app/lemonriver/routes.test.tsx +0 -54
  69. package/src/app/lemonriver/share/codes.test.ts +0 -49
  70. package/src/app/lemonriver/share/compare.test.ts +0 -199
  71. package/src/app/lemonriver/share/folder.test.ts +0 -42
  72. package/src/app/lemonriver/share/guide.test.ts +0 -78
  73. package/src/app/lemonriver/share/naming.test.ts +0 -70
  74. package/src/app/lemonriver/share/paths.test.ts +0 -116
  75. package/src/app/lemonriver/share/pdf.test.ts +0 -79
  76. package/src/app/lemonriver/templates/knobs.test.ts +0 -62
  77. package/src/app/lemonriver/templates/model.test.ts +0 -175
  78. package/src/app/lemonriver/templates/preview-content.test.ts +0 -117
  79. package/src/app/lemonriver/templates/recommend.test.ts +0 -71
  80. package/src/app/lemonriver/text/text.test.ts +0 -90
  81. package/src/app/lemonriver/theme/pages.test.ts +0 -74
  82. package/src/app/lemonriver/theme/themes.test.ts +0 -18
  83. package/src/app/lemonriver/trash/api.test.ts +0 -19
  84. package/src/app/lemonriver/update/prompt.test.ts +0 -84
  85. package/src/app/lemonriver/update/version.test.ts +0 -14
  86. package/src/app/lib/asset-filter.test.ts +0 -176
  87. package/src/app/lib/inspector/fiber.test.ts +0 -154
  88. package/src/app/lib/inspector/geometry.test.ts +0 -324
  89. package/src/app/lib/inspector/text-edit-timeline.test.ts +0 -121
  90. package/src/app/lib/note-markdown.test.ts +0 -147
  91. package/src/app/lib/pptx/css.test.ts +0 -205
  92. package/src/app/lib/pptx/ooxml.test.ts +0 -199
  93. package/src/app/lib/pptx/text-lines.test.ts +0 -82
  94. package/src/app/lib/print-ready.test.ts +0 -32
  95. package/src/app/lib/sdk.test.ts +0 -13
  96. package/src/app/lib/transition.test.ts +0 -31
  97. package/src/app/lib/use-document-title.test.ts +0 -14
  98. package/src/app/lib/utils.test.ts +0 -49
@@ -299,6 +299,9 @@ export const es: LrText = {
299
299
  workspaceCopied: 'Copiado',
300
300
  workspaceReveal: 'Mostrar en Finder',
301
301
  workspaceCopiedToast: 'Ruta de la carpeta del espacio de trabajo copiada',
302
+ supportTitle: 'Apoya a LemonRiver',
303
+ supportText: 'LemonRiver es gratis. Si te resulta útil, invítanos a un café.',
304
+ supportButton: 'Buy Me a Coffee',
302
305
  },
303
306
  agents: {
304
307
  title: 'Agentes',
@@ -323,6 +326,43 @@ export const es: LrText = {
323
326
  uploadTooLargeHint: 'Comprime la imagen o elige un archivo más pequeño y súbelo de nuevo.',
324
327
  confirmWho: 'Lemon necesita tu decisión',
325
328
  confirmReview: 'Revisión necesita tu decisión',
329
+ sidebar: 'Comentarios',
330
+ title: 'Comentarios',
331
+ intro:
332
+ 'Se envían estos datos. Nunca el contenido de tus diapositivas ni dónde están los archivos.',
333
+ categoryIssue: 'Algo ha fallado',
334
+ categoryIdea: 'Una función que quiero',
335
+ categoryOther: 'Otro',
336
+ fieldVersion: 'Versión',
337
+ fieldOs: 'Sistema',
338
+ fieldInstall: 'Instalación',
339
+ fieldPage: 'Página',
340
+ fieldError: 'Error',
341
+ separator: ': ',
342
+ unknown: 'Desconocido',
343
+ installApp: 'Instalador',
344
+ installCli: 'Línea de comandos',
345
+ pageHome: 'Inicio',
346
+ pageEditor: 'Editor',
347
+ pageBoard: 'Tablero de la historia',
348
+ pageOutline: 'Esquema',
349
+ pageSettings: 'Ajustes',
350
+ pageHelp: 'Ayuda',
351
+ pageOther: 'Otra página',
352
+ errorExport: 'Error al exportar',
353
+ errorUpdate: 'Error al actualizar',
354
+ errorBackup: 'Error al copiar',
355
+ openForm: 'Abrir el formulario',
356
+ sendEmail: 'Enviar correo',
357
+ copyInfo: 'Copiar estos datos',
358
+ copied: 'Copiado. Pégalo en el formulario.',
359
+ noChannel: 'Los comentarios aún no están abiertos.',
360
+ mailSubject: 'Comentarios sobre LemonRiver: {category}',
361
+ mailBodyPlaceholder: '(Escribe aquí tus comentarios)',
362
+ feedbackThis: 'Informar de este problema',
363
+ firstSuccessTitle: '¿Ha ido bien?',
364
+ smooth: 'Sí',
365
+ notSmooth: 'No',
326
366
  },
327
367
  prefs: {
328
368
  title: 'Preferencias del agente',
@@ -387,6 +427,8 @@ export const es: LrText = {
387
427
  'Reinicia el servidor ahora. Hasta entonces, puede que las páginas que aún no has abierto no se abran.',
388
428
  updatedManual:
389
429
  'Vuelve a ejecutar el comando de inicio. Hasta entonces, puede que las páginas que aún no has abierto no se abran.',
430
+ releaseNotes: 'Esta versión: {first}',
431
+ releaseNotesMore: 'Esta versión: {first} y {n} más',
390
432
  restartNeeded: 'LemonRiver se ha actualizado. Reinicia el servidor para abrir esta página.',
391
433
  restart: 'Reiniciar servidor',
392
434
  failed: 'La actualización no se completó',
@@ -669,4 +711,7 @@ export const es: LrText = {
669
711
  executablesHint: 'Restáurala solo si tú mismo hiciste esta copia.',
670
712
  executablesConfirm: 'Hice yo esta copia',
671
713
  },
714
+ present: {
715
+ presenterBlocked: 'The presenter view was blocked by your browser. Click here to open it.',
716
+ },
672
717
  };
@@ -296,6 +296,9 @@ export const ja: LrText = {
296
296
  workspaceCopied: 'コピーしました',
297
297
  workspaceReveal: 'Finder で表示',
298
298
  workspaceCopiedToast: 'ワークスペースフォルダのパスをコピーしました',
299
+ supportTitle: 'LemonRiver を応援',
300
+ supportText: 'LemonRiver は無料で使えます。役に立ったら、コーヒーをおごってください。',
301
+ supportButton: 'Buy Me a Coffee',
299
302
  },
300
303
  agents: {
301
304
  title: 'エージェント',
@@ -320,6 +323,42 @@ export const ja: LrText = {
320
323
  '画像を圧縮するか小さいファイルを選んで、もう一度アップロードしてください。',
321
324
  confirmWho: 'Lemon が確認したいこと',
322
325
  confirmReview: 'チェックが確認したいこと',
326
+ sidebar: 'フィードバック',
327
+ title: 'フィードバック',
328
+ intro: '次の情報を一緒に送ります。スライドの内容やファイルの場所は送りません。',
329
+ categoryIssue: '困ったこと',
330
+ categoryIdea: 'ほしい機能',
331
+ categoryOther: 'その他',
332
+ fieldVersion: 'LemonRiver のバージョン',
333
+ fieldOs: 'システム',
334
+ fieldInstall: 'インストール方法',
335
+ fieldPage: 'ページ',
336
+ fieldError: 'エラー',
337
+ separator: ':',
338
+ unknown: '不明',
339
+ installApp: 'インストーラー',
340
+ installCli: 'コマンドライン',
341
+ pageHome: 'ホーム',
342
+ pageEditor: 'エディター',
343
+ pageBoard: 'ストーリーボード',
344
+ pageOutline: 'アウトライン',
345
+ pageSettings: '設定',
346
+ pageHelp: 'ヘルプ',
347
+ pageOther: 'その他のページ',
348
+ errorExport: 'エクスポート失敗',
349
+ errorUpdate: '更新失敗',
350
+ errorBackup: 'バックアップ失敗',
351
+ openForm: 'フォームを開く',
352
+ sendEmail: 'メールを送る',
353
+ copyInfo: 'この情報をコピー',
354
+ copied: 'コピーしました。フォームに貼り付けてください。',
355
+ noChannel: 'フィードバックの窓口はまだ開いていません。',
356
+ mailSubject: 'LemonRiver へのフィードバック:{category}',
357
+ mailBodyPlaceholder: '(ここにフィードバックを書いてください)',
358
+ feedbackThis: 'この問題を報告',
359
+ firstSuccessTitle: 'うまくいきましたか?',
360
+ smooth: 'うまくいった',
361
+ notSmooth: 'うまくいかなかった',
323
362
  },
324
363
  prefs: {
325
364
  title: 'Agent の設定',
@@ -384,6 +423,8 @@ export const ja: LrText = {
384
423
  '今すぐサーバーを再起動してください。再起動するまで、まだ開いていないページが開けないことがあります。',
385
424
  updatedManual:
386
425
  '起動コマンドをもう一度実行してください。それまでは、まだ開いていないページが開けないことがあります。',
426
+ releaseNotes: 'このバージョン:{first}',
427
+ releaseNotesMore: 'このバージョン:{first} ほか {n} 件',
387
428
  restartNeeded: 'LemonRiver を更新しました。このページを開くにはサーバーを再起動してください。',
388
429
  restart: 'サーバーを再起動',
389
430
  failed: '更新できませんでした',
@@ -666,4 +707,7 @@ export const ja: LrText = {
666
707
  executablesHint: '自分で作ったバックアップだと確認できた場合だけ復元してください。',
667
708
  executablesConfirm: '自分で作ったバックアップです',
668
709
  },
710
+ present: {
711
+ presenterBlocked: 'The presenter view was blocked by your browser. Click here to open it.',
712
+ },
669
713
  };
@@ -318,6 +318,9 @@ export type LrText = {
318
318
  workspaceCopied: string;
319
319
  workspaceReveal: string;
320
320
  workspaceCopiedToast: string;
321
+ supportTitle: string;
322
+ supportText: string;
323
+ supportButton: string;
321
324
  };
322
325
  agents: {
323
326
  title: string;
@@ -341,6 +344,43 @@ export type LrText = {
341
344
  uploadTooLargeHint: string;
342
345
  confirmWho: string;
343
346
  confirmReview: string;
347
+ sidebar: string;
348
+ title: string;
349
+ intro: string;
350
+ categoryIssue: string;
351
+ categoryIdea: string;
352
+ categoryOther: string;
353
+ fieldVersion: string;
354
+ fieldOs: string;
355
+ fieldInstall: string;
356
+ fieldPage: string;
357
+ fieldError: string;
358
+ separator: string;
359
+ unknown: string;
360
+ installApp: string;
361
+ installCli: string;
362
+ pageHome: string;
363
+ pageEditor: string;
364
+ pageBoard: string;
365
+ pageOutline: string;
366
+ pageSettings: string;
367
+ pageHelp: string;
368
+ pageOther: string;
369
+ errorExport: string;
370
+ errorUpdate: string;
371
+ errorBackup: string;
372
+ openForm: string;
373
+ sendEmail: string;
374
+ copyInfo: string;
375
+ copied: string;
376
+ noChannel: string;
377
+ /** template: "LemonRiver feedback: {category}" */
378
+ mailSubject: string;
379
+ mailBodyPlaceholder: string;
380
+ feedbackThis: string;
381
+ firstSuccessTitle: string;
382
+ smooth: string;
383
+ notSmooth: string;
344
384
  };
345
385
  prefs: {
346
386
  title: string;
@@ -407,6 +447,10 @@ export type LrText = {
407
447
  updated: string;
408
448
  updatedHint: string;
409
449
  updatedManual: string;
450
+ /** template: "This version: {first}" */
451
+ releaseNotes: string;
452
+ /** template: "This version: {first} and {n} more" */
453
+ releaseNotesMore: string;
410
454
  restartNeeded: string;
411
455
  restart: string;
412
456
  failed: string;
@@ -740,4 +784,8 @@ export type LrText = {
740
784
  executablesHint: string;
741
785
  executablesConfirm: string;
742
786
  };
787
+ present: {
788
+ /** Shown inside the slide window when the browser blocked the presenter popup. */
789
+ presenterBlocked: string;
790
+ };
743
791
  };
@@ -218,6 +218,10 @@ export const zhCN: LrText = {
218
218
  strong: '评论没生效',
219
219
  text: ':评论只是记下来,要跟 Agent 说「应用评论」才会改。',
220
220
  },
221
+ {
222
+ strong: '想提意见或遇到问题',
223
+ text: ':点侧栏的「反馈」。',
224
+ },
221
225
  ],
222
226
  },
223
227
  ],
@@ -914,6 +918,9 @@ export const zhCN: LrText = {
914
918
  workspaceCopied: '已复制',
915
919
  workspaceReveal: '在访达里显示',
916
920
  workspaceCopiedToast: '已复制工作区文件夹地址',
921
+ supportTitle: '支持 LemonRiver',
922
+ supportText: 'LemonRiver 免费使用。觉得好用的话,可以请我们喝杯咖啡。',
923
+ supportButton: 'Buy Me a Coffee',
917
924
  },
918
925
  agents: {
919
926
  title: 'Agent',
@@ -935,6 +942,42 @@ export const zhCN: LrText = {
935
942
  uploadTooLargeHint: '压缩图片或者换一个小一点的文件,再重新上传。',
936
943
  confirmWho: '柠檬需要你拿主意',
937
944
  confirmReview: '核对需要你拿主意',
945
+ sidebar: '反馈',
946
+ title: '反馈',
947
+ intro: '会一起带上下面这些信息,不带你的幻灯片内容和文件位置。',
948
+ categoryIssue: '遇到问题',
949
+ categoryIdea: '想要的功能',
950
+ categoryOther: '其它',
951
+ fieldVersion: 'LemonRiver 版本',
952
+ fieldOs: '系统',
953
+ fieldInstall: '安装方式',
954
+ fieldPage: '页面',
955
+ fieldError: '出错',
956
+ separator: ':',
957
+ unknown: '未知',
958
+ installApp: '安装包',
959
+ installCli: '命令行',
960
+ pageHome: '首页',
961
+ pageEditor: '编辑页',
962
+ pageBoard: '故事看板',
963
+ pageOutline: '大纲',
964
+ pageSettings: '设置',
965
+ pageHelp: '帮助',
966
+ pageOther: '其它页面',
967
+ errorExport: '导出失败',
968
+ errorUpdate: '更新失败',
969
+ errorBackup: '备份失败',
970
+ openForm: '填在线表单',
971
+ sendEmail: '发邮件',
972
+ copyInfo: '复制这些信息',
973
+ copied: '信息已复制,粘贴到表单里就行',
974
+ noChannel: '反馈渠道还没开通',
975
+ mailSubject: 'LemonRiver 反馈:{category}',
976
+ mailBodyPlaceholder: '(在这里写你的反馈)',
977
+ feedbackThis: '反馈这个问题',
978
+ firstSuccessTitle: '这次顺利吗?',
979
+ smooth: '顺利',
980
+ notSmooth: '不顺利',
938
981
  },
939
982
  prefs: {
940
983
  title: 'Agent 偏好',
@@ -995,6 +1038,8 @@ export const zhCN: LrText = {
995
1038
  updated: '已更新到 {version}',
996
1039
  updatedHint: '现在重启服务。重启之前,还没打开过的页面可能打不开。',
997
1040
  updatedManual: '重新运行启动命令。在那之前,还没打开过的页面可能打不开。',
1041
+ releaseNotes: '这一版:{first}',
1042
+ releaseNotesMore: '这一版:{first} 等 {n} 项',
998
1043
  restartNeeded: 'LemonRiver 已更新,重启服务后才能打开这一页',
999
1044
  restart: '重启服务',
1000
1045
  failed: '更新没成功',
@@ -1269,4 +1314,7 @@ export const zhCN: LrText = {
1269
1314
  executablesHint: '只有确认这是你自己做的备份,才继续恢复。',
1270
1315
  executablesConfirm: '我确认这是我自己做的备份',
1271
1316
  },
1317
+ present: {
1318
+ presenterBlocked: '演讲者视图被浏览器拦住了,点这里打开',
1319
+ },
1272
1320
  };
@@ -218,6 +218,10 @@ export const zhTW: LrText = {
218
218
  strong: '留言沒生效',
219
219
  text: ':留言只是記下來,要跟 Agent 說「應用留言」才會改。',
220
220
  },
221
+ {
222
+ strong: '想提意見或遇到問題',
223
+ text: ':點側欄的「回饋」。',
224
+ },
221
225
  ],
222
226
  },
223
227
  ],
@@ -914,6 +918,9 @@ export const zhTW: LrText = {
914
918
  workspaceCopied: '已複製',
915
919
  workspaceReveal: '在 Finder 中顯示',
916
920
  workspaceCopiedToast: '已複製工作區資料夾位址',
921
+ supportTitle: '支持 LemonRiver',
922
+ supportText: 'LemonRiver 免費使用。覺得好用的話,可以請我們喝杯咖啡。',
923
+ supportButton: 'Buy Me a Coffee',
917
924
  },
918
925
  agents: {
919
926
  title: 'Agent',
@@ -935,6 +942,42 @@ export const zhTW: LrText = {
935
942
  uploadTooLargeHint: '壓縮圖片或換一個較小的檔案,再重新上傳。',
936
943
  confirmWho: '檸檬需要你做決定',
937
944
  confirmReview: '核對需要你做決定',
945
+ sidebar: '回饋',
946
+ title: '回饋',
947
+ intro: '會一起帶上下面這些資訊,不帶你的簡報內容和檔案位置。',
948
+ categoryIssue: '遇到問題',
949
+ categoryIdea: '想要的功能',
950
+ categoryOther: '其它',
951
+ fieldVersion: 'LemonRiver 版本',
952
+ fieldOs: '系統',
953
+ fieldInstall: '安裝方式',
954
+ fieldPage: '頁面',
955
+ fieldError: '出錯',
956
+ separator: ':',
957
+ unknown: '未知',
958
+ installApp: '安裝包',
959
+ installCli: '命令列',
960
+ pageHome: '首頁',
961
+ pageEditor: '編輯頁',
962
+ pageBoard: '故事看板',
963
+ pageOutline: '大綱',
964
+ pageSettings: '設定',
965
+ pageHelp: '說明',
966
+ pageOther: '其它頁面',
967
+ errorExport: '匯出失敗',
968
+ errorUpdate: '更新失敗',
969
+ errorBackup: '備份失敗',
970
+ openForm: '填線上表單',
971
+ sendEmail: '寄信',
972
+ copyInfo: '複製這些資訊',
973
+ copied: '資訊已複製,貼到表單裡就行',
974
+ noChannel: '回饋管道還沒開通',
975
+ mailSubject: 'LemonRiver 回饋:{category}',
976
+ mailBodyPlaceholder: '(在這裡寫你的回饋)',
977
+ feedbackThis: '回報這個問題',
978
+ firstSuccessTitle: '這次順利嗎?',
979
+ smooth: '順利',
980
+ notSmooth: '不順利',
938
981
  },
939
982
  prefs: {
940
983
  title: 'Agent 偏好',
@@ -995,6 +1038,8 @@ export const zhTW: LrText = {
995
1038
  updated: '已更新到 {version}',
996
1039
  updatedHint: '現在重啟服務。重啟之前,還沒打開過的頁面可能打不開。',
997
1040
  updatedManual: '重新執行啟動指令。在那之前,還沒打開過的頁面可能打不開。',
1041
+ releaseNotes: '這一版:{first}',
1042
+ releaseNotesMore: '這一版:{first} 等 {n} 項',
998
1043
  restartNeeded: 'LemonRiver 已更新,重啟服務後才能開啟這一頁',
999
1044
  restart: '重啟服務',
1000
1045
  failed: '更新沒成功',
@@ -1269,4 +1314,7 @@ export const zhTW: LrText = {
1269
1314
  executablesHint: '只有確認這是你自己做的備份,才繼續還原。',
1270
1315
  executablesConfirm: '我確認這是我自己做的備份',
1271
1316
  },
1317
+ present: {
1318
+ presenterBlocked: '演講者檢視被瀏覽器擋住了,點這裡開啟',
1319
+ },
1272
1320
  };
@@ -8,8 +8,10 @@ export type LrPage =
8
8
  | 'templates'
9
9
  | 'editor'
10
10
  | 'board'
11
+ | 'outline'
11
12
  | 'presenter'
12
13
  | 'preview'
14
+ | 'help'
13
15
  | 'other';
14
16
 
15
17
  /** Pages that wear the lime theme when it is picked; the editor and present views stay fresh. */
@@ -45,7 +47,9 @@ export function pageForPath(pathname: string): LrPage {
45
47
  if (path === '/trash') return 'trash';
46
48
  if (path === '/new') return 'new';
47
49
  if (path === '/templates') return 'templates';
50
+ if (path === '/help') return 'help';
48
51
  if (/^\/s\/[^/]+\/board$/.test(path)) return 'board';
52
+ if (/^\/s\/[^/]+\/outline$/.test(path)) return 'outline';
49
53
  if (/^\/s\/[^/]+\/presenter$/.test(path)) return 'presenter';
50
54
  if (/^\/s\/[^/]+\/preview$/.test(path)) return 'preview';
51
55
  if (/^\/s\/[^/]+$/.test(path)) return 'editor';
@@ -0,0 +1,22 @@
1
+ import { format } from '../../../locale/format';
2
+ import type { LrText } from '../text/types';
3
+
4
+ export async function fetchReleaseNotes(locale: string): Promise<string[]> {
5
+ try {
6
+ const res = await fetch(`/__lr/release-notes?locale=${encodeURIComponent(locale)}`);
7
+ if (!res.ok) return [];
8
+ const body = (await res.json()) as { notes?: unknown };
9
+ return Array.isArray(body.notes)
10
+ ? body.notes.filter((note): note is string => typeof note === 'string')
11
+ : [];
12
+ } catch {
13
+ return [];
14
+ }
15
+ }
16
+
17
+ export function releaseNotesLine(notes: string[], update: LrText['update']): string | null {
18
+ if (notes.length === 0) return null;
19
+ return notes.length === 1
20
+ ? format(update.releaseNotes, { first: notes[0] })
21
+ : format(update.releaseNotesMore, { first: notes[0], n: notes.length - 1 });
22
+ }
@@ -1,9 +1,11 @@
1
1
  import { useEffect, useRef } from 'react';
2
2
  import { useLocation } from 'react-router-dom';
3
3
  import { toast } from 'sonner';
4
- import { format } from '@/lib/use-locale';
4
+ import { Button } from '@/components/ui/button';
5
+ import { format, useLocale } from '@/lib/use-locale';
5
6
  import { useRestartServer } from '@/lib/use-restart-server';
6
7
  import { MASCOT_SRC } from '../brand/mascot';
8
+ import { openFeedback } from '../feedback/dialog';
7
9
  import { useLrText } from '../text';
8
10
  import { NoticeMascot } from './notice-mascot';
9
11
  import {
@@ -14,6 +16,7 @@ import {
14
16
  UPDATE_CHECK_INTERVAL_MS,
15
17
  type UpdateCheck,
16
18
  } from './prompt';
19
+ import { fetchReleaseNotes, releaseNotesLine } from './release-notes';
17
20
  import { markUpdated, rememberNoticeIcons, UPDATE_TOAST_ID } from './state';
18
21
 
19
22
  const TOAST_ID = UPDATE_TOAST_ID;
@@ -38,6 +41,7 @@ async function preloadMascot(src: string): Promise<string | null> {
38
41
  export function UpdatePrompt() {
39
42
  const { pathname } = useLocation();
40
43
  const lr = useLrText();
44
+ const locale = useLocale();
41
45
  const { canRestart, restartServer } = useRestartServer();
42
46
  const phase = useRef<'idle' | 'busy' | 'done'>('idle');
43
47
  const settled = useRef<string | null>(null);
@@ -81,7 +85,20 @@ export function UpdatePrompt() {
81
85
  toast.error(lr.update.failed, {
82
86
  id: TOAST_ID,
83
87
  duration: Infinity,
84
- description: lr.update.failedHint,
88
+ description: (
89
+ <span className="flex flex-col items-start gap-1.5">
90
+ <span>{lr.update.failedHint}</span>
91
+ <Button
92
+ type="button"
93
+ variant="outline"
94
+ size="sm"
95
+ data-lr-feedback-this
96
+ onClick={() => openFeedback({ category: 'issue', errorKind: 'update' })}
97
+ >
98
+ {lr.feedback.feedbackThis}
99
+ </Button>
100
+ </span>
101
+ ),
85
102
  icon: icons.needsYou ? <NoticeMascot src={icons.needsYou} /> : undefined,
86
103
  action: { label: lr.update.retry, onClick: () => void runUpdate(latest) },
87
104
  cancel: { label: lr.update.later, onClick: () => snooze(latest) },
@@ -93,11 +110,18 @@ export function UpdatePrompt() {
93
110
  settled.current = latest;
94
111
  markUpdated(latest);
95
112
  if (cancelled) return;
113
+ const notesLine = releaseNotesLine(await fetchReleaseNotes(locale.id), lr.update);
114
+ if (cancelled) return;
96
115
  toast.success(format(lr.update.updated, { version: latest }), {
97
116
  id: TOAST_ID,
98
117
  duration: Infinity,
99
118
  icon: icons.done ? <NoticeMascot src={icons.done} /> : undefined,
100
- description: canRestart ? lr.update.updatedHint : lr.update.updatedManual,
119
+ description: (
120
+ <span className="flex flex-col gap-1">
121
+ <span>{canRestart ? lr.update.updatedHint : lr.update.updatedManual}</span>
122
+ {notesLine !== null && <span data-lr-release-notes>{notesLine}</span>}
123
+ </span>
124
+ ),
101
125
  action: canRestart
102
126
  ? { label: lr.update.restart, onClick: () => void restartServer() }
103
127
  : undefined,
@@ -136,7 +160,7 @@ export function UpdatePrompt() {
136
160
  cancelled = true;
137
161
  clearInterval(timer);
138
162
  };
139
- }, [pathname, lr, canRestart, restartServer]);
163
+ }, [pathname, lr, locale, canRestart, restartServer]);
140
164
 
141
165
  return null;
142
166
  }
@@ -31,6 +31,7 @@ import {
31
31
  import { PreviewStepHost } from '../components/preview-step-host';
32
32
  import { SlideCanvas } from '../components/slide-canvas';
33
33
  import { isDeckWarmed, markDeckWarmed, SlidePreloadLayer } from '../components/slide-preload-layer';
34
+ import { useScreenWakeLock } from '../lemonriver/present/wake-lock';
34
35
  import { SlidePageProvider } from '../lib/page-context';
35
36
  import { CANVAS_HEIGHT, CANVAS_WIDTH, type SlideModule } from '../lib/sdk';
36
37
  import { loadSlide, slideIds } from '../lib/slides';
@@ -40,6 +41,7 @@ export function Presenter() {
40
41
  const { slideId = '' } = useParams();
41
42
  const { slide, error } = useSlideModule(slideId);
42
43
  useDocumentTitle(slide?.meta?.title);
44
+ useScreenWakeLock(true);
43
45
 
44
46
  // Presenter view is a passive mirror of the projection window. It only
45
47
  // tracks the index it last heard about; navigation buttons send commands
@@ -96,6 +96,10 @@ import { isDeckWarmed, markDeckWarmed, SlidePreloadLayer } from '../components/s
96
96
  import { SlideTransitionLayer } from '../components/slide-transition-layer';
97
97
  import { type ThumbnailActions, ThumbnailRail } from '../components/thumbnail-rail';
98
98
  import { exportFailedHint } from '../lemonriver/feedback/export';
99
+ import {
100
+ clearAudiencePresentation,
101
+ startAudiencePresentation,
102
+ } from '../lemonriver/present/dual-screen';
99
103
  import { ShareMenuEntry } from '../lemonriver/share/editor-share';
100
104
  import { SlideExtensions } from '../lemonriver/slide-extensions';
101
105
  import { exportSlideAsHtml } from '../lib/export-html';
@@ -171,7 +175,7 @@ export function Slide() {
171
175
  },
172
176
  [],
173
177
  );
174
- const present = useCallback(
178
+ const enterPresentation = useCallback(
175
179
  (mode: 'window' | 'fullscreen') => {
176
180
  if (prefersReducedMotion) {
177
181
  setPlayMode(mode);
@@ -189,7 +193,16 @@ export function Slide() {
189
193
  },
190
194
  [prefersReducedMotion],
191
195
  );
196
+ const present = useCallback(
197
+ (mode: 'window' | 'fullscreen') => {
198
+ if (mode === 'fullscreen')
199
+ void startAudiencePresentation(slideId, () => enterPresentation('fullscreen'));
200
+ else enterPresentation(mode);
201
+ },
202
+ [enterPresentation, slideId],
203
+ );
192
204
  const exitPresent = useCallback(() => {
205
+ clearAudiencePresentation();
193
206
  setPlayMode(null);
194
207
  if (!prefersReducedMotion) setCurtain('leaving');
195
208
  }, [prefersReducedMotion]);
@@ -1,42 +0,0 @@
1
- import { renderToStaticMarkup } from 'react-dom/server';
2
- import { describe, expect, it } from 'vitest';
3
- import { NoteMarkdown } from './note-markdown';
4
-
5
- const render = (text: string) => renderToStaticMarkup(<NoteMarkdown text={text} />);
6
-
7
- describe('NoteMarkdown', () => {
8
- it('renders inline markdown as semantic elements', () => {
9
- const html = render('a **bold** and *soft* `cmd`');
10
- expect(html).toContain('<strong class="font-semibold">bold</strong>');
11
- expect(html).toContain('<em>soft</em>');
12
- expect(html).toContain('>cmd</code>');
13
- });
14
-
15
- it('renders headings demoted to h4–h6', () => {
16
- const html = render('# One\n## Two\n### Three');
17
- expect(html).toContain('<h4');
18
- expect(html).toContain('<h5');
19
- expect(html).toContain('<h6');
20
- expect(html).not.toContain('<h1');
21
- });
22
-
23
- it('renders lists with the right element', () => {
24
- expect(render('- a\n- b')).toMatch(/<ul[^>]*>.*<li>a<\/li><li>b<\/li>.*<\/ul>/);
25
- expect(render('1. a\n2. b')).toMatch(/<ol[^>]*>.*<li>a<\/li><li>b<\/li>.*<\/ol>/);
26
- });
27
-
28
- it('joins paragraph lines with <br/> and splits paragraphs', () => {
29
- const html = render('one\ntwo\n\nthree');
30
- expect(html).toMatch(/<p>one<br\/>two<\/p><p>three<\/p>/);
31
- });
32
-
33
- it('keeps escaped delimiters literal in the output', () => {
34
- const html = render('\\*keep\\* the stars');
35
- expect(html).toContain('*keep* the stars');
36
- expect(html).not.toContain('<em>');
37
- });
38
-
39
- it('preserves whitespace via a pre-wrap wrapper', () => {
40
- expect(render('x')).toContain('whitespace-pre-wrap');
41
- });
42
- });
@@ -1,60 +0,0 @@
1
- import { describe, expect, it } from 'vitest';
2
- import {
3
- getCenteredThumbnailScrollTop,
4
- getThumbnailOffscreenDirection,
5
- } from './thumbnail-rail-scroll';
6
-
7
- describe('getThumbnailOffscreenDirection', () => {
8
- const visibleBounds = { visibleTop: 40, visibleBottom: 540 };
9
-
10
- it('reports a thumbnail fully above the visible area', () => {
11
- expect(getThumbnailOffscreenDirection({ itemTop: -80, itemBottom: 40, ...visibleBounds })).toBe(
12
- 'above',
13
- );
14
- });
15
-
16
- it('reports a thumbnail fully below the visible area', () => {
17
- expect(
18
- getThumbnailOffscreenDirection({ itemTop: 540, itemBottom: 660, ...visibleBounds }),
19
- ).toBe('below');
20
- });
21
-
22
- it('keeps the control hidden while a thumbnail is fully visible', () => {
23
- expect(
24
- getThumbnailOffscreenDirection({ itemTop: 120, itemBottom: 240, ...visibleBounds }),
25
- ).toBeNull();
26
- });
27
-
28
- it('keeps the control hidden while either edge remains visible', () => {
29
- expect(
30
- getThumbnailOffscreenDirection({ itemTop: 20, itemBottom: 80, ...visibleBounds }),
31
- ).toBeNull();
32
- expect(
33
- getThumbnailOffscreenDirection({ itemTop: 500, itemBottom: 580, ...visibleBounds }),
34
- ).toBeNull();
35
- });
36
- });
37
-
38
- describe('getCenteredThumbnailScrollTop', () => {
39
- it('centers the thumbnail inside the unobscured viewport', () => {
40
- expect(
41
- getCenteredThumbnailScrollTop({
42
- itemTop: 1040,
43
- itemHeight: 120,
44
- viewportHeight: 600,
45
- topInset: 40,
46
- }),
47
- ).toBe(780);
48
- });
49
-
50
- it('does not scroll before the start of the list', () => {
51
- expect(
52
- getCenteredThumbnailScrollTop({
53
- itemTop: 40,
54
- itemHeight: 120,
55
- viewportHeight: 600,
56
- topInset: 40,
57
- }),
58
- ).toBe(0);
59
- });
60
- });