@blocknote/xl-ai 0.31.0 → 0.31.2
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/blocknote-xl-ai.cjs +1 -1
- package/dist/blocknote-xl-ai.cjs.map +1 -1
- package/dist/blocknote-xl-ai.js +52 -52
- package/dist/blocknote-xl-ai.js.map +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +5 -5
- package/src/AIExtension.ts +1 -1
- package/src/testUtil/cases/editors/blockFormatting.ts +3 -3
- package/src/testUtil/cases/editors/formattingAndMentions.ts +3 -3
- package/src/testUtil/cases/editors/simpleEditor.ts +3 -3
- package/src/testUtil/cases/editors/tables.ts +3 -3
- package/src/testUtil/cases/updateOperationTestCases.ts +9 -9
- package/types/src/AIExtension.d.ts +1 -1
package/dist/webpack-stats.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":
|
|
1
|
+
{"builtAt":1749476892962,"assets":[{"name":"blocknote-xl-ai.cjs","size":59057},{"name":"locales.cjs","size":22729},{"name":"locales.cjs.map","size":52723},{"name":"blocknote-xl-ai.cjs.map","size":2392439}],"chunks":[{"id":"a1ee98a","entry":true,"initial":true,"files":["blocknote-xl-ai.cjs"],"names":["blocknote-xl-ai"]},{"id":"842df4c","entry":true,"initial":true,"files":["locales.cjs"],"names":["locales"]}],"modules":[{"name":"./src/style.css","size":0,"chunks":["a1ee98a"]},{"name":"../../node_modules/.pnpm/zustand@5.0.3_@types+react@18.3.20_immer@10.1.1_react@18.3.1_use-sync-external-store@1.4.0_react@18.3.1_/node_modules/zustand/esm/vanilla.mjs","size":973,"chunks":["a1ee98a"]},{"name":"./src/streamTool/jsonSchema.ts","size":1194,"chunks":["a1ee98a"]},{"name":"./src/util/stream.ts","size":1069,"chunks":["a1ee98a"]},{"name":"./src/streamTool/filterNewOrUpdatedOperations.ts","size":891,"chunks":["a1ee98a"]},{"name":"./src/streamTool/filterValidOperations.ts","size":647,"chunks":["a1ee98a"]},{"name":"./src/streamTool/toValidatedOperations.ts","size":753,"chunks":["a1ee98a"]},{"name":"./src/streamTool/preprocess.ts","size":848,"chunks":["a1ee98a"]},{"name":"./src/streamTool/callLLMWithStreamTools.ts","size":5771,"chunks":["a1ee98a"]},{"name":"./src/util/emptyBlock.ts","size":170,"chunks":["a1ee98a"]},{"name":"./src/api/LLMResponse.ts","size":1039,"chunks":["a1ee98a"]},{"name":"./src/api/promptHelpers/addCursorPosition.ts","size":390,"chunks":["a1ee98a"]},{"name":"./src/api/promptHelpers/convertBlocks.ts","size":183,"chunks":["a1ee98a"]},{"name":"./src/api/promptHelpers/flattenBlocks.ts","size":162,"chunks":["a1ee98a"]},{"name":"./src/api/promptHelpers/suffixIds.ts","size":204,"chunks":["a1ee98a"]},{"name":"./src/util/trimArray.ts","size":327,"chunks":["a1ee98a"]},{"name":"./src/api/promptHelpers/trimEmptyBlocks.ts","size":236,"chunks":["a1ee98a"]},{"name":"./src/api/formats/html-blocks/htmlPromptData.ts","size":1099,"chunks":["a1ee98a"]},{"name":"./src/api/formats/html-blocks/defaultHTMLPromptBuilder.ts","size":5082,"chunks":["a1ee98a"]},{"name":"./src/prosemirror/fragmentUtil.ts","size":262,"chunks":["a1ee98a"]},{"name":"./src/prosemirror/agent.ts","size":6220,"chunks":["a1ee98a"]},{"name":"./src/prosemirror/changeset.ts","size":6000,"chunks":["a1ee98a"]},{"name":"./src/streamTool/streamTool.ts","size":48,"chunks":["a1ee98a"]},{"name":"./src/api/formats/base-tools/util/validateBlockArray.ts","size":574,"chunks":["a1ee98a"]},{"name":"./src/api/formats/base-tools/createAddBlocksTool.ts","size":5316,"chunks":["a1ee98a"]},{"name":"./src/api/formats/base-tools/createUpdateBlockTool.ts","size":4078,"chunks":["a1ee98a"]},{"name":"./src/api/formats/base-tools/delete.ts","size":1766,"chunks":["a1ee98a"]},{"name":"./src/api/formats/html-blocks/tools/getPartialHTML.ts","size":699,"chunks":["a1ee98a"]},{"name":"./src/prosemirror/rebaseTool.ts","size":1508,"chunks":["a1ee98a"]},{"name":"./src/api/formats/html-blocks/tools/rebaseTool.ts","size":829,"chunks":["a1ee98a"]},{"name":"./src/api/formats/html-blocks/tools/validate.ts","size":204,"chunks":["a1ee98a"]},{"name":"./src/api/formats/html-blocks/tools/index.ts","size":2049,"chunks":["a1ee98a"]},{"name":"./src/api/formats/html-blocks/htmlBlocks.ts","size":1283,"chunks":["a1ee98a"]},{"name":"./src/api/LLMRequest.ts","size":2110,"chunks":["a1ee98a"]},{"name":"./src/api/formats/json/jsonPromptData.ts","size":1208,"chunks":["a1ee98a"]},{"name":"./src/api/formats/json/defaultJSONPromptBuilder.ts","size":2700,"chunks":["a1ee98a"]},{"name":"./src/api/schema/mergeSchema.ts","size":829,"chunks":["a1ee98a"]},{"name":"./src/api/schema/schemaToJSONSchema.ts","size":4849,"chunks":["a1ee98a"]},{"name":"./src/api/formats/json/tools/validate.ts","size":1603,"chunks":["a1ee98a"]},{"name":"./src/api/formats/json/tools/index.ts","size":1324,"chunks":["a1ee98a"]},{"name":"./src/api/formats/json/json.ts","size":1220,"chunks":["a1ee98a"]},{"name":"./src/api/formats/markdown-blocks/markdownPromptData.ts","size":1119,"chunks":["a1ee98a"]},{"name":"./src/api/formats/markdown-blocks/defaultMarkdownPromptBuilder.ts","size":2744,"chunks":["a1ee98a"]},{"name":"./src/api/formats/markdown-blocks/tools/rebaseTool.ts","size":633,"chunks":["a1ee98a"]},{"name":"./src/api/formats/markdown-blocks/tools/validate.ts","size":202,"chunks":["a1ee98a"]},{"name":"./src/api/formats/markdown-blocks/tools/index.ts","size":1505,"chunks":["a1ee98a"]},{"name":"./src/api/formats/markdown-blocks/markdownBlocks.ts","size":1148,"chunks":["a1ee98a"]},{"name":"./src/api/promptHelpers/index.ts","size":112,"chunks":["a1ee98a"]},{"name":"./src/api/index.ts","size":138,"chunks":["a1ee98a"]},{"name":"./src/plugins/AgentCursorPlugin.ts","size":2444,"chunks":["a1ee98a"]},{"name":"./src/AIExtension.ts","size":6605,"chunks":["a1ee98a"]},{"name":"./src/blocknoteAIClient/client.ts","size":1601,"chunks":["a1ee98a"]},{"name":"../../node_modules/.pnpm/react-icons@5.5.0_react@18.3.1/node_modules/react-icons/lib/iconContext.mjs","size":251,"chunks":["a1ee98a"]},{"name":"../../node_modules/.pnpm/react-icons@5.5.0_react@18.3.1/node_modules/react-icons/lib/iconBase.mjs","size":4003,"chunks":["a1ee98a"]},{"name":"../../node_modules/.pnpm/react-icons@5.5.0_react@18.3.1/node_modules/react-icons/ri/index.mjs","size":6747,"chunks":["a1ee98a"]},{"name":"./src/i18n/dictionary.ts","size":150,"chunks":["a1ee98a"]},{"name":"./src/i18n/useAIDictionary.ts","size":111,"chunks":["a1ee98a"]},{"name":"./src/components/AIMenu/PromptSuggestionMenu.tsx","size":2901,"chunks":["a1ee98a"]},{"name":"./src/components/AIMenu/getDefaultAIMenuItems.tsx","size":6883,"chunks":["a1ee98a"]},{"name":"./src/components/AIMenu/AIMenu.tsx","size":3523,"chunks":["a1ee98a"]},{"name":"./src/components/AIMenu/BlockPositioner.tsx","size":1392,"chunks":["a1ee98a"]},{"name":"./src/components/AIMenu/AIMenuController.tsx","size":916,"chunks":["a1ee98a"]},{"name":"./src/components/FormattingToolbar/AIToolbarButton.tsx","size":853,"chunks":["a1ee98a"]},{"name":"./src/components/SuggestionMenu/getAISlashMenuItems.tsx","size":679,"chunks":["a1ee98a"]},{"name":"./src/index.ts","size":0,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/ar.ts","size":1531,"chunks":["842df4c"]},{"name":"./src/i18n/locales/de.ts","size":1585,"chunks":["842df4c"]},{"name":"./src/i18n/locales/en.ts","size":1483,"chunks":["842df4c"]},{"name":"./src/i18n/locales/es.ts","size":1553,"chunks":["842df4c"]},{"name":"./src/i18n/locales/fr.ts","size":1569,"chunks":["842df4c"]},{"name":"./src/i18n/locales/hr.ts","size":1494,"chunks":["842df4c"]},{"name":"./src/i18n/locales/is.ts","size":1562,"chunks":["842df4c"]},{"name":"./src/i18n/locales/it.ts","size":1555,"chunks":["842df4c"]},{"name":"./src/i18n/locales/ja.ts","size":1372,"chunks":["842df4c"]},{"name":"./src/i18n/locales/ko.ts","size":1394,"chunks":["842df4c"]},{"name":"./src/i18n/locales/nl.ts","size":1536,"chunks":["842df4c"]},{"name":"./src/i18n/locales/no.ts","size":1509,"chunks":["842df4c"]},{"name":"./src/i18n/locales/pl.ts","size":1510,"chunks":["842df4c"]},{"name":"./src/i18n/locales/pt.ts","size":1548,"chunks":["842df4c"]},{"name":"./src/i18n/locales/ru.ts","size":1549,"chunks":["842df4c"]},{"name":"./src/i18n/locales/sk.ts","size":1511,"chunks":["842df4c"]},{"name":"./src/i18n/locales/uk.ts","size":1556,"chunks":["842df4c"]},{"name":"./src/i18n/locales/vi.ts","size":1506,"chunks":["842df4c"]},{"name":"./src/i18n/locales/zh-tw.ts","size":1345,"chunks":["842df4c"]},{"name":"./src/i18n/locales/zh.ts","size":1340,"chunks":["842df4c"]},{"name":"./src/i18n/locales/index.ts","size":0,"chunks":["842df4c"]}]}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"directory": "packages/xl-ai"
|
|
12
12
|
},
|
|
13
13
|
"license": "AGPL-3.0 OR PROPRIETARY",
|
|
14
|
-
"version": "0.31.
|
|
14
|
+
"version": "0.31.2",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist",
|
|
17
17
|
"types",
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
"@ai-sdk/mistral": "^1.2.8",
|
|
61
61
|
"@ai-sdk/openai": "^1.3.22",
|
|
62
62
|
"@ai-sdk/openai-compatible": "^0.2.14",
|
|
63
|
-
"@blocknote/core": "0.31.
|
|
64
|
-
"@blocknote/mantine": "0.31.
|
|
63
|
+
"@blocknote/core": "0.31.2",
|
|
64
|
+
"@blocknote/mantine": "0.31.2",
|
|
65
65
|
"@blocknote/prosemirror-suggest-changes": "^0.1.3",
|
|
66
|
-
"@blocknote/react": "0.31.
|
|
66
|
+
"@blocknote/react": "0.31.2",
|
|
67
67
|
"@floating-ui/react": "^0.26.4",
|
|
68
68
|
"@tiptap/core": "^2.12.0",
|
|
69
69
|
"ai": "^4.3.15",
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
},
|
|
114
114
|
"eslintConfig": {
|
|
115
115
|
"extends": [
|
|
116
|
-
"../../.eslintrc.
|
|
116
|
+
"../../.eslintrc.json"
|
|
117
117
|
]
|
|
118
118
|
},
|
|
119
119
|
"scripts": {
|
package/src/AIExtension.ts
CHANGED
|
@@ -88,7 +88,7 @@ const PLUGIN_KEY = new PluginKey(`blocknote-ai-plugin`);
|
|
|
88
88
|
export class AIExtension extends BlockNoteExtension {
|
|
89
89
|
private previousRequestOptions: LLMRequestOptions | undefined;
|
|
90
90
|
|
|
91
|
-
public static
|
|
91
|
+
public static key(): string {
|
|
92
92
|
return "ai";
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -22,11 +22,11 @@ export function getEditorWithBlockFormatting() {
|
|
|
22
22
|
],
|
|
23
23
|
trailingBlock: false,
|
|
24
24
|
schema,
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
extensions: [
|
|
26
|
+
createAIExtension({
|
|
27
27
|
model: undefined as any,
|
|
28
28
|
}),
|
|
29
|
-
|
|
29
|
+
],
|
|
30
30
|
});
|
|
31
31
|
editor._tiptapEditor.forceEnablePlugins();
|
|
32
32
|
return editor;
|
|
@@ -72,11 +72,11 @@ export function getEditorWithFormattingAndMentions() {
|
|
|
72
72
|
],
|
|
73
73
|
trailingBlock: false,
|
|
74
74
|
schema,
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
extensions: [
|
|
76
|
+
createAIExtension({
|
|
77
77
|
model: undefined as any,
|
|
78
78
|
}),
|
|
79
|
-
|
|
79
|
+
],
|
|
80
80
|
});
|
|
81
81
|
editor._tiptapEditor.forceEnablePlugins();
|
|
82
82
|
return editor;
|
|
@@ -16,11 +16,11 @@ export function getSimpleEditor() {
|
|
|
16
16
|
],
|
|
17
17
|
trailingBlock: false,
|
|
18
18
|
schema,
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
extensions: [
|
|
20
|
+
createAIExtension({
|
|
21
21
|
model: undefined as any,
|
|
22
22
|
}),
|
|
23
|
-
|
|
23
|
+
],
|
|
24
24
|
});
|
|
25
25
|
editor._tiptapEditor.forceEnablePlugins();
|
|
26
26
|
return editor;
|
|
@@ -38,11 +38,11 @@ export function getEditorWithTables() {
|
|
|
38
38
|
],
|
|
39
39
|
schema,
|
|
40
40
|
trailingBlock: false,
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
extensions: [
|
|
42
|
+
createAIExtension({
|
|
43
43
|
model: undefined as any,
|
|
44
44
|
}),
|
|
45
|
-
|
|
45
|
+
],
|
|
46
46
|
});
|
|
47
47
|
editor._tiptapEditor.forceEnablePlugins();
|
|
48
48
|
return editor;
|
|
@@ -683,11 +683,11 @@ export const updateOperationTestCases: DocumentOperationTestCase[] = [
|
|
|
683
683
|
},
|
|
684
684
|
],
|
|
685
685
|
schema,
|
|
686
|
-
|
|
687
|
-
|
|
686
|
+
extensions: [
|
|
687
|
+
createAIExtension({
|
|
688
688
|
model: undefined as any,
|
|
689
689
|
}),
|
|
690
|
-
|
|
690
|
+
],
|
|
691
691
|
});
|
|
692
692
|
return editor;
|
|
693
693
|
},
|
|
@@ -740,11 +740,11 @@ export const updateOperationTestCases: DocumentOperationTestCase[] = [
|
|
|
740
740
|
},
|
|
741
741
|
],
|
|
742
742
|
schema,
|
|
743
|
-
|
|
744
|
-
|
|
743
|
+
extensions: [
|
|
744
|
+
createAIExtension({
|
|
745
745
|
model: undefined as any,
|
|
746
746
|
}),
|
|
747
|
-
|
|
747
|
+
],
|
|
748
748
|
});
|
|
749
749
|
return editor;
|
|
750
750
|
},
|
|
@@ -779,11 +779,11 @@ export const updateOperationTestCases: DocumentOperationTestCase[] = [
|
|
|
779
779
|
},
|
|
780
780
|
],
|
|
781
781
|
schema,
|
|
782
|
-
|
|
783
|
-
|
|
782
|
+
extensions: [
|
|
783
|
+
createAIExtension({
|
|
784
784
|
model: undefined as any,
|
|
785
785
|
}),
|
|
786
|
-
|
|
786
|
+
],
|
|
787
787
|
});
|
|
788
788
|
return editor;
|
|
789
789
|
},
|
|
@@ -53,7 +53,7 @@ type GlobalLLMRequestOptions = {
|
|
|
53
53
|
export declare class AIExtension extends BlockNoteExtension {
|
|
54
54
|
readonly editor: BlockNoteEditor<any, any, any>;
|
|
55
55
|
private previousRequestOptions;
|
|
56
|
-
static
|
|
56
|
+
static key(): string;
|
|
57
57
|
private readonly _store;
|
|
58
58
|
/**
|
|
59
59
|
* Returns a read-only zustand store with the state of the AI Extension
|