pptx-vanilla-viewer 3.0.0 → 3.1.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.
@@ -11993,6 +11993,47 @@ interface CollaborationConfig {
11993
11993
  }
11994
11994
  /** A neutral CSS map (framework `CSSProperties` are structurally compatible). */
11995
11995
  type CssStyleMap = Record<string, string | number>;
11996
+ //#endregion
11997
+ //#region src/render/text-run-style.d.ts
11998
+ /** A plain CSS style map (keys are CSS properties; binding-agnostic). */
11999
+ type RunStyle = Record<string, string | number>;
12000
+ /** One script-tagged piece of a run's text, ready for a binding's nested span. */
12001
+ interface ScriptFontPiece {
12002
+ text: string;
12003
+ /**
12004
+ * CSS for a nested span wrapping `text`, or `undefined` when this piece
12005
+ * needs no span at all (its script's font equals the run's own, so plain
12006
+ * text renders identically). When present it carries the `fontFamily`
12007
+ * override plus the run's own decoration subset, repeated because
12008
+ * `text-decoration-*` does not inherit into a nested span (see
12009
+ * `nestedTextDecorationStyle`).
12010
+ */
12011
+ style?: RunStyle;
12012
+ }
12013
+ //#endregion
12014
+ //#region src/render/reflection.d.ts
12015
+ /**
12016
+ * CSS `mask-image`/`-webkit-mask-image` value plus the raw `transform` for a
12017
+ * mirrored reflection sibling. Every value is a ready-to-apply CSS string (or
12018
+ * `'none'` sentinel avoided - fields are omitted when the browser default
12019
+ * already matches), so a binding can spread this directly onto its own style
12020
+ * object with no further per-framework logic.
12021
+ */
12022
+ interface ReflectionWrapperStyle {
12023
+ position: 'absolute';
12024
+ left: string;
12025
+ /** `calc(100% + <dist>px)`: sits `@dist` px below the source element's box. */
12026
+ top: string;
12027
+ width: string;
12028
+ height: string;
12029
+ /** Mirror (`scaleY(-1)`) composed with `@sx`/`@sy`/`@kx`/`@ky`/`@rot`. */
12030
+ transform: string;
12031
+ /** Anchor point for the transform above, from `@algn` (default `center top`). */
12032
+ transformOrigin: string;
12033
+ maskImage: string;
12034
+ WebkitMaskImage: string;
12035
+ pointerEvents: 'none';
12036
+ }
11996
12037
  /**
11997
12038
  * Reference to an interactive chart sub-part, carried by the primitives that
11998
12039
  * represent data marks (bars, dots, slices, series lines). Bindings use it to
@@ -12204,11 +12245,306 @@ interface ElementAnimationState {
12204
12245
  /** Edge / centre that {@link alignElements} can snap a selection to. */
12205
12246
  type AlignEdge = 'left' | 'centerH' | 'right' | 'top' | 'middle' | 'bottom';
12206
12247
  //#endregion
12248
+ //#region src/render/element-locks.d.ts
12249
+ /** A single on-canvas gesture a lock may forbid. */
12250
+ type ElementInteraction = 'select' | 'move' | 'resize' | 'rotate' | 'textEdit' | 'group' | 'changeAspect' | 'adjustHandle' | 'editPoints' | 'changeArrowheads' | 'changeShapeType' | 'crop' | 'drilldown';
12251
+ /**
12252
+ * May `interaction` proceed on `element`?
12253
+ *
12254
+ * The single-question form of {@link resolveElementInteractivity}, for call
12255
+ * sites that gate one gesture (a drag-start handler, a rotate commit) rather
12256
+ * than rendering a whole overlay.
12257
+ */
12258
+ declare function canInteractWithElement(element: PptxElement | null | undefined, interaction: ElementInteraction): boolean;
12259
+ //#endregion
12207
12260
  //#region src/render/slide-templates/slide-template-types.d.ts
12208
12261
  /** Discriminated id for every built-in slide template. */
12209
12262
  type SlideTemplateId = 'title' | 'titleAndContent' | 'sectionHeader' | 'agenda' | 'twoContent' | 'comparison' | 'quote' | 'timeline' | 'keyMetrics' | 'titleOnly' | 'blank' | 'closing';
12210
12263
  /** The unit system used for ruler display. */
12211
12264
  type RulerUnit = 'inches' | 'centimetres';
