@lemonriver/core 0.5.0 → 0.6.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 (57) hide show
  1. package/dist/{build-CS1goZxt.js → build-RlcGG-Ve.js} +1 -1
  2. package/dist/cli/bin.js +3 -3
  3. package/dist/{config-BpbcCbUv.js → config-BJT87wE9.js} +1155 -19
  4. package/dist/{dev-BpYnfgLL.js → dev-DR-j_xda.js} +1 -1
  5. package/dist/{preview-HSzPPkSs.js → preview-BTAhTb5B.js} +1 -1
  6. package/dist/vite/index.js +1 -1
  7. package/package.json +1 -1
  8. package/src/app/lemonriver/board/blocks/classify.test.ts +5 -0
  9. package/src/app/lemonriver/board/blocks/classify.ts +29 -2
  10. package/src/app/lemonriver/board/blocks/snapshot.ts +34 -4
  11. package/src/app/lemonriver/board/board-page.tsx +15 -0
  12. package/src/app/lemonriver/board/model/agent-tasks.ts +33 -1
  13. package/src/app/lemonriver/board/model/self-check.test.ts +329 -0
  14. package/src/app/lemonriver/board/model/self-check.ts +489 -0
  15. package/src/app/lemonriver/board/page-node.tsx +23 -1
  16. package/src/app/lemonriver/board/self-check-jump.ts +23 -0
  17. package/src/app/lemonriver/board/self-check-panel.tsx +272 -0
  18. package/src/app/lemonriver/board/self-check-runner.tsx +150 -0
  19. package/src/app/lemonriver/board/use-self-check.ts +117 -0
  20. package/src/app/lemonriver/chrome/filter-pill.tsx +30 -0
  21. package/src/app/lemonriver/chrome/sidebar-extras.tsx +12 -1
  22. package/src/app/lemonriver/features.test.ts +5 -0
  23. package/src/app/lemonriver/features.ts +2 -1
  24. package/src/app/lemonriver/home/deck-card.tsx +10 -0
  25. package/src/app/lemonriver/home/home-page.tsx +55 -6
  26. package/src/app/lemonriver/home/use-deck-times.ts +4 -1
  27. package/src/app/lemonriver/outline/build-team.tsx +42 -0
  28. package/src/app/lemonriver/outline/describe-page.tsx +128 -27
  29. package/src/app/lemonriver/outline/draft.ts +38 -0
  30. package/src/app/lemonriver/outline/model.test.ts +79 -0
  31. package/src/app/lemonriver/outline/model.ts +80 -7
  32. package/src/app/lemonriver/outline/outline-page.tsx +56 -6
  33. package/src/app/lemonriver/outline/pick-style.tsx +282 -0
  34. package/src/app/lemonriver/routes.test.tsx +17 -5
  35. package/src/app/lemonriver/routes.tsx +28 -0
  36. package/src/app/lemonriver/templates/client.ts +60 -0
  37. package/src/app/lemonriver/templates/demo-page.tsx +79 -0
  38. package/src/app/lemonriver/templates/knobs.test.ts +62 -0
  39. package/src/app/lemonriver/templates/knobs.ts +62 -0
  40. package/src/app/lemonriver/templates/library-page.tsx +292 -0
  41. package/src/app/lemonriver/templates/model.test.ts +175 -0
  42. package/src/app/lemonriver/templates/model.ts +339 -0
  43. package/src/app/lemonriver/templates/preview-content.test.ts +117 -0
  44. package/src/app/lemonriver/templates/preview-content.ts +149 -0
  45. package/src/app/lemonriver/templates/recommend.test.ts +71 -0
  46. package/src/app/lemonriver/templates/recommend.ts +72 -0
  47. package/src/app/lemonriver/templates/use-library.ts +58 -0
  48. package/src/app/lemonriver/templates/virtual.d.ts +28 -0
  49. package/src/app/lemonriver/text/en.ts +57 -0
  50. package/src/app/lemonriver/text/es.ts +57 -0
  51. package/src/app/lemonriver/text/ja.ts +57 -0
  52. package/src/app/lemonriver/text/types.ts +73 -0
  53. package/src/app/lemonriver/text/zh-cn.ts +57 -0
  54. package/src/app/lemonriver/text/zh-tw.ts +57 -0
  55. package/src/app/lemonriver/theme/pages.test.ts +4 -0
  56. package/src/app/lemonriver/theme/pages.ts +6 -1
  57. package/src/app/lemonriver/update/prompt.ts +1 -1
