pptx-vanilla-viewer 3.26.0 → 3.27.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.
@@ -1,8 +1,5 @@
1
1
  import "fast-xml-parser";
2
2
  import "jszip";
3
- import { Doc } from "yjs";
4
- import "opentype.js";
5
- import "ooxml-ui/controls";
6
3
  //#region ../../../../src/core/dist/pptx/chunks/color-ref-DT599vEx.d.ts
7
4
  //#region pptx/core/types/color-ref.d.ts
8
5
  /**
@@ -2948,7 +2945,7 @@ interface PptxSmartArtData {
2948
2945
  drawingDirty?: boolean;
2949
2946
  }
2950
2947
  //#endregion
2951
- //#region ../../../../src/core/dist/pptx/chunks/text-operations-DM2_DC-I.d.ts
2948
+ //#region ../../../../src/core/dist/pptx/chunks/text-operations-BmD0XMO2.d.ts
2952
2949
  //#region pptx/core/types/shape-style.d.ts
2953
2950
  interface PptxCustomDashSegment {
2954
2951
  /** Dash length as a non-negative percentage in thousandths of one percent. */
@@ -3874,6 +3871,21 @@ interface PptxChartAxisLabelFormatting {
3874
3871
  noMultiLevelLabels?: boolean;
3875
3872
  }
3876
3873
  //#endregion
3874
+ //#region chart/gradient-definition.d.ts
3875
+ interface ChartGradientFill {
3876
+ type: 'linear' | 'radial';
3877
+ stops: Array<{
3878
+ color: string;
3879
+ position: number;
3880
+ opacity?: number;
3881
+ }>;
3882
+ angle?: number;
3883
+ focalPoint?: {
3884
+ x: number;
3885
+ y: number;
3886
+ };
3887
+ }
3888
+ //#endregion
3877
3889
  //#region pptx/core/types/chart-ex.d.ts
