@open-slide/core 1.9.0 → 1.11.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/README.md +12 -0
- package/dist/{build-ZM7IfDO-.js → build-CtmQSpg-.js} +1 -1
- package/dist/cli/bin.js +3 -3
- package/dist/{config-D_5nlXFU.d.ts → config-14qk4fP8.d.ts} +2 -1
- package/dist/{config-BAZeaz2P.js → config-Bk2i4eJ1.js} +6 -4
- package/dist/{dev-BQkNTG_t.js → dev-DplvRqZx.js} +1 -1
- package/dist/{format-CYOb2cAQ.js → format-BvBmqbNW.js} +12 -4
- package/dist/index.d.ts +24 -4
- package/dist/index.js +100 -8
- package/dist/locale/index.d.ts +1 -1
- package/dist/locale/index.js +1 -1
- package/dist/{preview-D8hUtbRA.js → preview-p4gcc8ip.js} +1 -1
- package/dist/{types-AalTbxMj.d.ts → types-D_q_ylIe.d.ts} +2 -0
- package/dist/vite/index.d.ts +2 -2
- package/dist/vite/index.js +1 -1
- package/package.json +1 -1
- package/skills/slide-authoring/SKILL.md +42 -0
- package/src/app/app.tsx +1 -1
- package/src/app/components/player.tsx +50 -14
- package/src/app/components/present/use-presenter-channel.ts +2 -0
- package/src/app/components/slide-canvas.tsx +12 -6
- package/src/app/components/slide-transition-layer.tsx +44 -4
- package/src/app/components/thumbnail-rail.tsx +77 -15
- package/src/app/lib/export-pdf.ts +67 -3
- package/src/app/lib/step-context.tsx +261 -0
- package/src/app/routes/presenter.tsx +32 -7
- package/src/app/routes/slide.tsx +26 -4
- package/src/app/virtual.d.ts +1 -0
- package/src/locale/en.ts +2 -0
- package/src/locale/ja.ts +2 -0
- package/src/locale/types.ts +2 -0
- package/src/locale/zh-cn.ts +2 -0
- package/src/locale/zh-tw.ts +2 -0
package/src/app/routes/slide.tsx
CHANGED
|
@@ -36,6 +36,7 @@ import {
|
|
|
36
36
|
DropdownMenuContent,
|
|
37
37
|
DropdownMenuItem,
|
|
38
38
|
DropdownMenuSeparator,
|
|
39
|
+
DropdownMenuShortcut,
|
|
39
40
|
DropdownMenuTrigger,
|
|
40
41
|
} from '@/components/ui/dropdown-menu';
|
|
41
42
|
import { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs';
|
|
@@ -236,21 +237,37 @@ export function Slide() {
|
|
|
236
237
|
if (playMode) return;
|
|
237
238
|
const onKey = (e: KeyboardEvent) => {
|
|
238
239
|
if (e.target instanceof HTMLElement && e.target.matches('input, textarea')) return;
|
|
239
|
-
if (
|
|
240
|
+
if (
|
|
241
|
+
e.key === 'ArrowRight' ||
|
|
242
|
+
e.key === 'ArrowDown' ||
|
|
243
|
+
e.key === ' ' ||
|
|
244
|
+
e.key === 'PageDown'
|
|
245
|
+
) {
|
|
240
246
|
e.preventDefault();
|
|
241
247
|
goTo(index + 1);
|
|
242
|
-
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
if (e.key === 'ArrowLeft' || e.key === 'ArrowUp' || e.key === 'PageUp') {
|
|
243
251
|
e.preventDefault();
|
|
244
252
|
goTo(index - 1);
|
|
245
|
-
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
// Letter shortcuts only fire bare so browser combos (Cmd/Ctrl-P, ⌘F…) stay intact.
|
|
256
|
+
if (e.altKey || e.ctrlKey || e.metaKey) return;
|
|
257
|
+
if (e.key === 'f' || e.key === 'F') {
|
|
246
258
|
setPlayMode('fullscreen');
|
|
259
|
+
} else if (e.key === 'Enter') {
|
|
260
|
+
setPlayMode('window');
|
|
261
|
+
} else if (e.key === 'p' || e.key === 'P') {
|
|
262
|
+
if (slideId) openPresenterWindow(slideId);
|
|
263
|
+
setPlayMode('window');
|
|
247
264
|
} else if (import.meta.env.DEV && (e.key === 'd' || e.key === 'D')) {
|
|
248
265
|
setDesignOpen((v) => !v);
|
|
249
266
|
}
|
|
250
267
|
};
|
|
251
268
|
window.addEventListener('keydown', onKey);
|
|
252
269
|
return () => window.removeEventListener('keydown', onKey);
|
|
253
|
-
}, [index, goTo, playMode]);
|
|
270
|
+
}, [index, goTo, playMode, slideId]);
|
|
254
271
|
|
|
255
272
|
if (error) {
|
|
256
273
|
return (
|
|
@@ -606,10 +623,12 @@ export function Slide() {
|
|
|
606
623
|
<DropdownMenuItem onSelect={() => setPlayMode('window')}>
|
|
607
624
|
<Play />
|
|
608
625
|
{t.slide.presentInWindow}
|
|
626
|
+
<DropdownMenuShortcut>↵</DropdownMenuShortcut>
|
|
609
627
|
</DropdownMenuItem>
|
|
610
628
|
<DropdownMenuItem onSelect={() => setPlayMode('fullscreen')}>
|
|
611
629
|
<Maximize />
|
|
612
630
|
{t.slide.presentFullscreen}
|
|
631
|
+
<DropdownMenuShortcut>F</DropdownMenuShortcut>
|
|
613
632
|
</DropdownMenuItem>
|
|
614
633
|
<DropdownMenuItem
|
|
615
634
|
onSelect={() => {
|
|
@@ -619,6 +638,7 @@ export function Slide() {
|
|
|
619
638
|
>
|
|
620
639
|
<MonitorSpeaker />
|
|
621
640
|
{t.slide.presentPresenter}
|
|
641
|
+
<DropdownMenuShortcut>P</DropdownMenuShortcut>
|
|
622
642
|
</DropdownMenuItem>
|
|
623
643
|
</DropdownMenuContent>
|
|
624
644
|
</DropdownMenu>
|
|
@@ -642,6 +662,7 @@ export function Slide() {
|
|
|
642
662
|
onSelect={goTo}
|
|
643
663
|
onReorder={import.meta.env.DEV ? reorderPage : undefined}
|
|
644
664
|
actions={thumbnailActions}
|
|
665
|
+
moduleTransition={slide.transition}
|
|
645
666
|
/>
|
|
646
667
|
<main
|
|
647
668
|
ref={slideViewportRef}
|
|
@@ -724,6 +745,7 @@ function ResizableRail(props: {
|
|
|
724
745
|
onSelect: (i: number) => void;
|
|
725
746
|
onReorder?: (from: number, to: number) => void;
|
|
726
747
|
actions?: ThumbnailActions;
|
|
748
|
+
moduleTransition?: SlideModule['transition'];
|
|
727
749
|
}) {
|
|
728
750
|
const t = useLocale();
|
|
729
751
|
const [width, setWidth] = useState<number>(readStoredRailWidth);
|
package/src/app/virtual.d.ts
CHANGED
package/src/locale/en.ts
CHANGED
|
@@ -343,6 +343,8 @@ export const en: Locale = {
|
|
|
343
343
|
toastDuplicateFailed: 'Could not duplicate page',
|
|
344
344
|
toastDeleteFailed: 'Could not delete page',
|
|
345
345
|
resizeRail: 'Resize thumbnail rail',
|
|
346
|
+
transitionIndicator: 'Has slide transition',
|
|
347
|
+
stepsIndicator: 'Has step-by-step reveals',
|
|
346
348
|
},
|
|
347
349
|
|
|
348
350
|
pdfToast: {
|
package/src/locale/ja.ts
CHANGED
package/src/locale/types.ts
CHANGED
package/src/locale/zh-cn.ts
CHANGED