@@ -177,6 +177,28 @@ export const zhCN: LrText = {
177
177
  durationSeconds: '{s} 秒',
178
178
  durationMinSec: '{m} 分 {s} 秒',
179
179
  durationMinutes: '{m} 分钟',
180
+ selfCheckPage: '第 {n} 页',
181
+ selfCheck: '自检',
182
+ selfCheckPassed: '自检通过',
183
+ selfCheckFindings: '{n} 处要看看',
184
+ selfCheckTimes: '{n} 处',
185
+ selfCheckHints: '提醒',
186
+ cardFindings: '{n} 处要看',
187
+ selfCheckFix: '交给 Agent 修',
188
+ selfCheckRunning: 'Agent 正在修自检发现的问题…',
189
+ selfCheckDone: '改好了,又查了一遍',
190
+ selfCheckUnread: '第 {pages} 页没读出来,没有查',
191
+ selfCheckUnreadMany: '{n} 页没读出来,没有查',
192
+ selfCheckUnreadBadge: '{n} 页没读',
193
+ selfCheckAgain: '再查一次',
194
+ cardUnread: '没读出来',
195
+ findingTiny: '字太小({size}px)',
196
+ findingSmallBody: '正文小于 24px',
197
+ findingOverflow: '超出页面',
198
+ findingOverlap: '文字压到了别的内容上',
199
+ findingNoNotes: '没有讲稿',
200
+ findingLongTitle: '标题太长({n} 字)',
201
+ findingAccent: '强调色用了 {n} 处',
180
202
  },
