@lemonriver/core 0.2.0 → 0.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 (120) hide show
  1. package/dist/{build-Df_xwIpg.js → build-Bqo69DWP.js} +1 -1
  2. package/dist/cli/bin.js +4 -4
  3. package/dist/{config-BjWCLoMQ.js → config-DJ5rkMMg.js} +1594 -974
  4. package/dist/{config-rMGCkz6i.d.ts → config-teo3kWz7.d.ts} +1 -1
  5. package/dist/{dev-Ctsx9IeO.js → dev-B2FJD5bJ.js} +2 -2
  6. package/dist/index.d.ts +2 -2
  7. package/dist/index.js +1 -1
  8. package/dist/locale/index.d.ts +1 -1
  9. package/dist/locale/index.js +1 -1
  10. package/dist/{preview-CJgcqsPk.js → preview-C93BOZL1.js} +1 -1
  11. package/dist/{types-8VUyA2bu.d.ts → types-DFK02XVv.d.ts} +0 -35
  12. package/dist/{update-BKOA3Z6o.js → update-DsxZBtwv.js} +2 -70
  13. package/dist/vite/index.d.ts +1 -1
  14. package/dist/vite/index.js +1 -1
  15. package/dist/{zh-tw-CeLrYwRE.js → zh-tw-DwTAZKa6.js} +6 -172
  16. package/package.json +1 -1
  17. package/src/app/app.tsx +5 -18
  18. package/src/app/components/agent/agent-panel.tsx +3 -0
  19. package/src/app/components/agent/agent-presence.tsx +2 -2
  20. package/src/app/components/agent/history-view.tsx +3 -2
  21. package/src/app/components/agent/transcript.tsx +15 -4
  22. package/src/app/components/asset-view.tsx +6 -6
  23. package/src/app/components/command/command-menu.tsx +2 -1
  24. package/src/app/components/inspector/asset-picker-dialog.tsx +7 -5
  25. package/src/app/components/inspector/comment-layer.tsx +2 -1
  26. package/src/app/components/inspector/inspector-panel.tsx +2 -2
  27. package/src/app/components/sidebar/sidebar-footer.tsx +1 -1
  28. package/src/app/components/sidebar/sidebar.tsx +3 -2
  29. package/src/app/components/themes/theme-detail.tsx +4 -2
  30. package/src/app/components/thumbnail-rail.tsx +1 -28
  31. package/src/app/index.html +2 -2
  32. package/src/app/lemonriver/agent/lemon.tsx +64 -0
  33. package/src/app/{components → lemonriver}/board/board-canvas.tsx +17 -17
  34. package/src/app/{routes/board.tsx → lemonriver/board/board-page.tsx} +16 -15
  35. package/src/app/{components → lemonriver}/board/layout.ts +1 -1
  36. package/src/app/lemonriver/board/model/cards.test.ts +239 -0
  37. package/src/app/lemonriver/board/model/cards.ts +234 -0
  38. package/src/app/lemonriver/board/model/structure.test.ts +101 -0
  39. package/src/app/lemonriver/board/model/structure.ts +82 -0
  40. package/src/app/{components → lemonriver}/board/page-node.tsx +34 -31
  41. package/src/app/{components → lemonriver}/board/use-board-cards.ts +6 -6
  42. package/src/app/{components → lemonriver}/board/use-board-columns.ts +7 -7
  43. package/src/app/{components → lemonriver}/board/use-page-order.ts +10 -6
  44. package/src/app/lemonriver/brand/app-icon.svg +44 -0
  45. package/src/app/lemonriver/brand/apple-touch-icon.png +0 -0
  46. package/src/app/lemonriver/brand/favicon-32.png +0 -0
  47. package/src/app/lemonriver/brand/mascot.tsx +59 -0
  48. package/src/app/lemonriver/brand/mascots/lemon-done.png +0 -0
  49. package/src/app/lemonriver/brand/mascots/lemon-idle.png +0 -0
  50. package/src/app/lemonriver/brand/mascots/lemon-needs-you.png +0 -0
  51. package/src/app/lemonriver/brand/mascots/lemon-thinking.png +0 -0
  52. package/src/app/lemonriver/brand/mascots/lemon-working.png +0 -0
  53. package/src/app/lemonriver/chrome/app-chrome.tsx +99 -0
  54. package/src/app/lemonriver/chrome/nav-row.tsx +34 -0
  55. package/src/app/lemonriver/chrome/not-found.tsx +34 -0
  56. package/src/app/lemonriver/chrome/sidebar-extras.tsx +57 -0
  57. package/src/app/lemonriver/chrome/use-slot.ts +23 -0
  58. package/src/app/lemonriver/features.test.ts +29 -0
  59. package/src/app/lemonriver/features.ts +26 -0
  60. package/src/app/lemonriver/feedback/export.ts +7 -0
  61. package/src/app/lemonriver/feedback/lemon-empty.tsx +54 -0
  62. package/src/app/lemonriver/feedback/offline-banner.tsx +41 -0
  63. package/src/app/lemonriver/feedback/pending-toast.test.ts +44 -0
  64. package/src/app/lemonriver/feedback/pending-toast.ts +39 -0
  65. package/src/app/lemonriver/feedback/toaster.tsx +34 -0
  66. package/src/app/lemonriver/feedback/upload.test.ts +26 -0
  67. package/src/app/lemonriver/feedback/upload.ts +19 -0
  68. package/src/app/lemonriver/home/brief-card.tsx +63 -0
  69. package/src/app/lemonriver/home/brief.test.ts +38 -0
  70. package/src/app/lemonriver/home/brief.ts +34 -0
  71. package/src/app/lemonriver/home/controls.tsx +93 -0
  72. package/src/app/lemonriver/home/deck-card.tsx +183 -0
  73. package/src/app/lemonriver/home/dialogs.tsx +292 -0
  74. package/src/app/lemonriver/home/home-page.tsx +335 -0
  75. package/src/app/lemonriver/home/sorting.test.ts +24 -0
  76. package/src/app/lemonriver/home/sorting.ts +59 -0
  77. package/src/app/lemonriver/home/time.test.ts +33 -0
  78. package/src/app/lemonriver/home/time.ts +33 -0
  79. package/src/app/lemonriver/home/use-deck-times.ts +27 -0
  80. package/src/app/lemonriver/home/use-delayed.ts +15 -0
  81. package/src/app/lemonriver/routes.test.tsx +37 -0
  82. package/src/app/lemonriver/routes.tsx +38 -0
  83. package/src/app/lemonriver/settings/settings-page.tsx +103 -0
  84. package/src/app/lemonriver/slide-extensions.tsx +73 -0
  85. package/src/app/lemonriver/text/all.ts +19 -0
  86. package/src/app/lemonriver/text/en.ts +106 -0
  87. package/src/app/lemonriver/text/es.ts +108 -0
  88. package/src/app/lemonriver/text/index.ts +9 -0
  89. package/src/app/lemonriver/text/ja.ts +106 -0
  90. package/src/app/lemonriver/text/text.test.ts +57 -0
  91. package/src/app/lemonriver/text/types.ts +111 -0
  92. package/src/app/lemonriver/text/zh-cn.ts +101 -0
  93. package/src/app/lemonriver/text/zh-tw.ts +101 -0
  94. package/src/app/lemonriver/theme/app.css +288 -0
  95. package/src/app/lemonriver/theme/controls.css +463 -0
  96. package/src/app/lemonriver/theme/index.css +3 -0
  97. package/src/app/lemonriver/theme/motion.ts +52 -0
  98. package/src/app/lemonriver/theme/pages.test.ts +66 -0
  99. package/src/app/lemonriver/theme/pages.ts +56 -0
  100. package/src/app/lemonriver/theme/theme-menu.tsx +64 -0
  101. package/src/app/lemonriver/theme/themes.test.ts +18 -0
  102. package/src/app/lemonriver/theme/themes.ts +16 -0
  103. package/src/app/lemonriver/theme/tokens.css +226 -0
  104. package/src/app/lemonriver/theme/use-theme.tsx +49 -0
  105. package/src/app/lemonriver/trash/api.test.ts +19 -0
  106. package/src/app/lemonriver/trash/api.ts +77 -0
  107. package/src/app/lemonriver/trash/trash-page.tsx +131 -0
  108. package/src/app/lib/pptx/raster.ts +1 -1
  109. package/src/app/main.tsx +8 -1
  110. package/src/app/routes/home-shell.tsx +4 -2
  111. package/src/app/routes/slide.tsx +12 -16
  112. package/src/app/styles.css +1 -0
  113. package/src/locale/en.ts +0 -35
  114. package/src/locale/es.ts +0 -34
  115. package/src/locale/ja.ts +0 -34
  116. package/src/locale/types.ts +0 -36
  117. package/src/locale/zh-cn.ts +3 -37
  118. package/src/locale/zh-tw.ts +3 -37
  119. /package/src/app/{components → lemonriver}/board/board.css +0 -0
  120. /package/src/app/{components → lemonriver}/board/layout.test.ts +0 -0
