@nice2dev/ui-presentations 1.0.2
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/CHANGELOG.md +63 -0
- package/README.md +59 -0
- package/dist/__tests__/PresentationModel.test.d.ts +2 -0
- package/dist/__tests__/PresentationModel.test.d.ts.map +1 -0
- package/dist/__tests__/brandKit.test.d.ts +2 -0
- package/dist/__tests__/brandKit.test.d.ts.map +1 -0
- package/dist/__tests__/businessTemplates.test.d.ts +2 -0
- package/dist/__tests__/businessTemplates.test.d.ts.map +1 -0
- package/dist/__tests__/chartRenderer.test.d.ts +2 -0
- package/dist/__tests__/chartRenderer.test.d.ts.map +1 -0
- package/dist/__tests__/exportEngine.test.d.ts +2 -0
- package/dist/__tests__/exportEngine.test.d.ts.map +1 -0
- package/dist/__tests__/i18n-locales.test.d.ts +2 -0
- package/dist/__tests__/i18n-locales.test.d.ts.map +1 -0
- package/dist/__tests__/puppetShow.test.d.ts +6 -0
- package/dist/__tests__/puppetShow.test.d.ts.map +1 -0
- package/dist/__tests__/serialization.test.d.ts +2 -0
- package/dist/__tests__/serialization.test.d.ts.map +1 -0
- package/dist/__tests__/setup.d.ts +2 -0
- package/dist/__tests__/setup.d.ts.map +1 -0
- package/dist/__tests__/slideAnimationEngine.test.d.ts +2 -0
- package/dist/__tests__/slideAnimationEngine.test.d.ts.map +1 -0
- package/dist/__tests__/sprint24-presentations.test.d.ts +2 -0
- package/dist/__tests__/sprint24-presentations.test.d.ts.map +1 -0
- package/dist/collaborative/collaborativePresentation.d.ts +208 -0
- package/dist/collaborative/collaborativePresentation.d.ts.map +1 -0
- package/dist/components/NicePresentationEditor.d.ts +22 -0
- package/dist/components/NicePresentationEditor.d.ts.map +1 -0
- package/dist/components/NicePresentationPlayer.d.ts +26 -0
- package/dist/components/NicePresentationPlayer.d.ts.map +1 -0
- package/dist/components/PresentationToolbar.d.ts +16 -0
- package/dist/components/PresentationToolbar.d.ts.map +1 -0
- package/dist/components/SlideCanvas.d.ts +28 -0
- package/dist/components/SlideCanvas.d.ts.map +1 -0
- package/dist/components/SlidePropertyPanel.d.ts +13 -0
- package/dist/components/SlidePropertyPanel.d.ts.map +1 -0
- package/dist/components/SlideThumbnailList.d.ts +16 -0
- package/dist/components/SlideThumbnailList.d.ts.map +1 -0
- package/dist/components/interactive/InteractiveButton.d.ts +21 -0
- package/dist/components/interactive/InteractiveButton.d.ts.map +1 -0
- package/dist/components/interactive/InteractiveCountdown.d.ts +21 -0
- package/dist/components/interactive/InteractiveCountdown.d.ts.map +1 -0
- package/dist/components/interactive/InteractivePoll.d.ts +25 -0
- package/dist/components/interactive/InteractivePoll.d.ts.map +1 -0
- package/dist/components/interactive/InteractiveQnA.d.ts +31 -0
- package/dist/components/interactive/InteractiveQnA.d.ts.map +1 -0
- package/dist/components/interactive/InteractiveQuiz.d.ts +21 -0
- package/dist/components/interactive/InteractiveQuiz.d.ts.map +1 -0
- package/dist/components/interactive/index.d.ts +17 -0
- package/dist/components/interactive/index.d.ts.map +1 -0
- package/dist/core/PresentationModel.d.ts +34 -0
- package/dist/core/PresentationModel.d.ts.map +1 -0
- package/dist/core/brandKit.d.ts +53 -0
- package/dist/core/brandKit.d.ts.map +1 -0
- package/dist/core/chartRenderer.d.ts +5 -0
- package/dist/core/chartRenderer.d.ts.map +1 -0
- package/dist/core/customTransitions.d.ts +115 -0
- package/dist/core/customTransitions.d.ts.map +1 -0
- package/dist/core/dashboardSlide.d.ts +229 -0
- package/dist/core/dashboardSlide.d.ts.map +1 -0
- package/dist/core/dataGridSlide.d.ts +255 -0
- package/dist/core/dataGridSlide.d.ts.map +1 -0
- package/dist/core/exportEngine.d.ts +5 -0
- package/dist/core/exportEngine.d.ts.map +1 -0
- package/dist/core/i18n.d.ts +10 -0
- package/dist/core/i18n.d.ts.map +1 -0
- package/dist/core/liveDataSlides.d.ts +237 -0
- package/dist/core/liveDataSlides.d.ts.map +1 -0
- package/dist/core/qrCodeSlide.d.ts +310 -0
- package/dist/core/qrCodeSlide.d.ts.map +1 -0
- package/dist/core/querySlide.d.ts +196 -0
- package/dist/core/querySlide.d.ts.map +1 -0
- package/dist/core/recordingMode.d.ts +139 -0
- package/dist/core/recordingMode.d.ts.map +1 -0
- package/dist/core/serialization.d.ts +13 -0
- package/dist/core/serialization.d.ts.map +1 -0
- package/dist/core/slideAnimationEngine.d.ts +20 -0
- package/dist/core/slideAnimationEngine.d.ts.map +1 -0
- package/dist/core/slideLibrary.d.ts +311 -0
- package/dist/core/slideLibrary.d.ts.map +1 -0
- package/dist/core/versionHistory.d.ts +234 -0
- package/dist/core/versionHistory.d.ts.map +1 -0
- package/dist/hooks/usePresentationEditor.d.ts +35 -0
- package/dist/hooks/usePresentationEditor.d.ts.map +1 -0
- package/dist/index.cjs +3628 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +62231 -0
- package/dist/puppetShow/gameEngineIntegration.d.ts +149 -0
- package/dist/puppetShow/gameEngineIntegration.d.ts.map +1 -0
- package/dist/puppetShow/index.d.ts +17 -0
- package/dist/puppetShow/index.d.ts.map +1 -0
- package/dist/puppetShow/puppetCharacter.d.ts +96 -0
- package/dist/puppetShow/puppetCharacter.d.ts.map +1 -0
- package/dist/puppetShow/puppetPlayer.d.ts +68 -0
- package/dist/puppetShow/puppetPlayer.d.ts.map +1 -0
- package/dist/puppetShow/puppetShowConverter.d.ts +141 -0
- package/dist/puppetShow/puppetShowConverter.d.ts.map +1 -0
- package/dist/puppetShow/puppetShowTypes.d.ts +529 -0
- package/dist/puppetShow/puppetShowTypes.d.ts.map +1 -0
- package/dist/puppetShow/puppetStage.d.ts +67 -0
- package/dist/puppetShow/puppetStage.d.ts.map +1 -0
- package/dist/puppetShow/puppetTimeline.d.ts +143 -0
- package/dist/puppetShow/puppetTimeline.d.ts.map +1 -0
- package/dist/style.css +1 -0
- package/dist/templates/ArchitectureOverviewTemplate.d.ts +98 -0
- package/dist/templates/ArchitectureOverviewTemplate.d.ts.map +1 -0
- package/dist/templates/IncidentReportTemplate.d.ts +81 -0
- package/dist/templates/IncidentReportTemplate.d.ts.map +1 -0
- package/dist/templates/InvestorDeckTemplate.d.ts +145 -0
- package/dist/templates/InvestorDeckTemplate.d.ts.map +1 -0
- package/dist/templates/OnboardingTemplate.d.ts +106 -0
- package/dist/templates/OnboardingTemplate.d.ts.map +1 -0
- package/dist/templates/ProductPitchTemplate.d.ts +88 -0
- package/dist/templates/ProductPitchTemplate.d.ts.map +1 -0
- package/dist/templates/QuarterlyReportTemplate.d.ts +102 -0
- package/dist/templates/QuarterlyReportTemplate.d.ts.map +1 -0
- package/dist/templates/SprintReviewTemplate.d.ts +90 -0
- package/dist/templates/SprintReviewTemplate.d.ts.map +1 -0
- package/dist/templates/index.d.ts +11 -0
- package/dist/templates/index.d.ts.map +1 -0
- package/dist/types/presentationTypes.d.ts +475 -0
- package/dist/types/presentationTypes.d.ts.map +1 -0
- package/package.json +57 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# @nice2dev/ui-presentations — Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the presentation editor package.
|
|
4
|
+
|
|
5
|
+
## [0.2.0] — 2026-03-25
|
|
6
|
+
|
|
7
|
+
### Added (FAZA 1.2)
|
|
8
|
+
|
|
9
|
+
- **NicePresentationEditor** — full slide editor:
|
|
10
|
+
- Slide canvas with drag & drop, thumbnails sidebar, reorder
|
|
11
|
+
- Elements: text, image, shape, chart, diagram, code, table, video, embed
|
|
12
|
+
- Animations timeline, master slides / layouts
|
|
13
|
+
- Data binding: NiceChart / NiceDataGrid embedded in slides
|
|
14
|
+
- Speaker notes, export (PDF, HTML, PPTX, .ndp.json, PNG per slide)
|
|
15
|
+
- **NicePresentationPlayer** — fullscreen presenter:
|
|
16
|
+
- Speaker view (current + next + notes + timer), auto-play
|
|
17
|
+
- Laser pointer / spotlight, progress bar
|
|
18
|
+
- **Business templates**: Quarterly Report, Product Pitch, Sprint Review, Architecture Overview, Onboarding, Incident Report
|
|
19
|
+
- **Live data slides** — charts connected to REST/SignalR
|
|
20
|
+
- **Collaborative editing** — multi-user Yjs/CRDT
|
|
21
|
+
- **AI slide generation** — LLM creates slide structure
|
|
22
|
+
- **Brand kit** — colors + fonts + logo auto-applied
|
|
23
|
+
- **Version history** — preview + restore
|
|
24
|
+
- **Recording mode** — screen + mic recording
|
|
25
|
+
- **Interactive elements** — buttons, polls, quizzes, countdown, Q&A
|
|
26
|
+
- **QR code slides** — auto-generated QR for live presentation link
|
|
27
|
+
|
|
28
|
+
### Tests
|
|
29
|
+
|
|
30
|
+
- 10 unit tests + E2E (player, editor, themes, navigation)
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## [0.1.0] — 2025-06-01
|
|
35
|
+
|
|
36
|
+
Initial beta with `.ndp.json` format specification.
|
|
37
|
+
|
|
38
|
+
All notable changes to `@nice2dev/ui-presentations` will be documented in this file.
|
|
39
|
+
|
|
40
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
41
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## [0.1.0] — 2026-03-18
|
|
46
|
+
|
|
47
|
+
### 📽️ Initial Release
|
|
48
|
+
|
|
49
|
+
First release of `@nice2dev/ui-presentations` — a PowerPoint-like slide editor and player for React.
|
|
50
|
+
|
|
51
|
+
### Features
|
|
52
|
+
|
|
53
|
+
- **NicePresentationEditor** — full-featured slide editor with text, images, shapes, charts, and code blocks
|
|
54
|
+
- **NicePresentationPlayer** — full-screen slide player with transitions, animations, and speaker notes
|
|
55
|
+
- **Slide layouts** — title slide, content, two-column, image-heavy, section header, blank
|
|
56
|
+
- **Animations** — entrance/exit/emphasis effects with configurable timing and easing
|
|
57
|
+
- **Transitions** — fade, slide, zoom, morph, flip, dissolve between slides
|
|
58
|
+
- **Themes** — corporate, modern dark, minimal, and custom theme support
|
|
59
|
+
- **Slide sizes** — 16:9, 4:3, and custom aspect ratios
|
|
60
|
+
- **Speaker tools** — timer, next-slide preview, notes panel
|
|
61
|
+
- **Export** — PDF, PPTX, and image export support
|
|
62
|
+
- **i18n** — full internationalization support
|
|
63
|
+
- **Theming** — CSS custom properties with light/dark mode
|
package/README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# @nice2dev/ui-presentations
|
|
2
|
+
|
|
3
|
+
> Presentation editor & player for React — slides, animations, data binding, business templates, recording mode.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
### NicePresentationEditor
|
|
8
|
+
- Drag & drop slide canvas with element positioning
|
|
9
|
+
- Slide sidebar — thumbnails with reorder
|
|
10
|
+
- Element types — text, image, shape, chart, diagram, code block, table, video, embed
|
|
11
|
+
- Property panel — typography, colors, position, size, rotation, opacity
|
|
12
|
+
- Master slides / layouts — title, content, two-column, blank
|
|
13
|
+
- Animation timeline — entry (fade/slide/zoom/bounce), emphasis (pulse/shake), exit animations
|
|
14
|
+
- Transitions — 17+ built-in (fade, slide, zoom, flip, morph, dissolve) + custom registry
|
|
15
|
+
- Data binding — NiceChart / NiceDataGrid with live data embedded in slides
|
|
16
|
+
- Diagram embedding — NiceDiagramViewer with animations inside slides
|
|
17
|
+
- Speaker notes per slide
|
|
18
|
+
- Export — PDF, HTML standalone, PPTX (basic), `.ndp.json`, PNG per slide
|
|
19
|
+
- Import — `.ndp.json`, PPTX (basic), Markdown (--- separated)
|
|
20
|
+
- Interactive elements — buttons, polls, quizzes, countdown, Q&A (audience engagement)
|
|
21
|
+
|
|
22
|
+
### NicePresentationPlayer
|
|
23
|
+
- Fullscreen presenter mode (←→ navigation, Space = next)
|
|
24
|
+
- Speaker view — current slide + next + notes + timer
|
|
25
|
+
- Auto-play with configurable tempo
|
|
26
|
+
- Laser pointer / spotlight mode
|
|
27
|
+
- Progress bar with slide number
|
|
28
|
+
|
|
29
|
+
### Business Templates
|
|
30
|
+
- **Quarterly Report** — KPIs, revenue chart, costs, pipeline, risks
|
|
31
|
+
- **Product Pitch** — problem → solution → demo → pricing → CTA
|
|
32
|
+
- **Sprint Review** — done, demo, velocity, impediments, next sprint
|
|
33
|
+
- **Architecture Overview** — system diagram, tech stack, data flow, deployment
|
|
34
|
+
- **Onboarding** — welcome, team, tools, processes, first tasks
|
|
35
|
+
- **Incident Report** — timeline, root cause, impact, remediation
|
|
36
|
+
|
|
37
|
+
### Data Integrations
|
|
38
|
+
- Live data slides — NiceChart with REST/SignalR auto-refresh
|
|
39
|
+
- DataGrid embedding — interactive sort/filter in presentation mode
|
|
40
|
+
- SQL/OData query slide — query → auto-generated table/chart
|
|
41
|
+
- Dashboard slide — multi-KPI layout with gauge, chart, number tiles
|
|
42
|
+
|
|
43
|
+
### Collaboration & AI
|
|
44
|
+
- Multi-user CRDT editing (Yjs)
|
|
45
|
+
- AI slide generation — LLM creates slide structure
|
|
46
|
+
- AI design suggestions — alignment, contrast, spacing
|
|
47
|
+
- Brand kit — define colors + fonts + logo → auto-apply
|
|
48
|
+
- Version history, slide library (reuse across presentations)
|
|
49
|
+
- Recording mode — screen + mic → video export
|
|
50
|
+
|
|
51
|
+
## Installation
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npm install @nice2dev/ui-presentations
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## License
|
|
58
|
+
|
|
59
|
+
MIT © NiceToDev
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PresentationModel.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/PresentationModel.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brandKit.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/brandKit.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"businessTemplates.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/businessTemplates.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chartRenderer.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/chartRenderer.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exportEngine.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/exportEngine.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n-locales.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/i18n-locales.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"puppetShow.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/puppetShow.test.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serialization.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/serialization.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/__tests__/setup.ts"],"names":[],"mappings":"AACA,OAAO,kCAAkC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slideAnimationEngine.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/slideAnimationEngine.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sprint24-presentations.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/sprint24-presentations.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { NicePresentationDocument, PresentationSlide, SlideElement, PresentationTheme, PresentationMetadata } from '../types/presentationTypes';
|
|
2
|
+
|
|
3
|
+
export interface YDoc {
|
|
4
|
+
getMap<T>(name: string): YMap<T>;
|
|
5
|
+
getArray<T>(name: string): YArray<T>;
|
|
6
|
+
getText(name: string): YText;
|
|
7
|
+
on(event: 'update' | 'destroy', callback: (update: Uint8Array, origin: unknown) => void): void;
|
|
8
|
+
off(event: 'update' | 'destroy', callback: (update: Uint8Array, origin: unknown) => void): void;
|
|
9
|
+
transact(fn: () => void, origin?: unknown): void;
|
|
10
|
+
destroy(): void;
|
|
11
|
+
guid: string;
|
|
12
|
+
clientID: number;
|
|
13
|
+
}
|
|
14
|
+
export interface YMap<T> {
|
|
15
|
+
get(key: string): T | undefined;
|
|
16
|
+
set(key: string, value: T): void;
|
|
17
|
+
delete(key: string): void;
|
|
18
|
+
has(key: string): boolean;
|
|
19
|
+
keys(): IterableIterator<string>;
|
|
20
|
+
values(): IterableIterator<T>;
|
|
21
|
+
entries(): IterableIterator<[string, T]>;
|
|
22
|
+
forEach(fn: (value: T, key: string, map: YMap<T>) => void): void;
|
|
23
|
+
toJSON(): Record<string, T>;
|
|
24
|
+
observe(fn: (event: YMapEvent<T>) => void): void;
|
|
25
|
+
unobserve(fn: (event: YMapEvent<T>) => void): void;
|
|
26
|
+
size: number;
|
|
27
|
+
}
|
|
28
|
+
export interface YArray<T> {
|
|
29
|
+
get(index: number): T | undefined;
|
|
30
|
+
insert(index: number, content: T[]): void;
|
|
31
|
+
delete(index: number, length: number): void;
|
|
32
|
+
push(content: T[]): void;
|
|
33
|
+
unshift(content: T[]): void;
|
|
34
|
+
slice(start?: number, end?: number): T[];
|
|
35
|
+
toArray(): T[];
|
|
36
|
+
toJSON(): T[];
|
|
37
|
+
length: number;
|
|
38
|
+
observe(fn: (event: YArrayEvent<T>) => void): void;
|
|
39
|
+
unobserve(fn: (event: YArrayEvent<T>) => void): void;
|
|
40
|
+
forEach(fn: (item: T, index: number, array: YArray<T>) => void): void;
|
|
41
|
+
}
|
|
42
|
+
export interface YText {
|
|
43
|
+
insert(index: number, content: string): void;
|
|
44
|
+
delete(index: number, length: number): void;
|
|
45
|
+
toString(): string;
|
|
46
|
+
length: number;
|
|
47
|
+
observe(fn: (event: YTextEvent) => void): void;
|
|
48
|
+
unobserve(fn: (event: YTextEvent) => void): void;
|
|
49
|
+
}
|
|
50
|
+
export interface YMapEvent<T> {
|
|
51
|
+
target: YMap<T>;
|
|
52
|
+
keysChanged: Set<string>;
|
|
53
|
+
changes: {
|
|
54
|
+
keys: Map<string, {
|
|
55
|
+
action: 'add' | 'update' | 'delete';
|
|
56
|
+
oldValue?: T;
|
|
57
|
+
}>;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export interface YArrayEvent<T> {
|
|
61
|
+
target: YArray<T>;
|
|
62
|
+
delta: Array<{
|
|
63
|
+
insert?: T[];
|
|
64
|
+
delete?: number;
|
|
65
|
+
retain?: number;
|
|
66
|
+
}>;
|
|
67
|
+
}
|
|
68
|
+
export interface YTextEvent {
|
|
69
|
+
target: YText;
|
|
70
|
+
delta: Array<{
|
|
71
|
+
insert?: string;
|
|
72
|
+
delete?: number;
|
|
73
|
+
retain?: number;
|
|
74
|
+
}>;
|
|
75
|
+
}
|
|
76
|
+
export interface PresentationAwarenessState {
|
|
77
|
+
user: CollaboratorInfo;
|
|
78
|
+
/** Slide the user is currently viewing/editing */
|
|
79
|
+
currentSlideId?: string;
|
|
80
|
+
/** Element being edited (null = no active edit) */
|
|
81
|
+
editingElementId?: string;
|
|
82
|
+
/** Cursor position on canvas */
|
|
83
|
+
cursor?: {
|
|
84
|
+
x: number;
|
|
85
|
+
y: number;
|
|
86
|
+
timestamp: number;
|
|
87
|
+
};
|
|
88
|
+
/** Current selection (element IDs) */
|
|
89
|
+
selection?: string[];
|
|
90
|
+
}
|
|
91
|
+
export interface CollaboratorInfo {
|
|
92
|
+
id: string;
|
|
93
|
+
name: string;
|
|
94
|
+
color: string;
|
|
95
|
+
avatar?: string;
|
|
96
|
+
}
|
|
97
|
+
export interface Awareness {
|
|
98
|
+
clientID: number;
|
|
99
|
+
getLocalState(): PresentationAwarenessState | null;
|
|
100
|
+
setLocalState(state: Partial<PresentationAwarenessState>): void;
|
|
101
|
+
setLocalStateField(field: string, value: unknown): void;
|
|
102
|
+
getStates(): Map<number, PresentationAwarenessState>;
|
|
103
|
+
on(event: 'change' | 'update', callback: (changes: AwarenessChanges) => void): void;
|
|
104
|
+
off(event: 'change' | 'update', callback: (changes: AwarenessChanges) => void): void;
|
|
105
|
+
destroy(): void;
|
|
106
|
+
}
|
|
107
|
+
export interface AwarenessChanges {
|
|
108
|
+
added: number[];
|
|
109
|
+
updated: number[];
|
|
110
|
+
removed: number[];
|
|
111
|
+
}
|
|
112
|
+
export interface WebsocketProviderLike {
|
|
113
|
+
awareness: Awareness;
|
|
114
|
+
on(event: 'sync' | 'connection-error' | 'connection-close', callback: (synced: boolean) => void): void;
|
|
115
|
+
off(event: 'sync' | 'connection-error' | 'connection-close', callback: (synced: boolean) => void): void;
|
|
116
|
+
connect(): void;
|
|
117
|
+
disconnect(): void;
|
|
118
|
+
destroy(): void;
|
|
119
|
+
connected: boolean;
|
|
120
|
+
}
|
|
121
|
+
export interface CollaborationProviderConfig {
|
|
122
|
+
type: 'websocket' | 'webrtc' | 'indexed-db';
|
|
123
|
+
url?: string;
|
|
124
|
+
room: string;
|
|
125
|
+
password?: string;
|
|
126
|
+
}
|
|
127
|
+
export interface UndoManagerLike {
|
|
128
|
+
undo(): void;
|
|
129
|
+
redo(): void;
|
|
130
|
+
canUndo(): boolean;
|
|
131
|
+
canRedo(): boolean;
|
|
132
|
+
on(event: 'stack-item-added' | 'stack-item-popped', fn: (event: unknown) => void): void;
|
|
133
|
+
stopCapturing(): void;
|
|
134
|
+
clear(): void;
|
|
135
|
+
}
|
|
136
|
+
export interface CollaborativePresentationState {
|
|
137
|
+
document: NicePresentationDocument | null;
|
|
138
|
+
collaborators: CollaboratorInfo[];
|
|
139
|
+
/** Which slide each collaborator is on */
|
|
140
|
+
collaboratorSlides: Map<string, string>;
|
|
141
|
+
/** Which elements each collaborator is editing */
|
|
142
|
+
collaboratorEditing: Map<string, string | null>;
|
|
143
|
+
/** Cursors per collaborator */
|
|
144
|
+
cursors: Map<string, {
|
|
145
|
+
x: number;
|
|
146
|
+
y: number;
|
|
147
|
+
}>;
|
|
148
|
+
/** Selections per collaborator */
|
|
149
|
+
selections: Map<string, string[]>;
|
|
150
|
+
isConnected: boolean;
|
|
151
|
+
isSynced: boolean;
|
|
152
|
+
localUser: CollaboratorInfo | null;
|
|
153
|
+
undoManager: UndoManagerLike | null;
|
|
154
|
+
}
|
|
155
|
+
export interface CollaborativePresentationActions {
|
|
156
|
+
addSlide: (slide: PresentationSlide, index?: number) => void;
|
|
157
|
+
updateSlide: (slideId: string, updates: Partial<PresentationSlide>) => void;
|
|
158
|
+
deleteSlide: (slideId: string) => void;
|
|
159
|
+
reorderSlides: (slideIds: string[]) => void;
|
|
160
|
+
addElement: (slideId: string, element: SlideElement) => void;
|
|
161
|
+
updateElement: (slideId: string, elementId: string, updates: Partial<SlideElement>) => void;
|
|
162
|
+
deleteElement: (slideId: string, elementId: string) => void;
|
|
163
|
+
updateTheme: (theme: Partial<PresentationTheme>) => void;
|
|
164
|
+
updateMetadata: (metadata: Partial<PresentationMetadata>) => void;
|
|
165
|
+
setTitle: (title: string) => void;
|
|
166
|
+
setCurrentSlide: (slideId: string) => void;
|
|
167
|
+
setEditingElement: (elementId: string | null) => void;
|
|
168
|
+
setCursor: (position: {
|
|
169
|
+
x: number;
|
|
170
|
+
y: number;
|
|
171
|
+
} | null) => void;
|
|
172
|
+
setSelection: (elementIds: string[]) => void;
|
|
173
|
+
undo: () => void;
|
|
174
|
+
redo: () => void;
|
|
175
|
+
connect: () => void;
|
|
176
|
+
disconnect: () => void;
|
|
177
|
+
setDocument: (doc: NicePresentationDocument) => void;
|
|
178
|
+
getDocument: () => NicePresentationDocument | null;
|
|
179
|
+
}
|
|
180
|
+
export interface CollaborativePresentationContextValue {
|
|
181
|
+
state: CollaborativePresentationState;
|
|
182
|
+
actions: CollaborativePresentationActions;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Reconstruct a NicePresentationDocument from Yjs shared types.
|
|
186
|
+
*/
|
|
187
|
+
export declare function syncYjsToPresentation(slidesArray: YArray<PresentationSlide>, metaMap: YMap<unknown>): NicePresentationDocument;
|
|
188
|
+
/**
|
|
189
|
+
* Push a NicePresentationDocument into Yjs shared types.
|
|
190
|
+
*/
|
|
191
|
+
export declare function syncPresentationToYjs(document: NicePresentationDocument, slidesArray: YArray<PresentationSlide>, metaMap: YMap<unknown>, ydoc: YDoc): void;
|
|
192
|
+
export interface UseCollaborativePresentationOptions {
|
|
193
|
+
provider?: CollaborationProviderConfig;
|
|
194
|
+
user: CollaboratorInfo;
|
|
195
|
+
initialDocument?: NicePresentationDocument;
|
|
196
|
+
onSync?: (document: NicePresentationDocument) => void;
|
|
197
|
+
onUserJoin?: (user: CollaboratorInfo) => void;
|
|
198
|
+
onUserLeave?: (user: CollaboratorInfo) => void;
|
|
199
|
+
onConnectionChange?: (connected: boolean) => void;
|
|
200
|
+
/** Factory to create a Yjs Doc (peer dependency injection) */
|
|
201
|
+
createYDoc?: () => YDoc;
|
|
202
|
+
/** Factory to create a transport provider */
|
|
203
|
+
createProvider?: (ydoc: YDoc, config: CollaborationProviderConfig) => WebsocketProviderLike;
|
|
204
|
+
/** Factory to create an undo manager */
|
|
205
|
+
createUndoManager?: (ydoc: YDoc, trackedTypes: unknown[]) => UndoManagerLike;
|
|
206
|
+
}
|
|
207
|
+
export declare function useCollaborativePresentation(options: UseCollaborativePresentationOptions): CollaborativePresentationContextValue;
|
|
208
|
+
//# sourceMappingURL=collaborativePresentation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collaborativePresentation.d.ts","sourceRoot":"","sources":["../../src/collaborative/collaborativePresentation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EACV,wBAAwB,EACxB,iBAAiB,EACjB,YAAY,EACZ,iBAAiB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ACtB,IAAI,EAAE,IAAI,GACT,IAAI,CAuBN;AAMD,MAAM,WAAW,mCAAmC;IAClD,QAAQ,CAAC,EAAE,2BAA2B,CAAC;IACvC,IAAI,EAAE,gBAAgB,CAAC;IACvB,eAAe,CAAC,EAAE,wBAAwB,CAAC;IAC3C,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,wBAAwB,KAAK,IAAI,CAAC;IACtD,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC9C,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC/C,kBAAkB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAClD,8DAA8D;IAC9D,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,6CAA6C;IAC7C,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,2BAA2B,KAAK,qBAAqB,CAAC;IAC5F,wCAAwC;IACxC,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,eAAe,CAAC;CAC9E;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,mCAAmC,GAC3C,qCAAqC,CA+XvC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { NicePresentationDocument } from '../types/presentationTypes';
|
|
3
|
+
|
|
4
|
+
export interface NicePresentationEditorProps {
|
|
5
|
+
/** Initial document (optional) */
|
|
6
|
+
initialDocument?: NicePresentationDocument;
|
|
7
|
+
/** Fires on every change */
|
|
8
|
+
onChange?: (doc: Readonly<NicePresentationDocument>) => void;
|
|
9
|
+
/** Export callback */
|
|
10
|
+
onExport?: (format: string, content: string) => void;
|
|
11
|
+
/** Launch presentation mode */
|
|
12
|
+
onPresent?: (doc: Readonly<NicePresentationDocument>, startSlide?: number) => void;
|
|
13
|
+
/** Language */
|
|
14
|
+
lang?: 'en' | 'pl';
|
|
15
|
+
showToolbar?: boolean;
|
|
16
|
+
showThumbnails?: boolean;
|
|
17
|
+
showPropertyPanel?: boolean;
|
|
18
|
+
className?: string;
|
|
19
|
+
style?: React.CSSProperties;
|
|
20
|
+
}
|
|
21
|
+
export declare const NicePresentationEditor: React.FC<NicePresentationEditorProps>;
|
|
22
|
+
//# sourceMappingURL=NicePresentationEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NicePresentationEditor.d.ts","sourceRoot":"","sources":["../../src/components/NicePresentationEditor.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAyC,MAAM,OAAO,CAAC;AAC9D,OAAO,KAAK,EACV,wBAAwB,EASzB,MAAM,4BAA4B,CAAC;AAapC,MAAM,WAAW,2BAA2B;IAC1C,kCAAkC;IAClC,eAAe,CAAC,EAAE,wBAAwB,CAAC;IAC3C,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,QAAQ,CAAC,wBAAwB,CAAC,KAAK,IAAI,CAAC;IAC7D,sBAAsB;IACtB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,+BAA+B;IAC/B,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,QAAQ,CAAC,wBAAwB,CAAC,EAAE,UAAU,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACnF,eAAe;IACf,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAEnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAsED,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAuNxE,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { NicePresentationDocument } from '../types/presentationTypes';
|
|
3
|
+
|
|
4
|
+
export interface NicePresentationPlayerProps {
|
|
5
|
+
/** The presentation document to play */
|
|
6
|
+
document: NicePresentationDocument;
|
|
7
|
+
/** Which slide to start from (0-based) */
|
|
8
|
+
startSlide?: number;
|
|
9
|
+
/** Called when the user exits (Escape key) */
|
|
10
|
+
onExit?: () => void;
|
|
11
|
+
/** Auto-advance slides (ms). 0 = manual only */
|
|
12
|
+
autoAdvanceMs?: number;
|
|
13
|
+
/** Show speaker notes overlay at bottom */
|
|
14
|
+
showNotes?: boolean;
|
|
15
|
+
/** Show slide number */
|
|
16
|
+
showSlideNumber?: boolean;
|
|
17
|
+
/** Show progress bar at bottom */
|
|
18
|
+
showProgressBar?: boolean;
|
|
19
|
+
/** Show presentation timer */
|
|
20
|
+
showTimer?: boolean;
|
|
21
|
+
/** Enable touch/swipe navigation */
|
|
22
|
+
enableTouch?: boolean;
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare const NicePresentationPlayer: React.FC<NicePresentationPlayerProps>;
|
|
26
|
+
//# sourceMappingURL=NicePresentationPlayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NicePresentationPlayer.d.ts","sourceRoot":"","sources":["../../src/components/NicePresentationPlayer.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAA4D,MAAM,OAAO,CAAC;AACjF,OAAO,KAAK,EACV,wBAAwB,EAKzB,MAAM,4BAA4B,CAAC;AAQpC,MAAM,WAAW,2BAA2B;IAC1C,wCAAwC;IACxC,QAAQ,EAAE,wBAAwB,CAAC;IACnC,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,gDAAgD;IAChD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wBAAwB;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kCAAkC;IAClC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,8BAA8B;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oCAAoC;IACpC,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAQD,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CA6axE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SlideElementType, SlideLayout } from '../types/presentationTypes';
|
|
3
|
+
|
|
4
|
+
export interface PresentationToolbarProps {
|
|
5
|
+
onAddElement?: (type: SlideElementType) => void;
|
|
6
|
+
onAddSlide?: (layout?: SlideLayout) => void;
|
|
7
|
+
onUndo?: () => void;
|
|
8
|
+
onRedo?: () => void;
|
|
9
|
+
canUndo?: boolean;
|
|
10
|
+
canRedo?: boolean;
|
|
11
|
+
onPresent?: () => void;
|
|
12
|
+
onExport?: (format: 'html' | 'ndp') => void;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const PresentationToolbar: React.FC<PresentationToolbarProps>;
|
|
16
|
+
//# sourceMappingURL=PresentationToolbar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PresentationToolbar.d.ts","sourceRoot":"","sources":["../../src/components/PresentationToolbar.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAgC,MAAM,OAAO,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAIhF,MAAM,WAAW,wBAAwB;IACvC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAChD,UAAU,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,WAAW,KAAK,IAAI,CAAC;IAC5C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,KAAK,IAAI,CAAC;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAMD,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAqGlE,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { PresentationSlide, PresentationTheme, SlideSize } from '../types/presentationTypes';
|
|
3
|
+
|
|
4
|
+
export interface SlideCanvasProps {
|
|
5
|
+
slide: PresentationSlide;
|
|
6
|
+
slideSize: SlideSize;
|
|
7
|
+
theme: PresentationTheme;
|
|
8
|
+
/** Scale factor (for fitting in editor) */
|
|
9
|
+
scale?: number;
|
|
10
|
+
/** Selected element ID */
|
|
11
|
+
selectedElementId?: string | null;
|
|
12
|
+
onSelectElement?: (id: string | null) => void;
|
|
13
|
+
/** Element drag callback (editor only) */
|
|
14
|
+
onElementDrag?: (elementId: string, x: number, y: number) => void;
|
|
15
|
+
/** Element resize callback (editor only) */
|
|
16
|
+
onElementResize?: (elementId: string, width: number, height: number, x?: number, y?: number) => void;
|
|
17
|
+
/** Element rotation callback */
|
|
18
|
+
onElementRotate?: (elementId: string, degrees: number) => void;
|
|
19
|
+
/** Whether interactive */
|
|
20
|
+
interactive?: boolean;
|
|
21
|
+
/** Show grid lines */
|
|
22
|
+
showGrid?: boolean;
|
|
23
|
+
/** Grid snap interval in % */
|
|
24
|
+
gridSnap?: number;
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare const SlideCanvas: React.FC<SlideCanvasProps>;
|
|
28
|
+
//# sourceMappingURL=SlideCanvas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SlideCanvas.d.ts","sourceRoot":"","sources":["../../src/components/SlideCanvas.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAgC,MAAM,OAAO,CAAC;AACrD,OAAO,KAAK,EACV,iBAAiB,EAEjB,iBAAiB,EACjB,SAAS,EAOV,MAAM,4BAA4B,CAAC;AAGpC,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,iBAAiB,CAAC;IACzB,SAAS,EAAE,SAAS,CAAC;IACrB,KAAK,EAAE,iBAAiB,CAAC;IACzB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0BAA0B;IAC1B,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC9C,0CAA0C;IAC1C,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAClE,4CAA4C;IAC5C,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACrG,gCAAgC;IAChC,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/D,0BAA0B;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,sBAAsB;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAoKlD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { PresentationSlide, SlideElement } from '../types/presentationTypes';
|
|
3
|
+
|
|
4
|
+
export interface SlidePropertyPanelProps {
|
|
5
|
+
slide?: PresentationSlide | null;
|
|
6
|
+
selectedElement?: SlideElement | null;
|
|
7
|
+
onSlideChange?: (id: string, patch: Partial<Omit<PresentationSlide, 'id' | 'elements'>>) => void;
|
|
8
|
+
onElementChange?: (slideId: string, elementId: string, patch: Partial<Omit<SlideElement, 'id'>>) => void;
|
|
9
|
+
onRemoveElement?: (slideId: string, elementId: string) => void;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const SlidePropertyPanel: React.FC<SlidePropertyPanelProps>;
|
|
13
|
+
//# sourceMappingURL=SlidePropertyPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SlidePropertyPanel.d.ts","sourceRoot":"","sources":["../../src/components/SlidePropertyPanel.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EACV,iBAAiB,EACjB,YAAY,EAGb,MAAM,4BAA4B,CAAC;AAYpC,MAAM,WAAW,uBAAuB;IACtC,KAAK,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACjC,eAAe,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IACtC,aAAa,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,IAAI,GAAG,UAAU,CAAC,CAAC,KAAK,IAAI,CAAC;IACjG,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC;IACzG,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAkLhE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { PresentationSlide, SlideSize, PresentationTheme } from '../types/presentationTypes';
|
|
3
|
+
|
|
4
|
+
export interface SlideThumbnailListProps {
|
|
5
|
+
slides: readonly PresentationSlide[];
|
|
6
|
+
slideSize: SlideSize;
|
|
7
|
+
theme: PresentationTheme;
|
|
8
|
+
currentIndex: number;
|
|
9
|
+
onSelectSlide: (index: number) => void;
|
|
10
|
+
onAddSlide?: () => void;
|
|
11
|
+
onDuplicateSlide?: (id: string) => void;
|
|
12
|
+
onRemoveSlide?: (id: string) => void;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const SlideThumbnailList: React.FC<SlideThumbnailListProps>;
|
|
16
|
+
//# sourceMappingURL=SlideThumbnailList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SlideThumbnailList.d.ts","sourceRoot":"","sources":["../../src/components/SlideThumbnailList.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAKlG,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACrC,SAAS,EAAE,SAAS,CAAC;IACrB,KAAK,EAAE,iBAAiB,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,gBAAgB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,aAAa,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA0FhE,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ButtonContent, ButtonAction } from '../../types/presentationTypes';
|
|
3
|
+
|
|
4
|
+
export interface InteractiveButtonProps {
|
|
5
|
+
content: ButtonContent;
|
|
6
|
+
/** Callback when button action is triggered */
|
|
7
|
+
onAction?: (action: ButtonAction) => void;
|
|
8
|
+
/** Whether the button is disabled */
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
/** Additional class name */
|
|
11
|
+
className?: string;
|
|
12
|
+
/** Theme from presentation */
|
|
13
|
+
theme?: {
|
|
14
|
+
primaryColor?: string;
|
|
15
|
+
accentColor?: string;
|
|
16
|
+
fontFamily?: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export declare const InteractiveButton: React.FC<InteractiveButtonProps>;
|
|
20
|
+
export default InteractiveButton;
|
|
21
|
+
//# sourceMappingURL=InteractiveButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InteractiveButton.d.ts","sourceRoot":"","sources":["../../../src/components/interactive/InteractiveButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAGjF,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,aAAa,CAAC;IACvB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAC1C,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8BAA8B;IAC9B,KAAK,CAAC,EAAE;QACN,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAqE9D,CAAC;AA6BF,eAAe,iBAAiB,CAAC"}
|