181
203
  theme: {
182
204
  lime: '青柠沉浸',
@@ -367,6 +389,41 @@ export const zhCN: LrText = {
367
389
  kindPage: '内容',
368
390
  kindEnd: '结尾',
369
391
  back: '回到幻灯片',
392
+ occasionLabel: '场合',
393
+ audienceLabel: '讲给谁听(可选)',
394
+ audiencePlaceholder: '比如:董事会成员和管理层',
395
+ unsure: '不确定',
396
+ selectedTemplate: '已选模板:{name}',
397
+ removeTemplate: '取消这个模板',
398
+ pickTitle: '挑一个样子',
399
+ pickHint: '用你大纲里的标题和数字画的,选好再开始排版',
400
+ pickBack: '回到大纲',
401
+ pickMore: '换一组',
402
+ pickYou: '你帮我选',
403
+ pickNone: '不用模板',
404
+ pickStart: '用这个样子开始排版',
405
+ pickToast: '用了{name}:{reason}',
406
+ pickSample: '数字是示意',
407
+ pickKnobsFor: '调一调「{name}」',
408
+ knobFormal: '正式 ↔ 活泼',
409
+ knobBright: '素 ↔ 亮',
410
+ knobMotion: '动效少 ↔ 多',
411
+ motionHint: '动效在演示时才看得到',
412
+ },
413
+ templates: {
414
+ title: '模板库',
415
+ subtitle: '模板只决定结构和版式,内容还是 Lemon 按你的需求写。',
416
+ all: '全部',
417
+ pages: '{n} 页',
418
+ emptyTitle: '这个工作区没有模板库',
419
+ emptyHint: '模板库只在开发环境里可用。',
420
+ occasions: '适合的场合',
421
+ audience: '听众',
422
+ object: '借的物件',
423
+ accent: '强调色',
424
+ create: '用这个模板新建',
425
+ close: '关闭',
426
+ previews: '页面预览',
370
427
  },
371
428
  build: {
372
429
  lead: '柠檬',
@@ -177,6 +177,28 @@ export const zhTW: LrText = {
177
177
  durationSeconds: '{s} 秒',
178
178
  durationMinSec: '{m} 分 {s} 秒',
179
179
  durationMinutes: '{m} 分鐘',
180
+ selfCheckPage: 'Page {n}',
181
+ selfCheck: 'Self-check',
182
+ selfCheckPassed: 'Self-check passed',
183
+ selfCheckFindings: '{n} things to look at',
184
+ selfCheckTimes: '{n} 處',
185
+ selfCheckHints: '提醒',
186
+ cardFindings: '{n} to check',
187
+ selfCheckFix: 'Ask the agent to fix',
188
+ selfCheckRunning: 'The agent is fixing what the self-check found…',
189
+ selfCheckDone: 'Fixed, and checked again',
190
+ selfCheckUnread: '第 {pages} 頁沒讀出來,沒有檢查',
191
+ selfCheckUnreadMany: '{n} 頁沒讀出來,沒有檢查',
192
+ selfCheckUnreadBadge: '{n} 頁沒讀',
193
+ selfCheckAgain: '再查一次',
194
+ cardUnread: '沒讀出來',
195
+ findingTiny: 'Type too small ({size}px)',
196
+ findingSmallBody: '正文小於 24px',
197
+ findingOverflow: 'Runs off the page',
198
+ findingOverlap: 'Text sits on something else',
199
+ findingNoNotes: 'No speaker notes',
200
+ findingLongTitle: 'Title too long ({n} characters)',
201
+ findingAccent: 'Accent colour used {n} times',
180
202
  },
181
203
  theme: {
182
204
  lime: '青檸沉浸',
@@ -367,6 +389,41 @@ export const zhTW: LrText = {
367
389
  kindPage: '內容',
368
390
  kindEnd: '結尾',
369
391
  back: '回到投影片',
392
+ occasionLabel: 'Occasion',
393
+ audienceLabel: 'Who is it for? (optional)',
394
+ audiencePlaceholder: 'e.g. Board members and executives',
395
+ unsure: 'Not sure',
396
+ selectedTemplate: 'Template: {name}',
397
+ removeTemplate: 'Clear the template',
398
+ pickTitle: 'Pick a look',
399
+ pickHint: 'Drawn with the titles and numbers from your own outline. Pick one, then start.',
400
+ pickBack: 'Back to the outline',
401
+ pickMore: 'Show me others',
402
+ pickYou: 'Choose for me',
403
+ pickNone: 'No template',
404
+ pickStart: 'Build with this look',
405
+ pickToast: 'Using {name}: {reason}',
406
+ pickSample: 'The number is a sample',
407
+ pickKnobsFor: 'Adjust “{name}”',
408
+ knobFormal: 'Formal ↔ Lively',
409
+ knobBright: 'Plain ↔ Bright',
410
+ knobMotion: 'Less motion ↔ More',
411
+ motionHint: 'Motion only shows in presentation',
412
+ },
413
+ templates: {
414
+ title: 'Template library',
415
+ subtitle: 'A template sets the structure and layout; Lemon writes the content for your brief.',
416
+ all: 'All',
417
+ pages: '{n} pages',
418
+ emptyTitle: 'No template library in this workspace',
419
+ emptyHint: 'The template library is only available in development.',
420
+ occasions: 'Best for',
421
+ audience: 'Audience',
422
+ object: 'Borrows from',
423
+ accent: 'Accent colour',
424
+ create: 'Start with this template',
425
+ close: 'Close',
426
+ previews: 'Page previews',
370
427
  },
371
428
  build: {
372
429
  lead: '檸檬',
@@ -20,6 +20,8 @@ const PATHS = [
20
20
  '/trash/',
21
21
  '/new',
22
22
  '/new/',
23
+ '/templates',
24
+ '/templates/',
23
25
  '/s/alpha',
24
26
  '/s/alpha/',
25
27
  '/s/alpha/board',
@@ -37,6 +39,8 @@ describe('pageForPath', () => {
37
39
  expect(pageForPath('/trash/')).toBe('trash');
38
40
  expect(pageForPath('/new')).toBe('new');
39
41
  expect(pageForPath('/new/')).toBe('new');
42
+ expect(pageForPath('/templates')).toBe('templates');
43
+ expect(pageForPath('/templates/')).toBe('templates');
40
44
  expect(pageForPath('/s/alpha')).toBe('editor');
41
45
  expect(pageForPath('/s/alpha/board')).toBe('board');
42
46
  expect(pageForPath('/s/alpha/presenter')).toBe('presenter');
@@ -5,6 +5,7 @@ export type LrPage =
5
5
  | 'settings'
6
6
  | 'trash'
7
7
  | 'new'
8
+ | 'templates'
8
9
  | 'editor'
9
10
  | 'board'
10
11
  | 'presenter'
@@ -19,13 +20,14 @@ const BRAND_PAGES: ReadonlySet<LrPage> = new Set([
19
20
  'settings',
20
21
  'trash',
21
22
  'new',
23
+ 'templates',
22
24
  ]);
23
25
 
24
26
  /**
25
27
  * BRAND_PAGES as a path pattern, for the pre-paint script, which runs before
26
28
  * any module loads. pages.test.ts keeps the two in step.
27
29
  */
28
- export const BRAND_PATH_SOURCE = '^/(themes(/.*)?|assets|settings|trash|new)?/*$';
30
+ export const BRAND_PATH_SOURCE = '^/(themes(/.*)?|assets|settings|trash|new|templates)?/*$';
29
31
 
30
32
  /** Agent screenshots and thumbnails render through this route; nothing may cover it. */
31
33
  export const PREVIEW_PATH_SOURCE = '^/s/[^/]+/preview/*$';
@@ -42,6 +44,7 @@ export function pageForPath(pathname: string): LrPage {
42
44
  if (path === '/settings') return 'settings';
43
45
  if (path === '/trash') return 'trash';
44
46
  if (path === '/new') return 'new';
47
+ if (path === '/templates') return 'templates';
45
48
  if (/^\/s\/[^/]+\/board$/.test(path)) return 'board';
46
49
  if (/^\/s\/[^/]+\/presenter$/.test(path)) return 'presenter';
47
50
  if (/^\/s\/[^/]+\/preview$/.test(path)) return 'preview';
@@ -55,11 +58,13 @@ export function isBrandPage(page: LrPage): boolean {
55
58
 
56
59
  export const SETTINGS_VIEW_ID = '__lr_settings__';
57
60
  export const TRASH_VIEW_ID = '__lr_trash__';
61
+ export const TEMPLATES_VIEW_ID = '__lr_templates__';
58
62
 
59
63
  /** The sidebar selection for our pages inside the home shell, or null for the official ones. */
60
64
  export function lemonRiverViewFor(pathname: string): string | null {
61
65
  const page = pageForPath(pathname);
62
66
  if (page === 'settings') return SETTINGS_VIEW_ID;
63
67
  if (page === 'trash') return TRASH_VIEW_ID;
68
+ if (page === 'templates') return TEMPLATES_VIEW_ID;
64
69
  return null;
65
70
  }
@@ -12,7 +12,7 @@ export function shouldPrompt(
12
12
  snooze: Snooze | null,
13
13
  now: number,
14
14
  ): boolean {
15
- if (!check || !check.outdated || !check.latest) return false;
15
+ if (!check?.outdated || !check.latest) return false;
16
16
  const snoozed = snooze !== null && snooze.version === check.latest && now < snooze.until;
17
17
  return !snoozed;
18
18
  }