@@ -1,4 +1,4 @@
1
- import { t as Locale } from "./types-8VUyA2bu.js";
1
+ import { t as Locale } from "./types-DFK02XVv.js";
2
2
  //#region src/config.d.ts
3
3
  type LemonRiverBuildConfig = {
4
4
  showSlideBrowser?: boolean;
@@ -1,6 +1,6 @@
1
- import { U as PKG_NAMES } from "./update-BKOA3Z6o.js";
1
+ import { V as PKG_NAMES } from "./update-DsxZBtwv.js";
2
2
  import { a as printUrls, i as printShortcutsHint, n as formatError, o as shortcutsEnabled, r as printHeader, s as startupDuration, t as createCliLogger } from "./cli/bin.js";
3
- import { n as DEV_SUPERVISED_ENV, t as createViteConfig } from "./config-BjWCLoMQ.js";
3
+ import { n as DEV_SUPERVISED_ENV, t as createViteConfig } from "./config-DJ5rkMMg.js";
4
4
  import path from "node:path";
5
5
  import { existsSync } from "node:fs";
6
6
  import { fork } from "node:child_process";
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { n as Plural, t as Locale } from "./types-8VUyA2bu.js";
2
- import { i as OpenSlideConfig, n as LemonRiverBuildConfig, r as LemonRiverConfig, t as LemonRiverAgentConfig } from "./config-rMGCkz6i.js";
1
+ import { n as Plural, t as Locale } from "./types-DFK02XVv.js";
2
+ import { i as OpenSlideConfig, n as LemonRiverBuildConfig, r as LemonRiverConfig, t as LemonRiverAgentConfig } from "./config-teo3kWz7.js";
3
3
  import { CSSProperties, ComponentType, HTMLAttributes, PropsWithChildren, ReactNode } from "react";
4
4
  //#region src/app/components/image-placeholder.d.ts
5
5
  type ImagePlaceholderProps = {
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as en, i as es, n as zhCN, r as ja, t as zhTW } from "./zh-tw-CeLrYwRE.js";
1
+ import { a as en, i as es, n as zhCN, r as ja, t as zhTW } from "./zh-tw-DwTAZKa6.js";
2
2
  import { n as defaultDesign, r as designToCssVars, t as cssVarsToString } from "./design-Cpqx7SJs.js";
3
3
  import { Children, cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useLayoutEffect, useRef, useState, useSyncExternalStore } from "react";
4
4
  import { toast } from "sonner";
@@ -1,4 +1,4 @@
1
- import { n as Plural, t as Locale } from "../types-8VUyA2bu.js";
1
+ import { n as Plural, t as Locale } from "../types-DFK02XVv.js";
2
2
  //#region src/locale/en.d.ts
3
3
  declare const en: Locale;
4
4
  //#endregion
@@ -1,4 +1,4 @@
1
- import { a as en, i as es, n as zhCN, r as ja, t as zhTW } from "../zh-tw-CeLrYwRE.js";
1
+ import { a as en, i as es, n as zhCN, r as ja, t as zhTW } from "../zh-tw-DwTAZKa6.js";
2
2
  //#region src/locale/format.ts
3
3
  function format(template, vars) {
4
4
  return template.replace(/\{(\w+)\}/g, (m, key) => {
@@ -1,5 +1,5 @@
1
1
  import { a as printUrls, i as printShortcutsHint, o as shortcutsEnabled, r as printHeader, s as startupDuration, t as createCliLogger } from "./cli/bin.js";
2
- import { t as createViteConfig } from "./config-BjWCLoMQ.js";
2
+ import { t as createViteConfig } from "./config-DJ5rkMMg.js";
3
3
  import { mergeConfig, preview as preview$1 } from "vite";
4
4
  //#region src/cli/preview.ts
5
5
  async function preview(opts = {}) {
@@ -476,41 +476,6 @@ type Locale = {
476
476
  /** template: "Scroll down to current page {n}" */
477
477
  scrollDownToCurrentPage: string;
478
478
  };
479
- board: {
480
- title: string;
481
- openBoard: string;
482
- backToDeck: string;
483
- hint: string;
484
- loading: string;
485
- /** template: "Part {n}" — columns in decks that declare no chapter pages. */
486
- columnFallback: string;
487
- moveToEnd: string;
488
- reorderFailed: string;
489
- zoomIn: string;
490
- zoomOut: string;
491
- fitView: string;
492
- saveFailed: string;
493
- renameColumn: string;
494
- columnTitlePlaceholder: string;
495
- addPage: string;
496
- notesPlaceholder: string;
497
- /** template: "Added a blank page at {n}" */
498
- toastInserted: string;
499
- insertFailed: string;
500
- cardTitlePlaceholder: string;
501
- renameCard: string;
502
- status: string;
503
- statusNone: string;
504
- statusTodo: string;
505
- statusDoing: string;
506
- statusReview: string;
507
- statusDone: string;
508
- memoPlaceholder: string;
509
- linkHandle: string;
510
- showLinks: string;
511
- hideLinks: string;
512
- removeLink: string;
513
- };
514
479
  pdfToast: {
515
480
  title: string;
516
481
  /** template: "Processing page {current} of {total}" */
@@ -513,8 +513,7 @@ function findDefaultExportArray(source) {
513
513
  return {
514
514
  elements,
515
515
  arrayStart,
516
- arrayEnd,
517
- statementStart: node.start
516
+ arrayEnd
518
517
  };
519
518
  }
520
519
  return null;
@@ -721,73 +720,6 @@ function chooseInsertSeparator(prefix, existingSeparators) {
721
720
  }
722
721
  return ", ";
723
722
  }
724
- /** Separator slots for an array that gained an element at `index`. */
725
- function separatorsAroundInsert(separators, index, count, insertSep) {
726
- const out = [];
727
- for (let i = 0; i < count - 1; i++) if (i === index) out.push(insertSep);
728
- else if (i === index - 1) out.push(separators[index - 1] ?? insertSep);
729
- else out.push(separators[i > index ? i - 1 : i] ?? insertSep);
730
- return out;
731
- }
732
- /** Rebuild `[...]` with `text` sitting at `index`, reusing the author's separators. */
733
- function insertIntoDefaultExportArray(source, found, index, text) {
734
- const { elements, arrayStart, arrayEnd } = found;
735
- const n = elements.length;
736
- const prefix = source.slice(arrayStart, elements[0].start);
737
- const suffix = source.slice(elements[n - 1].end, arrayEnd);
738
- const separators = [];
739
- for (let i = 0; i < n - 1; i++) separators.push(source.slice(elements[i].end, elements[i + 1].start));
740
- const texts = elements.map((el) => source.slice(el.start, el.end));
741
- texts.splice(index, 0, text);
742
- const insertSep = chooseInsertSeparator(prefix, separators);
743
- const seps = separatorsAroundInsert(separators, index, texts.length, insertSep);
744
- let rebuilt = prefix + texts[0];
745
- for (let i = 1; i < texts.length; i++) rebuilt += seps[i - 1] + texts[i];
746
- rebuilt += suffix;
747
- return source.slice(0, arrayStart) + rebuilt + source.slice(arrayEnd);
748
- }
749
- function chooseBlankPageName(source) {
750
- const used = new Set(source.match(/[A-Za-z_$][\w$]*/g) ?? []);
751
- for (let i = 1;; i++) {
752
- const name = `NewPage${i}`;
753
- if (!used.has(name)) return name;
754
- }
755
- }
756
- /**
757
- * Insert a brand-new blank page at `index`, declaring its component above the
758
- * default export and adding it to the array. Unlike duplication, nothing is
759
- * copied: the page is an empty full-bleed surface for the author to build on.
760
- *
761
- * Returns `null` when the default export isn't an array literal or `index` is
762
- * past the end of the deck.
763
- */
764
- function insertBlankPageInDefaultExportInSource(source, index) {
765
- const found = findDefaultExportArray(source);
766
- if (!found) return null;
767
- const n = found.elements.length;
768
- if (!Number.isInteger(index) || index < 0 || index > n) return null;
769
- const name = chooseBlankPageName(source);
770
- const withArray = insertIntoDefaultExportArray(source, found, index, name);
771
- const before = withArray.slice(0, found.statementStart);
772
- const gap = before.endsWith("\n\n") ? "" : before.endsWith("\n") ? "\n" : "\n\n";
773
- return before + `const ${name} = () => (\n <div style={{ width: '100%', height: '100%', background: '#ffffff' }} />\n);\n` + gap + withArray.slice(found.statementStart);
774
- }
775
- /**
776
- * Insert an empty note slot at `index` so `notes` stays aligned with the pages
777
- * after a page is inserted. Trailing empty slots are dropped again by
778
- * {@link rebuildNotesArray}, which is correct: an absent note is `undefined`.
779
- */
780
- function insertNotesElementInSource(source, index) {
781
- if (!Number.isInteger(index) || index < 0) return null;
782
- const found = findNotesArray(source);
783
- if (found === "invalid") return null;
784
- if (found === null) return source;
785
- const { arrayStart, arrayEnd, elementTexts } = found;
786
- if (index > elementTexts.length) return source;
787
- const next = elementTexts.slice();
788
- next.splice(index, 0, "undefined");
789
- return rebuildNotesArray(source, arrayStart, arrayEnd, next);
790
- }
791
723
  /**
792
724
  * Duplicate the element at `index` in `export default [...]`, inserting the
793
725
  * copy immediately after the original. Reuses an existing inter-element
@@ -1155,4 +1087,4 @@ function registerUpdateRoutes(server, ctx) {
1155
1087
  });
1156
1088
  }
1157
1089
  //#endregion
1158
- export { renameSlideDir as A, validateMutationRequest as B, duplicatePageInDefaultExportInSource as C, readMetaTitleInSource as D, insertNotesElementInSource as E, slugifyTitle as F, CONFIG_FILES as H, updateMetaTitleInSource as I, validateSlideName as L, reorderNotesArrayInSource as M, resolveSlideEntry as N, removeNotesElementInSource as O, rmSlideDir as P, declaredFrameworkSpecifier as R, duplicateNotesElementInSource as S, insertBlankPageInDefaultExportInSource as T, PKG_NAMES as U, BIN_NAME as V, isFrameworkSpecifier as W, writeManifest as _, json as a, SLIDE_ID_RE as b, readSlideSource as c, foldersManifestPath as d, newFolderId as f, validateReorder as g, validateName as h, BodyTooLargeError as i, reorderDefaultExportPagesInSource as j, removePageFromDefaultExportInSource as k, resolveSlideEntryPath as l, validateIcon as m, registerUpdateRoutes as n, makeContext as o, readManifest as p, runCommand as r, readBody as s, detectPackageManager as t, FOLDER_ID_RE as u, shortId as v, duplicateSlideDir as w, createBlankSlideDir as x, BLANK_SLIDE_TITLE as y, isLoopbackRequest as z };
1090
+ export { reorderNotesArrayInSource as A, CONFIG_FILES as B, duplicatePageInDefaultExportInSource as C, removePageFromDefaultExportInSource as D, removeNotesElementInSource as E, validateSlideName as F, isFrameworkSpecifier as H, declaredFrameworkSpecifier as I, isLoopbackRequest as L, rmSlideDir as M, slugifyTitle as N, renameSlideDir as O, updateMetaTitleInSource as P, validateMutationRequest as R, duplicateNotesElementInSource as S, readMetaTitleInSource as T, PKG_NAMES as V, writeManifest as _, json as a, SLIDE_ID_RE as b, readSlideSource as c, foldersManifestPath as d, newFolderId as f, validateReorder as g, validateName as h, BodyTooLargeError as i, resolveSlideEntry as j, reorderDefaultExportPagesInSource as k, resolveSlideEntryPath as l, validateIcon as m, registerUpdateRoutes as n, makeContext as o, readManifest as p, runCommand as r, readBody as s, detectPackageManager as t, FOLDER_ID_RE as u, shortId as v, duplicateSlideDir as w, createBlankSlideDir as x, BLANK_SLIDE_TITLE as y, BIN_NAME as z };
@@ -1,4 +1,4 @@
1
- import { r as LemonRiverConfig } from "../config-rMGCkz6i.js";
1
+ import { r as LemonRiverConfig } from "../config-teo3kWz7.js";
2
2
  import { InlineConfig } from "vite";
3
3
  //#region src/vite/config.d.ts
4
4
  type CreateViteConfigOptions = {
@@ -1,2 +1,2 @@
1
- import { t as createViteConfig } from "../config-BjWCLoMQ.js";
1
+ import { t as createViteConfig } from "../config-DJ5rkMMg.js";
2
2
  export { createViteConfig };
@@ -438,40 +438,6 @@ const en = {
438
438
  scrollUpToCurrentPage: "Scroll up to current page {n}",
439
439
  scrollDownToCurrentPage: "Scroll down to current page {n}"
440
440
  },
441
- board: {
442
- title: "Story board",
443
- openBoard: "Story board (B)",
444
- backToDeck: "Back to deck",
445
- hint: "Drag a card to reorder · Double-click to edit the page · Drag the dot to link two cards",
446
- loading: "Loading deck…",
447
- columnFallback: "Part {n}",
448
- moveToEnd: "Move to end",
449
- reorderFailed: "Could not reorder pages",
450
- zoomIn: "Zoom in",
451
- zoomOut: "Zoom out",
452
- fitView: "Fit to view",
453
- saveFailed: "Could not save the board layout",
454
- renameColumn: "Rename this column",
455
- columnTitlePlaceholder: "Column name",
456
- addPage: "Add a page to this column (copies the last one)",
457
- notesPlaceholder: "Speaker notes…",
458
- /** template: "Added a blank page at {n}" */
459
- toastInserted: "Added a blank page at {n}",
460
- insertFailed: "Could not add a page",
461
- cardTitlePlaceholder: "Name this card",
462
- renameCard: "Rename this card",
463
- status: "Status",
464
- statusNone: "No status",
465
- statusTodo: "To do",
466
- statusDoing: "In progress",
467
- statusReview: "In review",
468
- statusDone: "Done",
469
- memoPlaceholder: "Work memo — stays on the board…",
470
- linkHandle: "Drag onto another card to link them",
471
- showLinks: "Show links",
472
- hideLinks: "Hide links",
473
- removeLink: "Remove this link"
474
- },
475
441
  pdfToast: {
476
442
  title: "Exporting PDF",
477
443
  processing: "Processing page {current} of {total}",
@@ -1100,39 +1066,6 @@ const es = {
1100
1066
  scrollUpToCurrentPage: "Subir hasta la página actual {n}",
1101
1067
  scrollDownToCurrentPage: "Bajar hasta la página actual {n}"
1102
1068
  },
1103
- board: {
1104
- title: "Tablero de la historia",
1105
- openBoard: "Tablero de la historia (B)",
1106
- backToDeck: "Volver a la presentación",
1107
- hint: "Arrastra una tarjeta para reordenar · Haz doble clic para editar la página · Arrastra el punto para enlazar dos tarjetas",
1108
- loading: "Cargando presentación…",
1109
- columnFallback: "Parte {n}",
1110
- moveToEnd: "Mover al final",
1111
- reorderFailed: "No se pudieron reordenar las páginas",
1112
- zoomIn: "Acercar",
1113
- zoomOut: "Alejar",
1114
- fitView: "Ajustar a la vista",
1115
- saveFailed: "No se pudo guardar la disposición del tablero",
1116
- renameColumn: "Renombrar esta columna",
1117
- columnTitlePlaceholder: "Nombre de la columna",
1118
- addPage: "Añadir una página a esta columna (copia la última)",
1119
- notesPlaceholder: "Notas del orador…",
1120
- toastInserted: "Página en blanco añadida en {n}",
1121
- insertFailed: "No se pudo añadir la página",
1122
- cardTitlePlaceholder: "Nombra esta tarjeta",
1123
- renameCard: "Renombrar esta tarjeta",
1124
- status: "Estado",
1125
- statusNone: "Sin estado",
1126
- statusTodo: "Por hacer",
1127
- statusDoing: "En curso",
1128
- statusReview: "En revisión",
1129
- statusDone: "Hecho",
1130
- memoPlaceholder: "Nota de trabajo — se queda en el tablero…",
1131
- linkHandle: "Arrastra sobre otra tarjeta para enlazarlas",
1132
- showLinks: "Mostrar enlaces",
1133
- hideLinks: "Ocultar enlaces",
1134
- removeLink: "Quitar este enlace"
1135
- },
1136
1069
  pdfToast: {
1137
1070
  title: "Exportando PDF",
1138
1071
  processing: "Procesando página {current} de {total}",
@@ -1761,39 +1694,6 @@ const ja = {
1761
1694
  scrollUpToCurrentPage: "上にスクロールして現在のページ {n} へ移動",
1762
1695
  scrollDownToCurrentPage: "下にスクロールして現在のページ {n} へ移動"
1763
1696
  },
1764
- board: {
1765
- title: "ストーリーボード",
1766
- openBoard: "ストーリーボード (B)",
1767
- backToDeck: "スライドに戻る",
1768
- hint: "カードをドラッグして並べ替え · ダブルクリックで編集 · 丸をドラッグして関連付け",
1769
- loading: "読み込み中…",
1770
- columnFallback: "パート {n}",
1771
- moveToEnd: "最後に移動",
1772
- reorderFailed: "並べ替えに失敗しました",
1773
- zoomIn: "拡大",
1774
- zoomOut: "縮小",
1775
- fitView: "全体を表示",
1776
- saveFailed: "ボードの保存に失敗しました",
1777
- renameColumn: "この列の名前を変更",
1778
- columnTitlePlaceholder: "列の名前",
1779
- addPage: "この列にページを追加(最後のページを複製)",
1780
- notesPlaceholder: "発表者ノート…",
1781
- toastInserted: "ページ {n} に白紙ページを追加しました",
1782
- insertFailed: "ページを追加できませんでした",
1783
- cardTitlePlaceholder: "カードに名前を付ける",
1784
- renameCard: "カード名を変更",
1785
- status: "ステータス",
1786
- statusNone: "なし",
1787
- statusTodo: "未着手",
1788
- statusDoing: "進行中",
1789
- statusReview: "確認待ち",
1790
- statusDone: "完了",
1791
- memoPlaceholder: "作業メモ…(ボードだけに残ります)",
1792
- linkHandle: "別のカードにドラッグして関連付け",
1793
- showLinks: "関連線を表示",
1794
- hideLinks: "関連線を隠す",
1795
- removeLink: "この関連を削除"
1796
- },
1797
1697
  pdfToast: {
1798
1698
  title: "PDF を書き出し中",
1799
1699
  processing: "ページ {current} / {total} を処理中",
@@ -2422,39 +2322,6 @@ const zhCN = {
2422
2322
  scrollUpToCurrentPage: "向上滚动至当前第 {n} 页",
2423
2323
  scrollDownToCurrentPage: "向下滚动至当前第 {n} 页"
2424
2324
  },
2425
- board: {
2426
- title: "故事看板",
2427
- openBoard: "故事看板 (B)",
2428
- backToDeck: "返回幻灯片",
2429
- hint: "拖动卡片调整顺序 · 双击进入该页编辑 · 拖动圆点关联两页",
2430
- loading: "正在加载…",
2431
- columnFallback: "第 {n} 部分",
2432
- moveToEnd: "移到末尾",
2433
- reorderFailed: "调整顺序失败",
2434
- zoomIn: "放大",
2435
- zoomOut: "缩小",
2436
- fitView: "适应窗口",
2437
- saveFailed: "看板布局保存失败",
2438
- renameColumn: "重命名这一栏",
2439
- columnTitlePlaceholder: "栏目名称",
2440
- addPage: "在这一栏新增一页(复制最后一页)",
2441
- notesPlaceholder: "讲稿…",
2442
- toastInserted: "已在第 {n} 页新建空白页",
2443
- insertFailed: "新建页面失败",
2444
- cardTitlePlaceholder: "给这张卡片起个名字",
2445
- renameCard: "重命名这张卡片",
2446
- status: "状态",
2447
- statusNone: "无状态",
2448
- statusTodo: "待做",
2449
- statusDoing: "进行中",
2450
- statusReview: "待确认",
2451
- statusDone: "已完成",
2452
- memoPlaceholder: "工作备注…(只在看板上,不进材料)",
2453
- linkHandle: "拖到另一张卡片上建立关联",
2454
- showLinks: "显示关联线",
2455
- hideLinks: "隐藏关联线",
2456
- removeLink: "删除这条关联"
2457
- },
2458
2325
  pdfToast: {
2459
2326
  title: "导出 PDF",
2460
2327
  processing: "正在处理第 {current} / {total} 页",
@@ -2496,9 +2363,9 @@ const zhCN = {
2496
2363
  themeToggle: {
2497
2364
  toggleAria: "切换主题",
2498
2365
  title: "主题",
2499
- light: "浅色",
2500
- dark: "深色",
2501
- system: "系统"
2366
+ light: "清爽白",
2367
+ dark: "夜间果园",
2368
+ system: "跟随系统"
2502
2369
  },
2503
2370
  languageToggle: {
2504
2371
  toggleAria: "切换语言",
@@ -3083,39 +2950,6 @@ const zhTW = {
3083
2950
  scrollUpToCurrentPage: "向上捲動至目前的第 {n} 頁",
3084
2951
  scrollDownToCurrentPage: "向下捲動至目前的第 {n} 頁"
3085
2952
  },
3086
- board: {
3087
- title: "故事看板",
3088
- openBoard: "故事看板 (B)",
3089
- backToDeck: "返回投影片",
3090
- hint: "拖動卡片調整順序 · 雙擊進入該頁編輯 · 拖動圓點關聯兩頁",
3091
- loading: "正在載入…",
3092
- columnFallback: "第 {n} 部分",
3093
- moveToEnd: "移到最後",
3094
- reorderFailed: "調整順序失敗",
3095
- zoomIn: "放大",
3096
- zoomOut: "縮小",
3097
- fitView: "適應視窗",
3098
- saveFailed: "看板版面儲存失敗",
3099
- renameColumn: "重新命名這一欄",
3100
- columnTitlePlaceholder: "欄目名稱",
3101
- addPage: "在這一欄新增一頁(複製最後一頁)",
3102
- notesPlaceholder: "講稿…",
3103
- toastInserted: "已於第 {n} 頁新增空白頁",
3104
- insertFailed: "新增頁面失敗",
3105
- cardTitlePlaceholder: "幫這張卡片取個名字",
3106
- renameCard: "重新命名這張卡片",
3107
- status: "狀態",
3108
- statusNone: "無狀態",
3109
- statusTodo: "待做",
3110
- statusDoing: "進行中",
3111
- statusReview: "待確認",
3112
- statusDone: "已完成",
3113
- memoPlaceholder: "工作備註…(只在看板上,不進投影片)",
3114
- linkHandle: "拖到另一張卡片上建立關聯",
3115
- showLinks: "顯示關聯線",
3116
- hideLinks: "隱藏關聯線",
3117
- removeLink: "刪除這條關聯"
3118
- },
3119
2953
  pdfToast: {
3120
2954
  title: "匯出 PDF",
3121
2955
  processing: "處理第 {current} / {total} 頁",
@@ -3157,9 +2991,9 @@ const zhTW = {
3157
2991
  themeToggle: {
3158
2992
  toggleAria: "切換主題",
3159
2993
  title: "主題",
3160
- light: "淺色",
3161
- dark: "深色",
3162
- system: "系統"
2994
+ light: "清爽白",
2995
+ dark: "夜間果園",
2996
+ system: "跟隨系統"
3163
2997
  },
3164
2998
  languageToggle: {
3165
2999
  toggleAria: "切換語言",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemonriver/core",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Runtime and CLI for LemonRiver — write slides in slides/, we handle the rest.",
5
5
  "type": "module",
6
6
  "exports": {
package/src/app/app.tsx CHANGED
@@ -1,8 +1,8 @@
1
1
  import config from 'virtual:open-slide/config';
2
- import { lazy, Suspense } from 'react';
3
2
  import { BrowserRouter, Route, Routes } from 'react-router-dom';
4
- import { Toaster } from './components/ui/sonner';
5
3
  import { TooltipProvider } from './components/ui/tooltip';
4
+ import { AppChrome } from './lemonriver/chrome/app-chrome';
5
+ import { lemonRiverRoutes, lemonRiverShellRoutes } from './lemonriver/routes';
6
6
  import { useLocale } from './lib/use-locale';
7
7
  import { AssetsPage } from './routes/assets';
8
8
  import { Home } from './routes/home';
@@ -12,11 +12,6 @@ import { Preview } from './routes/preview';
12
12
  import { Slide } from './routes/slide';
13
13
  import { ThemeDetailPage, ThemesGalleryPage } from './routes/themes';
14
14
 
15
- // The board writes through dev-only routes, so it never ships in a built deck.
16
- const Board = import.meta.env.DEV
17
- ? lazy(() => import('./routes/board').then((m) => ({ default: m.Board })))
18
- : null;
19
-
20
15
  export function App() {
21
16
  return (
22
17
  <BrowserRouter basename={import.meta.env.BASE_URL}>
@@ -26,6 +21,7 @@ export function App() {
26
21
  <Routes>
27
22
  {config.build.showSlideBrowser && (
28
23
  <Route element={<HomeShell />}>
24
+ {lemonRiverShellRoutes()}
29
25
  <Route path="/" element={<Home />} />
30
26
  <Route path="/themes" element={<ThemesGalleryPage />} />
31
27
  <Route path="/themes/:themeId" element={<ThemeDetailPage />} />
@@ -34,21 +30,12 @@ export function App() {
34
30
  )}
35
31
  <Route path="/s/:slideId" element={<Slide />} />
36
32
  <Route path="/s/:slideId/presenter" element={<Presenter />} />
37
- {Board && (
38
- <Route
39
- path="/s/:slideId/board"
40
- element={
41
- <Suspense fallback={null}>
42
- <Board />
43
- </Suspense>
44
- }
45
- />
46
- )}
33
+ {lemonRiverRoutes()}
47
34
  {import.meta.env.DEV && <Route path="/s/:slideId/preview" element={<Preview />} />}
48
35
  <Route path="*" element={<NotFound />} />
49
36
  </Routes>
50
37
  </TooltipProvider>
51
- <Toaster />
38
+ <AppChrome />
52
39
  </BrowserRouter>
53
40
  );
54
41
  }
@@ -47,6 +47,7 @@ import type {
47
47
  AgentTurnContext,
48
48
  RespondPayload,
49
49
  } from '../../../agent/types';
50
+ import { PanelLemon } from '../../lemonriver/agent/lemon';
50
51
  import { Composer, ContextChip } from './composer';
51
52
  import { ConnectView } from './connect-view';
52
53
  import { HistoryView } from './history-view';
@@ -556,6 +557,7 @@ function NewDeckState({ providerName }: { providerName: string }) {
556
557
  const t = useLocale();
557
558
  return (
558
559
  <div className="flex min-h-0 flex-1 flex-col justify-end overflow-y-auto px-4 py-5">
560
+ <PanelLemon />
559
561
  <h2 className="font-heading text-[15px] font-semibold tracking-tight">
560
562
  {t.agent.newDeckTitle}
561
563
  </h2>
@@ -584,6 +586,7 @@ function EmptyState({
584
586
  const t = useLocale();
585
587
  return (
586
588
  <div className="flex min-h-0 flex-1 flex-col justify-end overflow-y-auto px-4 py-5">
589
+ <PanelLemon />
587
590
  <span className="eyebrow">{t.agent.title}</span>
588
591
  <h2 className="mt-1.5 font-heading text-[15px] font-semibold tracking-tight">
589
592
  {t.agent.emptyTitle}
@@ -2,7 +2,7 @@ import { useEffect, useRef, useState } from 'react';
2
2
  import { type AgentActivity, setDockOpen, useAgentState } from '@/lib/agent/use-agent';
3
3
  import { format, useLocale } from '@/lib/use-locale';
4
4
  import { cn } from '@/lib/utils';
5
- import { ProviderLogo } from './provider-logo';
5
+ import { PresenceLemon } from '../../lemonriver/agent/lemon';
6
6
 
7
7
  // `revision` changes whenever the deck module reloads, so each write the
8
8
  // agent lands sweeps a band of light across the canvas.
@@ -55,7 +55,7 @@ function AgentPresencePill({ activity }: { activity: AgentActivity }) {
55
55
  onClick={() => setDockOpen(true)}
56
56
  className="island-enter absolute top-2 left-1/2 z-20 flex h-7 max-w-[min(420px,calc(100%-1rem))] -translate-x-1/2 items-center gap-2 rounded-full border border-hairline bg-popover/90 px-2.5 text-[11.5px] shadow-floating backdrop-blur-md md:top-3"
57
57
  >
58
- <ProviderLogo provider={activity.provider} className="size-3.5 shrink-0" />
58
+ <PresenceLemon phase={activity.phase} />
59
59
  <span className="shrink-0 font-medium">
60
60
  {format(t.agent.presenceEditing, { provider: name })}
61
61
  </span>
@@ -1,9 +1,10 @@
1
- import { Check, MessageSquare, Trash2 } from 'lucide-react';
1
+ import { Check, Trash2 } from 'lucide-react';
2
2
  import { useMemo } from 'react';
3
3
  import { useLocale } from '@/lib/use-locale';
4
4
  import { useSlideTitles } from '@/lib/use-slide-titles';
5
5
  import { cn } from '@/lib/utils';
6
6
  import type { AgentSessionSummary } from '../../../agent/types';
7
+ import { EmptyLemon } from '../../lemonriver/agent/lemon';
7
8
  import { ProviderLogo } from './provider-logo';
8
9
 
9
10
  const UNITS: [Intl.RelativeTimeFormatUnit, number][] = [
@@ -60,7 +61,7 @@ export function HistoryView({
60
61
  if (sessions.length === 0) {
61
62
  return (
62
63
  <div className="flex min-h-0 flex-1 flex-col items-center justify-center gap-2 px-6 text-center">
63
- <MessageSquare className="size-5 text-muted-foreground/60" strokeWidth={1.5} aria-hidden />
64
+ <EmptyLemon />
64
65
  <p className="text-[12.5px] font-medium">{t.agent.noSessions}</p>
65
66
  <p className="text-[11.5px] leading-relaxed text-muted-foreground">
66
67
  {t.agent.historyEmptyHint}
@@ -1,4 +1,4 @@
1
- import { Check, ChevronRight, CircleAlert, Copy, Pencil } from 'lucide-react';
1
+ import { Check, ChevronRight, Copy, Pencil } from 'lucide-react';
2
2
  import { type ReactNode, useEffect, useLayoutEffect, useRef, useState } from 'react';
3
3
  import { Button } from '@/components/ui/button';
4
4
  import { useAutoGrow } from '@/lib/use-auto-grow';
@@ -6,6 +6,7 @@ import { format, plural, useLocale } from '@/lib/use-locale';
6
6
  import { cn } from '@/lib/utils';
7
7
  import { stripDeckSlug } from '../../../agent/prompt';
8
8
  import type { AgentItem, AgentQuestion, AgentSession, RespondPayload } from '../../../agent/types';
9
+ import { ConfirmWho, ErrorLemon, ResultLemon, WorkingLemon } from '../../lemonriver/agent/lemon';
9
10
  import { AgentMarkdown } from './agent-markdown';
10
11
 
11
12
  export function Transcript({
@@ -72,6 +73,7 @@ function WorkingIndicator() {
72
73
  const t = useLocale();
73
74
  return (
74
75
  <div className="text-[11.5px]">
76
+ <WorkingLemon />
75
77
  <span className="agent-shimmer">{t.agent.working}…</span>
76
78
  </div>
77
79
  );
@@ -407,7 +409,7 @@ function ErrorItem({ text }: { text: string }) {
407
409
  return (
408
410
  <div className="rounded-[6px] border border-destructive/30 bg-destructive/5 px-3 py-2">
409
411
  <span className="eyebrow flex items-center gap-1 text-destructive/80">
410
- <CircleAlert className="size-3" aria-hidden />
412
+ <ErrorLemon />
411
413
  {t.agent.errorEyebrow}
412
414
  </span>
413
415
  <pre className="mt-1 whitespace-pre-wrap font-mono text-[11px] leading-relaxed text-foreground/85">
@@ -426,7 +428,12 @@ function ResultItem({ item }: { item: Extract<AgentItem, { kind: 'result' }> })
426
428
  );
427
429
  }
428
430
  if (item.costUsd !== null && item.costUsd > 0) parts.push(`$${item.costUsd.toFixed(2)}`);
429
- return <p className="folio text-muted-foreground/70">{parts.join(' · ')}</p>;
431
+ return (
432
+ <p className="folio text-muted-foreground/70">
433
+ <ResultLemon aborted={item.aborted} />
434
+ {parts.join(' · ')}
435
+ </p>
436
+ );
430
437
  }
431
438
 
432
439
  function PermissionItem({
@@ -540,7 +547,11 @@ function QuestionItem({
540
547
  }
541
548
 
542
549
  return (
543
- <div className="rounded-[8px] border border-hairline bg-background px-1.5 pt-2.5 pb-2">
550
+ <div
551
+ data-lr-confirm
552
+ className="rounded-[8px] border border-hairline bg-background px-1.5 pt-2.5 pb-2"
553
+ >
554
+ <ConfirmWho />
544
555
  <div className="flex flex-col gap-3">
545
556
  {item.questions.map((q) => (
546
557
  <fieldset key={q.question} className="min-w-0">
@@ -75,6 +75,8 @@ import {
75
75
  import { dragHasFiles } from '@/lib/dom';
76
76
  import { format, useLocale } from '@/lib/use-locale';
77
77
  import { cn, pad2 } from '@/lib/utils';
78
+ import { EmptyLemon } from '../lemonriver/agent/lemon';
79
+ import { toastUploadFailed } from '../lemonriver/feedback/upload';
78
80
 
79
81
  type Props = { slideId: string | null };
80
82
 
@@ -239,18 +241,18 @@ export function AssetView({ slideId }: Props) {
239
241
  if (decision === 'cancel') return;
240
242
  if (decision === 'replace') {
241
243
  const res = await upload(file, { overwrite: true });
242
- if (!res.ok) toast.error(format(t.asset.toastUploadFailed, { status: res.status }));
244
+ if (!res.ok) toastUploadFailed(t, res.status);
243
245
  else toast.success(format(t.asset.toastReplaced, { name: file.name }));
244
246
  return;
245
247
  }
246
248
  const next = renamedCopy(file, existingNames);
247
249
  const res = await upload(next, { overwrite: false });
248
- if (!res.ok) toast.error(format(t.asset.toastUploadFailed, { status: res.status }));
250
+ if (!res.ok) toastUploadFailed(t, res.status);
249
251
  else toast.success(format(t.asset.toastUploadedAs, { name: next.name }));
250
252
  return;
251
253
  }
252
254
  const res = await upload(file);
253
- if (!res.ok) toast.error(format(t.asset.toastUploadFailed, { status: res.status }));
255
+ if (!res.ok) toastUploadFailed(t, res.status);
254
256
  else toast.success(format(t.asset.toastUploaded, { name: file.name }));
255
257
  }
256
258
 
@@ -662,9 +664,7 @@ function EmptyState() {
662
664
  const t = useLocale();
663
665
  return (
664
666
  <div className="flex h-full flex-col items-center justify-center gap-4 px-6 py-16 text-center">
665
- <div className="flex size-12 items-center justify-center rounded-full border border-hairline bg-card text-muted-foreground">
666
- <ImageIcon className="size-5" />
667
- </div>
667
+ <EmptyLemon size={96} />
668
668
  <div>
669
669
  <p className="font-heading text-[14px] font-semibold tracking-tight">
670
670
  {t.asset.noAssetsYet}