@pptx-editor.dev/pro

v0.3.1 · 4 published subpaths with full TypeScript signatures and JSDoc.

Subpaths

Package root

@pptx-editor.dev/pro: review and realtime collaboration, as EditorModules.

Registering a module is the whole enablement story, as in DOCX Editor's pro package.

Functions (4)

collaborationModulefunctionSource ↗

The collaboration module. Register it with createPptxEditor({ modules: [collaborationModule({ session })] }).

declare function collaborationModule(options: CollaborationModuleOptions): EditorModule;

createYjsCollaborationSessionfunctionSource ↗

Create a session over a Y.Doc. Register it with collaborationModule({ session }). Throws CollaborationSchemaError for an invalid document id or identity.

declare function createYjsCollaborationSession(options: YjsCollaborationSessionOptions): YjsCollaborationSession;

legacyCommentsfunctionSource ↗

Every legacy comment of every slide, in slide order and then file order.

declare function legacyComments(pkg: PptxPackage): ReviewItem[];

reviewModulefunctionSource ↗

The review module. Register it with createPptxEditor({ modules: [reviewModule()] }): the editor snapshot then reports the current slide's comment threads (comments), the slide shows a marker for each thread, and collectReviewItems reads every comment of the deck. Render PptxEditorReview from @pptx-editor.dev/pro/react or /vue for the comments pane.

declare function reviewModule(options?: ReviewModuleOptions): EditorModule;

Classes (1)

CollaborationSchemaErrorclassSource ↗

Typed collaboration schema or trust-boundary failure, thrown for invalid factory input. Use code for application logic; detail is diagnostic information.

declare class CollaborationSchemaError extends Error
MemberTypeSummary
(constructor)Constructs a new instance of the `CollaborationSchemaError` class
codeCollaborationFailureCodeStable failure code. Branch on it.
detail?string | undefinedBounded diagnostic text for logs. Not a parsing contract.

Interfaces (6)

AwarenessLikeinterfaceSource ↗

The minimal awareness surface the session uses (y-protocols/awareness's Awareness).

interface AwarenessLike
MemberTypeSummary
clientIDnumberThis replica's awareness client id.
getStatesEvery connected client's state, by client id.
offStop listening to state changes.
onListen to changes of any client's state.
setLocalStateFieldSet one field of this replica's state; peers see it on their next update.

CollaborationModuleOptionsinterfaceSource ↗

Options of collaborationModule.

interface CollaborationModuleOptions extends ProLicenseOptions
MemberTypeSummary
sessionEditorCollaborationSessionA ready session, for example from `createYjsCollaborationSession`.

ProLicenseOptionsinterfaceSource ↗

Accepted by every pro entry point.

interface ProLicenseOptions
MemberTypeSummary
licenseKey?stringYour license key. Optional: evaluation use is permitted, production use requires a commercial agreement under the EigenPal Pro License (see LICENSE.md).

ReviewModuleOptionsinterfaceSource ↗

Options of reviewModule.

interface ReviewModuleOptions extends ProLicenseOptions
MemberTypeSummary
displayModes?readonly ReviewDisplayMode[]Display modes to unlock. Default: `final` and `markup`.
pane?ReviewPaneOptionsThe comment view settings, as DOCX Editor's `pane` option: `commentMarkers` (`'icon'`, the default, or `'initials'`) sets how a comment marker on the slide looks, and `opening` (`'auto'`, the default, or `'manual'`) sets whether a press on a marker asks for the **Comments** tab of the side panel. An unknown field or value throws a `TypeError`.

YjsCollaborationSessioninterfaceSource ↗

A session over a Y.Doc.

interface YjsCollaborationSession extends EditorCollaborationSession
MemberTypeSummary
setConnectedReport the provider's connection. `false` sets `disconnected` with `transport-disconnected`; edits continue and merge on reconnect. `true` returns to `ready`. Call it from the provider's status event.

YjsCollaborationSessionOptionsinterfaceSource ↗

Options of createYjsCollaborationSession.

interface YjsCollaborationSessionOptions
MemberTypeSummary
awareness?AwarenessLikeYjs awareness for presence (`new Awareness(doc)` from `y-protocols/awareness`), usually the provider's. Absent, the session lists only the local participant.
docY.DocThe shared document. The host connects it to a provider.
documentIdstringThe room's document identity.
identityCollaborationIdentityThe local author.