@lemonriver/core 0.3.0 → 0.5.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 (146) hide show
  1. package/README.md +14 -4
  2. package/dist/{build-Bqo69DWP.js → build-CS1goZxt.js} +1 -1
  3. package/dist/cli/bin.js +4 -4
  4. package/dist/{config-DJ5rkMMg.js → config-BpbcCbUv.js} +3835 -1532
  5. package/dist/{config-teo3kWz7.d.ts → config-CYNOR93W.d.ts} +1 -1
  6. package/dist/{dev-B2FJD5bJ.js → dev-BpYnfgLL.js} +2 -2
  7. package/dist/index.d.ts +2 -2
  8. package/dist/index.js +1 -1
  9. package/dist/locale/index.d.ts +1 -1
  10. package/dist/locale/index.js +1 -1
  11. package/dist/{preview-C93BOZL1.js → preview-HSzPPkSs.js} +1 -1
  12. package/dist/{types-DFK02XVv.d.ts → types-tdaXSyah.d.ts} +1 -0
  13. package/dist/{update-DsxZBtwv.js → update-CMRxtTc9.js} +18 -8
  14. package/dist/vite/index.d.ts +1 -1
  15. package/dist/vite/index.js +1 -1
  16. package/dist/{zh-tw-DwTAZKa6.js → zh-tw-DcrDeKxr.js} +5 -0
  17. package/package.json +2 -2
  18. package/src/agent/prompt.ts +2 -0
  19. package/src/agent/types.ts +14 -2
  20. package/src/app/components/agent/agent-panel.tsx +19 -5
  21. package/src/app/components/agent/connect-view.tsx +1 -1
  22. package/src/app/components/agent/provider-logo.tsx +10 -1
  23. package/src/app/components/player.tsx +105 -23
  24. package/src/app/components/present/curtain.tsx +52 -0
  25. package/src/app/components/present/last-slide-hint.tsx +36 -0
  26. package/src/app/components/sidebar/sidebar-footer.tsx +6 -1
  27. package/src/app/components/thumbnail-rail.tsx +1 -0
  28. package/src/app/lemonriver/agent/lemon.tsx +16 -1
  29. package/src/app/lemonriver/agent/provider-marks.tsx +53 -0
  30. package/src/app/lemonriver/agent-prefs/prefs.test.ts +173 -0
  31. package/src/app/lemonriver/agent-prefs/prefs.ts +137 -0
  32. package/src/app/lemonriver/agent-prefs/use-prefs.ts +36 -0
  33. package/src/app/lemonriver/agent-providers/section.tsx +75 -0
  34. package/src/app/lemonriver/agent-providers/use-providers.ts +61 -0
  35. package/src/app/lemonriver/board/blocks/block-panel.tsx +666 -0
  36. package/src/app/lemonriver/board/blocks/cache.ts +28 -0
  37. package/src/app/lemonriver/board/blocks/change-list.tsx +189 -0
  38. package/src/app/lemonriver/board/blocks/classify.test.ts +204 -0
  39. package/src/app/lemonriver/board/blocks/classify.ts +125 -0
  40. package/src/app/lemonriver/board/blocks/snapshot.ts +86 -0
  41. package/src/app/lemonriver/board/board-canvas.tsx +627 -104
  42. package/src/app/lemonriver/board/board-page.tsx +1687 -91
  43. package/src/app/lemonriver/board/board.css +58 -7
  44. package/src/app/lemonriver/board/layout.test.ts +84 -0
  45. package/src/app/lemonriver/board/layout.ts +112 -11
  46. package/src/app/lemonriver/board/model/agent-tasks.test.ts +200 -0
  47. package/src/app/lemonriver/board/model/agent-tasks.ts +191 -0
  48. package/src/app/lemonriver/board/model/apply-prompt.test.ts +121 -0
  49. package/src/app/lemonriver/board/model/apply-prompt.ts +115 -0
  50. package/src/app/lemonriver/board/model/apply.ts +71 -0
  51. package/src/app/lemonriver/board/model/cards.test.ts +95 -2
  52. package/src/app/lemonriver/board/model/cards.ts +88 -20
  53. package/src/app/lemonriver/board/model/changes.test.ts +244 -0
  54. package/src/app/lemonriver/board/model/changes.ts +268 -0
  55. package/src/app/lemonriver/board/model/filter.test.ts +50 -0
  56. package/src/app/lemonriver/board/model/filter.ts +42 -0
  57. package/src/app/lemonriver/board/model/history.test.ts +71 -0
  58. package/src/app/lemonriver/board/model/history.ts +51 -0
  59. package/src/app/lemonriver/board/model/restructure.test.ts +205 -0
  60. package/src/app/lemonriver/board/model/restructure.ts +169 -0
  61. package/src/app/lemonriver/board/model/structure.test.ts +249 -0
  62. package/src/app/lemonriver/board/model/structure.ts +209 -0
  63. package/src/app/lemonriver/board/model/timing.test.ts +113 -0
  64. package/src/app/lemonriver/board/model/timing.ts +117 -0
  65. package/src/app/lemonriver/board/page-node.tsx +236 -55
  66. package/src/app/lemonriver/board/status-style.ts +25 -0
  67. package/src/app/lemonriver/board/use-board-apply.ts +206 -0
  68. package/src/app/lemonriver/board/use-board-cards.ts +108 -5
  69. package/src/app/lemonriver/board/use-board-changes.ts +108 -0
  70. package/src/app/lemonriver/board/use-board-columns.ts +37 -56
  71. package/src/app/lemonriver/board/use-board-comments.ts +36 -0
  72. package/src/app/lemonriver/board/use-board-restructures.ts +107 -0
  73. package/src/app/lemonriver/board/use-history.ts +86 -0
  74. package/src/app/lemonriver/board/use-page-order.ts +65 -38
  75. package/src/app/lemonriver/board/use-target-minutes.ts +47 -0
  76. package/src/app/lemonriver/board/views/block-readings.tsx +46 -0
  77. package/src/app/lemonriver/board/views/list-view.tsx +356 -0
  78. package/src/app/lemonriver/board/views/progress.tsx +32 -0
  79. package/src/app/lemonriver/board/views/timeline-view.tsx +341 -0
  80. package/src/app/lemonriver/brand/mascot.tsx +86 -0
  81. package/src/app/lemonriver/brand/mascots/design-done.png +0 -0
  82. package/src/app/lemonriver/brand/mascots/design-idle.png +0 -0
  83. package/src/app/lemonriver/brand/mascots/design-needs-you.png +0 -0
  84. package/src/app/lemonriver/brand/mascots/design-working.png +0 -0
  85. package/src/app/lemonriver/brand/mascots/outline-done.png +0 -0
  86. package/src/app/lemonriver/brand/mascots/outline-idle.png +0 -0
  87. package/src/app/lemonriver/brand/mascots/outline-needs-you.png +0 -0
  88. package/src/app/lemonriver/brand/mascots/outline-working.png +0 -0
  89. package/src/app/lemonriver/brand/mascots/research-done.png +0 -0
  90. package/src/app/lemonriver/brand/mascots/research-idle.png +0 -0
  91. package/src/app/lemonriver/brand/mascots/research-needs-you.png +0 -0
  92. package/src/app/lemonriver/brand/mascots/research-working.png +0 -0
  93. package/src/app/lemonriver/brand/mascots/review-done.png +0 -0
  94. package/src/app/lemonriver/brand/mascots/review-idle.png +0 -0
  95. package/src/app/lemonriver/brand/mascots/review-needs-you.png +0 -0
  96. package/src/app/lemonriver/brand/mascots/review-working.png +0 -0
  97. package/src/app/lemonriver/chrome/app-chrome.tsx +2 -0
  98. package/src/app/lemonriver/features.test.ts +5 -0
  99. package/src/app/lemonriver/features.ts +2 -1
  100. package/src/app/lemonriver/home/brief-card.tsx +8 -1
  101. package/src/app/lemonriver/home/home-page.tsx +11 -7
  102. package/src/app/lemonriver/onboarding/onboarding.tsx +182 -0
  103. package/src/app/lemonriver/outline/build-team.tsx +278 -0
  104. package/src/app/lemonriver/outline/describe-page.tsx +380 -0
  105. package/src/app/lemonriver/outline/files.test.ts +90 -0
  106. package/src/app/lemonriver/outline/files.ts +69 -0
  107. package/src/app/lemonriver/outline/model.test.ts +672 -0
  108. package/src/app/lemonriver/outline/model.ts +455 -0
  109. package/src/app/lemonriver/outline/outline-page.tsx +537 -0
  110. package/src/app/lemonriver/outline/pending-pages.tsx +39 -0
  111. package/src/app/lemonriver/outline/rule.ts +3 -0
  112. package/src/app/lemonriver/outline/steps.tsx +43 -0
  113. package/src/app/lemonriver/outline/use-build-driver.ts +258 -0
  114. package/src/app/lemonriver/routes.test.tsx +6 -6
  115. package/src/app/lemonriver/routes.tsx +28 -0
  116. package/src/app/lemonriver/settings/settings-page.tsx +214 -0
  117. package/src/app/lemonriver/slide-extensions.tsx +45 -26
  118. package/src/app/lemonriver/text/en.ts +320 -0
  119. package/src/app/lemonriver/text/es.ts +311 -0
  120. package/src/app/lemonriver/text/ja.ts +313 -0
  121. package/src/app/lemonriver/text/text.test.ts +33 -0
  122. package/src/app/lemonriver/text/types.ts +339 -0
  123. package/src/app/lemonriver/text/zh-cn.ts +307 -0
  124. package/src/app/lemonriver/text/zh-tw.ts +307 -0
  125. package/src/app/lemonriver/theme/app.css +12 -1
  126. package/src/app/lemonriver/theme/lemon-icon.tsx +6 -0
  127. package/src/app/lemonriver/theme/pages.test.ts +4 -0
  128. package/src/app/lemonriver/theme/pages.ts +11 -2
  129. package/src/app/lemonriver/theme/theme-menu.tsx +3 -2
  130. package/src/app/lemonriver/theme/use-theme.tsx +2 -2
  131. package/src/app/lemonriver/update/beta-badge.tsx +26 -0
  132. package/src/app/lemonriver/update/prompt.test.ts +84 -0
  133. package/src/app/lemonriver/update/prompt.ts +48 -0
  134. package/src/app/lemonriver/update/update-prompt.tsx +113 -0
  135. package/src/app/lib/agent/use-agent.ts +4 -3
  136. package/src/app/routes/home.tsx +13 -5
  137. package/src/app/routes/slide.tsx +71 -14
  138. package/src/locale/en.ts +1 -0
  139. package/src/locale/es.ts +1 -0
  140. package/src/locale/ja.ts +1 -0
  141. package/src/locale/types.ts +1 -0
  142. package/src/locale/zh-cn.ts +1 -0
  143. package/src/locale/zh-tw.ts +1 -0
  144. package/src/app/assets/open-slide.svg +0 -39
  145. package/src/app/favicon.ico +0 -0
  146. package/src/app/favicon.svg +0 -39