12265
+ /** Framework-neutral picture-bullet source, sizing, and accessible fallback. */
12266
+ interface PictureBulletMarker {
12267
+ src?: string;
12268
+ sizePx: number;
12269
+ fallbackMarker: string;
12270
+ accessibleLabel: string;
12271
+ imageRelId?: string;
12272
+ }
12273
+ //#endregion
12274
+ //#region src/render/text-run-meta.d.ts
12275
+ /** A run's resolved hyperlink target. */
12276
+ interface RunHyperlink {
12277
+ /**
12278
+ * The URL to hand a click handler. For an internal `ppaction://hlinksldjump`
12279
+ * the resolved slide index is appended as a `slideIndex` query parameter, so
12280
+ * the target survives a callback whose only argument is the URL (see
12281
+ * `parsePpactionUrl`, which reads it back off).
12282
+ */
12283
+ url: string;
12284
+ /**
12285
+ * A safe, renderable `href` for a plain `<a>`, or `undefined` when the target
12286
+ * is an internal `ppaction://` action or fails the URL safety check. A
12287
+ * binding with no click handler renders the run as text in that case, which
12288
+ * is what every binding did for every link before this field existed.
12289
+ */
12290
+ href?: string;
12291
+ /** `a:hlinkClick/@tooltip`, for the anchor's `title`. */
12292
+ tooltip?: string;
12293
+ /**
12294
+ * `<a target>` for a real (non-`ppaction://`) hyperlink, from
12295
+ * `a:hlinkClick/@tgtFrame` when authored, else `_blank` (every binding's
12296
+ * pre-existing hardcoded default). Only meaningful alongside {@link href}.
12297
+ */
12298
+ target?: string;
12299
+ /** `<a rel>` paired with {@link target} (see `resolveHyperlinkTargetAttrs`). */
12300
+ rel?: string;
12301
+ /** Resolved target slide for an internal slide jump. */
12302
+ targetSlideIndex?: number;
12303
+ /**
12304
+ * True when the target came from `a:hlinkMouseOver` rather than
12305
+ * `a:hlinkClick`: PowerPoint follows it on hover, not on click, so a binding
12306
+ * that renders a plain anchor should not make it look clickable.
12307
+ */
12308
+ onHover?: boolean;
12309
+ }
12310
+ /** An inline equation run (`m:oMath`), rendered as MathML rather than text. */
12311
+ interface RunEquation {
12312
+ /** The raw OMML node, for `convertOmmlToMathMl`. */
12313
+ xml: Record<string, unknown>;
12314
+ /** Display number for a numbered equation, without its parentheses. */
12315
+ number?: string;
12316
+ }
12317
+ //#endregion
12318
+ //#region src/render/text-run-ruby.d.ts
12319
+ /** A run's phonetic guide, ready to render as `<rt>` above the base text. */
12320
+ interface RunRuby {
12321
+ /** The annotation itself (`a:ruby/a:rt`), e.g. the furigana reading. */
12322
+ text: string;
12323
+ /** Inline style for the `<rt>` element (size, family, alignment, colour). */
12324
+ style: RunStyle;
12325
+ }
12326
+ //#endregion
12327
+ //#region src/render/text-tab-run-build.d.ts
12328
+ /** One tabbed-line piece, ready to spread onto a binding's own span element. */
12329
+ interface TabbedRunPiece {
12330
+ text: string;
12331
+ /**
12332
+ * CSS for the span that wraps `text`: inline-block layout, this run's own
12333
+ * decoration repeated, and this piece's own PowerPoint advance-width
12334
+ * correction as `letter-spacing` (see `buildTabbedLine`). The piece is
12335
+ * nested inside the run's own span, and neither property inherits the way a
12336
+ * caller would want: `text-decoration-*` does not inherit into a nested
12337
+ * element at all (an ancestor's underline is drawn *through* its
12338
+ * descendants, but each descendant still computes `none` of its own), so a
12339
+ * caller passes the run's decoration subset (`nestedTextDecorationStyle`) to
12340
+ * have it repeated here; `letter-spacing` DOES inherit, which is exactly why
12341
+ * this piece sets it explicitly rather than only when non-zero - the run's
12342
+ * container span carries its own (wrong, whole-text) correction that would
12343
+ * otherwise leak in.
12344
+ */
12345
+ style: RunStyle;
12346
+ /** CSS for the leader-fill span preceding this piece, or `undefined` when there is no gap to fill. */
12347
+ leaderStyle?: RunStyle;
12348
+ /** Leader glyphs sized to fill `leaderStyle`'s width. Present only alongside `leaderStyle`. */
12349
+ leaderText?: string;
12350
+ /**
12351
+ * `a:rPr/@u="words"` per-word/gap sub-pieces of THIS tab piece's own text
12352
+ * (see `splitWordsForUnderline`), present only when the run's underline is
12353
+ * `words`. A tab-separated piece is otherwise rendered as a single span
12354
+ * (`text` + `style`), which underlines it continuously - correct for a
12355
+ * one-word piece, but wrong for a piece like `"Hello World"` between two tab
12356
+ * stops, which needs a gap under the space. A binding renders one SIBLING
12357
+ * span per entry IN PLACE OF the piece's single `text` span: each entry's
12358
+ * `style` is the piece's own `style` (the same inline-block layout and
12359
+ * advance-width correction, so the line measures exactly as before), with
12360
+ * the underline stripped on a gap entry. They must be siblings, not spans
12361
+ * nested inside the piece span: an ancestor's underline is drawn through
12362
+ * every inline descendant, so a nested gap could not lose it. `text`/`style`
12363
+ * stay the continuous-underline fallback for a binding that does not
12364
+ * render this field.
12365
+ */
12366
+ words?: Array<{
12367
+ text: string;
12368
+ style: RunStyle;
12369
+ }>;
12370
+ }
12371
+ /** One `\n`-split line of a run's tabbed text. */
12372
+ interface TabbedLineRun {
12373
+ pieces: TabbedRunPiece[];
12374
+ }
12375
+ //#endregion
12376
+ //#region src/render/paragraph-types.d.ts
12377
+ /** A single rendered run within a paragraph. */
12378
+ interface ParagraphRun {
12379
+ text: string;
12380
+ style: RunStyle;
12381
+ /**
12382
+ * The run's hyperlink (`a:hlinkClick` / `a:hlinkMouseOver`), when it has one.
12383
+ * A binding renders the run inside an `<a href>` when {@link RunHyperlink.href}
12384
+ * is set, and routes {@link RunHyperlink.url} to its click handler otherwise
12385
+ * (internal `ppaction://` slide jumps).
12386
+ */
12387
+ hyperlink?: RunHyperlink;
12388
+ /**
12389
+ * An inline equation (`m:oMath`) this run renders INSTEAD of `text`, which is
12390
+ * empty for it. Emitted in the run sequence so the maths lands at its
12391
+ * authored position between the runs around it.
12392
+ */
12393
+ equation?: RunEquation;
12394
+ /**
12395
+ * The run's phonetic guide (`a:ruby`: furigana, pinyin, bopomofo), when it
12396
+ * has one. A binding renders `<ruby>{text}<rt style>{ruby.text}</rt></ruby>`;
12397
+ * a run carrying one is never split per word, so the annotation appears once
12398
+ * over the whole base run.
12399
+ *
12400
+ * Core parsed and saved ruby from the start, but `buildParagraphs` never read
12401
+ * it, so the annotation rendered in React alone.
12402
+ */
12403
+ ruby?: RunRuby;
12404
+ /**
12405
+ * Index of the `textSegments` entry (of the override list when one was
12406
+ * supplied) this run was built from.
12407
+ *
12408
+ * Shared splits one authored run into several per-word runs for PowerPoint's
12409
+ * metric tracking, so this is many-to-one. It is the seam a binding uses to
12410
+ * reach the facts the neutral model does not carry - React's find-match
12411
+ * highlights, per-script font spans, tab stops and ruby all key off the
12412
+ * originating segment - without regrouping the segments itself and drifting
12413
+ * from the grouping here.
12414
+ */
12415
+ segmentIndex?: number;
12416
+ /**
12417
+ * Offset of this run's `text` within its segment's RENDERED text (after field
12418
+ * substitution), so a caller holding per-segment character offsets can map
12419
+ * them onto the split runs.
12420
+ */
12421
+ charStart?: number;
12422
+ /**
12423
+ * Per-script (`a:ea`/`a:cs`/`a:sym`) font-fallback pieces for this run's
12424
+ * text, when a script it contains needs a font distinct from its own. A
12425
+ * binding renders these as nested spans in place of `text` (see
12426
+ * `text-script-fonts.ts`); absent for the common single-font case.
12427
+ */
12428
+ scriptRuns?: ScriptFontPiece[];
12429
+ /**
12430
+ * Measured tab-stop layout for this run's text, present when it contains an
12431
+ * authored `\t` and the paragraph declares explicit tab stops. A binding
12432
+ * renders these lines/pieces in place of `text`, honouring per-stop
12433
+ * alignment and leader glyphs a plain CSS `tab-size` cannot express (see
12434
+ * `text-tab-run-build.ts`). Absent for the common no-tab case.
12435
+ */
12436
+ tabLines?: TabbedLineRun[];
12437
+ /**
12438
+ * `a:rPr/@u="words"` word/gap pieces of a RUBY run's base text, present only
12439
+ * when such a run's underline is `words` (the ordinary per-word split emits
12440
+ * sibling runs instead; a tab piece carries its own `words`). Same shape as
12441
+ * `scriptRuns` and rendered the same way, in place of `text`: a word entry
12442
+ * carries the decoration for its own span, a gap entry is bare text. The
12443
+ * run's own `style` has the underline stripped when this is set (see
12444
+ * `paragraph-run-build.ts`).
12445
+ */
12446
+ underlineWordPieces?: ScriptFontPiece[];
12447
+ /**
12448
+ * `a:reflection` mirrored-sibling wrapper style for this run (the text-run
12449
+ * counterpart of a shape/picture's `ComputedEffectStyle.reflection`), or
12450
+ * `undefined` for the common no-reflection case. A binding renders a sibling
12451
+ * node just below the run's own, painted with the same text, positioned and
12452
+ * masked by this style - see `render/reflection.ts`'s
12453
+ * `getTextReflectionWrapperStyle`.
12454
+ */
12455
+ reflection?: ReflectionWrapperStyle;
12456
+ }
12457
+ /** A rendered paragraph: runs plus resolved bullet + hanging-indent metadata. */
12458
+ interface RenderParagraph {
12459
+ runs: ParagraphRun[];
12460
+ /** Bullet glyph / number to render before the runs (or `undefined`). */
12461
+ bulletMarker?: string;
12462
+ /** Picture marker rendered before runs, or fallback metadata when unresolved. */
12463
+ bulletPicture?: PictureBulletMarker;
12464
+ /** Inline style for the bullet marker (font / size / colour). */
12465
+ bulletStyle: RunStyle;
12466
+ /** `margin-left` in px for the whole paragraph (hanging-indent layout). */
12467
+ marginLeftPx?: number;
12468
+ /** `text-indent` in px (first-line / hanging indent). */
12469
+ textIndentPx?: number;
12470
+ /**
12471
+ * Per-paragraph `line-height` from this paragraph's own `a:pPr > a:lnSpc`.
12472
+ * A unitless multiplier for proportional spacing (`a:spcPct`) or a `"<n>pt"`
12473
+ * string for exact spacing (`a:spcPts`). Undefined when the paragraph does
12474
+ * not override spacing (binding keeps the body-level line-height).
12475
+ */
12476
+ lineHeight?: number | string;
12477
+ /** `margin-top` in px from this paragraph's `a:pPr > a:spcBef` (space before). */
12478
+ spaceBeforePx?: number;
12479
+ /** `margin-bottom` in px from this paragraph's `a:pPr > a:spcAft` (space after). */
12480
+ spaceAfterPx?: number;
12481
+ /**
12482
+ * `font-size` in px to set on the paragraph element so its CSS line boxes
12483
+ * are built from its OWN runs rather than the text body's default size.
12484
+ * Undefined when the paragraph already matches the body default.
12485
+ *
12486
+ * See `resolveParagraphStrutFontSize` for why this is needed: without it a
12487
+ * paragraph of small runs inside a larger-defaulting body is laid out on
12488
+ * too-tall lines and overflows its shape.
12489
+ */
12490
+ strutFontSizePx?: number;
12491
+ /**
12492
+ * True when the paragraph has no runs and no bullet: an authored blank line
12493
+ * (`<a:p><a:endParaRPr/></a:p>`).
12494
+ *
12495
+ * PowerPoint gives such a paragraph a full line box, which is how decks
12496
+ * space a heading away from the bullet list under it. A binding must render
12497
+ * something with height for it (a `<br>`), or the gap disappears and the
12498
+ * block reads as one dense run of text (issue #131, slides 13-14).
12499
+ */
12500
+ isEmpty?: boolean;
12501
+ /**
12502
+ * Indices of this paragraph's segments in the rendered segment list (the
12503
+ * override list when one was supplied), in authored order and INCLUDING the
12504
+ * bullet-marker segment the runs drop.
12505
+ *
12506
+ * The seam a binding uses to reach paragraph facts the neutral model does not
12507
+ * carry, without regrouping the segments itself and drifting from the
12508
+ * grouping here - which is exactly how React ended up splitting on every
12509
+ * `"\n"` and treating a soft `a:br` as a paragraph break.
12510
+ */
12511
+ segmentIndices: number[];
12512
+ /**
12513
+ * True when this paragraph resolves right-to-left (`a:pPr/@rtl`, or the text
12514
+ * body's default). A binding that mirrors its hanging indent for RTL reads
12515
+ * this; the direction itself is already in {@link paragraphStyle}.
12516
+ */
12517
+ rtl?: boolean;
12518
+ /**
12519
+ * Extra CSS for the paragraph box, beyond the margin / indent / spacing
12520
+ * fields above: this paragraph's own `text-align` (`a:pPr/@algn`), its BiDi
12521
+ * `direction`, and the kinsoku line-breaking rules (`@eaLnBrk`,
12522
+ * `@latinLnBrk`, `@hangingPunct`). Absent when the paragraph overrides none
12523
+ * of them, which is the common case.
12524
+ *
12525
+ * All three used to be resolved in React's private paragraph renderer only,
12526
+ * so a deck that centred one paragraph of a left-aligned body, or set CJK
12527
+ * break rules, rendered differently in the other four bindings.
12528
+ */
12529
+ paragraphStyle?: RunStyle;
12530
+ }
12531
+ //#endregion
12532
+ //#region src/render/inline-list-types.d.ts
12533
+ /** Current editor payload. Missing segments explicitly denotes plain-text fallback. */
12534
+ interface InlineTextEditSnapshot {
12535
+ elementId: string;
12536
+ text: string;
12537
+ textSegments?: TextSegment[];
12538
+ }
12539
+ type InlineListReadResult = {
12540
+ kind: 'supported';
12541
+ snapshot: InlineTextEditSnapshot;
12542
+ paragraphs: RenderParagraph[];
12543
+ } | {
12544
+ kind: 'unsupported';
12545
+ reason: string;
12546
+ text: string;
12547
+ };
12212
12548
  //#endregion
