@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.
- package/dist/{build-Df_xwIpg.js → build-Bqo69DWP.js} +1 -1
- package/dist/cli/bin.js +4 -4
- package/dist/{config-BjWCLoMQ.js → config-DJ5rkMMg.js} +1594 -974
- package/dist/{config-rMGCkz6i.d.ts → config-teo3kWz7.d.ts} +1 -1
- package/dist/{dev-Ctsx9IeO.js → dev-B2FJD5bJ.js} +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/locale/index.d.ts +1 -1
- package/dist/locale/index.js +1 -1
- package/dist/{preview-CJgcqsPk.js → preview-C93BOZL1.js} +1 -1
- package/dist/{types-8VUyA2bu.d.ts → types-DFK02XVv.d.ts} +0 -35
- package/dist/{update-BKOA3Z6o.js → update-DsxZBtwv.js} +2 -70
- package/dist/vite/index.d.ts +1 -1
- package/dist/vite/index.js +1 -1
- package/dist/{zh-tw-CeLrYwRE.js → zh-tw-DwTAZKa6.js} +6 -172
- package/package.json +1 -1
- package/src/app/app.tsx +5 -18
- package/src/app/components/agent/agent-panel.tsx +3 -0
- package/src/app/components/agent/agent-presence.tsx +2 -2
- package/src/app/components/agent/history-view.tsx +3 -2
- package/src/app/components/agent/transcript.tsx +15 -4
- package/src/app/components/asset-view.tsx +6 -6
- package/src/app/components/command/command-menu.tsx +2 -1
- package/src/app/components/inspector/asset-picker-dialog.tsx +7 -5
- package/src/app/components/inspector/comment-layer.tsx +2 -1
- package/src/app/components/inspector/inspector-panel.tsx +2 -2
- package/src/app/components/sidebar/sidebar-footer.tsx +1 -1
- package/src/app/components/sidebar/sidebar.tsx +3 -2
- package/src/app/components/themes/theme-detail.tsx +4 -2
- package/src/app/components/thumbnail-rail.tsx +1 -28
- package/src/app/index.html +2 -2
- package/src/app/lemonriver/agent/lemon.tsx +64 -0
- package/src/app/{components → lemonriver}/board/board-canvas.tsx +17 -17
- package/src/app/{routes/board.tsx → lemonriver/board/board-page.tsx} +16 -15
- package/src/app/{components → lemonriver}/board/layout.ts +1 -1
- package/src/app/lemonriver/board/model/cards.test.ts +239 -0
- package/src/app/lemonriver/board/model/cards.ts +234 -0
- package/src/app/lemonriver/board/model/structure.test.ts +101 -0
- package/src/app/lemonriver/board/model/structure.ts +82 -0
- package/src/app/{components → lemonriver}/board/page-node.tsx +34 -31
- package/src/app/{components → lemonriver}/board/use-board-cards.ts +6 -6
- package/src/app/{components → lemonriver}/board/use-board-columns.ts +7 -7
- package/src/app/{components → lemonriver}/board/use-page-order.ts +10 -6
- package/src/app/lemonriver/brand/app-icon.svg +44 -0
- package/src/app/lemonriver/brand/apple-touch-icon.png +0 -0
- package/src/app/lemonriver/brand/favicon-32.png +0 -0
- package/src/app/lemonriver/brand/mascot.tsx +59 -0
- package/src/app/lemonriver/brand/mascots/lemon-done.png +0 -0
- package/src/app/lemonriver/brand/mascots/lemon-idle.png +0 -0
- package/src/app/lemonriver/brand/mascots/lemon-needs-you.png +0 -0
- package/src/app/lemonriver/brand/mascots/lemon-thinking.png +0 -0
- package/src/app/lemonriver/brand/mascots/lemon-working.png +0 -0
- package/src/app/lemonriver/chrome/app-chrome.tsx +99 -0
- package/src/app/lemonriver/chrome/nav-row.tsx +34 -0
- package/src/app/lemonriver/chrome/not-found.tsx +34 -0
- package/src/app/lemonriver/chrome/sidebar-extras.tsx +57 -0
- package/src/app/lemonriver/chrome/use-slot.ts +23 -0
- package/src/app/lemonriver/features.test.ts +29 -0
- package/src/app/lemonriver/features.ts +26 -0
- package/src/app/lemonriver/feedback/export.ts +7 -0
- package/src/app/lemonriver/feedback/lemon-empty.tsx +54 -0
- package/src/app/lemonriver/feedback/offline-banner.tsx +41 -0
- package/src/app/lemonriver/feedback/pending-toast.test.ts +44 -0
- package/src/app/lemonriver/feedback/pending-toast.ts +39 -0
- package/src/app/lemonriver/feedback/toaster.tsx +34 -0
- package/src/app/lemonriver/feedback/upload.test.ts +26 -0
- package/src/app/lemonriver/feedback/upload.ts +19 -0
- package/src/app/lemonriver/home/brief-card.tsx +63 -0
- package/src/app/lemonriver/home/brief.test.ts +38 -0
- package/src/app/lemonriver/home/brief.ts +34 -0
- package/src/app/lemonriver/home/controls.tsx +93 -0
- package/src/app/lemonriver/home/deck-card.tsx +183 -0
- package/src/app/lemonriver/home/dialogs.tsx +292 -0
- package/src/app/lemonriver/home/home-page.tsx +335 -0
- package/src/app/lemonriver/home/sorting.test.ts +24 -0
- package/src/app/lemonriver/home/sorting.ts +59 -0
- package/src/app/lemonriver/home/time.test.ts +33 -0
- package/src/app/lemonriver/home/time.ts +33 -0
- package/src/app/lemonriver/home/use-deck-times.ts +27 -0
- package/src/app/lemonriver/home/use-delayed.ts +15 -0
- package/src/app/lemonriver/routes.test.tsx +37 -0
- package/src/app/lemonriver/routes.tsx +38 -0
- package/src/app/lemonriver/settings/settings-page.tsx +103 -0
- package/src/app/lemonriver/slide-extensions.tsx +73 -0
- package/src/app/lemonriver/text/all.ts +19 -0
- package/src/app/lemonriver/text/en.ts +106 -0
- package/src/app/lemonriver/text/es.ts +108 -0
- package/src/app/lemonriver/text/index.ts +9 -0
- package/src/app/lemonriver/text/ja.ts +106 -0
- package/src/app/lemonriver/text/text.test.ts +57 -0
- package/src/app/lemonriver/text/types.ts +111 -0
- package/src/app/lemonriver/text/zh-cn.ts +101 -0
- package/src/app/lemonriver/text/zh-tw.ts +101 -0
- package/src/app/lemonriver/theme/app.css +288 -0
- package/src/app/lemonriver/theme/controls.css +463 -0
- package/src/app/lemonriver/theme/index.css +3 -0
- package/src/app/lemonriver/theme/motion.ts +52 -0
- package/src/app/lemonriver/theme/pages.test.ts +66 -0
- package/src/app/lemonriver/theme/pages.ts +56 -0
- package/src/app/lemonriver/theme/theme-menu.tsx +64 -0
- package/src/app/lemonriver/theme/themes.test.ts +18 -0
- package/src/app/lemonriver/theme/themes.ts +16 -0
- package/src/app/lemonriver/theme/tokens.css +226 -0
- package/src/app/lemonriver/theme/use-theme.tsx +49 -0
- package/src/app/lemonriver/trash/api.test.ts +19 -0
- package/src/app/lemonriver/trash/api.ts +77 -0
- package/src/app/lemonriver/trash/trash-page.tsx +131 -0
- package/src/app/lib/pptx/raster.ts +1 -1
- package/src/app/main.tsx +8 -1
- package/src/app/routes/home-shell.tsx +4 -2
- package/src/app/routes/slide.tsx +12 -16
- package/src/app/styles.css +1 -0
- package/src/locale/en.ts +0 -35
- package/src/locale/es.ts +0 -34
- package/src/locale/ja.ts +0 -34
- package/src/locale/types.ts +0 -36
- package/src/locale/zh-cn.ts +3 -37
- package/src/locale/zh-tw.ts +3 -37
- /package/src/app/{components → lemonriver}/board/board.css +0 -0
- /package/src/app/{components → lemonriver}/board/layout.test.ts +0 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import { useLocale } from '@/lib/use-locale';
|
|
3
|
+
import { cn } from '@/lib/utils';
|
|
4
|
+
import { useLrText } from '../text';
|
|
5
|
+
import { setReduceMotionSetting, useReduceMotionSetting } from '../theme/motion';
|
|
6
|
+
import { LR_THEME_CHOICES, type LrThemeChoice } from '../theme/themes';
|
|
7
|
+
import { useTheme } from '../theme/use-theme';
|
|
8
|
+
|
|
9
|
+
const SWATCH: Record<LrThemeChoice, { bg: string; fg: string }> = {
|
|
10
|
+
system: { bg: 'linear-gradient(90deg,#fafbf5 50%,#111412 50%)', fg: '#13240f' },
|
|
11
|
+
light: { bg: '#fafbf5', fg: '#13240f' },
|
|
12
|
+
dark: { bg: '#111412', fg: '#eef3ea' },
|
|
13
|
+
lime: { bg: 'linear-gradient(160deg,#eef56a,#9bc929)', fg: '#12300f' },
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export function SettingsPage() {
|
|
17
|
+
const t = useLocale();
|
|
18
|
+
const lr = useLrText();
|
|
19
|
+
const { theme, setTheme } = useTheme();
|
|
20
|
+
const reduceMotion = useReduceMotionSetting();
|
|
21
|
+
const [mounted, setMounted] = useState(false);
|
|
22
|
+
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
setMounted(true);
|
|
25
|
+
}, []);
|
|
26
|
+
|
|
27
|
+
const names: Record<LrThemeChoice, string> = {
|
|
28
|
+
system: t.themeToggle.system,
|
|
29
|
+
light: t.themeToggle.light,
|
|
30
|
+
dark: t.themeToggle.dark,
|
|
31
|
+
lime: lr.theme.lime,
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<div data-lr-settings className="max-w-[760px]">
|
|
36
|
+
<header className="mb-6">
|
|
37
|
+
<h1 className="font-heading text-[28px] font-bold leading-[34px] tracking-[-0.01em]">
|
|
38
|
+
{lr.settings.title}
|
|
39
|
+
</h1>
|
|
40
|
+
<p className="lr-on-lime mt-0.5 text-[14px] text-muted-foreground">
|
|
41
|
+
{lr.settings.subtitle}
|
|
42
|
+
</p>
|
|
43
|
+
</header>
|
|
44
|
+
|
|
45
|
+
<section className="rounded-[16px] border border-border bg-card px-6 py-5 shadow-[var(--lr-shadow-1)]">
|
|
46
|
+
<h2 className="text-[16px] font-semibold">{lr.settings.appearance}</h2>
|
|
47
|
+
<p className="mt-1 mb-4 text-[14px] text-muted-foreground">{lr.settings.appearanceHint}</p>
|
|
48
|
+
<div
|
|
49
|
+
role="radiogroup"
|
|
50
|
+
aria-label={t.themeToggle.title}
|
|
51
|
+
className="grid grid-cols-2 gap-3 sm:grid-cols-4"
|
|
52
|
+
>
|
|
53
|
+
{LR_THEME_CHOICES.map((choice) => {
|
|
54
|
+
const picked = mounted && theme === choice;
|
|
55
|
+
return (
|
|
56
|
+
// biome-ignore lint/a11y/useSemanticElements: a card-shaped radio, as in the design package
|
|
57
|
+
<button
|
|
58
|
+
key={choice}
|
|
59
|
+
type="button"
|
|
60
|
+
role="radio"
|
|
61
|
+
aria-checked={picked}
|
|
62
|
+
data-lr-theme-card={choice}
|
|
63
|
+
onClick={() => setTheme(choice)}
|
|
64
|
+
className={cn(
|
|
65
|
+
'rounded-[12px] border-[1.5px] bg-card px-1.5 pt-1.5 pb-2.5 text-[14px] font-medium outline-none',
|
|
66
|
+
'transition-[border-color,box-shadow] duration-150 focus-visible:ring-2 focus-visible:ring-ring/40',
|
|
67
|
+
picked
|
|
68
|
+
? 'border-[var(--lr-focus)] shadow-[0_0_0_3px_var(--lr-accent-soft)]'
|
|
69
|
+
: 'border-border hover:border-[var(--lr-text-3)]',
|
|
70
|
+
)}
|
|
71
|
+
>
|
|
72
|
+
<span
|
|
73
|
+
aria-hidden
|
|
74
|
+
className="relative mb-2 block h-16 overflow-hidden rounded-[8px] ring-1 ring-black/5"
|
|
75
|
+
style={{ background: SWATCH[choice].bg, color: SWATCH[choice].fg }}
|
|
76
|
+
>
|
|
77
|
+
<span className="absolute top-[18%] left-[10%] h-[12%] w-[45%] rounded-[4px] bg-current opacity-85" />
|
|
78
|
+
<span className="absolute bottom-[16%] left-[10%] h-[22%] w-[32%] rounded-[6px] bg-[#fcd810]" />
|
|
79
|
+
</span>
|
|
80
|
+
{names[choice]}
|
|
81
|
+
</button>
|
|
82
|
+
);
|
|
83
|
+
})}
|
|
84
|
+
</div>
|
|
85
|
+
|
|
86
|
+
<div className="mt-3 flex items-center gap-4 border-t border-border pt-3">
|
|
87
|
+
<div className="min-w-0 flex-1">
|
|
88
|
+
<p className="text-[14px] font-semibold">{lr.settings.reduceMotion}</p>
|
|
89
|
+
<p className="text-[12px] text-muted-foreground">{lr.settings.reduceMotionHint}</p>
|
|
90
|
+
</div>
|
|
91
|
+
<button
|
|
92
|
+
type="button"
|
|
93
|
+
role="switch"
|
|
94
|
+
aria-checked={reduceMotion}
|
|
95
|
+
aria-label={lr.settings.reduceMotion}
|
|
96
|
+
onClick={() => setReduceMotionSetting(!reduceMotion)}
|
|
97
|
+
className="lr-switch outline-none focus-visible:ring-2 focus-visible:ring-ring/40"
|
|
98
|
+
/>
|
|
99
|
+
</div>
|
|
100
|
+
</section>
|
|
101
|
+
</div>
|
|
102
|
+
);
|
|
103
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Workflow } from 'lucide-react';
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
import { createPortal } from 'react-dom';
|
|
4
|
+
import { useNavigate } from 'react-router-dom';
|
|
5
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
|
|
6
|
+
import { hasModifier, isShortcutControlTarget, isTypingTarget } from '@/lib/keys';
|
|
7
|
+
import { cn } from '@/lib/utils';
|
|
8
|
+
import { useSlot } from './chrome/use-slot';
|
|
9
|
+
import { isFeatureEnabled } from './features';
|
|
10
|
+
import { useNewDeckBrief } from './home/brief';
|
|
11
|
+
import { useLrText } from './text';
|
|
12
|
+
|
|
13
|
+
type Props = {
|
|
14
|
+
slideId: string;
|
|
15
|
+
overviewOpen: boolean;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export function SlideExtensions({ slideId, overviewOpen }: Props) {
|
|
19
|
+
const enabled = isFeatureEnabled('board');
|
|
20
|
+
const navigate = useNavigate();
|
|
21
|
+
const slot = useSlot('data-lr-rail-actions', enabled);
|
|
22
|
+
useNewDeckBrief(slideId);
|
|
23
|
+
const lr = useLrText();
|
|
24
|
+
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
if (!enabled) return;
|
|
27
|
+
const onKey = (e: KeyboardEvent) => {
|
|
28
|
+
if (
|
|
29
|
+
isTypingTarget(e.target) ||
|
|
30
|
+
isShortcutControlTarget(e.target) ||
|
|
31
|
+
e.isComposing ||
|
|
32
|
+
e.keyCode === 229 ||
|
|
33
|
+
e.defaultPrevented
|
|
34
|
+
)
|
|
35
|
+
return;
|
|
36
|
+
if (hasModifier(e)) return;
|
|
37
|
+
if (overviewOpen) return;
|
|
38
|
+
if (e.key === 'b' || e.key === 'B') {
|
|
39
|
+
e.preventDefault();
|
|
40
|
+
navigate(`/s/${encodeURIComponent(slideId)}/board`);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
window.addEventListener('keydown', onKey);
|
|
44
|
+
return () => window.removeEventListener('keydown', onKey);
|
|
45
|
+
}, [enabled, navigate, overviewOpen, slideId]);
|
|
46
|
+
|
|
47
|
+
if (!enabled || !slot) return null;
|
|
48
|
+
|
|
49
|
+
return createPortal(
|
|
50
|
+
<Tooltip>
|
|
51
|
+
<TooltipTrigger
|
|
52
|
+
render={
|
|
53
|
+
<button
|
|
54
|
+
type="button"
|
|
55
|
+
onClick={() => navigate(`/s/${encodeURIComponent(slideId)}/board`)}
|
|
56
|
+
aria-label={lr.board.openBoard}
|
|
57
|
+
className={cn(
|
|
58
|
+
'flex size-5 items-center justify-center rounded-[3px] text-muted-foreground/70 outline-none',
|
|
59
|
+
'motion-safe:transition-colors hover:bg-muted hover:text-foreground',
|
|
60
|
+
'focus-visible:ring-1 focus-visible:ring-brand',
|
|
61
|
+
)}
|
|
62
|
+
>
|
|
63
|
+
<Workflow className="size-3.5" strokeWidth={1.75} />
|
|
64
|
+
</button>
|
|
65
|
+
}
|
|
66
|
+
/>
|
|
67
|
+
<TooltipContent side="bottom" sideOffset={6}>
|
|
68
|
+
{lr.board.openBoard}
|
|
69
|
+
</TooltipContent>
|
|
70
|
+
</Tooltip>,
|
|
71
|
+
slot,
|
|
72
|
+
);
|
|
73
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Locale } from '../../../locale/types';
|
|
2
|
+
import { en } from './en';
|
|
3
|
+
import { es } from './es';
|
|
4
|
+
import { ja } from './ja';
|
|
5
|
+
import type { LrText } from './types';
|
|
6
|
+
import { zhCN } from './zh-cn';
|
|
7
|
+
import { zhTW } from './zh-tw';
|
|
8
|
+
|
|
9
|
+
const TEXT: Record<Locale['id'], LrText> = {
|
|
10
|
+
en,
|
|
11
|
+
es,
|
|
12
|
+
ja,
|
|
13
|
+
'zh-CN': zhCN,
|
|
14
|
+
'zh-TW': zhTW,
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export function lrTextFor(id: Locale['id']): LrText {
|
|
18
|
+
return TEXT[id] ?? en;
|
|
19
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import type { LrText } from './types';
|
|
2
|
+
|
|
3
|
+
export const en: LrText = {
|
|
4
|
+
board: {
|
|
5
|
+
title: 'Story board',
|
|
6
|
+
openBoard: 'Story board (B)',
|
|
7
|
+
backToDeck: 'Back to deck',
|
|
8
|
+
hint: 'Drag a card to reorder · Double-click to edit the page · Drag the dot to link two cards',
|
|
9
|
+
loading: 'Loading deck…',
|
|
10
|
+
columnFallback: 'Part {n}',
|
|
11
|
+
moveToEnd: 'Move to end',
|
|
12
|
+
reorderFailed: 'Could not reorder pages',
|
|
13
|
+
zoomIn: 'Zoom in',
|
|
14
|
+
zoomOut: 'Zoom out',
|
|
15
|
+
fitView: 'Fit to view',
|
|
16
|
+
saveFailed: 'Could not save the board layout',
|
|
17
|
+
renameColumn: 'Rename this column',
|
|
18
|
+
columnTitlePlaceholder: 'Column name',
|
|
19
|
+
addPage: 'Add a page to this column (copies the last one)',
|
|
20
|
+
notesPlaceholder: 'Speaker notes…',
|
|
21
|
+
/** template: "Added a blank page at {n}" */
|
|
22
|
+
toastInserted: 'Added a blank page at {n}',
|
|
23
|
+
insertFailed: 'Could not add a page',
|
|
24
|
+
cardTitlePlaceholder: 'Name this card',
|
|
25
|
+
renameCard: 'Rename this card',
|
|
26
|
+
status: 'Status',
|
|
27
|
+
statusNone: 'No status',
|
|
28
|
+
statusTodo: 'To do',
|
|
29
|
+
statusDoing: 'In progress',
|
|
30
|
+
statusReview: 'In review',
|
|
31
|
+
statusDone: 'Done',
|
|
32
|
+
memoPlaceholder: 'Work memo — stays on the board…',
|
|
33
|
+
linkHandle: 'Drag onto another card to link them',
|
|
34
|
+
showLinks: 'Show links',
|
|
35
|
+
hideLinks: 'Hide links',
|
|
36
|
+
removeLink: 'Remove this link',
|
|
37
|
+
},
|
|
38
|
+
theme: {
|
|
39
|
+
lime: 'Lime',
|
|
40
|
+
},
|
|
41
|
+
shell: {
|
|
42
|
+
newDeck: 'New deck',
|
|
43
|
+
newDeckCard: 'Blank deck',
|
|
44
|
+
settings: 'Settings',
|
|
45
|
+
trash: 'Trash',
|
|
46
|
+
offline:
|
|
47
|
+
'The local server stopped. Run the start command again and this page reconnects on its own.',
|
|
48
|
+
},
|
|
49
|
+
home: {
|
|
50
|
+
greetingMorning: 'Good morning',
|
|
51
|
+
greetingAfternoon: 'Good afternoon',
|
|
52
|
+
greetingEvening: 'Good evening',
|
|
53
|
+
subtitle: 'What do you want to talk about? One sentence is enough to start.',
|
|
54
|
+
briefLabel: 'Describe a new deck',
|
|
55
|
+
briefPlaceholder: 'e.g. Walk new hires through the expense process, 8 pages',
|
|
56
|
+
briefStart: 'Start',
|
|
57
|
+
briefNeedsAgent:
|
|
58
|
+
'No agent is connected yet. Start anyway: the editor will help you connect one, then it writes from this sentence.',
|
|
59
|
+
pages: { one: '{n} page', other: '{n} pages' },
|
|
60
|
+
editing: 'Being edited',
|
|
61
|
+
moveToTrash: 'Move to trash',
|
|
62
|
+
toastTrashed: 'Moved “{name}” to the trash',
|
|
63
|
+
toastTrashFailed: 'Could not move the slide to the trash',
|
|
64
|
+
toastRestored: 'Restored “{name}”',
|
|
65
|
+
toastRestoreFailed: 'Could not restore the slide',
|
|
66
|
+
undo: 'Undo',
|
|
67
|
+
renameHint: 'The new name shows on the card and in exported file titles.',
|
|
68
|
+
nameRequired: 'The name can’t be empty.',
|
|
69
|
+
noMatchesHint: 'Try another word, or clear the search to see every slide.',
|
|
70
|
+
},
|
|
71
|
+
trash: {
|
|
72
|
+
title: 'Trash',
|
|
73
|
+
subtitle: 'Deleted slides stay here for 30 days, and you can restore them any time.',
|
|
74
|
+
emptyTitle: 'The trash is empty',
|
|
75
|
+
emptyHint: 'Deleted slides stay here for 30 days, and you can restore them any time.',
|
|
76
|
+
deletedWhen: 'Deleted {when}',
|
|
77
|
+
daysLeft: { one: '{n} day left', other: '{n} days left' },
|
|
78
|
+
restore: 'Restore',
|
|
79
|
+
deleteForever: 'Delete for good',
|
|
80
|
+
confirmTitle: 'Delete for good?',
|
|
81
|
+
confirmHint: 'Type {name} to delete it for good. This can’t be undone.',
|
|
82
|
+
confirmLabel: 'Slide name',
|
|
83
|
+
toastPurged: 'Deleted “{name}” for good',
|
|
84
|
+
toastPurgeFailed: 'Could not delete the slide',
|
|
85
|
+
loadFailed: 'Could not read the trash',
|
|
86
|
+
},
|
|
87
|
+
settings: {
|
|
88
|
+
title: 'Settings',
|
|
89
|
+
subtitle: 'Changes save on their own.',
|
|
90
|
+
appearance: 'Appearance',
|
|
91
|
+
appearanceHint:
|
|
92
|
+
'Dark suits late evenings and checking before you project. Lime colours the home, themes, assets, settings and trash pages; the editor and presenting stay light.',
|
|
93
|
+
reduceMotion: 'Reduce motion',
|
|
94
|
+
reduceMotionHint:
|
|
95
|
+
'Lemon stops floating and bouncing and the interface skips its animations. Also on when your system asks for less motion.',
|
|
96
|
+
},
|
|
97
|
+
feedback: {
|
|
98
|
+
notFoundHint: 'The link may be out of date, or the slide was deleted.',
|
|
99
|
+
backHome: 'Back to slides',
|
|
100
|
+
exportFailedHint:
|
|
101
|
+
'Nothing was saved. Try again; if it keeps failing, the browser console names the page that broke.',
|
|
102
|
+
uploadTooLarge: 'The file is over {limit} MB',
|
|
103
|
+
uploadTooLargeHint: 'Compress the image or pick a smaller file, then upload again.',
|
|
104
|
+
confirmWho: 'Lemon needs your call',
|
|
105
|
+
},
|
|
106
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import type { LrText } from './types';
|
|
2
|
+
|
|
3
|
+
export const es: LrText = {
|
|
4
|
+
board: {
|
|
5
|
+
title: 'Tablero de la historia',
|
|
6
|
+
openBoard: 'Tablero de la historia (B)',
|
|
7
|
+
backToDeck: 'Volver a la presentación',
|
|
8
|
+
hint: 'Arrastra una tarjeta para reordenar · Haz doble clic para editar la página · Arrastra el punto para enlazar dos tarjetas',
|
|
9
|
+
loading: 'Cargando presentación…',
|
|
10
|
+
columnFallback: 'Parte {n}',
|
|
11
|
+
moveToEnd: 'Mover al final',
|
|
12
|
+
reorderFailed: 'No se pudieron reordenar las páginas',
|
|
13
|
+
zoomIn: 'Acercar',
|
|
14
|
+
zoomOut: 'Alejar',
|
|
15
|
+
fitView: 'Ajustar a la vista',
|
|
16
|
+
saveFailed: 'No se pudo guardar la disposición del tablero',
|
|
17
|
+
renameColumn: 'Renombrar esta columna',
|
|
18
|
+
columnTitlePlaceholder: 'Nombre de la columna',
|
|
19
|
+
addPage: 'Añadir una página a esta columna (copia la última)',
|
|
20
|
+
notesPlaceholder: 'Notas del orador…',
|
|
21
|
+
toastInserted: 'Página en blanco añadida en {n}',
|
|
22
|
+
insertFailed: 'No se pudo añadir la página',
|
|
23
|
+
cardTitlePlaceholder: 'Nombra esta tarjeta',
|
|
24
|
+
renameCard: 'Renombrar esta tarjeta',
|
|
25
|
+
status: 'Estado',
|
|
26
|
+
statusNone: 'Sin estado',
|
|
27
|
+
statusTodo: 'Por hacer',
|
|
28
|
+
statusDoing: 'En curso',
|
|
29
|
+
statusReview: 'En revisión',
|
|
30
|
+
statusDone: 'Hecho',
|
|
31
|
+
memoPlaceholder: 'Nota de trabajo — se queda en el tablero…',
|
|
32
|
+
linkHandle: 'Arrastra sobre otra tarjeta para enlazarlas',
|
|
33
|
+
showLinks: 'Mostrar enlaces',
|
|
34
|
+
hideLinks: 'Ocultar enlaces',
|
|
35
|
+
removeLink: 'Quitar este enlace',
|
|
36
|
+
},
|
|
37
|
+
theme: {
|
|
38
|
+
lime: 'Lima',
|
|
39
|
+
},
|
|
40
|
+
shell: {
|
|
41
|
+
newDeck: 'Nueva presentación',
|
|
42
|
+
newDeckCard: 'Presentación en blanco',
|
|
43
|
+
settings: 'Ajustes',
|
|
44
|
+
trash: 'Papelera',
|
|
45
|
+
offline:
|
|
46
|
+
'El servidor local se detuvo. Vuelve a ejecutar el comando de inicio y esta página se reconectará sola.',
|
|
47
|
+
},
|
|
48
|
+
home: {
|
|
49
|
+
greetingMorning: 'Buenos días',
|
|
50
|
+
greetingAfternoon: 'Buenas tardes',
|
|
51
|
+
greetingEvening: 'Buenas noches',
|
|
52
|
+
subtitle: '¿De qué quieres hablar? Basta una frase para empezar.',
|
|
53
|
+
briefLabel: 'Describe una nueva presentación',
|
|
54
|
+
briefPlaceholder: 'p. ej. Explica a los nuevos el proceso de gastos, 8 páginas',
|
|
55
|
+
briefStart: 'Empezar',
|
|
56
|
+
briefNeedsAgent:
|
|
57
|
+
'Aún no hay un agente conectado. Empieza igualmente: el editor te ayudará a conectar uno y después escribirá a partir de esta frase.',
|
|
58
|
+
pages: { one: '{n} página', other: '{n} páginas' },
|
|
59
|
+
editing: 'En edición',
|
|
60
|
+
moveToTrash: 'Mover a la papelera',
|
|
61
|
+
toastTrashed: '“{name}” se movió a la papelera',
|
|
62
|
+
toastTrashFailed: 'No se pudo mover a la papelera',
|
|
63
|
+
toastRestored: '“{name}” restaurada',
|
|
64
|
+
toastRestoreFailed: 'No se pudo restaurar',
|
|
65
|
+
undo: 'Deshacer',
|
|
66
|
+
renameHint: 'El nuevo nombre aparece en la tarjeta y en los archivos exportados.',
|
|
67
|
+
nameRequired: 'El nombre no puede estar vacío.',
|
|
68
|
+
noMatchesHint: 'Prueba otra palabra o borra la búsqueda para ver todas.',
|
|
69
|
+
},
|
|
70
|
+
trash: {
|
|
71
|
+
title: 'Papelera',
|
|
72
|
+
subtitle:
|
|
73
|
+
'Las presentaciones eliminadas se guardan 30 días y puedes restaurarlas cuando quieras.',
|
|
74
|
+
emptyTitle: 'La papelera está vacía',
|
|
75
|
+
emptyHint:
|
|
76
|
+
'Las presentaciones eliminadas se guardan 30 días y puedes restaurarlas cuando quieras.',
|
|
77
|
+
deletedWhen: 'Eliminada {when}',
|
|
78
|
+
daysLeft: { one: 'Queda {n} día', other: 'Quedan {n} días' },
|
|
79
|
+
restore: 'Restaurar',
|
|
80
|
+
deleteForever: 'Eliminar definitivamente',
|
|
81
|
+
confirmTitle: '¿Eliminar definitivamente?',
|
|
82
|
+
confirmHint: 'Escribe {name} para eliminarla definitivamente. No se puede deshacer.',
|
|
83
|
+
confirmLabel: 'Nombre de la presentación',
|
|
84
|
+
toastPurged: '“{name}” eliminada definitivamente',
|
|
85
|
+
toastPurgeFailed: 'No se pudo eliminar',
|
|
86
|
+
loadFailed: 'No se pudo leer la papelera',
|
|
87
|
+
},
|
|
88
|
+
settings: {
|
|
89
|
+
title: 'Ajustes',
|
|
90
|
+
subtitle: 'Los cambios se guardan solos.',
|
|
91
|
+
appearance: 'Apariencia',
|
|
92
|
+
appearanceHint:
|
|
93
|
+
'El tema oscuro va bien de noche y para revisar antes de proyectar. Lima colorea inicio, temas, recursos, ajustes y papelera; el editor y la presentación siguen en claro.',
|
|
94
|
+
reduceMotion: 'Reducir movimiento',
|
|
95
|
+
reduceMotionHint:
|
|
96
|
+
'Lemon deja de flotar y rebotar y la interfaz omite sus animaciones. También se activa si tu sistema pide menos movimiento.',
|
|
97
|
+
},
|
|
98
|
+
feedback: {
|
|
99
|
+
notFoundHint:
|
|
100
|
+
'Puede que el enlace esté desactualizado o que la presentación se haya eliminado.',
|
|
101
|
+
backHome: 'Volver a las presentaciones',
|
|
102
|
+
exportFailedHint:
|
|
103
|
+
'No se guardó nada. Inténtalo de nuevo; si sigue fallando, la consola del navegador indica qué página falló.',
|
|
104
|
+
uploadTooLarge: 'El archivo supera {limit} MB',
|
|
105
|
+
uploadTooLargeHint: 'Comprime la imagen o elige un archivo más pequeño y súbelo de nuevo.',
|
|
106
|
+
confirmWho: 'Lemon necesita tu decisión',
|
|
107
|
+
},
|
|
108
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import type { LrText } from './types';
|
|
2
|
+
|
|
3
|
+
export const ja: LrText = {
|
|
4
|
+
board: {
|
|
5
|
+
title: 'ストーリーボード',
|
|
6
|
+
openBoard: 'ストーリーボード (B)',
|
|
7
|
+
backToDeck: 'スライドに戻る',
|
|
8
|
+
hint: 'カードをドラッグして並べ替え · ダブルクリックで編集 · 丸をドラッグして関連付け',
|
|
9
|
+
loading: '読み込み中…',
|
|
10
|
+
columnFallback: 'パート {n}',
|
|
11
|
+
moveToEnd: '最後に移動',
|
|
12
|
+
reorderFailed: '並べ替えに失敗しました',
|
|
13
|
+
zoomIn: '拡大',
|
|
14
|
+
zoomOut: '縮小',
|
|
15
|
+
fitView: '全体を表示',
|
|
16
|
+
saveFailed: 'ボードの保存に失敗しました',
|
|
17
|
+
renameColumn: 'この列の名前を変更',
|
|
18
|
+
columnTitlePlaceholder: '列の名前',
|
|
19
|
+
addPage: 'この列にページを追加(最後のページを複製)',
|
|
20
|
+
notesPlaceholder: '発表者ノート…',
|
|
21
|
+
toastInserted: 'ページ {n} に白紙ページを追加しました',
|
|
22
|
+
insertFailed: 'ページを追加できませんでした',
|
|
23
|
+
cardTitlePlaceholder: 'カードに名前を付ける',
|
|
24
|
+
renameCard: 'カード名を変更',
|
|
25
|
+
status: 'ステータス',
|
|
26
|
+
statusNone: 'なし',
|
|
27
|
+
statusTodo: '未着手',
|
|
28
|
+
statusDoing: '進行中',
|
|
29
|
+
statusReview: '確認待ち',
|
|
30
|
+
statusDone: '完了',
|
|
31
|
+
memoPlaceholder: '作業メモ…(ボードだけに残ります)',
|
|
32
|
+
linkHandle: '別のカードにドラッグして関連付け',
|
|
33
|
+
showLinks: '関連線を表示',
|
|
34
|
+
hideLinks: '関連線を隠す',
|
|
35
|
+
removeLink: 'この関連を削除',
|
|
36
|
+
},
|
|
37
|
+
theme: {
|
|
38
|
+
lime: 'ライム',
|
|
39
|
+
},
|
|
40
|
+
shell: {
|
|
41
|
+
newDeck: '新しいデッキ',
|
|
42
|
+
newDeckCard: '白紙のデッキ',
|
|
43
|
+
settings: '設定',
|
|
44
|
+
trash: 'ゴミ箱',
|
|
45
|
+
offline:
|
|
46
|
+
'ローカルサーバーが止まりました。起動コマンドをもう一度実行すると、このページは自動で再接続します。',
|
|
47
|
+
},
|
|
48
|
+
home: {
|
|
49
|
+
greetingMorning: 'おはようございます',
|
|
50
|
+
greetingAfternoon: 'こんにちは',
|
|
51
|
+
greetingEvening: 'こんばんは',
|
|
52
|
+
subtitle: '何について話しますか? ひと言で始められます。',
|
|
53
|
+
briefLabel: '新しいデッキの内容',
|
|
54
|
+
briefPlaceholder: '例:新入社員に経費精算の流れを説明、8 ページ',
|
|
55
|
+
briefStart: '始める',
|
|
56
|
+
briefNeedsAgent:
|
|
57
|
+
'エージェントがまだ接続されていません。このまま始めると、エディターで接続してからこの一文をもとに書き始めます。',
|
|
58
|
+
pages: { one: '{n} ページ', other: '{n} ページ' },
|
|
59
|
+
editing: '編集中',
|
|
60
|
+
moveToTrash: 'ゴミ箱に移動',
|
|
61
|
+
toastTrashed: '「{name}」をゴミ箱に移動しました',
|
|
62
|
+
toastTrashFailed: 'ゴミ箱に移動できませんでした',
|
|
63
|
+
toastRestored: '「{name}」を元に戻しました',
|
|
64
|
+
toastRestoreFailed: '元に戻せませんでした',
|
|
65
|
+
undo: '元に戻す',
|
|
66
|
+
renameHint: '新しい名前はカードと書き出したファイルに表示されます。',
|
|
67
|
+
nameRequired: '名前を入力してください。',
|
|
68
|
+
noMatchesHint: '別の言葉で試すか、検索をクリアしてすべて表示してください。',
|
|
69
|
+
},
|
|
70
|
+
trash: {
|
|
71
|
+
title: 'ゴミ箱',
|
|
72
|
+
subtitle: '削除したデッキは 30 日間ここに残り、いつでも元に戻せます。',
|
|
73
|
+
emptyTitle: 'ゴミ箱は空です',
|
|
74
|
+
emptyHint: '削除したデッキは 30 日間ここに残り、いつでも元に戻せます。',
|
|
75
|
+
deletedWhen: '{when}に削除',
|
|
76
|
+
daysLeft: { one: '残り {n} 日', other: '残り {n} 日' },
|
|
77
|
+
restore: '元に戻す',
|
|
78
|
+
deleteForever: '完全に削除',
|
|
79
|
+
confirmTitle: '完全に削除しますか?',
|
|
80
|
+
confirmHint: '完全に削除するには {name} と入力してください。元に戻せません。',
|
|
81
|
+
confirmLabel: 'デッキ名',
|
|
82
|
+
toastPurged: '「{name}」を完全に削除しました',
|
|
83
|
+
toastPurgeFailed: '削除できませんでした',
|
|
84
|
+
loadFailed: 'ゴミ箱を読み込めませんでした',
|
|
85
|
+
},
|
|
86
|
+
settings: {
|
|
87
|
+
title: '設定',
|
|
88
|
+
subtitle: '変更は自動で保存されます。',
|
|
89
|
+
appearance: '外観',
|
|
90
|
+
appearanceHint:
|
|
91
|
+
'ダークは夜や投影前の確認に向いています。ライムはホーム・テーマ・アセット・設定・ゴミ箱に使われ、エディターと発表はライトのままです。',
|
|
92
|
+
reduceMotion: '視差効果を減らす',
|
|
93
|
+
reduceMotionHint:
|
|
94
|
+
'Lemon が浮いたり跳ねたりせず、画面のアニメーションも止まります。システムで視差効果を減らしている場合もオンになります。',
|
|
95
|
+
},
|
|
96
|
+
feedback: {
|
|
97
|
+
notFoundHint: 'リンクが古いか、デッキが削除された可能性があります。',
|
|
98
|
+
backHome: 'デッキ一覧に戻る',
|
|
99
|
+
exportFailedHint:
|
|
100
|
+
'ファイルは作成されていません。もう一度試してください。続く場合は、ブラウザのコンソールで失敗したページを確認できます。',
|
|
101
|
+
uploadTooLarge: 'ファイルが {limit} MB を超えています',
|
|
102
|
+
uploadTooLargeHint:
|
|
103
|
+
'画像を圧縮するか小さいファイルを選んで、もう一度アップロードしてください。',
|
|
104
|
+
confirmWho: 'Lemon が確認したいこと',
|
|
105
|
+
},
|
|
106
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { en } from './en';
|
|
3
|
+
import { es } from './es';
|
|
4
|
+
import { ja } from './ja';
|
|
5
|
+
import { zhCN } from './zh-cn';
|
|
6
|
+
import { zhTW } from './zh-tw';
|
|
7
|
+
|
|
8
|
+
const LANGS = { en, es, ja, zhCN, zhTW };
|
|
9
|
+
|
|
10
|
+
function leaves(value: unknown, prefix = ''): [string, unknown][] {
|
|
11
|
+
if (!value || typeof value !== 'object') return [[prefix, value]];
|
|
12
|
+
return Object.entries(value).flatMap(([key, child]) =>
|
|
13
|
+
leaves(child, prefix ? `${prefix}.${key}` : key),
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
describe('LemonRiver text', () => {
|
|
18
|
+
it('has the same keys in every language as English', () => {
|
|
19
|
+
const english = leaves(en)
|
|
20
|
+
.map(([key]) => key)
|
|
21
|
+
.sort();
|
|
22
|
+
for (const [name, text] of Object.entries(LANGS)) {
|
|
23
|
+
expect(
|
|
24
|
+
leaves(text)
|
|
25
|
+
.map(([key]) => key)
|
|
26
|
+
.sort(),
|
|
27
|
+
name,
|
|
28
|
+
).toEqual(english);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
it('has no empty strings', () => {
|
|
33
|
+
for (const [name, text] of Object.entries(LANGS)) {
|
|
34
|
+
for (const [key, value] of leaves(text)) {
|
|
35
|
+
expect(typeof value, `${name}.${key}`).toBe('string');
|
|
36
|
+
expect(value, `${name}.${key}`).not.toBe('');
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
it('keeps every placeholder a template declares', () => {
|
|
42
|
+
const english = new Map(leaves(en));
|
|
43
|
+
for (const [name, text] of Object.entries(LANGS)) {
|
|
44
|
+
for (const [key, value] of leaves(text)) {
|
|
45
|
+
const want =
|
|
46
|
+
String(english.get(key))
|
|
47
|
+
.match(/\{\w+\}/g)
|
|
48
|
+
?.sort() ?? [];
|
|
49
|
+
const got =
|
|
50
|
+
String(value)
|
|
51
|
+
.match(/\{\w+\}/g)
|
|
52
|
+
?.sort() ?? [];
|
|
53
|
+
expect(got, `${name}.${key}`).toEqual(want);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
});
|