@lemonriver/core 1.2.0 → 1.4.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-CSkdswfd.js → build-Cv0nNc4G.js} +1 -1
- package/dist/cli/bin.js +5 -5
- package/dist/{config-C5-myPY6.js → config-Di9kipre.js} +2773 -714
- package/dist/{config-CYNOR93W.d.ts → config-f1SqAhtR.d.ts} +1 -1
- package/dist/{dev-DHtYH8sw.js → dev-Az1UzCQp.js} +11 -11
- package/dist/index.d.ts +2 -2
- package/dist/index.js +21 -2
- package/dist/locale/index.d.ts +1 -1
- package/dist/locale/index.js +1 -1
- package/dist/{mcp-B2UeO1un.js → mcp-CW7H6oUg.js} +1 -1
- package/dist/{preview-C1B6-umF.js → preview-DtSq5uN1.js} +1 -1
- package/dist/{types-tdaXSyah.d.ts → types-C4VfD89E.d.ts} +12 -0
- package/dist/{update-DzL8fpcI.js → update-DVe2kQA7.js} +86 -13
- package/dist/vite/index.d.ts +1 -1
- package/dist/vite/index.js +1 -1
- package/dist/{zh-tw-BhYyMx0-.js → zh-tw-BX3oQAc2.js} +110 -0
- package/package.json +5 -6
- package/release-notes.json +34 -0
- package/src/agent/types.ts +9 -2
- package/src/app/app.tsx +2 -0
- package/src/app/components/agent/agent-panel.tsx +12 -3
- package/src/app/components/agent/agent-presence.tsx +1 -1
- package/src/app/components/command/home-command-menu.tsx +4 -1
- package/src/app/components/command/slide-command-menu.tsx +4 -1
- package/src/app/components/export-progress-toast.tsx +3 -1
- package/src/app/components/inspector/asset-picker-dialog.tsx +1 -1
- package/src/app/components/inspector/comment-layer.tsx +3 -3
- package/src/app/components/inspector/inline-text-editor.tsx +1 -12
- package/src/app/components/inspector/inspect-overlay.tsx +9 -1
- package/src/app/components/inspector/inspector-panel.tsx +7 -23
- package/src/app/components/inspector/inspector-provider.tsx +177 -36
- package/src/app/components/inspector/page-panel.tsx +270 -0
- package/src/app/components/language-toggle.tsx +13 -11
- package/src/app/components/overview-grid.tsx +3 -3
- package/src/app/components/panel/editor-sidebar.tsx +43 -8
- package/src/app/components/panel/panel-shell.tsx +9 -5
- package/src/app/components/panel/save-card.tsx +1 -1
- package/src/app/components/player.tsx +6 -1
- package/src/app/components/sidebar/folder-item.tsx +4 -1
- package/src/app/components/sidebar/sidebar.tsx +11 -8
- package/src/app/components/slide-canvas.tsx +1 -1
- package/src/app/components/style-panel/design-provider.tsx +48 -11
- package/src/app/components/style-panel/use-design.ts +6 -1
- package/src/app/components/theme-toggle.tsx +16 -22
- package/src/app/components/thumbnail-rail.tsx +69 -50
- package/src/app/components/ui/context-menu.tsx +9 -10
- package/src/app/components/ui/dialog.tsx +2 -4
- package/src/app/components/ui/dropdown-menu.tsx +9 -10
- package/src/app/components/ui/popover.tsx +1 -1
- package/src/app/components/ui/select.tsx +2 -2
- package/src/app/components/ui/sonner.tsx +2 -2
- package/src/app/index.html +7 -0
- package/src/app/lemonriver/agent-cli/model.ts +22 -0
- package/src/app/lemonriver/agent-install/model.ts +46 -0
- package/src/app/lemonriver/agent-install/section.tsx +178 -0
- package/src/app/lemonriver/agent-install/use-install.ts +51 -0
- package/src/app/lemonriver/agent-providers/section.tsx +385 -44
- package/src/app/lemonriver/agent-providers/use-providers.ts +50 -3
- package/src/app/lemonriver/backup/places.ts +22 -12
- package/src/app/lemonriver/chrome/sidebar-extras.tsx +1 -1
- package/src/app/lemonriver/feedback/dialog.tsx +1 -2
- package/src/app/lemonriver/feedback/model.ts +0 -5
- package/src/app/lemonriver/guide/clipboard.ts +19 -0
- package/src/app/lemonriver/guide/create-board.tsx +150 -0
- package/src/app/lemonriver/guide/install-board.tsx +208 -0
- package/src/app/lemonriver/guide/more-agents-page.tsx +89 -0
- package/src/app/lemonriver/guide/more-agents.ts +137 -0
- package/src/app/lemonriver/guide/quick-board.tsx +57 -0
- package/src/app/lemonriver/guide/start-board.tsx +38 -0
- package/src/app/lemonriver/guide/start-card.tsx +105 -0
- package/src/app/lemonriver/guide/start.ts +174 -0
- package/src/app/lemonriver/guide/state.ts +5 -21
- package/src/app/lemonriver/help/help-page.tsx +24 -6
- package/src/app/lemonriver/help/model.ts +1 -0
- package/src/app/lemonriver/home/home-page.tsx +12 -6
- package/src/app/lemonriver/home/sorting.ts +45 -0
- package/src/app/lemonriver/home/use-deck-times.ts +1 -2
- package/src/app/lemonriver/i18n/system-locale.ts +39 -0
- package/src/app/lemonriver/present/dual-screen.ts +154 -0
- package/src/app/lemonriver/present/presenter-blocked-hint.tsx +28 -0
- package/src/app/lemonriver/present/wake-lock.ts +74 -0
- package/src/app/lemonriver/routes.tsx +2 -0
- package/src/app/lemonriver/settings/backup-section.tsx +3 -2
- package/src/app/lemonriver/settings/settings-page.tsx +5 -6
- package/src/app/lemonriver/settings/workspace-card.tsx +2 -1
- package/src/app/lemonriver/share/share-dialog.tsx +2 -1
- package/src/app/lemonriver/text/en.ts +594 -452
- package/src/app/lemonriver/text/es.ts +404 -270
- package/src/app/lemonriver/text/ja.ts +405 -273
- package/src/app/lemonriver/text/platform.ts +7 -0
- package/src/app/lemonriver/text/types.ts +122 -1
- package/src/app/lemonriver/text/zh-cn.ts +645 -507
- package/src/app/lemonriver/text/zh-tw.ts +681 -544
- package/src/app/lemonriver/theme/app.css +9 -0
- package/src/app/lemonriver/theme/controls.css +5 -2
- package/src/app/lemonriver/theme/index.css +9 -0
- package/src/app/lemonriver/theme/pages.ts +2 -0
- package/src/app/lemonriver/theme/theme-menu.tsx +10 -11
- package/src/app/lemonriver/update/restart-wait.ts +45 -0
- package/src/app/lemonriver/update/update-prompt.tsx +9 -0
- package/src/app/lib/agent/use-agent.ts +117 -30
- package/src/app/lib/desktop-host.ts +31 -0
- package/src/app/lib/desktop-routes.ts +22 -0
- package/src/app/lib/desktop.ts +106 -0
- package/src/app/lib/export-pdf.ts +15 -7
- package/src/app/lib/inspector/color.ts +51 -0
- package/src/app/lib/inspector/fiber.ts +6 -0
- package/src/app/lib/inspector/use-editor.ts +2 -1
- package/src/app/lib/inspector/use-notes.ts +331 -57
- package/src/app/lib/inspector/use-visual-editor.ts +9 -1
- package/src/app/lib/locale-store.ts +6 -1
- package/src/app/lib/transition.ts +43 -0
- package/src/app/lib/unsaved.ts +155 -0
- package/src/app/routes/home.tsx +1 -1
- package/src/app/routes/presenter.tsx +2 -0
- package/src/app/routes/slide.tsx +130 -74
- package/src/app/styles.css +39 -1
- package/src/locale/en.ts +19 -0
- package/src/locale/es.ts +19 -0
- package/src/locale/ja.ts +19 -0
- package/src/locale/types.ts +12 -0
- package/src/locale/zh-cn.ts +19 -0
- package/src/locale/zh-tw.ts +19 -0
- package/src/app/lemonriver/guide/guide-prompt.tsx +0 -89
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useSyncExternalStore } from 'react';
|
|
2
|
+
import { useLrText } from '../text';
|
|
3
|
+
import {
|
|
4
|
+
getPresenterPopupNotice,
|
|
5
|
+
retryPresenterPopup,
|
|
6
|
+
subscribePresenterPopupNotice,
|
|
7
|
+
} from './dual-screen';
|
|
8
|
+
|
|
9
|
+
export function PresenterBlockedHint({ slideId }: { slideId: string }) {
|
|
10
|
+
const notice = useSyncExternalStore(
|
|
11
|
+
subscribePresenterPopupNotice,
|
|
12
|
+
getPresenterPopupNotice,
|
|
13
|
+
getPresenterPopupNotice,
|
|
14
|
+
);
|
|
15
|
+
const lr = useLrText();
|
|
16
|
+
if (!notice?.blocked || notice.slideId !== slideId) return null;
|
|
17
|
+
return (
|
|
18
|
+
<div className="pointer-events-none fixed inset-x-0 top-4 z-[70] flex justify-center px-4">
|
|
19
|
+
<button
|
|
20
|
+
type="button"
|
|
21
|
+
onClick={() => retryPresenterPopup(slideId)}
|
|
22
|
+
className="pointer-events-auto rounded-[6px] border border-white/20 bg-black/80 px-4 py-2 text-[13px] text-white shadow-lg backdrop-blur hover:bg-black/90"
|
|
23
|
+
>
|
|
24
|
+
{lr.present.presenterBlocked}
|
|
25
|
+
</button>
|
|
26
|
+
</div>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
type WakeLockSentinel = {
|
|
4
|
+
released: boolean;
|
|
5
|
+
release: () => Promise<void>;
|
|
6
|
+
addEventListener?: (type: 'release', listener: () => void) => void;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
type WakeLockApi = {
|
|
10
|
+
request: (type: 'screen') => Promise<WakeLockSentinel>;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
type VisibilitySource = {
|
|
14
|
+
visibilityState: string;
|
|
15
|
+
addEventListener: (type: 'visibilitychange', listener: () => void) => void;
|
|
16
|
+
removeEventListener: (type: 'visibilitychange', listener: () => void) => void;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type WakeLockDeps = {
|
|
20
|
+
navigator?: { wakeLock?: WakeLockApi } | null;
|
|
21
|
+
document?: VisibilitySource | null;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export function holdScreenWakeLock(active: boolean, deps: WakeLockDeps = {}): () => void {
|
|
25
|
+
const nav =
|
|
26
|
+
deps.navigator ??
|
|
27
|
+
(typeof navigator === 'undefined' ? null : (navigator as { wakeLock?: WakeLockApi }));
|
|
28
|
+
const doc =
|
|
29
|
+
deps.document ?? (typeof document === 'undefined' ? null : (document as VisibilitySource));
|
|
30
|
+
const wakeLock = nav?.wakeLock;
|
|
31
|
+
if (!active || !wakeLock || !doc) return () => {};
|
|
32
|
+
|
|
33
|
+
let sentinel: WakeLockSentinel | null = null;
|
|
34
|
+
let disposed = false;
|
|
35
|
+
|
|
36
|
+
const acquire = () => {
|
|
37
|
+
if (disposed || sentinel) return;
|
|
38
|
+
wakeLock.request('screen').then(
|
|
39
|
+
(next) => {
|
|
40
|
+
if (disposed || sentinel) {
|
|
41
|
+
next.release().catch(() => {});
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
sentinel = next;
|
|
45
|
+
next.addEventListener?.('release', () => {
|
|
46
|
+
if (sentinel === next) sentinel = null;
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
() => {},
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const onVisibilityChange = () => {
|
|
54
|
+
if (doc.visibilityState !== 'visible') return;
|
|
55
|
+
if (sentinel && !sentinel.released) return;
|
|
56
|
+
sentinel = null;
|
|
57
|
+
acquire();
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
acquire();
|
|
61
|
+
doc.addEventListener('visibilitychange', onVisibilityChange);
|
|
62
|
+
|
|
63
|
+
return () => {
|
|
64
|
+
disposed = true;
|
|
65
|
+
doc.removeEventListener('visibilitychange', onVisibilityChange);
|
|
66
|
+
const current = sentinel;
|
|
67
|
+
sentinel = null;
|
|
68
|
+
current?.release().catch(() => {});
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function useScreenWakeLock(active: boolean): void {
|
|
73
|
+
useEffect(() => holdScreenWakeLock(active), [active]);
|
|
74
|
+
}
|
|
@@ -2,6 +2,7 @@ import { lazy } from 'react';
|
|
|
2
2
|
import { Route } from 'react-router-dom';
|
|
3
3
|
import { NotFound } from './chrome/not-found';
|
|
4
4
|
import { isFeatureEnabled } from './features';
|
|
5
|
+
import { MoreAgentsPage } from './guide/more-agents-page';
|
|
5
6
|
import { HelpPage } from './help/help-page';
|
|
6
7
|
import { LemonRiverHome } from './home/home-page';
|
|
7
8
|
import { SettingsPage } from './settings/settings-page';
|
|
@@ -81,6 +82,7 @@ export function lemonRiverShellRoutes() {
|
|
|
81
82
|
<Route key="settings" path="/settings" element={<SettingsPage />} />
|
|
82
83
|
),
|
|
83
84
|
isFeatureEnabled('help') && <Route key="help" path="/help" element={<HelpPage />} />,
|
|
85
|
+
<Route key="agents-more" path="/agents/more" element={<MoreAgentsPage />} />,
|
|
84
86
|
isFeatureEnabled('templates') && (
|
|
85
87
|
<Route
|
|
86
88
|
key="templates"
|
|
@@ -35,6 +35,7 @@ import { placeLabel } from '../backup/places';
|
|
|
35
35
|
import { openFeedback } from '../feedback/dialog';
|
|
36
36
|
import { helpAnchorForPlace } from '../help/model';
|
|
37
37
|
import { useLrText } from '../text';
|
|
38
|
+
import { revealLabel } from '../text/platform';
|
|
38
39
|
import { useReduceMotionSetting } from '../theme/motion';
|
|
39
40
|
import { useTheme } from '../theme/use-theme';
|
|
40
41
|
import { BackupRestoreDialog } from './backup-restore-dialog';
|
|
@@ -260,7 +261,7 @@ export function BackupSection() {
|
|
|
260
261
|
return;
|
|
261
262
|
}
|
|
262
263
|
if ('cancelled' in answer) return;
|
|
263
|
-
const name = answer.path.split(
|
|
264
|
+
const name = answer.path.split(/[\\/]/).pop() ?? answer.path;
|
|
264
265
|
setExportNotice(format(b.exportDone, { name, size: formatSize(answer.size) }));
|
|
265
266
|
} catch {
|
|
266
267
|
setExportNotice(b.exportFailed);
|
|
@@ -415,7 +416,7 @@ export function BackupSection() {
|
|
|
415
416
|
onClick={() => void revealBackup(last.path)}
|
|
416
417
|
className="rounded text-[12.5px] text-muted-foreground underline-offset-2 outline-none hover:text-foreground hover:underline focus-visible:ring-2 focus-visible:ring-ring/40"
|
|
417
418
|
>
|
|
418
|
-
{b.reveal}
|
|
419
|
+
{revealLabel(navigator.userAgent, b.reveal, b.revealExplorer)}
|
|
419
420
|
</button>
|
|
420
421
|
)}
|
|
421
422
|
|
|
@@ -3,12 +3,12 @@ import { useEffect, useState } from 'react';
|
|
|
3
3
|
import { useNavigate } from 'react-router-dom';
|
|
4
4
|
import { useLocale } from '@/lib/use-locale';
|
|
5
5
|
import { cn } from '@/lib/utils';
|
|
6
|
+
import { AgentInstallSection } from '../agent-install/section';
|
|
6
7
|
import type { AgentPrefs } from '../agent-prefs/prefs';
|
|
7
8
|
import { updateAgentPrefs, useAgentPrefs } from '../agent-prefs/use-prefs';
|
|
8
9
|
import { AgentProvidersSection } from '../agent-providers/section';
|
|
9
10
|
import { HelperMascot, type HelperRole } from '../brand/mascot';
|
|
10
11
|
import { isFeatureEnabled } from '../features';
|
|
11
|
-
import { GUIDE_SEEN_KEY } from '../guide/state';
|
|
12
12
|
import { SUPPORT_URL } from '../links';
|
|
13
13
|
import { useLrText } from '../text';
|
|
14
14
|
import { setReduceMotionSetting, useReduceMotionSetting } from '../theme/motion';
|
|
@@ -45,10 +45,7 @@ export function SettingsPage() {
|
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
function replayOnboarding() {
|
|
48
|
-
|
|
49
|
-
localStorage.removeItem(GUIDE_SEEN_KEY);
|
|
50
|
-
} catch {}
|
|
51
|
-
navigate('/');
|
|
48
|
+
navigate('/help#guide');
|
|
52
49
|
}
|
|
53
50
|
|
|
54
51
|
const helpers: {
|
|
@@ -171,7 +168,9 @@ export function SettingsPage() {
|
|
|
171
168
|
</div>
|
|
172
169
|
</section>
|
|
173
170
|
|
|
174
|
-
|
|
171
|
+
<AgentInstallSection />
|
|
172
|
+
|
|
173
|
+
<AgentProvidersSection />
|
|
175
174
|
|
|
176
175
|
{isFeatureEnabled('backup') && <BackupSection />}
|
|
177
176
|
|
|
@@ -2,6 +2,7 @@ import { Check, Copy, Folder } from 'lucide-react';
|
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
3
|
import { Button } from '@/components/ui/button';
|
|
4
4
|
import { useLrText } from '../text';
|
|
5
|
+
import { revealLabel } from '../text/platform';
|
|
5
6
|
import { copyWorkspacePath, revealWorkspace, workspacePath } from './workspace';
|
|
6
7
|
|
|
7
8
|
export function WorkspaceCard() {
|
|
@@ -44,7 +45,7 @@ export function WorkspaceCard() {
|
|
|
44
45
|
</Button>
|
|
45
46
|
<Button variant="outline" size="sm" onClick={revealWorkspace}>
|
|
46
47
|
<Folder />
|
|
47
|
-
{t.workspaceReveal}
|
|
48
|
+
{revealLabel(navigator.userAgent, t.workspaceReveal, t.workspaceRevealExplorer)}
|
|
48
49
|
</Button>
|
|
49
50
|
</div>
|
|
50
51
|
<p className="mt-3 text-[12.5px] text-muted-foreground">{t.workspaceHint}</p>
|
|
@@ -17,6 +17,7 @@ import { loadSlide } from '../../lib/slides';
|
|
|
17
17
|
import { isFeatureEnabled } from '../features';
|
|
18
18
|
import { noteSuccess } from '../feedback/first-success';
|
|
19
19
|
import { useLrText } from '../text';
|
|
20
|
+
import { revealLabel } from '../text/platform';
|
|
20
21
|
import { CaptureCancelled, captureDeck, toBase64 } from './capture';
|
|
21
22
|
import { appVersion, packShare, revealShared } from './client';
|
|
22
23
|
import { buildGuideHtml, guideFileName, guideLocaleFor } from './guide';
|
|
@@ -317,7 +318,7 @@ export function ShareDialog({
|
|
|
317
318
|
size="sm"
|
|
318
319
|
onClick={() => result && void revealShared(result.path)}
|
|
319
320
|
>
|
|
320
|
-
{lr.share.reveal}
|
|
321
|
+
{revealLabel(navigator.userAgent, lr.share.reveal, lr.share.revealExplorer)}
|
|
321
322
|
</Button>
|
|
322
323
|
<Button type="button" size="sm" onClick={() => close(false)}>
|
|
323
324
|
{lr.share.finish}
|