12213
12549
  //#region src/render/inline-selection-utils.d.ts
12214
12550
  /** Describes which segments (and offsets within them) are selected. */
@@ -12257,6 +12593,217 @@ type TextAdvancedChanges = Partial<Pick<TextStyle, 'characterSpacing' | 'lineSpa
12257
12593
  //#endregion
12258
12594
  //#region src/render/text-case-transform.d.ts
12259
12595
  type ChangeCaseMode = 'sentence' | 'lower' | 'upper' | 'capitalize' | 'toggle';
12596
+ interface CollaborationShellState {
12597
+ canEdit: boolean;
12598
+ status: ConnectionStatus;
12599
+ remoteUsers: readonly SanitizedPresence[];
12600
+ connectedCount: number;
12601
+ }
12602
+ type CollaborationShellTranslate = (key: string, params?: Record<string, string | number>) => string;
12603
+ /**
12604
+ * One-line, localised status for a custom shell's `role="status"` readout.
12605
+ *
12606
+ * Every binding's custom-shell demo renders this same string under the same
12607
+ * `Collaboration status` label, so the framework-neutral e2e helper that
12608
+ * waits for the shell to become editable (`waitForHostEditing`) reads every
12609
+ * binding the same way. Three of five demos once phrased it differently and
12610
+ * the helper silently skipped them; on vanilla, that let a peer double-click
12611
+ * before its edit gate opened.
12612
+ */
12613
+ declare function describeCollaborationShellState(state: Pick<CollaborationShellState, 'canEdit' | 'status' | 'connectedCount'>, translate: CollaborationShellTranslate): string;
12614
+ //#endregion
12615
+ //#region src/render/collaboration-text-codec.d.ts
12616
+ /**
12617
+ * collaboration-text-codec.ts: TextSegment[] <-> Y.Text delta codec used by the
12618
+ * collaboration sync layer. Split out of collaboration-sync.ts to keep both
12619
+ * modules focused.
12620
+ *
12621
+ * Exports:
12622
+ * - DeltaOp / YTextLike: structural Yjs text interfaces (no yjs import)
12623
+ * - encodeTextBody: write TextSegment[] into a live YTextLike
12624
+ * - encodeSegmentsToDelta: pure simulation of the delta Y.Text would produce
12625
+ * - decodeDelta / decodeTextBody: delta -> TextSegment[]
12626
+ * - isYTextLike: runtime guard
12627
+ */
12628
+ interface DeltaOp {
12629
+ insert?: unknown;
12630
+ attributes?: Record<string, unknown>;
12631
+ }
12632
+ interface YTextLike {
12633
+ insert: (index: number, text: string, attrs?: Record<string, string>) => void;
12634
+ toDelta: () => DeltaOp[];
12635
+ toString: () => string;
12636
+ }
12637
+ //#endregion
12638
+ //#region src/render/collaboration-text-merge.d.ts
12639
+ /** Y.Text surface needed for in-place edits (delete/format on top of insert). */
12640
+ interface YTextEditableLike extends YTextLike {
12641
+ delete: (index: number, length: number) => void;
12642
+ format: (index: number, length: number, attributes: Record<string, string | null>) => void;
12643
+ }
12644
+ //#endregion
12645
+ //#region src/render/collaboration-text-positions.d.ts
12646
+ interface TextPositionCell {
12647
+ index: number;
12648
+ left?: TextPositionCell;
12649
+ right?: TextPositionCell;
12650
+ }
12651
+ interface TrackedTextPosition {
12652
+ /** Internal identity, shared by snapshots that observed the same character. */
12653
+ readonly cell: TextPositionCell;
12654
+ readonly association: number;
12655
+ }
12656
+ //#endregion
12657
+ //#region src/render/collaboration-text-session-delta.d.ts
12658
+ /** Browser edit range mapped to the editor's pre-input encoded coordinates. */
12659
+ interface LocalTextReplacement {
12660
+ from: number;
12661
+ to: number;
12662
+ }
12663
+ /** Desired UTF-16 units mapped to the editor's previously observed identities. */
12664
+ interface TextSessionCorrespondence {
12665
+ readonly retainedIndices: readonly (number | null)[];
12666
+ /** Old carriers for known paragraph attributes, independently of character identity. */
12667
+ readonly paragraphSources?: readonly (number | null)[];
12668
+ }
12669
+ type LocalTextEdit = LocalTextReplacement | TextSessionCorrespondence;
12670
+ //#endregion
12671
+ //#region src/render/collaboration-text-session.d.ts
12672
+ /** Supplied by the binding's existing Yjs runtime, bound to this exact Y.Text. */
12673
+ interface TextSessionPositions<Position> {
12674
+ capture: (index: number, association: number) => Position;
12675
+ resolve: (position: Position) => number | null;
12676
+ /** Synchronize tracked positions once per batch, including in-transaction writes. */
12677
+ refresh?: () => boolean | void;
12678
+ /** Release only resources created for this session. */
12679
+ dispose?: () => void;
12680
+ }
12681
+ /** Opaque acknowledgement identity for an exact remote snapshot painted by an adapter. */
12682
+ interface CollaborationTextSnapshot {
12683
+ readonly delta: readonly DeltaOp[];
12684
+ }
12685
+ interface CollaborationTextSession {
12686
+ applyLocalDelta: (delta: readonly DeltaOp[], edit?: LocalTextEdit) => boolean;
12687
+ readMerged: () => CollaborationTextSnapshot | undefined;
12688
+ adoptMerged: (snapshot: CollaborationTextSnapshot) => boolean;
12689
+ /** Capture an offset in the last painted/local draft, not the newer remote string. */
12690
+ bookmark: (index: number, association: number) => () => number | null;
12691
+ dispose: () => void;
12692
+ }
12693
+ //#endregion
12694
+ //#region src/render/collaboration-sync.d.ts
12695
+ interface YMapLike {
12696
+ get: (key: string) => unknown;
12697
+ set: (key: string, value: unknown) => void;
12698
+ delete: (key: string) => void;
12699
+ forEach: (cb: (value: unknown, key: string) => void) => void;
12700
+ }
12701
+ /** Shape of the Yjs transaction passed to (deep) observers. */
12702
+ interface YTransactionLike {
12703
+ origin?: unknown;
12704
+ }
12705
+ type YDeepObserver = (events?: unknown, transaction?: YTransactionLike) => void;
12706
+ interface YArrayLike {
12707
+ readonly length: number;
12708
+ get: (index: number) => unknown;
12709
+ push: (items: unknown[]) => void;
12710
+ delete: (index: number, length?: number) => void;
12711
+ insert: (index: number, items: unknown[]) => void;
12712
+ toArray: () => unknown[];
12713
+ observe: (handler: () => void) => void;
12714
+ unobserve: (handler: () => void) => void;
12715
+ observeDeep: (handler: YDeepObserver) => void;
12716
+ unobserveDeep: (handler: YDeepObserver) => void;
12717
+ }
12718
+ interface YDocLike {
12719
+ getMap: (name: string) => YMapLike;
12720
+ getArray: (name: string) => YArrayLike;
12721
+ transact: (fn: () => void, origin?: unknown) => void;
12722
+ }
12723
+ interface YjsFactories {
12724
+ createMap: () => YMapLike;
12725
+ createArray: () => YArrayLike;
12726
+ createText: () => YTextLike;
12727
+ /** Track character identities using the binding's existing Yjs runtime. */
12728
+ createTextPositions?: (text: YTextEditableLike) => TextSessionPositions<TrackedTextPosition>;
12729
+ }
12730
+ //#endregion
12731
+ //#region src/render/collaboration-live-patch-target.d.ts
12732
+ /** Interim geometry for an element mid-gesture. All fields optional. */
12733
+ interface LiveGeometryPatch {
12734
+ x?: number;
12735
+ y?: number;
12736
+ width?: number;
12737
+ height?: number;
12738
+ rotation?: number;
12739
+ }
12740
+ /** The element's pre-edit rich text, used to remap the interim plain text. */
12741
+ interface LiveTextSource {
12742
+ textSegments?: TextSegment[];
12743
+ textStyle?: TextStyle;
12744
+ }
12745
+ //#endregion
12746
+ //#region src/render/collaboration-text-target.d.ts
12747
+ interface CollaborationInlineSnapshot extends CollaborationTextSnapshot {
12748
+ readonly inline: InlineTextEditSnapshot;
12749
+ }
12750
+ /** A mounted editor owns this handle, never the document or its provider. */
12751
+ interface CollaborationTextTarget extends CollaborationTextSession {
12752
+ readMerged: () => CollaborationInlineSnapshot | undefined;
12753
+ /** A bookmark follows character identity rather than a mutable numeric offset. */
12754
+ bookmark: (index: number, association: number) => () => number | null;
12755
+ }
12756
+ interface CollaborationLivePatcher {
12757
+ /** Bind a mounted native editor; its handle must be disposed on unmount. */
12758
+ beginTextEdit?: (slideId: string | undefined, elementId: string, onChange?: () => void, ownsModel?: (element: PptxElement) => boolean) => CollaborationTextTarget | undefined;
12759
+ /** Attach a live doc (or `null` to go dormant). Pending patches are dropped. */
12760
+ configure: (doc: YDocLike | null, factories: YjsFactories | null,
12761
+ /** Publish synchronously when the host may revoke write readiness at any time. */
12762
+ immediate?: boolean) => void;
12763
+ /** True when a doc + factories are attached, i.e. patches will be written. */
12764
+ isActive: () => boolean;
12765
+ /** Queue interim geometry for an element. */
12766
+ patchGeometry: (slideId: string | undefined, elementId: string, geometry: LiveGeometryPatch) => void;
12767
+ /** Queue interim text for an element (remapped over `source`'s segments). */
12768
+ patchText: (slideId: string | undefined, elementId: string, text: string, source?: LiveTextSource) => void;
12769
+ /** Write everything queued right now (call on gesture end / edit commit). */
12770
+ flush: () => void;
12771
+ /** Drop pending work, cancel timers and detach the doc. */
12772
+ dispose: () => void;
12773
+ }
12774
+ //#endregion
12775
+ //#region src/render/collaboration-load-origin.d.ts
12776
+ /**
12777
+ * Who asked for the deck that just finished loading, and what that means for a
12778
+ * room that already holds slides.
12779
+ *
12780
+ * Every binding brackets its content-load with an adoption check: when a load
12781
+ * lands while a collaboration session is up and the shared doc already has
12782
+ * slides, the ROOM wins and the freshly parsed deck is thrown away. That rule
12783
+ * exists for one case only - a late joiner whose bootstrap deck (the blank or
12784
+ * sample deck the host mounted the viewer with) finishes parsing after the
12785
+ * room's real slides arrived, which would otherwise clobber them with nothing
12786
+ * left to repair it, since the doc itself never changed.
12787
+ *
12788
+ * Applied to EVERY load it also swallows the deck a user deliberately opens
12789
+ * during a session. Joining a room and then opening a file left the viewer on
12790
+ * the room's blank starter deck: the file parsed, was committed, and was
12791
+ * immediately overwritten (reproduced in the vanilla demo - a 7-slide deck
12792
+ * opened in a room settled back to the room's 1 slide, and the bigger the file
12793
+ * the longer the window). Opening a file is an act of authorship, so it is
12794
+ * published to the room instead.
12795
+ *
12796
+ * @module render/collaboration-load-origin
12797
+ */
12798
+ /**
12799
+ * Why a content load ran.
12800
+ *
12801
+ * - `bootstrap`: the deck the host handed the viewer at mount (`source`), or a
12802
+ * session restore. Nobody chose it during the session.
12803
+ * - `user`: opened during the session - File > Open, a recent file, a dropped
12804
+ * file, or a host calling the load API.
12805
+ */
12806
+ type CollabLoadOrigin = 'bootstrap' | 'user';
12260
12807
  //#endregion
