Skip to content

Commit

Permalink
feat(editor): add updateAdvice function and export custom action types
Browse files Browse the repository at this point in the history
This commit introduces the `updateAdvice` function to the advice extension in the editor, enhancing the ability to modify existing advice comments. Additionally, it exports all custom action types from the `custom-action.type` file for broader usage within the project.
  • Loading branch information
phodal committed Nov 1, 2024
1 parent e370aee commit 0356131
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions web/core/lib/editor/extensions/advice/advice-extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ declare module "@tiptap/core" {
setAdviceCommand: (newComment: Advice) => ReturnType;
setAdvice: (commentId: string) => ReturnType;
unsetAdvice: (commentId: string) => ReturnType;
updateAdvice: (commentId: string, newComment: Advice) => ReturnType;
};
}
}
Expand Down
3 changes: 3 additions & 0 deletions web/core/lib/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ export { BuiltinFunctionExecutor } from '@/editor/action/BuiltinFunctionExecutor
export {
default as ArticlePrompts, ToolbarMenuPrompts, BubbleMenuPrompts, SlashCommandsPrompts
} from '@/editor/prompts/article-prompts';

/// export all types
export * from '@/editor/defs/custom-action.type';
2 changes: 1 addition & 1 deletion web/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@studio-b3/web-core",
"version": "0.8.4",
"version": "0.8.5",
"type": "module",
"main": "dist/main.js",
"types": "dist-types/main.d.ts",
Expand Down

0 comments on commit 0356131

Please sign in to comment.