3878
3890
  /**
3879
3891
  * Chart-formatting types that don't fit an existing, owned type module for
@@ -4065,64 +4077,21 @@ interface PptxChartProtection {
4065
4077
  rawXml?: XmlObject;
4066
4078
  }
4067
4079
  //#endregion
4068
- //#region pptx/core/types/chart-style-definition.d.ts
4069
- /**
4070
- * Typed subset of an Office 2013+ chart-style part (`ppt/charts/style#.xml`,
4071
- * root element `cs:chartStyle`, relationship type
4072
- * `.../2012/relationships/chartStyle`).
4073
- *
4074
- * PowerPoint's Design-tab "Chart Styles" gallery (1-48) writes `c:style/@val`
4075
- * on the chart part itself (already modeled as `PptxChartStyle.styleId`) and,
4076
- * for most styles, this SEPARATE part spelling out the per-element
4077
- * `cs:lnRef`/`cs:fillRef`/`cs:effectRef`/`cs:fontRef`/`cs:defRPr` defaults a
4078
- * chart element falls back to when its own XML leaves it unstyled. Without
4079
- * parsing this part, styles beyond the one PowerPoint happens to have baked
4080
- * inline are visually inert.
4081
- *
4082
- * @module pptx-types/chart-style-definition
4083
- */
4084
- /**
4085
- * One styled chart-element entry (`cs:title`, `cs:axisTitle`,
4086
- * `cs:categoryAxis`, ...). Colours are resolved to hex at parse time (scheme
4087
- * colour references via `cs:fontRef`/`cs:lnRef`/`cs:fillRef` are already
4088
- * flattened against the theme, matching how classic chart colours resolve
4089
- * elsewhere in this codebase). Fields are present only when the source XML
4090
- * carried a value for them.
4091
- */
4092
- interface PptxChartStylePartEntry {
4093
- /** Text size in points, from `cs:defRPr/@sz` (hundredths of a point). */
4080
+ //#region chart/style-definition.d.ts
4081
+ /** Chart elements consumed by the current Office chart painters. */
4082
+ declare const CHART_STYLE_PARTS: readonly ['title', 'axisTitle', 'categoryAxis', 'valueAxis', 'legend', 'dataLabel', 'dataPoint', 'dataPointLine', 'gridlineMajor', 'gridlineMinor', 'chartArea', 'plotArea'];
4083
+ type ChartStylePart = (typeof CHART_STYLE_PARTS)[number];
4084
+ /** Resolved subset consumed by existing chart painters, with sizes and widths in points. */
4085
+ interface ResolvedChartStyleEntry {
4094
4086
  fontSize?: number;
4095
4087
  bold?: boolean;
4096
4088
  italic?: boolean;
4097
- /** Resolved text colour: `cs:defRPr/a:solidFill`, or `cs:fontRef`'s scheme colour. */
4098
4089
  color?: string;
4099
- /** Resolved line colour from `cs:lnRef`'s scheme colour reference. */
4100
4090
  lineColor?: string;
4101
- /** Line width in points, when directly authored (rare; most styles reference a theme line style by index only). */
4102
4091
  lineWidth?: number;
4103
- /** Resolved fill colour from `cs:fillRef`'s scheme colour reference. */
4104
4092
  fillColor?: string;
4105
4093
  }
4106
- /**
4107
- * Parsed per-element style defaults from a chart-style part. Only the
4108
- * elements this viewer actually renders distinct defaults for are modeled;
4109
- * elements PowerPoint's style gallery also styles (data table, trendlines,
4110
- * up/down bars, ...) are out of scope until a renderer needs them.
4111
- */
4112
- interface PptxChartStyleDefinition {
4113
- title?: PptxChartStylePartEntry;
4114
- axisTitle?: PptxChartStylePartEntry;
4115
- categoryAxis?: PptxChartStylePartEntry;
4116
- valueAxis?: PptxChartStylePartEntry;
4117
- legend?: PptxChartStylePartEntry;
4118
- dataLabel?: PptxChartStylePartEntry;
4119
- dataPoint?: PptxChartStylePartEntry;
4120
- dataPointLine?: PptxChartStylePartEntry;
4121
- gridlineMajor?: PptxChartStylePartEntry;
4122
- gridlineMinor?: PptxChartStylePartEntry;
4123
- chartArea?: PptxChartStylePartEntry;
4124
- plotArea?: PptxChartStylePartEntry;
4125
- }
4094
+ type ResolvedChartStyleDefinition = Partial<Record<ChartStylePart, ResolvedChartStyleEntry>>;
4126
4095
  //#endregion
4127
4096
  //#region pptx/core/types/chart-title.d.ts
4128
4097
  /**
@@ -4558,19 +4527,7 @@ type PptxChartScatterStyle = 'none' | 'line' | 'lineMarker' | 'marker' | 'smooth
4558
4527
  * gradient centres on `focalPoint` (0..1 fractions of the box), the middle
4559
4528
  * when absent.
4560
4529
  */
4561
- interface PptxChartGradientFill {
4562
- type: 'linear' | 'radial';
4563
- stops: Array<{
4564
- color: string;
4565
- position: number;
4566
- opacity?: number;
4567
- }>;
4568
- angle?: number;
4569
- focalPoint?: {
4570
- x: number;
4571
- y: number;
4572
- };
4573
- }
4530
+ type PptxChartGradientFill = ChartGradientFill;
4574
4531
  interface PptxChartShapeProps {
4575
4532
  fillColor?: string;
4576
4533
  strokeColor?: string;
@@ -4658,6 +4615,12 @@ interface PptxChartDataLabel {
4658
4615
  showBubbleSize?: boolean;
4659
4616
  position?: PptxChartDataLabelPosition;
4660
4617
  text?: string;
4618
+ /**
4619
+ * {@link text} was read from the cells of a "Value From Cells" range, not
4620
+ * from a literal `c:tx`. The save path keeps such a label linked to its
4621
+ * cells and writes no `c:tx`; clear this to save the text as literal.
4622
+ */
4623
+ textFromCells?: boolean;
4661
4624
  separator?: string;
4662
4625
  showLeaderLines?: boolean;
4663
4626
  /**
@@ -4680,6 +4643,14 @@ interface PptxChartDataLabel {
4680
4643
  * `.../a:p/a:pPr/a:defRPr` default-run-property style.
4681
4644
  */
4682
4645
  txPr?: PptxChartLegendTextStyle;
4646
+ /**
4647
+ * Font of this label's literal rich text (`c:dLbl/c:tx/c:rich`): the first
4648
+ * run's `a:rPr` over its paragraph's `a:pPr/a:defRPr`. PowerPoint draws
4649
+ * {@link text} with these run properties, so each field set here wins over
4650
+ * the same field of {@link txPr}. Parsed for drawing only; saving does not
4651
+ * write it back from here.
4652
+ */
4653
+ richTextStyle?: PptxChartLegendTextStyle;
4683
4654
  /**
4684
4655
  * This label's own shape formatting (`c:dLbl/c:spPr`): fill/line colour,
4685
4656
  * width, and dash style for the label's callout box, taking precedence
@@ -4738,6 +4709,8 @@ interface PptxChartAxisFormatting extends PptxChartAxisLabelFormatting {
4738
4709
  titleText?: string;
4739
4710
  spPr?: PptxChartShapeProps;
4740
4711
  fontFamily?: string;
4712
+ /** East Asian typeface of the axis text (`a:ea/@typeface`). */
4713
+ eastAsiaFontFamily?: string;
4741
4714
  fontSize?: number;
4742
4715
  fontBold?: boolean;
4743
4716
  fontColor?: string;
@@ -5182,6 +5155,11 @@ interface PptxChartDataLabelOptions {
5182
5155
  /** Typed text defaults for a single chart legend entry. */
5183
5156
  interface PptxChartLegendTextStyle {
5184
5157
  fontFamily?: string;
5158
+ /**
5159
+ * East Asian typeface (`a:ea/@typeface`). PowerPoint draws CJK characters
5160
+ * in this face and everything else in {@link fontFamily}.
5161
+ */
5162
+ eastAsiaFontFamily?: string;
5185
5163
  fontSize?: number;
5186
5164
  bold?: boolean;
5187
5165
  italic?: boolean;
@@ -5236,6 +5214,13 @@ interface PptxChartStyle {
5236
5214
  * which always wins over this chart-level default.
5237
5215
  */
5238
5216
  legendTextStyle?: PptxChartLegendTextStyle;
5217
+ /**
5218
+ * The chart-wide default text style: `c:chartSpace/c:txPr` over the theme's
5219
+ * minor (body) fonts. PowerPoint uses it for any chart text whose own
5220
+ * `txPr` leaves a field unset, such as axis labels and data labels. Not
5221
+ * written back on save: the authored `c:txPr` is kept as it is.
5222
+ */
5223
+ textStyle?: PptxChartLegendTextStyle;
5239
5224
  /** Whether the chart has a title. */
5240
5225
  hasTitle?: boolean;
5241
5226
  /** Whether gridlines are visible. */
@@ -5273,6 +5258,8 @@ interface PptxChartStyle {
5273
5258
  * from an axis title's styling (`PptxChartAxisFormatting.fontFamily` etc.).
5274
5259
  */
5275
5260
  titleFontFamily?: string;
5261
+ /** East Asian typeface of the title (`a:ea/@typeface`). */
5262
+ titleEastAsiaFontFamily?: string;
5276
5263
  titleFontSize?: number;
5277
5264
  titleFontBold?: boolean;
5278
5265
  titleFontColor?: string;
@@ -5760,7 +5747,7 @@ interface PptxChartData {
5760
5747
  * automation-authored charts, where PowerPoint still implies style 2's
5761
5748
  * look via its own bundled defaults).
5762
5749
  */
5763
- chartStyleDefinition?: PptxChartStyleDefinition;
5750
+ chartStyleDefinition?: ResolvedChartStyleDefinition;
5764
5751
  }
5765
5752
  //#endregion
5766
5753
  //#region pptx/core/types/table-style-edit.d.ts
@@ -6067,6 +6054,8 @@ interface PptxTableCellTextRun {
6067
6054
  fontSize?: number;
6068
6055
  /** Run font family from `a:rPr/a:latin@typeface` (or `a:ea` / `a:cs`). */
6069
6056
  fontFamily?: string;
6057
+ /** Run language from `a:rPr/@lang`, such as `ko-KR`. */
6058
+ language?: string;
6070
6059
  /**
6071
6060
  * Run baseline shift from `a:rPr/@baseline`, in thousandths of a percent
6072
6061
  * (`-25000` is a 25% subscript). Positive raises the run, negative lowers it.
@@ -10837,7 +10826,7 @@ interface PptxEmbeddedFont {
10837
10826
  originalPartBytes?: Uint8Array;
10838
10827
  }
10839
10828
  //#endregion
10840
- //#region ../../../../src/core/dist/pptx/chunks/index-CEyiW7oo.d.ts
10829
+ //#region ../../../../src/core/dist/pptx/chunks/index-C9mtdQca.d.ts
10841
10830
  //#region pptx/core/types/theme-presets.d.ts
10842
10831
  /**
10843
10832
  * A complete theme preset that can be applied to a presentation.
@@ -12437,6 +12426,14 @@ declare class PptxHandler extends PptxHandlerCore {
12437
12426
  loadFromJson(text: string, options?: PptxHandlerLoadOptions): Promise<PptxData>;
12438
12427
  }
12439
12428
  //#endregion
12429
+ //#region pptx/converter/svg-text-lines.d.ts
12430
+ type SvgTextMeasurer = (text: string, font: {
12431
+ family: string;
12432
+ size: number;
12433
+ bold: boolean;
12434
+ italic: boolean;
12435
+ }) => number;
12436
+ //#endregion
12440
12437
  //#region pptx/converter/SvgExporter.d.ts
12441
12438
  /**
12442
12439
  * Options controlling SVG export behaviour.
@@ -12450,9 +12447,11 @@ interface SvgExportOptions {
12450
12447
  defaultFontFamily?: string;
12451
12448
  /** Default font size in points when the element does not specify one. */
12452
12449
  defaultFontSize?: number;
12450
+ /** Optional host font metrics. Headless exports fall back to measured font tables. */
12451
+ measureText?: SvgTextMeasurer;
12453
12452
  }
12454
12453
  //#endregion
12455
- //#region ../../../../src/core/dist/pptx/chunks/index-CvtFF9SI.d.ts
12454
+ //#region ../../../../src/core/dist/pptx/chunks/index-DEZWeMcu.d.ts
12456
12455
  //#endregion
12457
12456
  //#region pptx/core/utils/accessibility-checker.d.ts
12458
12457
  type AccessibilityIssueType = 'missingAltText' | 'missingSlideTitle' | 'lowContrast' | 'complexTable' | 'duplicateTitle' | 'blankSlide';
@@ -12468,3923 +12467,6 @@ interface AccessibilityIssue {
12468
12467
  /** Supported merge shape operations (matching PowerPoint's Merge Shapes menu). */
12469
12468
  type MergeShapeOperation = 'union' | 'intersect' | 'subtract' | 'fragment' | 'combine';
12470
12469
  //#endregion
12471
- //#region ../shared/dist/index-DDHixrsQ.d.ts
12472
- //#region src/theme/types.d.ts
12473
- /**
12474
- * Theme configuration types for the PowerPoint viewer.
12475
- *
12476
- * All color values accept any valid CSS color string:
12477
- * hex (`#6366f1`), rgb (`rgb(99 102 241)`), hsl (`hsl(239 84% 67%)`),
12478
- * oklch (`oklch(0.585 0.233 277)`), named colors, etc.
12479
- *
12480
- * Framework-agnostic — shared by the React, Vue, and Angular bindings.
12481
- */
12482
- /**
12483
- * Semantic color tokens for the viewer UI.
12484
- *
12485
- * These map to CSS custom properties (`--pptx-<token>`) and drive all
12486
- * UI component colors. The naming follows the shadcn/ui convention so
12487
- * that Tailwind + shadcn users get a familiar experience.
12488
- */
12489
- interface ViewerThemeColors {
12490
- /** Page / root background */
12491
- background: string;
12492
- /** Default text color */
12493
- foreground: string;
12494
- /** Card / panel surface */
12495
- card: string;
12496
- /** Text on card surfaces */
12497
- cardForeground: string;
12498
- /** Popover / dropdown surface */
12499
- popover: string;
12500
- /** Text inside popovers */
12501
- popoverForeground: string;
12502
- /** Primary action color (buttons, active indicators) */
12503
- primary: string;
12504
- /** Text on primary-colored backgrounds */
12505
- primaryForeground: string;
12506
- /** Secondary / subdued action color */
12507
- secondary: string;
12508
- /** Text on secondary backgrounds */
12509
- secondaryForeground: string;
12510
- /** Muted / disabled surface */
12511
- muted: string;
12512
- /** Text on muted surfaces (also used for secondary text) */
12513
- mutedForeground: string;
12514
- /** Accent / hover-highlight surface */
12515
- accent: string;
12516
- /** Text on accent surfaces */
12517
- accentForeground: string;
12518
- /** Destructive / danger action color */
12519
- destructive: string;
12520
- /** Text on destructive backgrounds */
12521
- destructiveForeground: string;
12522
- /** Default border color */
12523
- border: string;
12524
- /** Input field border color */
12525
- input: string;
12526
- /** Focus ring color */
12527
- ring: string;
12528
- }
12529
- /**
12530
- * Full viewer theme configuration.
12531
- *
12532
- * Every property is optional — unset values fall back to the built-in
12533
- * dark theme defaults.
12534
- */
12535
- interface ViewerTheme {
12536
- /** Semantic UI colors. Each key maps to a `--pptx-<key>` CSS custom property. */
12537
- colors?: Partial<ViewerThemeColors>;
12538
- /** Base border-radius value (e.g. `"0.5rem"`, `"8px"`). */
12539
- radius?: string;
12540
- /**
12541
- * Escape hatch: arbitrary CSS custom properties to set on the viewer
12542
- * root element. Keys should include the `--` prefix.
12543
- *
12544
- * @example
12545
- * ```ts
12546
- * { "--my-custom-shadow": "0 4px 12px rgba(0,0,0,0.5)" }
12547
- * ```
12548
- */
12549
- cssVars?: Record<string, string>;
12550
- }
12551
- //#endregion
12552
- //#region src/theme/defaults.d.ts
12553
- /**
12554
- * Default dark-theme color values.
12555
- *
12556
- * These correspond to the built-in dark UI of the PowerPoint viewer and
12557
- * use Tailwind's gray palette as the neutral scale with indigo as the
12558
- * primary accent.
12559
- */
12560
- declare const defaultThemeColors: ViewerThemeColors;
12561
- /** Default border-radius. */
12562
- declare const defaultRadius = "0.5rem";
12563
- //#endregion
12564
- //#region src/theme/css-vars.d.ts
12565
- /**
12566
- * Convert a `ViewerTheme` into a flat `Record<string, string>` of CSS
12567
- * custom properties (including the `--` prefix) ready to be spread onto
12568
- * a `style` attribute.
12569
- *
12570
- * Only properties that differ from the built-in defaults are emitted when
12571
- * `omitDefaults` is true (the default).
12572
- */
12573
- declare function themeToCssVars(theme: ViewerTheme | undefined, omitDefaults?: boolean): Record<string, string>;
12574
- /**
12575
- * Build the complete set of CSS custom properties with all defaults.
12576
- * Useful for generating a full fallback stylesheet.
12577
- */
12578
- declare function defaultCssVars(): Record<string, string>;
12579
- /** Light vermilion theme, ready for the viewer's `theme` prop. */
12580
- declare const vermilionLightTheme: ViewerTheme;
12581
- /** Dark vermilion theme, ready for the viewer's `theme` prop. */
12582
- declare const vermilionDarkTheme: ViewerTheme;
12583
- //#endregion
12584
- //#region src/theme/theme-catalog.d.ts
12585
- /** One selectable entry in the viewer chrome's built-in theme picker (File > Options > Appearance). */
12586
- interface ThemeCatalogEntry {
12587
- /** Stable identifier persisted to storage and passed to `onThemeChange`. */
12588
- key: string;
12589
- /** `pptx.*` translation key for the entry's display label. */
12590
- labelKey: string;
12591
- /** The theme to apply, or `undefined` to reset to the built-in default. */
12592
- theme: ViewerTheme | undefined;
12593
- }
12594
- //#endregion
12595
- //#region ../shared/dist/index.d.ts
12596
- //#region src/render/collaboration-presence.d.ts
12597
- /** Connection lifecycle states for the Yjs WebSocket provider. */
12598
- type ConnectionStatus = 'disconnected' | 'connecting' | 'connected' | 'error';
12599
- /** A single remote collaborator's cursor, in unscaled slide coordinates. */
12600
- interface RemoteCursor {
12601
- /** Stable id for the remote client (awareness clientId or peer id). */
12602
- clientId: number | string;
12603
- /** Display name shown in the label chip. */
12604
- userName: string;
12605
- /** Cursor + chip colour (any CSS colour string). */
12606
- color: string;
12607
- /** Unscaled slide-space X coordinate (px). */
12608
- x: number;
12609
- /** Unscaled slide-space Y coordinate (px). */
12610
- y: number;
12611
- /** Optional ids of elements this user has selected. */
12612
- selectionIds?: string[];
12613
- }
12614
- /**
12615
- * Presence data for a remote collaborator, sanitised from the awareness
12616
- * protocol. Returned by {@link sanitizePresence}; coordinates are in unscaled
12617
- * slide pixels, clamped to the supplied canvas bounds.
12618
- */
12619
- interface SanitizedPresence {
12620
- clientId: number;
12621
- userName: string;
12622
- userAvatar?: string;
12623
- userColor: string;
12624
- activeSlideIndex: number;
12625
- cursorX: number;
12626
- cursorY: number;
12627
- lastUpdated: string;
12628
- selectedElementId?: string;
12629
- role?: CollaborationRole;
12630
- }
12631
- //#endregion
12632
- //#region src/render/collaboration-presence-publisher.d.ts
12633
- /**
12634
- * Structural interface for the lazily-imported Yjs awareness surface. Every
12635
- * binding's live `y-protocols/awareness` `Awareness` instance satisfies this.
12636
- */
12637
- interface AwarenessLike {
12638
- clientID?: number;
12639
- setLocalStateField: (field: string, value: unknown) => void;
12640
- getStates: () => Map<number, Record<string, unknown>>;
12641
- on: (event: string, cb: () => void) => void;
12642
- off?: (event: string, cb: () => void) => void;
12643
- }
12644
- //#endregion
12645
- //#region src/render/collaboration-external-session.d.ts
12646
- /** Connection state reported by the host, independent of the viewer lifetime. */
12647
- interface ExternalCollaborationSnapshot {
12648
- status: ConnectionStatus;
12649
- /**
12650
- * The host has loaded the authoritative document and permits local edits.
12651
- * Keep true while offline to allow ordinary Yjs offline edits, or set false
12652
- * to suspend writes until a fresh sync. The viewer never infers this from
12653
- * `status` and never opens it after a timeout.
12654
- */
12655
- synced: boolean;
12656
- }
12657
- /** The public y-protocols Awareness surface needed by a borrowed session. */
12658
- interface ExternalCollaborationAwareness extends AwarenessLike {
12659
- clientID: number;
12660
- getLocalState: () => Record<string, unknown> | null;
12661
- setLocalState: (state: Record<string, unknown> | null) => void;
12662
- off: (event: string, callback: () => void) => void;
12663
- }
12664
- /**
12665
- * Host-owned Yjs resources. The host creates, connects and destroys them.
12666
- * Keep this object and its resources stable for a session; report connection
12667
- * changes through subscribe instead of replacing the collaboration config.
12668
- */
12669
- interface ExternalCollaborationSession {
12670
- readonly doc: Doc;
12671
- /** Awareness must belong to doc. One viewer publishes slide presence at a time. */
12672
- readonly awareness: ExternalCollaborationAwareness;
12673
- getSnapshot: () => ExternalCollaborationSnapshot;
12674
- /** Subscribe to status or synced changes; return an unsubscribe function. */
12675
- subscribe: (listener: () => void) => () => void;
12676
- }
12677
- //#endregion
12678
- //#region src/render/element-update-batch.d.ts
12679
- /** A shallow property patch for a top-level element on an ordinary slide. */
12680
- interface ElementUpdate {
12681
- slideId: string;
12682
- elementId: string;
12683
- patch: Partial<PptxElement>;
12684
- }
12685
- interface ElementUpdateOptions {
12686
- /** Optional description for the undo entry. */
12687
- label?: string;
12688
- }
12689
- //#endregion
12690
- //#region src/types.d.ts
12691
- /** Canvas dimensions in pixels. */
12692
- interface CanvasSize {
12693
- width: number;
12694
- height: number;
12695
- }
12696
- /** Viewer interaction mode: read-only, edit, presentation, or master-view. */
12697
- type ViewerMode = 'preview' | 'edit' | 'present' | 'master';
12698
- /**
12699
- * Framework-agnostic imperative API contract for the PowerPoint viewer.
12700
- *
12701
- * Each binding (React `forwardRef` handle, Vue `defineExpose`, Angular public
12702
- * methods) implements this interface so consumers get a consistent progressive
12703
- * API regardless of framework.
12704
- */
12705
- interface PowerPointViewerAPI {
12706
- /** Serialise the current presentation to `.pptx` bytes. */
12707
- getContent: () => Promise<Uint8Array>;
12708
- /** Navigate to a specific slide by zero-based index. */
12709
- goTo: (slideIndex: number) => void;
12710
- /** Navigate to the previous slide. */
12711
- goPrev: () => void;
12712
- /** Navigate to the next slide. */
12713
- goNext: () => void;
12714
- /** Undo the last editing action. No-op when nothing to undo. */
12715
- undo: () => void;
12716
- /** Redo the last undone action. No-op when nothing to redo. */
12717
- redo: () => void;
12718
- /** Whether an undo action is available. */
12719
- canUndo: () => boolean;
12720
- /** Whether a redo action is available. */
12721
- canRedo: () => boolean;
12722
- /** Get the current zoom level (1 = 100%). */
12723
- getZoom: () => number;
12724
- /** Set the zoom level (clamped to min/max bounds). */
12725
- setZoom: (level: number) => void;
12726
- /** Zoom in by one step. */
12727
- zoomIn: () => void;
12728
- /** Zoom out by one step. */
12729
- zoomOut: () => void;
12730
- /** Reset zoom to 100%. */
12731
- zoomReset: () => void;
12732
- /** Get the current viewer mode. */
12733
- getMode: () => ViewerMode;
12734
- /** Switch the viewer mode (e.g. 'edit', 'preview', 'present'). */
12735
- setMode: (mode: ViewerMode) => void;
12736
- /** Get the zero-based active slide index. */
12737
- getActiveSlideIndex: () => number;
12738
- /** Set the active slide by zero-based index (alias of goTo). */
12739
- setActiveSlideIndex: (index: number) => void;
12740
- /** Get the total number of slides. */
12741
- getSlideCount: () => number;
12742
- /** Whether the document has unsaved changes. */
12743
- isDirty: () => boolean;
12744
- /**
12745
- * Get the full slide array. Returns the actual `PptxSlide[]` from the
12746
- * internal model with full type information (elements, notes, transitions,
12747
- * animations, etc.). The returned reference is a snapshot; mutations are
12748
- * not reflected back unless done via the manipulation methods.
12749
- */
12750
- getSlides: () => readonly PptxSlide[];
12751
- /** Get a single slide by zero-based index, or undefined if out of range. */
12752
- getSlide: (index: number) => PptxSlide | undefined;
12753
- /** Get the currently active slide. */
12754
- getActiveSlide: () => PptxSlide | undefined;
12755
- /** Add a blank slide after the given index (or at end if omitted). */
12756
- addSlide: (afterIndex?: number) => void;
12757
- /** Delete slides at the given zero-based indexes. At least one slide is kept. */
12758
- deleteSlides: (indexes: number[]) => void;
12759
- /** Duplicate slides at the given zero-based indexes. */
12760
- duplicateSlides: (indexes: number[]) => void;
12761
- /** Move a slide from one position to another. */
12762
- moveSlide: (fromIndex: number, toIndex: number) => void;
12763
- /** Toggle the hidden flag on slides at the given indexes. */
12764
- toggleHideSlides: (indexes: number[]) => void;
12765
- /**
12766
- * Get the elements on a slide. Defaults to the active slide when
12767
- * `slideIndex` is omitted. Returns the full `PptxElement[]` with
12768
- * all type-specific properties intact.
12769
- */
12770
- getElements: (slideIndex?: number) => readonly PptxElement[];
12771
- /** Get a single element by ID from the active slide (or a specified slide). */
12772
- getElementById: (elementId: string, slideIndex?: number) => PptxElement | undefined;
12773
- /**
12774
- * Append and select a deep copy on the active ordinary editable slide.
12775
- * Assigns fresh element IDs without offsetting the supplied geometry.
12776
- * Returns the new root ID, or undefined when insertion is unavailable.
12777
- * Uses normal Undo/Redo grouping. Models must be self-contained or refer to
12778
- * assets in this document; this does not import foreign PPTX relationships.
12779
- */
12780
- addElement: (element: PptxElement) => string | undefined;
12781
- /**
12782
- * Update one or more properties of an element by ID on the active slide.
12783
- * Accepts a `Partial<PptxElement>` patch (e.g. `{ x: 100, width: 300 }`).
12784
- */
12785
- updateElement: (elementId: string, updates: Partial<PptxElement>) => void;
12786
- /** Atomically patch ordinary slide elements as one independent undo step. Rejects invalid batches. */
12787
- updateElements: (updates: readonly ElementUpdate[], options?: ElementUpdateOptions) => Promise<void>;
12788
- /** Delete elements by their IDs from the active slide. */
12789
- deleteElements: (elementIds: string[]) => void;
12790
- /**
12791
- * Duplicate an element on the active slide.
12792
- * Returns the new element's ID, or undefined if the source was not found.
12793
- */
12794
- duplicateElement: (elementId: string) => string | undefined;
12795
- /** Get the IDs of currently selected elements. */
12796
- getSelectedElementIds: () => string[];
12797
- /** Programmatically select elements by their IDs. */
12798
- selectElements: (ids: string[]) => void;
12799
- /** Clear the current selection. */
12800
- clearSelection: () => void;
12801
- }
12802
- /** Collaboration role within a session. */
12803
- type CollaborationRole = 'owner' | 'collaborator' | 'viewer';
12804
- /**
12805
- * Collaboration transport.
12806
- *
12807
- * - `'websocket'` (default): y-websocket against `serverUrl`.
12808
- * - `'webrtc'`: y-webrtc peer-to-peer; needs no document server. Peers meet
12809
- * through the `signaling` servers (WebRTC signaling only, no document data)
12810
- * and same-browser tabs additionally sync via BroadcastChannel even without
12811
- * any signaling server, which makes this mode usable from static hosting.
12812
- */
12813
- type CollaborationTransport = 'websocket' | 'webrtc';
12814
- /** How the local user entered a collaboration session. */
12815
- type CollaborationSessionIntent = 'create' | 'join';
12816
- /**
12817
- * Real-time collaboration configuration.
12818
- *
12819
- * The same shape is accepted by every framework binding.
12820
- */
12821
- interface CollaborationConfig {
12822
- /** Unique identifier for the collaboration room (alphanumeric, hyphens, underscores). */
12823
- roomId: string;
12824
- /**
12825
- * WebSocket server URL for the Yjs provider (e.g. "wss://collab.example.com").
12826
- * Ignored (may be empty) for `externalSession` or when `transport` is `'webrtc'`.
12827
- */
12828
- serverUrl: string;
12829
- /** Transport to use. Defaults to `'websocket'`. */
12830
- transport?: CollaborationTransport;
12831
- /**
12832
- * Use the host's document, awareness and transport instead of creating a
12833
- * provider. Transport, serverUrl, signaling and authToken are ignored. The
12834
- * viewer only detaches its listeners and presence on stop; it never destroys
12835
- * these resources. Keep this object stable and report readiness via subscribe.
12836
- */
12837
- externalSession?: ExternalCollaborationSession;
12838
- /**
12839
- * WebRTC signaling server URLs (only used when `transport` is `'webrtc'`).
12840
- * Defaults to y-webrtc's built-in public signaling list. Same-browser tabs
12841
- * sync via BroadcastChannel regardless of signaling availability.
12842
- */
12843
- signaling?: string[];
12844
- /** Display name for the local user. */
12845
- userName: string;
12846
- /** Avatar URL for the local user (optional). */
12847
- userAvatar?: string;
12848
- /** Hex colour for the local user's cursor/presence indicator. */
12849
- userColor?: string;
12850
- /** Optional authentication token sent with the WebSocket handshake. */
12851
- authToken?: string;
12852
- /** Role in the session; defaults to `'collaborator'`. */
12853
- role?: CollaborationRole;
12854
- /**
12855
- * Whether this client created the room or joined an existing room. Providers
12856
- * do not use this value, but hosts can use it to avoid publishing local file
12857
- * bytes when handling a join request. Omitted values retain the legacy
12858
- * create-session behaviour.
12859
- */
12860
- sessionIntent?: CollaborationSessionIntent;
12861
- /**
12862
- * Elected-writer write-back callback (Area 3 of the C3 hardening plan).
12863
- *
12864
- * When the local user has `role: 'owner'`, the binding debounces changes and
12865
- * serializes the current Y.Doc state to a PPTX byte array, then calls this
12866
- * callback so the host can persist the snapshot. Only one writer (the owner)
12867
- * does this; other collaborators never trigger write-back, eliminating the
12868
- * last-save-wins problem.
12869
- */
12870
- onWriteBack?: (bytes: Uint8Array) => void;
12871
- /**
12872
- * Debounce delay (ms) between the last Y.Doc change and the write-back
12873
- * invocation. Defaults to 5000 ms. Set to 0 to write back on every change
12874
- * (not recommended for large documents).
12875
- */
12876
- writeBackDebounceMs?: number;
12877
- }
12878
- /** A neutral CSS map (framework `CSSProperties` are structurally compatible). */
12879
- type CssStyleMap = Record<string, string | number>;
12880
- //#endregion
12881
- //#region src/render/text-run-style.d.ts
12882
- /** A plain CSS style map (keys are CSS properties; binding-agnostic). */
12883
- type RunStyle = Record<string, string | number>;
12884
- /** One script-tagged piece of a run's text, ready for a binding's nested span. */
12885
- interface ScriptFontPiece {
12886
- text: string;
12887
- /**
12888
- * CSS for a nested span wrapping `text`, or `undefined` when this piece
12889
- * needs no span at all (its script's font equals the run's own, so plain
12890
- * text renders identically). When present it carries the `fontFamily`
12891
- * override plus the run's own decoration subset, repeated because
12892
- * `text-decoration-*` does not inherit into a nested span (see
12893
- * `nestedTextDecorationStyle`).
12894
- */
12895
- style?: RunStyle;
12896
- }
12897
- //#endregion
12898
- //#region src/render/reflection.d.ts
12899
- /**
12900
- * CSS `mask-image`/`-webkit-mask-image` value plus the raw `transform` for a
12901
- * mirrored reflection sibling. Every value is a ready-to-apply CSS string (or
12902
- * `'none'` sentinel avoided - fields are omitted when the browser default
12903
- * already matches), so a binding can spread this directly onto its own style
12904
- * object with no further per-framework logic.
12905
- */
12906
- interface ReflectionWrapperStyle {
12907
- position: 'absolute';
12908
- left: string;
12909
- /** `calc(100% + <dist>px)`: sits `@dist` px below the source element's box. */
12910
- top: string;
12911
- width: string;
12912
- height: string;
12913
- /** `scale(@sx, @sy)` (the sign of `@sy` IS the mirror) composed with `@kx`/`@ky`/`@rot`. */
12914
- transform: string;
12915
- /** Anchor point for the transform above, from `@algn` (default `center top`). */
12916
- transformOrigin: string;
12917
- maskImage: string;
12918
- WebkitMaskImage: string;
12919
- pointerEvents: 'none';
12920
- }
12921
- /**
12922
- * Reference to an interactive chart sub-part, carried by the primitives that
12923
- * represent data marks (bars, dots, slices, series lines). Bindings use it to
12924
- * make marks clickable/draggable in edit mode and to sync selection with the
12925
- * chart inspector; primitives without a `part` stay purely decorative.
12926
- */
12927
- interface ChartPartRef {
12928
- /** 'dataPoint' targets one (series, category) cell; 'series' the whole series. */
12929
- role: 'dataPoint' | 'series';
12930
- seriesIndex: number;
12931
- /** Category/point index. Absent when the primitive spans the whole series. */
12932
- pointIndex?: number;
12933
- }
12934
- //#endregion
12935
- //#region src/render/animation-authoring.d.ts
12936
- /** One of the three animation buckets a preset can occupy on an element. */
12937
- type AnimationGroup = 'entrance' | 'emphasis' | 'exit';
12938
- //#endregion
12939
- //#region src/render/animation-timeline-build-descriptors.d.ts
12940
- /**
12941
- * `animation-timeline-build-descriptors` - staged-build (`p:bldChart` /
12942
- * `p:bldDgm`) reveal descriptor types, split out of `animation-timeline-types`
12943
- * to keep that module under the file-size limit. Re-exported from
12944
- * `animation-timeline-types` so existing imports are unaffected.
12945
- *
12946
- * @module render/animation-timeline-build-descriptors
12947
- */
12948
- /**
12949
- * Normalized staged-reveal mode for a chart graphic frame, derived from the
12950
- * OOXML `a:bldChart/@bld` (or `p:bldOleChart/@bld`) token:
12951
- * - `asOne` the whole chart appears at once (`allAtOnce`).
12952
- * - `bySeries` one data series is revealed per stage (`series`).
12953
- * - `byCategory` one category is revealed per stage (`category`).
12954
- * - `byElement` one series/category ELEMENT is revealed per stage
12955
- * (`seriesElement` / `categoryElement`).
12956
- */
12957
- type ChartBuildMode = 'asOne' | 'bySeries' | 'byCategory' | 'byElement';
12958
- /**
12959
- * Normalized staged-reveal mode for a SmartArt diagram, derived from the OOXML
12960
- * `a:bldDgm/@bld` or `p:bldDgm/@bld` token:
12961
- * - `asOne` the whole diagram appears at once (`whole` / `allAtOnce`).
12962
- * - `byOne` one node is revealed per stage (`one`, and the assorted
12963
- * `depthBy*` / `breadthBy*` / directional traversals).
12964
- * - `byLvl` levels are revealed one element at a time (`lvlOne`).
12965
- * - `byLvlAtOnce` a whole level is revealed per stage (`lvlAtOnce`).
12966
- */
12967
- type DiagramBuildMode = 'asOne' | 'byOne' | 'byLvl' | 'byLvlAtOnce';
12968
- /**
12969
- * One authored `p:graphicEl` reveal unit resolved onto a chart, per
12970
- * `TimelineStepGraphicElement`'s "both indices set" case: a single (series,
12971
- * category) cell revealed by a `bldStep="seriesEl"`/`"categoryEl"` effect.
12972
- */
12973
- interface ChartRevealPoint {
12974
- seriesIdx: number;
12975
- categoryIdx: number;
12976
- }
12977
- /**
12978
- * Playback-time chart reveal state derived from AUTHORED `p:graphicEl`
12979
- * indices (see `chart-reveal-descriptor`'s `resolveChartRevealDescriptor`),
12980
- * rather than from click-count/time progress. Present on
12981
- * {@link import('./animation-timeline-group').ElementAnimationState.chartReveal}
12982
- * only when every fired chart-build step for the element carried index data;
12983
- * a renderer prefers this over the progress-based `build`/`ElementBuildState`
12984
- * path when present, since it reflects the real authored reveal set (correct
12985
- * even for a reversed-order or gapped chart build), and falls back to `build`
12986
- * when absent.
12987
- */
12988
- interface ChartRevealDescriptor {
12989
- /**
12990
- * Whether the chart's background/axes/gridlines/legend should currently be
12991
- * visible: always `true` when the chart's `animateBackground` is `false`
12992
- * ("shown throughout"), otherwise `true` from the first revealed stage
12993
- * onward.
12994
- */
12995
- background: boolean;
12996
- /** Whole series revealed by a `bldStep="series"` effect. */
12997
- series: ReadonlySet<number>;
12998
- /** Whole categories revealed by a `bldStep="category"` effect. */
12999
- categories: ReadonlySet<number>;
13000
- /** Individual cells revealed by a `bldStep="seriesEl"`/`"categoryEl"` effect. */
13001
- points: readonly ChartRevealPoint[];
13002
- }
13003
- /**
13004
- * Playback-time SmartArt diagram reveal state derived from AUTHORED
13005
- * `p:graphicEl/p:dgm/@id` indices (see `diagram-reveal-descriptor`'s
13006
- * `resolveDiagramRevealDescriptor`), rather than from click-count/time
13007
- * progress. Present on
13008
- * {@link import('./animation-timeline-group').ElementAnimationState.diagramReveal}
13009
- * only when every fired diagram-build step for the element carried
13010
- * `p:graphicEl` data. A SmartArt renderer prefers this over the
13011
- * progress-based `build` / {@link ElementBuildState} path when present, since
13012
- * it reflects the real authored reveal set (correct even for a
13013
- * reversed-order or by-branch build), and falls back to `build` when absent.
13014
- */
13015
- interface DiagramRevealDescriptor {
13016
- /**
13017
- * Whether the diagram's background/connector chrome should currently be
13018
- * visible: `true` once any node-revealing or background-revealing
13019
- * (`bldStep="bg"`) step has fired.
13020
- */
13021
- background: boolean;
13022
- /** Data-model point ids (`PptxSmartArtNode.id`) revealed so far. */
13023
- nodeIds: ReadonlySet<string>;
13024
- }
13025
- /**
13026
- * Playback-time staged-build state surfaced on
13027
- * {@link import('./animation-timeline-group').ElementAnimationState}.
13028
- * `progress` is the 0..1 fraction of the build revealed at the current
13029
- * playback time; a consumer maps it to its own item COUNT (see
13030
- * `revealedStageCount`).
13031
- */
13032
- type ElementBuildState = {
13033
- kind: 'chart';
13034
- mode: ChartBuildMode;
13035
- progress: number;
13036
- } | {
13037
- kind: 'diagram';
13038
- mode: DiagramBuildMode;
13039
- progress: number;
13040
- };
13041
- //#endregion
13042
- //#region src/render/animation-text-style-resolve.d.ts
13043
- /**
13044
- * Framework-neutral text-style override a font-style emphasis effect applies
13045
- * on top of its target's own authored per-run bold/italic/underline/size/
13046
- * colour. Every binding maps this onto its own text container so it OVERRIDES
13047
- * the runs' inline styles (the runs carry explicit inline styles of their
13048
- * own, so plain CSS inheritance cannot reach them).
13049
- */
13050
- interface TextStyleAnimationDescriptor {
13051
- bold?: boolean;
13052
- italic?: boolean;
13053
- underline?: boolean;
13054
- /** Relative multiplier against each run's own authored font size. */
13055
- fontScale?: number;
13056
- color?: string;
13057
- }
13058
- /** Snapshot of a single element's animation state at a point in the timeline. */
13059
- interface ElementAnimationState {
13060
- /** Whether the element should be visible. */
13061
- visible: boolean;
13062
- /** CSS animation shorthand to apply (undefined = no active animation). */
13063
- cssAnimation: string | undefined;
13064
- /**
13065
- * Staged-build reveal state, present only when the active animation builds a
13066
- * chart or SmartArt diagram in stages (`p:bldChart` / `p:bldDgm`) rather than
13067
- * revealing the whole element at once. A staged renderer multiplies
13068
- * `build.progress` (0..1) by its own series / category / level COUNT to
13069
- * decide how many stages are revealed at the current playback time; see
13070
- * {@link import('./animation-build').revealedStageCount}. Absent for ordinary
13071
- * whole-element entrances, so existing renderers are unaffected.
13072
- */
13073
- build?: ElementBuildState;
13074
- /**
13075
- * Authored-index chart reveal state (see {@link ChartRevealDescriptor}),
13076
- * present only when every fired chart-build step for this element carried
13077
- * `p:graphicEl` index data. A chart renderer prefers this over `build` when
13078
- * present; `chart-build`'s `resolveRevealedChartData` picks between the two.
13079
- */
13080
- chartReveal?: {
13081
- mode: ChartBuildMode;
13082
- descriptor: ChartRevealDescriptor;
13083
- };
13084
- /**
13085
- * Authored-index SmartArt diagram reveal state (see
13086
- * {@link DiagramRevealDescriptor}), present only when every fired
13087
- * diagram-build step for this element carried `p:graphicEl` node-id data.
13088
- * `diagram-build`'s `resolveRevealedSmartArtNodes` prefers this over `build`
13089
- * when present.
13090
- */
13091
- diagramReveal?: {
13092
- mode: DiagramBuildMode;
13093
- descriptor: DiagramRevealDescriptor;
13094
- };
13095
- /**
13096
- * True when an active `p:animClr` color animation targets this shape's fill.
13097
- * A vector renderer should then paint the fill with `fill: inherit` so the
13098
- * wrapper-level colour keyframes cascade to the SVG path. Absent/false means
13099
- * no active fill-colour animation.
13100
- */
13101
- animatesFill?: boolean;
13102
- /**
13103
- * True when an active `p:animClr` color animation targets this shape's
13104
- * stroke. A vector renderer should then paint the stroke with
13105
- * `stroke: inherit`. Absent/false means no active stroke-colour animation.
13106
- */
13107
- animatesStroke?: boolean;
13108
- /**
13109
- * Active discrete font-style / colour / size override (see
13110
- * {@link import('./animation-timeline-step').TimelineStep.textStyle}) a
13111
- * font-style emphasis effect currently applies to this element's text,
13112
- * OVERRIDING the runs' own inline bold/italic/underline/size/colour.
13113
- * `animation-playback-engine.ts` writes this on step start and again on
13114
- * cleanup (held in full when the effect's `p:cTn/@fill` holds its end
13115
- * state, otherwise reverted); a text renderer maps it onto its run markup
13116
- * via `buildTextStyleOverrideCss` (`animation-text-style-css.ts`). Absent
13117
- * means no font-style emphasis effect is currently active on this element.
13118
- */
13119
- textStyle?: TextStyleAnimationDescriptor;
13120
- }
13121
- //#endregion
13122
- //#region src/render/element-locks.d.ts
13123
- /** A single on-canvas gesture a lock may forbid. */
13124
- type ElementInteraction = 'select' | 'move' | 'resize' | 'rotate' | 'textEdit' | 'group' | 'changeAspect' | 'adjustHandle' | 'editPoints' | 'changeArrowheads' | 'changeShapeType' | 'crop' | 'drilldown';
13125
- /**
13126
- * May `interaction` proceed on `element`?
13127
- *
13128
- * The single-question form of {@link resolveElementInteractivity}, for call
13129
- * sites that gate one gesture (a drag-start handler, a rotate commit) rather
13130
- * than rendering a whole overlay.
13131
- */
13132
- declare function canInteractWithElement(element: PptxElement | null | undefined, interaction: ElementInteraction): boolean;
13133
- //#endregion
13134
- //#region src/render/slide-templates/slide-template-types.d.ts
13135
- /** Discriminated id for every built-in slide template. */
13136
- type SlideTemplateId = 'title' | 'titleAndContent' | 'sectionHeader' | 'agenda' | 'twoContent' | 'comparison' | 'quote' | 'timeline' | 'keyMetrics' | 'titleOnly' | 'blank' | 'closing';
13137
- /** The unit system used for ruler display. */
13138
- type RulerUnit = 'inches' | 'centimetres';
13139
- /** Framework-neutral picture-bullet source, sizing, and accessible fallback. */
13140
- interface PictureBulletMarker {
13141
- src?: string;
13142
- sizePx: number;
13143
- fallbackMarker: string;
13144
- accessibleLabel: string;
13145
- imageRelId?: string;
13146
- }
13147
- //#endregion
13148
- //#region src/render/text-east-asian-breaks.d.ts
13149
- /** Which of the two behaviours a paragraph asks for. */
13150
- interface EastAsianBreakOptions {
13151
- /** `a:pPr/@hangingPunct="1"`. */
13152
- hangingPunctuation: boolean;
13153
- /** `a:pPr/@eaLnBrk="0"`: break between any two East Asian characters. */
13154
- breakAnywhere: boolean;
13155
- }
13156
- //#endregion
13157
- //#region src/render/text-run-meta.d.ts
13158
- /** A run's resolved hyperlink target. */
13159
- interface RunHyperlink {
13160
- /**
13161
- * The URL to hand a click handler. For an internal `ppaction://hlinksldjump`
13162
- * the resolved slide index is appended as a `slideIndex` query parameter, so
13163
- * the target survives a callback whose only argument is the URL (see
13164
- * `parsePpactionUrl`, which reads it back off).
13165
- */
13166
- url: string;
13167
- /**
13168
- * A safe, renderable `href` for a plain `<a>`, or `undefined` when the target
13169
- * is an internal `ppaction://` action or fails the URL safety check. A
13170
- * binding with no click handler renders the run as text in that case, which
13171
- * is what every binding did for every link before this field existed.
13172
- */
13173
- href?: string;
13174
- /** `a:hlinkClick/@tooltip`, for the anchor's `title`. */
13175
- tooltip?: string;
13176
- /**
13177
- * `<a target>` for a real (non-`ppaction://`) hyperlink, from
13178
- * `a:hlinkClick/@tgtFrame` when authored, else `_blank` (every binding's
13179
- * pre-existing hardcoded default). Only meaningful alongside {@link href}.
13180
- */
13181
- target?: string;
13182
- /** `<a rel>` paired with {@link target} (see `resolveHyperlinkTargetAttrs`). */
13183
- rel?: string;
13184
- /** Resolved target slide for an internal slide jump. */
13185
- targetSlideIndex?: number;
13186
- /**
13187
- * True when the target came from `a:hlinkMouseOver` rather than
13188
- * `a:hlinkClick`: PowerPoint follows it on hover, not on click, so a binding
13189
- * that renders a plain anchor should not make it look clickable.
13190
- */
13191
- onHover?: boolean;
13192
- }
13193
- /** An inline equation run (`m:oMath`), rendered as MathML rather than text. */
13194
- interface RunEquation {
13195
- /** The raw OMML node, for `convertOmmlToMathMl`. */
13196
- xml: Record<string, unknown>;
13197
- /** Display number for a numbered equation, without its parentheses. */
13198
- number?: string;
13199
- }
13200
- //#endregion
13201
- //#region src/render/text-run-ruby.d.ts
13202
- /** A run's phonetic guide, ready to render as `<rt>` above the base text. */
13203
- interface RunRuby {
13204
- /** The annotation itself (`a:ruby/a:rt`), e.g. the furigana reading. */
13205
- text: string;
13206
- /** Inline style for the `<rt>` element (size, family, alignment, colour). */
13207
- style: RunStyle;
13208
- }
13209
- //#endregion
13210
- //#region src/render/text-tab-run-build.d.ts
13211
- /** One tabbed-line piece, ready to spread onto a binding's own span element. */
13212
- interface TabbedRunPiece {
13213
- text: string;
13214
- /**
13215
- * CSS for the span that wraps `text`: inline-block layout, this run's own
13216
- * decoration repeated, and this piece's own PowerPoint advance-width
13217
- * correction as `letter-spacing` (see `buildTabbedLine`). The piece is
13218
- * nested inside the run's own span, and neither property inherits the way a
13219
- * caller would want: `text-decoration-*` does not inherit into a nested
13220
- * element at all (an ancestor's underline is drawn *through* its
13221
- * descendants, but each descendant still computes `none` of its own), so a
13222
- * caller passes the run's decoration subset (`nestedTextDecorationStyle`) to
13223
- * have it repeated here; `letter-spacing` DOES inherit, which is exactly why
13224
- * this piece sets it explicitly rather than only when non-zero - the run's
13225
- * container span carries its own (wrong, whole-text) correction that would
13226
- * otherwise leak in.
13227
- */
13228
- style: RunStyle;
13229
- /** CSS for the leader-fill span preceding this piece, or `undefined` when there is no gap to fill. */
13230
- leaderStyle?: RunStyle;
13231
- /** Leader glyphs sized to fill `leaderStyle`'s width. Present only alongside `leaderStyle`. */
13232
- leaderText?: string;
13233
- /**
13234
- * `a:rPr/@u="words"` per-word/gap sub-pieces of THIS tab piece's own text
13235
- * (see `splitWordsForUnderline`), present only when the run's underline is
13236
- * `words`. A tab-separated piece is otherwise rendered as a single span
13237
- * (`text` + `style`), which underlines it continuously - correct for a
13238
- * one-word piece, but wrong for a piece like `"Hello World"` between two tab
13239
- * stops, which needs a gap under the space. A binding renders one SIBLING
13240
- * span per entry IN PLACE OF the piece's single `text` span: each entry's
13241
- * `style` is the piece's own `style` (the same inline-block layout and
13242
- * advance-width correction, so the line measures exactly as before), with
13243
- * the underline stripped on a gap entry. They must be siblings, not spans
13244
- * nested inside the piece span: an ancestor's underline is drawn through
13245
- * every inline descendant, so a nested gap could not lose it. `text`/`style`
13246
- * stay the continuous-underline fallback for a binding that does not
13247
- * render this field.
13248
- */
13249
- words?: Array<{
13250
- text: string;
13251
- style: RunStyle;
13252
- }>;
13253
- }
13254
- /** One `\n`-split line of a run's tabbed text. */
13255
- interface TabbedLineRun {
13256
- pieces: TabbedRunPiece[];
13257
- }
13258
- //#endregion
13259
- //#region src/render/paragraph-types.d.ts
13260
- /** A single rendered run within a paragraph. */
13261
- interface ParagraphRun {
13262
- text: string;
13263
- style: RunStyle;
13264
- /**
13265
- * The run's hyperlink (`a:hlinkClick` / `a:hlinkMouseOver`), when it has one.
13266
- * A binding renders the run inside an `<a href>` when {@link RunHyperlink.href}
13267
- * is set, and routes {@link RunHyperlink.url} to its click handler otherwise
13268
- * (internal `ppaction://` slide jumps).
13269
- */
13270
- hyperlink?: RunHyperlink;
13271
- /**
13272
- * An inline equation (`m:oMath`) this run renders INSTEAD of `text`, which is
13273
- * empty for it. Emitted in the run sequence so the maths lands at its
13274
- * authored position between the runs around it.
13275
- */
13276
- equation?: RunEquation;
13277
- /**
13278
- * The run's phonetic guide (`a:ruby`: furigana, pinyin, bopomofo), when it
13279
- * has one. A binding renders `<ruby>{text}<rt style>{ruby.text}</rt></ruby>`;
13280
- * a run carrying one is never split per word, so the annotation appears once
13281
- * over the whole base run.
13282
- *
13283
- * Core parsed and saved ruby from the start, but `buildParagraphs` never read
13284
- * it, so the annotation rendered in React alone.
13285
- */
13286
- ruby?: RunRuby;
13287
- /**
13288
- * Index of the `textSegments` entry (of the override list when one was
13289
- * supplied) this run was built from.
13290
- *
13291
- * Shared splits one authored run into several per-word runs for PowerPoint's
13292
- * metric tracking, so this is many-to-one. It is the seam a binding uses to
13293
- * reach the facts the neutral model does not carry - React's find-match
13294
- * highlights, per-script font spans, tab stops and ruby all key off the
13295
- * originating segment - without regrouping the segments itself and drifting
13296
- * from the grouping here.
13297
- */
13298
- segmentIndex?: number;
13299
- /**
13300
- * Offset of this run's `text` within its segment's RENDERED text (after field
13301
- * substitution), so a caller holding per-segment character offsets can map
13302
- * them onto the split runs.
13303
- */
13304
- charStart?: number;
13305
- /**
13306
- * Per-script (`a:ea`/`a:cs`/`a:sym`) font-fallback pieces for this run's
13307
- * text, when a script it contains needs a font distinct from its own. A
13308
- * binding renders these as nested spans in place of `text` (see
13309
- * `text-script-fonts.ts`); absent for the common single-font case.
13310
- */
13311
- scriptRuns?: ScriptFontPiece[];
13312
- /**
13313
- * Measured tab-stop layout for this run's text, present when it contains an
13314
- * authored `\t` and the paragraph declares explicit tab stops. A binding
13315
- * renders these lines/pieces in place of `text`, honouring per-stop
13316
- * alignment and leader glyphs a plain CSS `tab-size` cannot express (see
13317
- * `text-tab-run-build.ts`). Absent for the common no-tab case.
13318
- */
13319
- tabLines?: TabbedLineRun[];
13320
- /**
13321
- * `a:rPr/@u="words"` word/gap pieces of a RUBY run's base text, present only
13322
- * when such a run's underline is `words` (the ordinary per-word split emits
13323
- * sibling runs instead; a tab piece carries its own `words`). Same shape as
13324
- * `scriptRuns` and rendered the same way, in place of `text`: a word entry
13325
- * carries the decoration for its own span, a gap entry is bare text. The
13326
- * run's own `style` has the underline stripped when this is set (see
13327
- * `paragraph-run-build.ts`).
13328
- */
13329
- underlineWordPieces?: ScriptFontPiece[];
13330
- /** The advance-carrying space after a hanging `、`/`。` (`text-east-asian-breaks`). */
13331
- hangingSpace?: true;
13332
- /**
13333
- * `a:reflection` mirrored-sibling wrapper style for this run (the text-run
13334
- * counterpart of a shape/picture's `ComputedEffectStyle.reflection`), or
13335
- * `undefined` for the common no-reflection case. A binding renders a sibling
13336
- * node just below the run's own, painted with the same text, positioned and
13337
- * masked by this style - see `render/reflection.ts`'s
13338
- * `getTextReflectionWrapperStyle`.
13339
- */
13340
- reflection?: ReflectionWrapperStyle;
13341
- }
13342
- /** A rendered paragraph: runs plus resolved bullet + hanging-indent metadata. */
13343
- interface RenderParagraph {
13344
- runs: ParagraphRun[];
13345
- /** Bullet glyph / number to render before the runs (or `undefined`). */
13346
- bulletMarker?: string;
13347
- /** Picture marker rendered before runs, or fallback metadata when unresolved. */
13348
- bulletPicture?: PictureBulletMarker;
13349
- /** Inline style for the bullet marker (font / size / colour). */
13350
- bulletStyle: RunStyle;
13351
- /** `margin-left` in px for the whole paragraph (hanging-indent layout). */
13352
- marginLeftPx?: number;
13353
- /** `text-indent` in px (first-line / hanging indent). */
13354
- textIndentPx?: number;
13355
- /**
13356
- * Per-paragraph `line-height` from this paragraph's own `a:pPr > a:lnSpc`.
13357
- * A unitless multiplier for proportional spacing (`a:spcPct`) or a `"<n>pt"`
13358
- * string for exact spacing (`a:spcPts`). Undefined when the paragraph does
13359
- * not override spacing (binding keeps the body-level line-height).
13360
- */
13361
- lineHeight?: number | string;
13362
- /** `margin-top` in px from this paragraph's `a:pPr > a:spcBef` (space before). */
13363
- spaceBeforePx?: number;
13364
- /** `margin-bottom` in px from this paragraph's `a:pPr > a:spcAft` (space after). */
13365
- spaceAfterPx?: number;
13366
- /**
13367
- * `font-size` in px to set on the paragraph element so its CSS line boxes
13368
- * are built from its OWN runs rather than the text body's default size.
13369
- * Undefined when the paragraph already matches the body default.
13370
- *
13371
- * See `resolveParagraphStrutFontSize` for why this is needed: without it a
13372
- * paragraph of small runs inside a larger-defaulting body is laid out on
13373
- * too-tall lines and overflows its shape.
13374
- */
13375
- strutFontSizePx?: number;
13376
- /**
13377
- * True when the paragraph has no runs and no bullet: an authored blank line
13378
- * (`<a:p><a:endParaRPr/></a:p>`).
13379
- *
13380
- * PowerPoint gives such a paragraph a full line box, which is how decks
13381
- * space a heading away from the bullet list under it. A binding must render
13382
- * something with height for it (a `<br>`), or the gap disappears and the
13383
- * block reads as one dense run of text (issue #131, slides 13-14).
13384
- */
13385
- isEmpty?: boolean;
13386
- /**
13387
- * Indices of this paragraph's segments in the rendered segment list (the
13388
- * override list when one was supplied), in authored order and INCLUDING the
13389
- * bullet-marker segment the runs drop.
13390
- *
13391
- * The seam a binding uses to reach paragraph facts the neutral model does not
13392
- * carry, without regrouping the segments itself and drifting from the
13393
- * grouping here - which is exactly how React ended up splitting on every
13394
- * `"\n"` and treating a soft `a:br` as a paragraph break.
13395
- */
13396
- segmentIndices: number[];
13397
- /**
13398
- * True when this paragraph resolves right-to-left (`a:pPr/@rtl`, or the text
13399
- * body's default). A binding that mirrors its hanging indent for RTL reads
13400
- * this; the direction itself is already in {@link paragraphStyle}.
13401
- */
13402
- rtl?: boolean;
13403
- /**
13404
- * Extra CSS for the paragraph box, beyond the margin / indent / spacing
13405
- * fields above: this paragraph's own `text-align` (`a:pPr/@algn`), its BiDi
13406
- * `direction`, and the kinsoku line-breaking rules (`@eaLnBrk`,
13407
- * `@latinLnBrk`, `@hangingPunct`). Absent when the paragraph overrides none
13408
- * of them, which is the common case.
13409
- *
13410
- * All three used to be resolved in React's private paragraph renderer only,
13411
- * so a deck that centred one paragraph of a left-aligned body, or set CJK
13412
- * break rules, rendered differently in the other four bindings.
13413
- */
13414
- paragraphStyle?: RunStyle;
13415
- /**
13416
- * `@hangingPunct` / `@eaLnBrk="0"` as resolved for this paragraph. The runs
13417
- * above already carry their pieces; React, which rebuilds each segment's
13418
- * pieces inside one span, re-applies `splitEastAsianBreaks` from this.
13419
- */
13420
- eastAsianBreaks?: EastAsianBreakOptions;
13421
- }
13422
- //#endregion
13423
- //#region src/render/inline-list-types.d.ts
13424
- /** Current editor payload. Missing segments explicitly denotes plain-text fallback. */
13425
- interface InlineTextEditSnapshot {
13426
- elementId: string;
13427
- text: string;
13428
- textSegments?: TextSegment[];
13429
- }
13430
- type InlineListReadResult = {
13431
- kind: 'supported';
13432
- snapshot: InlineTextEditSnapshot;
13433
- paragraphs: RenderParagraph[];
13434
- } | {
13435
- kind: 'unsupported';
13436
- reason: string;
13437
- text: string;
13438
- };
13439
- //#endregion
13440
- //#region src/render/inline-selection-utils.d.ts
13441
- /** Describes which segments (and offsets within them) are selected. */
13442
- interface InlineTextSelection {
13443
- startSegIdx: number;
13444
- startOffset: number;
13445
- endSegIdx: number;
13446
- endOffset: number;
13447
- }
13448
- //#endregion
13449
- //#region src/render/text-field-substitution.d.ts
13450
- /**
13451
- * Text-field placeholder substitution, shared by every binding's text
13452
- * renderer.
13453
- *
13454
- * Pure string logic: resolves OOXML field runs (slide number, date/time,
13455
- * header/footer, document properties, slide title) into their display text.
13456
- * Extracted from the React `viewer/utils/text-field-substitution` module so
13457
- * every binding substitutes identically. The locale-aware datetime engine
13458
- * lives in `text-field-datetime.ts`.
13459
- */
13460
- /** Context for substituting field placeholders (slide number, date/time, header/footer, etc.). */
13461
- interface FieldSubstitutionContext {
13462
- slideNumber?: number;
13463
- dateTimeText?: string;
13464
- /**
13465
- * The deck's master date-field default TYPE (`a:fld/@type` on the slide
13466
- * master's `dt` placeholder, e.g. "datetime2"; see `header-footer-parts.ts`).
13467
- * This is a field TYPE, not a format pattern, and is used ONLY as a
13468
- * fallback for a field authored with the generic, unnumbered `datetime`
13469
- * type - a field that already names its own `datetime1`-`datetime13` type
13470
- * always uses that type, never this one (see `substituteFieldText`).
13471
- */
13472
- dateFormat?: string;
13473
- /** Footer text from PptxHeaderFooter settings. */
13474
- footerText?: string;
13475
- /** Header text from PptxHeaderFooter settings. */
13476
- headerText?: string;
13477
- /** Custom document properties for `docproperty` field substitution (keyed by property name). */
13478
- customProperties?: ReadonlyArray<{
13479
- name: string;
13480
- value: string;
13481
- }>;
13482
- /** Locale string for date/time formatting (e.g. "en-US"). Falls back to browser default. */
13483
- locale?: string;
13484
- /** Title text extracted from the first title placeholder on the slide. */
13485
- slideTitle?: string;
13486
- }
13487
- /**
13488
- * Changes to apply to textStyle from the advanced panel.
13489
- * Every key maps 1-to-1 to TextStyle fields.
13490
- */
13491
- type TextAdvancedChanges = Partial<Pick<TextStyle, 'characterSpacing' | 'lineSpacing' | 'lineSpacingExactPt' | 'paragraphSpacingBefore' | 'paragraphSpacingAfter' | 'align' | 'vAlign' | 'paragraphIndent' | 'paragraphMarginLeft' | 'textDirection' | 'rtl'>>;
13492
- //#endregion
13493
- //#region src/render/text-case-transform.d.ts
13494
- type ChangeCaseMode = 'sentence' | 'lower' | 'upper' | 'capitalize' | 'toggle';
13495
- interface CollaborationShellState {
13496
- canEdit: boolean;
13497
- status: ConnectionStatus;
13498
- remoteUsers: readonly SanitizedPresence[];
13499
- connectedCount: number;
13500
- }
13501
- type CollaborationShellTranslate = (key: string, params?: Record<string, string | number>) => string;
13502
- /**
13503
- * One-line, localised status for a custom shell's `role="status"` readout.
13504
- *
13505
- * Every binding's custom-shell demo renders this same string under the same
13506
- * `Collaboration status` label, so the framework-neutral e2e helper that
13507
- * waits for the shell to become editable (`waitForHostEditing`) reads every
13508
- * binding the same way. Three of five demos once phrased it differently and
13509
- * the helper silently skipped them; on vanilla, that let a peer double-click
13510
- * before its edit gate opened.
13511
- */
13512
- declare function describeCollaborationShellState(state: Pick<CollaborationShellState, 'canEdit' | 'status' | 'connectedCount'>, translate: CollaborationShellTranslate): string;
13513
- //#endregion
13514
- //#region src/render/collaboration-text-codec.d.ts
13515
- /**
13516
- * collaboration-text-codec.ts: TextSegment[] <-> Y.Text delta codec used by the
13517
- * collaboration sync layer. Split out of collaboration-sync.ts to keep both
13518
- * modules focused.
13519
- *
13520
- * Exports:
13521
- * - DeltaOp / YTextLike: structural Yjs text interfaces (no yjs import)
13522
- * - encodeTextBody: write TextSegment[] into a live YTextLike
13523
- * - encodeSegmentsToDelta: pure simulation of the delta Y.Text would produce
13524
- * - decodeDelta / decodeTextBody: delta -> TextSegment[]
13525
- * - isYTextLike: runtime guard
13526
- */
13527
- interface DeltaOp {
13528
- insert?: unknown;
13529
- attributes?: Record<string, unknown>;
13530
- }
13531
- interface YTextLike {
13532
- insert: (index: number, text: string, attrs?: Record<string, string>) => void;
13533
- toDelta: () => DeltaOp[];
13534
- toString: () => string;
13535
- }
13536
- //#endregion
13537
- //#region src/render/collaboration-text-merge.d.ts
13538
- /** Y.Text surface needed for in-place edits (delete/format on top of insert). */
13539
- interface YTextEditableLike extends YTextLike {
13540
- delete: (index: number, length: number) => void;
13541
- format: (index: number, length: number, attributes: Record<string, string | null>) => void;
13542
- }
13543
- //#endregion
13544
- //#region src/render/collaboration-text-positions.d.ts
13545
- interface TextPositionCell {
13546
- index: number;
13547
- left?: TextPositionCell;
13548
- right?: TextPositionCell;
13549
- }
13550
- interface TrackedTextPosition {
13551
- /** Internal identity, shared by snapshots that observed the same character. */
13552
- readonly cell: TextPositionCell;
13553
- readonly association: number;
13554
- }
13555
- //#endregion
13556
- //#region src/render/collaboration-text-session-delta.d.ts
13557
- /** Browser edit range mapped to the editor's pre-input encoded coordinates. */
13558
- interface LocalTextReplacement {
13559
- from: number;
13560
- to: number;
13561
- }
13562
- /** Desired UTF-16 units mapped to the editor's previously observed identities. */
13563
- interface TextSessionCorrespondence {
13564
- readonly retainedIndices: readonly (number | null)[];
13565
- /** Old carriers for known paragraph attributes, independently of character identity. */
13566
- readonly paragraphSources?: readonly (number | null)[];
13567
- }
13568
- type LocalTextEdit = LocalTextReplacement | TextSessionCorrespondence;
13569
- //#endregion
13570
- //#region src/render/collaboration-text-session.d.ts
13571
- /** Supplied by the binding's existing Yjs runtime, bound to this exact Y.Text. */
13572
- interface TextSessionPositions<Position> {
13573
- capture: (index: number, association: number) => Position;
13574
- resolve: (position: Position) => number | null;
13575
- /** Synchronize tracked positions once per batch, including in-transaction writes. */
13576
- refresh?: () => boolean | void;
13577
- /** Release only resources created for this session. */
13578
- dispose?: () => void;
13579
- }
13580
- /** Opaque acknowledgement identity for an exact remote snapshot painted by an adapter. */
13581
- interface CollaborationTextSnapshot {
13582
- readonly delta: readonly DeltaOp[];
13583
- }
13584
- interface CollaborationTextSession {
13585
- applyLocalDelta: (delta: readonly DeltaOp[], edit?: LocalTextEdit) => boolean;
13586
- readMerged: () => CollaborationTextSnapshot | undefined;
13587
- adoptMerged: (snapshot: CollaborationTextSnapshot) => boolean;
13588
- /** Capture an offset in the last painted/local draft, not the newer remote string. */
13589
- bookmark: (index: number, association: number) => () => number | null;
13590
- dispose: () => void;
13591
- }
13592
- //#endregion
13593
- //#region src/render/collaboration-sync.d.ts
13594
- interface YMapLike {
13595
- get: (key: string) => unknown;
13596
- set: (key: string, value: unknown) => void;
13597
- delete: (key: string) => void;
13598
- forEach: (cb: (value: unknown, key: string) => void) => void;
13599
- }
13600
- /** Shape of the Yjs transaction passed to (deep) observers. */
13601
- interface YTransactionLike {
13602
- origin?: unknown;
13603
- }
13604
- type YDeepObserver = (events?: unknown, transaction?: YTransactionLike) => void;
13605
- interface YArrayLike {
13606
- readonly length: number;
13607
- get: (index: number) => unknown;
13608
- push: (items: unknown[]) => void;
13609
- delete: (index: number, length?: number) => void;
13610
- insert: (index: number, items: unknown[]) => void;
13611
- toArray: () => unknown[];
13612
- observe: (handler: () => void) => void;
13613
- unobserve: (handler: () => void) => void;
13614
- observeDeep: (handler: YDeepObserver) => void;
13615
- unobserveDeep: (handler: YDeepObserver) => void;
13616
- }
13617
- interface YDocLike {
13618
- getMap: (name: string) => YMapLike;
13619
- getArray: (name: string) => YArrayLike;
13620
- transact: (fn: () => void, origin?: unknown) => void;
13621
- }
13622
- interface YjsFactories {
13623
- createMap: () => YMapLike;
13624
- createArray: () => YArrayLike;
13625
- createText: () => YTextLike;
13626
- /** Track character identities using the binding's existing Yjs runtime. */
13627
- createTextPositions?: (text: YTextEditableLike) => TextSessionPositions<TrackedTextPosition>;
13628
- }
13629
- //#endregion
13630
- //#region src/render/collaboration-live-patch-target.d.ts
13631
- /** Interim geometry for an element mid-gesture. All fields optional. */
13632
- interface LiveGeometryPatch {
13633
- x?: number;
13634
- y?: number;
13635
- width?: number;
13636
- height?: number;
13637
- rotation?: number;
13638
- }
13639
- /** The element's pre-edit rich text, used to remap the interim plain text. */
13640
- interface LiveTextSource {
13641
- textSegments?: TextSegment[];
13642
- textStyle?: TextStyle;
13643
- }
13644
- //#endregion
13645
- //#region src/render/collaboration-text-target.d.ts
13646
- interface CollaborationInlineSnapshot extends CollaborationTextSnapshot {
13647
- readonly inline: InlineTextEditSnapshot;
13648
- }
13649
- /** A mounted editor owns this handle, never the document or its provider. */
13650
- interface CollaborationTextTarget extends CollaborationTextSession {
13651
- readMerged: () => CollaborationInlineSnapshot | undefined;
13652
- /** A bookmark follows character identity rather than a mutable numeric offset. */
13653
- bookmark: (index: number, association: number) => () => number | null;
13654
- }
13655
- interface CollaborationLivePatcher {
13656
- /** Bind a mounted native editor; its handle must be disposed on unmount. */
13657
- beginTextEdit?: (slideId: string | undefined, elementId: string, onChange?: () => void, ownsModel?: (element: PptxElement) => boolean) => CollaborationTextTarget | undefined;
13658
- /** Attach a live doc (or `null` to go dormant). Pending patches are dropped. */
13659
- configure: (doc: YDocLike | null, factories: YjsFactories | null,
13660
- /** Publish synchronously when the host may revoke write readiness at any time. */
13661
- immediate?: boolean) => void;
13662
- /** True when a doc + factories are attached, i.e. patches will be written. */
13663
- isActive: () => boolean;
13664
- /** Queue interim geometry for an element. */
13665
- patchGeometry: (slideId: string | undefined, elementId: string, geometry: LiveGeometryPatch) => void;
13666
- /** Queue interim text for an element (remapped over `source`'s segments). */
13667
- patchText: (slideId: string | undefined, elementId: string, text: string, source?: LiveTextSource) => void;
13668
- /** Write everything queued right now (call on gesture end / edit commit). */
13669
- flush: () => void;
13670
- /** Drop pending work, cancel timers and detach the doc. */
13671
- dispose: () => void;
13672
- }
13673
- //#endregion
13674
- //#region src/render/collaboration-load-origin.d.ts
13675
- /**
13676
- * Who asked for the deck that just finished loading, and what that means for a
13677
- * room that already holds slides.
13678
- *
13679
- * Every binding brackets its content-load with an adoption check: when a load
13680
- * lands while a collaboration session is up and the shared doc already has
13681
- * slides, the ROOM wins and the freshly parsed deck is thrown away. That rule
13682
- * exists for one case only - a late joiner whose bootstrap deck (the blank or
13683
- * sample deck the host mounted the viewer with) finishes parsing after the
13684
- * room's real slides arrived, which would otherwise clobber them with nothing
13685
- * left to repair it, since the doc itself never changed.
13686
- *
13687
- * Applied to EVERY load it also swallows the deck a user deliberately opens
13688
- * during a session. Joining a room and then opening a file left the viewer on
13689
- * the room's blank starter deck: the file parsed, was committed, and was
13690
- * immediately overwritten (reproduced in the vanilla demo - a 7-slide deck
13691
- * opened in a room settled back to the room's 1 slide, and the bigger the file
13692
- * the longer the window). Opening a file is an act of authorship, so it is
13693
- * published to the room instead.
13694
- *
13695
- * @module render/collaboration-load-origin
13696
- */
13697
- /**
13698
- * Why a content load ran.
13699
- *
13700
- * - `bootstrap`: the deck the host handed the viewer at mount (`source`), or a
13701
- * session restore. Nobody chose it during the session.
13702
- * - `user`: opened during the session - File > Open, a recent file, a dropped
13703
- * file, or a host calling the load API.
13704
- */
13705
- type CollabLoadOrigin = 'bootstrap' | 'user';
13706
- //#endregion
13707
- //#region src/render/slide-transition-types.d.ts
13708
- /** Resolved CSS `animation` shorthands for the two transition layers. */
13709
- interface SlideTransitionAnimations {
13710
- /** CSS `animation` value for the outgoing (old) slide layer, or `'none'`. */
13711
- outgoing: string;
13712
- /** CSS `animation` value for the incoming (new) slide layer, or `'none'`. */
13713
- incoming: string;
13714
- /** Whether the outgoing layer should render above the incoming layer. */
13715
- outgoingOnTop: boolean;
13716
- }
13717
- /** The four cardinal directions a transition can resolve to. */
13718
- type ResolvedDirection = 'left' | 'right' | 'up' | 'down';
13719
- /** Cardinal directions plus the four diagonals (for cover/uncover/strips). */
13720
- type ResolvedDirection8 = ResolvedDirection | 'lu' | 'ld' | 'ru' | 'rd';
13721
- /** Map an OOXML `dir` token (`l`/`r`/`u`/`d`) to a cardinal direction. */
13722
- declare function resolveDirection(direction: string | undefined, defaultDir: ResolvedDirection): ResolvedDirection;
13723
- /** Map an OOXML `dir` token to a cardinal **or diagonal** direction. */
13724
- declare function resolveDirection8(direction: string | undefined, defaultDir: ResolvedDirection): ResolvedDirection8;
13725
- /** Resolve an orientation from the `orient` or `direction` attribute. */
13726
- declare function resolveOrientation(direction: string | undefined, orient: string | undefined): 'horz' | 'vert';
13727
- /** Transition types eligible for `random` selection (kept deterministic-light). */
13728
- declare const RANDOM_ELIGIBLE_TYPES: readonly PptxTransitionType[];
13729
- /** No-animation sentinel — used for `none`/`cut` (instant slide swap). */
13730
- declare const INSTANT: SlideTransitionAnimations;
13731
- /**
13732
- * Default transition duration (ms) when the transition omits `durationMs`. This
13733
- * is the React/Vue default consumed by `resolveSlideTransition`. The Angular
13734
- * binding uses its own (smaller, floored) duration policy.
13735
- */
13736
- declare const DEFAULT_TRANSITION_DURATION_MS = 1000;
13737
- /**
13738
- * Default Morph duration (ms) for a transition that declares NEITHER an
13739
- * explicit `p14:dur` (which lands in `durationMs` and always wins) NOR a legacy
13740
- * `spd` speed (see {@link TRANSITION_SPEED_DURATION_MS}).
13741
- *
13742
- * A Morph that declares nothing carries no duration hint at all, and desktop
13743
- * PowerPoint then plays it at its own 0.5s fallback (the Duration box shows
13744
- * 0.50 for such slides and the transition measures at half a second); the
13745
- * previous 1.0s/2.0s defaults made those decks play at double PowerPoint
13746
- * speed.
13747
- */
13748
- declare const DEFAULT_MORPH_DURATION_MS = 500;
13749
- /**
13750
- * Duration (ms) for each legacy `p:transition/@spd` speed.
13751
- *
13752
- * Measured against PowerPoint itself: the issue #131 deck's morph slides carry
13753
- * `spd="slow"` and no `p14:dur`, and PowerPoint reports
13754
- * `SlideShowTransition.Duration = 1.0`. Re-authoring that attribute and
13755
- * re-reading it through COM gives fast=0.5s, med=0.75s, slow=1.0s - and the
13756
- * same values for Morph as for every other effect, contradicting the earlier
13757
- * assumption that Morph ignores `spd`.
13758
- */
13759
- declare const TRANSITION_SPEED_DURATION_MS: Readonly<Record<string, number>>;
13760
- /** Easing applied to every transition animation. */
13761
- declare const EASE = "ease-in-out";
13762
- /**
13763
- * `p:wheel/@spokes` (CT_WheelTransition): PowerPoint's Wheel dialog offers
13764
- * exactly these five spoke counts. Any other authored value (or absence, the
13765
- * schema default) snaps to the nearest one so the keyframe lookup always
13766
- * resolves to a real `pptx-tr-wheel-in-N` block.
13767
- */
13768
- declare const WHEEL_SPOKE_COUNTS: readonly number[];
13769
- /** Resolve an authored `spokes` count to the nearest PowerPoint-offered value. */
13770
- declare function resolveWheelSpokeCount(spokes: number | undefined): number;
13771
- //#endregion
13772
- //#region src/render/slide-transition-keyframes.d.ts
13773
- /**
13774
- * `slide-transition-keyframes` — the full `@keyframes` block backing every
13775
- * resolved slide transition. Inject it once per overlay via a `<style>` element
13776
- * (the same pattern the element-animation engine uses for
13777
- * `ANIMATION_KEYFRAMES_CSS`).
13778
- *
13779
- * Keyframe names are `pptx-tr-*`-prefixed so they never collide with the
13780
- * element-animation keyframes (`pptx-vue-*`) or the native-animation timeline
13781
- * keyframes (`pptx-tl-*`).
13782
- *
13783
- * Both {@link SLIDE_TRANSITION_KEYFRAMES} and the `*_CSS` alias point at the
13784
- * same string — the bindings historically exported it under both names, so the
13785
- * alias preserves their public surface.
13786
- *
13787
- * The faithful Office 2010 (`p14`) keyframes are appended (via
13788
- * {@link P14_TRANSITION_KEYFRAMES_ALL}) so the exotic / 3-D transitions routed
13789
- * through `getP14TransitionAnimations` animate wherever this block is injected,
13790
- * with no per-binding wiring. {@link FRAGMENT_TRANSITION_KEYFRAMES} is appended
13791
- * last, backing the seven multi-fragment cinematic presets resolved by
13792
- * `getFragmentedTransitionDescriptor` (`slide-transition-fragments.ts`).
13793
- *
13794
- * @module render/slide-transition-keyframes
13795
- */
13796
- /**
13797
- * The full slide-transition `@keyframes` block: the classic set plus the
13798
- * faithful Office 2010 (`p14`) keyframes, so both the classic and exotic / 3-D
13799
- * transitions animate wherever this single string is injected.
13800
- */
13801
- declare const SLIDE_TRANSITION_KEYFRAMES: string;
13802
- /**
13803
- * Alias of {@link SLIDE_TRANSITION_KEYFRAMES} under the `_CSS` name the Vue
13804
- * binding historically exported.
13805
- */
13806
- declare const SLIDE_TRANSITION_KEYFRAMES_CSS: string;
13807
- //#endregion
13808
- //#region src/render/slide-transition-css.d.ts
13809
- /**
13810
- * Map a {@link PptxTransitionType} (+ duration/direction/orient/spokes) to the
13811
- * concrete CSS `animation` descriptors for the outgoing and incoming layers.
13812
- *
13813
- * Unknown types fall back to a symmetrical cross-fade.
13814
- */
13815
- declare function getSlideTransitionAnimations(type: PptxTransitionType, durationMs: number, direction: string | undefined, orient?: string | undefined, spokes?: number | undefined, pattern?: string | undefined): SlideTransitionAnimations;
13816
- /**
13817
- * Convenience wrapper that reads everything off a {@link PptxSlideTransition},
13818
- * applying the React/Vue default duration when none is set. `none`/`cut` and a
13819
- * transition with a non-positive duration resolve to {@link INSTANT}.
13820
- */
13821
- declare function resolveSlideTransition(transition: PptxSlideTransition | undefined): SlideTransitionAnimations;
13822
- /**
13823
- * The effective duration (ms) for a transition under the React/Vue policy — the
13824
- * configured `durationMs`, or {@link DEFAULT_TRANSITION_DURATION_MS} when
13825
- * unset/invalid. `none`/`cut` resolve to `0` (instant).
13826
- */
13827
- declare function resolveTransitionDurationMs(transition: PptxSlideTransition | undefined): number;
13828
- /** Everything the Transitions tab's controls currently say. */
13829
- interface RibbonTransitionDraft {
13830
- /** The highlighted gallery entry. */
13831
- type: PptxTransitionType;
13832
- /** Duration field, in seconds. */
13833
- durationSec: number;
13834
- /** Advance Slide > On Mouse Click. */
13835
- advanceOnClick: boolean;
13836
- /** Advance Slide > After (whether the timed advance is armed at all). */
13837
- advanceAfter: boolean;
13838
- /** Advance Slide > After, as the `mm:ss.hh` text the field holds. */
13839
- advanceAfterText: string;
13840
- }
13841
- type BackstagePage = 'home' | 'new' | 'open' | 'info' | 'save' | 'saveAs' | 'print' | 'share' | 'export' | 'close' | 'account' | 'options';
13842
- //#endregion
13843
- //#region src/render/backstage-cards.d.ts
13844
- /**
13845
- * Every action card the File-tab backstage can show, keyed by the operation it
13846
- * triggers rather than by its wording.
13847
- *
13848
- * The five bindings used to hardcode a title and a body string each, which made
13849
- * the whole backstage untranslatable and let the copy drift: the same card
13850
- * carried four different descriptions depending on which binding you opened it
13851
- * in. Both halves now live here as a dictionary key plus an English fallback,
13852
- * so a wording change lands everywhere at once and a translator only has to
13853
- * translate it once.
13854
- */
13855
- type BackstageCardId = 'protect' | 'inspect' | 'embedFonts' | 'signatures' | 'versionHistory' | 'saveAsPptx' | 'saveAsPpsx' | 'saveAsPptm' | 'saveAsPpt' | 'pdf' | 'png' | 'video' | 'gif' | 'json' | 'copyImage' | 'print' | 'share';
13856
- //#endregion
13857
- //#region src/render/toolbar-actions.d.ts
13858
- /**
13859
- * Toolbar action / ribbon-tab visibility: a single, framework-agnostic
13860
- * catalogue of every top-level toolbar button and ribbon tab a host app can
13861
- * independently hide. Each binding exposes a `hiddenActions?: ToolbarActionId[]`
13862
- * prop, threads it down to the relevant render sites, and gates them with
13863
- * `isActionHidden`. Default (`undefined` / `[]`) hides nothing, matching
13864
- * today's always-visible behaviour.
13865
- *
13866
- * `TOOLBAR_TABS` is also the canonical ribbon-tab list/order, replacing the
13867
- * copy hand-duplicated in each binding (React's `TOOLBAR_SECTIONS`, Vue's
13868
- * `ribbon-constants.ts`, Angular's `RIBBON_TABS`, etc.) so the tab set can't
13869
- * drift between bindings. Per-tab icons stay in each binding (icon libraries
13870
- * differ per framework); only id + i18n key + order are shared here.
13871
- */
13872
- /**
13873
- * A single toolbar button/control that can be hidden independently of the
13874
- * ribbon tab it may also appear inside. `zoom` and `navigation` each cover a
13875
- * whole control cluster (zoom in/out/fit, prev/next) rather than each button
13876
- * in it, matching how hosts actually want to hide/keep them as a unit.
13877
- */
13878
- type ToolbarButtonId = 'share' | 'broadcast' | 'export' | 'undo' | 'redo' | 'record' | 'notes' | 'fullscreen' | 'zoom' | 'navigation' | 'mergeShapes' | 'crop';
13879
- /** A top-level ribbon tab. `record` intentionally shares its id with the quick-access Record button above: both surface the same recording feature, so hiding one hides the other. */
13880
- type ToolbarTabId = 'file' | 'home' | 'insert' | 'draw' | 'design' | 'transitions' | 'animations' | 'slideShow' | 'record' | 'review' | 'view' | 'help';
13881
- type ToolbarActionId = ToolbarButtonId | ToolbarTabId;
13882
- /**
13883
- * PowerPoint's contextual tabs: they join the tab row only while the
13884
- * selection is of their kind (see `contextualTabsForElement` in
13885
- * `ribbon-galleries/`). Kept apart from `ToolbarTabId` because they are not
13886
- * part of the fixed tab order every binding renders.
13887
- */
13888
- type RibbonContextualTabId = 'shapeFormat' | 'pictureFormat' | 'tableDesign' | 'chartDesign' | 'smartArtDesign';
13889
- //#endregion
13890
- //#region src/render/canvas-context-menu-commands.d.ts
13891
- /**
13892
- * The right-click menu for the empty slide canvas (no element under the
13893
- * cursor), as distinct from {@link ./context-menu-commands}'s per-element menu.
13894
- *
13895
- * Right-clicking empty canvas used to do nothing at all in every binding: React
13896
- * and Vue both bailed out early (`getElementIdFromEvent` returns `null`, so the
13897
- * handler just returns) rather than opening a menu, and the other three never
13898
- * wired a handler for it either. PowerPoint offers Paste, Layout, Reset,
13899
- * Format Background and view toggles (Grid and Guides, Ruler) from this menu;
13900
- * this module is the one list every binding renders instead of five omissions.
13901
- *
13902
- * @module render/canvas-context-menu-commands
13903
- */
13904
- /** Every command the empty-canvas context menu can offer, in no particular order. */
13905
- type CanvasContextMenuCommandId = 'paste' | 'layout' | 'reset-slide' | 'format-background' | 'grid-and-guides' | 'ruler';
13906
- //#endregion
13907
- //#region src/render/merge-shapes/merge-shapes-menu.d.ts
13908
- /** The right-click command id for each operation. */
13909
- type MergeShapesCommandId = 'merge-union' | 'merge-combine' | 'merge-fragment' | 'merge-intersect' | 'merge-subtract';
13910
- /** Every command a canvas context menu can offer, in no particular order. */
13911
- type ContextMenuCommandId = 'copy' | 'cut' | 'paste' | 'duplicate' | 'edit-text' | 'edit-points' | 'bring-forward' | 'send-backward' | 'bring-front' | 'send-back' | 'ai-ask' | 'ai-fix' | 'comment' | 'hyperlink' | 'table-insert-row-above' | 'table-insert-row-below' | 'table-delete-row' | 'table-insert-col-left' | 'table-insert-col-right' | 'table-delete-col' | 'table-merge-selected' | 'table-merge-right' | 'table-merge-down' | 'table-split' | 'group' | 'ungroup' | 'crop' | MergeShapesCommandId | 'save-as-picture' | 'edit-alt-text' | 'size-and-position' | 'format-shape' | 'delete';
13912
- /** Every command the Edit Points right-click menu can offer. */
13913
- type EditPointsCommandId = 'add-point' | 'delete-point' | 'delete-segment' | 'open-path' | 'close-path' | 'smooth-point' | 'straight-point' | 'corner-point' | 'straight-segment' | 'curved-segment' | 'exit';
13914
- //#endregion
13915
- //#region src/render/edit-points/freeform-tool-geometry.d.ts
13916
- /** The two click-to-place drawing tools. */
13917
- type FreeformToolKind = 'freeformShape' | 'curve';
13918
- //#endregion
13919
- //#region src/render/editor-keymap.d.ts
13920
- /** A logical editor command produced by one key press. */
13921
- type EditorKeyActionName = 'undo' | 'redo' | 'copy' | 'cut' | 'paste' | 'duplicate' | 'delete' | 'selectAll' | 'group' | 'ungroup' | 'nudge' | 'prevSlide' | 'nextSlide' | 'escape' | 'find' | 'findReplace' | 'toggleShortcuts' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'increaseFontSize' | 'decreaseFontSize' | 'copyFormat' | 'pasteFormat' | 'newSlide' | 'hyperlink' | 'clearFormatting' | 'cycleSelectionNext' | 'cycleSelectionPrev' | 'pasteSpecial';
13922
- //#endregion
13923
- //#region src/render/options/viewer-options.d.ts
13924
- /**
13925
- * Full PowerPoint "File > Options" parity model.
13926
- *
13927
- * Groups mirror the ten categories of PowerPoint's Options dialog. Values are
13928
- * flat primitives per group so the dialog panes can be rendered generically
13929
- * from `VIEWER_OPTIONS_SCHEMA` in every binding. The legacy six-toggle
13930
- * `ViewerPreferences` surface stays supported via the mapping helpers below.
13931
- */
13932
- type ScreenTipStyle = 'descriptions' | 'plain' | 'off';
13933
- type DisplayOptimization = 'appearance' | 'compatibility';
13934
- type ImageResolutionPreset = 'highFidelity' | 'ppi330' | 'ppi220' | 'ppi150' | 'ppi96';
13935
- type OpenDocumentsView = 'savedView' | 'normal' | 'outline' | 'slideSorter' | 'notes';
13936
- type DefaultExportFormat = 'pptx' | 'pdf' | 'png';
13937
- type QuickAccessPosition = 'above' | 'below';
13938
- type FeedbackSoundScheme = 'modern' | 'classic';
13939
- type OptionsPrintWhat = 'slides' | 'handouts' | 'notes' | 'outline';
13940
- type OptionsPrintColorMode = 'color' | 'grayscale' | 'blackAndWhite';
13941
- interface ViewerGeneralOptions {
13942
- displayOptimization: DisplayOptimization;
13943
- showMiniToolbar: boolean;
13944
- enableLivePreview: boolean;
13945
- collapseRibbonAutomatically: boolean;
13946
- collapseSearchByDefault: boolean;
13947
- screenTipStyle: ScreenTipStyle;
13948
- userName: string;
13949
- userInitials: string;
13950
- showStartScreen: boolean;
13951
- /**
13952
- * Lets the user hand a local font file to the viewer so decks authored
13953
- * with a font the browser lacks render with the real face.
13954
- *
13955
- * Off by default. The registration reads a file the user picks and adds it
13956
- * to the page's font set for the session, which is a capability a host
13957
- * embedding the viewer should opt into rather than inherit.
13958
- */
13959
- enableCustomFontUpload: boolean;
13960
- }
13961
- interface ViewerProofingOptions {
13962
- autoCorrectTwoInitialCapitals: boolean;
13963
- autoCorrectCapitalizeFirstLetter: boolean;
13964
- autoCorrectCapitalizeDayNames: boolean;
13965
- autoCorrectSmartQuotes: boolean;
13966
- autoCorrectHyphensToDash: boolean;
13967
- autoCorrectFractions: boolean;
13968
- autoCorrectOrdinals: boolean;
13969
- ignoreUppercase: boolean;
13970
- ignoreWordsWithNumbers: boolean;
13971
- ignoreInternetAddresses: boolean;
13972
- flagRepeatedWords: boolean;
13973
- checkSpellingAsYouType: boolean;
13974
- hideSpellingErrors: boolean;
13975
- }
13976
- /**
13977
- * File > Options > Save.
13978
- *
13979
- * Font embedding deliberately has NO entry here. It is owned by the File >
13980
- * Fonts panel, whose toggle is the one the save path reads (see
13981
- * `render/font-embedding`: `describeFontEmbedding` decides the toggle's start
13982
- * position and whether it can do anything at all, `embeddedFontSaveOptions`
13983
- * turns it into the `PptxHandler.save()` slice). This group used to carry a
13984
- * second `embedFonts` boolean, plus an `embedAllFontCharacters` companion, and
13985
- * neither was read by anything: the pane moved a switch that changed no saved
13986
- * byte, while the panel next door moved the real one. Two switches for one
13987
- * setting, one of them lying, is worse than one switch in a less
13988
- * PowerPoint-shaped place.
13989
- */
13990
- interface ViewerSaveOptions {
13991
- autoSave: boolean;
13992
- autoRecoverIntervalMinutes: number;
13993
- keepLastAutoRecoveredVersion: boolean;
13994
- defaultExportFormat: DefaultExportFormat;
13995
- cacheRetentionDays: number;
13996
- clearCacheOnClose: boolean;
13997
- }
13998
- interface ViewerAccessibilityOptions {
13999
- /** Browser speech-recognition language; automatic follows the browser language. */
14000
- subtitleLanguage?: string;
14001
- showAccessibilityStatus: boolean;
14002
- feedbackWithSound: boolean;
14003
- soundScheme: FeedbackSoundScheme;
14004
- showShortcutKeysInScreenTips: boolean;
14005
- reducedMotion: boolean;
14006
- }
14007
- interface ViewerAdvancedOptions {
14008
- autoSelectEntireWord: boolean;
14009
- allowTextDragAndDrop: boolean;
14010
- maximumUndoSteps: number;
14011
- useSmartCutAndPaste: boolean;
14012
- showPasteOptionsButton: boolean;
14013
- imageDefaultResolution: ImageResolutionPreset;
14014
- doNotCompressImages: boolean;
14015
- chartPropertiesFollowDataPoint: boolean;
14016
- recentPresentationsCount: number;
14017
- showVerticalRuler: boolean;
14018
- showGrid: boolean;
14019
- snapToGrid: boolean;
14020
- disableHardwareAcceleration: boolean;
14021
- /**
14022
- * Force every opt-in interactive 3D scene (SmartArt, bar/line/area/pie/
14023
- * surface charts) to fall back to its flat 2D rendering, even when the
14024
- * host has enabled that scene via its own `smartArt3D`/`*Chart3D` prop.
14025
- * A host opting in says "this deck may want 3D"; this is the viewer
14026
- * user's own override for when the WebGL scenes it renders are too much
14027
- * for their machine. See `resolve3DRenderingFlags`.
14028
- */
14029
- disable3DRendering: boolean;
14030
- /**
14031
- * `p:animEffect/@filter="pixelate"` defaults to snapping the element to
14032
- * its end state (`cutIn`/`cutOut`), matching PowerPoint's own behaviour
14033
- * (COM `CreateVideo` frame-diffing shows PowerPoint performs no animation
14034
- * at all for this filter value). This turns on the blocky mosaic reveal
14035
- * this renderer can build instead, for a viewer that would rather show
14036
- * something animating than PowerPoint's own instant swap. See
14037
- * `resolveFilterEffect` in `animation-filter-effects.ts` and
14038
- * `docs/guide/visual-effects.md`.
14039
- */
14040
- pixelateMosaicAnimation: boolean;
14041
- openDocumentsView: OpenDocumentsView;
14042
- slideShowShowMenuOnRightClick: boolean;
14043
- slideShowShowPopupToolbar: boolean;
14044
- slideShowPromptKeepInkAnnotations: boolean;
14045
- slideShowEndWithBlackSlide: boolean;
14046
- printInBackground: boolean;
14047
- printHighQuality: boolean;
14048
- printUseMostRecentSettings: boolean;
14049
- printWhat: OptionsPrintWhat;
14050
- printColorMode: OptionsPrintColorMode;
14051
- printHiddenSlides: boolean;
14052
- printScaleToFit: boolean;
14053
- printFrameSlides: boolean;
14054
- }
14055
- interface ViewerRibbonOptions {
14056
- /** Ribbon tabs unticked in Customize Ribbon. The File tab can never be hidden. */
14057
- hiddenTabIds: ToolbarTabId[];
14058
- }
14059
- interface ViewerQuickAccessOptions {
14060
- visible: boolean;
14061
- position: QuickAccessPosition;
14062
- showCommandLabels: boolean;
14063
- /** Ordered ids from `QUICK_ACCESS_COMMAND_CATALOG`. */
14064
- commandIds: string[];
14065
- }
14066
- interface ViewerTrustOptions {
14067
- openInProtectedView: boolean;
14068
- allowExternalContent: boolean;
14069
- confirmExternalHyperlinks: boolean;
14070
- }
14071
- interface ViewerOptions {
14072
- general: ViewerGeneralOptions;
14073
- proofing: ViewerProofingOptions;
14074
- save: ViewerSaveOptions;
14075
- accessibility: ViewerAccessibilityOptions;
14076
- advanced: ViewerAdvancedOptions;
14077
- ribbon: ViewerRibbonOptions;
14078
- quickAccess: ViewerQuickAccessOptions;
14079
- trust: ViewerTrustOptions;
14080
- }
14081
- type ViewerOptionsGroupId = keyof ViewerOptions;
14082
- type ViewerOptionPrimitive = boolean | number | string;
14083
- //#endregion
14084
- //#region src/render/options/viewer-options-controls.d.ts
14085
- /**
14086
- * Control/section/tab descriptor types for the File > Options schema, plus
14087
- * the terse constructors the tab-definition modules build panes with.
14088
- */
14089
- type ViewerOptionsTabId = 'general' | 'proofing' | 'save' | 'language' | 'accessibility' | 'advanced' | 'ribbon' | 'quickAccess' | 'addIns' | 'trust';
14090
- //#endregion
14091
- //#region src/render/customization/host-menu-commands.d.ts
14092
- /** Snapshot of the slide on which the host command was offered. */
14093
- interface HostCanvasMenuContext {
14094
- slideIndex: number;
14095
- }
14096
- /** Effective selection, including a single right-clicked element. */
14097
- interface HostElementMenuContext extends HostCanvasMenuContext {
14098
- elementIds: readonly string[];
14099
- }
14100
- /** Plain text labels work identically in every framework. */
14101
- interface HostMenuCommand<C> {
14102
- id: string;
14103
- label: string;
14104
- /** Default: a separate group above the built-in commands. */
14105
- group?: 'top' | 'bottom';
14106
- disabled?: boolean | ((context: C) => boolean);
14107
- onSelect: (context: C) => void;
14108
- }
14109
- //#endregion
14110
- //#region src/render/customization/ribbon-control-catalog.d.ts
14111
- declare const RIBBON_CONTROL_CATALOG: {
14112
- readonly home: {
14113
- readonly clipboard: {
14114
- readonly label: 'Clipboard';
14115
- readonly controls: {
14116
- readonly paste: 'Paste';
14117
- readonly cut: 'Cut';
14118
- readonly copy: 'Copy';
14119
- readonly formatPainter: 'Format Painter';
14120
- };
14121
- };
14122
- readonly slides: {
14123
- readonly label: 'Slides';
14124
- readonly controls: {
14125
- readonly newSlide: 'New Slide';
14126
- readonly layout: 'Layout';
14127
- readonly reset: 'Reset';
14128
- readonly section: 'Section';
14129
- readonly slideTemplates: 'Slide templates';
14130
- };
14131
- };
14132
- readonly font: {
14133
- readonly label: 'Font';
14134
- readonly controls: {
14135
- readonly fontFamily: 'Font';
14136
- readonly fontSize: 'Font Size';
14137
- readonly increaseFontSize: 'Increase Font Size';
14138
- readonly decreaseFontSize: 'Decrease Font Size';
14139
- readonly clearFormatting: 'Clear All Formatting';
14140
- readonly bold: 'Bold';
14141
- readonly italic: 'Italic';
14142
- readonly underline: 'Underline';
14143
- readonly strikethrough: 'Strikethrough';
14144
- readonly shadow: 'Text Shadow';
14145
- readonly characterSpacing: 'Character Spacing';
14146
- readonly changeCase: 'Change Case';
14147
- readonly fontColor: 'Font Color';
14148
- readonly highlightColor: 'Text Highlight Color';
14149
- readonly superscript: 'Superscript';
14150
- readonly subscript: 'Subscript';
14151
- };
14152
- };
14153
- readonly paragraph: {
14154
- readonly label: 'Paragraph';
14155
- readonly controls: {
14156
- readonly bullets: 'Bullets (toggle and gallery)';
14157
- readonly numbering: 'Numbering (toggle and gallery)';
14158
- readonly decreaseIndent: 'Decrease List Level';
14159
- readonly increaseIndent: 'Increase List Level';
14160
- readonly lineSpacing: 'Line Spacing';
14161
- readonly alignLeft: 'Align Left';
14162
- readonly alignCenter: 'Center';
14163
- readonly alignRight: 'Align Right';
14164
- readonly justify: 'Justify';
14165
- readonly columns: 'Columns';
14166
- readonly textDirection: 'Text Direction';
14167
- readonly alignText: 'Align Text';
14168
- };
14169
- };
14170
- readonly drawing: {
14171
- readonly label: 'Drawing';
14172
- readonly controls: {
14173
- readonly shapes: 'Shapes';
14174
- readonly arrange: 'Arrange';
14175
- readonly quickStyles: 'Quick Styles (Shape Styles gallery)';
14176
- readonly shapeFill: 'Shape Fill';
14177
- readonly shapeOutline: 'Shape Outline';
14178
- readonly shapeEffects: 'Shape Effects gallery';
14179
- };
14180
- };
14181
- readonly arrange: {
14182
- readonly label: 'Arrange';
14183
- readonly controls: {
14184
- readonly bringForward: 'Bring Forward';
14185
- readonly sendBackward: 'Send Backward';
14186
- readonly bringToFront: 'Bring to Front';
14187
- readonly sendToBack: 'Send to Back';
14188
- readonly flipHorizontal: 'Flip Horizontal';
14189
- readonly flipVertical: 'Flip Vertical';
14190
- readonly duplicate: 'Duplicate';
14191
- readonly delete: 'Delete';
14192
- readonly group: 'Group';
14193
- readonly ungroup: 'Ungroup';
14194
- readonly align: 'Align';
14195
- readonly mergeShapes: 'Merge Shapes';
14196
- readonly crop: 'Crop';
14197
- readonly outlineWidth: 'Outline width';
14198
- };
14199
- };
14200
- readonly editing: {
14201
- readonly label: 'Editing';
14202
- readonly controls: {
14203
- readonly find: 'Find';
14204
- readonly replace: 'Replace';
14205
- readonly select: 'Select';
14206
- };
14207
- };
14208
- };
14209
- readonly insert: {
14210
- readonly slides: {
14211
- readonly label: 'Slides';
14212
- readonly controls: {
14213
- readonly newSlide: 'New Slide';
14214
- };
14215
- };
14216
- readonly tables: {
14217
- readonly label: 'Tables';
14218
- readonly controls: {
14219
- readonly table: 'Table';
14220
- };
14221
- };
14222
- readonly images: {
14223
- readonly label: 'Images';
14224
- readonly controls: {
14225
- readonly pictures: 'Pictures';
14226
- };
14227
- };
14228
- readonly illustrations: {
14229
- readonly label: 'Illustrations';
14230
- readonly controls: {
14231
- readonly shapes: 'Shapes';
14232
- readonly smartArt: 'SmartArt';
14233
- readonly chart: 'Chart';
14234
- };
14235
- };
14236
- readonly links: {
14237
- readonly label: 'Links';
14238
- readonly controls: {
14239
- readonly link: 'Link';
14240
- readonly action: 'Action button';
14241
- };
14242
- };
14243
- readonly comments: {
14244
- readonly label: 'Comments';
14245
- readonly controls: {
14246
- readonly comment: 'Comment';
14247
- };
14248
- };
14249
- readonly text: {
14250
- readonly label: 'Text';
14251
- readonly controls: {
14252
- readonly textBox: 'Text Box';
14253
- readonly field: 'Header, date, slide number field';
14254
- };
14255
- };
14256
- readonly symbols: {
14257
- readonly label: 'Symbols';
14258
- readonly controls: {
14259
- readonly equation: 'Equation';
14260
- readonly symbol: 'Symbol';
14261
- };
14262
- };
14263
- readonly media: {
14264
- readonly label: 'Media';
14265
- readonly controls: {
14266
- readonly media: 'Video / Audio';
14267
- };
14268
- };
14269
- };
14270
- readonly draw: {
14271
- readonly tools: {
14272
- readonly label: 'Drawing Tools';
14273
- readonly controls: {
14274
- readonly select: 'Select';
14275
- readonly pen: 'Pen';
14276
- readonly highlighter: 'Highlighter';
14277
- readonly freeform: 'Freeform';
14278
- readonly eraser: 'Eraser';
14279
- readonly penColor: 'Pen colour';
14280
- readonly penWidth: 'Pen width';
14281
- };
14282
- };
14283
- readonly convert: {
14284
- readonly label: 'Convert';
14285
- readonly controls: {
14286
- readonly inkToShape: 'Ink to Shape';
14287
- };
14288
- };
14289
- };
14290
- readonly design: {
14291
- readonly themes: {
14292
- readonly label: 'Themes';
14293
- readonly controls: {
14294
- readonly browseThemes: 'Themes gallery';
14295
- readonly editTheme: 'Edit theme';
14296
- };
14297
- };
14298
- readonly variants: {
14299
- readonly label: 'Variants';
14300
- readonly controls: {
14301
- readonly colors: 'Variants: Colors gallery';
14302
- readonly fonts: 'Variants: Fonts gallery';
14303
- };
14304
- };
14305
- readonly customize: {
14306
- readonly label: 'Customize';
14307
- readonly controls: {
14308
- readonly slideSize: 'Slide Size';
14309
- readonly formatBackground: 'Format Background';
14310
- };
14311
- };
14312
- };
14313
- readonly transitions: {
14314
- readonly preview: {
14315
- readonly label: 'Preview';
14316
- readonly controls: {
14317
- readonly preview: 'Preview';
14318
- };
14319
- };
14320
- readonly transitionToThisSlide: {
14321
- readonly label: 'Transition to This Slide';
14322
- readonly controls: {
14323
- readonly gallery: 'Transition gallery';
14324
- readonly effectOptions: 'Effect Options';
14325
- };
14326
- };
14327
- readonly timing: {
14328
- readonly label: 'Timing';
14329
- readonly controls: {
14330
- readonly sound: 'Sound';
14331
- readonly duration: 'Duration';
14332
- readonly applyToAll: 'Apply To All';
14333
- readonly advanceOnClick: 'On Mouse Click';
14334
- readonly advanceAfter: 'After';
14335
- };
14336
- };
14337
- };
14338
- readonly animations: {
14339
- readonly preview: {
14340
- readonly label: 'Preview';
14341
- readonly controls: {
14342
- readonly preview: 'Preview';
14343
- };
14344
- };
14345
- readonly animation: {
14346
- readonly label: 'Animation';
14347
- readonly controls: {
14348
- readonly gallery: 'Animation gallery';
14349
- readonly effectOptions: 'Effect Options';
14350
- };
14351
- };
14352
- readonly motionPath: {
14353
- readonly label: 'Motion Paths';
14354
- readonly controls: {
14355
- readonly gallery: 'Motion path gallery';
14356
- };
14357
- };
14358
- readonly advancedAnimation: {
14359
- readonly label: 'Advanced Animation';
14360
- readonly controls: {
14361
- readonly addAnimation: 'Add Animation';
14362
- readonly animationPane: 'Animation Pane';
14363
- readonly trigger: 'Trigger';
14364
- readonly animationPainter: 'Animation Painter';
14365
- readonly remove: 'Remove animation';
14366
- };
14367
- };
14368
- readonly timing: {
14369
- readonly label: 'Timing';
14370
- readonly controls: {
14371
- readonly start: 'Start';
14372
- readonly duration: 'Duration';
14373
- readonly delay: 'Delay';
14374
- readonly reorder: 'Reorder';
14375
- };
14376
- };
14377
- };
14378
- readonly slideShow: {
14379
- readonly startSlideShow: {
14380
- readonly label: 'Start Slide Show';
14381
- readonly controls: {
14382
- readonly fromBeginning: 'From Beginning';
14383
- readonly fromCurrent: 'From Current Slide';
14384
- readonly customShow: 'Custom Slide Show';
14385
- };
14386
- };
14387
- readonly present: {
14388
- readonly label: 'Present';
14389
- readonly controls: {
14390
- readonly presenterView: 'Presenter View';
14391
- readonly broadcast: 'Present Online';
14392
- };
14393
- };
14394
- readonly setUp: {
14395
- readonly label: 'Set Up';
14396
- readonly controls: {
14397
- readonly setUpSlideShow: 'Set Up Slide Show';
14398
- readonly hideSlide: 'Hide Slide';
14399
- readonly rehearseTimings: 'Rehearse Timings';
14400
- readonly record: 'Record';
14401
- readonly rehearseWithCoach: 'Rehearse with Coach';
14402
- };
14403
- };
14404
- readonly captions: {
14405
- readonly label: 'Captions & Subtitles';
14406
- readonly controls: {
14407
- readonly subtitles: 'Always Use Subtitles';
14408
- readonly subtitleSettings: 'Subtitle Settings';
14409
- };
14410
- };
14411
- };
14412
- readonly record: {
14413
- readonly camera: {
14414
- readonly label: 'Camera';
14415
- readonly controls: {
14416
- readonly cameo: 'Cameo';
14417
- };
14418
- };
14419
- readonly record: {
14420
- readonly label: 'Record';
14421
- readonly controls: {
14422
- readonly fromBeginning: 'From Beginning';
14423
- readonly fromCurrent: 'From Current Slide';
14424
- };
14425
- };
14426
- readonly manage: {
14427
- readonly label: 'Manage';
14428
- readonly controls: {
14429
- readonly clear: 'Clear';
14430
- readonly reset: 'Reset to Cameo';
14431
- };
14432
- };
14433
- readonly help: {
14434
- readonly label: 'Help';
14435
- readonly controls: {
14436
- readonly learnMore: 'Learn more';
14437
- };
14438
- };
14439
- };
14440
- readonly review: {
14441
- readonly proofing: {
14442
- readonly label: 'Proofing';
14443
- readonly controls: {
14444
- readonly spelling: 'Spelling';
14445
- readonly thesaurus: 'Thesaurus';
14446
- };
14447
- };
14448
- readonly accessibility: {
14449
- readonly label: 'Accessibility';
14450
- readonly controls: {
14451
- readonly check: 'Check Accessibility';
14452
- };
14453
- };
14454
- readonly language: {
14455
- readonly label: 'Language';
14456
- readonly controls: {
14457
- readonly translate: 'Translate';
14458
- readonly language: 'Language';
14459
- };
14460
- };
14461
- readonly comments: {
14462
- readonly label: 'Comments';
14463
- readonly controls: {
14464
- readonly newComment: 'New Comment';
14465
- readonly delete: 'Delete';
14466
- readonly previous: 'Previous';
14467
- readonly next: 'Next';
14468
- readonly showComments: 'Show Comments';
14469
- };
14470
- };
14471
- readonly compare: {
14472
- readonly label: 'Compare';
14473
- readonly controls: {
14474
- readonly compare: 'Compare';
14475
- readonly markAllRead: 'Mark all read';
14476
- };
14477
- };
14478
- readonly protect: {
14479
- readonly label: 'Protect';
14480
- readonly controls: {
14481
- readonly readOnly: 'Read-only';
14482
- readonly restrictPermission: 'Restrict Permission';
14483
- };
14484
- };
14485
- readonly ink: {
14486
- readonly label: 'Ink';
14487
- readonly controls: {
14488
- readonly hideInk: 'Hide Ink';
14489
- };
14490
- };
14491
- };
14492
- readonly view: {
14493
- readonly presentationViews: {
14494
- readonly label: 'Presentation Views';
14495
- readonly controls: {
14496
- readonly normal: 'Normal';
14497
- readonly outline: 'Outline View';
14498
- readonly slideSorter: 'Slide Sorter';
14499
- readonly notesPage: 'Notes Page';
14500
- readonly readingView: 'Reading View';
14501
- };
14502
- };
14503
- readonly masterViews: {
14504
- readonly label: 'Master Views';
14505
- readonly controls: {
14506
- readonly slideMaster: 'Slide Master';
14507
- readonly handoutMaster: 'Handout Master';
14508
- readonly notesMaster: 'Notes Master';
14509
- };
14510
- };
14511
- readonly show: {
14512
- readonly label: 'Show';
14513
- readonly controls: {
14514
- readonly ruler: 'Ruler';
14515
- readonly gridlines: 'Gridlines';
14516
- readonly guides: 'Guides';
14517
- readonly snapToGrid: 'Snap to Grid';
14518
- readonly snapToShape: 'Snap to Shape';
14519
- readonly addGuide: 'Add horizontal / vertical guide';
14520
- readonly selectionPane: 'Selection Pane';
14521
- readonly eyedropper: 'Eyedropper';
14522
- readonly notes: 'Notes';
14523
- };
14524
- };
14525
- readonly zoom: {
14526
- readonly label: 'Zoom';
14527
- readonly controls: {
14528
- readonly zoom: 'Zoom';
14529
- readonly fitToWindow: 'Fit to Window';
14530
- };
14531
- };
14532
- readonly window: {
14533
- readonly label: 'Window';
14534
- readonly controls: {
14535
- readonly templateEditing: 'Edit template elements';
14536
- readonly macros: 'Macros';
14537
- };
14538
- };
14539
- };
14540
- readonly help: {
14541
- readonly help: {
14542
- readonly label: 'Help';
14543
- readonly controls: {
14544
- readonly options: 'Options';
14545
- readonly keyboardShortcuts: 'Keyboard shortcuts';
14546
- readonly accessibility: 'Accessibility checker';
14547
- };
14548
- };
14549
- };
14550
- readonly shapeFormat: {
14551
- readonly shapeStyles: {
14552
- readonly label: 'Shape Styles';
14553
- readonly controls: {
14554
- readonly gallery: 'Shape Styles gallery';
14555
- readonly shapeEffects: 'Shape Effects gallery';
14556
- };
14557
- };
14558
- readonly wordArtStyles: {
14559
- readonly label: 'WordArt Styles';
14560
- readonly controls: {
14561
- readonly gallery: 'WordArt Styles gallery';
14562
- };
14563
- };
14564
- };
14565
- readonly pictureFormat: {
14566
- readonly adjust: {
14567
- readonly label: 'Adjust';
14568
- readonly controls: {
14569
- readonly corrections: 'Corrections gallery';
14570
- readonly color: 'Color gallery';
14571
- readonly artisticEffects: 'Artistic Effects gallery';
14572
- };
14573
- };
14574
- readonly pictureStyles: {
14575
- readonly label: 'Picture Styles';
14576
- readonly controls: {
14577
- readonly gallery: 'Picture Styles gallery';
14578
- readonly pictureEffects: 'Picture Effects gallery';
14579
- };
14580
- };
14581
- };
14582
- readonly tableDesign: {
14583
- readonly tableStyles: {
14584
- readonly label: 'Table Styles';
14585
- readonly controls: {
14586
- readonly gallery: 'Table Styles gallery';
14587
- };
14588
- };
14589
- };
14590
- readonly chartDesign: {
14591
- readonly chartLayouts: {
14592
- readonly label: 'Chart Layouts';
14593
- readonly controls: {
14594
- readonly quickLayout: 'Quick Layout gallery';
14595
- };
14596
- };
14597
- readonly chartStyles: {
14598
- readonly label: 'Chart Styles';
14599
- readonly controls: {
14600
- readonly changeColors: 'Change Colors gallery';
14601
- readonly gallery: 'Chart Styles gallery';
14602
- };
14603
- };
14604
- };
14605
- readonly smartArtDesign: {
14606
- readonly createGraphic: {
14607
- readonly label: 'Create Graphic';
14608
- readonly controls: {
14609
- readonly addShape: 'Add Shape';
14610
- readonly addBullet: 'Add Bullet';
14611
- readonly textPane: 'Text Pane';
14612
- readonly promote: 'Promote';
14613
- readonly demote: 'Demote';
14614
- readonly rightToLeft: 'Right to Left';
14615
- readonly moveUp: 'Move Up';
14616
- readonly moveDown: 'Move Down';
14617
- };
14618
- };
14619
- readonly layouts: {
14620
- readonly label: 'Layouts';
14621
- readonly controls: {
14622
- readonly gallery: 'Layouts gallery';
14623
- };
14624
- };
14625
- readonly smartArtStyles: {
14626
- readonly label: 'SmartArt Styles';
14627
- readonly controls: {
14628
- readonly changeColors: 'Change Colors gallery';
14629
- readonly gallery: 'SmartArt Styles gallery';
14630
- };
14631
- };
14632
- readonly reset: {
14633
- readonly label: 'Reset';
14634
- readonly controls: {
14635
- readonly resetGraphic: 'Reset Graphic';
14636
- readonly convert: 'Convert';
14637
- };
14638
- };
14639
- };
14640
- };
14641
- //#endregion
14642
- //#region src/render/customization/ribbon-control-ids.d.ts
14643
- type Catalog = typeof RIBBON_CONTROL_CATALOG;
14644
- /** `<tab>.<group>`, for example `home.font`. */
14645
- type RibbonGroupId = { [T in keyof Catalog]: { [G in keyof Catalog[T]]: `${T & string}.${G & string}`; }[keyof Catalog[T]]; }[keyof Catalog];
14646
- /** `<tab>.<group>.<control>`, for example `home.font.bold`. */
14647
- type RibbonControlId = { [T in keyof Catalog]: { [G in keyof Catalog[T]]: Catalog[T][G] extends {
14648
- controls: infer C;
14649
- } ? `${T & string}.${G & string}.${keyof C & string}` : never; }[keyof Catalog[T]]; }[keyof Catalog];
14650
- //#endregion
14651
- //#region src/render/customization/customization-types.d.ts
14652
- /** Keys of an options group whose value is a primitive (not an array). */
14653
- type PrimitiveKeys<T> = { [K in keyof T]: T[K] extends ViewerOptionPrimitive ? K : never; }[keyof T] & string;
14654
- /**
14655
- * One File > Options setting, addressed as `<group>.<key>`, for example
14656
- * `general.userName` or `advanced.showGrid`. The union is derived from the
14657
- * `ViewerOptions` model itself, so a typo is a compile error.
14658
- */
14659
- type OptionsSettingId = { [G in ViewerOptionsGroupId]: `${G}.${PrimitiveKeys<ViewerOptions[G]>}`; }[ViewerOptionsGroupId];
14660
- /**
14661
- * A File > Options page: the ten PowerPoint categories plus `ai`, the AI
14662
- * assistant page a binding adds when the host configured an assistant.
14663
- */
14664
- type OptionsPageId = ViewerOptionsTabId | 'ai';
14665
- /**
14666
- * One section of an Options page, addressed as `<page>.<section>`, for
14667
- * example `general.personalize` or `advanced.print`. The full list is
14668
- * `OPTIONS_SECTION_IDS` (derived from the schema at runtime).
14669
- */
14670
- type OptionsSectionId = `${ViewerOptionsTabId}.${string}`;
14671
- /** Values a host forces onto settings. */
14672
- type OptionsSettingValues = Partial<Record<OptionsSettingId, ViewerOptionPrimitive>>;
14673
- /** Ribbon and toolbar customisation. */
14674
- interface RibbonCustomization {
14675
- /**
14676
- * Ribbon tabs to remove (the File tab included, unlike Customize Ribbon),
14677
- * and contextual tabs (`shapeFormat`, `pictureFormat`, ...) that should
14678
- * never appear.
14679
- */
14680
- hiddenTabs?: readonly (ToolbarTabId | RibbonContextualTabId)[];
14681
- /** Groups inside a tab to remove, as `<tab>.<group>` (`home.font`). */
14682
- hiddenGroups?: readonly RibbonGroupId[];
14683
- /**
14684
- * Controls to remove: a top-level toolbar button / control cluster
14685
- * (`share`, `zoom`, ...) or any ribbon control as
14686
- * `<tab>.<group>.<control>` (`home.font.bold`).
14687
- */
14688
- hiddenButtons?: readonly (ToolbarButtonId | RibbonControlId)[];
14689
- }
14690
- /** File > Options (the Settings dialog) customisation. */
14691
- interface OptionsCustomization {
14692
- /** Whole pages to remove from the dialog's category rail. */
14693
- hiddenPages?: readonly OptionsPageId[];
14694
- /** Sections (`<page>.<section>`) to remove from their page. */
14695
- hiddenSections?: readonly OptionsSectionId[];
14696
- /** Individual settings (`<group>.<key>`) to remove wherever they appear. */
14697
- hiddenSettings?: readonly OptionsSettingId[];
14698
- /**
14699
- * Settings pinned to a fixed value. The value is forced into the options
14700
- * store, user edits to it are ignored, and the control renders read-only.
14701
- * Add the id to `hiddenSettings` too to lock it invisibly.
14702
- */
14703
- locked?: OptionsSettingValues;
14704
- /**
14705
- * Host defaults: the value a setting starts at when the user has not saved
14706
- * a choice of their own. "Reset" returns to these, not to the built-ins.
14707
- */
14708
- defaults?: OptionsSettingValues;
14709
- }
14710
- /** File tab (backstage) customisation. */
14711
- interface BackstageCustomization {
14712
- /** Navigation entries (pages) to remove from the File tab. */
14713
- hiddenPages?: readonly BackstagePage[];
14714
- /** Action cards to remove from the pages that show them. */
14715
- hiddenCards?: readonly BackstageCardId[];
14716
- }
14717
- /** Right-click menu customisation. */
14718
- interface ContextMenuCustomization {
14719
- /** Additional host commands, independent of the viewer's AI connection. */
14720
- extraElementCommands?: readonly HostMenuCommand<HostElementMenuContext>[];
14721
- extraCanvasCommands?: readonly HostMenuCommand<HostCanvasMenuContext>[];
14722
- /** Entries to remove from the element (right-click on a shape) menu. */
14723
- hiddenElementCommands?: readonly ContextMenuCommandId[];
14724
- /** Entries to remove from the empty-canvas menu. */
14725
- hiddenCanvasCommands?: readonly CanvasContextMenuCommandId[];
14726
- /**
14727
- * Entries to remove from the Edit Points menu (right-click a vertex or a
14728
- * segment while editing a shape's points).
14729
- */
14730
- hiddenEditPointsCommands?: readonly EditPointsCommandId[];
14731
- /** Remove the element context menu entirely. */
14732
- disableElementMenu?: boolean;
14733
- /** Remove the empty-canvas context menu entirely. */
14734
- disableCanvasMenu?: boolean;
14735
- }
14736
- /**
14737
- * A shortcut chord in the form `Mod+Shift+D`: modifiers `Mod` (Ctrl on
14738
- * Windows/Linux, Cmd on macOS), `Ctrl`, `Meta`, `Alt`, `Shift`, joined by `+`,
14739
- * followed by a `KeyboardEvent.key` value (`D`, `Delete`, `ArrowLeft`, `F2`).
14740
- */
14741
- type ShortcutChord = string;
14742
- /** Editor keyboard-shortcut customisation. */
14743
- interface KeyboardCustomization {
14744
- /** Turn every editor shortcut off (the host owns the keyboard). */
14745
- disableAll?: boolean;
14746
- /** Editor commands whose shortcut is turned off. */
14747
- disabled?: readonly EditorKeyActionName[];
14748
- /**
14749
- * Replacement chords per command. A remapped command no longer answers to
14750
- * its built-in chord; it answers to the chord(s) given here instead.
14751
- */
14752
- remap?: Partial<Record<EditorKeyActionName, ShortcutChord | readonly ShortcutChord[]>>;
14753
- }
14754
- /**
14755
- * Chrome regions a host can remove. Each id maps onto one region in every
14756
- * binding; see `VIEWER_PANEL_IDS` for the catalogue.
14757
- */
14758
- type ViewerPanelId = 'statusBar' | 'slidesPane' | 'inspector' | 'notes' | 'quickAccessToolbar' | 'titleBar';
14759
- /** Feature areas that can be switched off as a whole. */
14760
- type ViewerFeatureId = 'ai' | 'collaboration' | 'comments' | 'presentMode' | 'editPoints';
14761
- /**
14762
- * The click-to-place drawing tools of Insert > Shapes > Lines: Freeform:
14763
- * Shape and Curve.
14764
- */
14765
- type ViewerDrawingToolId = FreeformToolKind;
14766
- /** Dialogs (and the entry points that open them) a host can remove. */
14767
- type ViewerDialogId = 'options' | 'share' | 'broadcast' | 'print' | 'export';
14768
- /** Export formats offered by the File > Export page. */
14769
- type ViewerExportFormatId = 'pdf' | 'png' | 'video' | 'gif' | 'json' | 'copyImage';
14770
- /**
14771
- * The whole customisation object. Every field is optional; omitted fields hide
14772
- * nothing and lock nothing.
14773
- */
14774
- interface ViewerCustomization {
14775
- ribbon?: RibbonCustomization;
14776
- options?: OptionsCustomization;
14777
- backstage?: BackstageCustomization;
14778
- contextMenu?: ContextMenuCustomization;
14779
- keyboard?: KeyboardCustomization;
14780
- /** Chrome regions to remove (`true` hides). */
14781
- hiddenPanels?: readonly ViewerPanelId[];
14782
- /** Feature areas to switch off (their buttons, menus, pages and panels). */
14783
- disabledFeatures?: readonly ViewerFeatureId[];
14784
- /** Dialogs to remove, along with every entry point that opens them. */
14785
- hiddenDialogs?: readonly ViewerDialogId[];
14786
- /** Export formats to remove from File > Export. */
14787
- hiddenExportFormats?: readonly ViewerExportFormatId[];
14788
- /** Drawing tools to remove from the Insert > Shapes gallery. */
14789
- hiddenDrawingTools?: readonly ViewerDrawingToolId[];
14790
- }
14791
- //#endregion
14792
- //#region src/render/customization/customization-catalog.d.ts
14793
- declare const RIBBON_TAB_IDS: readonly ToolbarTabId[];
14794
- declare const TOOLBAR_BUTTON_IDS: readonly ["share", "broadcast", "export", "undo", "redo", "record", "notes", "fullscreen", "zoom", "navigation", "mergeShapes", "crop"];
14795
- declare const OPTIONS_PAGE_IDS: readonly OptionsPageId[];
14796
- declare const OPTIONS_SECTION_IDS: readonly OptionsSectionId[];
14797
- declare const OPTIONS_SETTING_IDS: readonly OptionsSettingId[];
14798
- declare const BACKSTAGE_PAGE_IDS: readonly BackstagePage[];
14799
- declare const BACKSTAGE_CARD_IDS: readonly BackstageCardId[];
14800
- declare const ELEMENT_CONTEXT_MENU_COMMAND_IDS: readonly ["copy", "cut", "paste", "duplicate", "edit-text", "edit-points", "bring-forward", "send-backward", "bring-front", "send-back", "ai-ask", "ai-fix", "comment", "hyperlink", "table-insert-row-above", "table-insert-row-below", "table-delete-row", "table-insert-col-left", "table-insert-col-right", "table-delete-col", "table-merge-selected", "table-merge-right", "table-merge-down", "table-split", "group", "ungroup", "crop", "merge-union", "merge-combine", "merge-fragment", "merge-intersect", "merge-subtract", "save-as-picture", "edit-alt-text", "size-and-position", "format-shape", "delete"];
14801
- declare const CANVAS_CONTEXT_MENU_COMMAND_IDS: readonly ["paste", "layout", "reset-slide", "format-background", "grid-and-guides", "ruler"];
14802
- declare const EDITOR_SHORTCUT_ACTION_IDS: readonly ["undo", "redo", "copy", "cut", "paste", "duplicate", "delete", "selectAll", "group", "ungroup", "nudge", "prevSlide", "nextSlide", "escape", "find", "findReplace", "toggleShortcuts", "alignLeft", "alignCenter", "alignRight", "alignJustify", "increaseFontSize", "decreaseFontSize", "copyFormat", "pasteFormat", "newSlide", "hyperlink", "clearFormatting", "cycleSelectionNext", "cycleSelectionPrev", "pasteSpecial"];
14803
- declare const VIEWER_PANEL_IDS: readonly ["statusBar", "slidesPane", "inspector", "notes", "quickAccessToolbar", "titleBar"];
14804
- declare const VIEWER_FEATURE_IDS: readonly ["ai", "collaboration", "comments", "presentMode", "editPoints"];
14805
- declare const VIEWER_DIALOG_IDS: readonly ["options", "share", "broadcast", "print", "export"];
14806
- declare const VIEWER_EXPORT_FORMAT_IDS: readonly ["pdf", "png", "video", "gif", "json", "copyImage"];
14807
- //#endregion
14808
- //#region src/render/customization/customization-keymap.d.ts
14809
- /** A parsed `Mod+Shift+D` chord. */
14810
- interface ParsedShortcutChord {
14811
- key: string;
14812
- mod: boolean;
14813
- ctrl: boolean;
14814
- meta: boolean;
14815
- alt: boolean;
14816
- shift: boolean;
14817
- }
14818
- /** The normalised keyboard slice of a resolved customisation. */
14819
- interface ResolvedKeyboardCustomization {
14820
- disableAll: boolean;
14821
- disabled: ReadonlySet<EditorKeyActionName>;
14822
- remap: ReadonlyMap<EditorKeyActionName, readonly ParsedShortcutChord[]>;
14823
- }
14824
- //#endregion
14825
- //#region src/render/customization/customization-resolve.d.ts
14826
- /** The normalised, set-based view of a customisation. Treat as immutable. */
14827
- interface ResolvedCustomization {
14828
- hiddenActions: ReadonlySet<ToolbarActionId>;
14829
- /** Contextual tabs (`shapeFormat`, ...) the host never wants shown. */
14830
- hiddenContextualTabs: ReadonlySet<RibbonContextualTabId>;
14831
- /** Catalogued ribbon groups to hide (`ribbon.hiddenGroups`). */
14832
- hiddenRibbonGroups: ReadonlySet<RibbonGroupId>;
14833
- /** Catalogued ribbon controls to hide (the `<tab>.<group>.<control>` part of `ribbon.hiddenButtons`). */
14834
- hiddenRibbonControls: ReadonlySet<RibbonControlId>;
14835
- hiddenOptionsPages: ReadonlySet<OptionsPageId>;
14836
- hiddenOptionsSections: ReadonlySet<OptionsSectionId>;
14837
- hiddenSettings: ReadonlySet<OptionsSettingId>;
14838
- lockedSettings: OptionsSettingValues;
14839
- defaultSettings: OptionsSettingValues;
14840
- hiddenBackstagePages: ReadonlySet<BackstagePage>;
14841
- hiddenBackstageCards: ReadonlySet<BackstageCardId>;
14842
- hiddenElementCommands: ReadonlySet<ContextMenuCommandId>;
14843
- extraElementCommands: NonNullable<ViewerCustomization['contextMenu']>['extraElementCommands'];
14844
- extraCanvasCommands: NonNullable<ViewerCustomization['contextMenu']>['extraCanvasCommands'];
14845
- hiddenCanvasCommands: ReadonlySet<CanvasContextMenuCommandId>;
14846
- hiddenEditPointsCommands: ReadonlySet<EditPointsCommandId>;
14847
- hiddenDrawingTools: ReadonlySet<ViewerDrawingToolId>;
14848
- elementMenuEnabled: boolean;
14849
- canvasMenuEnabled: boolean;
14850
- hiddenPanels: ReadonlySet<ViewerPanelId>;
14851
- disabledFeatures: ReadonlySet<ViewerFeatureId>;
14852
- hiddenDialogs: ReadonlySet<ViewerDialogId>;
14853
- keyboard: ResolvedKeyboardCustomization;
14854
- }
14855
- //#endregion
14856
- //#region src/render/customization/customization-controller.d.ts
14857
- /** The imperative methods every binding's component handle exposes. */
14858
- interface ViewerCustomizationApi {
14859
- /** The current customisation object (a snapshot; do not mutate). */
14860
- getCustomization(): ViewerCustomization;
14861
- /** Replace the whole customisation. */
14862
- setCustomization(next: ViewerCustomization): void;
14863
- /** Merge a partial customisation (see `mergeCustomization`). */
14864
- updateCustomization(patch: ViewerCustomization): void;
14865
- /** Drop every customisation, back to the stock UI. */
14866
- resetCustomization(): void;
14867
- /** Hide a fixed tab, or stop a contextual tab (`shapeFormat`, ...) from appearing. */
14868
- hideRibbonTab(tab: ToolbarTabId | RibbonContextualTabId): void;
14869
- showRibbonTab(tab: ToolbarTabId | RibbonContextualTabId): void;
14870
- /** Hide a group inside a tab (`home.font`). */
14871
- hideRibbonGroup(group: RibbonGroupId): void;
14872
- showRibbonGroup(group: RibbonGroupId): void;
14873
- /** Hide a top-level toolbar button or any ribbon control (`home.font.bold`). */
14874
- hideToolbarButton(button: ToolbarButtonId | RibbonControlId): void;
14875
- showToolbarButton(button: ToolbarButtonId | RibbonControlId): void;
14876
- /** Alias of `hideToolbarButton` for a ribbon control id. */
14877
- hideRibbonControl(control: RibbonControlId): void;
14878
- showRibbonControl(control: RibbonControlId): void;
14879
- hideOptionsPage(page: OptionsPageId): void;
14880
- showOptionsPage(page: OptionsPageId): void;
14881
- hideOptionsSection(section: OptionsSectionId): void;
14882
- showOptionsSection(section: OptionsSectionId): void;
14883
- hideSetting(setting: OptionsSettingId): void;
14884
- showSetting(setting: OptionsSettingId): void;
14885
- /** Pin a setting to `value`; `hidden` also removes it from the dialog. */
14886
- lockSetting(setting: OptionsSettingId, value: ViewerOptionPrimitive, hidden?: boolean): void;
14887
- unlockSetting(setting: OptionsSettingId): void;
14888
- /** Set (or with `undefined`, clear) the host default for a setting. */
14889
- setSettingDefault(setting: OptionsSettingId, value: ViewerOptionPrimitive | undefined): void;
14890
- hideBackstagePage(page: BackstagePage): void;
14891
- showBackstagePage(page: BackstagePage): void;
14892
- hideBackstageCard(card: BackstageCardId): void;
14893
- showBackstageCard(card: BackstageCardId): void;
14894
- hideContextMenuCommand(command: ContextMenuCommandId): void;
14895
- showContextMenuCommand(command: ContextMenuCommandId): void;
14896
- hideCanvasContextMenuCommand(command: CanvasContextMenuCommandId): void;
14897
- showCanvasContextMenuCommand(command: CanvasContextMenuCommandId): void;
14898
- disableShortcut(action: EditorKeyActionName): void;
14899
- enableShortcut(action: EditorKeyActionName): void;
14900
- /** Move a command onto new chord(s); `undefined` restores the built-in chord. */
14901
- remapShortcut(action: EditorKeyActionName, chords: ShortcutChord | readonly ShortcutChord[] | undefined): void;
14902
- setPanelVisible(panel: ViewerPanelId, visible: boolean): void;
14903
- setFeatureEnabled(feature: ViewerFeatureId, enabled: boolean): void;
14904
- setDialogAvailable(dialog: ViewerDialogId, available: boolean): void;
14905
- }
14906
- interface ViewerCustomizationController {
14907
- /** The helper methods, ready to spread onto a component handle. */
14908
- readonly api: ViewerCustomizationApi;
14909
- /** The normalised view the render sites read. Stable until the next change. */
14910
- getResolved(): ResolvedCustomization;
14911
- /** Subscribe to every change; returns the unsubscribe function. */
14912
- subscribe(listener: () => void): () => void;
14913
- }
14914
- //#endregion
14915
- //#region src/render/ribbon-command-view.d.ts
14916
- /** A host supplies translated labels and controlled state; shared owns markup. */
14917
- interface RibbonCommandView {
14918
- id: RibbonControlId;
14919
- label: string;
14920
- icon: string;
14921
- title?: string;
14922
- disabled?: boolean;
14923
- active?: boolean;
14924
- pressed?: boolean;
14925
- expanded?: boolean;
14926
- hidden?: boolean;
14927
- compact?: boolean;
14928
- /** Opens a menu or panel: draws PowerPoint's drop-down chevron after the label. */
14929
- caret?: boolean;
14930
- badge?: number;
14931
- /** Commands with the same column share a vertical stack. */
14932
- column?: number;
14933
- }
14934
- interface RibbonGroupView {
14935
- id: RibbonGroupId;
14936
- label: string;
14937
- commands: readonly RibbonCommandView[];
14938
- }
14939
- //#endregion
14940
- //#region src/render/p14-transition-keyframes.d.ts
14941
- /** Part 1: conveyor / doors / ferris / flash / flythrough / gallery / glitter / honeycomb / pan. */
14942
- declare const P14_TRANSITION_KEYFRAMES = "\n/* ── Conveyor (translate X with staggered timing) ──────────────────── */\n@keyframes pptx-tr-conveyor-in-from-right {\n\tfrom { transform: translateX(100%) rotateY(-30deg); }\n\t60% { transform: translateX(20%) rotateY(-10deg); }\n\tto { transform: translateX(0) rotateY(0deg); }\n}\n@keyframes pptx-tr-conveyor-out-to-left {\n\tfrom { transform: translateX(0) rotateY(0deg); }\n\t40% { transform: translateX(-20%) rotateY(10deg); }\n\tto { transform: translateX(-100%) rotateY(30deg); }\n}\n@keyframes pptx-tr-conveyor-in-from-left {\n\tfrom { transform: translateX(-100%) rotateY(30deg); }\n\t60% { transform: translateX(-20%) rotateY(10deg); }\n\tto { transform: translateX(0) rotateY(0deg); }\n}\n@keyframes pptx-tr-conveyor-out-to-right {\n\tfrom { transform: translateX(0) rotateY(0deg); }\n\t40% { transform: translateX(20%) rotateY(-10deg); }\n\tto { transform: translateX(100%) rotateY(-30deg); }\n}\n\n/* ── Doors (clip-path from center split) ──────────────────────────────\n MEASURED via COM CreateVideo: PowerPoint's `dir=\"horz\"` names a\n HORIZONTAL split line (two panels stacked top/bottom, opening upward and\n downward), and `dir=\"vert\"` a VERTICAL split line (panels side by side,\n opening left and right) - the opposite of what \"clips left/right\" vs\n \"clips top/bottom\" would suggest at a glance. Keep the clip-path bodies\n matched to the MEASURED direction, not the intuitive one. */\n@keyframes pptx-tr-doors-horz {\n\tfrom { clip-path: inset(50% 0); }\n\tto { clip-path: inset(0 0); }\n}\n@keyframes pptx-tr-doors-vert {\n\tfrom { clip-path: inset(0 50%); }\n\tto { clip-path: inset(0 0); }\n}\n\n/* ── Ferris (rotate elements around center) ───────────────────────── */\n@keyframes pptx-tr-ferris-in-from-right {\n\tfrom { transform: translateX(80%) rotate(45deg) scale(0.6); opacity: 0; }\n\tto { transform: translateX(0) rotate(0deg) scale(1); opacity: 1; }\n}\n@keyframes pptx-tr-ferris-out-to-left {\n\tfrom { transform: translateX(0) rotate(0deg) scale(1); opacity: 1; }\n\tto { transform: translateX(-80%) rotate(-45deg) scale(0.6); opacity: 0; }\n}\n@keyframes pptx-tr-ferris-in-from-left {\n\tfrom { transform: translateX(-80%) rotate(-45deg) scale(0.6); opacity: 0; }\n\tto { transform: translateX(0) rotate(0deg) scale(1); opacity: 1; }\n}\n@keyframes pptx-tr-ferris-out-to-right {\n\tfrom { transform: translateX(0) rotate(0deg) scale(1); opacity: 1; }\n\tto { transform: translateX(80%) rotate(45deg) scale(0.6); opacity: 0; }\n}\n\n/* ── Flash (bright flash opacity burst) ──────────────────────────── */\n@keyframes pptx-tr-flash-white {\n\t0% { opacity: 1; }\n\t30% { opacity: 0; }\n\t50% { opacity: 0; }\n\t100% { opacity: 1; }\n}\n@keyframes pptx-tr-flash-in {\n\t0% { opacity: 0; }\n\t50% { opacity: 0; }\n\t70% { opacity: 1; }\n\t100% { opacity: 1; }\n}\n\n/* ── Flythrough (scale + translate Z-axis feel) ──────────────────── */\n@keyframes pptx-tr-flythrough-in {\n\tfrom { transform: scale(4) translateZ(200px); opacity: 0; filter: blur(8px); }\n\tto { transform: scale(1) translateZ(0); opacity: 1; filter: blur(0); }\n}\n@keyframes pptx-tr-flythrough-out {\n\tfrom { transform: scale(1) translateZ(0); opacity: 1; filter: blur(0); }\n\tto { transform: scale(0.1) translateZ(-200px); opacity: 0; filter: blur(8px); }\n}\n@keyframes pptx-tr-flythrough-reverse-in {\n\tfrom { transform: scale(0.1) translateZ(-200px); opacity: 0; filter: blur(8px); }\n\tto { transform: scale(1) translateZ(0); opacity: 1; filter: blur(0); }\n}\n@keyframes pptx-tr-flythrough-reverse-out {\n\tfrom { transform: scale(1) translateZ(0); opacity: 1; filter: blur(0); }\n\tto { transform: scale(4) translateZ(200px); opacity: 0; filter: blur(8px); }\n}\n\n/* ── Gallery (translate with perspective) ─────────────────────────── */\n@keyframes pptx-tr-gallery-in-from-right {\n\tfrom { transform: perspective(800px) translateX(100%) rotateY(-45deg); opacity: 0.5; }\n\tto { transform: perspective(800px) translateX(0) rotateY(0deg); opacity: 1; }\n}\n@keyframes pptx-tr-gallery-out-to-left {\n\tfrom { transform: perspective(800px) translateX(0) rotateY(0deg); opacity: 1; }\n\tto { transform: perspective(800px) translateX(-100%) rotateY(45deg); opacity: 0.5; }\n}\n@keyframes pptx-tr-gallery-in-from-left {\n\tfrom { transform: perspective(800px) translateX(-100%) rotateY(45deg); opacity: 0.5; }\n\tto { transform: perspective(800px) translateX(0) rotateY(0deg); opacity: 1; }\n}\n@keyframes pptx-tr-gallery-out-to-right {\n\tfrom { transform: perspective(800px) translateX(0) rotateY(0deg); opacity: 1; }\n\tto { transform: perspective(800px) translateX(100%) rotateY(-45deg); opacity: 0.5; }\n}\n\n/* ── Glitter (particle dissolve effect) ──────────────────────────── */\n@keyframes pptx-tr-glitter-in {\n\tfrom { opacity: 0; filter: brightness(1.5) contrast(1.3) blur(2px); }\n\t60% { opacity: 0.7; filter: brightness(1.2) contrast(1.1) blur(1px); }\n\tto { opacity: 1; filter: brightness(1) contrast(1) blur(0); }\n}\n\n/* ── Honeycomb (hexagonal reveal) ────────────────────────────────── */\n@keyframes pptx-tr-honeycomb-in {\n\tfrom {\n\t\tclip-path: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%);\n\t\topacity: 0;\n\t}\n\tto {\n\t\tclip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);\n\t\topacity: 1;\n\t}\n}\n@keyframes pptx-tr-honeycomb-out {\n\tfrom { opacity: 1; }\n\tto { opacity: 0; filter: blur(2px); }\n}\n\n/* ── Pan (large-scale translate) ─────────────────────────────────── */\n@keyframes pptx-tr-pan-from-right {\n\tfrom { transform: translateX(100%); }\n\tto { transform: translateX(0); }\n}\n@keyframes pptx-tr-pan-to-left {\n\tfrom { transform: translateX(0); }\n\tto { transform: translateX(-100%); }\n}\n@keyframes pptx-tr-pan-from-left {\n\tfrom { transform: translateX(-100%); }\n\tto { transform: translateX(0); }\n}\n@keyframes pptx-tr-pan-to-right {\n\tfrom { transform: translateX(0); }\n\tto { transform: translateX(100%); }\n}\n@keyframes pptx-tr-pan-from-bottom {\n\tfrom { transform: translateY(100%); }\n\tto { transform: translateY(0); }\n}\n@keyframes pptx-tr-pan-to-top {\n\tfrom { transform: translateY(0); }\n\tto { transform: translateY(-100%); }\n}\n@keyframes pptx-tr-pan-from-top {\n\tfrom { transform: translateY(-100%); }\n\tto { transform: translateY(0); }\n}\n@keyframes pptx-tr-pan-to-bottom {\n\tfrom { transform: translateY(0); }\n\tto { transform: translateY(100%); }\n}\n";
14943
- /** Part 2: prism / reveal / ripple / shred / switch / vortex / warp / wheelReverse / window. */
14944
- declare const P14_TRANSITION_KEYFRAMES_2 = "\n/* ── Prism: see `slide-transition-prism` (split out to keep this module\n under the per-file LOC budget) ─────────────────────────────────────── */\n\n@keyframes pptx-tr-prism-in-from-right {\n\tfrom { transform: perspective(800px) rotateY(-90deg) translateX(50%); opacity: 0; }\n\tto { transform: perspective(800px) rotateY(0deg) translateX(0); opacity: 1; }\n}\n@keyframes pptx-tr-prism-out-to-left {\n\tfrom { transform: perspective(800px) rotateY(0deg) translateX(0); opacity: 1; }\n\tto { transform: perspective(800px) rotateY(90deg) translateX(-50%); opacity: 0; }\n}\n@keyframes pptx-tr-prism-in-from-left {\n\tfrom { transform: perspective(800px) rotateY(90deg) translateX(-50%); opacity: 0; }\n\tto { transform: perspective(800px) rotateY(0deg) translateX(0); opacity: 1; }\n}\n@keyframes pptx-tr-prism-out-to-right {\n\tfrom { transform: perspective(800px) rotateY(0deg) translateX(0); opacity: 1; }\n\tto { transform: perspective(800px) rotateY(-90deg) translateX(50%); opacity: 0; }\n}\n@keyframes pptx-tr-prism-in-from-bottom {\n\tfrom { transform: perspective(800px) rotateX(90deg) translateY(50%); opacity: 0; }\n\tto { transform: perspective(800px) rotateX(0deg) translateY(0); opacity: 1; }\n}\n@keyframes pptx-tr-prism-out-to-top {\n\tfrom { transform: perspective(800px) rotateX(0deg) translateY(0); opacity: 1; }\n\tto { transform: perspective(800px) rotateX(-90deg) translateY(-50%); opacity: 0; }\n}\n@keyframes pptx-tr-prism-in-from-top {\n\tfrom { transform: perspective(800px) rotateX(-90deg) translateY(-50%); opacity: 0; }\n\tto { transform: perspective(800px) rotateX(0deg) translateY(0); opacity: 1; }\n}\n@keyframes pptx-tr-prism-out-to-bottom {\n\tfrom { transform: perspective(800px) rotateX(0deg) translateY(0); opacity: 1; }\n\tto { transform: perspective(800px) rotateX(90deg) translateY(50%); opacity: 0; }\n}\n\n/* ── Reveal (slide away reveal) ──────────────────────────────────── */\n@keyframes pptx-tr-reveal-out-to-right {\n\tfrom { transform: translateX(0); }\n\tto { transform: translateX(100%); }\n}\n@keyframes pptx-tr-reveal-out-to-left {\n\tfrom { transform: translateX(0); }\n\tto { transform: translateX(-100%); }\n}\n/* MEASURED: the incoming layer stays hidden for roughly the first half of the\n transition (a real black/background gap shows through), then fades in -\n not a flat 0.5->1 fade running the whole duration. */\n@keyframes pptx-tr-reveal-in {\n\t0% { opacity: 0; }\n\t50% { opacity: 0; }\n\t100% { opacity: 1; }\n}\n\n/* ── Ripple (expanding ring clip-path) ───────────────────────────── */\n@keyframes pptx-tr-ripple-in {\n\tfrom { clip-path: circle(0% at 50% 50%); opacity: 0.5; }\n\t30% { clip-path: circle(20% at 50% 50%); opacity: 0.7; }\n\t60% { clip-path: circle(50% at 50% 50%); opacity: 0.9; }\n\tto { clip-path: circle(75% at 50% 50%); opacity: 1; }\n}\n\n/* ── Shred (fragmented clip-path pieces) ─────────────────────────── */\n@keyframes pptx-tr-shred-strips-in {\n\tfrom { clip-path: inset(0 100% 0 0); opacity: 0; }\n\t30% { clip-path: inset(0 60% 0 0); opacity: 0.5; }\n\tto { clip-path: inset(0); opacity: 1; }\n}\n@keyframes pptx-tr-shred-rectangles-in {\n\tfrom { clip-path: inset(50%); opacity: 0; }\n\t40% { clip-path: inset(20%); opacity: 0.6; }\n\tto { clip-path: inset(0); opacity: 1; }\n}\n@keyframes pptx-tr-shred-out {\n\tfrom { opacity: 1; }\n\tto { opacity: 0; filter: blur(2px); }\n}\n\n/* ── Switch (flip/rotate swap) ───────────────────────────────────── */\n@keyframes pptx-tr-switch-in-from-right {\n\tfrom { transform: perspective(800px) rotateY(-180deg); opacity: 0; }\n\tto { transform: perspective(800px) rotateY(0deg); opacity: 1; }\n}\n@keyframes pptx-tr-switch-out-to-left {\n\tfrom { transform: perspective(800px) rotateY(0deg); opacity: 1; }\n\tto { transform: perspective(800px) rotateY(180deg); opacity: 0; }\n}\n@keyframes pptx-tr-switch-in-from-left {\n\tfrom { transform: perspective(800px) rotateY(180deg); opacity: 0; }\n\tto { transform: perspective(800px) rotateY(0deg); opacity: 1; }\n}\n@keyframes pptx-tr-switch-out-to-right {\n\tfrom { transform: perspective(800px) rotateY(0deg); opacity: 1; }\n\tto { transform: perspective(800px) rotateY(-180deg); opacity: 0; }\n}\n\n/* ── Vortex (rotate + scale spiral) ──────────────────────────────── */\n@keyframes pptx-tr-vortex-in {\n\tfrom { transform: rotate(720deg) scale(0); opacity: 0; }\n\tto { transform: rotate(0deg) scale(1); opacity: 1; }\n}\n@keyframes pptx-tr-vortex-out {\n\tfrom { transform: rotate(0deg) scale(1); opacity: 1; }\n\tto { transform: rotate(-720deg) scale(0); opacity: 0; }\n}\n\n/* ── Warp: see `slide-transition-warp` (COM-measured radial zoom blur,\n split out to keep this module under the per-file LOC budget) ────────── */\n\n@keyframes pptx-tr-warp-in {\n\t0% { transform: scale(0.25); opacity: 0; filter: blur(10px) brightness(1.8); }\n\t50% { transform: scale(0.85); opacity: 0.7; filter: blur(3px) brightness(1.3); }\n\t100% { transform: scale(1); opacity: 1; filter: blur(0) brightness(1); }\n}\n@keyframes pptx-tr-warp-out {\n\t0% { transform: scale(1); opacity: 1; filter: blur(0) brightness(1); }\n\t50% { transform: scale(0.85); opacity: 0.7; filter: blur(3px) brightness(1.3); }\n\t100% { transform: scale(0.25); opacity: 0; filter: blur(10px) brightness(1.8); }\n}\n@keyframes pptx-tr-warp-reverse-in {\n\t0% { transform: scale(3.2); opacity: 0; filter: blur(14px) brightness(2.2); }\n\t50% { transform: scale(1.7); opacity: 0.7; filter: blur(6px) brightness(1.5); }\n\t100% { transform: scale(1); opacity: 1; filter: blur(0) brightness(1); }\n}\n@keyframes pptx-tr-warp-reverse-out {\n\t0% { transform: scale(1); opacity: 1; filter: blur(0) brightness(1); }\n\t50% { transform: scale(1.7); opacity: 0.7; filter: blur(6px) brightness(1.5); }\n\t100% { transform: scale(3.2); opacity: 0; filter: blur(14px) brightness(2.2); }\n}\n\n\n/* ── WheelReverse (reverse wheel rotation) ───────────────────────── */\n@keyframes pptx-tr-wheel-reverse-in {\n\tfrom { clip-path: circle(0% at 50% 50%); transform: rotate(180deg); }\n\tto { clip-path: circle(75% at 50% 50%); transform: rotate(0deg); }\n}\n\n/* ── Window (scale from center with border) ──────────────────────────\n Same measured horz/vert meaning as Doors above (horz = horizontal split\n line opening vertically; vert = vertical split line opening horizontally). */\n@keyframes pptx-tr-window-horz {\n\tfrom { clip-path: inset(50% 0); }\n\tto { clip-path: inset(0 0); }\n}\n@keyframes pptx-tr-window-vert {\n\tfrom { clip-path: inset(0 50%); }\n\tto { clip-path: inset(0 0); }\n}\n@keyframes pptx-tr-window-out {\n\tfrom { opacity: 1; transform: scale(1); }\n\tto { opacity: 0; transform: scale(0.9); }\n}\n";
14945
- /** Both p14 keyframe blocks concatenated, for single `<style>` injection. */
14946
- declare const P14_TRANSITION_KEYFRAMES_ALL = "\n/* ── Conveyor (translate X with staggered timing) ──────────────────── */\n@keyframes pptx-tr-conveyor-in-from-right {\n\tfrom { transform: translateX(100%) rotateY(-30deg); }\n\t60% { transform: translateX(20%) rotateY(-10deg); }\n\tto { transform: translateX(0) rotateY(0deg); }\n}\n@keyframes pptx-tr-conveyor-out-to-left {\n\tfrom { transform: translateX(0) rotateY(0deg); }\n\t40% { transform: translateX(-20%) rotateY(10deg); }\n\tto { transform: translateX(-100%) rotateY(30deg); }\n}\n@keyframes pptx-tr-conveyor-in-from-left {\n\tfrom { transform: translateX(-100%) rotateY(30deg); }\n\t60% { transform: translateX(-20%) rotateY(10deg); }\n\tto { transform: translateX(0) rotateY(0deg); }\n}\n@keyframes pptx-tr-conveyor-out-to-right {\n\tfrom { transform: translateX(0) rotateY(0deg); }\n\t40% { transform: translateX(20%) rotateY(-10deg); }\n\tto { transform: translateX(100%) rotateY(-30deg); }\n}\n\n/* ── Doors (clip-path from center split) ──────────────────────────────\n MEASURED via COM CreateVideo: PowerPoint's `dir=\"horz\"` names a\n HORIZONTAL split line (two panels stacked top/bottom, opening upward and\n downward), and `dir=\"vert\"` a VERTICAL split line (panels side by side,\n opening left and right) - the opposite of what \"clips left/right\" vs\n \"clips top/bottom\" would suggest at a glance. Keep the clip-path bodies\n matched to the MEASURED direction, not the intuitive one. */\n@keyframes pptx-tr-doors-horz {\n\tfrom { clip-path: inset(50% 0); }\n\tto { clip-path: inset(0 0); }\n}\n@keyframes pptx-tr-doors-vert {\n\tfrom { clip-path: inset(0 50%); }\n\tto { clip-path: inset(0 0); }\n}\n\n/* ── Ferris (rotate elements around center) ───────────────────────── */\n@keyframes pptx-tr-ferris-in-from-right {\n\tfrom { transform: translateX(80%) rotate(45deg) scale(0.6); opacity: 0; }\n\tto { transform: translateX(0) rotate(0deg) scale(1); opacity: 1; }\n}\n@keyframes pptx-tr-ferris-out-to-left {\n\tfrom { transform: translateX(0) rotate(0deg) scale(1); opacity: 1; }\n\tto { transform: translateX(-80%) rotate(-45deg) scale(0.6); opacity: 0; }\n}\n@keyframes pptx-tr-ferris-in-from-left {\n\tfrom { transform: translateX(-80%) rotate(-45deg) scale(0.6); opacity: 0; }\n\tto { transform: translateX(0) rotate(0deg) scale(1); opacity: 1; }\n}\n@keyframes pptx-tr-ferris-out-to-right {\n\tfrom { transform: translateX(0) rotate(0deg) scale(1); opacity: 1; }\n\tto { transform: translateX(80%) rotate(45deg) scale(0.6); opacity: 0; }\n}\n\n/* ── Flash (bright flash opacity burst) ──────────────────────────── */\n@keyframes pptx-tr-flash-white {\n\t0% { opacity: 1; }\n\t30% { opacity: 0; }\n\t50% { opacity: 0; }\n\t100% { opacity: 1; }\n}\n@keyframes pptx-tr-flash-in {\n\t0% { opacity: 0; }\n\t50% { opacity: 0; }\n\t70% { opacity: 1; }\n\t100% { opacity: 1; }\n}\n\n/* ── Flythrough (scale + translate Z-axis feel) ──────────────────── */\n@keyframes pptx-tr-flythrough-in {\n\tfrom { transform: scale(4) translateZ(200px); opacity: 0; filter: blur(8px); }\n\tto { transform: scale(1) translateZ(0); opacity: 1; filter: blur(0); }\n}\n@keyframes pptx-tr-flythrough-out {\n\tfrom { transform: scale(1) translateZ(0); opacity: 1; filter: blur(0); }\n\tto { transform: scale(0.1) translateZ(-200px); opacity: 0; filter: blur(8px); }\n}\n@keyframes pptx-tr-flythrough-reverse-in {\n\tfrom { transform: scale(0.1) translateZ(-200px); opacity: 0; filter: blur(8px); }\n\tto { transform: scale(1) translateZ(0); opacity: 1; filter: blur(0); }\n}\n@keyframes pptx-tr-flythrough-reverse-out {\n\tfrom { transform: scale(1) translateZ(0); opacity: 1; filter: blur(0); }\n\tto { transform: scale(4) translateZ(200px); opacity: 0; filter: blur(8px); }\n}\n\n/* ── Gallery (translate with perspective) ─────────────────────────── */\n@keyframes pptx-tr-gallery-in-from-right {\n\tfrom { transform: perspective(800px) translateX(100%) rotateY(-45deg); opacity: 0.5; }\n\tto { transform: perspective(800px) translateX(0) rotateY(0deg); opacity: 1; }\n}\n@keyframes pptx-tr-gallery-out-to-left {\n\tfrom { transform: perspective(800px) translateX(0) rotateY(0deg); opacity: 1; }\n\tto { transform: perspective(800px) translateX(-100%) rotateY(45deg); opacity: 0.5; }\n}\n@keyframes pptx-tr-gallery-in-from-left {\n\tfrom { transform: perspective(800px) translateX(-100%) rotateY(45deg); opacity: 0.5; }\n\tto { transform: perspective(800px) translateX(0) rotateY(0deg); opacity: 1; }\n}\n@keyframes pptx-tr-gallery-out-to-right {\n\tfrom { transform: perspective(800px) translateX(0) rotateY(0deg); opacity: 1; }\n\tto { transform: perspective(800px) translateX(100%) rotateY(-45deg); opacity: 0.5; }\n}\n\n/* ── Glitter (particle dissolve effect) ──────────────────────────── */\n@keyframes pptx-tr-glitter-in {\n\tfrom { opacity: 0; filter: brightness(1.5) contrast(1.3) blur(2px); }\n\t60% { opacity: 0.7; filter: brightness(1.2) contrast(1.1) blur(1px); }\n\tto { opacity: 1; filter: brightness(1) contrast(1) blur(0); }\n}\n\n/* ── Honeycomb (hexagonal reveal) ────────────────────────────────── */\n@keyframes pptx-tr-honeycomb-in {\n\tfrom {\n\t\tclip-path: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%);\n\t\topacity: 0;\n\t}\n\tto {\n\t\tclip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);\n\t\topacity: 1;\n\t}\n}\n@keyframes pptx-tr-honeycomb-out {\n\tfrom { opacity: 1; }\n\tto { opacity: 0; filter: blur(2px); }\n}\n\n/* ── Pan (large-scale translate) ─────────────────────────────────── */\n@keyframes pptx-tr-pan-from-right {\n\tfrom { transform: translateX(100%); }\n\tto { transform: translateX(0); }\n}\n@keyframes pptx-tr-pan-to-left {\n\tfrom { transform: translateX(0); }\n\tto { transform: translateX(-100%); }\n}\n@keyframes pptx-tr-pan-from-left {\n\tfrom { transform: translateX(-100%); }\n\tto { transform: translateX(0); }\n}\n@keyframes pptx-tr-pan-to-right {\n\tfrom { transform: translateX(0); }\n\tto { transform: translateX(100%); }\n}\n@keyframes pptx-tr-pan-from-bottom {\n\tfrom { transform: translateY(100%); }\n\tto { transform: translateY(0); }\n}\n@keyframes pptx-tr-pan-to-top {\n\tfrom { transform: translateY(0); }\n\tto { transform: translateY(-100%); }\n}\n@keyframes pptx-tr-pan-from-top {\n\tfrom { transform: translateY(-100%); }\n\tto { transform: translateY(0); }\n}\n@keyframes pptx-tr-pan-to-bottom {\n\tfrom { transform: translateY(0); }\n\tto { transform: translateY(100%); }\n}\n\n\n/* ── Prism: see `slide-transition-prism` (split out to keep this module\n under the per-file LOC budget) ─────────────────────────────────────── */\n\n@keyframes pptx-tr-prism-in-from-right {\n\tfrom { transform: perspective(800px) rotateY(-90deg) translateX(50%); opacity: 0; }\n\tto { transform: perspective(800px) rotateY(0deg) translateX(0); opacity: 1; }\n}\n@keyframes pptx-tr-prism-out-to-left {\n\tfrom { transform: perspective(800px) rotateY(0deg) translateX(0); opacity: 1; }\n\tto { transform: perspective(800px) rotateY(90deg) translateX(-50%); opacity: 0; }\n}\n@keyframes pptx-tr-prism-in-from-left {\n\tfrom { transform: perspective(800px) rotateY(90deg) translateX(-50%); opacity: 0; }\n\tto { transform: perspective(800px) rotateY(0deg) translateX(0); opacity: 1; }\n}\n@keyframes pptx-tr-prism-out-to-right {\n\tfrom { transform: perspective(800px) rotateY(0deg) translateX(0); opacity: 1; }\n\tto { transform: perspective(800px) rotateY(-90deg) translateX(50%); opacity: 0; }\n}\n@keyframes pptx-tr-prism-in-from-bottom {\n\tfrom { transform: perspective(800px) rotateX(90deg) translateY(50%); opacity: 0; }\n\tto { transform: perspective(800px) rotateX(0deg) translateY(0); opacity: 1; }\n}\n@keyframes pptx-tr-prism-out-to-top {\n\tfrom { transform: perspective(800px) rotateX(0deg) translateY(0); opacity: 1; }\n\tto { transform: perspective(800px) rotateX(-90deg) translateY(-50%); opacity: 0; }\n}\n@keyframes pptx-tr-prism-in-from-top {\n\tfrom { transform: perspective(800px) rotateX(-90deg) translateY(-50%); opacity: 0; }\n\tto { transform: perspective(800px) rotateX(0deg) translateY(0); opacity: 1; }\n}\n@keyframes pptx-tr-prism-out-to-bottom {\n\tfrom { transform: perspective(800px) rotateX(0deg) translateY(0); opacity: 1; }\n\tto { transform: perspective(800px) rotateX(90deg) translateY(50%); opacity: 0; }\n}\n\n/* ── Reveal (slide away reveal) ──────────────────────────────────── */\n@keyframes pptx-tr-reveal-out-to-right {\n\tfrom { transform: translateX(0); }\n\tto { transform: translateX(100%); }\n}\n@keyframes pptx-tr-reveal-out-to-left {\n\tfrom { transform: translateX(0); }\n\tto { transform: translateX(-100%); }\n}\n/* MEASURED: the incoming layer stays hidden for roughly the first half of the\n transition (a real black/background gap shows through), then fades in -\n not a flat 0.5->1 fade running the whole duration. */\n@keyframes pptx-tr-reveal-in {\n\t0% { opacity: 0; }\n\t50% { opacity: 0; }\n\t100% { opacity: 1; }\n}\n\n/* ── Ripple (expanding ring clip-path) ───────────────────────────── */\n@keyframes pptx-tr-ripple-in {\n\tfrom { clip-path: circle(0% at 50% 50%); opacity: 0.5; }\n\t30% { clip-path: circle(20% at 50% 50%); opacity: 0.7; }\n\t60% { clip-path: circle(50% at 50% 50%); opacity: 0.9; }\n\tto { clip-path: circle(75% at 50% 50%); opacity: 1; }\n}\n\n/* ── Shred (fragmented clip-path pieces) ─────────────────────────── */\n@keyframes pptx-tr-shred-strips-in {\n\tfrom { clip-path: inset(0 100% 0 0); opacity: 0; }\n\t30% { clip-path: inset(0 60% 0 0); opacity: 0.5; }\n\tto { clip-path: inset(0); opacity: 1; }\n}\n@keyframes pptx-tr-shred-rectangles-in {\n\tfrom { clip-path: inset(50%); opacity: 0; }\n\t40% { clip-path: inset(20%); opacity: 0.6; }\n\tto { clip-path: inset(0); opacity: 1; }\n}\n@keyframes pptx-tr-shred-out {\n\tfrom { opacity: 1; }\n\tto { opacity: 0; filter: blur(2px); }\n}\n\n/* ── Switch (flip/rotate swap) ───────────────────────────────────── */\n@keyframes pptx-tr-switch-in-from-right {\n\tfrom { transform: perspective(800px) rotateY(-180deg); opacity: 0; }\n\tto { transform: perspective(800px) rotateY(0deg); opacity: 1; }\n}\n@keyframes pptx-tr-switch-out-to-left {\n\tfrom { transform: perspective(800px) rotateY(0deg); opacity: 1; }\n\tto { transform: perspective(800px) rotateY(180deg); opacity: 0; }\n}\n@keyframes pptx-tr-switch-in-from-left {\n\tfrom { transform: perspective(800px) rotateY(180deg); opacity: 0; }\n\tto { transform: perspective(800px) rotateY(0deg); opacity: 1; }\n}\n@keyframes pptx-tr-switch-out-to-right {\n\tfrom { transform: perspective(800px) rotateY(0deg); opacity: 1; }\n\tto { transform: perspective(800px) rotateY(-180deg); opacity: 0; }\n}\n\n/* ── Vortex (rotate + scale spiral) ──────────────────────────────── */\n@keyframes pptx-tr-vortex-in {\n\tfrom { transform: rotate(720deg) scale(0); opacity: 0; }\n\tto { transform: rotate(0deg) scale(1); opacity: 1; }\n}\n@keyframes pptx-tr-vortex-out {\n\tfrom { transform: rotate(0deg) scale(1); opacity: 1; }\n\tto { transform: rotate(-720deg) scale(0); opacity: 0; }\n}\n\n/* ── Warp: see `slide-transition-warp` (COM-measured radial zoom blur,\n split out to keep this module under the per-file LOC budget) ────────── */\n\n@keyframes pptx-tr-warp-in {\n\t0% { transform: scale(0.25); opacity: 0; filter: blur(10px) brightness(1.8); }\n\t50% { transform: scale(0.85); opacity: 0.7; filter: blur(3px) brightness(1.3); }\n\t100% { transform: scale(1); opacity: 1; filter: blur(0) brightness(1); }\n}\n@keyframes pptx-tr-warp-out {\n\t0% { transform: scale(1); opacity: 1; filter: blur(0) brightness(1); }\n\t50% { transform: scale(0.85); opacity: 0.7; filter: blur(3px) brightness(1.3); }\n\t100% { transform: scale(0.25); opacity: 0; filter: blur(10px) brightness(1.8); }\n}\n@keyframes pptx-tr-warp-reverse-in {\n\t0% { transform: scale(3.2); opacity: 0; filter: blur(14px) brightness(2.2); }\n\t50% { transform: scale(1.7); opacity: 0.7; filter: blur(6px) brightness(1.5); }\n\t100% { transform: scale(1); opacity: 1; filter: blur(0) brightness(1); }\n}\n@keyframes pptx-tr-warp-reverse-out {\n\t0% { transform: scale(1); opacity: 1; filter: blur(0) brightness(1); }\n\t50% { transform: scale(1.7); opacity: 0.7; filter: blur(6px) brightness(1.5); }\n\t100% { transform: scale(3.2); opacity: 0; filter: blur(14px) brightness(2.2); }\n}\n\n\n/* ── WheelReverse (reverse wheel rotation) ───────────────────────── */\n@keyframes pptx-tr-wheel-reverse-in {\n\tfrom { clip-path: circle(0% at 50% 50%); transform: rotate(180deg); }\n\tto { clip-path: circle(75% at 50% 50%); transform: rotate(0deg); }\n}\n\n/* ── Window (scale from center with border) ──────────────────────────\n Same measured horz/vert meaning as Doors above (horz = horizontal split\n line opening vertically; vert = vertical split line opening horizontally). */\n@keyframes pptx-tr-window-horz {\n\tfrom { clip-path: inset(50% 0); }\n\tto { clip-path: inset(0 0); }\n}\n@keyframes pptx-tr-window-vert {\n\tfrom { clip-path: inset(0 50%); }\n\tto { clip-path: inset(0 0); }\n}\n@keyframes pptx-tr-window-out {\n\tfrom { opacity: 1; transform: scale(1); }\n\tto { opacity: 0; transform: scale(0.9); }\n}\n\n\n@keyframes pptx-tr-vortex-in-left { from { transform: translateX(-40%) rotate(720deg) scale(0); opacity: 0; } to { transform: translateX(0) rotate(0deg) scale(1); opacity: 1; } }\n@keyframes pptx-tr-vortex-out-left { from { transform: translateX(0) rotate(0deg) scale(1); opacity: 1; } to { transform: translateX(-40%) rotate(-720deg) scale(0); opacity: 0; } }\n@keyframes pptx-tr-vortex-in-right { from { transform: translateX(40%) rotate(-720deg) scale(0); opacity: 0; } to { transform: translateX(0) rotate(0deg) scale(1); opacity: 1; } }\n@keyframes pptx-tr-vortex-out-right { from { transform: translateX(0) rotate(0deg) scale(1); opacity: 1; } to { transform: translateX(40%) rotate(720deg) scale(0); opacity: 0; } }\n@keyframes pptx-tr-vortex-in-up { from { transform: translateY(-40%) rotate(720deg) scale(0); opacity: 0; } to { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; } }\n@keyframes pptx-tr-vortex-out-up { from { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; } to { transform: translateY(-40%) rotate(-720deg) scale(0); opacity: 0; } }\n@keyframes pptx-tr-vortex-in-down { from { transform: translateY(40%) rotate(-720deg) scale(0); opacity: 0; } to { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; } }\n@keyframes pptx-tr-vortex-out-down { from { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; } to { transform: translateY(40%) rotate(720deg) scale(0); opacity: 0; } }\n\n\n@keyframes pptx-tr-ripple-in-lu { from { clip-path: circle(0% at 0% 0%); opacity: 0.5; } 30% { clip-path: circle(20% at 0% 0%); opacity: 0.7; } 60% { clip-path: circle(55% at 0% 0%); opacity: 0.9; } to { clip-path: circle(150% at 0% 0%); opacity: 1; } }\n@keyframes pptx-tr-ripple-in-ru { from { clip-path: circle(0% at 100% 0%); opacity: 0.5; } 30% { clip-path: circle(20% at 100% 0%); opacity: 0.7; } 60% { clip-path: circle(55% at 100% 0%); opacity: 0.9; } to { clip-path: circle(150% at 100% 0%); opacity: 1; } }\n@keyframes pptx-tr-ripple-in-ld { from { clip-path: circle(0% at 0% 100%); opacity: 0.5; } 30% { clip-path: circle(20% at 0% 100%); opacity: 0.7; } 60% { clip-path: circle(55% at 0% 100%); opacity: 0.9; } to { clip-path: circle(150% at 0% 100%); opacity: 1; } }\n@keyframes pptx-tr-ripple-in-rd { from { clip-path: circle(0% at 100% 100%); opacity: 0.5; } 30% { clip-path: circle(20% at 100% 100%); opacity: 0.7; } 60% { clip-path: circle(55% at 100% 100%); opacity: 0.9; } to { clip-path: circle(150% at 100% 100%); opacity: 1; } }\n\n\n@keyframes pptx-tr-glitter-diamond-in-l { from { opacity: 0; transform: translateX(-6%); filter: brightness(1.5) contrast(1.3) blur(2px); } 60% { opacity: 0.7; transform: translateX(-2%); filter: brightness(1.2) contrast(1.1) blur(1px); } to { opacity: 1; transform: translateX(0); filter: brightness(1) contrast(1) blur(0); } }\n@keyframes pptx-tr-glitter-diamond-in-r { from { opacity: 0; transform: translateX(6%); filter: brightness(1.5) contrast(1.3) blur(2px); } 60% { opacity: 0.7; transform: translateX(2%); filter: brightness(1.2) contrast(1.1) blur(1px); } to { opacity: 1; transform: translateX(0); filter: brightness(1) contrast(1) blur(0); } }\n@keyframes pptx-tr-glitter-diamond-in-u { from { opacity: 0; transform: translateY(-6%); filter: brightness(1.5) contrast(1.3) blur(2px); } 60% { opacity: 0.7; transform: translateY(-2%); filter: brightness(1.2) contrast(1.1) blur(1px); } to { opacity: 1; transform: translateY(0); filter: brightness(1) contrast(1) blur(0); } }\n@keyframes pptx-tr-glitter-diamond-in-d { from { opacity: 0; transform: translateY(6%); filter: brightness(1.5) contrast(1.3) blur(2px); } 60% { opacity: 0.7; transform: translateY(2%); filter: brightness(1.2) contrast(1.1) blur(1px); } to { opacity: 1; transform: translateY(0); filter: brightness(1) contrast(1) blur(0); } }\n@keyframes pptx-tr-glitter-hexagon-in-l { from { opacity: 0; transform: translateX(-6%); filter: brightness(1.5) contrast(1.3) blur(2px) hue-rotate(20deg); } 60% { opacity: 0.7; transform: translateX(-2%); filter: brightness(1.2) contrast(1.1) blur(1px) hue-rotate(8deg); } to { opacity: 1; transform: translateX(0); filter: brightness(1) contrast(1) blur(0) hue-rotate(0deg); } }\n@keyframes pptx-tr-glitter-hexagon-in-r { from { opacity: 0; transform: translateX(6%); filter: brightness(1.5) contrast(1.3) blur(2px) hue-rotate(20deg); } 60% { opacity: 0.7; transform: translateX(2%); filter: brightness(1.2) contrast(1.1) blur(1px) hue-rotate(8deg); } to { opacity: 1; transform: translateX(0); filter: brightness(1) contrast(1) blur(0) hue-rotate(0deg); } }\n@keyframes pptx-tr-glitter-hexagon-in-u { from { opacity: 0; transform: translateY(-6%); filter: brightness(1.5) contrast(1.3) blur(2px) hue-rotate(20deg); } 60% { opacity: 0.7; transform: translateY(-2%); filter: brightness(1.2) contrast(1.1) blur(1px) hue-rotate(8deg); } to { opacity: 1; transform: translateY(0); filter: brightness(1) contrast(1) blur(0) hue-rotate(0deg); } }\n@keyframes pptx-tr-glitter-hexagon-in-d { from { opacity: 0; transform: translateY(6%); filter: brightness(1.5) contrast(1.3) blur(2px) hue-rotate(20deg); } 60% { opacity: 0.7; transform: translateY(2%); filter: brightness(1.2) contrast(1.1) blur(1px) hue-rotate(8deg); } to { opacity: 1; transform: translateY(0); filter: brightness(1) contrast(1) blur(0) hue-rotate(0deg); } }\n";
14947
- //#endregion
14948
- //#region src/render/p14-transition-css.d.ts
14949
- /**
14950
- * Return CSS animation descriptors for p14 transition types. Returns
14951
- * `undefined` when the type is not a p14 transition.
14952
- */
14953
- declare function getP14TransitionAnimations(type: PptxTransitionType, durationMs: number, direction: string | undefined, orient?: string | undefined, pattern?: string | undefined): SlideTransitionAnimations | undefined;
14954
- /**
14955
- * A font supplied by the host application. The package never ships fonts:
14956
- * applications provide a licensed URL, data URL, or blob URL for their users.
14957
- */
14958
- interface ViewerFontSource {
14959
- family: string;
14960
- src: string;
14961
- format?: 'truetype' | 'opentype' | 'woff' | 'woff2';
14962
- weight?: string | number;
14963
- style?: 'normal' | 'italic';
14964
- }
14965
- interface SlideSizeEmu {
14966
- widthEmu: number;
14967
- heightEmu: number;
14968
- /** ST_SlideSizeType token, or `''` for a size with no preset. */
14969
- type: string;
14970
- }
14971
- //#endregion
14972
- //#region src/render/presentation-file-kinds.d.ts
14973
- /**
14974
- * presentation-file-kinds: the one place that answers "can the viewer open
14975
- * this file?" and "what should the saved copy be called?".
14976
- *
14977
- * ## Why this is a shared decision and not five allow-lists
14978
- *
14979
- * The loader reads more formats than any single UI advertises. Legacy binary
14980
- * `.ppt` (PowerPoint 97-2003) is the sharp example: `PptxHandler.load()` has
14981
- * detected the OLE compound-file container and converted the binary deck
14982
- * through the regular pptx pipeline for some time, but the product kept saying
14983
- * it was unsupported, and a picker that filters the extension out makes a
14984
- * working loader unreachable in practice. Whenever the loader learns a format,
14985
- * exactly one list has to change.
14986
- *
14987
- * ## Read many, write several
14988
- *
14989
- * Input is a superset of output. We READ `.pptx`, `.ppsx`, `.pptm`, `.potx`,
14990
- * legacy binary `.ppt` and portable `pptx-viewer-json`; we WRITE the OpenXML
14991
- * family plus legacy binary `.ppt` (via `ooxml-core/src/pptx/core/ppt/writer/`,
14992
- * a real MS-PPT/OLE2 encoder, not a stub). `savedPresentationFileName`
14993
- * REPLACES the source extension with the extension of the format actually
14994
- * being written rather than keeping the source's: a deck opened as
14995
- * `report.pptx` and saved back as `.ppt` (or vice versa) must have its name
14996
- * agree with its bytes, which is the kind of mismatch PowerPoint itself
14997
- * refuses to open.
14998
- *
14999
- * This module deliberately imports nothing, so any layer (render, export, a
15000
- * binding, a host app) can depend on it without risking an import cycle.
15001
- *
15002
- * @module render/presentation-file-kinds
15003
- */
15004
- /**
15005
- * Extensions the built-in file picker offers, in the order it offers them.
15006
- *
15007
- * `.ppt` is in the list because the loader genuinely handles it, not as a
15008
- * courtesy: see `ooxml-core/src/pptx/core/ppt/` and the `ppt-import` integration
15009
- * suite, which asserts a `.ppt` loads to the same model as the `.pptx` it was
15010
- * exported from.
15011
- */
15012
- declare const PRESENTATION_OPEN_EXTENSIONS: readonly ['.pptx', '.ppsx', '.pptm', '.potx', '.ppt', '.json'];
15013
- /** Comma-separated `accept` attribute for a presentation file input. */
15014
- declare const PPTX_OPEN_ACCEPT: string;
15015
- /**
15016
- * True when a picked / dropped file's name looks like something the loader can
15017
- * open. Use this instead of a hand-rolled `endsWith` chain: a drop handler that
15018
- * disagrees with the picker's `accept` list is a format that is supported by
15019
- * mouse but not by drag, which is how `.ppt` stayed invisible.
15020
- *
15021
- * Extension-only, by design. The real answer comes from the container sniff in
15022
- * `PptxHandler.load()`; this is only the cheap pre-filter a drop target needs
15023
- * before it hands bytes to the loader.
15024
- */
15025
- declare function isSupportedPresentationFile(name: string | null | undefined): boolean;
15026
- /**
15027
- * True for the binary PowerPoint 97-2003 family. `.ppt` itself is now also a
15028
- * SAVE target (see {@link SavedPresentationFormat}); `.pps`/`.pot` (97-2003
15029
- * show/template) remain read-only siblings sharing the same record format.
15030
- */
15031
- declare function isLegacyBinaryPresentation(name: string | null | undefined): boolean;
15032
- /** The formats the save path can produce. */
15033
- type SavedPresentationFormat = 'pptx' | 'ppsx' | 'pptm' | 'ppt';
15034
- /**
15035
- * The stem of a presentation file name: directories and any loadable extension
15036
- * removed. `C:\decks\report.ppt` becomes `report`; a name with no recognised
15037
- * extension is kept whole, so `Untitled Presentation` survives intact rather
15038
- * than losing everything after its last dot.
15039
- */
15040
- declare function presentationBaseName(sourceName: string | null | undefined, fallback?: string): string;
15041
- /**
15042
- * The name a saved copy should be offered under: the source stem plus the
15043
- * extension of the format actually being written.
15044
- *
15045
- * This is what turns `report.ppt` into `report.pptx` on a regular Save As,
15046
- * and `report.pptx` into `report.ppt` when the user explicitly picks the
15047
- * PowerPoint 97-2003 format. Keeping the source extension would mislabel the
15048
- * bytes either way.
15049
- */
15050
- declare function savedPresentationFileName(sourceName: string | null | undefined, format?: SavedPresentationFormat): string;
15051
- //#endregion
15052
- //#region src/render/session-restore.d.ts
15053
- /**
15054
- * session-restore: keep the deck a host app has open across a page refresh.
15055
- *
15056
- * A host (the demo apps, or any embedder) owns the bytes it hands to the
15057
- * viewer, so a plain reload drops them and the user lands back on the file
15058
- * dropzone with their presentation gone. This store remembers the open deck in
15059
- * IndexedDB and hands it back on the next load.
15060
- *
15061
- * Scope is deliberately per-tab: the record is keyed by an id kept in
15062
- * `sessionStorage`, which survives a reload but NOT a new tab. Refreshing
15063
- * restores the deck this tab had open, while a second tab opened on the same
15064
- * origin still starts on the landing page, and two tabs holding different decks
15065
- * never steal each other's content.
15066
- *
15067
- * `restoreSessionDeck` additionally prefers a NEWER autosave snapshot for the
15068
- * same file (see `./autosave-store`), so a refresh mid-edit comes back with the
15069
- * edited deck rather than the pristine bytes that were first opened.
15070
- *
15071
- * Every operation is best-effort: a blocked IndexedDB, a partitioned
15072
- * `sessionStorage`, or an exhausted quota degrades to "no restore", never to a
15073
- * thrown error in the host.
15074
- */
15075
- /** A deck remembered for the current tab. */
15076
- interface SessionDeck {
15077
- /** File name the deck was opened under, used as the autosave key. */
15078
- fileName: string;
15079
- /** The presentation bytes. */
15080
- data: Uint8Array;
15081
- /** When these bytes were remembered (epoch ms). */
15082
- timestamp: number;
15083
- }
15084
- /**
15085
- * This tab's session id, or `null` when `sessionStorage` is unavailable (a
15086
- * sandboxed iframe, or a browser with storage disabled).
15087
- *
15088
- * @param create Mint and persist an id when the tab does not have one yet.
15089
- * Reads pass `false` so a fresh tab never claims another tab's record.
15090
- */
15091
- declare function getSessionTabId(create?: boolean): string | null;
15092
- /**
15093
- * Remember `data` as the deck this tab has open, so the next load can restore
15094
- * it. Resolves `false` when the browser refused to store it; callers treat that
15095
- * as "no restore available later", never as an error.
15096
- */
15097
- declare function rememberSessionDeck(fileName: string, data: Uint8Array): Promise<boolean>;
15098
- /** The deck remembered for this tab, or `null` when there is nothing to restore. */
15099
- declare function loadSessionDeck(): Promise<SessionDeck | null>;
15100
- /** Forget this tab's deck (the host closed it, or handed the tab to another flow). */
15101
- declare function forgetSessionDeck(): Promise<void>;
15102
- /**
15103
- * The deck to reopen on load: this tab's remembered bytes, upgraded to a newer
15104
- * autosave snapshot of the same file when the viewer wrote one after they were
15105
- * remembered. Without that upgrade a refresh mid-edit would silently roll the
15106
- * presentation back to the state it was opened in.
15107
- */
15108
- declare function restoreSessionDeck(): Promise<SessionDeck | null>;
15109
- /** Optional seed values for the share start form. */
15110
- interface ShareDefaults {
15111
- roomId?: string;
15112
- userName?: string;
15113
- serverUrl?: string;
15114
- }
15115
- //#endregion
15116
- //#region src/render/presentation-session-types.d.ts
15117
- interface PresentationSnapshot {
15118
- slideIndex: number;
15119
- buildStep: number;
15120
- sequence: number;
15121
- blackout: 'none' | 'black' | 'white';
15122
- paused: boolean;
15123
- elapsedMs: number;
15124
- zoom?: PresentationZoomState;
15125
- pointer?: PresentationPointerState;
15126
- inkStrokes?: PresentationInkStroke[];
15127
- /**
15128
- * Whether ink markup is drawn (PowerPoint's Ctrl+M). Undefined means visible,
15129
- * so existing snapshots keep showing their ink. Hiding never discards the
15130
- * strokes, which stay in `inkStrokes` and can be kept on exit.
15131
- */
15132
- inkMarkupVisible?: boolean;
15133
- caption?: string;
15134
- subtitlesVisible?: boolean;
15135
- }
15136
- interface PresentationZoomState {
15137
- scale: number;
15138
- originX: number;
15139
- originY: number;
15140
- }
15141
- type PresentationPointerTool = 'none' | 'laser' | 'pen' | 'highlighter' | 'eraser';
15142
- interface PresentationPointerState {
15143
- tool: PresentationPointerTool;
15144
- x: number;
15145
- y: number;
15146
- color: string;
15147
- }
15148
- interface PresentationInkPoint {
15149
- x: number;
15150
- y: number;
15151
- }
15152
- interface PresentationInkStroke {
15153
- id: string;
15154
- slideIndex: number;
15155
- tool: 'pen' | 'highlighter';
15156
- color: string;
15157
- width: number;
15158
- points: PresentationInkPoint[];
15159
- }
15160
- declare function parsePresentationSessionId(hash: string): string | null;
15161
- declare function loadPresentationDeck(sessionId: string): Promise<Uint8Array | null>;
15162
- //#endregion
15163
- //#region src/render/presentation-blackboard.d.ts
15164
- /** Blackout state, as carried by {@link PresentationSnapshot}. */
15165
- type PresentationBlackout = PresentationSnapshot['blackout'];
15166
- //#endregion
15167
- //#region src/render/paste-special.d.ts
15168
- /** The four paste formats PowerPoint's Paste Options / Paste Special offer. */
15169
- type PasteSpecialFormat = 'keep-source-formatting' | 'use-destination-theme' | 'picture' | 'keep-text-only';
15170
- //#endregion
15171
- //#region src/render/chrome-controls-state.d.ts
15172
- type ChromeTranslate = (key: string, params?: Record<string, string | number>) => string;
15173
- type ReadOnlyBannerPasswordError = 'wrong-password' | 'unsupported-algorithm';
15174
- interface ReadOnlyBannerViewState {
15175
- /** `ReadOnlyRecommendation.kind`; mirrored onto the host's `data-kind`. */
15176
- kind: string | null;
15177
- /** `ReadOnlyRecommendation.messageKey`, translated by `translate`. */
15178
- messageKey: string;
15179
- /** Swap the Edit anyway / Dismiss pair for the inline password form. */
15180
- passwordPromptOpen?: boolean;
15181
- passwordError?: ReadOnlyBannerPasswordError | null;
15182
- /** Disables the form while a submitted password is being checked. */
15183
- checkingPassword?: boolean;
15184
- translate?: ChromeTranslate;
15185
- }
15186
- interface PasteOptionsViewState {
15187
- /** Right edge of the pasted element in viewport pixels. */
15188
- left: number;
15189
- /** Bottom edge of the pasted element in viewport pixels. */
15190
- top: number;
15191
- translate?: ChromeTranslate;
15192
- }
15193
- interface CompatToastViewItem {
15194
- readonly id: string;
15195
- readonly code: string;
15196
- readonly severity: 'info' | 'warning';
15197
- readonly messageKey: string;
15198
- readonly params?: Readonly<Record<string, string>>;
15199
- }
15200
- interface CompatToastsViewState {
15201
- /** Dismiss-filtered toasts. The element shows the first {@link COMPAT_TOAST_VISIBLE_LIMIT}. */
15202
- toasts: readonly CompatToastViewItem[];
15203
- /** Extra toasts a host already trimmed off the list it passes. */
15204
- overflowCount?: number;
15205
- /** Width of the open right-docked panel (see `compatToastStackStyle`). */
15206
- rightInset?: number;
15207
- /** Live height of the docked notes strip (see `compatToastStackStyle`). */
15208
- bottomInset?: number;
15209
- translate?: ChromeTranslate;
15210
- }
15211
- type DialogFooterVariant = 'secondary' | 'primary' | 'warning' | 'danger';
15212
- type DialogFooterIcon = 'trash' | 'pen' | 'restore' | 'print' | 'check';
15213
- interface DialogFooterAction {
15214
- /** Stable id echoed back in the `dialog-footer-request` intent. */
15215
- id: string;
15216
- /** Already-translated visible label and accessible name. */
15217
- label: string;
15218
- variant?: DialogFooterVariant;
15219
- icon?: DialogFooterIcon;
15220
- disabled?: boolean;
15221
- /** Work in flight: the button is disabled, `aria-busy` and shows a spinner. */
15222
- busy?: boolean;
15223
- /** Tooltip (`title`) for an action whose label needs a longer hint. */
15224
- title?: string;
15225
- /** `start` pins a tertiary action (Remove link, Reset all) to the left edge. */
15226
- align?: 'start' | 'end';
15227
- /** Optional `data-testid` stamped on the button. */
15228
- testId?: string;
15229
- }
15230
- interface DialogFooterViewState {
15231
- actions: readonly DialogFooterAction[];
15232
- }
15233
- type MobileBarId = 'slides' | 'insert' | 'inspector' | 'comments' | 'notes';
15234
- interface MobileBarViewState {
15235
- /** Every button disables at 0 (see `buildBarActions`). */
15236
- slideCount: number;
15237
- /** The button whose sheet is open; reflected as `aria-pressed` and a top pill. */
15238
- activeSheet?: MobileBarId | null;
15239
- /** Comment count on the badge of Comments (`99+` above 99). */
15240
- commentCount?: number;
15241
- /** Buttons dropped entirely, such as Notes when `hiddenActions` hides it. */
15242
- hidden?: readonly MobileBarId[];
15243
- /** Buttons disabled beyond the no-slides rule, such as edit-only ones in view mode. */
15244
- disabled?: readonly MobileBarId[];
15245
- translate?: ChromeTranslate;
15246
- }
15247
- type MobileToolbarId = 'menu' | 'undo' | 'redo' | 'ai' | 'save' | 'present' | 'share';
15248
- interface MobileToolbarViewState {
15249
- /** Menu, Undo, Redo, AI and Share only show while editing. */
15250
- editable: boolean;
15251
- canUndo: boolean;
15252
- canRedo: boolean;
15253
- /** Host opted into the AI assistant; the element draws its toggle. */
15254
- aiVisible?: boolean;
15255
- aiActive?: boolean;
15256
- /** Reflected as `aria-expanded` on Menu when given. */
15257
- menuOpen?: boolean;
15258
- /** Buttons dropped entirely (`hiddenActions`, or Share when the host has none). */
15259
- hidden?: readonly MobileToolbarId[];
15260
- /** Buttons disabled, such as Present while there is nothing to present. */
15261
- disabled?: readonly MobileToolbarId[];
15262
- translate?: ChromeTranslate;
15263
- }
15264
- interface PresentToolbarViewState {
15265
- /** Zero-based slide on screen. */
15266
- current: number;
15267
- total: number;
15268
- /** The armed annotation tool; `none` leaves every tool unpressed. */
15269
- tool: PresentationPointerTool;
15270
- penColor: string;
15271
- highlighterColor: string;
15272
- hasAnnotations: boolean;
15273
- /** With the pen, marks the Blackboard toggle active (`isBlackboardActive`). */
15274
- blackout: PresentationBlackout;
15275
- /** Show the presenter-view toggle (default false). */
15276
- presenterViewVisible?: boolean;
15277
- presenterViewActive?: boolean;
15278
- /** Epoch ms the show started. The element ticks the readout; null shows 00:00. */
15279
- startTime: number | null;
15280
- translate?: ChromeTranslate;
15281
- }
15282
- interface PresenterConsoleViewState {
15283
- /** Ids of toggles that read as on (and the resume / close-window variants). */
15284
- active: readonly string[];
15285
- /** Ids of controls that are disabled. */
15286
- disabled: readonly string[];
15287
- translate?: ChromeTranslate;
15288
- }
15289
- //#endregion
15290
- //#region src/render/alignment-guides.d.ts
15291
- /** A single alignment guide, positioned in authored slide pixels. */
15292
- interface Guide {
15293
- id: string;
15294
- axis: 'h' | 'v';
15295
- position: number;
15296
- }
15297
- //#endregion
15298
- //#region src/render/ink-drawing.d.ts
15299
- /** A 2D point in stage-local coordinates. */
15300
- interface InkPoint {
15301
- x: number;
15302
- y: number;
15303
- /**
15304
- * Pointer pressure at this point, from `PointerEvent.pressure` (0..1).
15305
- * Optional: a binding that has not wired pressure capture simply omits
15306
- * it, and {@link strokeToInkElement} falls back to
15307
- * {@link DEFAULT_POINTER_PRESSURE}, the constant value mice and other
15308
- * non-pressure-aware devices report, which reads as "no real pressure
15309
- * data".
15310
- */
15311
- pressure?: number;
15312
- /**
15313
- * Pen-tilt lean, in degrees, from `PointerEvent.tiltX`/`tiltY` on
15314
- * supporting hardware (a mouse, or a stylus with no tilt sensor, reports a
15315
- * constant 0). Optional and always captured as a pair: a binding that has
15316
- * not wired tilt capture simply omits both, and {@link strokeToInkElement}
15317
- * treats a constant `(0, 0)` reading the same way it treats a constant
15318
- * pressure, i.e. as "no real tilt data" rather than authoring a channel
15319
- * for it.
15320
- */
15321
- tiltX?: number;
15322
- tiltY?: number;
15323
- }
15324
- /** Options for {@link strokeToInkElement}. */
15325
- interface StrokeToInkElementOpts {
15326
- points: InkPoint[];
15327
- color: string;
15328
- width: number;
15329
- tool: 'pen' | 'highlighter' | 'freeform';
15330
- }
15331
- //#endregion
15332
- //#region src/render/mobile-chrome.d.ts
15333
- /**
15334
- * Pure helper logic for mobile chrome state, shared by every binding.
15335
- *
15336
- * These helpers capture the sheet open/close state machine that governs which
15337
- * sheet is visible at any given time and which bottom-bar button appears active.
15338
- * Keeping this logic as pure functions makes it straightforward to test and
15339
- * trivial to adapt when each binding wires the components together.
15340
- */
15341
- /** All mobile sheets that can be open at one time. */
15342
- type MobileSheetKey = 'slides' | 'menu' | 'insert' | 'inspector' | 'comments' | 'notes' | null;
15343
- //#endregion
15344
- //#region src/render/gradient-picker.d.ts
15345
- /** A single gradient stop, mirroring the ShapeStyle array item shape. */
15346
- interface GradientStop {
15347
- color: string;
15348
- position: number;
15349
- opacity?: number;
15350
- /**
15351
- * Theme colour identity for this stop, mirroring
15352
- * `ShapeStyle.fillColorRef`. Set by a theme-swatch pick so the stop keeps
15353
- * following the theme after a later theme change; cleared by a custom hex
15354
- * pick, which has no theme identity.
15355
- */
15356
- colorRef?: PptxThemeColorRef;
15357
- }
15358
- /** The editable gradient state surfaced to the component. */
15359
- interface GradientState {
15360
- type: 'linear' | 'radial';
15361
- /** Angle in degrees (only meaningful for linear). */
15362
- angle: number;
15363
- stops: GradientStop[];
15364
- }
15365
- //#endregion
15366
- //#region src/render/insert-chart.d.ts
15367
- /**
15368
- * Dropdown ids for the insert-chart menu. Distinct from `PptxChartType`
15369
- * because PowerPoint offers Column (vertical) and Bar (horizontal) as two
15370
- * entries over the same underlying `'bar'` chart type, and because `'pareto'`
15371
- * has no `PptxChartType` of its own: it is a dropdown entry that resolves to
15372
- * `type: 'histogram'` (see docs/guide/limitations.md's ChartEx row) with a
15373
- * frequency-plus-cumulative-percentage default shape. The other six ChartEx
15374
- * ids (`histogram` through `regionMap`) map one-to-one onto their chart type.
15375
- */
15376
- type InsertChartKind = 'column' | 'bar' | 'line' | 'pie' | 'doughnut' | 'area' | 'scatter' | 'histogram' | 'pareto' | 'funnel' | 'treemap' | 'sunburst' | 'boxWhisker' | 'regionMap';
15377
- /** In-memory clipboard payload stored when an element is copied or cut. */
15378
- interface ElementClipboardPayload {
15379
- element: PptxElement;
15380
- isTemplate: boolean;
15381
- }
15382
- //#endregion
15383
- //#region src/render/image-file-insertion.d.ts
15384
- /**
15385
- * Decode a local image File/Blob into a centred element, fitting the slide
15386
- * without upscaling. Dimensions are slide pixels; image bytes are preserved.
15387
- *
15388
- * Resolves null for unsupported/unreadable images, invalid bounds, cancellation,
15389
- * or unavailable browser APIs. Importing this module is safe outside a browser.
15390
- * No slide, selection, history, clipboard, or network state is changed. The
15391
- * caller must still validate its document/slide destination before committing.
15392
- */
15393
- declare function createImageElementFromFile(file: Blob, canvasSize: CanvasSize, signal?: AbortSignal): Promise<ImagePptxElement | null>;
15394
- //#endregion
15395
- //#region src/render/shape-preset-catalog.d.ts
15396
- /**
15397
- * shape-preset-catalog.ts: the Insert > Shape picker catalogue shared by every
15398
- * binding's toolbar/inspector.
15399
- *
15400
- * Pure data: each entry carries the preset geometry `type` (OOXML `a:prstGeom`
15401
- * value the editor can insert), an English fallback `label`, the shared-i18n
15402
- * `i18nKey`, and a framework-neutral icon descriptor ({@link ShapePresetGlyph}
15403
- * name + optional utility-class modifier for rotation/skew). Each binding maps
15404
- * the glyph name onto its own icon component/SVG.
15405
- *
15406
- * Order matters: bindings surface the first 12 entries as the quick "top
15407
- * shapes" row, so new presets should be appended, not inserted.
15408
- *
15409
- * @module render/shape-preset-catalog
15410
- */
15411
- /** Shape preset geometry types offered by the insert picker. */
15412
- type ShapePresetType = 'rect' | 'roundRect' | 'ellipse' | 'cylinder' | 'rtArrow' | 'leftArrow' | 'upArrow' | 'downArrow' | 'triangle' | 'rtTriangle' | 'diamond' | 'parallelogram' | 'trapezoid' | 'pentagon' | 'hexagon' | 'octagon' | 'chevron' | 'star5' | 'star6' | 'star8' | 'plus' | 'heart' | 'cloud' | 'sun' | 'moon' | 'pie' | 'plaque' | 'teardrop' | 'line' | 'connector';
15413
- /** One placeholder outline, already positioned in unscaled slide space. */
15414
- interface LayoutPreviewFrame {
15415
- /** Stable key for list rendering. */
15416
- key: string;
15417
- type: string;
15418
- left: number;
15419
- top: number;
15420
- width: number;
15421
- height: number;
15422
- }
15423
- /** Everything a binding needs to render one thumbnail. */
15424
- interface LayoutPreviewGeometry {
15425
- /** Outer box, in CSS pixels. */
15426
- boxWidth: number;
15427
- boxHeight: number;
15428
- /** Inner surface size, in unscaled slide pixels. */
15429
- surfaceWidth: number;
15430
- surfaceHeight: number;
15431
- /** Factor to apply as `transform: scale(...)` on the inner surface. */
15432
- scale: number;
15433
- backgroundColor: string;
15434
- /**
15435
- * Border width for placeholder outlines, pre-divided by {@link scale}.
15436
- *
15437
- * The outlines live inside the scaled surface, so a plain 1.5px border
15438
- * would be multiplied down to a hairline that vanishes at thumbnail size.
15439
- * Dividing here keeps the drawn width constant on screen whatever the
15440
- * slide dimensions are.
15441
- */
15442
- frameBorderWidth: number;
15443
- frames: LayoutPreviewFrame[];
15444
- }
15445
- //#endregion
15446
- //#region src/render/zoom-return-navigation.d.ts
15447
- /**
15448
- * The navigation-relevant fields of a Zoom click target, independent of
15449
- * `zoomType`.
15450
- *
15451
- * `returnToParent` is already resolved to its EFFECTIVE value here (not the
15452
- * raw, possibly-`undefined` `ZoomPptxElement`/`SummaryZoomTarget` field):
15453
- * `CT_ZoomObjectProperties/@returnToParent` (MS-PPTX) is `<xsd:attribute
15454
- * name="returnToParent" type="xsd:boolean" use="optional" default="true"/>`,
15455
- * so an ABSENT attribute means true, not false. Core deliberately stores
15456
- * `undefined` rather than fabricating `true` (so a round-trip never invents
15457
- * an attribute the source never had), which makes `Boolean(x)` the wrong way
15458
- * to read it; the two `resolve*NavigationTarget` functions below are the only
15459
- * place that distinction should be made.
15460
- */
15461
- interface ZoomNavigationTarget {
15462
- targetSlideIndex: number;
15463
- targetSectionId?: string;
15464
- returnToParent: boolean;
15465
- transitionDurationMs?: number;
15466
- }
15467
- //#endregion
15468
- //#region src/render/command-search.d.ts
15469
- /**
15470
- * Command-search data for the PowerPoint-style "Tell me what you want to do"
15471
- * search bar. Provides searchable command entries grouped by category, each
15472
- * mapping a label translation key to a command identifier that bindings can
15473
- * dispatch.
15474
- */
15475
- interface CommandSearchEntry {
15476
- /** Translation key for the display label. */
15477
- labelKey: string;
15478
- /** Command identifier dispatched to the host binding. */
15479
- command: string;
15480
- /** Optional icon hint (binding resolves to framework icon component). */
15481
- icon?: string;
15482
- /** Category grouping key; hosts with their own short list may omit it. */
15483
- category?: 'format' | 'insert' | 'view' | 'slideShow' | 'design' | 'arrange';
15484
- }
15485
- interface AutosaveRecord {
15486
- key: string;
15487
- data: Uint8Array;
15488
- timestamp: number;
15489
- size: number;
15490
- }
15491
- //#endregion
15492
- //#region src/render/master-view-crud.d.ts
15493
- /** One Slide Master view sidebar command. */
15494
- type MasterViewCrudActionId = 'addLayout' | 'duplicateLayout' | 'deleteLayout' | 'renameLayout' | 'addMaster' | 'duplicateMaster' | 'deleteMaster' | 'renameMaster';
15495
- /** A framework-neutral descriptor for one sidebar button. */
15496
- interface MasterViewCrudAction {
15497
- id: MasterViewCrudActionId;
15498
- /** i18n key for the button label (`pptx.masterView.<id>`). */
15499
- labelKey: string;
15500
- enabled: boolean;
15501
- /** i18n key explaining why the button is disabled, set only when it is. */
15502
- disabledReasonKey?: string;
15503
- }
15504
- //#endregion
15505
- //#region src/export/handout-layout.d.ts
15506
- /**
15507
- * Pure handout layout calculations, shared by every binding's print path.
15508
- *
15509
- * Handles distributing slides across pages, computing grid dimensions, and
15510
- * positioning cells within A4 page space. No DOM/framework dependency: callers
15511
- * render the resulting rectangles however their view layer prefers.
15512
- */
15513
- /** Supported slides-per-page values. */
15514
- type HandoutSlidesPerPage = 1 | 2 | 3 | 4 | 6 | 9;
15515
- //#endregion
15516
- //#region src/export/print-document.d.ts
15517
- /** What to print. */
15518
- type PrintWhat = 'slides' | 'handouts' | 'notes' | 'outline';
15519
- /** Page orientation for the printed output. */
15520
- type PrintOrientation = 'portrait' | 'landscape';
15521
- /** Colour mode for the printed output. */
15522
- type PrintColorMode = 'color' | 'grayscale' | 'blackAndWhite';
15523
- /** Slide range mode. */
15524
- type PrintSlideRange = 'all' | 'current' | 'custom';
15525
- /** Resolved print settings emitted on confirm. */
15526
- interface PrintSettings {
15527
- printWhat: PrintWhat;
15528
- orientation: PrintOrientation;
15529
- colorMode: PrintColorMode;
15530
- frameSlides: boolean;
15531
- slidesPerPage: HandoutSlidesPerPage;
15532
- slideRange: PrintSlideRange;
15533
- customRangeFrom: number;
15534
- customRangeTo: number;
15535
- /**
15536
- * PowerPoint's Print > "Scale to Fit Paper". `true` (the default, and the
15537
- * only behavior this printed output ever had before this field existed)
15538
- * shrinks/grows each slide image to fill its page/cell while preserving
15539
- * aspect ratio. `false` prints at the slide's native pixel size instead,
15540
- * which may overflow or under-fill the page, exactly like PowerPoint with
15541
- * the option off. Optional so existing `Partial<PrintSettings>` literals
15542
- * across every binding keep compiling; `validatePrintSettings` defaults it
15543
- * to `true`.
15544
- */
15545
- scaleToFit?: boolean;
15546
- }
15547
- //#endregion
15548
- //#region src/render/options/viewer-options-constraints.d.ts
15549
- /** Locks and host defaults, both keyed `<group>.<key>`. */
15550
- interface ViewerOptionsConstraints {
15551
- locked?: OptionsSettingValues;
15552
- defaults?: OptionsSettingValues;
15553
- }
15554
- //#endregion
15555
- //#region src/render/options/viewer-options-store.d.ts
15556
- /**
15557
- * Framework-neutral store behind the File > Options dialog.
15558
- *
15559
- * Holds a `ViewerOptions` snapshot, notifies subscribers on change, and
15560
- * persists a sparse diff into the shared `pptx-viewer-prefs` localStorage
15561
- * entry so choices survive reloads in every binding.
15562
- */
15563
- type ViewerOptionsListener = (options: ViewerOptions) => void;
15564
- interface ViewerOptionsStore {
15565
- getOptions(): ViewerOptions;
15566
- /** Replace the whole snapshot (e.g. hydrating from a host prop). */
15567
- setOptions(next: ViewerOptions): void;
15568
- /** Set one primitive value; ignores unknown keys and mismatched types. */
15569
- setValue(group: ViewerOptionsGroupId, key: string, value: ViewerOptionPrimitive): void;
15570
- getValue(group: ViewerOptionsGroupId, key: string): ViewerOptionPrimitive | undefined;
15571
- /** Toggle a ribbon tab's visibility. The File tab is always kept visible. */
15572
- setRibbonTabHidden(tabId: ToolbarTabId, hidden: boolean): void;
15573
- setQuickAccessCommands(commandIds: readonly string[]): void;
15574
- /** Reset every option (or one tab-group) back to defaults. */
15575
- reset(group?: ViewerOptionsGroupId): void;
15576
- subscribe(listener: ViewerOptionsListener): () => void;
15577
- /**
15578
- * Subscribe to ONE projection of the options, woken only when that
15579
- * projection changes.
15580
- *
15581
- * `subscribe` above wakes on every option change, which in a binding means
15582
- * the whole options consumer re-renders because the user toggled something
15583
- * unrelated. A ribbon control that reads `ribbon.hiddenTabIds` should not
15584
- * care that an autosave interval moved (issue #145).
15585
- *
15586
- * IMPORTANT for array/object slices: every write here deep-clones the whole
15587
- * options object (`cloneViewerOptions`), so a nested array is a NEW array
15588
- * after ANY change, even one that did not touch it. Under the default
15589
- * `Object.is` such a selector would fire on every write and buy nothing.
15590
- * Pass a value equality for those, e.g. the shared `sameArray`.
15591
- */
15592
- subscribeSelector<T>(selector: (options: ViewerOptions) => T, listener: (value: T, previous: T) => void, isEqual?: (a: T, b: T) => boolean): () => void;
15593
- /**
15594
- * Apply several option writes as ONE notification, so a multi-field
15595
- * operation costs a single render instead of one per field.
15596
- */
15597
- batch(write: () => void): void;
15598
- /**
15599
- * Apply host constraints (see `ViewerOptionsConstraints`): `locked` values
15600
- * are forced in and every later write to them is ignored; `defaults`
15601
- * replace the built-in defaults for settings the user never saved, and
15602
- * become what `reset` returns to. Replaces any previous constraints.
15603
- */
15604
- setConstraints(constraints: ViewerOptionsConstraints): void;
15605
- /** True when the host locked `<group>.<key>`. */
15606
- isLocked(group: ViewerOptionsGroupId, key: string): boolean;
15607
- }
15608
- interface SubtitleSettings {
15609
- spokenLanguage: string;
15610
- }
15611
- interface SubtitleSettingsLabels {
15612
- title: string;
15613
- language: string;
15614
- browserLanguage: string;
15615
- description: string;
15616
- apply: string;
15617
- cancel: string;
15618
- }
15619
- /**
15620
- * Optional hook point for hosts that want to wire a real sign-in flow into
15621
- * File > Account. Disabled by default: the Account page renders nothing
15622
- * extra unless a host explicitly opts in by passing `enabled: true`.
15623
- * See docs/guide for wiring instructions.
15624
- */
15625
- interface AccountAuthConfig {
15626
- enabled: boolean;
15627
- onSignIn: () => void;
15628
- signedInUser?: {
15629
- name: string;
15630
- email?: string;
15631
- avatarUrl?: string;
15632
- };
15633
- }
15634
- //#endregion
15635
- //#region src/render/ribbon-galleries/gallery-types.d.ts
15636
- /** Every gallery the ribbon offers. */
15637
- type RibbonGalleryId = 'shapeStyles' | 'shapeEffects' | 'wordArtStyles' | 'pictureStyles' | 'pictureCorrections' | 'pictureColor' | 'pictureArtisticEffects' | 'bullets' | 'numbering' | 'tableStyles' | 'chartStyles' | 'chartColors' | 'chartQuickLayout' | 'smartArtStyles' | 'smartArtColors' | 'smartArtLayouts' | 'smartArtAddShape' | 'smartArtAddBullet' | 'smartArtTextPane' | 'smartArtPromote' | 'smartArtDemote' | 'smartArtRightToLeft' | 'smartArtMoveUp' | 'smartArtMoveDown' | 'smartArtResetGraphic' | 'smartArtConvert' | 'themeColors' | 'themeFonts';
15638
- /** One tile. */
15639
- interface RibbonGalleryItem {
15640
- /** Stable within its gallery; what `applyRibbonGalleryItem` takes. */
15641
- id: string;
15642
- /** i18n key of the tile's accessible name / tooltip. */
15643
- labelKey: string;
15644
- /** `{{name}}` interpolation values for `labelKey`. */
15645
- labelParams?: Readonly<Record<string, string | number>>;
15646
- /** English fallback for bindings whose dictionary lacks `labelKey`. */
15647
- label: string;
15648
- /**
15649
- * A complete, self-contained `<svg>` element (width/height/viewBox set).
15650
- * Built only from catalogue data and theme colours, never from user text,
15651
- * so it is safe to inject as markup.
15652
- */
15653
- previewSvg: string;
15654
- /**
15655
- * CSS `filter` the tile's preview carries (the Picture Adjust galleries),
15656
- * for a host that draws the thumbnail over a real image instead of
15657
- * `previewSvg`. Omitted when the preset has no CSS-expressible preview.
15658
- */
15659
- previewFilter?: string;
15660
- /** True when this entry is what the selection currently carries. */
15661
- applied: boolean;
15662
- }
15663
- /** A titled block of tiles (PowerPoint's "Theme Styles" / "Presets"). */
15664
- interface RibbonGallerySection {
15665
- id: string;
15666
- /** i18n key of the section heading; omitted for an untitled section. */
15667
- titleKey?: string;
15668
- title?: string;
15669
- /** Tiles per row in the dropped-down grid. */
15670
- columns: number;
15671
- /** Preview tile size in CSS px (the SVG's own width/height). */
15672
- tileWidth: number;
15673
- tileHeight: number;
15674
- items: RibbonGalleryItem[];
15675
- }
15676
- interface RibbonGalleryDescriptor {
15677
- id: RibbonGalleryId;
15678
- /** i18n key of the gallery trigger / group caption. */
15679
- labelKey: string;
15680
- label: string;
15681
- sections: RibbonGallerySection[];
15682
- /** True when the selection cannot take this gallery (trigger disabled). */
15683
- disabled: boolean;
15684
- /**
15685
- * Set when the entry is a one-button command (PowerPoint's Add Shape, Reset
15686
- * Graphic, ...) rather than a gallery: the element draws a plain command, a
15687
- * click picks its only item and no panel opens.
15688
- */
15689
- command?: RibbonGalleryCommandView;
15690
- }
15691
- /** How a command-style entry draws (see {@link RibbonGalleryDescriptor.command}). */
15692
- interface RibbonGalleryCommandView {
15693
- /** SVG path data on a 20px grid. */
15694
- iconPath: string;
15695
- /** Icon above the label (PowerPoint's large button) instead of beside it. */
15696
- large?: boolean;
15697
- /** i18n key and English fallback of the tooltip, e.g. why the command is unavailable. */
15698
- hintKey?: string;
15699
- hint?: string;
15700
- }
15701
- /**
15702
- * What a gallery needs to know about the deck and the selection. Bindings
15703
- * build it once per render from state they already hold.
15704
- */
15705
- interface RibbonGalleryContext {
15706
- /** The primary selected element, or null. */
15707
- element: PptxElement | null;
15708
- /** `PptxData.themeColorMap`: scheme key -> hex. */
15709
- themeColorMap?: Readonly<Record<string, string>>;
15710
- /** `PptxData.theme`. */
15711
- theme?: PptxTheme;
15712
- /**
15713
- * The handler's `resolveStyleMatrixReferences`, bound. Shape Styles use it
15714
- * to resolve `<p:style>` exactly as the load path does; without it they
15715
- * fall back to an approximation from `themeColorMap`.
15716
- */
15717
- resolveStyleMatrix?: (styleXml: XmlObject) => ResolvedStyleMatrix;
15718
- }
15719
- /** What a pick asks the binding to do. */
15720
- type RibbonGalleryApplyResult = {
15721
- kind: 'element';
15722
- elementId: string;
15723
- /** Merge onto the element with the binding's normal update + history path. */
15724
- patch: Partial<PptxElement>;
15725
- } | {
15726
- kind: 'themeColorScheme';
15727
- colorScheme: PptxThemeColorScheme;
15728
- name: string;
15729
- } | {
15730
- kind: 'themeFontScheme';
15731
- fontScheme: PptxThemeFontScheme;
15732
- name: string;
15733
- };
15734
- //#endregion
15735
- //#region src/render/inline-text-commit.d.ts
15736
- /**
15737
- * Reconcile a committed plain-text edit with an element's existing rich runs.
15738
- *
15739
- * Editor surfaces expose plain text, but the model still owns per-run styles,
15740
- * bullets, fields and paragraph properties. An unchanged blur is not an edit;
15741
- * a changed value is remapped onto the authored segments instead of flattening
15742
- * them.
15743
- */
15744
- declare function buildInlineTextCommitPatch(element: PptxElement | undefined, text: string, snapshot?: InlineTextEditSnapshot): Partial<PptxElement> | undefined;
15745
- /** Overlay a current rich list draft for serialization, without committing editor state. */
15746
- declare function overlayInlineTextSnapshot(elements: readonly PptxElement[], snapshot?: InlineTextEditSnapshot, text?: string | undefined): readonly PptxElement[];
15747
- //#endregion
15748
- //#region src/render/slide-size-rescale.d.ts
15749
- type SlideSizeRescaleMode = 'maximize' | 'ensureFit';
15750
- type ReadOnlyRecommendationKind = 'modifyVerifier' | 'markedFinal' | null;
15751
- interface ReadOnlyRecommendation {
15752
- readonly kind: ReadOnlyRecommendationKind;
15753
- /** i18n key for the banner/toast a binding shows for this recommendation. */
15754
- readonly messageKey: string;
15755
- /** Whether a binding's "read-only" toggle should default to on. */
15756
- readonly defaultReadOnly: boolean;
15757
- /**
15758
- * Whether lifting this recommendation requires a correct password, rather
15759
- * than a plain "Edit anyway". True only for a `modifyVerifier` that carries
15760
- * a hash this viewer can actually check (`hashData` plus a resolvable
15761
- * algorithm, see `checkModifyPassword`; `saltData` is optional and NOT
15762
- * required, a missing salt is still checkable). "Mark as Final" is purely
15763
- * advisory and never requires one, and a `modifyVerifier` with no hash at
15764
- * all, or naming an algorithm this viewer does not implement, cannot be
15765
- * verified either way, so both fall back to the plain "Edit anyway" a
15766
- * binding already had.
15767
- */
15768
- readonly requiresPassword: boolean;
15769
- }
15770
- //#endregion
15771
- //#region src/render/modify-password-check.d.ts
15772
- type ModifyPasswordCheckResult = {
15773
- readonly ok: true;
15774
- } | {
15775
- readonly ok: false;
15776
- readonly reason: 'wrong-password' | 'unsupported-algorithm';
15777
- };
15778
- interface CompatibilityWarningToast {
15779
- /** Stable per-code id, since toasts are deduped by code (see module docs). */
15780
- readonly id: string;
15781
- readonly code: string;
15782
- readonly severity: 'info' | 'warning';
15783
- readonly messageKey: string;
15784
- /** `{{code}}` for the generic fallback key; `undefined` for a mapped code. */
15785
- readonly params?: Readonly<Record<string, string>>;
15786
- }
15787
- //#endregion
15788
- //#region src/render/run-program-notice.d.ts
15789
- /**
15790
- * run-program-notice.ts: turn a resolved `ppaction://program` command string
15791
- * into the non-blocking notice a binding should show during a running show.
15792
- *
15793
- * PowerPoint's "Run program" action (`a:hlinkClick` -> `ppaction://program`,
15794
- * `packages/shared/src/render/presentation-action.ts`'s `runProgram` intent)
15795
- * names a free-text "Program to run:" command the author typed, e.g.
15796
- * `notepad.exe C:\temp\notes.txt`. Path and arguments are ONE unstructured
15797
- * string; OOXML has no separate arguments field, so this module does not try
15798
- * to split one out.
15799
- *
15800
- * A browser cannot launch a local executable, so the honest behavior on
15801
- * click is: show the presenter a small, dismissible notice naming the exact
15802
- * command PowerPoint would have run, with a Copy button, rather than doing
15803
- * nothing (silently) or blocking the show with a modal dialog.
15804
- *
15805
- * Framework-agnostic: no React, Vue, Angular, Svelte or DOM imports.
15806
- */
15807
- /** A run-program notice ready for a binding's toast/notice UI to render. */
15808
- interface RunProgramNotice {
15809
- /** Stable id for this invocation, so a binding can dedupe/key a toast list. */
15810
- readonly id: string;
15811
- /** The exact resolved command string (path plus whatever arguments the author typed). */
15812
- readonly target: string;
15813
- /** i18n key for the notice body. Interpolates `{{target}}`. */
15814
- readonly messageKey: string;
15815
- /** i18n key for the Copy button label. */
15816
- readonly copyLabelKey: string;
15817
- }
15818
- //#endregion
15819
- //#region src/render/viewport-fit.d.ts
15820
- /** Unscaled CSS pixels reserved on each side of the ordinary viewer viewport. */
15821
- type ViewportFitPadding = number | {
15822
- horizontal: number;
15823
- vertical: number;
15824
- };
15825
- /** Host layout policy, independent of authored slide dimensions and user zoom. */
15826
- interface ViewportFitOptions {
15827
- /** Per-side padding. Omission keeps the binding's existing decorative allowance. */
15828
- fitPadding?: ViewportFitPadding;
15829
- /** Positive fit-factor ceiling; null allows enlargement without a ceiling. */
15830
- maxFitScale?: number | null;
15831
- }
15832
- //#endregion
15833
- //#region src/render/picture-crop/crop-geometry.d.ts
15834
- /** An axis-aligned rectangle in slide pixels. */
15835
- interface CropRect {
15836
- x: number;
15837
- y: number;
15838
- width: number;
15839
- height: number;
15840
- }
15841
- /** The four `a:srcRect` insets as fractions of the image (negative pads). */
15842
- interface CropInsets {
15843
- cropLeft: number;
15844
- cropTop: number;
15845
- cropRight: number;
15846
- cropBottom: number;
15847
- }
15848
- /** What a crop edit writes back onto the picture element. */
15849
- type CropElementUpdate = CropInsets & CropRect;
15850
- /** The snapshot a crop session restores on cancel. */
15851
- interface CropSession {
15852
- elementId: string;
15853
- original: CropElementUpdate;
15854
- /** Insets the picture did not carry at all (no `a:srcRect` opinion). */
15855
- absentInsets: readonly (keyof CropInsets)[];
15856
- }
15857
- type ThemeEditorLabels = Record<string, string>;
15858
- /**
15859
- * Controlled Animations tab state. Hosts own the slide model, selection,
15860
- * history and the inspector; the view only reflects these values.
15861
- */
15862
- interface RibbonAnimationsViewState {
15863
- /** False in read-only hosts: every authoring intent is rejected. */
15864
- editable: boolean;
15865
- /** Whether an element is selected; effects always target one element. */
15866
- hasSelection: boolean;
15867
- /** Whether the Animation Pane (inspector) is open; reflected as pressed. */
15868
- paneOpen?: boolean;
15869
- /** Transient highlight while a host's Preview is playing, where it tracks one. */
15870
- previewActive?: boolean;
15871
- translate?: (key: string) => string;
15872
- }
15873
- //#endregion
15874
- //#region src/render/ribbon-draw-state.d.ts
15875
- type RibbonDrawTool = 'select' | 'pen' | 'highlighter' | 'eraser' | 'freeform';
15876
- interface RibbonDrawViewState {
15877
- tool: RibbonDrawTool;
15878
- color: string;
15879
- width: number;
15880
- editable: boolean;
15881
- recentColors?: readonly string[];
15882
- translate?: (key: string) => string;
15883
- }
15884
- /**
15885
- * Controlled Insert tab state. Native viewers own the selections, every document
15886
- * mutation, the file/shape/SmartArt/equation/hyperlink dialogs and history.
15887
- */
15888
- interface RibbonInsertState {
15889
- editable: boolean;
15890
- /** A hyperlink always attaches to something, so Link tracks the selection. */
15891
- hasSelection: boolean;
15892
- /** The shape preset staged in the Shape picker. */
15893
- shapeType: string;
15894
- /** The chart entry staged in the Chart picker. */
15895
- chartKind: string;
15896
- /** The armed Freeform: Shape / Curve tool. */
15897
- activeFreeformTool?: string | null;
15898
- /** Visible Freeform tools; empty hides the buttons (host customization). */
15899
- freeformTools?: readonly string[];
15900
- /** Hosts without these capabilities hide the control instead of showing a dead one. */
15901
- chartAvailable?: boolean;
15902
- fieldAvailable?: boolean;
15903
- headerFooterAvailable?: boolean;
15904
- translate?: (key: string) => string;
15905
- }
15906
- /** One row of a menu or select; labels are translated by the view unless `label` is set. */
15907
- interface RibbonHomeItem {
15908
- readonly value: string;
15909
- /** Ready-made text (a font family, a layout name); wins over `labelKey`. */
15910
- readonly label?: string;
15911
- readonly labelKey?: string;
15912
- readonly fallback?: string;
15913
- readonly description?: string;
15914
- readonly descriptionKey?: string;
15915
- /** Heading of the group this row opens; consecutive rows share one heading. */
15916
- readonly group?: string;
15917
- readonly groupKey?: string;
15918
- readonly checked?: boolean;
15919
- readonly disabled?: boolean;
15920
- /** Preview typeface of a font row. */
15921
- readonly fontFamily?: string;
15922
- /** Shared artwork key shown before the label (a shape glyph or ribbon icon). */
15923
- readonly icon?: string;
15924
- /** Preserved test or automation hooks (`data-pptx-merge-op`, ...). */
15925
- readonly attrs?: Readonly<Record<string, string>>;
15926
- /** Draws a divider above the row. */
15927
- readonly separator?: boolean;
15928
- }
15929
- interface RibbonHomeControlState {
15930
- disabled?: boolean;
15931
- /** Omit for ordinary commands; a boolean reflects `aria-pressed`. */
15932
- pressed?: boolean;
15933
- /** Reserved for hosts that mirror their own popover; shared popovers set it themselves. */
15934
- expanded?: boolean;
15935
- hidden?: boolean;
15936
- /** Select, number, colour bar and checked menu row. */
15937
- value?: string | number;
15938
- /** Menu or select rows that replace the spec's static ones. */
15939
- items?: readonly RibbonHomeItem[];
15940
- /** Colour popover content; the trigger shows `value` in its bar. */
15941
- colour?: RibbonHomeColourModel;
15942
- /** Layout gallery content. */
15943
- layouts?: RibbonHomeLayoutModel;
15944
- /** Embedded gallery content. */
15945
- gallery?: {
15946
- descriptor: RibbonGalleryDescriptor | undefined;
15947
- disabled?: boolean;
15948
- };
15949
- }
15950
- interface RibbonHomeColourModel {
15951
- /** The deck's theme colour map; the popover derives the theme palette from it. */
15952
- themeColors?: Readonly<Record<string, string>>;
15953
- /** Theme reference of the current colour (highlights its swatch). */
15954
- selectedRef?: PptxThemeColorRef;
15955
- /** Recently used colours, newest first. */
15956
- recent?: readonly string[];
15957
- }
15958
- interface RibbonHomeLayoutModel {
15959
- layouts: readonly {
15960
- path: string;
15961
- name: string;
15962
- }[];
15963
- /** Marks the active tile; omitted by New Slide. */
15964
- current?: string;
15965
- /** Artwork data by layout path; tiles render name-only until it arrives. */
15966
- previews?: Readonly<Record<string, PptxLayoutPreview>> | ReadonlyMap<string, PptxLayoutPreview>;
15967
- }
15968
- /** State key of a control: its id, or `id#part` when several buttons share one id. */
15969
- type RibbonHomeKey = RibbonControlId | `${RibbonControlId}#${string}`;
15970
- interface RibbonHomeViewState {
15971
- /** Missing entries are enabled, unpressed and visible. */
15972
- controls: Readonly<Partial<Record<RibbonHomeKey, RibbonHomeControlState>>>;
15973
- translate?: (key: string) => string;
15974
- }
15975
- /** Controlled View tab state. Native viewers own the values and every side effect. */
15976
- interface RibbonViewState {
15977
- editable: boolean;
15978
- showRulers: boolean;
15979
- showGrid: boolean;
15980
- showGuides: boolean;
15981
- snapToGrid: boolean;
15982
- snapToShape: boolean;
15983
- templateEditing: boolean;
15984
- selectionPaneOpen?: boolean;
15985
- eyedropperActive?: boolean;
15986
- /** Hosts without these capabilities hide the control instead of showing a dead one. */
15987
- selectionPaneAvailable?: boolean;
15988
- eyedropperAvailable?: boolean;
15989
- zoomAvailable?: boolean;
15990
- translate?: (key: string) => string;
15991
- }
15992
- //#endregion
15993
- //#region src/render/ribbon-transitions-state.d.ts
15994
- type RibbonTransitionsTranslate = (key: string, params?: Record<string, string>) => string;
15995
- /** Controlled Transitions tab state. The host derives it from the ACTIVE slide. */
15996
- interface RibbonTransitionsViewState {
15997
- draft: RibbonTransitionDraft;
15998
- /** The slide's transition, used only to list and select the Sound entries. */
15999
- transition?: PptxSlideTransition;
16000
- editable: boolean;
16001
- inspectorOpen?: boolean;
16002
- translate?: RibbonTransitionsTranslate;
16003
- }
16004
- //#endregion
16005
- //#region src/render/status-bar-state.d.ts
16006
- /**
16007
- * Shared model for the bottom status bar (`pptx-ui-status-bar`).
16008
- *
16009
- * The slide counter, save indicator, notes toggle, view-mode buttons and zoom
16010
- * cluster were hand-built five times. The view owns the markup, pressed state
16011
- * and gating; hosts own every effect (notes panel, view switching, zoom).
16012
- */
16013
- type StatusBarTranslate = (key: string, params?: Record<string, string | number>) => string;
16014
- type StatusBarSaveKind = 'idle' | 'saving' | 'error';
16015
- type StatusBarViewMode = 'normal' | 'sorter' | 'slideShow';
16016
- interface StatusBarViewState {
16017
- slideCount: number;
16018
- /** Zero-based active slide; clamped into range for display. */
16019
- activeSlideIndex: number;
16020
- /** Already-translated save indicator, see {@link resolveStatusBarSave}. */
16021
- saveText: string;
16022
- saveKind?: StatusBarSaveKind;
16023
- /** Omit to hide the whole zoom cluster. */
16024
- zoomPercent?: number;
16025
- showNotes?: boolean;
16026
- notesExpanded?: boolean;
16027
- /** Default true. False drops the Normal / Sorter / Slide Show cluster. */
16028
- showViewModes?: boolean;
16029
- /** Default true. */
16030
- showSorter?: boolean;
16031
- /** Default true. */
16032
- showSlideShow?: boolean;
16033
- /** The pressed view button; omit when none is active. */
16034
- viewMode?: StatusBarViewMode;
16035
- translate?: StatusBarTranslate;
16036
- }
16037
- //#endregion
16038
- //#region src/render/notes-toolbar-state.d.ts
16039
- /**
16040
- * Shared model for the speaker-notes formatting toolbar (`pptx-ui-notes-toolbar`).
16041
- *
16042
- * The toolbar owns the buttons, their order, icons, labels, enabled state and
16043
- * the hyperlink popover. Hosts own the contenteditable editor, selection-based
16044
- * edits, history, printing and persistence, and route typed intents to them.
16045
- */
16046
- type NotesToolbarTranslate = (key: string, params?: Record<string, string | number>) => string;
16047
- interface NotesToolbarViewState {
16048
- /** True while the rich (contenteditable) surface is active. Drives the mode button label. */
16049
- rich: boolean;
16050
- /** Enables the formatting buttons. False in the plain editor, where they cannot act. */
16051
- canFormat: boolean;
16052
- /** Shows the Print button. */
16053
- showPrint: boolean;
16054
- /** Disables every button, for example while no slide is selected. */
16055
- disabled?: boolean;
16056
- /** Host translator; keys are the canonical `pptx.notes.*` set. Omitted: keys are shown. */
16057
- translate?: NotesToolbarTranslate;
16058
- }
16059
- //#endregion
16060
- //#region src/render/title-bar-state.d.ts
16061
- type TitleBarTranslate = (key: string, params?: Record<string, string | number>) => string;
16062
- type TitleBarPlacement = 'titleBar' | 'belowRibbon';
16063
- type TitleBarTone = 'idle' | 'saving' | 'error';
16064
- interface TitleBarAutosaveView {
16065
- enabled: boolean;
16066
- /** Default true. False renders the switch inert (host policy `autosave: false`). */
16067
- toggleAvailable?: boolean;
16068
- /** Translation key from `resolveTitleBarStatusKey`. */
16069
- statusKey: string;
16070
- /** Colour of the status text; only meaningful while `enabled`. */
16071
- tone?: TitleBarTone;
16072
- }
16073
- interface TitleBarHistoryState {
16074
- canUndo: boolean;
16075
- canRedo: boolean;
16076
- /** Description of the pending action, e.g. "Delete shape". */
16077
- undoLabel?: string | null;
16078
- redoLabel?: string | null;
16079
- /** Default true. Maps to `hiddenActions: ['undo']`. */
16080
- showUndo?: boolean;
16081
- /** Default true. Maps to `hiddenActions: ['redo']`. */
16082
- showRedo?: boolean;
16083
- }
16084
- interface TitleBarQuickAccessView {
16085
- visible: boolean;
16086
- position: QuickAccessPosition;
16087
- showCommandLabels: boolean;
16088
- /** Ordered catalog ids (File > Options > Quick Access Toolbar). */
16089
- commandIds: readonly string[];
16090
- }
16091
- interface TitleBarViewState {
16092
- /** Edit mode with an editable deck. Gates AutoSave, the strip, status and search. */
16093
- editing: boolean;
16094
- /** Whether the command search shows; hosts pass `editing`. */
16095
- searchVisible: boolean;
16096
- /** Display name; the translated default shows when empty. */
16097
- fileName?: string;
16098
- autosave: TitleBarAutosaveView;
16099
- history: TitleBarHistoryState;
16100
- /** Default true. */
16101
- showSave?: boolean;
16102
- quickAccess: TitleBarQuickAccessView;
16103
- /** Search catalogue; defaults to the shared `COMMAND_SEARCH_ENTRIES`. */
16104
- commands?: readonly CommandSearchEntry[];
16105
- /** Default true. False drops the "Find in Slides" fallback row. */
16106
- contentSearch?: boolean;
16107
- /** ScreenTip rule (Options > General); returning undefined suppresses the title. */
16108
- screenTip?: (label: string) => string | undefined;
16109
- translate?: TitleBarTranslate;
16110
- }
16111
- //#endregion
16112
- //#region src/web-components/theme-editor.d.ts
16113
- interface PptxUiThemeEditorElement extends HTMLElement {
16114
- theme: PptxTheme | undefined;
16115
- labels: ThemeEditorLabels;
16116
- disabled: boolean;
16117
- }
16118
- declare global {
16119
- interface HTMLElementTagNameMap {
16120
- 'pptx-ui-theme-editor': PptxUiThemeEditorElement;
16121
- }
16122
- }
16123
- /** One row of a context menu. Hosts decide `id`, wording, gating and what activation does. */
16124
- interface ContextMenuViewItem {
16125
- /** Stable command id, echoed by `menu-request`. */
16126
- id: string;
16127
- /** Already-translated visible label. */
16128
- label: string;
16129
- /** Draw a rule before this row. */
16130
- separatorBefore?: boolean;
16131
- /** Group heading shown before this row; the row and the ones after it join that group. */
16132
- heading?: string;
16133
- /** Destructive command (Delete): tinted. */
16134
- danger?: boolean;
16135
- /** Offered but unavailable: announced and drawn dim, skipped by arrow keys. */
16136
- disabled?: boolean;
16137
- /** A toggle (Grid and Guides, Ruler) in this state; omitted for one-shot commands. */
16138
- checked?: boolean;
16139
- }
16140
- /** Everything the controlled element needs to draw one menu. */
16141
- interface ContextMenuViewState {
16142
- /** Pointer position, in viewport pixels. The element clamps it into the window. */
16143
- x: number;
16144
- y: number;
16145
- /** Accessible name of the menu. */
16146
- label: string;
16147
- items: readonly ContextMenuViewItem[];
16148
- /**
16149
- * Test-hook attributes copied onto the host element (`data-pptx-context-menu`,
16150
- * `data-pptx-canvas-context-menu`, ...). Only `data-pptx-*` names are accepted.
16151
- */
16152
- markers?: readonly string[];
16153
- /** Stacking order; defaults to {@link CONTEXT_MENU_EDITOR_LAYER}. */
16154
- zIndex?: number;
16155
- /** Move focus onto the first command on open. Default true. */
16156
- autoFocus?: boolean;
16157
- }
16158
- interface PptxUiCompatToastsElement extends HTMLElement {
16159
- state: CompatToastsViewState;
16160
- }
16161
- interface PptxUiDialogFooterElement extends HTMLElement {
16162
- state: DialogFooterViewState;
16163
- /** Move keyboard focus to an action, e.g. the primary one when a dialog opens. */
16164
- focusAction(id: string): void;
16165
- }
16166
- interface PptxUiPasteOptionsElement extends HTMLElement {
16167
- state: PasteOptionsViewState;
16168
- }
16169
- interface PptxUiReadOnlyBannerElement extends HTMLElement {
16170
- state: ReadOnlyBannerViewState;
16171
- }
16172
- interface PptxUiContextMenuElement extends HTMLElement {
16173
- state: ContextMenuViewState;
16174
- }
16175
- declare global {
16176
- interface HTMLElementTagNameMap {
16177
- 'pptx-ui-compat-toasts': PptxUiCompatToastsElement;
16178
- 'pptx-ui-context-menu': PptxUiContextMenuElement;
16179
- 'pptx-ui-dialog-footer': PptxUiDialogFooterElement;
16180
- 'pptx-ui-paste-options': PptxUiPasteOptionsElement;
16181
- 'pptx-ui-read-only-banner': PptxUiReadOnlyBannerElement;
16182
- }
16183
- }
16184
- interface PptxUiMobileBarElement extends HTMLElement {
16185
- state: MobileBarViewState;
16186
- }
16187
- declare global {
16188
- interface HTMLElementTagNameMap {
16189
- 'pptx-ui-mobile-bar': PptxUiMobileBarElement;
16190
- }
16191
- }
16192
- interface PptxUiMobileToolbarElement extends HTMLElement {
16193
- state: MobileToolbarViewState;
16194
- }
16195
- declare global {
16196
- interface HTMLElementTagNameMap {
16197
- 'pptx-ui-mobile-toolbar': PptxUiMobileToolbarElement;
16198
- }
16199
- }
16200
- interface PptxUiPresentToolbarElement extends HTMLElement {
16201
- state: PresentToolbarViewState;
16202
- /** Close an open colour palette, e.g. when the host auto-hides the bar. */
16203
- closePalettes(): void;
16204
- }
16205
- declare global {
16206
- interface HTMLElementTagNameMap {
16207
- 'pptx-ui-present-toolbar': PptxUiPresentToolbarElement;
16208
- }
16209
- }
16210
- interface PptxUiPresenterConsoleElement extends HTMLElement {
16211
- state: PresenterConsoleViewState;
16212
- }
16213
- declare global {
16214
- interface HTMLElementTagNameMap {
16215
- 'pptx-ui-presenter-console': PptxUiPresenterConsoleElement;
16216
- }
16217
- }
16218
- interface PptxUiRibbonAnimationsElement extends HTMLElement {
16219
- state: RibbonAnimationsViewState;
16220
- }
16221
- declare global {
16222
- interface HTMLElementTagNameMap {
16223
- 'pptx-ui-ribbon-animations': PptxUiRibbonAnimationsElement;
16224
- }
16225
- }
16226
- interface PptxUiRibbonDrawElement extends HTMLElement {
16227
- state: RibbonDrawViewState;
16228
- }
16229
- declare global {
16230
- interface HTMLElementTagNameMap {
16231
- 'pptx-ui-ribbon-draw': PptxUiRibbonDrawElement;
16232
- }
16233
- }
16234
- //#endregion
16235
- //#region src/web-components/ribbon-home-layout.d.ts
16236
- /**
16237
- * Draws a layout's real artwork inside a tile's scaled surface. The artwork is
16238
- * element rendering that each binding owns; return a disposer to release it.
16239
- */
16240
- type HomeLayoutArtwork = (preview: PptxLayoutPreview, geometry: LayoutPreviewGeometry, container: HTMLElement) => (() => void) | void;
16241
- interface PptxUiRibbonHomeElement extends HTMLElement {
16242
- state: RibbonHomeViewState;
16243
- /** Draws a layout's real artwork inside a gallery tile; the host owns element rendering. */
16244
- layoutArtwork: HomeLayoutArtwork | undefined;
16245
- /** Wrapper (or button) of a control id. */
16246
- anchor(id: string): HTMLElement | undefined;
16247
- }
16248
- declare global {
16249
- interface HTMLElementTagNameMap {
16250
- 'pptx-ui-ribbon-home-clipboard': PptxUiRibbonHomeElement;
16251
- 'pptx-ui-ribbon-home-font': PptxUiRibbonHomeElement;
16252
- 'pptx-ui-ribbon-home-paragraph': PptxUiRibbonHomeElement;
16253
- 'pptx-ui-ribbon-home-editing': PptxUiRibbonHomeElement;
16254
- 'pptx-ui-ribbon-home-slides': PptxUiRibbonHomeElement;
16255
- 'pptx-ui-ribbon-home-drawing': PptxUiRibbonHomeElement;
16256
- 'pptx-ui-ribbon-home-arrange-align': PptxUiRibbonHomeElement;
16257
- 'pptx-ui-ribbon-home-arrange-flip': PptxUiRibbonHomeElement;
16258
- 'pptx-ui-ribbon-home-arrange-order': PptxUiRibbonHomeElement;
16259
- 'pptx-ui-ribbon-home-arrange-edit': PptxUiRibbonHomeElement;
16260
- 'pptx-ui-ribbon-home-font-picker': PptxUiRibbonHomeElement;
16261
- 'pptx-ui-ribbon-home-arrange-painter': PptxUiRibbonHomeElement;
16262
- 'pptx-ui-ribbon-home-arrange-shape': PptxUiRibbonHomeElement;
16263
- }
16264
- }
16265
- interface PptxUiRibbonTransitionsElement extends HTMLElement {
16266
- state: RibbonTransitionsViewState;
16267
- }
16268
- declare global {
16269
- interface HTMLElementTagNameMap {
16270
- 'pptx-ui-ribbon-transitions': PptxUiRibbonTransitionsElement;
16271
- }
16272
- }
16273
- interface PptxUiRibbonInsertElement extends HTMLElement {
16274
- state: RibbonInsertState;
16275
- /** Return focus to a control by its public id, e.g. after a native dialog closes. */
16276
- focusControl(id: string): void;
16277
- }
16278
- declare global {
16279
- interface HTMLElementTagNameMap {
16280
- 'pptx-ui-ribbon-insert': PptxUiRibbonInsertElement;
16281
- }
16282
- }
16283
- interface PptxUiRibbonViewElement extends HTMLElement {
16284
- state: RibbonViewState;
16285
- }
16286
- declare global {
16287
- interface HTMLElementTagNameMap {
16288
- 'pptx-ui-ribbon-view': PptxUiRibbonViewElement;
16289
- }
16290
- }
16291
- //#endregion
16292
- //#region src/web-components/ribbon-section.d.ts
16293
- interface PptxUiRibbonSectionElement extends HTMLElement {
16294
- groups: readonly RibbonGroupView[];
16295
- }
16296
- declare global {
16297
- interface HTMLElementTagNameMap {
16298
- 'pptx-ui-ribbon-section': PptxUiRibbonSectionElement;
16299
- }
16300
- }
16301
- //#endregion
16302
- //#region src/web-components/ribbon-gallery.d.ts
16303
- type GalleryTranslate = (key: string, params?: Readonly<Record<string, string | number>>) => string;
16304
- interface PptxUiRibbonGalleryElement extends HTMLElement {
16305
- readonly trigger: HTMLButtonElement;
16306
- readonly popup: HTMLElement;
16307
- descriptor: RibbonGalleryDescriptor | undefined;
16308
- translateLabel: GalleryTranslate;
16309
- disabled: boolean;
16310
- open: boolean;
16311
- close(): void;
16312
- }
16313
- declare global {
16314
- interface HTMLElementTagNameMap {
16315
- 'pptx-ui-ribbon-gallery': PptxUiRibbonGalleryElement;
16316
- }
16317
- }
16318
- //#endregion
16319
- //#region src/web-components/subtitle-settings.d.ts
16320
- interface PptxUiSubtitleSettingsElement extends HTMLElement {
16321
- settings: SubtitleSettings;
16322
- labels: SubtitleSettingsLabels;
16323
- languageDisabled: boolean;
16324
- }
16325
- declare global {
16326
- interface HTMLElementTagNameMap {
16327
- 'pptx-ui-subtitle-settings': PptxUiSubtitleSettingsElement;
16328
- }
16329
- }
16330
- interface PptxUiStatusBarElement extends HTMLElement {
16331
- state: StatusBarViewState;
16332
- }
16333
- declare global {
16334
- interface HTMLElementTagNameMap {
16335
- 'pptx-ui-status-bar': PptxUiStatusBarElement;
16336
- }
16337
- }
16338
- interface PptxUiNotesToolbarElement extends HTMLElement {
16339
- state: NotesToolbarViewState;
16340
- }
16341
- declare global {
16342
- interface HTMLElementTagNameMap {
16343
- 'pptx-ui-notes-toolbar': PptxUiNotesToolbarElement;
16344
- }
16345
- }
16346
- interface PptxUiTitleBarElement extends HTMLElement {
16347
- state: TitleBarViewState | undefined;
16348
- placement: TitleBarPlacement;
16349
- }
16350
- declare global {
16351
- interface HTMLElementTagNameMap {
16352
- 'pptx-ui-title-bar': PptxUiTitleBarElement;
16353
- }
16354
- }
16355
- //#endregion
16356
- //#region src/web-components/select-value.d.ts
16357
- /**
16358
- * Public DOM shape of `pptx-ui-select`, used by every binding. The element is ooxml-ui's
16359
- * `office-ui-select` under the pptx tag (see `office-aliases.ts`); it is not a native select.
16360
- */
16361
- interface PptxUiSelectElement extends HTMLElement {
16362
- value: string;
16363
- disabled: boolean;
16364
- readonly options: HTMLOptionElement[];
16365
- selectedIndex: number;
16366
- }
16367
- declare global {
16368
- interface HTMLElementTagNameMap {
16369
- 'pptx-ui-select': PptxUiSelectElement;
16370
- }
16371
- }
16372
- //#endregion
16373
- //#region src/render/slide-transition-cinematic.d.ts
16374
- /**
16375
- * Resolve a p15 cinematic transition to its CSS `animation` descriptors, or
16376
- * `undefined` when the type is not a cinematic transition (so the caller can
16377
- * fall through to the classic 2-D / p14 resolvers).
16378
- */
16379
- declare function getCinematicTransitionAnimations(type: PptxTransitionType, durationMs: number, direction: string | undefined, orient?: string | undefined): SlideTransitionAnimations | undefined;
16380
- /**
16381
- * `@keyframes` backing every cinematic transition. Fold into the injected
16382
- * aggregate (`SLIDE_TRANSITION_KEYFRAMES`) so these animate wherever it is
16383
- * injected. `pptx-tr-fade-in` (reused by wind/fracture/airplane incoming) is
16384
- * already defined in the core block, so it is intentionally not redefined here.
16385
- */
16386
- declare const CINEMATIC_TRANSITION_KEYFRAMES: string;
16387
- //#endregion
16388
12470
  //#region src/viewer/animation/transition-overlay.d.ts
16389
12471
  interface TransitionOverlayParams {
16390
12472
  doc: Document;
@@ -16415,5 +12497,5 @@ interface TransitionOverlayParams {
16415
12497
  */
16416
12498
  declare function playTransitionOverlay(params: TransitionOverlayParams): () => void;
16417
12499
  //#endregion
16418
- export { InlineTextSelection as $, ViewerThemeColors as $n, PptxTagCollection as $r, StrokeToInkElementOpts as $t, DEFAULT_MORPH_DURATION_MS as A, forgetSessionDeck as An, PptxCommentMention as Ar, ResolvedDirection as At, ExternalCollaborationAwareness as B, parsePresentationSessionId as Bn, PptxHeaderFooter as Br, RunProgramNotice as Bt, CompatibilityWarningToast as C, ViewportFitPadding as Cn, PptxAnimationTimelineAnchor as Cr, PresentationSnapshot as Ct, CropElementUpdate as D, canInteractWithElement as Dn, PptxChartData as Dr, ReadOnlyRecommendation as Dt, ContextMenuCustomization as E, buildInlineTextCommitPatch as En, PptxAppProperties as Er, RIBBON_TAB_IDS as Et, EditorKeyActionName as F, isLegacyBinaryPresentation as Fn, PptxData as Fr, RibbonGalleryApplyResult as Ft, GradientState as G, resolveOrientation as Gn, PptxNotesMaster as Gr, SessionDeck as Gt, ExternalCollaborationSnapshot as H, rememberSessionDeck as Hn, PptxLayoutPreview as Hr, SLIDE_TRANSITION_KEYFRAMES_CSS as Ht, ElementAnimationState as I, isSupportedPresentationFile as In, PptxElement as Ir, RibbonGalleryContext as It, HostElementMenuContext as J, resolveWheelSpokeCount as Jn, PptxSlide as Jr, ShortcutChord as Jt, Guide as K, resolveSlideTransition as Kn, PptxPresentationProperties as Kr, ShapePresetType as Kt, ElementClipboardPayload as L, loadPresentationDeck as Ln, PptxElementAnimation as Lr, RibbonGroupId as Lt, EASE as M, getP14TransitionAnimations as Mn, PptxCoreProperties as Mr, RibbonContextualTabId as Mt, EDITOR_SHORTCUT_ACTION_IDS as N, getSessionTabId as Nn, PptxCustomProperty as Nr, RibbonControlId as Nt, CropSession as O, createImageElementFromFile as On, PptxComment as Or, RemoteCursor as Ot, ELEMENT_CONTEXT_MENU_COMMAND_IDS as P, getSlideTransitionAnimations as Pn, PptxCustomShow as Pr, RibbonCustomization as Pt, InlineTextEditSnapshot as Q, ViewerTheme as Qn, PptxTableData as Qr, SlideTransitionAnimations as Qt, ElementUpdate as R, loadSessionDeck as Rn, PptxEmbeddedFont as Rr, RibbonTransitionDraft as Rt, CollaborationTransport as S, ViewportFitOptions as Sn, PptxAnimationSequence as Sr, PresentationPointerTool as St, ContextMenuCommandId as T, ZoomNavigationTarget as Tn, PptxAnimationTrigger as Tr, RANDOM_ELIGIBLE_TYPES as Tt, FieldSubstitutionContext as U, resolveDirection as Un, PptxModernCommentAuthor as Ur, SanitizedPresence as Ut, ExternalCollaborationSession as V, presentationBaseName as Vn, PptxImageEffects as Vr, SLIDE_TRANSITION_KEYFRAMES as Vt, FreeformToolKind as W, resolveDirection8 as Wn, PptxModifyVerifier as Wr, SavedPresentationFormat as Wt, INSTANT as X, savedPresentationFileName as Xn, PptxSlideTransition as Xr, SlideSizeRescaleMode as Xt, HostMenuCommand as Y, restoreSessionDeck as Yn, PptxSlideMaster as Yr, SlideSizeEmu as Yt, InlineListReadResult as Z, ThemeCatalogEntry as Zn, PptxTableCellStyle as Zr, SlideTemplateId as Zt, CollabLoadOrigin as _, PptxThemeColorRef as _i, ViewerMode as _n, ParsedTableStyleMap as _r, PPTX_OPEN_ACCEPT as _t, AutosaveRecord as a, PptxTransitionType as ai, ToolbarTabId as an, vermilionLightTheme as ar, ModifyPasswordCheckResult as at, CollaborationRole as b, ViewerPanelId as bn, PptxAnimationPreset as br, PowerPointViewerAPI as bt, BackstageCardId as c, TablePptxElement as ci, VIEWER_FEATURE_IDS as cn, PptxHandler as cr, OPTIONS_SETTING_IDS as ct, CANVAS_CONTEXT_MENU_COMMAND_IDS as d, SmartArtColorScheme as di, ViewerCustomizationApi as dn, SvgExportOptions as dr, OptionsSectionId as dt, PptxTextStyleLevels as ei, TOOLBAR_BUTTON_IDS as en, defaultCssVars as er, InsertChartKind as et, CINEMATIC_TRANSITION_KEYFRAMES as f, SmartArtLayout as fi, ViewerCustomizationController as fn, ElementAction as fr, OptionsSettingId as ft, ChartPartRef as g, XmlObject as gi, ViewerFontSource as gn, OlePptxElement as gr, P14_TRANSITION_KEYFRAMES_ALL as gt, ChangeCaseMode as h, TextStyle as hi, ViewerFeatureId as hn, OleObjectType as hr, P14_TRANSITION_KEYFRAMES_2 as ht, AnimationGroup as i, PptxThemeOption as ii, ToolbarButtonId as in, vermilionDarkTheme as ir, MobileSheetKey as it, DEFAULT_TRANSITION_DURATION_MS as j, getCinematicTransitionAnimations as jn, PptxCompatibilityWarning as jr, ResolvedDirection8 as jt, CssStyleMap as k, describeCollaborationShellState as kn, PptxCommentAuthor as kr, ResolvedCustomization as kt, BackstageCustomization as l, PptxSmartArtData as li, VIEWER_PANEL_IDS as ln, PptxHandlerSaveOptions as lr, OptionsCustomization as lt, CanvasSize as m, TextSegment as mi, ViewerExportFormatId as mn, MediaPptxElement as mr, P14_TRANSITION_KEYFRAMES as mt, playTransitionOverlay as n, PptxThemeColorScheme as ni, TextAdvancedChanges as nn, defaultThemeColors as nr, MasterViewCrudAction as nt, BACKSTAGE_CARD_IDS as o, PptxViewProperties as oi, VIEWER_DIALOG_IDS as on, AccessibilityIssue as or, OPTIONS_PAGE_IDS as ot, CanvasContextMenuCommandId as p, SmartArtLayoutType as pi, ViewerDialogId as pn, MasterViewTab as pr, OptionsSettingValues as pt, HostCanvasMenuContext as q, resolveTransitionDurationMs as qn, PptxSection as qr, ShareDefaults as qt, AccountAuthConfig as r, PptxThemeFontScheme as ri, ToolbarActionId as rn, themeToCssVars as rr, MasterViewCrudActionId as rt, BACKSTAGE_PAGE_IDS as s, ShapeStyle as si, VIEWER_EXPORT_FORMAT_IDS as sn, MergeShapeOperation as sr, OPTIONS_SECTION_IDS as st, TransitionOverlayParams as t, PptxTheme as ti, TRANSITION_SPEED_DURATION_MS as tn, defaultRadius as tr, KeyboardCustomization as tt, BackstagePage as u, PptxSmartArtNodeStyle as ui, ViewerCustomization as un, PptxSaveFormat as ur, OptionsPageId as ut, CollaborationConfig as v, ViewerOptionPrimitive as vn, PptxAfterAnimationAction as vr, PRESENTATION_OPEN_EXTENSIONS as vt, ConnectionStatus as w, WHEEL_SPOKE_COUNTS as wn, PptxAnimationTimingCurve as wr, PrintSettings as wt, CollaborationShellState as x, ViewerQuickAccessOptions as xn, PptxAnimationRepeatMode as xr, PresentationBlackout as xt, CollaborationLivePatcher as y, ViewerOptionsStore as yn, PptxAnimationDirection as yr, PasteSpecialFormat as yt, ElementUpdateOptions as z, overlayInlineTextSnapshot as zn, PptxHandoutMaster as zr, RulerUnit as zt };
16419
- //# sourceMappingURL=transition-overlay-C_wuJuse.d.ts.map
12500
+ export { PptxThemeOption as $, PptxCustomShow as A, PptxModifyVerifier as B, PptxAppProperties as C, PptxCommentMention as D, PptxCommentAuthor as E, PptxHandoutMaster as F, PptxSlideMaster as G, PptxPresentationProperties as H, PptxHeaderFooter as I, PptxTableData as J, PptxSlideTransition as K, PptxImageEffects as L, PptxElement as M, PptxElementAnimation as N, PptxCoreProperties as O, PptxEmbeddedFont as P, PptxThemeFontScheme as Q, PptxLayoutPreview as R, PptxAnimationTrigger as S, PptxComment as T, PptxSection as U, PptxNotesMaster as V, PptxSlide as W, PptxTextStyleLevels as X, PptxTagCollection as Y, PptxThemeColorScheme as Z, PptxAnimationPreset as _, PptxHandler as a, PptxSmartArtNodeStyle as at, PptxAnimationTimelineAnchor as b, SvgExportOptions as c, SmartArtLayoutType as ct, MediaPptxElement as d, XmlObject as dt, PptxTransitionType as et, OleObjectType as f, PptxThemeColorRef as ft, PptxAnimationDirection as g, PptxAfterAnimationAction as h, MergeShapeOperation as i, PptxSmartArtData as it, PptxData as j, PptxCustomProperty as k, ElementAction as l, TextSegment as lt, ParsedTableStyleMap as m, playTransitionOverlay as n, ShapeStyle as nt, PptxHandlerSaveOptions as o, SmartArtColorScheme as ot, OlePptxElement as p, PptxTableCellStyle as q, AccessibilityIssue as r, TablePptxElement as rt, PptxSaveFormat as s, SmartArtLayout as st, TransitionOverlayParams as t, PptxViewProperties as tt, MasterViewTab as u, TextStyle as ut, PptxAnimationRepeatMode as v, PptxChartData as w, PptxAnimationTimingCurve as x, PptxAnimationSequence as y, PptxModernCommentAuthor as z };
12501
+ //# sourceMappingURL=transition-overlay-CxqDHlcC.d.ts.map