12261
12808
  //#region src/render/slide-transition-types.d.ts
12262
12809
  /** Resolved CSS `animation` shorthands for the two transition layers. */
@@ -12855,6 +13402,19 @@ interface PrintSettings {
12855
13402
  scaleToFit?: boolean;
12856
13403
  }
12857
13404
  //#endregion
13405
+ //#region src/render/inline-text-commit.d.ts
13406
+ /**
13407
+ * Reconcile a committed plain-text edit with an element's existing rich runs.
13408
+ *
13409
+ * Editor surfaces expose plain text, but the model still owns per-run styles,
13410
+ * bullets, fields and paragraph properties. An unchanged blur is not an edit;
13411
+ * a changed value is remapped onto the authored segments instead of flattening
13412
+ * them.
13413
+ */
13414
+ declare function buildInlineTextCommitPatch(element: PptxElement | undefined, text: string, snapshot?: InlineTextEditSnapshot): Partial<PptxElement> | undefined;
13415
+ /** Overlay a current rich list draft for serialization, without committing editor state. */
13416
+ declare function overlayInlineTextSnapshot(elements: readonly PptxElement[], snapshot?: InlineTextEditSnapshot, text?: string | undefined): readonly PptxElement[];
13417
+ //#endregion
12858
13418
  //#region src/render/slide-size-rescale.d.ts
