@sendbird/actionbook-core 0.7.3 → 0.8.1
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.
- package/dist/ui/index.d.ts +18 -3
- package/dist/ui/index.js +1377 -163
- package/dist/ui/index.js.map +1 -1
- package/package.json +1 -1
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Schema, Node } from 'prosemirror-model';
|
|
2
|
+
import * as prosemirror_state from 'prosemirror-state';
|
|
2
3
|
import { Plugin, Command, EditorState, PluginKey } from 'prosemirror-state';
|
|
3
4
|
import { InputRule } from 'prosemirror-inputrules';
|
|
4
5
|
import { EditorView, NodeView, Decoration } from 'prosemirror-view';
|
|
@@ -8,7 +9,7 @@ import { D as DocumentNode, A as AstNode, s as LlmCompletionEndpoint, I as Inlin
|
|
|
8
9
|
/**
|
|
9
10
|
* ProseMirror Schema for Actionbook documents.
|
|
10
11
|
*/
|
|
11
|
-
declare const actionbookSchema: Schema<"doc" | "paragraph" | "heading" | "bulletList" | "orderedList" | "listItem" | "blockquote" | "horizontalRule" | "table" | "tableRow" | "tableCell" | "tableHeader" | "text" | "inlineToolTag" | "jumpPoint" | "hardBreak", "bold" | "italic" | "underline" | "strikethrough" | "code" | "link" | "diffMark">;
|
|
12
|
+
declare const actionbookSchema: Schema<"doc" | "paragraph" | "heading" | "bulletList" | "orderedList" | "listItem" | "blockquote" | "codeBlock" | "jinjaIfBlock" | "jinjaIfBranch" | "horizontalRule" | "table" | "tableRow" | "tableCell" | "tableHeader" | "text" | "inlineToolTag" | "jumpPoint" | "hardBreak", "bold" | "italic" | "underline" | "strikethrough" | "code" | "link" | "diffMark">;
|
|
12
13
|
|
|
13
14
|
type NodeViewFactory = (node: Node, view: EditorView, getPos: () => number | undefined) => NodeView;
|
|
14
15
|
interface ActionbookPlugin {
|
|
@@ -111,6 +112,8 @@ interface EditorViewHandle {
|
|
|
111
112
|
}
|
|
112
113
|
declare function useEditorView(config: EditorViewConfig): EditorViewHandle;
|
|
113
114
|
|
|
115
|
+
declare function createHistoryPlugin(): ActionbookPlugin;
|
|
116
|
+
|
|
114
117
|
declare function createInputRulesPlugin(): ActionbookPlugin;
|
|
115
118
|
|
|
116
119
|
declare function createKeymapPlugin(): ActionbookPlugin;
|
|
@@ -141,10 +144,22 @@ declare function createJumpPointAdjacentPlugin(): ActionbookPlugin;
|
|
|
141
144
|
|
|
142
145
|
declare function createJumpPointNodeViewPlugin(): ActionbookPlugin;
|
|
143
146
|
|
|
147
|
+
declare function createJumpPointValidationPlugin(): ActionbookPlugin;
|
|
148
|
+
/**
|
|
149
|
+
* Check if doc has duplicate jump point IDs.
|
|
150
|
+
*/
|
|
151
|
+
declare function hasDuplicateJumpPoints(state: prosemirror_state.EditorState): boolean;
|
|
152
|
+
/**
|
|
153
|
+
* Check if doc has broken anchor references.
|
|
154
|
+
*/
|
|
155
|
+
declare function hasBrokenAnchorRefs(state: prosemirror_state.EditorState): boolean;
|
|
156
|
+
|
|
144
157
|
declare function createInlineToolTagNodeViewPlugin(): ActionbookPlugin;
|
|
145
158
|
|
|
146
159
|
declare function createJinjaDecorationPlugin(): ActionbookPlugin;
|
|
147
160
|
|
|
161
|
+
declare function createJinjaIfBlockPlugin(): ActionbookPlugin;
|
|
162
|
+
|
|
148
163
|
/**
|
|
149
164
|
* Link editing plugin for the Actionbook editor.
|
|
150
165
|
*
|
|
@@ -372,7 +387,7 @@ declare function createInlineSuggestPlugin(provider: InlineSuggestProvider, endp
|
|
|
372
387
|
*/
|
|
373
388
|
|
|
374
389
|
declare function convertInline(node: InlineNode): JSONContent;
|
|
375
|
-
declare function convertBlock(node: BlockNode
|
|
390
|
+
declare function convertBlock(node: BlockNode): JSONContent;
|
|
376
391
|
declare function toProseMirrorJSON(doc: DocumentNode): JSONContent;
|
|
377
392
|
/**
|
|
378
393
|
* Convert parseFragment() output (InlineNode[] | BlockNode[]) to PM JSONContent[].
|
|
@@ -380,4 +395,4 @@ declare function toProseMirrorJSON(doc: DocumentNode): JSONContent;
|
|
|
380
395
|
*/
|
|
381
396
|
declare function astNodesToJSONContent(nodes: (InlineNode | BlockNode)[]): JSONContent[];
|
|
382
397
|
|
|
383
|
-
export { type ActionbookPlugin, ActionbookRenderer, type ActionbookRendererProps, EditorShell, type EditorShellProps, type EditorViewConfig, type EditorViewHandle, FloatingMenu, type FloatingMenuProps, type InlineSuggestContext, type InlineSuggestProvider, type InlineSuggestState, JUMP_POINT_ADJACENT_SPEC, JinjaTreeView, type JinjaTreeViewProps, type NodeViewFactory, type ReactNodeViewOptions, type ReactNodeViewProps, type SlashCommandItem, SlashCommandMenu, type SlashCommandMenuProps, type SlashCommandState, actionbookSchema, astNodesToJSONContent, convertBlock, convertInline, createDragHandlePlugin, createInlineSuggestPlugin, createInlineToolTagNodeViewPlugin, createInputRulesPlugin, createJinjaDecorationPlugin, createJumpPointAdjacentPlugin, createJumpPointNodeViewPlugin, createKeymapPlugin, createLinkPlugin, createMarkdownClipboardPlugin, createPluginArray, createReactNodeView, createSlashCommandPlugin, createTodoNodeViewPlugin, inlineSuggestKey, slashCommandKey, toProseMirrorJSON, useEditorView };
|
|
398
|
+
export { type ActionbookPlugin, ActionbookRenderer, type ActionbookRendererProps, EditorShell, type EditorShellProps, type EditorViewConfig, type EditorViewHandle, FloatingMenu, type FloatingMenuProps, type InlineSuggestContext, type InlineSuggestProvider, type InlineSuggestState, JUMP_POINT_ADJACENT_SPEC, JinjaTreeView, type JinjaTreeViewProps, type NodeViewFactory, type ReactNodeViewOptions, type ReactNodeViewProps, type SlashCommandItem, SlashCommandMenu, type SlashCommandMenuProps, type SlashCommandState, actionbookSchema, astNodesToJSONContent, convertBlock, convertInline, createDragHandlePlugin, createHistoryPlugin, createInlineSuggestPlugin, createInlineToolTagNodeViewPlugin, createInputRulesPlugin, createJinjaDecorationPlugin, createJinjaIfBlockPlugin, createJumpPointAdjacentPlugin, createJumpPointNodeViewPlugin, createJumpPointValidationPlugin, createKeymapPlugin, createLinkPlugin, createMarkdownClipboardPlugin, createPluginArray, createReactNodeView, createSlashCommandPlugin, createTodoNodeViewPlugin, hasBrokenAnchorRefs, hasDuplicateJumpPoints, inlineSuggestKey, slashCommandKey, toProseMirrorJSON, useEditorView };
|