pptx-svelte-viewer 0.5.0 → 0.6.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/CHANGELOG.md +4 -0
- package/README.md +9 -6
- package/dist/{component-CtIGg1wg.js → component-NIMULjW3.js} +20923 -16749
- package/dist/i18n/context.d.ts +20 -0
- package/dist/i18n/context.d.ts.map +1 -0
- package/dist/i18n/index.d.ts +4 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/translator.d.ts +30 -0
- package/dist/i18n/translator.d.ts.map +1 -0
- package/dist/i18n.d.ts +56 -62
- package/dist/i18n.d.ts.map +1 -0
- package/dist/index.d.ts +765 -605
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -1
- package/dist/theme/index.d.ts +8 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/viewer/collab/collaboration-dialogs.svelte.d.ts +31 -0
- package/dist/viewer/collab/collaboration-dialogs.svelte.d.ts.map +1 -0
- package/dist/viewer/collab/collaboration-presence-effects.svelte.d.ts +9 -0
- package/dist/viewer/collab/collaboration-presence-effects.svelte.d.ts.map +1 -0
- package/dist/viewer/collab/collaboration-presence.svelte.d.ts +20 -0
- package/dist/viewer/collab/collaboration-presence.svelte.d.ts.map +1 -0
- package/dist/viewer/collab/collaboration-provider.d.ts +35 -0
- package/dist/viewer/collab/collaboration-provider.d.ts.map +1 -0
- package/dist/viewer/collab/collaboration-remote-sync.d.ts +12 -0
- package/dist/viewer/collab/collaboration-remote-sync.d.ts.map +1 -0
- package/dist/viewer/collab/collaboration-session.d.ts +24 -0
- package/dist/viewer/collab/collaboration-session.d.ts.map +1 -0
- package/dist/viewer/collab/collaboration-status.d.ts +14 -0
- package/dist/viewer/collab/collaboration-status.d.ts.map +1 -0
- package/dist/viewer/collab/collaboration.svelte.d.ts +55 -0
- package/dist/viewer/collab/collaboration.svelte.d.ts.map +1 -0
- package/dist/viewer/collab/components/props.d.ts +79 -0
- package/dist/viewer/collab/components/props.d.ts.map +1 -0
- package/dist/viewer/collab/components/share-helpers.d.ts +29 -0
- package/dist/viewer/collab/components/share-helpers.d.ts.map +1 -0
- package/dist/viewer/collab/index.d.ts +15 -0
- package/dist/viewer/collab/index.d.ts.map +1 -0
- package/dist/viewer/component.d.ts +13 -0
- package/dist/viewer/component.d.ts.map +1 -0
- package/dist/viewer/components/index.d.ts +7 -0
- package/dist/viewer/components/index.d.ts.map +1 -0
- package/dist/viewer/components/props.d.ts +185 -0
- package/dist/viewer/components/props.d.ts.map +1 -0
- package/dist/viewer/components/ribbon/animations/animation-categories.d.ts +10 -0
- package/dist/viewer/components/ribbon/animations/animation-categories.d.ts.map +1 -0
- package/dist/viewer/components/ribbon/design/theme-swatches.d.ts +16 -0
- package/dist/viewer/components/ribbon/design/theme-swatches.d.ts.map +1 -0
- package/dist/viewer/components/ribbon/insert/shape-glyphs.d.ts +8 -0
- package/dist/viewer/components/ribbon/insert/shape-glyphs.d.ts.map +1 -0
- package/dist/viewer/components/ribbon/ribbon-tabs.d.ts +17 -0
- package/dist/viewer/components/ribbon/ribbon-tabs.d.ts.map +1 -0
- package/dist/viewer/components/ribbon/ribbon-types.d.ts +67 -0
- package/dist/viewer/components/ribbon/ribbon-types.d.ts.map +1 -0
- package/dist/viewer/components/ribbon/transitions/transition-presets.d.ts +10 -0
- package/dist/viewer/components/ribbon/transitions/transition-presets.d.ts.map +1 -0
- package/dist/viewer/editor/editing-api.d.ts +20 -0
- package/dist/viewer/editor/editing-api.d.ts.map +1 -0
- package/dist/viewer/editor/editor-animation-controller.d.ts +25 -0
- package/dist/viewer/editor/editor-animation-controller.d.ts.map +1 -0
- package/dist/viewer/editor/editor-arrange-controller.d.ts +24 -0
- package/dist/viewer/editor/editor-arrange-controller.d.ts.map +1 -0
- package/dist/viewer/editor/editor-arrange-ops.d.ts +28 -0
- package/dist/viewer/editor/editor-arrange-ops.d.ts.map +1 -0
- package/dist/viewer/editor/editor-background-controller.d.ts +21 -0
- package/dist/viewer/editor/editor-background-controller.d.ts.map +1 -0
- package/dist/viewer/editor/editor-clipboard-controller.d.ts +18 -0
- package/dist/viewer/editor/editor-clipboard-controller.d.ts.map +1 -0
- package/dist/viewer/editor/editor-clipboard.d.ts +20 -0
- package/dist/viewer/editor/editor-clipboard.d.ts.map +1 -0
- package/dist/viewer/editor/editor-controller-geometry.d.ts +8 -0
- package/dist/viewer/editor/editor-controller-geometry.d.ts.map +1 -0
- package/dist/viewer/editor/editor-controller.svelte.d.ts +43 -0
- package/dist/viewer/editor/editor-controller.svelte.d.ts.map +1 -0
- package/dist/viewer/editor/editor-element-controller.d.ts +21 -0
- package/dist/viewer/editor/editor-element-controller.d.ts.map +1 -0
- package/dist/viewer/editor/editor-equation-controller.svelte.d.ts +12 -0
- package/dist/viewer/editor/editor-equation-controller.svelte.d.ts.map +1 -0
- package/dist/viewer/editor/editor-find-replace.svelte.d.ts +39 -0
- package/dist/viewer/editor/editor-find-replace.svelte.d.ts.map +1 -0
- package/dist/viewer/editor/editor-format-mutations.d.ts +39 -0
- package/dist/viewer/editor/editor-format-mutations.d.ts.map +1 -0
- package/dist/viewer/editor/editor-format-painter-controller.svelte.d.ts +13 -0
- package/dist/viewer/editor/editor-format-painter-controller.svelte.d.ts.map +1 -0
- package/dist/viewer/editor/editor-geometry.d.ts +29 -0
- package/dist/viewer/editor/editor-geometry.d.ts.map +1 -0
- package/dist/viewer/editor/editor-gestures.d.ts +48 -0
- package/dist/viewer/editor/editor-gestures.d.ts.map +1 -0
- package/dist/viewer/editor/editor-ink-controller.svelte.d.ts +59 -0
- package/dist/viewer/editor/editor-ink-controller.svelte.d.ts.map +1 -0
- package/dist/viewer/editor/editor-ink-gesture.d.ts +37 -0
- package/dist/viewer/editor/editor-ink-gesture.d.ts.map +1 -0
- package/dist/viewer/editor/editor-insert-action-button.d.ts +13 -0
- package/dist/viewer/editor/editor-insert-action-button.d.ts.map +1 -0
- package/dist/viewer/editor/editor-insert-chart.d.ts +10 -0
- package/dist/viewer/editor/editor-insert-chart.d.ts.map +1 -0
- package/dist/viewer/editor/editor-insert-equation.d.ts +5 -0
- package/dist/viewer/editor/editor-insert-equation.d.ts.map +1 -0
- package/dist/viewer/editor/editor-insert-field.d.ts +17 -0
- package/dist/viewer/editor/editor-insert-field.d.ts.map +1 -0
- package/dist/viewer/editor/editor-insert-media.d.ts +10 -0
- package/dist/viewer/editor/editor-insert-media.d.ts.map +1 -0
- package/dist/viewer/editor/editor-insert-smart-art.d.ts +8 -0
- package/dist/viewer/editor/editor-insert-smart-art.d.ts.map +1 -0
- package/dist/viewer/editor/editor-insert.d.ts +40 -0
- package/dist/viewer/editor/editor-insert.d.ts.map +1 -0
- package/dist/viewer/editor/editor-keyboard.d.ts +31 -0
- package/dist/viewer/editor/editor-keyboard.d.ts.map +1 -0
- package/dist/viewer/editor/editor-master-controller.d.ts +17 -0
- package/dist/viewer/editor/editor-master-controller.d.ts.map +1 -0
- package/dist/viewer/editor/editor-mutations.d.ts +59 -0
- package/dist/viewer/editor/editor-mutations.d.ts.map +1 -0
- package/dist/viewer/editor/editor-paragraph-mutations.d.ts +10 -0
- package/dist/viewer/editor/editor-paragraph-mutations.d.ts.map +1 -0
- package/dist/viewer/editor/editor-selection-gestures.d.ts +24 -0
- package/dist/viewer/editor/editor-selection-gestures.d.ts.map +1 -0
- package/dist/viewer/editor/editor-selection.svelte.d.ts +32 -0
- package/dist/viewer/editor/editor-selection.svelte.d.ts.map +1 -0
- package/dist/viewer/editor/editor-slide-ops.d.ts +23 -0
- package/dist/viewer/editor/editor-slide-ops.d.ts.map +1 -0
- package/dist/viewer/editor/editor-slides-controller.d.ts +22 -0
- package/dist/viewer/editor/editor-slides-controller.d.ts.map +1 -0
- package/dist/viewer/editor/editor-state.svelte.d.ts +102 -0
- package/dist/viewer/editor/editor-state.svelte.d.ts.map +1 -0
- package/dist/viewer/editor/editor-template-controller.d.ts +12 -0
- package/dist/viewer/editor/editor-template-controller.d.ts.map +1 -0
- package/dist/viewer/editor/editor-text-extra-mutations.d.ts +18 -0
- package/dist/viewer/editor/editor-text-extra-mutations.d.ts.map +1 -0
- package/dist/viewer/editor/editor-transition-controller.d.ts +22 -0
- package/dist/viewer/editor/editor-transition-controller.d.ts.map +1 -0
- package/dist/viewer/editor/editor-zorder.d.ts +16 -0
- package/dist/viewer/editor/editor-zorder.d.ts.map +1 -0
- package/dist/viewer/editor/element-hit.d.ts +17 -0
- package/dist/viewer/editor/element-hit.d.ts.map +1 -0
- package/dist/viewer/editor/index.d.ts +45 -0
- package/dist/viewer/editor/index.d.ts.map +1 -0
- package/dist/viewer/editor/inline-text.d.ts +36 -0
- package/dist/viewer/editor/inline-text.d.ts.map +1 -0
- package/dist/viewer/editor/types.d.ts +12 -0
- package/dist/viewer/editor/types.d.ts.map +1 -0
- package/dist/viewer/export/export-controller.svelte.d.ts +77 -0
- package/dist/viewer/export/export-controller.svelte.d.ts.map +1 -0
- package/dist/viewer/export/export-gif.d.ts +42 -0
- package/dist/viewer/export/export-gif.d.ts.map +1 -0
- package/dist/viewer/export/export-print.d.ts +55 -0
- package/dist/viewer/export/export-print.d.ts.map +1 -0
- package/dist/viewer/export/export-ui.svelte.d.ts +45 -0
- package/dist/viewer/export/export-ui.svelte.d.ts.map +1 -0
- package/dist/viewer/export/export-video.d.ts +56 -0
- package/dist/viewer/export/export-video.d.ts.map +1 -0
- package/dist/viewer/export/export-wiring.svelte.d.ts +35 -0
- package/dist/viewer/export/export-wiring.svelte.d.ts.map +1 -0
- package/dist/viewer/export/exporting-api.d.ts +19 -0
- package/dist/viewer/export/exporting-api.d.ts.map +1 -0
- package/dist/viewer/export/index.d.ts +16 -0
- package/dist/viewer/export/index.d.ts.map +1 -0
- package/dist/viewer/export/rasterize-slide.d.ts +44 -0
- package/dist/viewer/export/rasterize-slide.d.ts.map +1 -0
- package/dist/viewer/export/render-to-canvas.d.ts +15 -0
- package/dist/viewer/export/render-to-canvas.d.ts.map +1 -0
- package/dist/viewer/index.d.ts +7536 -7597
- package/dist/viewer/index.d.ts.map +1 -0
- package/dist/viewer/index.js +1 -1
- package/dist/viewer/master/master-view.d.ts +7 -0
- package/dist/viewer/master/master-view.d.ts.map +1 -0
- package/dist/viewer/presentation/animation-playback.svelte.d.ts +57 -0
- package/dist/viewer/presentation/animation-playback.svelte.d.ts.map +1 -0
- package/dist/viewer/presentation/apply-animation-styles.d.ts +8 -0
- package/dist/viewer/presentation/apply-animation-styles.d.ts.map +1 -0
- package/dist/viewer/presentation/index.d.ts +10 -0
- package/dist/viewer/presentation/index.d.ts.map +1 -0
- package/dist/viewer/presentation/keyframes.d.ts +3 -0
- package/dist/viewer/presentation/keyframes.d.ts.map +1 -0
- package/dist/viewer/presentation/presentation-controller.svelte.d.ts +69 -0
- package/dist/viewer/presentation/presentation-controller.svelte.d.ts.map +1 -0
- package/dist/viewer/presentation/presentation-effects.svelte.d.ts +31 -0
- package/dist/viewer/presentation/presentation-effects.svelte.d.ts.map +1 -0
- package/dist/viewer/render/chart-view.d.ts +35 -0
- package/dist/viewer/render/chart-view.d.ts.map +1 -0
- package/dist/viewer/render/contentpart-view.d.ts +24 -0
- package/dist/viewer/render/contentpart-view.d.ts.map +1 -0
- package/dist/viewer/render/index.d.ts +25 -0
- package/dist/viewer/render/index.d.ts.map +1 -0
- package/dist/viewer/render/ink-view.d.ts +25 -0
- package/dist/viewer/render/ink-view.d.ts.map +1 -0
- package/dist/viewer/render/media-view.d.ts +17 -0
- package/dist/viewer/render/media-view.d.ts.map +1 -0
- package/dist/viewer/render/model3d-view.d.ts +16 -0
- package/dist/viewer/render/model3d-view.d.ts.map +1 -0
- package/dist/viewer/render/ole-view.d.ts +44 -0
- package/dist/viewer/render/ole-view.d.ts.map +1 -0
- package/dist/viewer/render/smart-art-3d-view.d.ts +18 -0
- package/dist/viewer/render/smart-art-3d-view.d.ts.map +1 -0
- package/dist/viewer/render/smartart-view.d.ts +54 -0
- package/dist/viewer/render/smartart-view.d.ts.map +1 -0
- package/dist/viewer/render/table-view.d.ts +39 -0
- package/dist/viewer/render/table-view.d.ts.map +1 -0
- package/dist/viewer/render/zoom-view.d.ts +18 -0
- package/dist/viewer/render/zoom-view.d.ts.map +1 -0
- package/dist/viewer/state/autosave.svelte.d.ts +61 -0
- package/dist/viewer/state/autosave.svelte.d.ts.map +1 -0
- package/dist/viewer/state/fullscreen.d.ts +16 -0
- package/dist/viewer/state/fullscreen.d.ts.map +1 -0
- package/dist/viewer/state/index.d.ts +9 -0
- package/dist/viewer/state/index.d.ts.map +1 -0
- package/dist/viewer/state/layout-state.svelte.d.ts +30 -0
- package/dist/viewer/state/layout-state.svelte.d.ts.map +1 -0
- package/dist/viewer/state/loader-helpers.d.ts +27 -0
- package/dist/viewer/state/loader-helpers.d.ts.map +1 -0
- package/dist/viewer/state/navigation.d.ts +26 -0
- package/dist/viewer/state/navigation.d.ts.map +1 -0
- package/dist/viewer/state/presentation-loader.svelte.d.ts +41 -0
- package/dist/viewer/state/presentation-loader.svelte.d.ts.map +1 -0
- package/dist/viewer/state/render-context.d.ts +9 -0
- package/dist/viewer/state/render-context.d.ts.map +1 -0
- package/dist/viewer/state/smart-art-3d-context.d.ts +22 -0
- package/dist/viewer/state/smart-art-3d-context.d.ts.map +1 -0
- package/dist/viewer/state/viewer-effects.svelte.d.ts +31 -0
- package/dist/viewer/state/viewer-effects.svelte.d.ts.map +1 -0
- package/dist/viewer/state/viewer-state.svelte.d.ts +36 -0
- package/dist/viewer/state/viewer-state.svelte.d.ts.map +1 -0
- package/dist/viewer/state/viewport-handlers.d.ts +24 -0
- package/dist/viewer/state/viewport-handlers.d.ts.map +1 -0
- package/dist/viewer/style/connector-label.d.ts +13 -0
- package/dist/viewer/style/connector-label.d.ts.map +1 -0
- package/dist/viewer/style/css.d.ts +13 -0
- package/dist/viewer/style/css.d.ts.map +1 -0
- package/dist/viewer/style/element-style.d.ts +26 -0
- package/dist/viewer/style/element-style.d.ts.map +1 -0
- package/dist/viewer/style/index.d.ts +5 -0
- package/dist/viewer/style/index.d.ts.map +1 -0
- package/dist/viewer/style/merge-3d.d.ts +10 -0
- package/dist/viewer/style/merge-3d.d.ts.map +1 -0
- package/dist/viewer/style/text-style.d.ts +4 -0
- package/dist/viewer/style/text-style.d.ts.map +1 -0
- package/dist/viewer/types.d.ts +189 -0
- package/dist/viewer/types.d.ts.map +1 -0
- package/package.json +6 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EACX,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,GACZ,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACX,UAAU,EACV,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,WAAW,GACX,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAIrE,OAAO,EACN,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EACN,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,GACf,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAC9C,YAAY,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as a, b as e, d as o, f as r, g as t, h as i, l, m, p as n, t as h, u, v, y as p } from "./component-
|
|
1
|
+
import { _ as a, b as e, d as o, f as r, g as t, h as i, l, m, p as n, t as h, u, v, y as p } from "./component-NIMULjW3.js";
|
|
2
2
|
import { r as f } from "./translator-nTmCzaSH.js";
|
|
3
3
|
import "./i18n.js";
|
|
4
4
|
export {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme surface for the Svelte binding: a direct re-export of the shared,
|
|
3
|
+
* framework-agnostic `ViewerTheme` system (types, defaults, CSS-variable
|
|
4
|
+
* helpers, and the Vermilion presets), mirroring the Vue package.
|
|
5
|
+
*/
|
|
6
|
+
export type { ViewerTheme, ViewerThemeColors } from 'pptx-viewer-shared';
|
|
7
|
+
export { defaultCssVars, defaultRadius, defaultThemeColors, themeToCssVars, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius, } from 'pptx-viewer-shared';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EACN,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,GACf,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BroadcastConfig, CollaborationConfig } from 'pptx-viewer-shared';
|
|
2
|
+
import { CollaborationController } from './collaboration.svelte';
|
|
3
|
+
/** Prefilled values for the Share dialog's form (Broadcast reuses `serverUrl`). */
|
|
4
|
+
export interface ShareDefaultsInput {
|
|
5
|
+
roomId?: string;
|
|
6
|
+
userName?: string;
|
|
7
|
+
serverUrl?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class CollaborationDialogsState {
|
|
10
|
+
#private;
|
|
11
|
+
shareOpen: boolean;
|
|
12
|
+
broadcastOpen: boolean;
|
|
13
|
+
constructor(collab: CollaborationController, getShareDefaults: () => ShareDefaultsInput | undefined);
|
|
14
|
+
/** Number of connected participants (including the local user), when active. */
|
|
15
|
+
get connectedCount(): number;
|
|
16
|
+
/** The shareable follow link for the current (or last) broadcast, once known. */
|
|
17
|
+
get broadcastViewerUrl(): string | undefined;
|
|
18
|
+
openShare(): void;
|
|
19
|
+
openBroadcast(): void;
|
|
20
|
+
readonly onShareStart: (config: CollaborationConfig) => void;
|
|
21
|
+
readonly onShareStop: () => void;
|
|
22
|
+
readonly onBroadcastStart: (config: BroadcastConfig) => void;
|
|
23
|
+
readonly onBroadcastStop: () => void;
|
|
24
|
+
/**
|
|
25
|
+
* Retry the active session after a connection error: prefers the host's
|
|
26
|
+
* live `collaboration` prop, falling back to whatever config either dialog
|
|
27
|
+
* last started (since a dialog-started session has no corresponding prop).
|
|
28
|
+
*/
|
|
29
|
+
retry(propConfig: CollaborationConfig | undefined): void;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=collaboration-dialogs.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collaboration-dialogs.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/collab/collaboration-dialogs.svelte.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAG/E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEtE,mFAAmF;AACnF,MAAM,WAAW,kBAAkB;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,qBAAa,yBAAyB;;IACrC,SAAS,UAAiB;IAC1B,aAAa,UAAiB;gBAS7B,MAAM,EAAE,uBAAuB,EAC/B,gBAAgB,EAAE,MAAM,kBAAkB,GAAG,SAAS;IAMvD,gFAAgF;IAChF,IAAI,cAAc,IAAI,MAAM,CAE3B;IAED,iFAAiF;IACjF,IAAI,kBAAkB,IAAI,MAAM,GAAG,SAAS,CAS3C;IAED,SAAS,IAAI,IAAI;IAIjB,aAAa,IAAI,IAAI;IAIrB,QAAQ,CAAC,YAAY,GAAI,QAAQ,mBAAmB,KAAG,IAAI,CAKzD;IAEF,QAAQ,CAAC,WAAW,QAAO,IAAI,CAG7B;IAEF,QAAQ,CAAC,gBAAgB,GAAI,QAAQ,eAAe,KAAG,IAAI,CAUzD;IAEF,QAAQ,CAAC,eAAe,QAAO,IAAI,CAIjC;IAEF;;;;OAIG;IACH,KAAK,CAAC,UAAU,EAAE,mBAAmB,GAAG,SAAS,GAAG,IAAI;CAMxD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CollaborationController } from './collaboration.svelte';
|
|
2
|
+
export interface CollaborationPresenceEffectsDeps {
|
|
3
|
+
collab: CollaborationController;
|
|
4
|
+
getCurrentSlide: () => number;
|
|
5
|
+
getSelectedElementId: () => string | null;
|
|
6
|
+
goTo: (index: number) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function useCollaborationPresenceEffects(deps: CollaborationPresenceEffectsDeps): void;
|
|
9
|
+
//# sourceMappingURL=collaboration-presence-effects.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collaboration-presence-effects.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/collab/collaboration-presence-effects.svelte.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEtE,MAAM,WAAW,gCAAgC;IAChD,MAAM,EAAE,uBAAuB,CAAC;IAChC,eAAe,EAAE,MAAM,MAAM,CAAC;IAC9B,oBAAoB,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IAC1C,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9B;AAED,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,gCAAgC,GAAG,IAAI,CAuB5F"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AwarenessLike, PresenceIdentity, RemoteCursor, SanitizedPresence } from 'pptx-viewer-shared';
|
|
2
|
+
export declare class CollaborationPresence {
|
|
3
|
+
#private;
|
|
4
|
+
cursors: RemoteCursor[];
|
|
5
|
+
remotePresences: SanitizedPresence[];
|
|
6
|
+
followedClientId: number | null;
|
|
7
|
+
constructor(getCanvasSize: () => {
|
|
8
|
+
width?: number;
|
|
9
|
+
height?: number;
|
|
10
|
+
});
|
|
11
|
+
/** Begin publishing/projecting presence for a live session. Call `stop()` first if already active. */
|
|
12
|
+
start(awareness: AwarenessLike, identity: PresenceIdentity): void;
|
|
13
|
+
/** Stop publishing and clear all reactive presence state. */
|
|
14
|
+
stop(): void;
|
|
15
|
+
setCursor(x: number, y: number, activeSlideIndex?: number): void;
|
|
16
|
+
setSelection(selectedElementId: string | undefined, activeSlideIndex?: number): void;
|
|
17
|
+
setActiveSlide(index: number): void;
|
|
18
|
+
followUser(clientId: number | null): void;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=collaboration-presence.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collaboration-presence.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/collab/collaboration-presence.svelte.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EACX,aAAa,EACb,gBAAgB,EAEhB,YAAY,EACZ,iBAAiB,EACjB,MAAM,oBAAoB,CAAC;AAc5B,qBAAa,qBAAqB;;IACjC,OAAO,iBAA8B;IACrC,eAAe,sBAAmC;IAClD,gBAAgB,gBAA+B;gBASnC,aAAa,EAAE,MAAM;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE;IAIpE,sGAAsG;IACtG,KAAK,CAAC,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IAWjE,6DAA6D;IAC7D,IAAI,IAAI,IAAI;IAiBZ,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,gBAAgB,GAAE,MAA+B,GAAG,IAAI;IAKxF,YAAY,CACX,iBAAiB,EAAE,MAAM,GAAG,SAAS,EACrC,gBAAgB,GAAE,MAA+B,GAC/C,IAAI;IAKP,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAMnC,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;CAqBzC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { AwarenessLike, CollaborationConfig, CollaborationTransport } from 'pptx-viewer-shared';
|
|
2
|
+
/** A transport-agnostic view of a live Yjs provider. */
|
|
3
|
+
export interface CollabProviderHandle {
|
|
4
|
+
/** The provider's awareness instance (local/remote presence). */
|
|
5
|
+
awareness: AwarenessLike;
|
|
6
|
+
/**
|
|
7
|
+
* Subscribe to connection-status changes. The callback receives whether the
|
|
8
|
+
* transport currently reports a connection. Only meaningful for websocket;
|
|
9
|
+
* webrtc callers rely on {@link connectedNow} instead.
|
|
10
|
+
*/
|
|
11
|
+
onStatus: (cb: (connected: boolean) => void) => void;
|
|
12
|
+
/** Whether the transport reports a connection immediately after creation. */
|
|
13
|
+
connectedNow: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Subscribe to the provider's initial-document-sync confirmation. Websocket
|
|
16
|
+
* fires reliably once the server sync completes; webrtc only fires when a
|
|
17
|
+
* peer syncs with us (a lone fresh-room peer never receives one, so callers
|
|
18
|
+
* pair this with a grace timer, see the shared createSyncGate).
|
|
19
|
+
*/
|
|
20
|
+
onSynced: (cb: () => void) => void;
|
|
21
|
+
/** Whether the provider already reports its initial sync as complete. */
|
|
22
|
+
syncedNow: boolean;
|
|
23
|
+
/** Tear the provider down (disconnect + destroy). */
|
|
24
|
+
destroy: () => void;
|
|
25
|
+
}
|
|
26
|
+
/** The minimal Y.Doc surface both providers accept. */
|
|
27
|
+
type YDocInput = ConstructorParameters<typeof import('y-websocket').WebsocketProvider>[2];
|
|
28
|
+
/**
|
|
29
|
+
* Create and return a normalised provider handle for the requested transport.
|
|
30
|
+
* Callers must destroy any previous provider first: y-webrtc throws when the
|
|
31
|
+
* same room is joined twice within one page.
|
|
32
|
+
*/
|
|
33
|
+
export declare function createCollabProvider(transport: CollaborationTransport, config: CollaborationConfig, doc: YDocInput): Promise<CollabProviderHandle>;
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=collaboration-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collaboration-provider.d.ts","sourceRoot":"","sources":["../../../src/viewer/collab/collaboration-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EACX,aAAa,EACb,mBAAmB,EACnB,sBAAsB,EACtB,MAAM,oBAAoB,CAAC;AAE5B,wDAAwD;AACxD,MAAM,WAAW,oBAAoB;IACpC,iEAAiE;IACjE,SAAS,EAAE,aAAa,CAAC;IACzB;;;;OAIG;IACH,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,KAAK,IAAI,CAAC;IACrD,6EAA6E;IAC7E,YAAY,EAAE,OAAO,CAAC;IACtB;;;;;OAKG;IACH,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;IACnC,yEAAyE;IACzE,SAAS,EAAE,OAAO,CAAC;IACnB,qDAAqD;IACrD,OAAO,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,uDAAuD;AACvD,KAAK,SAAS,GAAG,qBAAqB,CAAC,cAAc,aAAa,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;AAE1F;;;;GAIG;AACH,wBAAsB,oBAAoB,CACzC,SAAS,EAAE,sBAAsB,EACjC,MAAM,EAAE,mBAAmB,EAC3B,GAAG,EAAE,SAAS,GACZ,OAAO,CAAC,oBAAoB,CAAC,CAiD/B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PptxSlide } from 'pptx-viewer-core';
|
|
2
|
+
import { CollaborationConfig, YDocLike } from 'pptx-viewer-shared';
|
|
3
|
+
export interface ObserveRemoteDeps {
|
|
4
|
+
isApplyingRemote: () => boolean;
|
|
5
|
+
setApplyingRemote: (value: boolean) => void;
|
|
6
|
+
setLastSynced: (value: string) => void;
|
|
7
|
+
applyRemoteSlides: (slides: PptxSlide[]) => void;
|
|
8
|
+
scheduleWriteBack: (config: CollaborationConfig) => void;
|
|
9
|
+
}
|
|
10
|
+
/** Register the remote-slide observer; returns the unobserve function. */
|
|
11
|
+
export declare function observeRemoteSlides(ydoc: YDocLike, config: CollaborationConfig, deps: ObserveRemoteDeps): () => void;
|
|
12
|
+
//# sourceMappingURL=collaboration-remote-sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collaboration-remote-sync.d.ts","sourceRoot":"","sources":["../../../src/viewer/collab/collaboration-remote-sync.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAGxE,MAAM,WAAW,iBAAiB;IACjC,gBAAgB,EAAE,MAAM,OAAO,CAAC;IAChC,iBAAiB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,iBAAiB,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,IAAI,CAAC;IACjD,iBAAiB,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAC;CACzD;AAED,0EAA0E;AAC1E,wBAAgB,mBAAmB,CAClC,IAAI,EAAE,QAAQ,EACd,MAAM,EAAE,mBAAmB,EAC3B,IAAI,EAAE,iBAAiB,GACrB,MAAM,IAAI,CAgBZ"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CollaborationConfig, CollaborationTransport, YDocLike, YjsFactories } from 'pptx-viewer-shared';
|
|
2
|
+
import { CollabProviderHandle } from './collaboration-provider';
|
|
3
|
+
/** A fully-wired collaboration session: the doc, its factories, and transport. */
|
|
4
|
+
export interface CollabSession {
|
|
5
|
+
/** The live Y.Doc (structural view used by the shared reconcile helpers). */
|
|
6
|
+
ydoc: YDocLike;
|
|
7
|
+
/** Factories the shared reconcile helpers use to build Y.Map/Array/Text. */
|
|
8
|
+
factories: YjsFactories;
|
|
9
|
+
/** The normalised transport provider handle. */
|
|
10
|
+
provider: CollabProviderHandle;
|
|
11
|
+
/** Tear down the provider and destroy the doc. */
|
|
12
|
+
destroy: () => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Build a live session for the given transport + config. Injectable so tests
|
|
16
|
+
* can substitute an in-memory fake (see `collaboration.svelte.ts`).
|
|
17
|
+
*/
|
|
18
|
+
export type CollabSessionFactory = (transport: CollaborationTransport, config: CollaborationConfig) => Promise<CollabSession>;
|
|
19
|
+
/**
|
|
20
|
+
* Default factory: dynamically import `yjs`, build a `Y.Doc` plus the
|
|
21
|
+
* `YjsFactories`, and attach the requested transport provider.
|
|
22
|
+
*/
|
|
23
|
+
export declare const createDefaultSession: CollabSessionFactory;
|
|
24
|
+
//# sourceMappingURL=collaboration-session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collaboration-session.d.ts","sourceRoot":"","sources":["../../../src/viewer/collab/collaboration-session.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EACX,mBAAmB,EACnB,sBAAsB,EACtB,QAAQ,EACR,YAAY,EACZ,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGrE,kFAAkF;AAClF,MAAM,WAAW,aAAa;IAC7B,6EAA6E;IAC7E,IAAI,EAAE,QAAQ,CAAC;IACf,4EAA4E;IAC5E,SAAS,EAAE,YAAY,CAAC;IACxB,gDAAgD;IAChD,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,kDAAkD;IAClD,OAAO,EAAE,MAAM,IAAI,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAClC,SAAS,EAAE,sBAAsB,EACjC,MAAM,EAAE,mBAAmB,KACvB,OAAO,CAAC,aAAa,CAAC,CAAC;AAE5B;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,oBAkBlC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ConnectionStatus, SyncGate } from 'pptx-viewer-shared';
|
|
2
|
+
import { CollabProviderHandle } from './collaboration-provider';
|
|
3
|
+
export interface WireStatusDeps {
|
|
4
|
+
setStatus: (status: ConnectionStatus) => void;
|
|
5
|
+
getStatus: () => ConnectionStatus;
|
|
6
|
+
isActive: () => boolean;
|
|
7
|
+
stop: () => void;
|
|
8
|
+
gate: SyncGate;
|
|
9
|
+
setConnectTimer: (timer: ReturnType<typeof setTimeout> | null) => void;
|
|
10
|
+
getConnectTimer: () => ReturnType<typeof setTimeout> | null;
|
|
11
|
+
}
|
|
12
|
+
/** Wire the provider status events + (websocket-only) connection timeout. */
|
|
13
|
+
export declare function wireProviderStatus(provider: CollabProviderHandle, transport: string, deps: WireStatusDeps): void;
|
|
14
|
+
//# sourceMappingURL=collaboration-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collaboration-status.d.ts","sourceRoot":"","sources":["../../../src/viewer/collab/collaboration-status.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAGrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAErE,MAAM,WAAW,cAAc;IAC9B,SAAS,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC9C,SAAS,EAAE,MAAM,gBAAgB,CAAC;IAClC,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,IAAI,EAAE,QAAQ,CAAC;IACf,eAAe,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IACvE,eAAe,EAAE,MAAM,UAAU,CAAC,OAAO,UAAU,CAAC,GAAG,IAAI,CAAC;CAC5D;AAED,6EAA6E;AAC7E,wBAAgB,kBAAkB,CACjC,QAAQ,EAAE,oBAAoB,EAC9B,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,cAAc,GAClB,IAAI,CAgDN"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { PptxSlide } from 'pptx-viewer-core';
|
|
2
|
+
import { CollaborationConfig, ConnectionStatus, RemoteCursor, SanitizedPresence } from 'pptx-viewer-shared';
|
|
3
|
+
import { CollabSessionFactory } from './collaboration-session';
|
|
4
|
+
export interface CollaborationDeps {
|
|
5
|
+
/** Read the current local slides (broadcast granularly on change). */
|
|
6
|
+
getSlides: () => PptxSlide[];
|
|
7
|
+
/** Apply a remote peer's slide snapshot into the editable slides. */
|
|
8
|
+
applyRemoteSlides: (slides: PptxSlide[]) => void;
|
|
9
|
+
/** Live host `collaboration` config; watched to auto start/stop a session. */
|
|
10
|
+
getConfig: () => CollaborationConfig | undefined;
|
|
11
|
+
/** Return the loaded source bytes for elected-writer (role 'owner') write-back. */
|
|
12
|
+
getSourceBytes?: () => Uint8Array | null;
|
|
13
|
+
/** Slide canvas width/height (unscaled px), used to clamp incoming cursor coordinates. */
|
|
14
|
+
getCanvasWidth?: () => number | undefined;
|
|
15
|
+
getCanvasHeight?: () => number | undefined;
|
|
16
|
+
/** Fired when a session starts (host observability). */
|
|
17
|
+
onStart?: (config: CollaborationConfig) => void;
|
|
18
|
+
/** Fired when a session stops (host observability). */
|
|
19
|
+
onStop?: () => void;
|
|
20
|
+
/** Session factory seam (defaults to the real yjs + transport wiring). */
|
|
21
|
+
createSession?: CollabSessionFactory;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The collaboration controller. Construct it once during component setup: it
|
|
25
|
+
* registers the two effects (auto start/stop from the config, granular publish
|
|
26
|
+
* of local edits) itself, so no further wiring is needed in the SFC.
|
|
27
|
+
*/
|
|
28
|
+
export declare class CollaborationController {
|
|
29
|
+
#private;
|
|
30
|
+
/** Live connection status (reactive). */
|
|
31
|
+
status: ConnectionStatus;
|
|
32
|
+
constructor(deps: CollaborationDeps);
|
|
33
|
+
/** Whether a session is live (reactive). */
|
|
34
|
+
get active(): boolean;
|
|
35
|
+
/** Read-only participant (session live with the `viewer` role) - cannot select/drag/mutate. */
|
|
36
|
+
get readOnly(): boolean;
|
|
37
|
+
/** Remote cursors on the current slide (reactive). */
|
|
38
|
+
get cursors(): RemoteCursor[];
|
|
39
|
+
/** Remote collaborators in the session (reactive). */
|
|
40
|
+
get remotePresences(): SanitizedPresence[];
|
|
41
|
+
/** Followed peer's client id, or null when free (reactive). */
|
|
42
|
+
get followedClientId(): number | null;
|
|
43
|
+
/** Publish a cursor move (slide-space px); no-op when no session is active. */
|
|
44
|
+
setCursor(x: number, y: number, activeSlideIndex?: number): void;
|
|
45
|
+
/** Publish the local selection; no-op when no session is active. */
|
|
46
|
+
setSelection(selectedElementId: string | undefined, activeSlideIndex?: number): void;
|
|
47
|
+
/** Publish the local active-slide index (drives peer follow-along). */
|
|
48
|
+
setActiveSlide(index: number): void;
|
|
49
|
+
/** Follow the given peer's active slide, or `null` to stop following. */
|
|
50
|
+
followUser(clientId: number | null): void;
|
|
51
|
+
/** Start (or restart) a session with the given config (dialog-driven). */
|
|
52
|
+
start(config: CollaborationConfig): Promise<void>;
|
|
53
|
+
stop(): void;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=collaboration.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collaboration.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/collab/collaboration.svelte.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EACX,mBAAmB,EACnB,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EAGjB,MAAM,oBAAoB,CAAC;AAc5B,OAAO,KAAK,EAAiB,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAInF,MAAM,WAAW,iBAAiB;IACjC,sEAAsE;IACtE,SAAS,EAAE,MAAM,SAAS,EAAE,CAAC;IAC7B,qEAAqE;IACrE,iBAAiB,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,IAAI,CAAC;IACjD,8EAA8E;IAC9E,SAAS,EAAE,MAAM,mBAAmB,GAAG,SAAS,CAAC;IACjD,mFAAmF;IACnF,cAAc,CAAC,EAAE,MAAM,UAAU,GAAG,IAAI,CAAC;IACzC,0FAA0F;IAC1F,cAAc,CAAC,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;IAC1C,eAAe,CAAC,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;IAC3C,wDAAwD;IACxD,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAChD,uDAAuD;IACvD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,0EAA0E;IAC1E,aAAa,CAAC,EAAE,oBAAoB,CAAC;CACrC;AAED;;;;GAIG;AACH,qBAAa,uBAAuB;;IACnC,yCAAyC;IACzC,MAAM,mBAA4C;gBA0BtC,IAAI,EAAE,iBAAiB;IAyBnC,4CAA4C;IAC5C,IAAI,MAAM,IAAI,OAAO,CAEpB;IACD,+FAA+F;IAC/F,IAAI,QAAQ,IAAI,OAAO,CAEtB;IACD,sDAAsD;IACtD,IAAI,OAAO,IAAI,YAAY,EAAE,CAE5B;IACD,sDAAsD;IACtD,IAAI,eAAe,IAAI,iBAAiB,EAAE,CAEzC;IACD,+DAA+D;IAC/D,IAAI,gBAAgB,IAAI,MAAM,GAAG,IAAI,CAEpC;IAED,+EAA+E;IAC/E,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI;IAGhE,oEAAoE;IACpE,YAAY,CAAC,iBAAiB,EAAE,MAAM,GAAG,SAAS,EAAE,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI;IAGpF,uEAAuE;IACvE,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAGnC,yEAAyE;IACzE,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IA6CzC,0EAA0E;IACpE,KAAK,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAwFvD,IAAI,IAAI,IAAI;CAmBZ"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { BroadcastConfig, BroadcastDefaults, CollaborationConfig, ConnectionStatus, RemoteCursor, SanitizedPresence } from 'pptx-viewer-shared';
|
|
2
|
+
import { Snippet } from 'svelte';
|
|
3
|
+
import { ShareDefaults } from './share-helpers';
|
|
4
|
+
/**
|
|
5
|
+
* Prop contracts for the collaboration dialogs/overlays. Kept in a plain
|
|
6
|
+
* `.ts` module (not inside the SFCs) per repo convention: SFCs stay thin
|
|
7
|
+
* presentation, logic and types live in lintable TypeScript files.
|
|
8
|
+
*/
|
|
9
|
+
/** Props for the reusable modal shell. */
|
|
10
|
+
export interface ModalDialogProps {
|
|
11
|
+
/** Whether the dialog is visible. */
|
|
12
|
+
open: boolean;
|
|
13
|
+
/** Optional heading shown in the header bar. */
|
|
14
|
+
title?: string;
|
|
15
|
+
/** Fired on backdrop click, the close button, or Escape. */
|
|
16
|
+
onclose: () => void;
|
|
17
|
+
/** Dialog body. */
|
|
18
|
+
children?: Snippet;
|
|
19
|
+
/** Optional footer (action buttons), right-aligned. */
|
|
20
|
+
footer?: Snippet;
|
|
21
|
+
}
|
|
22
|
+
/** Props for the share (collaboration) dialog. */
|
|
23
|
+
export interface ShareDialogProps {
|
|
24
|
+
/** Whether the dialog is visible. */
|
|
25
|
+
open: boolean;
|
|
26
|
+
/** Prefilled values for the form fields. */
|
|
27
|
+
defaults?: ShareDefaults;
|
|
28
|
+
/** Whether a collaboration session is currently active. */
|
|
29
|
+
active: boolean;
|
|
30
|
+
/** Fired with the assembled config when the user starts sharing. */
|
|
31
|
+
onstart: (config: CollaborationConfig) => void;
|
|
32
|
+
/** Fired when the user stops an active session. */
|
|
33
|
+
onstop: () => void;
|
|
34
|
+
/** Fired when the dialog is dismissed. */
|
|
35
|
+
onclose: () => void;
|
|
36
|
+
}
|
|
37
|
+
/** Props for the one-way broadcast dialog. */
|
|
38
|
+
export interface BroadcastDialogProps {
|
|
39
|
+
/** Whether the dialog is visible. */
|
|
40
|
+
open: boolean;
|
|
41
|
+
/** Optional `{ roomId, serverUrl }` seed for the start form. */
|
|
42
|
+
defaults?: BroadcastDefaults;
|
|
43
|
+
/** Whether a broadcast is currently running. */
|
|
44
|
+
active: boolean;
|
|
45
|
+
/** The shareable follow link, shown while `active`. */
|
|
46
|
+
viewerUrl?: string;
|
|
47
|
+
/** Fired with the assembled config when the presenter starts broadcasting. */
|
|
48
|
+
onstart: (config: BroadcastConfig) => void;
|
|
49
|
+
/** Fired when the presenter stops the active broadcast. */
|
|
50
|
+
onstop: () => void;
|
|
51
|
+
/** Fired when the dialog is dismissed. */
|
|
52
|
+
onclose: () => void;
|
|
53
|
+
}
|
|
54
|
+
/** Props for the remote-cursor overlay. */
|
|
55
|
+
export interface CollaborationCursorsProps {
|
|
56
|
+
/** Remote collaborators to render, in unscaled slide coordinates. */
|
|
57
|
+
cursors: RemoteCursor[];
|
|
58
|
+
/** Current canvas zoom factor; cursor positions scale by this. */
|
|
59
|
+
zoom: number;
|
|
60
|
+
}
|
|
61
|
+
/** Props for the connection status pill. */
|
|
62
|
+
export interface CollaborationStatusIndicatorProps {
|
|
63
|
+
/** Current connection status. */
|
|
64
|
+
status: ConnectionStatus;
|
|
65
|
+
/** Number of connected participants (including the local user). */
|
|
66
|
+
connectedCount: number;
|
|
67
|
+
/** The user asked to retry after a connection error. */
|
|
68
|
+
onretry: () => void;
|
|
69
|
+
}
|
|
70
|
+
/** Props for the follow-mode peer bar. */
|
|
71
|
+
export interface FollowModeBarProps {
|
|
72
|
+
/** Active remote collaborators (excludes self). */
|
|
73
|
+
presences: SanitizedPresence[];
|
|
74
|
+
/** The clientId currently being followed, or null. */
|
|
75
|
+
followedClientId: number | null;
|
|
76
|
+
/** Follow the given peer, or `null` to stop following. */
|
|
77
|
+
onfollow: (clientId: number | null) => void;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../../src/viewer/collab/components/props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD;;;;GAIG;AAEH,0CAA0C;AAC1C,MAAM,WAAW,gBAAgB;IAChC,qCAAqC;IACrC,IAAI,EAAE,OAAO,CAAC;IACd,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,mBAAmB;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uDAAuD;IACvD,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,kDAAkD;AAClD,MAAM,WAAW,gBAAgB;IAChC,qCAAqC;IACrC,IAAI,EAAE,OAAO,CAAC;IACd,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,2DAA2D;IAC3D,MAAM,EAAE,OAAO,CAAC;IAChB,oEAAoE;IACpE,OAAO,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC/C,mDAAmD;IACnD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,0CAA0C;IAC1C,OAAO,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,8CAA8C;AAC9C,MAAM,WAAW,oBAAoB;IACpC,qCAAqC;IACrC,IAAI,EAAE,OAAO,CAAC;IACd,gEAAgE;IAChE,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,gDAAgD;IAChD,MAAM,EAAE,OAAO,CAAC;IAChB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8EAA8E;IAC9E,OAAO,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAC3C,2DAA2D;IAC3D,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,0CAA0C;IAC1C,OAAO,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,2CAA2C;AAC3C,MAAM,WAAW,yBAAyB;IACzC,qEAAqE;IACrE,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,kEAAkE;IAClE,IAAI,EAAE,MAAM,CAAC;CACb;AAED,4CAA4C;AAC5C,MAAM,WAAW,iCAAiC;IACjD,iCAAiC;IACjC,MAAM,EAAE,gBAAgB,CAAC;IACzB,mEAAmE;IACnE,cAAc,EAAE,MAAM,CAAC;IACvB,wDAAwD;IACxD,OAAO,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,0CAA0C;AAC1C,MAAM,WAAW,kBAAkB;IAClC,mDAAmD;IACnD,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAC/B,sDAAsD;IACtD,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,0DAA0D;IAC1D,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAC5C"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { CollaborationConfig } from 'pptx-viewer-shared';
|
|
2
|
+
/** The share form's editable fields. */
|
|
3
|
+
export interface ShareFormFields {
|
|
4
|
+
roomId: string;
|
|
5
|
+
userName: string;
|
|
6
|
+
serverUrl: string;
|
|
7
|
+
}
|
|
8
|
+
/** Optional seed values for the share start form. */
|
|
9
|
+
export interface ShareDefaults {
|
|
10
|
+
roomId?: string;
|
|
11
|
+
userName?: string;
|
|
12
|
+
serverUrl?: string;
|
|
13
|
+
}
|
|
14
|
+
/** Seed the form fields from the (optional) host-supplied defaults. */
|
|
15
|
+
export declare function seedShareFields(defaults?: ShareDefaults): ShareFormFields;
|
|
16
|
+
/**
|
|
17
|
+
* Whether the form can start a session: room id and display name are
|
|
18
|
+
* required; the server URL may be blank, which selects the serverless webrtc
|
|
19
|
+
* transport.
|
|
20
|
+
*/
|
|
21
|
+
export declare function canStartShare(fields: ShareFormFields): boolean;
|
|
22
|
+
/** True when the current server field selects serverless peer-to-peer mode. */
|
|
23
|
+
export declare function isPeerToPeerShare(serverUrl: string): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Assemble a {@link CollaborationConfig} from the (trimmed) form fields, or
|
|
26
|
+
* `null` when the form is incomplete.
|
|
27
|
+
*/
|
|
28
|
+
export declare function buildShareConfig(fields: ShareFormFields): CollaborationConfig | null;
|
|
29
|
+
//# sourceMappingURL=share-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"share-helpers.d.ts","sourceRoot":"","sources":["../../../../src/viewer/collab/components/share-helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAG9D,wCAAwC;AACxC,MAAM,WAAW,eAAe;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CAClB;AAED,qDAAqD;AACrD,MAAM,WAAW,aAAa;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,uEAAuE;AACvE,wBAAgB,eAAe,CAAC,QAAQ,CAAC,EAAE,aAAa,GAAG,eAAe,CAMzE;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAE9D;AAED,+EAA+E;AAC/E,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAE5D;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,eAAe,GAAG,mBAAmB,GAAG,IAAI,CAWpF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Collaboration barrel for the Svelte viewer: the runes controller, its
|
|
3
|
+
* transport/session seams, and the shared config types re-exported for hosts.
|
|
4
|
+
*/
|
|
5
|
+
export { CollaborationController } from './collaboration.svelte';
|
|
6
|
+
export type { CollaborationDeps } from './collaboration.svelte';
|
|
7
|
+
export { CollaborationDialogsState } from './collaboration-dialogs.svelte';
|
|
8
|
+
export type { ShareDefaultsInput } from './collaboration-dialogs.svelte';
|
|
9
|
+
export { createDefaultSession } from './collaboration-session';
|
|
10
|
+
export type { CollabSession, CollabSessionFactory } from './collaboration-session';
|
|
11
|
+
export { createCollabProvider } from './collaboration-provider';
|
|
12
|
+
export type { CollabProviderHandle } from './collaboration-provider';
|
|
13
|
+
export { createWriteBackScheduler } from 'pptx-viewer-shared';
|
|
14
|
+
export type { WriteBackDeps, WriteBackScheduler } from 'pptx-viewer-shared';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/viewer/collab/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,YAAY,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,YAAY,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,YAAY,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,YAAY,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Component } from 'svelte';
|
|
2
|
+
import { PowerPointViewerApi, PowerPointViewerProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Explicitly-typed public export of the viewer component.
|
|
5
|
+
*
|
|
6
|
+
* `svelte-check` types the `.svelte` import precisely, but the plain
|
|
7
|
+
* TypeScript pass that emits the published declaration files resolves
|
|
8
|
+
* `.svelte` modules through a loose ambient shim (`src/shims-svelte.d.ts`).
|
|
9
|
+
* Re-exporting through this annotated constant keeps the published `.d.ts`
|
|
10
|
+
* fully typed regardless of which compiler produced it.
|
|
11
|
+
*/
|
|
12
|
+
export declare const PowerPointViewer: Component<PowerPointViewerProps, PowerPointViewerApi>;
|
|
13
|
+
//# sourceMappingURL=component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/viewer/component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAGxC,OAAO,KAAK,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAE1E;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,CAAC,qBAAqB,EAAE,mBAAmB,CACW,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Component prop contracts. The `.svelte` components themselves are imported
|
|
3
|
+
* directly by path (Svelte convention); only the internal `PowerPointViewer`
|
|
4
|
+
* root is re-exported publicly, via `../component`.
|
|
5
|
+
*/
|
|
6
|
+
export type { ElementRendererProps, NotesPanelProps, SlideStageProps, TextBlockProps, ThumbnailRailProps, ViewerToolbarProps, } from './props';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/viewer/components/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,YAAY,EACX,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,kBAAkB,GAClB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { PptxElement, PptxSlide, TextSegment } from 'pptx-viewer-core';
|
|
2
|
+
import { CanvasSize, RenderParagraph, ResizeHandleId, SnapLine } from 'pptx-viewer-shared';
|
|
3
|
+
import { EditorController } from '../editor/editor-controller.svelte';
|
|
4
|
+
import { EditorMarqueeRect } from '../editor/editor-selection-gestures';
|
|
5
|
+
import { EditorState } from '../editor/editor-state.svelte';
|
|
6
|
+
import { OverlayBox } from '../editor/types';
|
|
7
|
+
import { ExportUiState } from '../export/export-ui.svelte';
|
|
8
|
+
import { AutosaveStatus } from '../state/autosave.svelte';
|
|
9
|
+
/**
|
|
10
|
+
* Prop contracts for the internal viewer components. Kept in a plain `.ts`
|
|
11
|
+
* module (not inside the SFCs) per repo convention: SFCs stay thin
|
|
12
|
+
* presentation, logic and types live in lintable TypeScript files.
|
|
13
|
+
*/
|
|
14
|
+
/** Props shared by every element-level renderer. */
|
|
15
|
+
export interface ElementRendererProps {
|
|
16
|
+
element: PptxElement;
|
|
17
|
+
mediaDataUrls: Map<string, string>;
|
|
18
|
+
zIndex: number;
|
|
19
|
+
/**
|
|
20
|
+
* True only on the live presentation stage (the viewer's fullscreen
|
|
21
|
+
* surface): media elements should then autoplay, as PowerPoint does when a
|
|
22
|
+
* slide with media becomes active, rather than waiting for a manual click.
|
|
23
|
+
* Defaults to `false` (the main windowed canvas and thumbnail rail never
|
|
24
|
+
* autoplay).
|
|
25
|
+
*/
|
|
26
|
+
presenting?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* True only on the main (interactive) canvas, never the thumbnail rail.
|
|
29
|
+
* Marks the rendered root node with `data-pptx-element="true"` (the
|
|
30
|
+
* framework-neutral e2e test hook React/Vue/Angular also emit) for the
|
|
31
|
+
* element types that render their own wrapper directly (group, text/shape).
|
|
32
|
+
* Defaults to `false`.
|
|
33
|
+
*/
|
|
34
|
+
interactive?: boolean;
|
|
35
|
+
/** Whether inherited layout/master nodes participate in pointer editing. */
|
|
36
|
+
editTemplateMode?: boolean;
|
|
37
|
+
ontablecellcommit?: (elementId: string, rowIndex: number, cellIndex: number, text: string) => void;
|
|
38
|
+
}
|
|
39
|
+
export interface TextBlockProps {
|
|
40
|
+
paragraphs: RenderParagraph[];
|
|
41
|
+
/** Inline `style` string for the text block wrapper. */
|
|
42
|
+
textStyle: string;
|
|
43
|
+
}
|
|
44
|
+
export interface SlideStageProps {
|
|
45
|
+
slide: PptxSlide | undefined;
|
|
46
|
+
canvasSize: CanvasSize;
|
|
47
|
+
mediaDataUrls: Map<string, string>;
|
|
48
|
+
scale?: number;
|
|
49
|
+
/** Forwarded to each `ElementRenderer`; see `ElementRendererProps.presenting`. */
|
|
50
|
+
presenting?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* True only for the main (interactive) canvas, never the thumbnail rail.
|
|
53
|
+
* Adds `role="region" aria-roledescription="slide"` to the stage itself
|
|
54
|
+
* (the framework-neutral e2e hook React/Vue/Angular also emit) and is
|
|
55
|
+
* forwarded to each `ElementRenderer`; see `ElementRendererProps.interactive`.
|
|
56
|
+
*/
|
|
57
|
+
interactive?: boolean;
|
|
58
|
+
editTemplateMode?: boolean;
|
|
59
|
+
ontablecellcommit?: (elementId: string, rowIndex: number, cellIndex: number, text: string) => void;
|
|
60
|
+
}
|
|
61
|
+
export interface ViewerToolbarProps {
|
|
62
|
+
/** Active slide (0-based). */
|
|
63
|
+
current: number;
|
|
64
|
+
total: number;
|
|
65
|
+
/** Currently-effective zoom percent (rounded). */
|
|
66
|
+
zoomPercent: number;
|
|
67
|
+
isFullscreen: boolean;
|
|
68
|
+
onprev: () => void;
|
|
69
|
+
onnext: () => void;
|
|
70
|
+
onzoomin: () => void;
|
|
71
|
+
onzoomout: () => void;
|
|
72
|
+
onzoomfit: () => void;
|
|
73
|
+
onfullscreen: () => void;
|
|
74
|
+
/** Whether the Notes toggle button is shown (host has a notes panel). */
|
|
75
|
+
showNotes?: boolean;
|
|
76
|
+
/** Whether the notes panel is currently expanded (drives the pressed state). */
|
|
77
|
+
notesExpanded?: boolean;
|
|
78
|
+
onnotestoggle?: () => void;
|
|
79
|
+
/** Show the editing action group (Undo / Redo / Save). Default false. */
|
|
80
|
+
editable?: boolean;
|
|
81
|
+
/** Whether an undo step is available (drives the Undo button's disabled state). */
|
|
82
|
+
canUndo?: boolean;
|
|
83
|
+
/** Whether a redo step is available (drives the Redo button's disabled state). */
|
|
84
|
+
canRedo?: boolean;
|
|
85
|
+
/** Whether there are unsaved edits (drives the Save button's emphasis). */
|
|
86
|
+
dirty?: boolean;
|
|
87
|
+
onundo?: () => void;
|
|
88
|
+
onredo?: () => void;
|
|
89
|
+
onsave?: () => void;
|
|
90
|
+
ondownload?: () => void;
|
|
91
|
+
/**
|
|
92
|
+
* Autosave lifecycle status; when set (host opted into `autosave`) a small
|
|
93
|
+
* status pill renders in the editing group. Omit to hide the pill entirely.
|
|
94
|
+
*/
|
|
95
|
+
autosaveStatus?: AutosaveStatus;
|
|
96
|
+
/** Whether there are unsaved autosave edits (drives the pill's "dirty" tone). */
|
|
97
|
+
autosaveDirty?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Export menu state (PNG / PDF / GIF / video / print). When set, the
|
|
100
|
+
* toolbar renders the `ExportMenu` dropdown in its right-hand group,
|
|
101
|
+
* matching the export affordance the React/Vue/Angular chrome exposes.
|
|
102
|
+
* Omit to hide the menu (e.g. while no presentation is loaded).
|
|
103
|
+
*/
|
|
104
|
+
exportUi?: ExportUiState;
|
|
105
|
+
/** Opens the Share (collaboration) dialog. Omit to hide the button. */
|
|
106
|
+
onshare?: () => void;
|
|
107
|
+
/** Opens the Broadcast dialog. Omit to hide the button. */
|
|
108
|
+
onbroadcast?: () => void;
|
|
109
|
+
/** Whether a collaboration session is currently active (highlights the Share button). */
|
|
110
|
+
collabActive?: boolean;
|
|
111
|
+
}
|
|
112
|
+
/** Props for the selection overlay (box + 8 resize handles + rotate handle). */
|
|
113
|
+
export interface SelectionOverlayProps {
|
|
114
|
+
/** Selection box in element (unscaled slide) px, or null to hide it. */
|
|
115
|
+
box: OverlayBox | null;
|
|
116
|
+
/** Stage scale (screen px per element px) applied when positioning. */
|
|
117
|
+
scale: number;
|
|
118
|
+
/** Transient snap-alignment lines (element px). */
|
|
119
|
+
snapLines: readonly SnapLine[];
|
|
120
|
+
/** Hide the box/handles while the inline text editor is open. */
|
|
121
|
+
editing?: boolean;
|
|
122
|
+
/** Number of selected elements; collective boxes do not expose rotation. */
|
|
123
|
+
selectionCount?: number;
|
|
124
|
+
/** In-progress empty-canvas marquee rectangle. */
|
|
125
|
+
marquee?: EditorMarqueeRect | null;
|
|
126
|
+
onhandlepointerdown: (handle: ResizeHandleId, event: PointerEvent) => void;
|
|
127
|
+
onrotatepointerdown: (event: PointerEvent) => void;
|
|
128
|
+
}
|
|
129
|
+
/** Props for the inline (double-click) text editing surface. */
|
|
130
|
+
export interface InlineTextEditorProps {
|
|
131
|
+
/** The element being edited (seeds the initial text + font hints). */
|
|
132
|
+
element: PptxElement;
|
|
133
|
+
/** The element's box in element px (positioning). */
|
|
134
|
+
box: OverlayBox;
|
|
135
|
+
/** Stage scale (screen px per element px). */
|
|
136
|
+
scale: number;
|
|
137
|
+
/** Called with the edited plain text on commit (only when it changed). */
|
|
138
|
+
oncommit: (text: string) => void;
|
|
139
|
+
/** Called after the surface closes (commit or cancel). */
|
|
140
|
+
onclose: () => void;
|
|
141
|
+
}
|
|
142
|
+
/** Props for the editing layer (selection overlay + inline editor over the stage). */
|
|
143
|
+
export interface EditorLayerProps {
|
|
144
|
+
/** The reactive editing orchestrator (owns overlay/snap/inline state). */
|
|
145
|
+
controller: EditorController;
|
|
146
|
+
/** Stage scale (screen px per element px). */
|
|
147
|
+
scale: number;
|
|
148
|
+
}
|
|
149
|
+
/** Position and callbacks for the editable element context menu. */
|
|
150
|
+
export interface ElementContextMenuProps {
|
|
151
|
+
x: number;
|
|
152
|
+
y: number;
|
|
153
|
+
editor: EditorState;
|
|
154
|
+
onclose: () => void;
|
|
155
|
+
}
|
|
156
|
+
export interface ThumbnailRailProps {
|
|
157
|
+
slides: PptxSlide[];
|
|
158
|
+
canvasSize: CanvasSize;
|
|
159
|
+
mediaDataUrls: Map<string, string>;
|
|
160
|
+
current: number;
|
|
161
|
+
onselect: (index: number) => void;
|
|
162
|
+
/** Enables native thumbnail drag-and-drop slide reordering. */
|
|
163
|
+
editable?: boolean;
|
|
164
|
+
onmove?: (fromIndex: number, toIndex: number) => void;
|
|
165
|
+
}
|
|
166
|
+
export interface NotesPanelProps {
|
|
167
|
+
/** Active slide; the panel reads/edits its plain-text speaker notes. */
|
|
168
|
+
slide: PptxSlide | undefined;
|
|
169
|
+
/**
|
|
170
|
+
* Whether the panel body is expanded. Controlled by the host so the
|
|
171
|
+
* toolbar's Notes toggle and the panel's own header stay in sync.
|
|
172
|
+
*/
|
|
173
|
+
expanded?: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* Called with the committed plain-text notes (on `change` / `blur`) when
|
|
176
|
+
* the user edits the textarea. This binding has no built-in slide-mutation
|
|
177
|
+
* channel, so omit this to render a read-only panel; when provided, the
|
|
178
|
+
* host is responsible for writing the text back onto the slide. Mirrors
|
|
179
|
+
* the Vue notes panel's plain-text `update` emit contract.
|
|
180
|
+
*/
|
|
181
|
+
onupdate?: (notes: string, segments?: TextSegment[]) => void;
|
|
182
|
+
/** Called when the header is clicked to expand/collapse the panel. */
|
|
183
|
+
ontoggle?: () => void;
|
|
184
|
+
}
|
|
185
|
+
//# sourceMappingURL=props.d.ts.map
|