@@ -33,6 +33,150 @@ export const zhTW: LrText = {
33
33
  showLinks: '顯示關聯線',
34
34
  hideLinks: '隱藏關聯線',
35
35
  removeLink: '刪除這條關聯',
36
+ undo: '復原',
37
+ redo: '重做',
38
+ undoUnavailable: '這一步刪掉的那一頁原文讀不到了,不能復原',
39
+ undoFailed: '復原失敗',
40
+ addChapter: '新增一章',
41
+ newChapterTitle: '新章節',
42
+ deleteChapter: '刪除這一章',
43
+ moveChapter: '拖動這一章調整順序',
44
+ collapse: '收合這一章',
45
+ expand: '展開這一章',
46
+ selected: '已選 {n} 張',
47
+ deleteSelectedTitle: '刪除 {n} 頁?',
48
+ deleteSelectedHint: '刪掉以後可以復原。',
49
+ clearSelection: '取消選取',
50
+ sizeLarge: '大縮圖',
51
+ sizeSmall: '小縮圖',
52
+ sizeTitle: '只看標題',
53
+ filter: '篩選',
54
+ filterStatus: '依狀態',
55
+ filterMemo: '有備註',
56
+ filterComments: '有未處理的評論',
57
+ filterClear: '清除篩選',
58
+ blockPanel: '頁內塊',
59
+ blockPanelEmpty: '點一張卡片,看它裡面的塊',
60
+ blockKinds: {
61
+ title: '標題',
62
+ point: '要點',
63
+ text: '正文',
64
+ image: '圖片',
65
+ chart: '圖表',
66
+ quote: '引用',
67
+ number: '數字',
68
+ },
69
+ blockDrag: '拖動這一塊',
70
+ blockMenu: '這一塊的更多操作',
71
+ blockPageOption: '第 {n} 頁',
72
+ moveBlockTo: '移到第幾頁',
73
+ parkBlock: '放進待用區',
74
+ unparkBlockTo: '放回第幾頁',
75
+ parking: '待用區({n})',
76
+ parkingEmpty: '把暫時不用的塊拖到這裡',
77
+ blockPending: '待套用',
78
+ blockFrom: '來自第 {n} 頁',
79
+ pageChanges: { one: '{n} 處待改', other: '{n} 處待改' },
80
+ changes: '改動({n})',
81
+ changeRemove: '撤掉這一條',
82
+ changeStale: '這一頁改過了,找不到原來的塊',
83
+ changeToPage: '第 {from} 頁「{block}」→ 第 {to} 頁',
84
+ changeToParking: '第 {from} 頁「{block}」→ 待用區',
85
+ changeFromParking: '待用區「{block}」→ 第 {to} 頁',
86
+ changeReorder: '第 {n} 頁內換了順序',
87
+ wholeBadge: '整頁',
88
+ whole: {
89
+ steps: '這一頁有分步出現的動畫,只能整頁移動',
90
+ empty: '這一頁讀不出可以單獨挪的內容',
91
+ tooMany: '這一頁內容太多,只能整頁移動',
92
+ tooLarge: '這一頁太複雜,只能整頁移動',
93
+ },
94
+ parkNeedsSource: '這一塊畫在別的檔案裡,只能在頁之間挪,不能放進待用區',
95
+ blockKindN: '{kind} {n}',
96
+ splitPage: '拆成新的一頁',
97
+ mergePages: '合成一頁',
98
+ changeSplit: {
99
+ one: '第 {n} 頁拆出 {k} 塊成新的一頁',
100
+ other: '第 {n} 頁拆出 {k} 塊成新的一頁',
101
+ },
102
+ changeMerge: '第 {a} 頁和第 {b} 頁合成一頁',
103
+ restructureReplaced: '這一頁之前的拆合記錄已被替換',
104
+ apply: '交給 Agent 套用',
105
+ applyNeedsAgent: '連上 Agent 後才能套用,清單會一直留著',
106
+ applyStale: '先處理標紅的條目',
107
+ applyBuilding: '正在按大綱排版,排完再套用',
108
+ applying: 'Agent 正在套用…',
109
+ applyDone: '改完了',
110
+ applyUndo: '撤銷這次套用',
111
+ applyUndoLast: '撤銷上次套用',
112
+ applyUndoConfirm: {
113
+ title: '把這份簡報恢復到套用之前?',
114
+ body: '之後手動做的修改也會一起撤掉。',
115
+ confirm: '恢復',
116
+ },
117
+ applyUndone: '已恢復',
118
+ applyFailed: '沒有改完:{reason}',
119
+ applyStalled: '套用沒有完成',
120
+ applyCancel: '放棄這次套用',
121
+ askAgent: '叫 Agent',
122
+ askRewrite: '重寫這頁',
123
+ askChart: '改成圖表',
124
+ askMemo: '按備註改',
125
+ askExpand: '擴成兩頁',
126
+ askNeedsAgent: '先連上 Agent',
127
+ askBuilding: '正在按大綱排版',
128
+ askBusy: '已有一件事在做',
129
+ askHasChanges: '先套用或撤掉這一頁的待改',
130
+ askNeedsMemo: '先在卡片上寫備註',
131
+ askingPage: {
132
+ rewrite: 'Agent 正在重寫第 {n} 頁…',
133
+ chart: 'Agent 正在把第 {n} 頁改成圖表…',
134
+ memo: 'Agent 正在按備註改第 {n} 頁…',
135
+ expand: 'Agent 正在把第 {n} 頁擴成兩頁…',
136
+ },
137
+ planningChapter: 'Agent 正在出第 {n} 章的標題…',
138
+ writingChapter: 'Agent 正在寫第 {n} 章…',
139
+ askDone: '第 {n} 頁改好了',
140
+ askExpanded: '第 {n} 頁擴成了兩頁',
141
+ chapterWritten: '第 {n} 章寫好了 {k} 頁',
142
+ undoTask: '撤銷這次',
143
+ fillChapter: '讓 Agent 補齊這一章',
144
+ chapterBrief: '這一章講什麼',
145
+ chapterCount: '要幾頁',
146
+ planChapter: '先出標題',
147
+ planning: '正在出標題…',
148
+ viewPlan: '看標題({n})',
149
+ writeChapter: '開始寫這 {n} 頁',
150
+ dropPlan: '不要了',
151
+ planFailed: 'Agent 沒有給出這一章的標題',
152
+ retryPlan: '再試一次',
153
+ addPlanItem: '再加一條',
154
+ planRemove: '刪掉',
155
+ planMoveUp: '上移',
156
+ planMoveDown: '下移',
157
+ dragPage: '拖動這一頁',
158
+ viewCards: '卡片',
159
+ viewList: '列表',
160
+ viewTimeline: '時間軸',
161
+ totalDuration: '約 {d}',
162
+ target: '目標(分鐘)',
163
+ overTarget: '超出 {d}',
164
+ underTarget: '還剩 {d}',
165
+ basisNotes: '依講稿',
166
+ basisPage: '依頁面文字',
167
+ basisNone: '估不出,用最少時長',
168
+ progress: '{done}/{total} 完成',
169
+ progressReview: '{n} 待審',
170
+ linkCause: '因果',
171
+ linkContrast: '對比',
172
+ linkEcho: '前後呼應',
173
+ linkEchoShort: '呼應',
174
+ linkRelation: '這條關聯',
175
+ linkPlain: '一般關聯',
176
+ jumpToPage: '跳到第 {n} 頁',
177
+ durationSeconds: '{s} 秒',
178
+ durationMinSec: '{m} 分 {s} 秒',
179
+ durationMinutes: '{m} 分鐘',
36
180
  },
