@pptx-editor. dev/ pro/ vue
@pptx-editor.dev/pro/vue: the comments pane and the review composables for the Vue adapter, and the review module, so a host imports one path, as DOCX Editor's @docx-editor.dev/pro/vue. @pptx-editor.dev/core and @pptx-editor.dev/vue stay peers, so one engine instance loads.
Functions (5)
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;useReviewfunctionSource ↗
Read the comments of the current slide and act on them, in PptxEditorRoot.
declare function useReview(): UseReviewReturn;useReviewAuthorfunctionSource ↗
The look of one comment author, from the editor's review roster (getReviewAuthors): the slot and the CSS color of the thread's marker, band, ring, and card, or undefined without an author or for an author the roster does not hold. Takes a ref or a getter.
declare function useReviewAuthor(author: MaybeRefOrGetter<string | undefined>): UseReviewAuthorReturn;useReviewItemfunctionSource ↗
The comment that the surrounding card (or reply) renders, or null outside one: the twin of React's useReviewItem.
declare function useReviewItem(): UseReviewItemReturn;useReviewOffunctionSource ↗
useReview over an explicit editor (a ref, a getter, or the instance).
declare function useReviewOf(editor: MaybeRefOrGetter<PptxEditorInstance | null>): UseReviewOfReturn;Interfaces (10)
ProLicenseOptionsinterfaceSource ↗
Accepted by every pro entry point.
interface ProLicenseOptions| Member | Type | Summary |
|---|---|---|
| licenseKey? | string | Your license key. Optional: evaluation use is permitted, production use requires a commercial agreement under the EigenPal Pro License (see LICENSE.md). |
ReviewActionPropsinterfaceSource ↗
Props of the action parts, which also take an icon.
interface ReviewActionProps extends ReviewPartProps| Member | Type | Summary |
|---|---|---|
| icon? | VNode | string | The icon. Default: the part's Material Symbol; the default slot also replaces it. |
ReviewActivationOptionsinterfaceSource ↗
Options of UseReviewReturn.setActive.
interface ReviewActivationOptions| Member | Type | Summary |
|---|---|---|
| announce? | boolean | Also ask for the **Comments** tab of the side panel (`requestPane`), as a press on the thread's marker does. Default `false`. |
| identity? | string | The `identity` of the thread as your view shows it. The pick is refused when the thread under `key` has another identity: the view is older than the snapshot. |
ReviewCommentTargetinterfaceSource ↗
The element that a new comment points at: the one selected element of the slide's top level. Null when the comment points at the slide.
interface ReviewCommentTarget| Member | Type | Summary |
|---|---|---|
| name | string | |
| nodeId | string | |
| range? | CommentTextRange | The selected text of the element, when the comment points at a range of its text. |
ReviewDraftPropsinterfaceSource ↗
Props of PptxEditorReview.Draft, the compose box of a new comment.
interface ReviewDraftProps extends ReviewPartProps| Member | Type | Summary |
|---|---|---|
| nodeId? | string | The element that the new comment points at. Default: the selected element, else the slide. |
ReviewItemViewinterfaceSource ↗
One comment or reply of the current slide, as the review hooks and parts read it. A thread's replies follow it in UseReviewReturn.items, and the thread names them in replyIds. Text and names come from the file: render them as text, never as markup.
interface ReviewItemView| Member | Type | Summary |
|---|---|---|
| anchor | CommentAnchor | Where the thread points on the slide. A reply reports its thread's anchor. |
| anchorName? | string | The name of the element the thread points at, or absent for the slide or a place. |
| author | string | The author's display name, or an empty string when the file names none. |
| date? | string | The date as the file stores it (ISO 8601), or absent. |
| editable | boolean | Whether `edit` can replace the text. False for content that the editor cannot write back. |
| format | CommentFormat | The file format of the thread. |
| id | string | The comment id, as the comment commands take it. Equal to `key`. |
| identity | string | The comment's `identity` (`SlideComment.identity` says what keeps it), which can stay where `id` changes. The pane keys its cards, its open fields, and the selected thread by it. The actions send the item's author, date, and text as the command's `expect`. |
| initials | string | The avatar text: the file's initials, else the first letters of the author's name. |
| isActive | boolean | Whether the thread is the picked one (`activeKey`). A reply reports its thread's state. |
| key | string | The key the actions take: the comment id. |
| kind | 'comment' | Always `comment`: PresentationML has no tracked-change markup. |
| parent? | CommentExpect | For a reply, what the item list showed of its thread: the author, date, text, and identity. The thread actions on a reply item (`reply`, `resolve`, `reopen`) send it as `expect`, so they refuse a thread that is no longer the one shown. Absent on a thread. |
| parentId? | string | For a reply, the id of its thread; absent on a thread. |
| replyIds | readonly string[] | For a thread, the ids of its replies, oldest first; empty on a reply. |
| resolvable | boolean | Whether `resolve` and `reopen` apply. False for the legacy format, which has no state. |
| resolved | boolean | Whether the thread is resolved. A reply reports its thread's state. |
| text | string | The text, with one line feed between paragraphs. |
ReviewModuleOptionsinterfaceSource ↗
Options of reviewModule.
interface ReviewModuleOptions extends ProLicenseOptions| Member | Type | Summary |
|---|---|---|
| displayModes? | readonly ReviewDisplayMode[] | Display modes to unlock. Default: `final` and `markup`. |
| pane? | ReviewPaneOptions | The 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`. |
ReviewPartPropsinterfaceSource ↗
Shared props of every part.
interface ReviewPartProps| Member | Type | Summary |
|---|---|---|
| asChild? | boolean | Merge the part's wiring onto its single slot element instead of the default element. |
| className? | string | A class name added to the part's element. |
ReviewPropsinterfaceSource ↗
Props of PptxEditorReview.
interface ReviewProps extends Omit<ReviewPartProps, 'asChild'>| Member | Type | Summary |
|---|---|---|
| card? | {
className?: string;
} | A class name for each card. |
| filter? | (item: ReviewItemView) => boolean | Show only some threads. Replies follow their thread. |
| preset? | boolean | Render the packaged arrangement. `false` renders only the root parts you pass. |
| t? | ReviewTranslate | Label resolver. A key it does not resolve falls back to the bundled catalog. |
UseReviewReturninterfaceSource ↗
What useReview returns: the twin of React's UseReviewReturn, with the state as computed refs. Every action reports whether the editor applied it.
interface UseReviewReturn| Member | Type | Summary |
|---|---|---|
| activeKey | ComputedRef<string | null> | The key of the picked thread, or null. |
| author | ComputedRef<string | null> | The name that signs a new comment or reply, or null. |
| comment | (text: string, author?: string, target?: {
readonly nodeId: string;
readonly range?: CommentTextRange;
}) => boolean | Add a thread on the current slide, at `target.range` of the text of `target.nodeId`, at `target.nodeId`, the selected text or element, or the slide. |
| commentTarget | ComputedRef<ReviewCommentTarget | null> | The element that a new comment points at, or null for the slide. |
| edit | (item: ReviewItemView, text: string) => boolean | Replace the text of a comment or a reply. |
| items | ComputedRef<readonly ReviewItemView[]> | The comments of the current slide, in file order: each thread, then its replies. |
| readOnly | ComputedRef<boolean> | True while no deck is open for editing. |
| ready | ComputedRef<boolean> | False until the editor has a deck. |
| remove | (item: ReviewItemView) => boolean | Delete a reply, or a thread with all of its replies. |
| reopen | (item: ReviewItemView) => boolean | Reopen the thread of `item`. |
| reply | (item: ReviewItemView, text: string, author?: string) => boolean | Reply to a thread, or to the thread of a reply. |
| resolve | (item: ReviewItemView) => boolean | Resolve the thread of `item`. |
| setActive | (key: string | null, options?: ReviewActivationOptions) => boolean | Pick a thread, or `null` for none. `{ announce: true }` also asks for the Comments tab. |
| setAuthor | (author: string | undefined) => void | Set the name that signs later comments and replies (`editor.setAuthor`). |
Type aliases (5)
PptxEditorReviewNamespacetypeSource ↗
The type of the comments pane compound. It is written out, not inferred, so the declaration files and the API report stay the same on every build, as FontFamilyNamespace in the Vue adapter.
type PptxEditorReviewNamespace = DefineComponent<ReviewProps> & {
readonly List: DefineComponent<Omit<ReviewPartProps, 'asChild'>>;
readonly AddComment: DefineComponent<ReviewPartProps>;
readonly Draft: DefineComponent<ReviewDraftProps>;
readonly Empty: DefineComponent<ReviewPartProps>;
readonly Card: DefineComponent<ReviewPartProps>;
readonly Avatar: DefineComponent<ReviewPartProps>;
readonly Author: DefineComponent<ReviewPartProps>;
readonly Time: DefineComponent<ReviewPartProps>;
readonly Anchor: DefineComponent<ReviewPartProps>;
readonly Summary: DefineComponent<ReviewPartProps>;
readonly Resolve: DefineComponent<ReviewActionProps>;
readonly Reopen: DefineComponent<ReviewActionProps>;
readonly Edit: DefineComponent<ReviewActionProps>;
readonly Delete: DefineComponent<ReviewActionProps>;
readonly Replies: DefineComponent<ReviewPartProps>;
readonly Reply: DefineComponent<ReviewPartProps>;
};ReviewTranslatetypeSource ↗
The label resolver of PptxEditorReview: a string for a key, or undefined for the default.
type ReviewTranslate = (key: string) => string | undefined;UseReviewAuthorReturntypeSource ↗
What useReviewAuthor returns.
type UseReviewAuthorReturn = ComputedRef<ReviewAuthorInfo | undefined>;UseReviewItemReturntypeSource ↗
What useReviewItem returns.
type UseReviewItemReturn = ComputedRef<ReviewItemView | null>;UseReviewOfReturntypeSource ↗
What useReviewOf returns: the same as useReview.
type UseReviewOfReturn = UseReviewReturn;Variables (1)
PptxEditorReviewconstSource ↗
The comments pane compound: PptxEditorReview is the root, and every part hangs off it, as DOCX Editor's DocxEditorReview.
PptxEditorReview: PptxEditorReviewNamespace