pptx-angular-viewer 1.1.18 → 1.1.20
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/fesm2022/pptx-angular-viewer.mjs +33770 -27890
- package/fesm2022/pptx-angular-viewer.mjs.map +1 -1
- package/package.json +2 -2
- package/types/pptx-angular-viewer.d.ts +920 -135
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { Signal, OnInit, OnDestroy, InjectionToken, Provider } from '@angular/core';
|
|
2
|
+
import { Signal, OnInit, OnDestroy, OnChanges, SimpleChanges, InjectionToken, Provider } from '@angular/core';
|
|
3
3
|
import * as pptx_viewer_core from 'pptx-viewer-core';
|
|
4
|
-
import { PptxSlide, AccessibilityCheckOptions, AccessibilityIssue, PptxElement, PptxTheme, PptxSlideMaster, PptxEmbeddedFont, PptxCoreProperties, ParsedSignature, PptxComment, TextSegment, TextStyle, PptxTableCell, Model3DPptxElement, ZoomPptxElement, PptxSlideTransition, TablePptxElement, ChartPptxElement, XmlObject, SignatureStatus, AccessibilityIssueSeverity, AccessibilityIssueType,
|
|
4
|
+
import { PptxSlide, AccessibilityCheckOptions, AccessibilityIssue, PptxElement, PptxTheme, PptxSlideMaster, PptxEmbeddedFont, PptxCoreProperties, ParsedSignature, PptxComment, PptxTextWarpPreset, TextSegment, TextStyle, PptxTableCell, Model3DPptxElement, ZoomPptxElement, PptxElementAnimation, PptxSlideTransition, TablePptxElement, ChartPptxElement, PptxAnimationPreset, PptxAnimationTrigger, PptxAnimationTimingCurve, PptxAnimationRepeatMode, PptxAnimationDirection, PptxAnimationSequence, XmlObject, SignatureStatus, AccessibilityIssueSeverity, AccessibilityIssueType, PptxTransitionType, ShapeStyle } from 'pptx-viewer-core';
|
|
5
5
|
import * as pptx_angular_viewer from 'pptx-angular-viewer';
|
|
6
6
|
import { Options } from 'html2canvas-pro';
|
|
7
7
|
import { SafeHtml } from '@angular/platform-browser';
|
|
@@ -657,6 +657,62 @@ declare function replaceMatch(slides: readonly PptxSlide[], allResults: readonly
|
|
|
657
657
|
*/
|
|
658
658
|
declare function replaceInSlides(slides: readonly PptxSlide[], query: string, replacement: string, opts?: FindOptions): ReplaceResult;
|
|
659
659
|
|
|
660
|
+
/**
|
|
661
|
+
* Decide whether the current environment is "mobile" based on two signals:
|
|
662
|
+
* - `width` is the viewport / container width in pixels
|
|
663
|
+
* - `coarsePointer` is true when `(pointer: coarse)` matches
|
|
664
|
+
*
|
|
665
|
+
* Either condition alone is sufficient (narrow viewport OR touch device).
|
|
666
|
+
*
|
|
667
|
+
* @pure — no side effects, fully testable without a DOM.
|
|
668
|
+
*/
|
|
669
|
+
declare function computeIsMobile(width: number, coarsePointer: boolean): boolean;
|
|
670
|
+
/**
|
|
671
|
+
* Decide whether the current environment is "tablet" based on width only.
|
|
672
|
+
* A coarse-pointer device at tablet width is still treated as mobile
|
|
673
|
+
* (handled by `computeIsMobile`).
|
|
674
|
+
*
|
|
675
|
+
* @pure
|
|
676
|
+
*/
|
|
677
|
+
declare function computeIsTablet(width: number, coarsePointer: boolean): boolean;
|
|
678
|
+
/**
|
|
679
|
+
* `IsMobileService` — provides reactive signals for the current viewport /
|
|
680
|
+
* pointer kind so components can switch between mobile and desktop chrome
|
|
681
|
+
* without subscribing to resize events themselves.
|
|
682
|
+
*
|
|
683
|
+
* Inject at the component level (or provide at root) — the service cleans up
|
|
684
|
+
* its `MediaQueryList` listeners automatically via `DestroyRef`.
|
|
685
|
+
*
|
|
686
|
+
* ```ts
|
|
687
|
+
* providers: [IsMobileService]
|
|
688
|
+
* // or globally:
|
|
689
|
+
* // provideIsMobile() (see factory below)
|
|
690
|
+
* ```
|
|
691
|
+
*
|
|
692
|
+
* ```ts
|
|
693
|
+
* protected readonly mobile = inject(IsMobileService);
|
|
694
|
+
* // in template: @if (mobile.isMobile()) { … }
|
|
695
|
+
* ```
|
|
696
|
+
*/
|
|
697
|
+
declare class IsMobileService {
|
|
698
|
+
/** True when the primary pointer is coarse (touch / stylus). */
|
|
699
|
+
readonly isCoarsePointer: _angular_core.WritableSignal<boolean>;
|
|
700
|
+
/** True when the viewport width is below {@link MOBILE_BREAKPOINT}. */
|
|
701
|
+
readonly isNarrowViewport: _angular_core.WritableSignal<boolean>;
|
|
702
|
+
/**
|
|
703
|
+
* True when either the pointer is coarse OR the viewport is narrow.
|
|
704
|
+
* Use this as the single gate for showing mobile chrome.
|
|
705
|
+
*/
|
|
706
|
+
readonly isMobile: _angular_core.WritableSignal<boolean>;
|
|
707
|
+
/** True when the viewport is in the tablet range (desktop pointer only). */
|
|
708
|
+
readonly isTablet: _angular_core.WritableSignal<boolean>;
|
|
709
|
+
constructor();
|
|
710
|
+
/** Recompute derived `isMobile` signal from the two raw conditions. */
|
|
711
|
+
private _update;
|
|
712
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<IsMobileService, never>;
|
|
713
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<IsMobileService>;
|
|
714
|
+
}
|
|
715
|
+
|
|
660
716
|
/**
|
|
661
717
|
* `LoadContentService` — Angular port of the React `useLoadContent` hook and
|
|
662
718
|
* the Vue `useLoadContent` composable.
|
|
@@ -922,6 +978,7 @@ declare class PowerPointViewerComponent {
|
|
|
922
978
|
protected readonly collab: CollaborationService;
|
|
923
979
|
protected readonly accessibility: AccessibilityService;
|
|
924
980
|
protected readonly print: PrintService;
|
|
981
|
+
protected readonly mobile: IsMobileService;
|
|
925
982
|
/** The `<main>` host; used to locate the live `.pptx-ng-canvas-stage`. */
|
|
926
983
|
private readonly mainEl;
|
|
927
984
|
/** True while a PNG/PDF export is in progress (disables the buttons). */
|
|
@@ -944,6 +1001,8 @@ declare class PowerPointViewerComponent {
|
|
|
944
1001
|
protected readonly presenterStartTime: _angular_core.WritableSignal<number | null>;
|
|
945
1002
|
/** Slide-sorter grid overlay visibility. */
|
|
946
1003
|
protected readonly showSorter: _angular_core.WritableSignal<boolean>;
|
|
1004
|
+
/** Open mobile bottom-sheet (slides / menu), or null. */
|
|
1005
|
+
protected readonly mobileSheet: _angular_core.WritableSignal<"slides" | "menu" | null>;
|
|
947
1006
|
/** Speaker-notes strip visibility. */
|
|
948
1007
|
protected readonly showNotes: _angular_core.WritableSignal<boolean>;
|
|
949
1008
|
/** Find-in-slides bar visibility. */
|
|
@@ -1614,6 +1673,113 @@ declare function routeOrthogonalConnector(start: Point, end: Point, obstacles: R
|
|
|
1614
1673
|
*/
|
|
1615
1674
|
declare function waypointsToPathD(waypoints: ReadonlyArray<Point>): string;
|
|
1616
1675
|
|
|
1676
|
+
/**
|
|
1677
|
+
* Text-warp (WordArt) descriptor resolver for the Angular viewer.
|
|
1678
|
+
*
|
|
1679
|
+
* Angular port of:
|
|
1680
|
+
* packages/react/src/viewer/utils/text-warp-classifier.ts
|
|
1681
|
+
* packages/react/src/viewer/utils/text-warp-css.tsx
|
|
1682
|
+
* packages/react/src/viewer/utils/warp-text-renderer.tsx (descriptor shape)
|
|
1683
|
+
*
|
|
1684
|
+
* `getTextWarp(element)` resolves an element's OOXML `prstTxWarp` preset into a
|
|
1685
|
+
* `TextWarpDef` that the Angular template can consume without any React/HTML
|
|
1686
|
+
* string injection. The descriptor selects one of two rendering strategies:
|
|
1687
|
+
*
|
|
1688
|
+
* - `'path'` — SVG `<textPath>` along a curved/arc/circle path.
|
|
1689
|
+
* The `pathLines` array contains one entry per paragraph with a
|
|
1690
|
+
* pre-computed SVG `d` attribute. The template renders an inline
|
|
1691
|
+
* `<svg>` with `<defs><path>` + `<text><textPath href>`.
|
|
1692
|
+
*
|
|
1693
|
+
* - `'css'` — A whole-block CSS transform approximation. The template
|
|
1694
|
+
* applies `cssTransform` and `cssTransformOrigin` to the
|
|
1695
|
+
* existing `div.pptx-ng-text` wrapper (or a parent div) via
|
|
1696
|
+
* `[ngStyle]`. No SVG required.
|
|
1697
|
+
*
|
|
1698
|
+
* Presets classified as `'none'` (textNoShape, textPlain, unknown) return
|
|
1699
|
+
* `undefined` so callers can skip extra rendering without an allowlist check.
|
|
1700
|
+
*/
|
|
1701
|
+
|
|
1702
|
+
/** The four rendering strategy families. */
|
|
1703
|
+
type WarpCategory = 'path' | 'envelope' | 'simple' | 'none';
|
|
1704
|
+
/**
|
|
1705
|
+
* Classify a warp preset into a rendering strategy category.
|
|
1706
|
+
*
|
|
1707
|
+
* Returns `'none'` for unknown or empty presets so callers can safely
|
|
1708
|
+
* skip rendering without an explicit allowlist check.
|
|
1709
|
+
*/
|
|
1710
|
+
declare function getWarpCategory(preset: string | undefined): WarpCategory;
|
|
1711
|
+
/**
|
|
1712
|
+
* A single pre-computed SVG path line for one text paragraph.
|
|
1713
|
+
*
|
|
1714
|
+
* The template renders this as:
|
|
1715
|
+
* `<path [id]="pathId" [attr.d]="d" fill="none" />`
|
|
1716
|
+
* inside `<defs>`, then references it with `<textPath [attr.href]="'#'+pathId">`.
|
|
1717
|
+
*/
|
|
1718
|
+
interface WarpPathLine {
|
|
1719
|
+
/** Unique DOM id for this `<path>` element (safe to use as `href` fragment). */
|
|
1720
|
+
pathId: string;
|
|
1721
|
+
/** SVG path data (`d` attribute). */
|
|
1722
|
+
d: string;
|
|
1723
|
+
/** The text segments that flow along this path. */
|
|
1724
|
+
segments: TextSegment[];
|
|
1725
|
+
}
|
|
1726
|
+
/**
|
|
1727
|
+
* Descriptor for SVG `<textPath>`-based warp rendering.
|
|
1728
|
+
*
|
|
1729
|
+
* One `WarpPathLine` per paragraph. The template renders an inline `<svg>`
|
|
1730
|
+
* covering the element bounds, defines each path in `<defs>`, then lays
|
|
1731
|
+
* `<text><textPath href="#pathId">` on each path.
|
|
1732
|
+
*/
|
|
1733
|
+
interface TextWarpPathDef {
|
|
1734
|
+
readonly strategy: 'path';
|
|
1735
|
+
/** OOXML preset name (e.g. `'textArchUp'`). */
|
|
1736
|
+
readonly preset: PptxTextWarpPreset;
|
|
1737
|
+
/** One entry per paragraph. */
|
|
1738
|
+
readonly pathLines: WarpPathLine[];
|
|
1739
|
+
/** Element pixel width (for `<svg width>`). */
|
|
1740
|
+
readonly width: number;
|
|
1741
|
+
/** Element pixel height (for `<svg height>`). */
|
|
1742
|
+
readonly height: number;
|
|
1743
|
+
/** SVG `text-anchor` value derived from paragraph alignment. */
|
|
1744
|
+
readonly textAnchor: 'start' | 'middle' | 'end';
|
|
1745
|
+
/** SVG `<textPath startOffset>` value (e.g. `"0%"`, `"50%"`, `"100%"`). */
|
|
1746
|
+
readonly startOffset: string;
|
|
1747
|
+
/** Base font size in points from the element's text style. */
|
|
1748
|
+
readonly baseFontSize: number;
|
|
1749
|
+
/** Base font family string (already CSS-ready). */
|
|
1750
|
+
readonly baseFontFamily: string;
|
|
1751
|
+
/** Base text fill colour (hex). */
|
|
1752
|
+
readonly baseColor: string;
|
|
1753
|
+
}
|
|
1754
|
+
/**
|
|
1755
|
+
* Descriptor for CSS-transform-based warp rendering.
|
|
1756
|
+
*
|
|
1757
|
+
* The template applies `cssTransform` + `cssTransformOrigin` on the
|
|
1758
|
+
* `div.pptx-ng-text` wrapper (or a containing div) via `[ngStyle]`.
|
|
1759
|
+
*/
|
|
1760
|
+
interface TextWarpCssDef {
|
|
1761
|
+
readonly strategy: 'css';
|
|
1762
|
+
/** OOXML preset name (e.g. `'textSlantUp'`). */
|
|
1763
|
+
readonly preset: PptxTextWarpPreset;
|
|
1764
|
+
/** CSS `transform` string (e.g. `"perspective(500px) rotateY(8deg) skewY(-4deg)"`). */
|
|
1765
|
+
readonly cssTransform: string;
|
|
1766
|
+
/** CSS `transform-origin` string (e.g. `"left center"`). */
|
|
1767
|
+
readonly cssTransformOrigin: string;
|
|
1768
|
+
}
|
|
1769
|
+
/** Union of the two warp rendering strategies. */
|
|
1770
|
+
type TextWarpDef = TextWarpPathDef | TextWarpCssDef;
|
|
1771
|
+
/**
|
|
1772
|
+
* Resolve a `PptxElement`'s text warp preset into a `TextWarpDef` descriptor,
|
|
1773
|
+
* or `undefined` when the element carries no warp (or the preset is `textNoShape` /
|
|
1774
|
+
* `textPlain` / unknown).
|
|
1775
|
+
*
|
|
1776
|
+
* @param element Any `PptxElement`. Elements without text properties always
|
|
1777
|
+
* return `undefined`.
|
|
1778
|
+
* @returns A `TextWarpDef` with `strategy: 'path'` for SVG textPath warps, or
|
|
1779
|
+
* `strategy: 'css'` for CSS-transform approximations.
|
|
1780
|
+
*/
|
|
1781
|
+
declare function getTextWarp(element: PptxElement): TextWarpDef | undefined;
|
|
1782
|
+
|
|
1617
1783
|
interface TextRun {
|
|
1618
1784
|
text: string;
|
|
1619
1785
|
style: StyleMap;
|
|
@@ -1671,6 +1837,12 @@ declare class ElementRendererComponent {
|
|
|
1671
1837
|
readonly shapeContainerStyle: _angular_core.Signal<StyleMap>;
|
|
1672
1838
|
readonly textStyle: _angular_core.Signal<StyleMap>;
|
|
1673
1839
|
readonly imageSrc: _angular_core.Signal<string | undefined>;
|
|
1840
|
+
/** Text-warp (WordArt) descriptor for the element, if any. */
|
|
1841
|
+
readonly textWarp: _angular_core.Signal<pptx_angular_viewer.TextWarpDef | undefined>;
|
|
1842
|
+
/** Only the SVG-textPath warp variant (for the `<svg>` overlay branch). */
|
|
1843
|
+
readonly pathWarp: _angular_core.Signal<TextWarpPathDef | undefined>;
|
|
1844
|
+
/** Text block style, folding in a CSS-transform warp when present. */
|
|
1845
|
+
readonly warpedTextStyle: _angular_core.Signal<StyleMap>;
|
|
1674
1846
|
readonly children: _angular_core.Signal<PptxElement[]>;
|
|
1675
1847
|
readonly isShapeLike: _angular_core.Signal<boolean>;
|
|
1676
1848
|
readonly isImageLike: _angular_core.Signal<boolean>;
|
|
@@ -2022,6 +2194,8 @@ interface SvgText {
|
|
|
2022
2194
|
fontWeight?: 'normal' | 'bold';
|
|
2023
2195
|
dominantBaseline?: string;
|
|
2024
2196
|
opacity?: number;
|
|
2197
|
+
/** Optional SVG transform (e.g. `rotate(-90, x, y)` for a vertical axis title). */
|
|
2198
|
+
transform?: string;
|
|
2025
2199
|
}
|
|
2026
2200
|
interface SvgPolygon {
|
|
2027
2201
|
kind: 'polygon';
|
|
@@ -2448,6 +2622,305 @@ declare class ZoomRendererComponent {
|
|
|
2448
2622
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ZoomRendererComponent, "pptx-zoom-renderer", never, { "element": { "alias": "element"; "required": true; "isSignal": true; }; "zIndex": { "alias": "zIndex"; "required": false; "isSignal": true; }; "mediaDataUrls": { "alias": "mediaDataUrls"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2449
2623
|
}
|
|
2450
2624
|
|
|
2625
|
+
/**
|
|
2626
|
+
* animation-playback-helpers.ts
|
|
2627
|
+
*
|
|
2628
|
+
* Pure functions backing {@link AnimationPlaybackService} and
|
|
2629
|
+
* {@link AnimationPanelComponent}. Exported separately so they can be
|
|
2630
|
+
* unit-tested without TestBed (vitest + happy-dom).
|
|
2631
|
+
*
|
|
2632
|
+
* A slide carries an ordered list of {@link PptxElementAnimation}s. PowerPoint
|
|
2633
|
+
* groups them into "click groups": an animation triggered `onClick` /
|
|
2634
|
+
* `onShapeClick` / `onHover` starts a new group, while `withPrevious` /
|
|
2635
|
+
* `afterPrevious` / `afterDelay` animations fold into the group that precedes
|
|
2636
|
+
* them (running together or sequentially within that group). Advancing the
|
|
2637
|
+
* presentation one step reveals one more click group.
|
|
2638
|
+
*
|
|
2639
|
+
* Everything here is framework-light: only the preset → CSS mapping is
|
|
2640
|
+
* delegated to {@link resolveAnimationCss} / {@link initialHiddenStyle} from
|
|
2641
|
+
* the shared render layer.
|
|
2642
|
+
*/
|
|
2643
|
+
|
|
2644
|
+
/** Minimal CSS-properties shape: kebab-case property → value. */
|
|
2645
|
+
type CSSProperties = Record<string, string>;
|
|
2646
|
+
/** A single click-triggered group of animations that play as one step. */
|
|
2647
|
+
interface AnimationClickGroup {
|
|
2648
|
+
/** Animations belonging to this group, in document order. */
|
|
2649
|
+
animations: PptxElementAnimation[];
|
|
2650
|
+
}
|
|
2651
|
+
/**
|
|
2652
|
+
* Splits an ordered animation list into click groups. The first animation
|
|
2653
|
+
* always begins a group even if it isn't explicitly `onClick` (PowerPoint shows
|
|
2654
|
+
* the first build on the first advance). Subsequent `withPrevious` /
|
|
2655
|
+
* `afterPrevious` animations attach to the group in progress.
|
|
2656
|
+
*/
|
|
2657
|
+
declare function buildClickGroups(animations: readonly PptxElementAnimation[]): AnimationClickGroup[];
|
|
2658
|
+
/** Clamp a step into `[0, count]`. */
|
|
2659
|
+
declare function clampStep(value: number, count: number): number;
|
|
2660
|
+
/**
|
|
2661
|
+
* Reveal the next click group. Returns the next step, clamped to `count`.
|
|
2662
|
+
* Equivalent to `clampStep(step + 1, count)`.
|
|
2663
|
+
*/
|
|
2664
|
+
declare function advanceStep(step: number, count: number): number;
|
|
2665
|
+
/** Parse the numeric ms duration out of a resolved style's `animation-duration`. */
|
|
2666
|
+
declare function durationOf(style: CSSProperties): number;
|
|
2667
|
+
/**
|
|
2668
|
+
* Resolve the CSS for every animation in the revealed groups (the first `step`
|
|
2669
|
+
* groups). Within a group, `afterPrevious` animations are pushed back by the
|
|
2670
|
+
* accumulated duration of the preceding animations so sequential chains play in
|
|
2671
|
+
* order; `withPrevious` shares the running delay. The last write for an element
|
|
2672
|
+
* id wins (a later emphasis/exit overrides an earlier entrance), matching how a
|
|
2673
|
+
* single CSS `animation` shorthand can only hold one running effect.
|
|
2674
|
+
*/
|
|
2675
|
+
declare function revealedElementStyles(groups: readonly AnimationClickGroup[], step: number): Map<string, CSSProperties>;
|
|
2676
|
+
/**
|
|
2677
|
+
* Elements with a pending entrance (in a not-yet-revealed group, i.e. groups at
|
|
2678
|
+
* or beyond `step`) that should be hidden until their group plays. An element
|
|
2679
|
+
* an already-revealed group made visible is never re-hidden.
|
|
2680
|
+
*/
|
|
2681
|
+
declare function pendingElementStyles(groups: readonly AnimationClickGroup[], step: number): Map<string, CSSProperties>;
|
|
2682
|
+
|
|
2683
|
+
declare class AnimationPlaybackService {
|
|
2684
|
+
private readonly destroyRef;
|
|
2685
|
+
/** The current slide's animations, in document/timeline order. */
|
|
2686
|
+
private readonly animations;
|
|
2687
|
+
/**
|
|
2688
|
+
* Externally-controlled playback step (e.g. derived from a parent click
|
|
2689
|
+
* counter). `undefined` means there is no external driver. The internal
|
|
2690
|
+
* manual step (set via advance/play/reset) takes precedence when present.
|
|
2691
|
+
*/
|
|
2692
|
+
private readonly externalIndex;
|
|
2693
|
+
/**
|
|
2694
|
+
* Internal, unclamped step. `null` means "follow the external index"; any
|
|
2695
|
+
* number means the host has taken manual control via advance/play/reset.
|
|
2696
|
+
*/
|
|
2697
|
+
private readonly manualStep;
|
|
2698
|
+
/** Click groups for the current slide's animations. */
|
|
2699
|
+
readonly groups: _angular_core.Signal<AnimationClickGroup[]>;
|
|
2700
|
+
/** Number of click groups on this slide (i.e. how many `advance()` steps). */
|
|
2701
|
+
readonly groupCount: _angular_core.Signal<number>;
|
|
2702
|
+
/**
|
|
2703
|
+
* The current playback step: how many click groups have been revealed.
|
|
2704
|
+
* Always clamped to the current group count. The manual override wins;
|
|
2705
|
+
* otherwise it follows the external index, defaulting to 0.
|
|
2706
|
+
*/
|
|
2707
|
+
readonly step: _angular_core.Signal<number>;
|
|
2708
|
+
/** True when every click group has been revealed. */
|
|
2709
|
+
readonly isComplete: _angular_core.Signal<boolean>;
|
|
2710
|
+
/**
|
|
2711
|
+
* Reactive map of `elementId → CSS properties` to apply for the current step.
|
|
2712
|
+
* Only elements in revealed click groups appear.
|
|
2713
|
+
*/
|
|
2714
|
+
readonly elementStyles: _angular_core.Signal<Map<string, CSSProperties>>;
|
|
2715
|
+
/**
|
|
2716
|
+
* Reactive map of `elementId → CSS properties` for elements whose entrance
|
|
2717
|
+
* has not yet been revealed (they should be hidden so they don't flash
|
|
2718
|
+
* visible before their group plays).
|
|
2719
|
+
*/
|
|
2720
|
+
readonly pendingStyles: _angular_core.Signal<Map<string, CSSProperties>>;
|
|
2721
|
+
/** Handle of the scheduled rAF auto-advance, or null when idle. */
|
|
2722
|
+
private rafHandle;
|
|
2723
|
+
constructor();
|
|
2724
|
+
/** Feed the current slide's animation list. Resets manual control. */
|
|
2725
|
+
setAnimations(animations: readonly PptxElementAnimation[] | undefined): void;
|
|
2726
|
+
/** Update the external playback index (parent-driven build counter). */
|
|
2727
|
+
setExternalIndex(index: number | undefined): void;
|
|
2728
|
+
/**
|
|
2729
|
+
* Reveal the next click group. Returns `true` if a group was revealed,
|
|
2730
|
+
* `false` if playback was already complete (so the caller can fall through
|
|
2731
|
+
* to slide navigation).
|
|
2732
|
+
*/
|
|
2733
|
+
advance(): boolean;
|
|
2734
|
+
/** Reveal every click group at once (jump to the slide's final state). */
|
|
2735
|
+
play(): void;
|
|
2736
|
+
/** Reset playback to before the first click group. */
|
|
2737
|
+
reset(): void;
|
|
2738
|
+
/**
|
|
2739
|
+
* Jump directly to a given step (clamped to the group count) and take manual
|
|
2740
|
+
* control. Useful for scrubbing.
|
|
2741
|
+
*/
|
|
2742
|
+
setStep(step: number): void;
|
|
2743
|
+
/**
|
|
2744
|
+
* Auto-advance through every remaining click group on the animation frame,
|
|
2745
|
+
* one group per frame. Stops automatically once playback completes or the
|
|
2746
|
+
* service is destroyed. A no-op when already complete or when
|
|
2747
|
+
* `requestAnimationFrame` is unavailable (SSR).
|
|
2748
|
+
*/
|
|
2749
|
+
autoPlay(): void;
|
|
2750
|
+
/** Cancel any in-flight rAF auto-advance. */
|
|
2751
|
+
cancelAutoPlay(): void;
|
|
2752
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AnimationPlaybackService, never>;
|
|
2753
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AnimationPlaybackService>;
|
|
2754
|
+
}
|
|
2755
|
+
|
|
2756
|
+
/**
|
|
2757
|
+
* presentation-annotations-helpers.ts — Pure geometry helpers for presentation
|
|
2758
|
+
* ink annotations (pen, highlighter, eraser, laser).
|
|
2759
|
+
*
|
|
2760
|
+
* Ported from React:
|
|
2761
|
+
* packages/react/src/viewer/components/PresentationAnnotationOverlay.tsx
|
|
2762
|
+
* packages/react/src/viewer/hooks/usePresentationAnnotations.ts
|
|
2763
|
+
*
|
|
2764
|
+
* No Angular dependencies — all functions are pure so they can be unit-tested
|
|
2765
|
+
* without TestBed.
|
|
2766
|
+
*/
|
|
2767
|
+
/** A single {x, y} coordinate in slide-space pixels. */
|
|
2768
|
+
interface AnnotationPoint {
|
|
2769
|
+
x: number;
|
|
2770
|
+
y: number;
|
|
2771
|
+
}
|
|
2772
|
+
/** An ink stroke: a sequence of points with visual properties. */
|
|
2773
|
+
interface AnnotationStroke {
|
|
2774
|
+
id: string;
|
|
2775
|
+
points: AnnotationPoint[];
|
|
2776
|
+
color: string;
|
|
2777
|
+
width: number;
|
|
2778
|
+
/** 1 = opaque (pen); 0.4 = semi-transparent (highlighter). */
|
|
2779
|
+
opacity: number;
|
|
2780
|
+
}
|
|
2781
|
+
/** The tool currently armed in presentation mode. */
|
|
2782
|
+
type PresentationTool = 'none' | 'pen' | 'highlighter' | 'eraser' | 'laser';
|
|
2783
|
+
/** Per-slide annotation storage: slide index → strokes. */
|
|
2784
|
+
type SlideAnnotationMap = Map<number, AnnotationStroke[]>;
|
|
2785
|
+
/** Transient laser-pointer position in slide-space pixels. */
|
|
2786
|
+
interface LaserPosition {
|
|
2787
|
+
x: number;
|
|
2788
|
+
y: number;
|
|
2789
|
+
}
|
|
2790
|
+
|
|
2791
|
+
declare class PresentationAnnotationsService {
|
|
2792
|
+
private readonly destroyRef;
|
|
2793
|
+
private readonly _tool;
|
|
2794
|
+
private readonly _penColor;
|
|
2795
|
+
private readonly _highlighterColor;
|
|
2796
|
+
private readonly _currentStroke;
|
|
2797
|
+
private readonly _laserPosition;
|
|
2798
|
+
private readonly _toolbarVisible;
|
|
2799
|
+
/**
|
|
2800
|
+
* Strokes visible on the current slide. Cleared / populated whenever
|
|
2801
|
+
* `setActiveSlide()` is called.
|
|
2802
|
+
*/
|
|
2803
|
+
private readonly _annotationStrokes;
|
|
2804
|
+
/**
|
|
2805
|
+
* Per-slide annotation storage. Strokes for the current slide are also kept
|
|
2806
|
+
* in `_annotationStrokes` for rendering convenience; they are synchronised
|
|
2807
|
+
* back into this map on `setActiveSlide()` or `endStroke()`.
|
|
2808
|
+
*/
|
|
2809
|
+
private readonly _slideAnnotations;
|
|
2810
|
+
/** Tracks whether a pointer-down initiated an erase gesture. */
|
|
2811
|
+
private _isErasing;
|
|
2812
|
+
/** Toolbar auto-hide timer handle. */
|
|
2813
|
+
private _toolbarTimer;
|
|
2814
|
+
/** Index of the slide currently being annotated. */
|
|
2815
|
+
private _activeSlideIndex;
|
|
2816
|
+
/** The currently-armed presentation tool. */
|
|
2817
|
+
readonly tool: _angular_core.Signal<PresentationTool>;
|
|
2818
|
+
/** Stroke colour used by the pen tool. */
|
|
2819
|
+
readonly penColor: _angular_core.Signal<string>;
|
|
2820
|
+
/** Stroke colour used by the highlighter tool. */
|
|
2821
|
+
readonly highlighterColor: _angular_core.Signal<string>;
|
|
2822
|
+
/** Committed strokes on the active slide (does not include the live stroke). */
|
|
2823
|
+
readonly annotationStrokes: _angular_core.Signal<AnnotationStroke[]>;
|
|
2824
|
+
/** The stroke currently being drawn, or null when not drawing. */
|
|
2825
|
+
readonly currentStroke: _angular_core.Signal<AnnotationStroke | null>;
|
|
2826
|
+
/** Laser pointer position in slide-space pixels, or null when not visible. */
|
|
2827
|
+
readonly laserPosition: _angular_core.Signal<LaserPosition | null>;
|
|
2828
|
+
/** Whether the annotation toolbar should be visible. */
|
|
2829
|
+
readonly toolbarVisible: _angular_core.Signal<boolean>;
|
|
2830
|
+
/**
|
|
2831
|
+
* `true` when any annotations exist on any slide (used for the
|
|
2832
|
+
* "keep / discard" dialog when exiting presentation mode).
|
|
2833
|
+
*/
|
|
2834
|
+
readonly hasAnyAnnotations: _angular_core.Signal<boolean>;
|
|
2835
|
+
constructor();
|
|
2836
|
+
/**
|
|
2837
|
+
* Arm `tool`. If it is already armed, toggle back to `'none'` (matches
|
|
2838
|
+
* the React behaviour of `setPresentationTool`).
|
|
2839
|
+
*/
|
|
2840
|
+
setTool(tool: PresentationTool): void;
|
|
2841
|
+
/** Set the pen colour directly (without toggling the tool). */
|
|
2842
|
+
setPenColor(color: string): void;
|
|
2843
|
+
/** Set the highlighter colour directly. */
|
|
2844
|
+
setHighlighterColor(color: string): void;
|
|
2845
|
+
/** Show / hide the toolbar programmatically. */
|
|
2846
|
+
setToolbarVisible(visible: boolean): void;
|
|
2847
|
+
/**
|
|
2848
|
+
* Notify the service that the visible slide has changed. Saves the
|
|
2849
|
+
* in-progress strokes for the previous slide and loads the strokes
|
|
2850
|
+
* for `newIndex`.
|
|
2851
|
+
*/
|
|
2852
|
+
setActiveSlide(newIndex: number): void;
|
|
2853
|
+
/**
|
|
2854
|
+
* Begin a stroke at `(x, y)` in slide-space coordinates.
|
|
2855
|
+
* Called on pointer-down when the pen or highlighter is armed.
|
|
2856
|
+
*/
|
|
2857
|
+
beginStroke(x: number, y: number): void;
|
|
2858
|
+
/**
|
|
2859
|
+
* Extend the active stroke by appending `(x, y)`.
|
|
2860
|
+
* Called on pointer-move while drawing.
|
|
2861
|
+
*/
|
|
2862
|
+
extendStroke(x: number, y: number): void;
|
|
2863
|
+
/**
|
|
2864
|
+
* Commit the active stroke to the slide's annotation list.
|
|
2865
|
+
* Called on pointer-up or pointer-leave while drawing.
|
|
2866
|
+
* Strokes with fewer than 2 points are discarded.
|
|
2867
|
+
*/
|
|
2868
|
+
endStroke(): void;
|
|
2869
|
+
/**
|
|
2870
|
+
* Begin an eraser gesture at `(x, y)`.
|
|
2871
|
+
* Must be called on pointer-down when the eraser is armed.
|
|
2872
|
+
*/
|
|
2873
|
+
beginErase(x: number, y: number): void;
|
|
2874
|
+
/**
|
|
2875
|
+
* Continue erasing at `(x, y)` during a pointer-move.
|
|
2876
|
+
*/
|
|
2877
|
+
continueErase(x: number, y: number): void;
|
|
2878
|
+
/**
|
|
2879
|
+
* End an eraser gesture. Called on pointer-up or pointer-leave.
|
|
2880
|
+
*/
|
|
2881
|
+
endErase(): void;
|
|
2882
|
+
/**
|
|
2883
|
+
* Update the laser dot position (slide-space coords).
|
|
2884
|
+
* Only takes effect when the laser tool is armed.
|
|
2885
|
+
*/
|
|
2886
|
+
moveLaser(x: number, y: number): void;
|
|
2887
|
+
/**
|
|
2888
|
+
* Hide the laser dot (called on pointer-leave).
|
|
2889
|
+
*/
|
|
2890
|
+
hideLaser(): void;
|
|
2891
|
+
/**
|
|
2892
|
+
* Clear all annotations on the active slide.
|
|
2893
|
+
*/
|
|
2894
|
+
clearAnnotations(): void;
|
|
2895
|
+
/**
|
|
2896
|
+
* Clear all annotations across every slide.
|
|
2897
|
+
*/
|
|
2898
|
+
clearAllAnnotations(): void;
|
|
2899
|
+
/**
|
|
2900
|
+
* Return a snapshot of all annotations across every slide.
|
|
2901
|
+
* The current slide's in-progress committed strokes are folded in.
|
|
2902
|
+
*
|
|
2903
|
+
* Used by the "keep as ink elements" dialog handler.
|
|
2904
|
+
*/
|
|
2905
|
+
getAllSlideAnnotations(): SlideAnnotationMap;
|
|
2906
|
+
/**
|
|
2907
|
+
* Show the toolbar and schedule it to auto-hide after `delayMs` (default 3 s).
|
|
2908
|
+
* Resets the timer if called repeatedly (debounce on mouse-move).
|
|
2909
|
+
*/
|
|
2910
|
+
showToolbarTemporarily(delayMs?: number): void;
|
|
2911
|
+
/**
|
|
2912
|
+
* Reset transient presentation state (tool, current stroke, laser, toolbar
|
|
2913
|
+
* timer). Does NOT clear stored strokes — those persist for the
|
|
2914
|
+
* keep/discard dialog.
|
|
2915
|
+
*/
|
|
2916
|
+
resetForExit(): void;
|
|
2917
|
+
private _applyErase;
|
|
2918
|
+
private _flushCurrentSlide;
|
|
2919
|
+
private _clearToolbarTimer;
|
|
2920
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PresentationAnnotationsService, never>;
|
|
2921
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<PresentationAnnotationsService>;
|
|
2922
|
+
}
|
|
2923
|
+
|
|
2451
2924
|
/**
|
|
2452
2925
|
* PresentationOverlayComponent — full-viewport black overlay that renders
|
|
2453
2926
|
* slides in presentation (kiosk) mode.
|
|
@@ -2495,6 +2968,21 @@ declare class PresentationOverlayComponent implements OnInit, OnDestroy {
|
|
|
2495
2968
|
outgoing: PptxSlide;
|
|
2496
2969
|
transition: PptxSlideTransition;
|
|
2497
2970
|
} | null>;
|
|
2971
|
+
/** Click-stepped element-animation playback for the current slide. */
|
|
2972
|
+
protected readonly playback: AnimationPlaybackService;
|
|
2973
|
+
/** Ink-annotation state (pen/highlighter/eraser/laser) for the show. */
|
|
2974
|
+
protected readonly annotations: PresentationAnnotationsService;
|
|
2975
|
+
/** Whether the live-caption bar is shown. */
|
|
2976
|
+
protected readonly subtitlesVisible: _angular_core.WritableSignal<boolean>;
|
|
2977
|
+
/** The slide stage root — animation styles are applied to its elements. */
|
|
2978
|
+
private readonly stageRef;
|
|
2979
|
+
constructor();
|
|
2980
|
+
/**
|
|
2981
|
+
* Imperatively apply animation reveal / pending CSS to the slide's element
|
|
2982
|
+
* nodes (mirrors the Vue `applyAnimationStyles`). Every renderer emits a
|
|
2983
|
+
* `data-element-id`, so this needs no per-element renderer plumbing.
|
|
2984
|
+
*/
|
|
2985
|
+
private applyAnimationStyles;
|
|
2498
2986
|
/** Viewport dimensions — updated on resize. */
|
|
2499
2987
|
private readonly viewportW;
|
|
2500
2988
|
private readonly viewportH;
|
|
@@ -2528,6 +3016,10 @@ declare class PresentationOverlayComponent implements OnInit, OnDestroy {
|
|
|
2528
3016
|
onKeyDown(event: KeyboardEvent): void;
|
|
2529
3017
|
/** Left-click on the slide area advances to the next visible slide. */
|
|
2530
3018
|
protected onBodyClick(event: MouseEvent): void;
|
|
3019
|
+
/** Toggle an annotation tool (clicking the active one disarms it). */
|
|
3020
|
+
protected selectTool(tool: 'pen' | 'highlighter' | 'eraser' | 'laser'): void;
|
|
3021
|
+
/** Toggle the live-caption (subtitle) bar. */
|
|
3022
|
+
protected toggleSubtitles(): void;
|
|
2531
3023
|
/** Close button click — stop propagation so it does not also advance. */
|
|
2532
3024
|
protected onClose(event: MouseEvent): void;
|
|
2533
3025
|
/**
|
|
@@ -2741,6 +3233,10 @@ declare class InspectorPanelComponent {
|
|
|
2741
3233
|
protected onPatch(patch: Partial<PptxElement>): void;
|
|
2742
3234
|
/** Commit a fully-replaced element (table/chart data editors) as one history entry. */
|
|
2743
3235
|
protected onElementReplace(updated: PptxElement): void;
|
|
3236
|
+
/** The active slide's element-animation list (animations live on the slide). */
|
|
3237
|
+
protected readonly slideAnimations: _angular_core.Signal<readonly PptxElementAnimation[]>;
|
|
3238
|
+
/** Commit an updated slide-level animation list as one history entry. */
|
|
3239
|
+
protected onAnimationsChange(animations: PptxElementAnimation[]): void;
|
|
2744
3240
|
protected onPositionChange(event: Event, axis: 'x' | 'y'): void;
|
|
2745
3241
|
protected onSizeChange(event: Event, dim: 'width' | 'height'): void;
|
|
2746
3242
|
protected onRotationChange(event: Event): void;
|
|
@@ -3031,6 +3527,271 @@ declare class ChartDataEditorComponent {
|
|
|
3031
3527
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChartDataEditorComponent, "pptx-chart-data-editor", never, { "element": { "alias": "element"; "required": true; "isSignal": true; }; "canEdit": { "alias": "canEdit"; "required": false; "isSignal": true; }; }, { "elementChange": "elementChange"; }, never, never, true, never>;
|
|
3032
3528
|
}
|
|
3033
3529
|
|
|
3530
|
+
declare class AnimationAuthorPanelComponent {
|
|
3531
|
+
/** The selected element whose animation settings are being authored. */
|
|
3532
|
+
readonly element: _angular_core.InputSignal<PptxElement>;
|
|
3533
|
+
/** Zero-based index of the active slide (used by the orchestrator to commit). */
|
|
3534
|
+
readonly slideIndex: _angular_core.InputSignal<number>;
|
|
3535
|
+
/**
|
|
3536
|
+
* The active slide's full `PptxElementAnimation[]` array. Animations are
|
|
3537
|
+
* stored on the slide, NOT on the element — this component reads and
|
|
3538
|
+
* emits the entire array.
|
|
3539
|
+
*/
|
|
3540
|
+
readonly animations: _angular_core.InputSignal<readonly PptxElementAnimation[]>;
|
|
3541
|
+
/**
|
|
3542
|
+
* Whether editing controls are enabled. When `false` all selects/inputs are
|
|
3543
|
+
* disabled. Defaults to `true`.
|
|
3544
|
+
*/
|
|
3545
|
+
readonly canEdit: _angular_core.InputSignal<boolean>;
|
|
3546
|
+
/**
|
|
3547
|
+
* Emits the full updated `PptxElementAnimation[]` whenever a change is made.
|
|
3548
|
+
* The orchestrator should apply this via:
|
|
3549
|
+
* `EditorStateService.updateSlide(slideIndex(), { animations: $event })`
|
|
3550
|
+
*/
|
|
3551
|
+
readonly animationsChange: _angular_core.OutputEmitterRef<PptxElementAnimation[]>;
|
|
3552
|
+
protected readonly entrancePresets: readonly {
|
|
3553
|
+
value: PptxAnimationPreset;
|
|
3554
|
+
label: string;
|
|
3555
|
+
}[];
|
|
3556
|
+
protected readonly exitPresets: readonly {
|
|
3557
|
+
value: PptxAnimationPreset;
|
|
3558
|
+
label: string;
|
|
3559
|
+
}[];
|
|
3560
|
+
protected readonly emphasisPresets: readonly {
|
|
3561
|
+
value: PptxAnimationPreset;
|
|
3562
|
+
label: string;
|
|
3563
|
+
}[];
|
|
3564
|
+
protected readonly triggerOptions: readonly {
|
|
3565
|
+
value: PptxAnimationTrigger;
|
|
3566
|
+
label: string;
|
|
3567
|
+
}[];
|
|
3568
|
+
protected readonly timingCurveOptions: readonly {
|
|
3569
|
+
value: PptxAnimationTimingCurve;
|
|
3570
|
+
label: string;
|
|
3571
|
+
}[];
|
|
3572
|
+
protected readonly repeatModeOptions: readonly {
|
|
3573
|
+
value: "none" | PptxAnimationRepeatMode;
|
|
3574
|
+
label: string;
|
|
3575
|
+
}[];
|
|
3576
|
+
protected readonly directionOptions: readonly {
|
|
3577
|
+
value: PptxAnimationDirection;
|
|
3578
|
+
label: string;
|
|
3579
|
+
arrow: string;
|
|
3580
|
+
}[];
|
|
3581
|
+
protected readonly sequenceOptions: readonly {
|
|
3582
|
+
value: PptxAnimationSequence;
|
|
3583
|
+
label: string;
|
|
3584
|
+
}[];
|
|
3585
|
+
/**
|
|
3586
|
+
* Changes only when a *different* element is selected. Used as the
|
|
3587
|
+
* `data-el-key` attribute to key number inputs so Angular's [value]
|
|
3588
|
+
* binding is never rewritten mid-edit.
|
|
3589
|
+
*/
|
|
3590
|
+
protected readonly elementKey: _angular_core.Signal<string>;
|
|
3591
|
+
/** The animation entry for the currently selected element, if any. */
|
|
3592
|
+
protected readonly current: _angular_core.Signal<PptxElementAnimation | undefined>;
|
|
3593
|
+
/** True when the element has at least one effect (entrance/exit/emphasis). */
|
|
3594
|
+
protected readonly currentHasAnimation: _angular_core.Signal<boolean>;
|
|
3595
|
+
/** True when the active preset exposes a direction picker. */
|
|
3596
|
+
protected readonly currentShowDirection: _angular_core.Signal<boolean>;
|
|
3597
|
+
/**
|
|
3598
|
+
* Stable seed for number inputs — recomputed only on element change so
|
|
3599
|
+
* live typing does not reset the input value while the user is mid-edit.
|
|
3600
|
+
*/
|
|
3601
|
+
protected readonly seed: _angular_core.Signal<{
|
|
3602
|
+
durationMs: number;
|
|
3603
|
+
delayMs: number;
|
|
3604
|
+
repeatCount: number;
|
|
3605
|
+
}>;
|
|
3606
|
+
/** Human-readable order label (1-based, e.g. "2 of 4"). */
|
|
3607
|
+
protected readonly orderLabel: _angular_core.Signal<string>;
|
|
3608
|
+
/**
|
|
3609
|
+
* Elements on the slide excluding the selected element — used to populate
|
|
3610
|
+
* the trigger-shape selector. The slide's elements are not available in this
|
|
3611
|
+
* component's inputs, so the orchestrator must pass them in via
|
|
3612
|
+
* `[animations]` indirectly; here we surface only what we have access to.
|
|
3613
|
+
*
|
|
3614
|
+
* NOTE: The trigger-shape dropdown is limited to element ids because this
|
|
3615
|
+
* panel does not receive the full slide element list. The orchestrator can
|
|
3616
|
+
* replace this with a richer element label by wrapping the component or
|
|
3617
|
+
* projecting content. This matches the React implementation which used
|
|
3618
|
+
* `activeSlide.elements`.
|
|
3619
|
+
*/
|
|
3620
|
+
protected readonly otherElements: _angular_core.Signal<{
|
|
3621
|
+
id: string;
|
|
3622
|
+
}[]>;
|
|
3623
|
+
private emit;
|
|
3624
|
+
protected onEntranceChange(event: Event): void;
|
|
3625
|
+
protected onExitChange(event: Event): void;
|
|
3626
|
+
protected onEmphasisChange(event: Event): void;
|
|
3627
|
+
protected onTriggerChange(event: Event): void;
|
|
3628
|
+
protected onTriggerShapeChange(event: Event): void;
|
|
3629
|
+
protected onDurationChange(event: Event): void;
|
|
3630
|
+
protected onDelayChange(event: Event): void;
|
|
3631
|
+
protected onTimingCurveChange(event: Event): void;
|
|
3632
|
+
protected onRepeatCountChange(event: Event): void;
|
|
3633
|
+
protected onRepeatModeChange(event: Event): void;
|
|
3634
|
+
protected onDirectionChange(dir: PptxAnimationDirection): void;
|
|
3635
|
+
protected onSequenceChange(event: Event): void;
|
|
3636
|
+
protected onMoveUp(): void;
|
|
3637
|
+
protected onMoveDown(): void;
|
|
3638
|
+
protected onRemove(): void;
|
|
3639
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AnimationAuthorPanelComponent, never>;
|
|
3640
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AnimationAuthorPanelComponent, "pptx-animation-author-panel", never, { "element": { "alias": "element"; "required": true; "isSignal": true; }; "slideIndex": { "alias": "slideIndex"; "required": true; "isSignal": true; }; "animations": { "alias": "animations"; "required": true; "isSignal": true; }; "canEdit": { "alias": "canEdit"; "required": false; "isSignal": true; }; }, { "animationsChange": "animationsChange"; }, never, never, true, never>;
|
|
3641
|
+
}
|
|
3642
|
+
|
|
3643
|
+
/** Internal action descriptor used to build the bar. */
|
|
3644
|
+
interface BarAction {
|
|
3645
|
+
key: string;
|
|
3646
|
+
label: string;
|
|
3647
|
+
/** SVG path data for the icon (24 × 24 view-box). */
|
|
3648
|
+
svgPath: string;
|
|
3649
|
+
disabled: boolean;
|
|
3650
|
+
active?: boolean;
|
|
3651
|
+
badge?: number;
|
|
3652
|
+
emit: () => void;
|
|
3653
|
+
}
|
|
3654
|
+
declare class MobileBottomBarComponent {
|
|
3655
|
+
/** Zero-based index of the currently displayed slide. */
|
|
3656
|
+
readonly activeIndex: _angular_core.InputSignal<number>;
|
|
3657
|
+
/** Total number of slides in the presentation. */
|
|
3658
|
+
readonly slideCount: _angular_core.InputSignal<number>;
|
|
3659
|
+
/** Whether the "Present" action should be available. */
|
|
3660
|
+
readonly canPresent: _angular_core.InputSignal<boolean>;
|
|
3661
|
+
/** Whether the mobile-menu sheet is currently open (highlights the button). */
|
|
3662
|
+
readonly menuOpen: _angular_core.InputSignal<boolean>;
|
|
3663
|
+
/** Whether the slides thumbnail sheet is currently open. */
|
|
3664
|
+
readonly slidesOpen: _angular_core.InputSignal<boolean>;
|
|
3665
|
+
/** User tapped the previous-slide button. */
|
|
3666
|
+
readonly prev: _angular_core.OutputEmitterRef<void>;
|
|
3667
|
+
/** User tapped the next-slide button. */
|
|
3668
|
+
readonly next: _angular_core.OutputEmitterRef<void>;
|
|
3669
|
+
/** User tapped the Present button. */
|
|
3670
|
+
readonly present: _angular_core.OutputEmitterRef<void>;
|
|
3671
|
+
/** User tapped the Slide Sorter button. */
|
|
3672
|
+
readonly openSorter: _angular_core.OutputEmitterRef<void>;
|
|
3673
|
+
/** User tapped the Find button. */
|
|
3674
|
+
readonly openFind: _angular_core.OutputEmitterRef<void>;
|
|
3675
|
+
/** User tapped the Slides thumbnail strip button. */
|
|
3676
|
+
readonly openSlides: _angular_core.OutputEmitterRef<void>;
|
|
3677
|
+
/** User tapped the menu (⋯) button. */
|
|
3678
|
+
readonly toggleMenu: _angular_core.OutputEmitterRef<void>;
|
|
3679
|
+
readonly actions: _angular_core.Signal<BarAction[]>;
|
|
3680
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MobileBottomBarComponent, never>;
|
|
3681
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MobileBottomBarComponent, "pptx-mobile-bottom-bar", never, { "activeIndex": { "alias": "activeIndex"; "required": false; "isSignal": true; }; "slideCount": { "alias": "slideCount"; "required": false; "isSignal": true; }; "canPresent": { "alias": "canPresent"; "required": false; "isSignal": true; }; "menuOpen": { "alias": "menuOpen"; "required": false; "isSignal": true; }; "slidesOpen": { "alias": "slidesOpen"; "required": false; "isSignal": true; }; }, { "prev": "prev"; "next": "next"; "present": "present"; "openSorter": "openSorter"; "openFind": "openFind"; "openSlides": "openSlides"; "toggleMenu": "toggleMenu"; }, never, never, true, never>;
|
|
3682
|
+
}
|
|
3683
|
+
|
|
3684
|
+
/** Descriptor for a single menu row. */
|
|
3685
|
+
interface MenuRow {
|
|
3686
|
+
key: string;
|
|
3687
|
+
label: string;
|
|
3688
|
+
sublabel?: string;
|
|
3689
|
+
/** SVG path data (24 × 24 view-box). */
|
|
3690
|
+
svgPath: string;
|
|
3691
|
+
disabled?: boolean;
|
|
3692
|
+
active?: boolean;
|
|
3693
|
+
danger?: boolean;
|
|
3694
|
+
emit: () => void;
|
|
3695
|
+
}
|
|
3696
|
+
declare class MobileMenuSheetComponent {
|
|
3697
|
+
/** Whether the sheet is visible. */
|
|
3698
|
+
readonly open: _angular_core.InputSignal<boolean>;
|
|
3699
|
+
/** Total slide count — gates export/present actions. */
|
|
3700
|
+
readonly slideCount: _angular_core.InputSignal<number>;
|
|
3701
|
+
/** True while an export is running (labels update, actions are disabled). */
|
|
3702
|
+
readonly exporting: _angular_core.InputSignal<boolean>;
|
|
3703
|
+
/** Whether the speaker-notes panel is currently open. */
|
|
3704
|
+
readonly showNotes: _angular_core.InputSignal<boolean>;
|
|
3705
|
+
/** Whether editor-only actions (find-replace etc.) are available. */
|
|
3706
|
+
readonly canEdit: _angular_core.InputSignal<boolean>;
|
|
3707
|
+
/** Sheet dismissed (backdrop tap, swipe, or Escape). */
|
|
3708
|
+
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
3709
|
+
/** Open the find-in-slides bar. */
|
|
3710
|
+
readonly openFind: _angular_core.OutputEmitterRef<void>;
|
|
3711
|
+
/** Open the slide-sorter overlay. */
|
|
3712
|
+
readonly openSorter: _angular_core.OutputEmitterRef<void>;
|
|
3713
|
+
/** Toggle the speaker-notes panel. */
|
|
3714
|
+
readonly toggleNotes: _angular_core.OutputEmitterRef<void>;
|
|
3715
|
+
/** Start the fullscreen presentation mode. */
|
|
3716
|
+
readonly present: _angular_core.OutputEmitterRef<void>;
|
|
3717
|
+
/** Export the current slide as PNG. */
|
|
3718
|
+
readonly exportPng: _angular_core.OutputEmitterRef<void>;
|
|
3719
|
+
/** Export the deck as PDF. */
|
|
3720
|
+
readonly exportPdf: _angular_core.OutputEmitterRef<void>;
|
|
3721
|
+
/** Export the deck as an animated GIF. */
|
|
3722
|
+
readonly exportGif: _angular_core.OutputEmitterRef<void>;
|
|
3723
|
+
/** Export the deck as a video. */
|
|
3724
|
+
readonly exportVideo: _angular_core.OutputEmitterRef<void>;
|
|
3725
|
+
/** Open the print dialog. */
|
|
3726
|
+
readonly print: _angular_core.OutputEmitterRef<void>;
|
|
3727
|
+
readonly rows: _angular_core.Signal<MenuRow[]>;
|
|
3728
|
+
/**
|
|
3729
|
+
* Emit the row's action and close the sheet so the user returns to the
|
|
3730
|
+
* presentation immediately.
|
|
3731
|
+
*/
|
|
3732
|
+
onRowClick(row: MenuRow): void;
|
|
3733
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MobileMenuSheetComponent, never>;
|
|
3734
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MobileMenuSheetComponent, "pptx-mobile-menu-sheet", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "slideCount": { "alias": "slideCount"; "required": false; "isSignal": true; }; "exporting": { "alias": "exporting"; "required": false; "isSignal": true; }; "showNotes": { "alias": "showNotes"; "required": false; "isSignal": true; }; "canEdit": { "alias": "canEdit"; "required": false; "isSignal": true; }; }, { "closed": "closed"; "openFind": "openFind"; "openSorter": "openSorter"; "toggleNotes": "toggleNotes"; "present": "present"; "exportPng": "exportPng"; "exportPdf": "exportPdf"; "exportGif": "exportGif"; "exportVideo": "exportVideo"; "print": "print"; }, never, never, true, never>;
|
|
3735
|
+
}
|
|
3736
|
+
|
|
3737
|
+
declare class MobileSlidesSheetComponent {
|
|
3738
|
+
/** Whether the sheet is visible. */
|
|
3739
|
+
readonly open: _angular_core.InputSignal<boolean>;
|
|
3740
|
+
/** The full slide array to display as thumbnails. */
|
|
3741
|
+
readonly slides: _angular_core.InputSignal<readonly PptxSlide[]>;
|
|
3742
|
+
/** Natural (100 %) canvas dimensions forwarded to each SlideCanvasComponent. */
|
|
3743
|
+
readonly canvasSize: _angular_core.InputSignal<CanvasSize>;
|
|
3744
|
+
/** Media asset lookup table forwarded to each SlideCanvasComponent. */
|
|
3745
|
+
readonly mediaDataUrls: _angular_core.InputSignal<Map<string, string>>;
|
|
3746
|
+
/** Zero-based index of the currently active slide (highlighted). */
|
|
3747
|
+
readonly activeIndex: _angular_core.InputSignal<number>;
|
|
3748
|
+
/** Emits when the user dismisses the sheet without selecting a slide. */
|
|
3749
|
+
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
3750
|
+
/**
|
|
3751
|
+
* Emits the zero-based index of the slide the user tapped. The orchestrator
|
|
3752
|
+
* should call `goTo(index)` and then close this sheet.
|
|
3753
|
+
*/
|
|
3754
|
+
readonly jumpToSlide: _angular_core.OutputEmitterRef<number>;
|
|
3755
|
+
/** Zoom level that fits THUMB_W pixels wide. */
|
|
3756
|
+
readonly thumbZoom: _angular_core.Signal<number>;
|
|
3757
|
+
/** Pixel height for the clip box (aspect-correct). */
|
|
3758
|
+
readonly thumbH: _angular_core.Signal<number>;
|
|
3759
|
+
/** ngStyle for the clipping wrapper. */
|
|
3760
|
+
readonly clipStyle: _angular_core.Signal<Record<string, string>>;
|
|
3761
|
+
onThumbClick(index: number): void;
|
|
3762
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MobileSlidesSheetComponent, never>;
|
|
3763
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MobileSlidesSheetComponent, "pptx-mobile-slides-sheet", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "slides": { "alias": "slides"; "required": false; "isSignal": true; }; "canvasSize": { "alias": "canvasSize"; "required": true; "isSignal": true; }; "mediaDataUrls": { "alias": "mediaDataUrls"; "required": false; "isSignal": true; }; "activeIndex": { "alias": "activeIndex"; "required": false; "isSignal": true; }; }, { "closed": "closed"; "jumpToSlide": "jumpToSlide"; }, never, never, true, never>;
|
|
3764
|
+
}
|
|
3765
|
+
|
|
3766
|
+
declare class MobileSheetComponent {
|
|
3767
|
+
/** Controls whether the sheet is visible. */
|
|
3768
|
+
readonly open: _angular_core.InputSignal<boolean>;
|
|
3769
|
+
/** Optional header text displayed above the body. */
|
|
3770
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
3771
|
+
/**
|
|
3772
|
+
* Height of the sheet as a fraction of the viewport height (0–1).
|
|
3773
|
+
* Ignored when `fullScreen` is true.
|
|
3774
|
+
*/
|
|
3775
|
+
readonly heightFraction: _angular_core.InputSignal<number>;
|
|
3776
|
+
/** When true, the sheet occupies the full viewport height. */
|
|
3777
|
+
readonly fullScreen: _angular_core.InputSignal<boolean>;
|
|
3778
|
+
/** Emits when the user closes the sheet (backdrop tap, swipe, or Escape). */
|
|
3779
|
+
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
3780
|
+
private _dragStartY;
|
|
3781
|
+
private _dragPointerId;
|
|
3782
|
+
/** Current translateY applied during an active drag (px). */
|
|
3783
|
+
readonly dragY: _angular_core.WritableSignal<number>;
|
|
3784
|
+
/** Whether a drag is in progress (suppresses CSS transition during drag). */
|
|
3785
|
+
readonly isDragging: _angular_core.WritableSignal<boolean>;
|
|
3786
|
+
readonly panelStyle: _angular_core.Signal<Record<string, string>>;
|
|
3787
|
+
onDocumentKeydown(event: KeyboardEvent): void;
|
|
3788
|
+
onPointerDown(event: PointerEvent): void;
|
|
3789
|
+
onPointerMove(event: PointerEvent): void;
|
|
3790
|
+
onPointerUp(event: PointerEvent): void;
|
|
3791
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MobileSheetComponent, never>;
|
|
3792
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MobileSheetComponent, "pptx-mobile-sheet", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "heightFraction": { "alias": "heightFraction"; "required": false; "isSignal": true; }; "fullScreen": { "alias": "fullScreen"; "required": false; "isSignal": true; }; }, { "closed": "closed"; }, never, ["*"], true, never>;
|
|
3793
|
+
}
|
|
3794
|
+
|
|
3034
3795
|
/**
|
|
3035
3796
|
* SlidesPanelComponent — vertical slide-strip for the editor sidebar.
|
|
3036
3797
|
*
|
|
@@ -4228,64 +4989,6 @@ interface EmbeddedFontStyles {
|
|
|
4228
4989
|
*/
|
|
4229
4990
|
declare function buildEmbeddedFontStyles(fonts: readonly PptxEmbeddedFont[] | null | undefined, mintObjectUrl: ObjectUrlFactory): EmbeddedFontStyles;
|
|
4230
4991
|
|
|
4231
|
-
/**
|
|
4232
|
-
* animation-playback-helpers.ts
|
|
4233
|
-
*
|
|
4234
|
-
* Pure functions backing {@link AnimationPlaybackService} and
|
|
4235
|
-
* {@link AnimationPanelComponent}. Exported separately so they can be
|
|
4236
|
-
* unit-tested without TestBed (vitest + happy-dom).
|
|
4237
|
-
*
|
|
4238
|
-
* A slide carries an ordered list of {@link PptxElementAnimation}s. PowerPoint
|
|
4239
|
-
* groups them into "click groups": an animation triggered `onClick` /
|
|
4240
|
-
* `onShapeClick` / `onHover` starts a new group, while `withPrevious` /
|
|
4241
|
-
* `afterPrevious` / `afterDelay` animations fold into the group that precedes
|
|
4242
|
-
* them (running together or sequentially within that group). Advancing the
|
|
4243
|
-
* presentation one step reveals one more click group.
|
|
4244
|
-
*
|
|
4245
|
-
* Everything here is framework-light: only the preset → CSS mapping is
|
|
4246
|
-
* delegated to {@link resolveAnimationCss} / {@link initialHiddenStyle} from
|
|
4247
|
-
* the shared render layer.
|
|
4248
|
-
*/
|
|
4249
|
-
|
|
4250
|
-
/** Minimal CSS-properties shape: kebab-case property → value. */
|
|
4251
|
-
type CSSProperties = Record<string, string>;
|
|
4252
|
-
/** A single click-triggered group of animations that play as one step. */
|
|
4253
|
-
interface AnimationClickGroup {
|
|
4254
|
-
/** Animations belonging to this group, in document order. */
|
|
4255
|
-
animations: PptxElementAnimation[];
|
|
4256
|
-
}
|
|
4257
|
-
/**
|
|
4258
|
-
* Splits an ordered animation list into click groups. The first animation
|
|
4259
|
-
* always begins a group even if it isn't explicitly `onClick` (PowerPoint shows
|
|
4260
|
-
* the first build on the first advance). Subsequent `withPrevious` /
|
|
4261
|
-
* `afterPrevious` animations attach to the group in progress.
|
|
4262
|
-
*/
|
|
4263
|
-
declare function buildClickGroups(animations: readonly PptxElementAnimation[]): AnimationClickGroup[];
|
|
4264
|
-
/** Clamp a step into `[0, count]`. */
|
|
4265
|
-
declare function clampStep(value: number, count: number): number;
|
|
4266
|
-
/**
|
|
4267
|
-
* Reveal the next click group. Returns the next step, clamped to `count`.
|
|
4268
|
-
* Equivalent to `clampStep(step + 1, count)`.
|
|
4269
|
-
*/
|
|
4270
|
-
declare function advanceStep(step: number, count: number): number;
|
|
4271
|
-
/** Parse the numeric ms duration out of a resolved style's `animation-duration`. */
|
|
4272
|
-
declare function durationOf(style: CSSProperties): number;
|
|
4273
|
-
/**
|
|
4274
|
-
* Resolve the CSS for every animation in the revealed groups (the first `step`
|
|
4275
|
-
* groups). Within a group, `afterPrevious` animations are pushed back by the
|
|
4276
|
-
* accumulated duration of the preceding animations so sequential chains play in
|
|
4277
|
-
* order; `withPrevious` shares the running delay. The last write for an element
|
|
4278
|
-
* id wins (a later emphasis/exit overrides an earlier entrance), matching how a
|
|
4279
|
-
* single CSS `animation` shorthand can only hold one running effect.
|
|
4280
|
-
*/
|
|
4281
|
-
declare function revealedElementStyles(groups: readonly AnimationClickGroup[], step: number): Map<string, CSSProperties>;
|
|
4282
|
-
/**
|
|
4283
|
-
* Elements with a pending entrance (in a not-yet-revealed group, i.e. groups at
|
|
4284
|
-
* or beyond `step`) that should be hidden until their group plays. An element
|
|
4285
|
-
* an already-revealed group made visible is never re-hidden.
|
|
4286
|
-
*/
|
|
4287
|
-
declare function pendingElementStyles(groups: readonly AnimationClickGroup[], step: number): Map<string, CSSProperties>;
|
|
4288
|
-
|
|
4289
4992
|
/** A single rendered playback step (one click group). */
|
|
4290
4993
|
interface AnimationStepView {
|
|
4291
4994
|
/** 1-based step number for display. */
|
|
@@ -4314,79 +5017,6 @@ declare class AnimationPanelComponent {
|
|
|
4314
5017
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AnimationPanelComponent, "pptx-animation-panel", never, { "groups": { "alias": "groups"; "required": true; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "isPlaying": { "alias": "isPlaying"; "required": false; "isSignal": true; }; }, { "playRequested": "playRequested"; "pauseRequested": "pauseRequested"; "stepRequested": "stepRequested"; "resetRequested": "resetRequested"; "seek": "seek"; }, never, never, true, never>;
|
|
4315
5018
|
}
|
|
4316
5019
|
|
|
4317
|
-
declare class AnimationPlaybackService {
|
|
4318
|
-
private readonly destroyRef;
|
|
4319
|
-
/** The current slide's animations, in document/timeline order. */
|
|
4320
|
-
private readonly animations;
|
|
4321
|
-
/**
|
|
4322
|
-
* Externally-controlled playback step (e.g. derived from a parent click
|
|
4323
|
-
* counter). `undefined` means there is no external driver. The internal
|
|
4324
|
-
* manual step (set via advance/play/reset) takes precedence when present.
|
|
4325
|
-
*/
|
|
4326
|
-
private readonly externalIndex;
|
|
4327
|
-
/**
|
|
4328
|
-
* Internal, unclamped step. `null` means "follow the external index"; any
|
|
4329
|
-
* number means the host has taken manual control via advance/play/reset.
|
|
4330
|
-
*/
|
|
4331
|
-
private readonly manualStep;
|
|
4332
|
-
/** Click groups for the current slide's animations. */
|
|
4333
|
-
readonly groups: _angular_core.Signal<AnimationClickGroup[]>;
|
|
4334
|
-
/** Number of click groups on this slide (i.e. how many `advance()` steps). */
|
|
4335
|
-
readonly groupCount: _angular_core.Signal<number>;
|
|
4336
|
-
/**
|
|
4337
|
-
* The current playback step: how many click groups have been revealed.
|
|
4338
|
-
* Always clamped to the current group count. The manual override wins;
|
|
4339
|
-
* otherwise it follows the external index, defaulting to 0.
|
|
4340
|
-
*/
|
|
4341
|
-
readonly step: _angular_core.Signal<number>;
|
|
4342
|
-
/** True when every click group has been revealed. */
|
|
4343
|
-
readonly isComplete: _angular_core.Signal<boolean>;
|
|
4344
|
-
/**
|
|
4345
|
-
* Reactive map of `elementId → CSS properties` to apply for the current step.
|
|
4346
|
-
* Only elements in revealed click groups appear.
|
|
4347
|
-
*/
|
|
4348
|
-
readonly elementStyles: _angular_core.Signal<Map<string, CSSProperties>>;
|
|
4349
|
-
/**
|
|
4350
|
-
* Reactive map of `elementId → CSS properties` for elements whose entrance
|
|
4351
|
-
* has not yet been revealed (they should be hidden so they don't flash
|
|
4352
|
-
* visible before their group plays).
|
|
4353
|
-
*/
|
|
4354
|
-
readonly pendingStyles: _angular_core.Signal<Map<string, CSSProperties>>;
|
|
4355
|
-
/** Handle of the scheduled rAF auto-advance, or null when idle. */
|
|
4356
|
-
private rafHandle;
|
|
4357
|
-
constructor();
|
|
4358
|
-
/** Feed the current slide's animation list. Resets manual control. */
|
|
4359
|
-
setAnimations(animations: readonly PptxElementAnimation[] | undefined): void;
|
|
4360
|
-
/** Update the external playback index (parent-driven build counter). */
|
|
4361
|
-
setExternalIndex(index: number | undefined): void;
|
|
4362
|
-
/**
|
|
4363
|
-
* Reveal the next click group. Returns `true` if a group was revealed,
|
|
4364
|
-
* `false` if playback was already complete (so the caller can fall through
|
|
4365
|
-
* to slide navigation).
|
|
4366
|
-
*/
|
|
4367
|
-
advance(): boolean;
|
|
4368
|
-
/** Reveal every click group at once (jump to the slide's final state). */
|
|
4369
|
-
play(): void;
|
|
4370
|
-
/** Reset playback to before the first click group. */
|
|
4371
|
-
reset(): void;
|
|
4372
|
-
/**
|
|
4373
|
-
* Jump directly to a given step (clamped to the group count) and take manual
|
|
4374
|
-
* control. Useful for scrubbing.
|
|
4375
|
-
*/
|
|
4376
|
-
setStep(step: number): void;
|
|
4377
|
-
/**
|
|
4378
|
-
* Auto-advance through every remaining click group on the animation frame,
|
|
4379
|
-
* one group per frame. Stops automatically once playback completes or the
|
|
4380
|
-
* service is destroyed. A no-op when already complete or when
|
|
4381
|
-
* `requestAnimationFrame` is unavailable (SSR).
|
|
4382
|
-
*/
|
|
4383
|
-
autoPlay(): void;
|
|
4384
|
-
/** Cancel any in-flight rAF auto-advance. */
|
|
4385
|
-
cancelAutoPlay(): void;
|
|
4386
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AnimationPlaybackService, never>;
|
|
4387
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AnimationPlaybackService>;
|
|
4388
|
-
}
|
|
4389
|
-
|
|
4390
5020
|
/** A positioned cursor view-model used by the template. */
|
|
4391
5021
|
interface PositionedCursor {
|
|
4392
5022
|
clientId: number | string;
|
|
@@ -4713,6 +5343,136 @@ declare class PrintSettingsPanelComponent {
|
|
|
4713
5343
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PrintSettingsPanelComponent, "pptx-print-settings-panel", never, { "settings": { "alias": "settings"; "required": true; "isSignal": true; }; "totalSlides": { "alias": "totalSlides"; "required": true; "isSignal": true; }; "activeSlideIndex": { "alias": "activeSlideIndex"; "required": true; "isSignal": true; }; }, { "settingsChange": "settingsChange"; }, never, never, true, never>;
|
|
4714
5344
|
}
|
|
4715
5345
|
|
|
5346
|
+
declare class PresentationAnnotationOverlayComponent {
|
|
5347
|
+
/** Logical canvas dimensions (the slide's authored size in pixels). */
|
|
5348
|
+
readonly canvasSize: _angular_core.InputSignal<CanvasSize>;
|
|
5349
|
+
/**
|
|
5350
|
+
* The zoom factor currently applied to the slide stage.
|
|
5351
|
+
* Pointer-event coordinates are divided by this value to obtain
|
|
5352
|
+
* slide-space coordinates.
|
|
5353
|
+
*/
|
|
5354
|
+
readonly zoom: _angular_core.InputSignal<number>;
|
|
5355
|
+
protected readonly service: PresentationAnnotationsService;
|
|
5356
|
+
private readonly svgRef;
|
|
5357
|
+
/** True while a pointer-down is active in eraser mode. */
|
|
5358
|
+
private _isErasing;
|
|
5359
|
+
/** True when any tool other than 'none' is armed. */
|
|
5360
|
+
protected readonly isArmed: _angular_core.Signal<boolean>;
|
|
5361
|
+
/** SVG viewBox string that covers the full canvas. */
|
|
5362
|
+
protected readonly viewBox: _angular_core.Signal<string>;
|
|
5363
|
+
/** CSS cursor for the outer wrapper div. */
|
|
5364
|
+
protected readonly wrapperStyle: _angular_core.Signal<Record<string, string>>;
|
|
5365
|
+
/** Transform the SVG to match the slide's zoom level. */
|
|
5366
|
+
protected readonly svgStyle: _angular_core.Signal<Record<string, string>>;
|
|
5367
|
+
/** All strokes to render: committed + the live in-progress stroke. */
|
|
5368
|
+
protected readonly allStrokes: _angular_core.Signal<pptx_angular_viewer.AnnotationStroke[]>;
|
|
5369
|
+
protected strokePath(points: Array<{
|
|
5370
|
+
x: number;
|
|
5371
|
+
y: number;
|
|
5372
|
+
}>): string;
|
|
5373
|
+
protected laserDotStyle(x: number, y: number): Record<string, string>;
|
|
5374
|
+
protected onPointerDown(event: PointerEvent): void;
|
|
5375
|
+
protected onPointerMove(event: PointerEvent): void;
|
|
5376
|
+
protected onPointerUp(event: PointerEvent): void;
|
|
5377
|
+
protected onPointerLeave(_event: PointerEvent): void;
|
|
5378
|
+
/**
|
|
5379
|
+
* Map a client-space pointer position to slide-space coordinates by
|
|
5380
|
+
* subtracting the SVG element's bounding rect and dividing by the zoom.
|
|
5381
|
+
* Returns `null` when the SVG ref is not yet available.
|
|
5382
|
+
*/
|
|
5383
|
+
private _toSlideCoords;
|
|
5384
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PresentationAnnotationOverlayComponent, never>;
|
|
5385
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PresentationAnnotationOverlayComponent, "pptx-presentation-annotation-overlay", never, { "canvasSize": { "alias": "canvasSize"; "required": true; "isSignal": true; }; "zoom": { "alias": "zoom"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
5386
|
+
}
|
|
5387
|
+
|
|
5388
|
+
/**
|
|
5389
|
+
* presentation-subtitle-helpers.ts — Pure helpers for the subtitle/caption bar.
|
|
5390
|
+
*
|
|
5391
|
+
* Isolates all text-segment logic so it can be unit-tested without DOM or
|
|
5392
|
+
* Angular dependencies.
|
|
5393
|
+
*
|
|
5394
|
+
* Ported from React:
|
|
5395
|
+
* packages/react/src/viewer/components/PresentationSubtitleBar.tsx
|
|
5396
|
+
*/
|
|
5397
|
+
/**
|
|
5398
|
+
* A single speech recognition alternative (best-guess transcript + confidence).
|
|
5399
|
+
* Matches the shape of the Web Speech API `SpeechRecognitionAlternative`.
|
|
5400
|
+
*/
|
|
5401
|
+
interface SpeechAlternative {
|
|
5402
|
+
readonly transcript: string;
|
|
5403
|
+
readonly confidence: number;
|
|
5404
|
+
}
|
|
5405
|
+
/**
|
|
5406
|
+
* One result from the recognition engine — array of alternatives plus a
|
|
5407
|
+
* `isFinal` flag that indicates whether this result is stable (true) or
|
|
5408
|
+
* still being refined (false, i.e. interim).
|
|
5409
|
+
*/
|
|
5410
|
+
interface SpeechResult {
|
|
5411
|
+
readonly isFinal: boolean;
|
|
5412
|
+
readonly length: number;
|
|
5413
|
+
readonly [index: number]: SpeechAlternative;
|
|
5414
|
+
}
|
|
5415
|
+
/**
|
|
5416
|
+
* The list of all results accumulated in a recognition session.
|
|
5417
|
+
*/
|
|
5418
|
+
interface SpeechResultList {
|
|
5419
|
+
readonly length: number;
|
|
5420
|
+
readonly [index: number]: SpeechResult;
|
|
5421
|
+
}
|
|
5422
|
+
/**
|
|
5423
|
+
* Subset of `SpeechRecognitionEvent` — just what we need.
|
|
5424
|
+
*/
|
|
5425
|
+
interface SpeechRecognitionEventLite {
|
|
5426
|
+
readonly resultIndex: number;
|
|
5427
|
+
readonly results: SpeechResultList;
|
|
5428
|
+
}
|
|
5429
|
+
/**
|
|
5430
|
+
* Structural interface matching the Web Speech API `SpeechRecognition` object.
|
|
5431
|
+
* Kept minimal so we only depend on what we actually use.
|
|
5432
|
+
*/
|
|
5433
|
+
interface SpeechRecognitionLite extends EventTarget {
|
|
5434
|
+
continuous: boolean;
|
|
5435
|
+
interimResults: boolean;
|
|
5436
|
+
lang: string;
|
|
5437
|
+
onresult: ((event: SpeechRecognitionEventLite) => void) | null;
|
|
5438
|
+
onerror: ((event: Event) => void) | null;
|
|
5439
|
+
onend: (() => void) | null;
|
|
5440
|
+
start: () => void;
|
|
5441
|
+
stop: () => void;
|
|
5442
|
+
}
|
|
5443
|
+
/** Constructor signature for the speech recognition object. */
|
|
5444
|
+
type SpeechRecognitionCtor = new () => SpeechRecognitionLite;
|
|
5445
|
+
|
|
5446
|
+
declare class PresentationSubtitleBarComponent implements OnChanges {
|
|
5447
|
+
/** Show the subtitle bar and start speech recognition when true. */
|
|
5448
|
+
readonly visible: _angular_core.InputSignal<boolean>;
|
|
5449
|
+
private readonly _captionText;
|
|
5450
|
+
private readonly _supportState;
|
|
5451
|
+
/** The text string rendered in the caption bar. */
|
|
5452
|
+
protected readonly displayText: _angular_core.WritableSignal<string>;
|
|
5453
|
+
/**
|
|
5454
|
+
* Whether the recognition session should remain running.
|
|
5455
|
+
* Toggled on `visible` changes; checked in `onend` to decide whether
|
|
5456
|
+
* to restart.
|
|
5457
|
+
*/
|
|
5458
|
+
private _shouldRun;
|
|
5459
|
+
/** Active recognition instance, or null when stopped. */
|
|
5460
|
+
private _recognition;
|
|
5461
|
+
private readonly _destroyRef;
|
|
5462
|
+
constructor();
|
|
5463
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
5464
|
+
private _startRecognition;
|
|
5465
|
+
private _stopRecognition;
|
|
5466
|
+
/**
|
|
5467
|
+
* Thin wrapper around {@link getSpeechRecognitionCtor} so tests can spy on
|
|
5468
|
+
* or override this method without patching `globalThis`.
|
|
5469
|
+
*/
|
|
5470
|
+
protected _getSpeechCtor(): SpeechRecognitionCtor | null;
|
|
5471
|
+
private _updateDisplayText;
|
|
5472
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PresentationSubtitleBarComponent, never>;
|
|
5473
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PresentationSubtitleBarComponent, "pptx-presentation-subtitle-bar", never, { "visible": { "alias": "visible"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
5474
|
+
}
|
|
5475
|
+
|
|
4716
5476
|
/**
|
|
4717
5477
|
* transition-helpers.ts
|
|
4718
5478
|
*
|
|
@@ -5010,6 +5770,31 @@ declare function getResolvedShapeClipPathFor(shapeType: string | undefined, widt
|
|
|
5010
5770
|
*/
|
|
5011
5771
|
declare function getResolvedShapeClipPath(element: PptxElement, width?: number, height?: number): string | undefined;
|
|
5012
5772
|
|
|
5773
|
+
/**
|
|
5774
|
+
* SVG path generators for WordArt text warp presets.
|
|
5775
|
+
*
|
|
5776
|
+
* Angular port of `packages/react/src/viewer/utils/warp-path-generators.ts`
|
|
5777
|
+
* and `packages/react/src/viewer/utils/warp-path-cascade.ts`.
|
|
5778
|
+
*
|
|
5779
|
+
* Each generator produces an SVG path `d` attribute for a single text line
|
|
5780
|
+
* at a given normalised vertical position (t: 0 = top, 1 = bottom).
|
|
5781
|
+
* All functions are pure and deterministic — no side-effects, no random/date.
|
|
5782
|
+
*/
|
|
5783
|
+
|
|
5784
|
+
/**
|
|
5785
|
+
* Presets that require SVG `<textPath>` rendering along a curved/circular path.
|
|
5786
|
+
* All other warp presets (envelope: inflate/deflate/can; simple: slant/fade/
|
|
5787
|
+
* cascade) are rendered with CSS transforms instead — see `text-warp.ts`'s
|
|
5788
|
+
* `getWarpCategory`, which this set must stay in sync with (the `'path'`
|
|
5789
|
+
* category). Listing a CSS preset here would wrongly route it to `<textPath>`.
|
|
5790
|
+
*/
|
|
5791
|
+
declare const SVG_WARP_PRESETS: ReadonlySet<string>;
|
|
5792
|
+
/** Returns `true` when the preset should use SVG `<textPath>` rendering. */
|
|
5793
|
+
declare function shouldUseSvgWarp(preset: PptxTextWarpPreset | undefined): boolean;
|
|
5794
|
+
/** Generate an SVG path `d` attribute for a warp preset at a given line position.
|
|
5795
|
+
* Optional adj/adj2 are raw OOXML adjustment values (1/60000th units). */
|
|
5796
|
+
declare function getWarpPath(preset: PptxTextWarpPreset, width: number, height: number, lineIndex: number, lineCount: number, adj?: number, adj2?: number): string;
|
|
5797
|
+
|
|
5013
5798
|
/**
|
|
5014
5799
|
* Slide-background style resolution.
|
|
5015
5800
|
*
|
|
@@ -5178,5 +5963,5 @@ declare function themeStyle(theme: ViewerTheme | undefined): Record<string, stri
|
|
|
5178
5963
|
type ClassValue = string | number | false | null | undefined;
|
|
5179
5964
|
declare function cn(...values: ClassValue[]): string;
|
|
5180
5965
|
|
|
5181
|
-
export { AccessibilityPanelComponent, AccessibilityService, AnimationPanelComponent, AnimationPlaybackService, BroadcastDialogComponent, CURSOR_PALETTE, ChartDataEditorComponent, ChartRendererComponent, CollaborationCursorsComponent, CollaborationService, CommentsPanelComponent, CommentsService, ConnectorRendererComponent, ConnectorTextOverlayComponent, DEFAULT_BROADCAST_SERVER_URL, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_FILL_COLOR, DEFAULT_PRINT_SETTINGS, DEFAULT_SLIDE_BACKGROUND, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_COLOR, EMBEDDED_FONTS_STYLE_ID, EditorContextMenuComponent, EditorHistory, EditorStateService, EditorToolbarComponent, EffectsPanelComponent, ElementRendererComponent, EmbeddedFontsService, EquationRendererComponent, ExportService, FindBarComponent, FindReplaceBarComponent, GradientPickerComponent, HANDOUT_OPTIONS, HyperlinkDialogComponent, InkRendererComponent, InspectorPanelComponent, LoadContentService, ModalDialogComponent, Model3DRendererComponent, OleRendererComponent, PowerPointViewerComponent, PresentationOverlayComponent, PresentationTransitionOverlayComponent, PresenterViewComponent, PrintDialogComponent, PrintService, PrintSettingsPanelComponent, PropertiesDialogComponent, RESIZE_HANDLES, SEVERITY_GROUPS, SEVERITY_LABELS, SLIDE_TRANSITION_KEYFRAMES, ShareDialogComponent, SignaturesPanelComponent, SignaturesService, SlideCanvasComponent, SlideSorterOverlayComponent, SlidesPanelComponent, SmartArtRendererComponent, TYPE_LABELS, TableDataEditorComponent, TableRendererComponent, TextAdvancedPanelComponent, VIEWER_THEME, WEBM_MIME_CANDIDATES, ZoomRendererComponent, addCommentToList, advanceStep, applyFindReplacements, applyMove, applyResize, assignUserColor, bringForward, bringToFront, buildBroadcastConfig, buildBroadcastViewerUrl, buildClearHyperlinkPatch, buildClickGroups, buildCollaborationConfig, buildCssGradientFromShapeStyle, buildDuotoneFilter, buildDuotoneFilterId, buildEmbeddedFontStyles, buildFontFaceRule, buildHyperlinkPatch, buildPatternFillCss, buildPrintDocument, buildPropertiesPatch, buildShareUrl, bulletIndentPx, canStartBroadcast, canStartShare, canUseClipboard, clampCursorPosition, clampGifDimensions, clampNotesFontSize, clampStep, cn, collectAccessibilityIssues, collectElementText, collectSlideText, computeHandoutLayout, computePageCount, computeSlideIndices, computeTimerProgress, convertOmmlToMathMl, countAccessibilityIssues, defaultCssVars, defaultRadius, defaultThemeColors, deleteElementsByIds, derivePresenceList, duplicateElementById, durationOf, encodeGif, estimatePageCount, findInSlides, fontMimeForFormat, formatAutoNumber, formatCursorLabel, formatElapsed, formatPropertyDate, formatTime, fpsToFrameIntervalMs, generateBroadcastRoomId, generateCommentId, getContainerStyle, getDuotoneFilterDef, getImageSrc, getPatternSvg, getResolvedShapeClipPath, getResolvedShapeClipPathFor, getShapeFillStrokeStyle, getSlideBackgroundStyle, getSlideTransitionAnimations, getTextBlockStyle, groupIssuesBySeverity, hasExistingLink, headerLabel, isInjectableUrl, isPpactionUrl, isSigned, isUrlSafe, isValidRoomId, issueTrackKey, issueTypeLabel, moveElementBy, msToFrameDelayCs, normalizeFontFormat, normalizeSlidesPerPage, ommlToMathml, overallStatus, pendingElementStyles, pickSupportedMimeType, planGifFrames, planVideoSegments, presenceToCursors, provideViewerTheme, recordWebm, removeCommentFromList, renderToCanvas, replaceInSlides, replaceMatch, resizeElement, resolveFontVariant, resolveHyperlinkHref, resolveParagraphBullet, resolvePresenterNotes, resolveTransitionDuration, revealedElementStyles, routeOrthogonalConnector, sanitizeColor, sanitizeSlideIndex, sanitizeUserName, searchSlides, seedBroadcastFields, seedHyperlinkDraft, seedPropertiesDraft, seedShareFields, segmentFrameCount, sendBackward, sendToBack, setElementPosition, signatureCountLabel, signatureKey, signatureTimestamp, signerName, statusKind, statusLabel, themeStyle, themeToCssVars, toggleCommentResolvedInList, updateElementById, validatePrintSettings, validateRoomId, waypointsToPathD, worstStatus };
|
|
5182
|
-
export type { AccessibilityIssueGroup, AnimationClickGroup, Box, BroadcastConfig, BroadcastDefaults, CSSProperties, CanvasSize, ClassValue, CollaborationConfig, CollaborationRole, Rect as ConnectorObstacle, Point as ConnectorPoint, ConnectorRouting, DocumentProperties, DuotoneFilterDef, EmbeddedFontStyles, FindOptions, FindResult, GifFrame, GifFramePlan, GifPlanOptions, HandoutSlidesPerPage, HyperlinkDraft, NotesSegmentViewModel, ObjectUrlFactory, OverallSignatureStatus, PresenterNotes, PrintColorMode, PrintDocumentOptions, PrintOrientation, PrintSettings, PrintSlideRange, PrintWhat, PropertiesDraft, RecordWebmOptions, RemoteCursor, RemotePresence, ReplaceResult, ResizeHandle, ResolvedFontVariant, ShareDefaults, ShareFormFields, SignatureStatusKind, SlideTransitionAnimations, StyleMap, TimerProgress, VideoPlanOptions, VideoSegmentPlan, ViewerTheme, ViewerThemeColors };
|
|
5966
|
+
export { AccessibilityPanelComponent, AccessibilityService, AnimationAuthorPanelComponent, AnimationPanelComponent, AnimationPlaybackService, BroadcastDialogComponent, CURSOR_PALETTE, ChartDataEditorComponent, ChartRendererComponent, CollaborationCursorsComponent, CollaborationService, CommentsPanelComponent, CommentsService, ConnectorRendererComponent, ConnectorTextOverlayComponent, DEFAULT_BROADCAST_SERVER_URL, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_FILL_COLOR, DEFAULT_PRINT_SETTINGS, DEFAULT_SLIDE_BACKGROUND, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_COLOR, EMBEDDED_FONTS_STYLE_ID, EditorContextMenuComponent, EditorHistory, EditorStateService, EditorToolbarComponent, EffectsPanelComponent, ElementRendererComponent, EmbeddedFontsService, EquationRendererComponent, ExportService, FindBarComponent, FindReplaceBarComponent, GradientPickerComponent, HANDOUT_OPTIONS, HyperlinkDialogComponent, InkRendererComponent, InspectorPanelComponent, IsMobileService, LoadContentService, MobileBottomBarComponent, MobileMenuSheetComponent, MobileSheetComponent, MobileSlidesSheetComponent, ModalDialogComponent, Model3DRendererComponent, OleRendererComponent, PowerPointViewerComponent, PresentationAnnotationOverlayComponent, PresentationAnnotationsService, PresentationOverlayComponent, PresentationSubtitleBarComponent, PresentationTransitionOverlayComponent, PresenterViewComponent, PrintDialogComponent, PrintService, PrintSettingsPanelComponent, PropertiesDialogComponent, RESIZE_HANDLES, SEVERITY_GROUPS, SEVERITY_LABELS, SLIDE_TRANSITION_KEYFRAMES, SVG_WARP_PRESETS, ShareDialogComponent, SignaturesPanelComponent, SignaturesService, SlideCanvasComponent, SlideSorterOverlayComponent, SlidesPanelComponent, SmartArtRendererComponent, TYPE_LABELS, TableDataEditorComponent, TableRendererComponent, TextAdvancedPanelComponent, VIEWER_THEME, WEBM_MIME_CANDIDATES, ZoomRendererComponent, addCommentToList, advanceStep, applyFindReplacements, applyMove, applyResize, assignUserColor, bringForward, bringToFront, buildBroadcastConfig, buildBroadcastViewerUrl, buildClearHyperlinkPatch, buildClickGroups, buildCollaborationConfig, buildCssGradientFromShapeStyle, buildDuotoneFilter, buildDuotoneFilterId, buildEmbeddedFontStyles, buildFontFaceRule, buildHyperlinkPatch, buildPatternFillCss, buildPrintDocument, buildPropertiesPatch, buildShareUrl, bulletIndentPx, canStartBroadcast, canStartShare, canUseClipboard, clampCursorPosition, clampGifDimensions, clampNotesFontSize, clampStep, cn, collectAccessibilityIssues, collectElementText, collectSlideText, computeHandoutLayout, computeIsMobile, computeIsTablet, computePageCount, computeSlideIndices, computeTimerProgress, convertOmmlToMathMl, countAccessibilityIssues, defaultCssVars, defaultRadius, defaultThemeColors, deleteElementsByIds, derivePresenceList, duplicateElementById, durationOf, encodeGif, estimatePageCount, findInSlides, fontMimeForFormat, formatAutoNumber, formatCursorLabel, formatElapsed, formatPropertyDate, formatTime, fpsToFrameIntervalMs, generateBroadcastRoomId, generateCommentId, getContainerStyle, getDuotoneFilterDef, getImageSrc, getPatternSvg, getResolvedShapeClipPath, getResolvedShapeClipPathFor, getShapeFillStrokeStyle, getSlideBackgroundStyle, getSlideTransitionAnimations, getTextBlockStyle, getTextWarp, getWarpCategory, getWarpPath, groupIssuesBySeverity, hasExistingLink, headerLabel, isInjectableUrl, isPpactionUrl, isSigned, isUrlSafe, isValidRoomId, issueTrackKey, issueTypeLabel, moveElementBy, msToFrameDelayCs, normalizeFontFormat, normalizeSlidesPerPage, ommlToMathml, overallStatus, pendingElementStyles, pickSupportedMimeType, planGifFrames, planVideoSegments, presenceToCursors, provideViewerTheme, recordWebm, removeCommentFromList, renderToCanvas, replaceInSlides, replaceMatch, resizeElement, resolveFontVariant, resolveHyperlinkHref, resolveParagraphBullet, resolvePresenterNotes, resolveTransitionDuration, revealedElementStyles, routeOrthogonalConnector, sanitizeColor, sanitizeSlideIndex, sanitizeUserName, searchSlides, seedBroadcastFields, seedHyperlinkDraft, seedPropertiesDraft, seedShareFields, segmentFrameCount, sendBackward, sendToBack, setElementPosition, shouldUseSvgWarp, signatureCountLabel, signatureKey, signatureTimestamp, signerName, statusKind, statusLabel, themeStyle, themeToCssVars, toggleCommentResolvedInList, updateElementById, validatePrintSettings, validateRoomId, waypointsToPathD, worstStatus };
|
|
5967
|
+
export type { AccessibilityIssueGroup, AnimationClickGroup, AnnotationStroke, Box, BroadcastConfig, BroadcastDefaults, CSSProperties, CanvasSize, ClassValue, CollaborationConfig, CollaborationRole, Rect as ConnectorObstacle, Point as ConnectorPoint, ConnectorRouting, DocumentProperties, DuotoneFilterDef, EmbeddedFontStyles, FindOptions, FindResult, GifFrame, GifFramePlan, GifPlanOptions, HandoutSlidesPerPage, HyperlinkDraft, NotesSegmentViewModel, ObjectUrlFactory, OverallSignatureStatus, PresentationTool, PresenterNotes, PrintColorMode, PrintDocumentOptions, PrintOrientation, PrintSettings, PrintSlideRange, PrintWhat, PropertiesDraft, RecordWebmOptions, RemoteCursor, RemotePresence, ReplaceResult, ResizeHandle, ResolvedFontVariant, ShareDefaults, ShareFormFields, SignatureStatusKind, SlideTransitionAnimations, StyleMap, TextWarpCssDef, TextWarpDef, TextWarpPathDef, TimerProgress, VideoPlanOptions, VideoSegmentPlan, ViewerTheme, ViewerThemeColors };
|