37
181
  theme: {
38
182
  lime: '青檸沉浸',
@@ -40,6 +184,7 @@ export const zhTW: LrText = {
40
184
  shell: {
41
185
  newDeck: '新增投影片',
42
186
  newDeckCard: '新增投影片',
187
+ newDeckGuided: '按步驟新增',
43
188
  settings: '設定',
44
189
  trash: '回收站',
45
190
  offline: '本機服務中斷了。重新執行啟動命令後,這個頁面會自動連上。',
@@ -90,6 +235,17 @@ export const zhTW: LrText = {
90
235
  reduceMotion: '減少動態效果',
91
236
  reduceMotionHint: '檸檬不再漂浮和彈跳,介面動畫也一併關閉。系統設了減少動態效果時也會開啟。',
92
237
  },
238
+ agents: {
239
+ title: 'Agent',
240
+ hint: 'Claude Code 和 Codex 一直在。裝了別的 Agent 可以在這裡打開,打開後會出現在 Agent 面板的模型選單裡。',
241
+ detected: '已偵測到',
242
+ missing: '沒裝',
243
+ missingHint: '沒找到,裝好後重新打開這一頁。',
244
+ alwaysOn: '一直開著',
245
+ unlock: '打開 {name}',
246
+ dumateReason: 'DuMate 還不能從這裡呼叫:它只有桌面版,沒有別的程式能啟動的命令列。',
247
+ saveFailed: '沒儲存成功,再試一次。',
248
+ },
93
249
  feedback: {
94
250
  notFoundHint: '可能連結過期了,或這份投影片已被刪除。',
95
251
  backHome: '回到投影片',
@@ -97,5 +253,156 @@ export const zhTW: LrText = {
97
253
  uploadTooLarge: '檔案超過 {limit} MB',
98
254
  uploadTooLargeHint: '壓縮圖片或換一個較小的檔案,再重新上傳。',
99
255
  confirmWho: '檸檬需要你做決定',
256
+ confirmReview: '核對需要你做決定',
257
+ },
258
+ prefs: {
259
+ title: 'Agent 偏好',
260
+ hint: '決定檸檬什麼時候停下來問你,什麼時候直接做。',
261
+ confirmEachPage: '每頁排完等我確認',
262
+ confirmEachPageHint: '關閉後整份排完才通知你。',
263
+ askOnMismatch: '數字對不上時問我',
264
+ askOnMismatchHint: '關閉後預設用你上傳的表格裡的數字。',
265
+ autoImages: '自動配圖',
266
+ autoImagesHint: '只用圖示和圖片佔位,不會編造你沒給的照片。',
267
+ tone: '預設語氣',
268
+ toneSteady: '穩重專業',
269
+ toneFriendly: '輕鬆友善',
270
+ toneConcise: '簡潔有力',
271
+ researchUploads: '只讀我上傳的',
272
+ researchWeb: '也可以連網查',
273
+ outlineReview: '先給我看大綱',
274
+ outlineDirect: '直接排版',
275
+ designVisual: '少字多圖',
276
+ designBalanced: '圖文均衡',
277
+ designDense: '資訊密集',
278
+ reviewStrict: '嚴格核對',
279
+ reviewNumbers: '只查數字',
280
+ replayOnboarding: '重新看一遍新手引導',
281
+ directNotice: '已設為直接排版:大綱列好後會自動開始。可以在設定裡改。',
282
+ confirmPage: '第 {k} 頁排好了,看看沒問題就點繼續',
283
+ decisionsTitle: '核對時你定的',
284
+ decisionEvent: '核對:{question} → {answer}',
285
+ },
286
+ onboarding: {
287
+ step1Title: '你說主題,檸檬寫簡報',
288
+ step1Body: '先列大綱給你看,你點頭了才開始排版。排的時候隨時能暫停。',
289
+ step2Title: '一個檸檬帶四個幫手',
290
+ researchLine: '讀你給的檔案,挑出要用的數字',
291
+ outlineLine: '排好每頁講什麼',
292
+ designLine: '一頁一頁做出來',
293
+ reviewLine: '對數字、找錯字,拿不準就問你',
294
+ step3Title: '你主要講什麼類型?',
295
+ step3Body: '會按這個給你選預設語氣,以後在設定裡能改。',
296
+ useReport: '工作匯報',
297
+ usePitch: '融資路演',
298
+ useLecture: '課堂講義',
299
+ useLaunch: '產品發布',
300
+ useTraining: '培訓分享',
301
+ useOther: '其他',
302
+ skip: '跳過',
303
+ back: '上一步',
304
+ next: '下一步',
305
+ start: '開始使用',
306
+ progress: '第 {k} / 3 屏',
307
+ },
308
+ update: {
309
+ title: 'LemonRiver {version} 已發布',
310
+ hint: '你現在用的是 {current}。更新會安裝新版本並同步技能,裝完重啟本機服務就生效。',
311
+ now: '立即更新',
312
+ later: '稍後',
313
+ updating: '正在更新…',
314
+ updated: '已更新到 {version}',
315
+ updatedHint: '重啟本機服務後生效。',
316
+ updatedManual: '重新執行啟動指令後生效。',
317
+ restart: '重啟服務',
318
+ failed: '更新沒成功',
319
+ failedHint: '啟動指令所在的終端機裡有錯誤詳情。',
320
+ retry: '重試',
321
+ beta: 'Beta',
322
+ betaTitle: '搶先體驗版',
323
+ betaHint: '功能還在完善,偶爾可能出問題。',
324
+ },
325
+ outline: {
326
+ stepDescribe: '說需求',
327
+ stepOutline: '看大綱',
328
+ stepBuild: '排版',
329
+ stepDone: '完成',
330
+ describeTitle: '今天要講點什麼?',
331
+ describePlaceholder: '比如:給新人講公司的報銷流程',
332
+ pagesLabel: '頁數',
333
+ filesLabel: '參考資料',
334
+ addFile: '新增檔案',
335
+ removeFile: '移除',
336
+ draftOutline: '列大綱',
337
+ startFailed: '沒能開始列大綱',
338
+ tooLargeTitle: '檔案超過 25 MB',
339
+ tooLargeHint: '{name} 有 {size} MB。壓縮圖片後再傳,或者只傳文字版。',
340
+ replaceFile: '換一個檔案',
341
+ lockedTitle: '{name} 打不開',
342
+ lockedHint: '檔案設了密碼。去掉密碼後重新上傳,或者跳過這個檔案繼續。',
343
+ reupload: '重新上傳',
344
+ skipFile: '跳過這個檔案',
345
+ unsupportedTitle: '{name} 讀不了',
346
+ unsupportedHint: '支援 PDF、Word、Excel、PowerPoint、CSV、文字和圖片。',
347
+ drafting: '正在讀 {n} 個檔案,然後列大綱…',
348
+ draftingNoFiles: '正在列大綱…',
349
+ failedTitle: '大綱沒列出來',
350
+ failedHint: '再試一次;還不行就改改需求。',
351
+ failedReason: '原因:{reason}',
352
+ openAgent: '開啟 Agent 面板查看詳情',
353
+ retry: '重試',
354
+ editBrief: '改需求',
355
+ addPage: '加一頁',
356
+ total: '共 {n} 頁',
357
+ build: '按這個排版',
358
+ moveUp: '上移',
359
+ moveDown: '下移',
360
+ removePage: '刪除這一頁',
361
+ dragPage: '拖曳排序',
362
+ pageTitle: '第 {n} 頁標題',
363
+ kindCover: '封面',
364
+ kindKpi: '數字',
365
+ kindChart: '圖表',
366
+ kindList: '要點',
367
+ kindPage: '內容',
368
+ kindEnd: '結尾',
369
+ back: '回到投影片',
370
+ },
371
+ build: {
372
+ lead: '檸檬',
373
+ research: '讀資料',
374
+ outline: '列大綱',
375
+ design: '排版',
376
+ review: '核對',
377
+ readFiles: { one: '讀完 {n} 個檔案', other: '讀完 {n} 個檔案' },
378
+ noFiles: '沒有資料',
379
+ progress: '已排 {k} / {n} 頁',
380
+ statusWorking: '正在排第 {k} 頁',
381
+ statusReview: '正在核對',
382
+ statusPaused: '已暫停,點繼續接著排',
383
+ statusStopped: '等你繼續',
384
+ statusDone: '{n} 頁已生成',
385
+ statusWaiting: '等你回答',
386
+ pause: '暫停',
387
+ resume: '繼續',
388
+ eventPage: '第 {k} 頁排好了',
389
+ eventSaved: '已自動儲存',
390
+ eventReview: '開始核對',
391
+ eventReviewed: '核對完了',
392
+ interruptedTitle: '排到第 {k} 頁停下了',
393
+ interruptedHint: '前 {n} 頁已儲存。',
394
+ interruptedNoAgent: '先連接 Agent,再繼續排版。',
395
+ continue: '繼續排版',
396
+ pending: '待生成',
397
+ pendingPage: '第 {k} 頁 · {title}',
398
+ done: '{n} 頁已生成',
399
+ undo: '復原',
400
+ undoFailed: '沒能復原',
401
+ buildingHere: '正在排版,第 {k} / {n} 頁',
402
+ backToEditor: '回到編輯頁',
403
+ },
404
+ agentModel: {
405
+ followClient: '客戶端設定',
406
+ followClientHint: '使用 {provider} 裡自己設的模型和思考強度。',
100
407
  },
101
408
  };
@@ -160,6 +160,10 @@ html[data-lr-reduce-motion] .lr-mascot {
160
160
  animation: none;
161
161
  }
162
162
 
163
+ html[data-lr-app].dark [data-lr-helper="research"] {
164
+ filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.55));
165
+ }
166
+
163
167
  @keyframes lr-shimmer {
164
168
  to {
165
169
  background-position: -200% 0;
@@ -280,9 +284,16 @@ html[data-lr-app] [data-lr-confirm] {
280
284
  }
281
285
 
282
286
  html[data-lr-app] [data-lr-confirm] button[aria-pressed] {
283
- border-radius: var(--lr-radius-sm);
287
+ border: 1.5px solid var(--lr-border);
288
+ border-radius: 12px;
289
+ padding: 6px 8px;
290
+ }
291
+
292
+ html[data-lr-app] [data-lr-confirm] button[aria-pressed] + button[aria-pressed] {
293
+ margin-top: 6px;
284
294
  }
285
295
 
286
296
  html[data-lr-app] [data-lr-confirm] button[aria-pressed="true"] {
297
+ border-color: var(--lr-accent);
287
298
  background: var(--lr-accent-soft);
288
299
  }
@@ -0,0 +1,6 @@
1
+ import idle from '../brand/mascots/lemon-idle.png';
2
+
3
+ /** The lime theme's menu entry, sized to sit with the lucide icons around it. */
4
+ export function LemonThemeIcon() {
5
+ return <img src={idle} alt="" aria-hidden="true" className="size-3.5 shrink-0 object-contain" />;
6
+ }
@@ -18,6 +18,8 @@ const PATHS = [
18
18
  '/settings',
19
19
  '/trash',
20
20
  '/trash/',
21
+ '/new',
22
+ '/new/',
21
23
  '/s/alpha',
22
24
  '/s/alpha/',
23
25
  '/s/alpha/board',
@@ -33,6 +35,8 @@ describe('pageForPath', () => {
33
35
  expect(pageForPath('/')).toBe('home');
34
36
  expect(pageForPath('/themes/plain')).toBe('themes');
35
37
  expect(pageForPath('/trash/')).toBe('trash');
38
+ expect(pageForPath('/new')).toBe('new');
39
+ expect(pageForPath('/new/')).toBe('new');
36
40
  expect(pageForPath('/s/alpha')).toBe('editor');
37
41
  expect(pageForPath('/s/alpha/board')).toBe('board');
38
42
  expect(pageForPath('/s/alpha/presenter')).toBe('presenter');
@@ -4,6 +4,7 @@ export type LrPage =
4
4
  | 'assets'
5
5
  | 'settings'
6
6
  | 'trash'
7
+ | 'new'
7
8
  | 'editor'
8
9
  | 'board'
9
10
  | 'presenter'
@@ -11,13 +12,20 @@ export type LrPage =
11
12
  | 'other';
12
13
 
13
14
  /** Pages that wear the lime theme when it is picked; the editor and present views stay fresh. */
14
- const BRAND_PAGES: ReadonlySet<LrPage> = new Set(['home', 'themes', 'assets', 'settings', 'trash']);
15
+ const BRAND_PAGES: ReadonlySet<LrPage> = new Set([
16
+ 'home',
17
+ 'themes',
18
+ 'assets',
19
+ 'settings',
20
+ 'trash',
21
+ 'new',
22
+ ]);
15
23
 
16
24
  /**
17
25
  * BRAND_PAGES as a path pattern, for the pre-paint script, which runs before
18
26
  * any module loads. pages.test.ts keeps the two in step.
19
27
  */
20
- export const BRAND_PATH_SOURCE = '^/(themes(/.*)?|assets|settings|trash)?/*$';
28
+ export const BRAND_PATH_SOURCE = '^/(themes(/.*)?|assets|settings|trash|new)?/*$';
21
29
 
22
30
  /** Agent screenshots and thumbnails render through this route; nothing may cover it. */
23
31
  export const PREVIEW_PATH_SOURCE = '^/s/[^/]+/preview/*$';
@@ -33,6 +41,7 @@ export function pageForPath(pathname: string): LrPage {
33
41
  if (path === '/assets') return 'assets';
34
42
  if (path === '/settings') return 'settings';
35
43
  if (path === '/trash') return 'trash';
44
+ if (path === '/new') return 'new';
36
45
  if (/^\/s\/[^/]+\/board$/.test(path)) return 'board';
37
46
  if (/^\/s\/[^/]+\/presenter$/.test(path)) return 'presenter';
38
47
  if (/^\/s\/[^/]+\/preview$/.test(path)) return 'preview';
@@ -1,4 +1,4 @@
1
- import { Citrus, Monitor, Moon, Sun } from 'lucide-react';
1
+ import { Monitor, Moon, Sun } from 'lucide-react';
2
2
  import { useEffect, useState } from 'react';
3
3
  import { IconTooltip, MenuTooltipTrigger } from '@/components/icon-tooltip';
4
4
  import { buttonVariants } from '@/components/ui/button';
@@ -11,6 +11,7 @@ import {
11
11
  import { useLocale } from '@/lib/use-locale';
12
12
  import { cn } from '@/lib/utils';
13
13
  import { useLrText } from '../text';
14
+ import { LemonThemeIcon } from './lemon-icon';
14
15
  import { useTheme } from './use-theme';
15
16
 
16
17
  /** The sidebar's theme button, with the lime theme added. */
@@ -28,7 +29,7 @@ export function ThemeToggle() {
28
29
  { id: 'system', label: t.themeToggle.system, icon: <Monitor /> },
29
30
  { id: 'light', label: t.themeToggle.light, icon: <Sun /> },
30
31
  { id: 'dark', label: t.themeToggle.dark, icon: <Moon /> },
31
- { id: 'lime', label: lr.theme.lime, icon: <Citrus /> },
32
+ { id: 'lime', label: lr.theme.lime, icon: <LemonThemeIcon /> },
32
33
  ];
33
34
 
34
35
  return (
@@ -1,4 +1,3 @@
1
- import { Citrus } from 'lucide-react';
2
1
  import { useTheme as useNextTheme } from 'next-themes';
3
2
  import { useCallback } from 'react';
4
3
  import { flushSync } from 'react-dom';
@@ -6,6 +5,7 @@ import type { CommandSpec } from '@/components/command/command-menu';
6
5
  import { format } from '@/lib/use-locale';
7
6
  import type { Locale } from '../../../locale/types';
8
7
  import { lrTextFor } from '../text';
8
+ import { LemonThemeIcon } from './lemon-icon';
9
9
  import { motionReduced } from './motion';
10
10
 
11
11
  type ViewTransitionDocument = Document & {
@@ -40,7 +40,7 @@ export function lemonRiverAppearanceCommands(
40
40
  {
41
41
  id: 'theme-lime',
42
42
  label: format(t.commandMenu.themeItem, { name: lrTextFor(t.id).theme.lime }),
43
- icon: <Citrus />,
43
+ icon: <LemonThemeIcon />,
44
44
  keywords: ['theme', 'lime', 'appearance'],
45
45
  active: theme === 'lime',
46
46
  run: () => setTheme('lime'),
@@ -0,0 +1,26 @@
1
+ import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
2
+ import { useLrText } from '../text';
3
+
4
+ export function BetaBadge() {
5
+ const t = useLrText().update;
6
+ return (
7
+ <Tooltip>
8
+ <TooltipTrigger
9
+ render={
10
+ <span className="ml-1 shrink-0 cursor-default rounded-[3px] border border-border px-1 py-px font-medium text-[9px] text-muted-foreground uppercase leading-none tracking-wider">
11
+ {t.beta}
12
+ </span>
13
+ }
14
+ />
15
+ <TooltipContent
16
+ side="bottom"
17
+ align="start"
18
+ sideOffset={6}
19
+ className="w-64 px-3 py-2.5 text-left text-pretty"
20
+ >
21
+ <p className="font-medium text-[12px]">{t.betaTitle}</p>
22
+ <p className="mt-1 text-[11.5px] text-background/70 leading-relaxed">{t.betaHint}</p>
23
+ </TooltipContent>
24
+ </Tooltip>
25
+ );
26
+ }
@@ -0,0 +1,84 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import {
3
+ promptsOnPage,
4
+ readSnooze,
5
+ SNOOZE_KEY,
6
+ SNOOZE_MS,
7
+ type Snooze,
8
+ saveSnooze,
9
+ shouldPrompt,
10
+ type UpdateCheck,
11
+ } from './prompt';
12
+
13
+ function memoryStorage(): Storage {
14
+ const map = new Map<string, string>();
15
+ return {
16
+ get length() {
17
+ return map.size;
18
+ },
19
+ clear: () => map.clear(),
20
+ getItem: (k) => map.get(k) ?? null,
21
+ key: (i) => [...map.keys()][i] ?? null,
22
+ removeItem: (k) => {
23
+ map.delete(k);
24
+ },
25
+ setItem: (k, v) => {
26
+ map.set(k, v);
27
+ },
28
+ };
29
+ }
30
+
31
+ const outdated: UpdateCheck = { current: '0.3.0', latest: '9.9.9', outdated: true };
32
+
33
+ describe('shouldPrompt', () => {
34
+ it('stays quiet without an update', () => {
35
+ expect(shouldPrompt(null, null, 0)).toBe(false);
36
+ expect(shouldPrompt({ ...outdated, outdated: false }, null, 0)).toBe(false);
37
+ expect(shouldPrompt({ ...outdated, latest: null }, null, 0)).toBe(false);
38
+ });
39
+
40
+ it('prompts for an outdated version with no snooze', () => {
41
+ expect(shouldPrompt(outdated, null, 0)).toBe(true);
42
+ });
43
+
44
+ it('respects a snooze on the same version until it expires', () => {
45
+ const snooze: Snooze = { version: '9.9.9', until: 1000 };
46
+ expect(shouldPrompt(outdated, snooze, 999)).toBe(false);
47
+ expect(shouldPrompt(outdated, snooze, 1000)).toBe(true);
48
+ });
49
+
50
+ it('prompts again as soon as a newer version ships', () => {
51
+ const snooze: Snooze = { version: '9.9.9', until: 1000 };
52
+ expect(shouldPrompt({ ...outdated, latest: '9.9.10' }, snooze, 0)).toBe(true);
53
+ });
54
+ });
55
+
56
+ describe('snooze storage', () => {
57
+ it('round-trips the version and its deadline', () => {
58
+ const storage = memoryStorage();
59
+ saveSnooze(storage, '9.9.9', 5000);
60
+ expect(readSnooze(storage)).toEqual({ version: '9.9.9', until: 5000 + SNOOZE_MS });
61
+ });
62
+
63
+ it('ignores anything it did not write', () => {
64
+ const storage = memoryStorage();
65
+ storage.setItem(SNOOZE_KEY, 'not json');
66
+ expect(readSnooze(storage)).toBeNull();
67
+ storage.setItem(SNOOZE_KEY, '{"version":"9.9.9"}');
68
+ expect(readSnooze(storage)).toBeNull();
69
+ storage.setItem(SNOOZE_KEY, '{"version":9,"until":1}');
70
+ expect(readSnooze(storage)).toBeNull();
71
+ storage.setItem(SNOOZE_KEY, '{"version":"9.9.9","until":"soon"}');
72
+ expect(readSnooze(storage)).toBeNull();
73
+ });
74
+ });
75
+
76
+ describe('promptsOnPage', () => {
77
+ it('asks on the pages people read and stays off the captures', () => {
78
+ expect(promptsOnPage('/')).toBe(true);
79
+ expect(promptsOnPage('/s/alpha')).toBe(true);
80
+ expect(promptsOnPage('/trash')).toBe(true);
81
+ expect(promptsOnPage('/s/alpha/preview')).toBe(false);
82
+ expect(promptsOnPage('/s/alpha/presenter')).toBe(false);
83
+ });
84
+ });
@@ -0,0 +1,48 @@
1
+ import { pageForPath } from '../theme/pages';
2
+
3
+ export const UPDATE_CHECK_INTERVAL_MS = 60 * 60 * 1000;
4
+ export const SNOOZE_MS = 24 * 60 * 60 * 1000;
5
+ export const SNOOZE_KEY = 'lemonriver:update-snooze';
6
+
7
+ export type UpdateCheck = { current: string; latest: string | null; outdated: boolean };
8
+ export type Snooze = { version: string; until: number };
9
+
10
+ export function shouldPrompt(
11
+ check: UpdateCheck | null,
12
+ snooze: Snooze | null,
13
+ now: number,
14
+ ): boolean {
15
+ if (!check || !check.outdated || !check.latest) return false;
16
+ const snoozed = snooze !== null && snooze.version === check.latest && now < snooze.until;
17
+ return !snoozed;
18
+ }
19
+
20
+ export function readSnooze(storage: Storage): Snooze | null {
21
+ let raw: string | null = null;
22
+ try {
23
+ raw = storage.getItem(SNOOZE_KEY);
24
+ } catch {
25
+ return null;
26
+ }
27
+ if (!raw) return null;
28
+ try {
29
+ const value = JSON.parse(raw) as Record<string, unknown> | null;
30
+ if (!value || typeof value !== 'object') return null;
31
+ if (typeof value.version !== 'string') return null;
32
+ if (typeof value.until !== 'number' || !Number.isFinite(value.until)) return null;
33
+ return { version: value.version, until: value.until };
34
+ } catch {
35
+ return null;
36
+ }
37
+ }
38
+
39
+ export function saveSnooze(storage: Storage, version: string, now: number): void {
40
+ try {
41
+ storage.setItem(SNOOZE_KEY, JSON.stringify({ version, until: now + SNOOZE_MS }));
42
+ } catch {}
43
+ }
44
+
45
+ export function promptsOnPage(pathname: string): boolean {
46
+ const page = pageForPath(pathname);
47
+ return page !== 'preview' && page !== 'presenter';
48
+ }