@lemonriver/core 0.5.0 → 0.7.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 (83) hide show
  1. package/dist/{build-CS1goZxt.js → build-CKwrex8y.js} +1 -1
  2. package/dist/cli/bin.js +3 -3
  3. package/dist/{config-BpbcCbUv.js → config-B1_gk0sy.js} +2983 -266
  4. package/dist/{dev-BpYnfgLL.js → dev-DZ2Yzl2p.js} +1 -1
  5. package/dist/{preview-HSzPPkSs.js → preview-hMDcuHfP.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/app-chrome.tsx +12 -1
  21. package/src/app/lemonriver/chrome/filter-pill.tsx +30 -0
  22. package/src/app/lemonriver/chrome/sidebar-extras.tsx +12 -1
  23. package/src/app/lemonriver/features.test.ts +10 -0
  24. package/src/app/lemonriver/features.ts +3 -1
  25. package/src/app/lemonriver/feedback/pending-toast.ts +7 -2
  26. package/src/app/lemonriver/home/deck-card.tsx +20 -1
  27. package/src/app/lemonriver/home/home-page.tsx +107 -7
  28. package/src/app/lemonriver/home/use-deck-times.ts +4 -1
  29. package/src/app/lemonriver/outline/build-team.tsx +42 -0
  30. package/src/app/lemonriver/outline/describe-page.tsx +128 -27
  31. package/src/app/lemonriver/outline/draft.ts +38 -0
  32. package/src/app/lemonriver/outline/model.test.ts +79 -0
  33. package/src/app/lemonriver/outline/model.ts +80 -7
  34. package/src/app/lemonriver/outline/outline-page.tsx +56 -6
  35. package/src/app/lemonriver/outline/pick-style.tsx +282 -0
  36. package/src/app/lemonriver/routes.test.tsx +17 -5
  37. package/src/app/lemonriver/routes.tsx +28 -0
  38. package/src/app/lemonriver/share/capture.ts +76 -0
  39. package/src/app/lemonriver/share/client.ts +162 -0
  40. package/src/app/lemonriver/share/codes.test.ts +49 -0
  41. package/src/app/lemonriver/share/codes.ts +30 -0
  42. package/src/app/lemonriver/share/compare.test.ts +199 -0
  43. package/src/app/lemonriver/share/compare.ts +367 -0
  44. package/src/app/lemonriver/share/drop.ts +84 -0
  45. package/src/app/lemonriver/share/folder.test.ts +42 -0
  46. package/src/app/lemonriver/share/folder.ts +29 -0
  47. package/src/app/lemonriver/share/freeze.ts +51 -0
  48. package/src/app/lemonriver/share/guide.test.ts +78 -0
  49. package/src/app/lemonriver/share/guide.ts +222 -0
  50. package/src/app/lemonriver/share/import-dialog.tsx +391 -0
  51. package/src/app/lemonriver/share/import-entry.tsx +106 -0
  52. package/src/app/lemonriver/share/model.ts +150 -0
  53. package/src/app/lemonriver/share/naming.test.ts +59 -0
  54. package/src/app/lemonriver/share/naming.ts +71 -0
  55. package/src/app/lemonriver/share/paths.test.ts +75 -0
  56. package/src/app/lemonriver/share/paths.ts +181 -0
  57. package/src/app/lemonriver/share/pdf.test.ts +79 -0
  58. package/src/app/lemonriver/share/pdf.ts +169 -0
  59. package/src/app/lemonriver/share/share-dialog.tsx +286 -0
  60. package/src/app/lemonriver/share/summary.ts +47 -0
  61. package/src/app/lemonriver/slide-extensions.tsx +69 -23
  62. package/src/app/lemonriver/templates/client.ts +60 -0
  63. package/src/app/lemonriver/templates/demo-page.tsx +79 -0
  64. package/src/app/lemonriver/templates/knobs.test.ts +62 -0
  65. package/src/app/lemonriver/templates/knobs.ts +62 -0
  66. package/src/app/lemonriver/templates/library-page.tsx +295 -0
  67. package/src/app/lemonriver/templates/model.test.ts +175 -0
  68. package/src/app/lemonriver/templates/model.ts +339 -0
  69. package/src/app/lemonriver/templates/preview-content.test.ts +117 -0
  70. package/src/app/lemonriver/templates/preview-content.ts +149 -0
  71. package/src/app/lemonriver/templates/recommend.test.ts +71 -0
  72. package/src/app/lemonriver/templates/recommend.ts +72 -0
  73. package/src/app/lemonriver/templates/use-library.ts +58 -0
  74. package/src/app/lemonriver/templates/virtual.d.ts +28 -0
  75. package/src/app/lemonriver/text/en.ts +124 -0
  76. package/src/app/lemonriver/text/es.ts +124 -0
  77. package/src/app/lemonriver/text/ja.ts +124 -0
  78. package/src/app/lemonriver/text/types.ts +151 -0
  79. package/src/app/lemonriver/text/zh-cn.ts +119 -0
  80. package/src/app/lemonriver/text/zh-tw.ts +119 -0
  81. package/src/app/lemonriver/theme/pages.test.ts +4 -0
  82. package/src/app/lemonriver/theme/pages.ts +6 -1
  83. package/src/app/lemonriver/update/prompt.ts +1 -1
@@ -178,6 +178,28 @@ export const ja: LrText = {
178
178
  durationSeconds: '{s} 秒',
179
179
  durationMinSec: '{m} 分 {s} 秒',
180
180
  durationMinutes: '{m} 分',
181
+ selfCheckPage: 'Page {n}',
182
+ selfCheck: 'Self-check',
183
+ selfCheckPassed: 'Self-check passed',
184
+ selfCheckFindings: '{n} things to look at',
185
+ selfCheckTimes: '{n} か所',
186
+ selfCheckHints: 'ヒント',
187
+ cardFindings: '{n} to check',
188
+ selfCheckFix: 'Ask the agent to fix',
189
+ selfCheckRunning: 'The agent is fixing what the self-check found…',
190
+ selfCheckDone: 'Fixed, and checked again',
191
+ selfCheckUnread: 'ページ {pages} を読み取れず、チェックしていません',
192
+ selfCheckUnreadMany: '{n} ページを読み取れず、チェックしていません',
193
+ selfCheckUnreadBadge: '{n} ページ未読',
194
+ selfCheckAgain: 'もう一度チェック',
195
+ cardUnread: '未読',
196
+ findingTiny: 'Type too small ({size}px)',
197
+ findingSmallBody: '本文が 24px 未満',
198
+ findingOverflow: 'Runs off the page',
199
+ findingOverlap: 'Text sits on something else',
200
+ findingNoNotes: 'No speaker notes',
201
+ findingLongTitle: 'Title too long ({n} characters)',
202
+ findingAccent: 'Accent colour used {n} times',
181
203
  },
182
204
  theme: {
183
205
  lime: 'ライム',
@@ -378,6 +400,41 @@ export const ja: LrText = {
378
400
  kindPage: '本文',
379
401
  kindEnd: '締め',
380
402
  back: 'デッキ一覧に戻る',
403
+ occasionLabel: 'Occasion',
404
+ audienceLabel: 'Who is it for? (optional)',
405
+ audiencePlaceholder: 'e.g. Board members and executives',
406
+ unsure: 'Not sure',
407
+ selectedTemplate: 'Template: {name}',
408
+ removeTemplate: 'Clear the template',
409
+ pickTitle: 'Pick a look',
410
+ pickHint: 'Drawn with the titles and numbers from your own outline. Pick one, then start.',
411
+ pickBack: 'Back to the outline',
412
+ pickMore: 'Show me others',
413
+ pickYou: 'Choose for me',
414
+ pickNone: 'No template',
415
+ pickStart: 'Build with this look',
416
+ pickToast: 'Using {name}: {reason}',
417
+ pickSample: 'The number is a sample',
418
+ pickKnobsFor: 'Adjust “{name}”',
419
+ knobFormal: 'Formal ↔ Lively',
420
+ knobBright: 'Plain ↔ Bright',
421
+ knobMotion: 'Less motion ↔ More',
422
+ motionHint: 'Motion only shows in presentation',
423
+ },
424
+ templates: {
425
+ title: 'Template library',
426
+ subtitle: 'A template sets the structure and layout; Lemon writes the content for your brief.',
427
+ all: 'All',
428
+ pages: '{n} pages',
429
+ emptyTitle: 'No template library in this workspace',
430
+ emptyHint: 'The template library is only available in development.',
431
+ occasions: 'Best for',
432
+ audience: 'Audience',
433
+ object: 'Borrows from',
434
+ accent: 'Accent colour',
435
+ create: 'Start with this template',
436
+ close: 'Close',
437
+ previews: 'Page previews',
381
438
  },
382
439
  build: {
383
440
  lead: 'レモン',
@@ -416,4 +473,71 @@ export const ja: LrText = {
416
473
  followClient: 'クライアント設定',
417
474
  followClientHint: '{provider} で設定したモデルと思考の強さを使います。',
418
475
  },
476
+ share: {
477
+ open: 'Share',
478
+ menuItem: 'Share',
479
+ dialogTitle: 'Share “{title}”',
480
+ dialogDescription:
481
+ 'Pack it into one zip and send it over WeChat, email or a cloud drive. They can still read the PDF without LemonRiver.',
482
+ attachPdf: 'Attach a PDF so anyone can read it',
483
+ estimate: 'About {n} pages, takes {s} seconds',
484
+ generate: 'Create package',
485
+ capturing: 'Drawing page {k} of {n}',
486
+ preparing: 'Packing…',
487
+ done: 'Package ready: {name} ({size} MB)',
488
+ reveal: 'Show in Finder',
489
+ finish: 'Done',
490
+ warnings: 'Notes',
491
+ failed: 'Could not create the package',
492
+ moreFiles: 'and {n} more',
493
+ importTitle: 'Import package',
494
+ importAction: 'Import',
495
+ dropHint: 'Drop to import',
496
+ notAPackage: 'This is not a LemonRiver package',
497
+ madeWith: 'Made with LemonRiver {version}',
498
+ keepBoth: 'Keep both',
499
+ replaceExisting: 'Replace “{title}” on my computer (the old one goes to the trash)',
500
+ securityNotice:
501
+ 'A deck is program code that runs on your computer once imported. Only import packages from people you trust.',
502
+ importedToast: 'Imported “{title}”',
503
+ openAction: 'Open',
504
+ pageCount: '{n} pages',
505
+ pageOf: 'Page {n}',
506
+ earlier: 'Previous',
507
+ later: 'Next',
508
+ compareTitle: 'Compared with your copy',
509
+ compareSame: 'Same as your copy — nothing to import.',
510
+ compareUnreadable:
511
+ 'This deck cannot be compared page by page; only the overall change is visible.',
512
+ compareChanged: 'Pages changed: {pages}',
513
+ compareAdded: 'Pages added: {n}',
514
+ compareRemoved: 'Pages removed: {n}',
515
+ compareMoved: 'Page order changed',
516
+ compareNotesOnly: 'Speaker notes only: page {pages}',
517
+ compareShared: 'Shared parts (styles, template pieces) changed too, so every page may differ',
518
+ compareAssets: 'Assets: {added} added, {changed} changed, {removed} removed',
519
+ compareExpand: 'Show pages',
520
+ compareCollapse: 'Hide pages',
521
+ statusSame: 'same',
522
+ statusChanged: 'changed',
523
+ statusAdded: 'added',
524
+ statusRemoved: 'removed',
525
+ statusMoved: 'moved',
526
+ unknownVersion: 'unknown version',
527
+ errors: {
528
+ notAPackage: 'This is not a LemonRiver package, or the package is damaged.',
529
+ badManifest: 'This is not a LemonRiver package, or the package is damaged.',
530
+ newerVersion:
531
+ 'This package was made by a newer LemonRiver ({version}). Update first, then import.',
532
+ badPath: 'The package contains files it should not, so nothing was imported.',
533
+ blockedFile: 'The package contains files it should not, so nothing was imported.',
534
+ checksum:
535
+ 'Files in the package were changed or are missing. Ask the sender to share it again.',
536
+ missingFile:
537
+ 'Files in the package were changed or are missing. Ask the sender to share it again.',
538
+ extraFile: 'The package contains files it should not, so nothing was imported.',
539
+ tooLarge: 'The package is too large and was not imported.',
540
+ tooManyFiles: 'The package is too large and was not imported.',
541
+ },
542
+ },
419
543
  };
@@ -65,6 +65,40 @@ export type LrText = {
65
65
  /** The panel that lists the blocks inside the page last clicked. */
66
66
  blockPanel: string;
67
67
  blockPanelEmpty: string;
68
+ selfCheck: string;
69
+ /** template: "Page {n}" — one row of the findings list. */
70
+ selfCheckPage: string;
71
+ selfCheckPassed: string;
72
+ /** template: "{n} things to look at" */
73
+ selfCheckFindings: string;
74
+ /** template: "{n} places" — how many places one row stands for. */
75
+ selfCheckTimes: string;
76
+ /** The collapsed list of style hints. */
77
+ selfCheckHints: string;
78
+ /** template: "{n} to check" — the badge on a board card. */
79
+ cardFindings: string;
80
+ selfCheckFix: string;
81
+ selfCheckRunning: string;
82
+ selfCheckDone: string;
83
+ /** template: "Page {pages} could not be read, so it was not checked" */
84
+ selfCheckUnread: string;
85
+ /** template: "{n} pages could not be read, so they were not checked" */
86
+ selfCheckUnreadMany: string;
87
+ /** template: "{n} unread" — the board button when pages were unread. */
88
+ selfCheckUnreadBadge: string;
89
+ selfCheckAgain: string;
90
+ /** A board card whose page the check could not read. */
91
+ cardUnread: string;
92
+ /** template: "Type too small ({size}px)" */
93
+ findingTiny: string;
94
+ findingSmallBody: string;
95
+ findingOverflow: string;
96
+ findingOverlap: string;
97
+ findingNoNotes: string;
98
+ /** template: "Title too long ({n} characters)" */
99
+ findingLongTitle: string;
100
+ /** template: "Accent colour used {n} times" */
101
+ findingAccent: string;
68
102
  blockKinds: Record<BlockKind, string>;
69
103
  blockDrag: string;
70
104
  blockMenu: string;
@@ -398,6 +432,45 @@ export type LrText = {
398
432
  kindPage: string;
399
433
  kindEnd: string;
400
434
  back: string;
435
+ occasionLabel: string;
436
+ audienceLabel: string;
437
+ audiencePlaceholder: string;
438
+ unsure: string;
439
+ /** template: "Template: {name}" */
440
+ selectedTemplate: string;
441
+ removeTemplate: string;
442
+ pickTitle: string;
443
+ pickHint: string;
444
+ pickBack: string;
445
+ pickMore: string;
446
+ pickYou: string;
447
+ pickNone: string;
448
+ pickStart: string;
449
+ /** template: "Using {name}: {reason}" */
450
+ pickToast: string;
451
+ pickSample: string;
452
+ /** template: "Adjust {name}" */
453
+ pickKnobsFor: string;
454
+ knobFormal: string;
455
+ knobBright: string;
456
+ knobMotion: string;
457
+ motionHint: string;
458
+ };
459
+ templates: {
460
+ title: string;
461
+ subtitle: string;
462
+ all: string;
463
+ /** template: "{n} pages" */
464
+ pages: string;
465
+ emptyTitle: string;
466
+ emptyHint: string;
467
+ occasions: string;
468
+ audience: string;
469
+ object: string;
470
+ accent: string;
471
+ create: string;
472
+ close: string;
473
+ previews: string;
401
474
  };
402
475
  build: {
403
476
  lead: string;
@@ -447,4 +520,82 @@ export type LrText = {
447
520
  /** template: "Uses the model and effort set in {provider}" */
448
521
  followClientHint: string;
449
522
  };
523
+ share: {
524
+ open: string;
525
+ menuItem: string;
526
+ /** template: "Share “{title}”" */
527
+ dialogTitle: string;
528
+ dialogDescription: string;
529
+ attachPdf: string;
530
+ /** template: "About {n} pages, takes {s} seconds" */
531
+ estimate: string;
532
+ generate: string;
533
+ /** template: "Drawing page {k} of {n}" */
534
+ capturing: string;
535
+ /** template: "Drawing page {k} of {n}" */
536
+ preparing: string;
537
+ /** template: "The package is ready: {name} ({size} MB)" */
538
+ done: string;
539
+ reveal: string;
540
+ finish: string;
541
+ warnings: string;
542
+ failed: string;
543
+ /** template: "… and {n} more" */
544
+ moreFiles: string;
545
+ importAction: string;
546
+ importTitle: string;
547
+ dropHint: string;
548
+ notAPackage: string;
549
+ /** template: "Made with LemonRiver {version}" */
550
+ madeWith: string;
551
+ keepBoth: string;
552
+ /** template: "Replace “{title}” on my computer (the old one goes to the trash)" */
553
+ replaceExisting: string;
554
+ securityNotice: string;
555
+ /** template: "Imported “{title}”" */
556
+ importedToast: string;
557
+ openAction: string;
558
+ /** template: "{n} pages" */
559
+ pageCount: string;
560
+ /** template: "Page {n}" */
561
+ pageOf: string;
562
+ earlier: string;
563
+ later: string;
564
+ unknownVersion: string;
565
+ compareTitle: string;
566
+ compareSame: string;
567
+ compareUnreadable: string;
568
+ /** template: "Changed pages {pages}" */
569
+ compareChanged: string;
570
+ /** template: "Added {n} pages" */
571
+ compareAdded: string;
572
+ /** template: "Removed {n} pages" */
573
+ compareRemoved: string;
574
+ compareMoved: string;
575
+ /** template: "Speaker notes only: page {pages}" */
576
+ compareNotesOnly: string;
577
+ compareShared: string;
578
+ /** template: "Assets: {added} added, {changed} changed, {removed} removed" */
579
+ compareAssets: string;
580
+ compareExpand: string;
581
+ compareCollapse: string;
582
+ statusSame: string;
583
+ statusChanged: string;
584
+ statusAdded: string;
585
+ statusRemoved: string;
586
+ statusMoved: string;
587
+ errors: {
588
+ notAPackage: string;
589
+ badManifest: string;
590
+ /** template: "This package was made by a newer LemonRiver ({version}). Update first, then import." */
591
+ newerVersion: string;
592
+ badPath: string;
593
+ blockedFile: string;
594
+ checksum: string;
595
+ missingFile: string;
596
+ extraFile: string;
597
+ tooLarge: string;
598
+ tooManyFiles: string;
599
+ };
600
+ };
450
601
  };
@@ -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: '柠檬',
@@ -405,4 +462,66 @@ export const zhCN: LrText = {
405
462
  followClient: '客户端设置',
406
463
  followClientHint: '使用 {provider} 里自己设的模型和思考强度。',
407
464
  },
465
+ share: {
466
+ open: '分享',
467
+ menuItem: '分享',
468
+ dialogTitle: '分享「{title}」',
469
+ dialogDescription:
470
+ '打包成一个压缩包,用微信、邮件、网盘发给对方。对方没装 LemonRiver 也能看 PDF。',
471
+ attachPdf: '附带 PDF(方便没装的人直接看)',
472
+ estimate: '约 {n} 页,生成要 {s} 秒',
473
+ generate: '生成分享包',
474
+ capturing: '正在画第 {k} / {n} 页',
475
+ preparing: '正在打包…',
476
+ done: '分享包已生成:{name}({size} MB)',
477
+ reveal: '在访达里显示',
478
+ finish: '完成',
479
+ warnings: '提示',
480
+ failed: '没能生成分享包',
481
+ moreFiles: '还有 {n} 个',
482
+ importTitle: '导入分享包',
483
+ importAction: '导入',
484
+ dropHint: '松手导入',
485
+ notAPackage: '这不是 LemonRiver 的分享包',
486
+ madeWith: '用 LemonRiver {version} 制作',
487
+ keepBoth: '另存一份',
488
+ replaceExisting: '替换我电脑上的「{title}」(旧的会移进回收站)',
489
+ securityNotice: '演示是程序代码,导入后会在你的电脑上运行。只导入你信任的人发来的。',
490
+ importedToast: '已导入「{title}」',
491
+ openAction: '打开',
492
+ pageCount: '{n} 页',
493
+ pageOf: '第 {n} 页',
494
+ earlier: '上一页',
495
+ later: '下一页',
496
+ compareTitle: '和你电脑上的那份比',
497
+ compareSame: '和你电脑上的那份一样,不用导入。',
498
+ compareUnreadable: '这份演示的写法没法按页比较,只能看出整体改过。',
499
+ compareChanged: '改了第 {pages} 页',
500
+ compareAdded: '新加 {n} 页',
501
+ compareRemoved: '删了 {n} 页',
502
+ compareMoved: '页序有调整',
503
+ compareNotesOnly: '第 {pages} 页只改了讲稿',
504
+ compareShared: '页面共用的部分(样式、模板部件)也改了,可能影响每一页',
505
+ compareAssets: '素材:新加 {added} 个,改了 {changed} 个,删了 {removed} 个',
506
+ compareExpand: '展开',
507
+ compareCollapse: '收起',
508
+ statusSame: '没变',
509
+ statusChanged: '改了',
510
+ statusAdded: '新加',
511
+ statusRemoved: '删了',
512
+ statusMoved: '挪了位置',
513
+ unknownVersion: '未知版本',
514
+ errors: {
515
+ notAPackage: '这不是 LemonRiver 的分享包,或者包已经损坏。',
516
+ badManifest: '这不是 LemonRiver 的分享包,或者包已经损坏。',
517
+ newerVersion: '这个包是用更新的 LemonRiver({version})做的,先更新再导入。',
518
+ badPath: '包里有不该出现的文件,为了安全没有导入。',
519
+ blockedFile: '包里有不该出现的文件,为了安全没有导入。',
520
+ checksum: '包里的文件被改动过或者缺了,请对方重新分享一次。',
521
+ missingFile: '包里的文件被改动过或者缺了,请对方重新分享一次。',
522
+ extraFile: '包里有不该出现的文件,为了安全没有导入。',
523
+ tooLarge: '包太大了,没有导入。',
524
+ tooManyFiles: '包太大了,没有导入。',
525
+ },
526
+ },
408
527
  };
@@ -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: '檸檬',
@@ -405,4 +462,66 @@ export const zhTW: LrText = {
405
462
  followClient: '客戶端設定',
406
463
  followClientHint: '使用 {provider} 裡自己設的模型和思考強度。',
407
464
  },
465
+ share: {
466
+ open: '分享',
467
+ menuItem: '分享',
468
+ dialogTitle: '分享「{title}」',
469
+ dialogDescription:
470
+ '打包成一個壓縮檔,用微信、郵件、網盤寄給對方。對方沒裝 LemonRiver 也能看 PDF。',
471
+ attachPdf: '附帶 PDF(方便沒裝的人直接看)',
472
+ estimate: '約 {n} 頁,生成要 {s} 秒',
473
+ generate: '生成分享包',
474
+ capturing: '正在畫第 {k} / {n} 頁',
475
+ preparing: '正在打包…',
476
+ done: '分享包已生成:{name}({size} MB)',
477
+ reveal: '在 Finder 裡顯示',
478
+ finish: '完成',
479
+ warnings: '提示',
480
+ failed: '沒能生成分享包',
481
+ moreFiles: '還有 {n} 個',
482
+ importTitle: '匯入分享包',
483
+ importAction: '匯入',
484
+ dropHint: '鬆手匯入',
485
+ notAPackage: '這不是 LemonRiver 的分享包',
486
+ madeWith: '用 LemonRiver {version} 製作',
487
+ keepBoth: '另存一份',
488
+ replaceExisting: '替換我電腦上的「{title}」(舊的會移進回收筒)',
489
+ securityNotice: '演示是程式碼,匯入後會在你的電腦上執行。只匯入你信任的人寄來的。',
490
+ importedToast: '已匯入「{title}」',
491
+ openAction: '打開',
492
+ pageCount: '{n} 頁',
493
+ pageOf: '第 {n} 頁',
494
+ earlier: '上一頁',
495
+ later: '下一頁',
496
+ compareTitle: '和你電腦上的那份比',
497
+ compareSame: '和你電腦上的那份一樣,不用匯入。',
498
+ compareUnreadable: '這份演示的寫法沒法按頁比較,只能看出整體改過。',
499
+ compareChanged: '改了第 {pages} 頁',
500
+ compareAdded: '新加 {n} 頁',
501
+ compareRemoved: '刪了 {n} 頁',
502
+ compareMoved: '頁序有調整',
503
+ compareNotesOnly: '第 {pages} 頁只改了講稿',
504
+ compareShared: '頁面共用的部分(樣式、模板部件)也改了,可能影響每一頁',
505
+ compareAssets: '素材:新加 {added} 個,改了 {changed} 個,刪了 {removed} 個',
506
+ compareExpand: '展開',
507
+ compareCollapse: '收起',
508
+ statusSame: '沒變',
509
+ statusChanged: '改了',
510
+ statusAdded: '新加',
511
+ statusRemoved: '刪了',
512
+ statusMoved: '挪了位置',
513
+ unknownVersion: '未知版本',
514
+ errors: {
515
+ notAPackage: '這不是 LemonRiver 的分享包,或者包已經損壞。',
516
+ badManifest: '這不是 LemonRiver 的分享包,或者包已經損壞。',
517
+ newerVersion: '這個包是用更新的 LemonRiver({version})做的,先更新再匯入。',
518
+ badPath: '包裡有不該出現的檔案,為了安全沒有匯入。',
519
+ blockedFile: '包裡有不該出現的檔案,為了安全沒有匯入。',
520
+ checksum: '包裡的檔案被改動過或缺了,請對方重新分享一次。',
521
+ missingFile: '包裡的檔案被改動過或缺了,請對方重新分享一次。',
522
+ extraFile: '包裡有不該出現的檔案,為了安全沒有匯入。',
523
+ tooLarge: '包太大了,沒有匯入。',
524
+ tooManyFiles: '包太大了,沒有匯入。',
525
+ },
526
+ },
408
527
  };
@@ -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
  }