12859
13419
  type SlideSizeRescaleMode = 'maximize' | 'ensureFit';
12860
13420
  type ReadOnlyRecommendationKind = 'modifyVerifier' | 'markedFinal' | null;
@@ -12985,5 +13545,5 @@ interface TransitionOverlayParams {
12985
13545
  */
12986
13546
  declare function playTransitionOverlay(params: TransitionOverlayParams): () => void;
12987
13547
  //#endregion
12988
- export { RulerUnit as $, ShapeStyle as $n, PptxHandler as $t, INSTANT as A, PptxImageEffects as An, loadPresentationDeck as At, PPTX_OPEN_ACCEPT as B, PptxSmartArtData as Bn, resolveWheelSpokeCount as Bt, ElementUpdateOptions as C, PptxCustomShow as Cn, forgetSessionDeck as Ct, FieldSubstitutionContext as D, PptxEmbeddedFont as Dn, getSlideTransitionAnimations as Dt, ExternalCollaborationSnapshot as E, PptxElementAnimation as En, getSessionTabId as Et, MobileSheetKey as F, PptxPresentationProperties as Fn, resolveDirection as Ft, PresentationSnapshot as G, PptxTextStyleLevels as Gn, ViewerThemeColors as Gt, PowerPointViewerAPI as H, PptxTableCellStyle as Hn, savedPresentationFileName as Ht, ModifyPasswordCheckResult as I, PptxSection as In, resolveDirection8 as It, ReadOnlyRecommendation as J, PptxThemeColorScheme as Jn, defaultThemeColors as Jt, PrintSettings as K, PptxTheme as Kn, defaultCssVars as Kt, P14_TRANSITION_KEYFRAMES as L, PptxSlide as Ln, resolveOrientation as Lt, InsertChartKind as M, PptxModernCommentAuthor as Mn, parsePresentationSessionId as Mt, MasterViewCrudAction as N, PptxModifyVerifier as Nn, presentationBaseName as Nt, GradientState as O, PptxHandoutMaster as On, isLegacyBinaryPresentation as Ot, MasterViewCrudActionId as P, PptxNotesMaster as Pn, rememberSessionDeck as Pt, RibbonTransitionDraft as Q, PptxViewProperties as Qn, AccessibilityIssue as Qt, P14_TRANSITION_KEYFRAMES_2 as R, PptxSlideMaster as Rn, resolveSlideTransition as Rt, ElementUpdate as S, PptxCustomProperty as Sn, createImageElementFromFile as St, ExternalCollaborationSession as T, PptxElement as Tn, getP14TransitionAnimations as Tt, PresentationBlackout as U, PptxTableData as Un, ThemeCatalogEntry as Ut, PRESENTATION_OPEN_EXTENSIONS as V, PptxSmartArtNodeStyle as Vn, restoreSessionDeck as Vt, PresentationPointerTool as W, PptxTagCollection as Wn, ViewerTheme as Wt, ResolvedDirection as X, PptxThemeOption as Xn, vermilionDarkTheme as Xt, RemoteCursor as Y, PptxThemeFontScheme as Yn, themeToCssVars as Yt, ResolvedDirection8 as Z, PptxTransitionType as Zn, vermilionLightTheme as Zt, DEFAULT_MORPH_DURATION_MS as _, PptxChartData as _n, ViewerMode as _t, AnimationGroup as a, OleObjectType as an, TextStyle as ar, SessionDeck as at, ElementAnimationState as b, PptxCommentMention as bn, ViewportFitPadding as bt, CanvasSize as c, PptxAfterAnimationAction as cn, SlideSizeEmu as ct, CollaborationConfig as d, PptxAnimationRepeatMode as dn, SlideTransitionAnimations as dt, PptxSaveFormat as en, SmartArtColorScheme as er, RunProgramNotice as et, CollaborationRole as f, PptxAnimationSequence as fn, StrokeToInkElementOpts as ft, CssStyleMap as g, PptxAppProperties as gn, ViewerFontSource as gt, ConnectionStatus as h, PptxAnimationTrigger as hn, ToolbarActionId as ht, AlignEdge as i, MediaPptxElement as in, TextSegment as ir, SavedPresentationFormat as it, InlineTextSelection as j, PptxLayoutPreview as jn, loadSessionDeck as jt, Guide as k, PptxHeaderFooter as kn, isSupportedPresentationFile as kt, ChangeCaseMode as l, PptxAnimationDirection as ln, SlideSizeRescaleMode as lt, CompatibilityWarningToast as m, PptxAnimationTimingCurve as mn, TextAdvancedChanges as mt, playTransitionOverlay as n, ElementAction as nn, SmartArtLayoutType as nr, SLIDE_TRANSITION_KEYFRAMES_CSS as nt, AutosaveRecord as o, OlePptxElement as on, XmlObject as or, ShapePresetType as ot, CollaborationTransport as p, PptxAnimationTimelineAnchor as pn, TRANSITION_SPEED_DURATION_MS as pt, RANDOM_ELIGIBLE_TYPES as q, PptxThemeColorRef as qn, defaultRadius as qt, AccountAuthConfig as r, MasterViewTab as rn, TablePptxElement as rr, SanitizedPresence as rt, CINEMATIC_TRANSITION_KEYFRAMES as s, ParsedTableStyleMap as sn, ShareDefaults as st, TransitionOverlayParams as t, SvgExportOptions as tn, SmartArtLayout as tr, SLIDE_TRANSITION_KEYFRAMES as tt, ChartPartRef as u, PptxAnimationPreset as un, SlideTemplateId as ut, DEFAULT_TRANSITION_DURATION_MS as v, PptxComment as vn, ViewerQuickAccessOptions as vt, ExternalCollaborationAwareness as w, PptxData as wn, getCinematicTransitionAnimations as wt, ElementClipboardPayload as x, PptxCoreProperties as xn, WHEEL_SPOKE_COUNTS as xt, EASE as y, PptxCommentAuthor as yn, ViewportFitOptions as yt, P14_TRANSITION_KEYFRAMES_ALL as z, PptxSlideTransition as zn, resolveTransitionDurationMs as zt };
12989
- //# sourceMappingURL=transition-overlay-CcDuw_PK.d.ts.map
13548
+ export { ReadOnlyRecommendation as $, PptxTableCellStyle as $n, ViewerTheme as $t, FieldSubstitutionContext as A, PptxCommentMention as An, describeCollaborationShellState as At, MobileSheetKey as B, PptxHeaderFooter as Bn, overlayInlineTextSnapshot as Bt, ElementAnimationState as C, PptxAnimationTimelineAnchor as Cn, ViewerQuickAccessOptions as Ct, ExternalCollaborationAwareness as D, PptxChartData as Dn, buildInlineTextCommitPatch as Dt, ElementUpdateOptions as E, PptxAppProperties as En, WHEEL_SPOKE_COUNTS as Et, InlineTextEditSnapshot as F, PptxData as Fn, getSlideTransitionAnimations as Ft, PPTX_OPEN_ACCEPT as G, PptxNotesMaster as Gn, resolveDirection8 as Gt, P14_TRANSITION_KEYFRAMES as H, PptxLayoutPreview as Hn, presentationBaseName as Ht, InlineTextSelection as I, PptxElement as In, isLegacyBinaryPresentation as It, PresentationBlackout as J, PptxSlide as Jn, resolveTransitionDurationMs as Jt, PRESENTATION_OPEN_EXTENSIONS as K, PptxPresentationProperties as Kn, resolveOrientation as Kt, InsertChartKind as L, PptxElementAnimation as Ln, isSupportedPresentationFile as Lt, Guide as M, PptxCoreProperties as Mn, getCinematicTransitionAnimations as Mt, INSTANT as N, PptxCustomProperty as Nn, getP14TransitionAnimations as Nt, ExternalCollaborationSession as O, PptxComment as On, canInteractWithElement as Ot, InlineListReadResult as P, PptxCustomShow as Pn, getSessionTabId as Pt, RANDOM_ELIGIBLE_TYPES as Q, PptxSmartArtNodeStyle as Qn, ThemeCatalogEntry as Qt, MasterViewCrudAction as R, PptxEmbeddedFont as Rn, loadPresentationDeck as Rt, EASE as S, PptxAnimationSequence as Sn, ViewerMode as St, ElementUpdate as T, PptxAnimationTrigger as Tn, ViewportFitPadding as Tt, P14_TRANSITION_KEYFRAMES_2 as U, PptxModernCommentAuthor as Un, rememberSessionDeck as Ut, ModifyPasswordCheckResult as V, PptxImageEffects as Vn, parsePresentationSessionId as Vt, P14_TRANSITION_KEYFRAMES_ALL as W, PptxModifyVerifier as Wn, resolveDirection as Wt, PresentationSnapshot as X, PptxSlideTransition as Xn, restoreSessionDeck as Xt, PresentationPointerTool as Y, PptxSlideMaster as Yn, resolveWheelSpokeCount as Yt, PrintSettings as Z, PptxSmartArtData as Zn, savedPresentationFileName as Zt, CompatibilityWarningToast as _, ParsedTableStyleMap as _n, XmlObject as _r, StrokeToInkElementOpts as _t, AnimationGroup as a, vermilionDarkTheme as an, PptxThemeColorScheme as ar, RunProgramNotice as at, DEFAULT_MORPH_DURATION_MS as b, PptxAnimationPreset as bn, ToolbarActionId as bt, CanvasSize as c, PptxHandler as cn, PptxTransitionType as cr, SanitizedPresence as ct, CollabLoadOrigin as d, SvgExportOptions as dn, SmartArtColorScheme as dr, ShapePresetType as dt, ViewerThemeColors as en, PptxTableData as er, RemoteCursor as et, CollaborationConfig as f, ElementAction as fn, SmartArtLayout as fr, ShareDefaults as ft, CollaborationTransport as g, OlePptxElement as gn, TextStyle as gr, SlideTransitionAnimations as gt, CollaborationShellState as h, OleObjectType as hn, TextSegment as hr, SlideTemplateId as ht, AlignEdge as i, themeToCssVars as in, PptxThemeColorRef as ir, RulerUnit as it, GradientState as j, PptxCompatibilityWarning as jn, forgetSessionDeck as jt, ExternalCollaborationSnapshot as k, PptxCommentAuthor as kn, createImageElementFromFile as kt, ChangeCaseMode as l, PptxHandlerSaveOptions as ln, PptxViewProperties as lr, SavedPresentationFormat as lt, CollaborationRole as m, MediaPptxElement as mn, TablePptxElement as mr, SlideSizeRescaleMode as mt, playTransitionOverlay as n, defaultRadius as nn, PptxTextStyleLevels as nr, ResolvedDirection8 as nt, AutosaveRecord as o, vermilionLightTheme as on, PptxThemeFontScheme as or, SLIDE_TRANSITION_KEYFRAMES as ot, CollaborationLivePatcher as p, MasterViewTab as pn, SmartArtLayoutType as pr, SlideSizeEmu as pt, PowerPointViewerAPI as q, PptxSection as qn, resolveSlideTransition as qt, AccountAuthConfig as r, defaultThemeColors as rn, PptxTheme as rr, RibbonTransitionDraft as rt, CINEMATIC_TRANSITION_KEYFRAMES as s, AccessibilityIssue as sn, PptxThemeOption as sr, SLIDE_TRANSITION_KEYFRAMES_CSS as st, TransitionOverlayParams as t, defaultCssVars as tn, PptxTagCollection as tr, ResolvedDirection as tt, ChartPartRef as u, PptxSaveFormat as un, ShapeStyle as ur, SessionDeck as ut, ConnectionStatus as v, PptxAfterAnimationAction as vn, TRANSITION_SPEED_DURATION_MS as vt, ElementClipboardPayload as w, PptxAnimationTimingCurve as wn, ViewportFitOptions as wt, DEFAULT_TRANSITION_DURATION_MS as x, PptxAnimationRepeatMode as xn, ViewerFontSource as xt, CssStyleMap as y, PptxAnimationDirection as yn, TextAdvancedChanges as yt, MasterViewCrudActionId as z, PptxHandoutMaster as zn, loadSessionDeck as zt };
13549
+ //# sourceMappingURL=transition-overlay-DAd59XX1.d.ts.map