@skaile/forge-editor 6.4.1 → 6.4.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/CHANGELOG.md +6 -0
- package/dist/code/CodeSurface.vue.d.ts +3 -3
- package/dist/core/document-markdown.d.ts +11 -6
- package/dist/core/document-markdown.js +34 -23
- package/dist/core/document-markdown.js.map +1 -1
- package/dist/core/soft-line-breaks.js +44 -0
- package/dist/core/soft-line-breaks.js.map +1 -0
- package/dist/document/DocumentSurface.vue.d.ts +3 -3
- package/dist/features/ai/components/AiReviewBar.js +1 -1
- package/dist/features/ai/components/AiSelectionMenu.js +1 -1
- package/dist/features/ai/components/AiSidebar.js +2 -2
- package/dist/features/ai/components/DocumentChatAnswer.js +1 -1
- package/dist/features/ai/components/SettingsModelProfiles.js +1 -1
- package/dist/features/ai/feature.js +1 -1
- package/dist/features/ai/index.js +7 -7
- package/dist/features/ai/react/AiSelectionMenu.js +4 -4
- package/dist/features/ai/react/AiSidebar.js +4 -4
- package/dist/features/ai/react/DocumentChatOps.js +1 -1
- package/dist/features/ai/react/ModelQuickSwitch.js +1 -1
- package/dist/features/ai/react/SettingsModelProfiles.js +1 -1
- package/dist/features/ai/react/use-ai-assistant.js +1 -1
- package/dist/features/ai/react/use-document-chat.js +1 -1
- package/dist/features/ai/use-ai-assistant.js +2 -2
- package/dist/features/ai/use-document-chat.js +1 -1
- package/dist/features/ai/vue.js +1 -1
- package/dist/features/authors/components/AuthorColorsPanel.js +1 -1
- package/dist/features/authors/components/SettingsAuthorsTab.js +1 -1
- package/dist/features/authors/index.js +1 -1
- package/dist/features/authors/react/AuthorColorsPanel.js +2 -2
- package/dist/features/authors/react/SettingsAuthorsTab.js +1 -1
- package/dist/features/authors/vue.js +1 -1
- package/dist/features/block-ui/index.js +1 -1
- package/dist/features/block-ui/react/BlockActionsOverlay.js +1 -1
- package/dist/features/block-ui/vue.js +1 -1
- package/dist/features/comments/react/CommentThreadView.js +1 -1
- package/dist/features/composites/components/CompositeInspector.js +8 -8
- package/dist/features/composites/components/ReferenceListFieldEditor.js +1 -1
- package/dist/features/composites/components/SettingsEditingTab.js +1 -1
- package/dist/features/composites/index.js +5 -5
- package/dist/features/composites/react/BibliographyEditor.js +1 -1
- package/dist/features/composites/react/CompositeChrome.js +1 -1
- package/dist/features/composites/react/CompositeDetails.js +1 -1
- package/dist/features/composites/react/CompositeInspector.js +3 -3
- package/dist/features/composites/react/CompositeTable.js +1 -1
- package/dist/features/composites/react/ReferenceListFieldEditor.js +1 -1
- package/dist/features/composites/react/ReferenceView.js +1 -1
- package/dist/features/composites/react/SettingsEditingTab.js +3 -3
- package/dist/features/composites/react.js +2 -2
- package/dist/features/composites/vue.js +2 -2
- package/dist/features/pruefung/vue.js +1 -1
- package/dist/features/themes/vue.js +1 -1
- package/dist/features/transfer/vue.js +1 -1
- package/dist/integrations/composite-ai/index.js +1 -1
- package/dist/markdown/MarkdownSurface.vue.d.ts +5 -5
- package/dist/react/EditorToolbar.js +2 -2
- package/dist/react/compose.js +2 -2
- package/dist/react/index.js +1 -1
- package/dist/search/react/SearchPanel.js +1 -1
- package/dist/tree/DocumentTree.js +1 -1
- package/dist/tree/react/DocumentTree.js +3 -3
- package/dist/tree/react/use-tree-model.js +2 -2
- package/dist/tree/use-tree-model.js +1 -1
- package/dist/vue/AdvancedEditor.vue.d.ts +4 -4
- package/dist/vue/SimpleEditor.vue.d.ts +4 -4
- package/dist/vue/components/EditorSurface.vue.d.ts +4 -4
- package/dist/vue/compose.js +2 -2
- package/dist/vue/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 6.4.2 - 2026-11-03
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Typing in a paragraph no longer turns its soft line breaks (a single `\n` in the Markdown) into hard breaks: after a keystroke the editor re-read the changed text with every `\n` as a `hardBreak`, so saving wrote ` \n` after each line, including lines that were never touched. `DocumentMarkdown` now installs a DOM parser that keeps the `\n` of the textblocks the editor rendered when it re-reads them, for a change in one paragraph and for a change across several. Shift+Enter still inserts a hard break; pasting and every other parse are unchanged.
|
|
8
|
+
|
|
3
9
|
## 6.4.1 - 2026-11-02
|
|
4
10
|
|
|
5
11
|
### Fixed
|
|
@@ -12,16 +12,16 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
|
12
12
|
view: import("vue").ShallowRef<EditorView | undefined, EditorView | undefined>;
|
|
13
13
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
14
|
"update:modelValue": (text: string) => any;
|
|
15
|
-
save: (text: string) => any;
|
|
16
15
|
ready: (view: EditorView) => any;
|
|
16
|
+
save: (text: string) => any;
|
|
17
17
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
18
|
"onUpdate:modelValue"?: ((text: string) => any) | undefined;
|
|
19
|
-
onSave?: ((text: string) => any) | undefined;
|
|
20
19
|
onReady?: ((view: EditorView) => any) | undefined;
|
|
20
|
+
onSave?: ((text: string) => any) | undefined;
|
|
21
21
|
}>, {
|
|
22
|
+
modelValue: string;
|
|
22
23
|
editable: boolean;
|
|
23
24
|
wordWrap: boolean;
|
|
24
|
-
modelValue: string;
|
|
25
25
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
26
|
declare const _default: typeof __VLS_export;
|
|
27
27
|
//#endregion
|
|
@@ -2,12 +2,17 @@ import "./schema/mark-flags.js";
|
|
|
2
2
|
import { AnyExtension, JSONContent } from "@tiptap/core";
|
|
3
3
|
//#region src/core/document-markdown.d.ts
|
|
4
4
|
/**
|
|
5
|
-
* `@tiptap/markdown`'s `Markdown`
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
5
|
+
* `@tiptap/markdown`'s `Markdown` with two fixes for the documents of a preset. Use it instead of `Markdown` in every
|
|
6
|
+
* editor of a preset.
|
|
7
|
+
*
|
|
8
|
+
* - Its serializer ignores every mark that declares `markdownInvisible` (author and comment marks):
|
|
9
|
+
* `editor.getMarkdown()` and every `editor.markdown.serialize()` (AI context and selection, chat blocks, summaries,
|
|
10
|
+
* transcript cleanup) render as if those marks did not exist. `@tiptap/markdown` already renders marks without a
|
|
11
|
+
* handler as nothing, but they still split text runs, and its mark-boundary logic then closes and reopens the
|
|
12
|
+
* formatting around the split (`Ein **Sa**<strong>btz</strong>` for one bold word with another author's letter
|
|
13
|
+
* inside). The document keeps the marks.
|
|
14
|
+
* - Editing a paragraph keeps the soft line breaks (`\n` in its text nodes) that `@tiptap/markdown` parses Markdown
|
|
15
|
+
* soft breaks into, instead of turning them into hard breaks (`softLineBreaksPlugin`).
|
|
11
16
|
*/
|
|
12
17
|
export declare const DocumentMarkdown: import("@tiptap/core").Extension<import("@tiptap/markdown").MarkdownExtensionOptions, import("@tiptap/markdown").MarkdownExtensionStorage>;
|
|
13
18
|
//#endregion
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { softLineBreaksPlugin } from "./soft-line-breaks.js";
|
|
1
2
|
import { getExtensionField } from "@tiptap/core";
|
|
2
3
|
import { Markdown } from "@tiptap/markdown";
|
|
3
4
|
//#region src/core/document-markdown.ts
|
|
@@ -14,30 +15,40 @@ function invisibleMarkNames(extensions) {
|
|
|
14
15
|
return new Set(extensions.filter((extension) => extension.type === "mark" && getExtensionField(extension, "markdownInvisible")).map((extension) => extension.name));
|
|
15
16
|
}
|
|
16
17
|
/**
|
|
17
|
-
* `@tiptap/markdown`'s `Markdown`
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
18
|
+
* `@tiptap/markdown`'s `Markdown` with two fixes for the documents of a preset. Use it instead of `Markdown` in every
|
|
19
|
+
* editor of a preset.
|
|
20
|
+
*
|
|
21
|
+
* - Its serializer ignores every mark that declares `markdownInvisible` (author and comment marks):
|
|
22
|
+
* `editor.getMarkdown()` and every `editor.markdown.serialize()` (AI context and selection, chat blocks, summaries,
|
|
23
|
+
* transcript cleanup) render as if those marks did not exist. `@tiptap/markdown` already renders marks without a
|
|
24
|
+
* handler as nothing, but they still split text runs, and its mark-boundary logic then closes and reopens the
|
|
25
|
+
* formatting around the split (`Ein **Sa**<strong>btz</strong>` for one bold word with another author's letter
|
|
26
|
+
* inside). The document keeps the marks.
|
|
27
|
+
* - Editing a paragraph keeps the soft line breaks (`\n` in its text nodes) that `@tiptap/markdown` parses Markdown
|
|
28
|
+
* soft breaks into, instead of turning them into hard breaks (`softLineBreaksPlugin`).
|
|
23
29
|
*/
|
|
24
|
-
const DocumentMarkdown = Markdown.extend({
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
if (!
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
const DocumentMarkdown = Markdown.extend({
|
|
31
|
+
addProseMirrorPlugins() {
|
|
32
|
+
return [...this.parent?.() ?? [], softLineBreaksPlugin(this.editor.schema)];
|
|
33
|
+
},
|
|
34
|
+
onBeforeCreate(event) {
|
|
35
|
+
this.parent?.(event);
|
|
36
|
+
const extensions = this.editor.extensionManager.extensions;
|
|
37
|
+
const invisible = invisibleMarkNames(extensions);
|
|
38
|
+
const prepares = extensions.flatMap((extension) => {
|
|
39
|
+
const prepare = extension.type === "node" ? getExtensionField(extension, "markdownPrepare") : void 0;
|
|
40
|
+
return prepare ? [prepare] : [];
|
|
41
|
+
});
|
|
42
|
+
if (!invisible.size && !prepares.length) return;
|
|
43
|
+
const manager = this.storage.manager;
|
|
44
|
+
const serialize = manager.serialize.bind(manager);
|
|
45
|
+
manager.serialize = (json) => {
|
|
46
|
+
if (!json) return serialize(json);
|
|
47
|
+
const prepared = prepares.reduce((current, prepare) => prepare(current, this.editor), json);
|
|
48
|
+
return serialize(invisible.size ? withoutMarks(prepared, invisible) : prepared);
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
});
|
|
41
52
|
//#endregion
|
|
42
53
|
export { DocumentMarkdown, invisibleMarkNames, withoutMarks };
|
|
43
54
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-markdown.js","names":[],"sources":["../../src/core/document-markdown.ts"],"sourcesContent":["import { type AnyExtension, getExtensionField, type JSONContent, type NodeConfig } from '@tiptap/core'\nimport { Markdown } from '@tiptap/markdown'\nimport './schema/mark-flags'\n\n/** `json` without the marks named in `invisible` on any node; the runs they split become identically marked neighbours. */\nexport function withoutMarks(json: JSONContent, invisible: ReadonlySet<string>): JSONContent {\n return {\n ...json,\n ...(json.marks && { marks: json.marks.filter(mark => !invisible.has(mark.type)) }),\n ...(json.content && { content: json.content.map(child => withoutMarks(child, invisible)) }),\n }\n}\n\n/** The names of the marks among `extensions` that declare `markdownInvisible` (author and comment marks). */\nexport function invisibleMarkNames(extensions: readonly AnyExtension[]): Set<string> {\n return new Set(\n extensions\n .filter(extension => extension.type === 'mark' && getExtensionField<boolean | undefined>(extension, 'markdownInvisible'))\n .map(extension => extension.name),\n )\n}\n\n/**\n * `@tiptap/markdown`'s `Markdown`
|
|
1
|
+
{"version":3,"file":"document-markdown.js","names":[],"sources":["../../src/core/document-markdown.ts"],"sourcesContent":["import { type AnyExtension, getExtensionField, type JSONContent, type NodeConfig } from '@tiptap/core'\nimport { Markdown } from '@tiptap/markdown'\nimport './schema/mark-flags'\nimport { softLineBreaksPlugin } from './soft-line-breaks'\n\n/** `json` without the marks named in `invisible` on any node; the runs they split become identically marked neighbours. */\nexport function withoutMarks(json: JSONContent, invisible: ReadonlySet<string>): JSONContent {\n return {\n ...json,\n ...(json.marks && { marks: json.marks.filter(mark => !invisible.has(mark.type)) }),\n ...(json.content && { content: json.content.map(child => withoutMarks(child, invisible)) }),\n }\n}\n\n/** The names of the marks among `extensions` that declare `markdownInvisible` (author and comment marks). */\nexport function invisibleMarkNames(extensions: readonly AnyExtension[]): Set<string> {\n return new Set(\n extensions\n .filter(extension => extension.type === 'mark' && getExtensionField<boolean | undefined>(extension, 'markdownInvisible'))\n .map(extension => extension.name),\n )\n}\n\n/**\n * `@tiptap/markdown`'s `Markdown` with two fixes for the documents of a preset. Use it instead of `Markdown` in every\n * editor of a preset.\n *\n * - Its serializer ignores every mark that declares `markdownInvisible` (author and comment marks):\n * `editor.getMarkdown()` and every `editor.markdown.serialize()` (AI context and selection, chat blocks, summaries,\n * transcript cleanup) render as if those marks did not exist. `@tiptap/markdown` already renders marks without a\n * handler as nothing, but they still split text runs, and its mark-boundary logic then closes and reopens the\n * formatting around the split (`Ein **Sa**<strong>btz</strong>` for one bold word with another author's letter\n * inside). The document keeps the marks.\n * - Editing a paragraph keeps the soft line breaks (`\\n` in its text nodes) that `@tiptap/markdown` parses Markdown\n * soft breaks into, instead of turning them into hard breaks (`softLineBreaksPlugin`).\n */\nexport const DocumentMarkdown = Markdown.extend({\n addProseMirrorPlugins() {\n return [...(this.parent?.() ?? []), softLineBreaksPlugin(this.editor.schema)]\n },\n onBeforeCreate(event) {\n this.parent?.(event)\n const extensions = this.editor.extensionManager.extensions\n const invisible = invisibleMarkNames(extensions)\n const prepares = extensions.flatMap((extension) => {\n const prepare = extension.type === 'node' ? getExtensionField<NodeConfig['markdownPrepare']>(extension, 'markdownPrepare') : undefined\n return prepare ? [prepare] : []\n })\n if (!invisible.size && !prepares.length) return\n // `getMarkdown()` serializes through the same manager instance as `editor.markdown`.\n const manager = this.storage.manager\n const serialize = manager.serialize.bind(manager)\n manager.serialize = (json) => {\n if (!json) return serialize(json)\n const prepared = prepares.reduce((current, prepare) => prepare(current, this.editor), json)\n return serialize(invisible.size ? withoutMarks(prepared, invisible) : prepared)\n }\n },\n})\n"],"mappings":";;;;;AAMA,SAAgB,aAAa,MAAmB,WAA6C;CAC3F,OAAO;EACL,GAAG;EACH,GAAI,KAAK,SAAS,EAAE,OAAO,KAAK,MAAM,QAAO,SAAQ,CAAC,UAAU,IAAI,KAAK,IAAI,CAAC,EAAE;EAChF,GAAI,KAAK,WAAW,EAAE,SAAS,KAAK,QAAQ,KAAI,UAAS,aAAa,OAAO,SAAS,CAAC,EAAE;CAC3F;AACF;;AAGA,SAAgB,mBAAmB,YAAkD;CACnF,OAAO,IAAI,IACT,WACG,QAAO,cAAa,UAAU,SAAS,UAAU,kBAAuC,WAAW,mBAAmB,CAAC,CAAC,CACxH,KAAI,cAAa,UAAU,IAAI,CACpC;AACF;;;;;;;;;;;;;;AAeA,MAAa,mBAAmB,SAAS,OAAO;CAC9C,wBAAwB;EACtB,OAAO,CAAC,GAAI,KAAK,SAAS,KAAK,CAAC,GAAI,qBAAqB,KAAK,OAAO,MAAM,CAAC;CAC9E;CACA,eAAe,OAAO;EACpB,KAAK,SAAS,KAAK;EACnB,MAAM,aAAa,KAAK,OAAO,iBAAiB;EAChD,MAAM,YAAY,mBAAmB,UAAU;EAC/C,MAAM,WAAW,WAAW,SAAS,cAAc;GACjD,MAAM,UAAU,UAAU,SAAS,SAAS,kBAAiD,WAAW,iBAAiB,IAAI,KAAA;GAC7H,OAAO,UAAU,CAAC,OAAO,IAAI,CAAC;EAChC,CAAC;EACD,IAAI,CAAC,UAAU,QAAQ,CAAC,SAAS,QAAQ;EAEzC,MAAM,UAAU,KAAK,QAAQ;EAC7B,MAAM,YAAY,QAAQ,UAAU,KAAK,OAAO;EAChD,QAAQ,aAAa,SAAS;GAC5B,IAAI,CAAC,MAAM,OAAO,UAAU,IAAI;GAChC,MAAM,WAAW,SAAS,QAAQ,SAAS,YAAY,QAAQ,SAAS,KAAK,MAAM,GAAG,IAAI;GAC1F,OAAO,UAAU,UAAU,OAAO,aAAa,UAAU,SAAS,IAAI,QAAQ;EAChF;CACF;AACF,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Plugin, PluginKey } from "@tiptap/pm/state";
|
|
2
|
+
import { DOMParser } from "@tiptap/pm/model";
|
|
3
|
+
//#region src/core/soft-line-breaks.ts
|
|
4
|
+
/**
|
|
5
|
+
* Re-reads the DOM of the document's own textblocks with their whitespace in full. `@tiptap/markdown` parses a Markdown
|
|
6
|
+
* soft line break (a single `\n` inside a paragraph) into a `\n` in the text node and writes it back as is; the editor
|
|
7
|
+
* shows it through `white-space: pre-wrap`. After a keystroke ProseMirror re-parses the changed DOM with
|
|
8
|
+
* `preserveWhitespace: true`, which turns every `\n` there into the schema's line-break replacement (`hardBreak`,
|
|
9
|
+
* written as ` \n`), so editing one line hard-broke every line of its paragraph. The DOM text of a textblock the view
|
|
10
|
+
* rendered is the document text, so keeping its `\n` is exact: in a re-read of one textblock (`topNode`) and in a re-read
|
|
11
|
+
* across blocks, for each textblock that already has a view (`ruleFromNode`). Elements the browser added are read as
|
|
12
|
+
* before; so are the clipboard (`parseSlice`) and code (`whitespace: 'pre'`, already in full).
|
|
13
|
+
*/
|
|
14
|
+
var SoftLineBreakParser = class extends DOMParser {
|
|
15
|
+
parse(dom, options = {}) {
|
|
16
|
+
if (options.preserveWhitespace !== true) return super.parse(dom, options);
|
|
17
|
+
const { topNode, ruleFromNode } = options;
|
|
18
|
+
const read = {
|
|
19
|
+
...options,
|
|
20
|
+
preserveWhitespace: topNode?.inlineContent ? "full" : true,
|
|
21
|
+
ruleFromNode: ruleFromNode && ((node) => this.inFull(ruleFromNode(node)))
|
|
22
|
+
};
|
|
23
|
+
return super.parse(dom, read);
|
|
24
|
+
}
|
|
25
|
+
/** `rule` reading its node's whitespace in full when that node is a textblock and the rule does not say otherwise. */
|
|
26
|
+
inFull(rule) {
|
|
27
|
+
if (!rule?.node || rule.preserveWhitespace != null || !this.schema.nodes[rule.node]?.isTextblock) return rule;
|
|
28
|
+
return {
|
|
29
|
+
...rule,
|
|
30
|
+
preserveWhitespace: "full"
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
/** The plugin that installs `SoftLineBreakParser` as the view's `domParser` for `schema`. */
|
|
35
|
+
function softLineBreaksPlugin(schema) {
|
|
36
|
+
return new Plugin({
|
|
37
|
+
key: new PluginKey("softLineBreaks"),
|
|
38
|
+
props: { domParser: new SoftLineBreakParser(schema, DOMParser.fromSchema(schema).rules) }
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { softLineBreaksPlugin };
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=soft-line-breaks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"soft-line-breaks.js","names":[],"sources":["../../src/core/soft-line-breaks.ts"],"sourcesContent":["import { DOMParser, type ParseOptions, type Schema, type TagParseRule } from '@tiptap/pm/model'\nimport { Plugin, PluginKey } from '@tiptap/pm/state'\n\ntype NodeRule = Omit<TagParseRule, 'tag'>\n\n/** `ParseOptions` with the `ruleFromNode` hook prosemirror-view passes when it re-reads its DOM (internal in prosemirror-model's types). */\ntype ReadOptions = ParseOptions & { ruleFromNode?: (node: globalThis.Node) => NodeRule | null }\n\n/**\n * Re-reads the DOM of the document's own textblocks with their whitespace in full. `@tiptap/markdown` parses a Markdown\n * soft line break (a single `\\n` inside a paragraph) into a `\\n` in the text node and writes it back as is; the editor\n * shows it through `white-space: pre-wrap`. After a keystroke ProseMirror re-parses the changed DOM with\n * `preserveWhitespace: true`, which turns every `\\n` there into the schema's line-break replacement (`hardBreak`,\n * written as ` \\n`), so editing one line hard-broke every line of its paragraph. The DOM text of a textblock the view\n * rendered is the document text, so keeping its `\\n` is exact: in a re-read of one textblock (`topNode`) and in a re-read\n * across blocks, for each textblock that already has a view (`ruleFromNode`). Elements the browser added are read as\n * before; so are the clipboard (`parseSlice`) and code (`whitespace: 'pre'`, already in full).\n */\nclass SoftLineBreakParser extends DOMParser {\n override parse(dom: globalThis.Node, options: ReadOptions = {}) {\n if (options.preserveWhitespace !== true) return super.parse(dom, options)\n const { topNode, ruleFromNode } = options\n const read: ReadOptions = {\n ...options,\n preserveWhitespace: topNode?.inlineContent ? 'full' : true,\n ruleFromNode: ruleFromNode && (node => this.inFull(ruleFromNode(node))),\n }\n return super.parse(dom, read)\n }\n\n /** `rule` reading its node's whitespace in full when that node is a textblock and the rule does not say otherwise. */\n private inFull(rule: NodeRule | null): NodeRule | null {\n if (!rule?.node || rule.preserveWhitespace != null || !this.schema.nodes[rule.node]?.isTextblock) return rule\n return { ...rule, preserveWhitespace: 'full' }\n }\n}\n\n/** The plugin that installs `SoftLineBreakParser` as the view's `domParser` for `schema`. */\nexport function softLineBreaksPlugin(schema: Schema): Plugin {\n return new Plugin({\n key: new PluginKey('softLineBreaks'),\n props: { domParser: new SoftLineBreakParser(schema, DOMParser.fromSchema(schema).rules) },\n })\n}\n"],"mappings":";;;;;;;;;;;;;AAkBA,IAAM,sBAAN,cAAkC,UAAU;CAC1C,MAAe,KAAsB,UAAuB,CAAC,GAAG;EAC9D,IAAI,QAAQ,uBAAuB,MAAM,OAAO,MAAM,MAAM,KAAK,OAAO;EACxE,MAAM,EAAE,SAAS,iBAAiB;EAClC,MAAM,OAAoB;GACxB,GAAG;GACH,oBAAoB,SAAS,gBAAgB,SAAS;GACtD,cAAc,kBAAiB,SAAQ,KAAK,OAAO,aAAa,IAAI,CAAC;EACvE;EACA,OAAO,MAAM,MAAM,KAAK,IAAI;CAC9B;;CAGA,OAAe,MAAwC;EACrD,IAAI,CAAC,MAAM,QAAQ,KAAK,sBAAsB,QAAQ,CAAC,KAAK,OAAO,MAAM,KAAK,KAAK,EAAE,aAAa,OAAO;EACzG,OAAO;GAAE,GAAG;GAAM,oBAAoB;EAAO;CAC/C;AACF;;AAGA,SAAgB,qBAAqB,QAAwB;CAC3D,OAAO,IAAI,OAAO;EAChB,KAAK,IAAI,UAAU,gBAAgB;EACnC,OAAO,EAAE,WAAW,IAAI,oBAAoB,QAAQ,UAAU,WAAW,MAAM,CAAC,CAAC,KAAK,EAAE;CAC1F,CAAC;AACH"}
|
|
@@ -33,16 +33,16 @@ type __VLS_Slots = {} & { [K in NonNullable<typeof __VLS_13>]?: (props: typeof _
|
|
|
33
33
|
};
|
|
34
34
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
35
35
|
"update:modelValue": (text: string) => any;
|
|
36
|
-
save: (text: string) => any;
|
|
37
36
|
ready: (target: DocumentSurfaceTarget) => any;
|
|
37
|
+
save: (text: string) => any;
|
|
38
38
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
39
39
|
"onUpdate:modelValue"?: ((text: string) => any) | undefined;
|
|
40
|
-
onSave?: ((text: string) => any) | undefined;
|
|
41
40
|
onReady?: ((target: DocumentSurfaceTarget) => any) | undefined;
|
|
41
|
+
onSave?: ((text: string) => any) | undefined;
|
|
42
42
|
}>, {
|
|
43
|
+
modelValue: string;
|
|
43
44
|
editable: boolean;
|
|
44
45
|
wordWrap: boolean;
|
|
45
|
-
modelValue: string;
|
|
46
46
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
47
47
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
48
48
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useUiKit } from "../../../vue/kit/use-ui-kit.js";
|
|
2
2
|
import { useEditorI18n } from "../../../vue/use-editor-i18n.js";
|
|
3
3
|
import { useStoreRef } from "../../../vue/store-ref.js";
|
|
4
|
-
import { createAiReviewBar } from "../review-bar-model.js";
|
|
5
4
|
import { useNotifier } from "../../../vue/use-notifier.js";
|
|
5
|
+
import { createAiReviewBar } from "../review-bar-model.js";
|
|
6
6
|
import { Fragment, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, onBeforeUnmount, openBlock, toDisplayString, unref, withCtx } from "vue";
|
|
7
7
|
//#region src/features/ai/components/AiReviewBar.vue
|
|
8
8
|
const _hoisted_1 = { class: "flex gap-1 p-1" };
|
|
@@ -6,10 +6,10 @@ import { useUiKit } from "../../../vue/kit/use-ui-kit.js";
|
|
|
6
6
|
import { useEditorSettings } from "../../../vue/settings.js";
|
|
7
7
|
import { useEditorI18n } from "../../../vue/use-editor-i18n.js";
|
|
8
8
|
import { useStoreRef } from "../../../vue/store-ref.js";
|
|
9
|
+
import { useNotifier } from "../../../vue/use-notifier.js";
|
|
9
10
|
import { aiSelectionHighlightKey } from "../ai-selection-highlight.js";
|
|
10
11
|
import { previewExtensions } from "../preview-extensions.js";
|
|
11
12
|
import { AI_SELECTION_MENU_KEY, createAiSelectionFlow } from "../selection-flow.js";
|
|
12
|
-
import { useNotifier } from "../../../vue/use-notifier.js";
|
|
13
13
|
import { useAiAssistant } from "../use-ai-assistant.js";
|
|
14
14
|
import _sfc_main$1 from "./ModelQuickSwitch.js";
|
|
15
15
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, onBeforeUnmount, openBlock, renderList, toDisplayString, unref, useTemplateRef, watch, withCtx, withModifiers } from "vue";
|
|
@@ -4,12 +4,12 @@ import { conversionsOf } from "../../../core/pipeline.js";
|
|
|
4
4
|
import { useUiKit } from "../../../vue/kit/use-ui-kit.js";
|
|
5
5
|
import { useEditorI18n } from "../../../vue/use-editor-i18n.js";
|
|
6
6
|
import { useStoreRef } from "../../../vue/store-ref.js";
|
|
7
|
-
import { selectionScope } from "../agent-ops.js";
|
|
8
|
-
import { createAiSidebarFlow } from "../sidebar-flow.js";
|
|
9
7
|
import { useNotifier } from "../../../vue/use-notifier.js";
|
|
10
8
|
import { useAiAssistant } from "../use-ai-assistant.js";
|
|
11
9
|
import _sfc_main$1 from "./ModelQuickSwitch.js";
|
|
10
|
+
import { selectionScope } from "../agent-ops.js";
|
|
12
11
|
import { useDocumentChat } from "../use-document-chat.js";
|
|
12
|
+
import { createAiSidebarFlow } from "../sidebar-flow.js";
|
|
13
13
|
import { AI_SIDEBAR } from "../sidebar-context.js";
|
|
14
14
|
import { sidebarMessages } from "../sidebar-messages.js";
|
|
15
15
|
import _sfc_main$2 from "./DocumentChatGenerationPart.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { citationBlockId } from "../protocol/chat.js";
|
|
2
2
|
import { useEditorI18n } from "../../../vue/use-editor-i18n.js";
|
|
3
|
+
import { useNotifier } from "../../../vue/use-notifier.js";
|
|
3
4
|
import { previewExtensions } from "../preview-extensions.js";
|
|
4
5
|
import { documentChatAnswerContent } from "../document-chat.js";
|
|
5
|
-
import { useNotifier } from "../../../vue/use-notifier.js";
|
|
6
6
|
import { createBlock, createCommentVNode, createElementBlock, defineComponent, onBeforeUnmount, openBlock, unref, watch } from "vue";
|
|
7
7
|
import { EditorContent, useEditor } from "@tiptap/vue-3";
|
|
8
8
|
//#region src/features/ai/components/DocumentChatAnswer.vue
|
|
@@ -3,8 +3,8 @@ import { useUiKit } from "../../../vue/kit/use-ui-kit.js";
|
|
|
3
3
|
import { useEditorContext } from "../../../vue/context.js";
|
|
4
4
|
import { useEditorI18n } from "../../../vue/use-editor-i18n.js";
|
|
5
5
|
import { useStoreRef } from "../../../vue/store-ref.js";
|
|
6
|
-
import { createModelTestFlow } from "../model-test-flow.js";
|
|
7
6
|
import { useModelProfiles } from "../use-model-profiles.js";
|
|
7
|
+
import { createModelTestFlow } from "../model-test-flow.js";
|
|
8
8
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, openBlock, ref, renderList, toDisplayString, unref, watch, withCtx, withModifiers } from "vue";
|
|
9
9
|
//#region src/features/ai/components/SettingsModelProfiles.vue
|
|
10
10
|
const _hoisted_1 = { class: "flex flex-col divide-y divide-[var(--sk-border)]" };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AiReview } from "./ai-review.js";
|
|
2
2
|
import { AiSelectionHighlight } from "./ai-selection-highlight.js";
|
|
3
|
+
import { modelProfiles } from "./model-profiles.js";
|
|
3
4
|
import { aiBlockAction, aiCommand } from "./block-actions.js";
|
|
4
5
|
import { completionFetcher, ghostAutocomplete } from "./ghost-autocomplete.js";
|
|
5
|
-
import { modelProfiles } from "./model-profiles.js";
|
|
6
6
|
import { Extension } from "@tiptap/core";
|
|
7
7
|
//#region src/features/ai/feature.ts
|
|
8
8
|
/** Pause after the last keystroke before an autocomplete suggestion is requested (ms). */
|
|
@@ -9,20 +9,20 @@ import { AGENT_LIMITS, AGENT_OP_OUTCOME_TEXT, AGENT_TOOL, agentFeedbackText, age
|
|
|
9
9
|
import { CHAT_LIMITS, CITATION_HREF_PREFIX, citationBlockId, documentChatMessages, documentChatSystem } from "./protocol/chat.js";
|
|
10
10
|
import { aiApplyFailure, applyAiResult, captureTarget, documentMarkdown, formatTaskResult, insertAtCaretLine, insertBlocksAtTarget, insertBlocksBelow, rangeMarkdown, resultBlocks, selectionMarkdown } from "./ai-apply.js";
|
|
11
11
|
import { AiReview, acceptAiReview, aiReviewKey, rejectAiReview, setActiveAiReviewHunk, startAiReview } from "./ai-review.js";
|
|
12
|
+
import { createAiReviewBar } from "./review-bar-model.js";
|
|
12
13
|
import { AiSelectionHighlight, aiSelectionHighlightKey, hideAiSelectionHighlight, showAiSelectionHighlight } from "./ai-selection-highlight.js";
|
|
13
14
|
import { AI_MENU_AT_CARET, AI_MENU_FOR_SELECTION, aiMenuActionsOf, openAiMenuAtCaret, openAiMenuForSelection } from "./ai-menu.js";
|
|
14
|
-
import { aiBlockAction, aiCommand, blockTextRange } from "./block-actions.js";
|
|
15
|
-
import { completionFetcher, ghostAutocomplete, ghostAutocompleteKey } from "./ghost-autocomplete.js";
|
|
16
|
-
import { modelProfiles } from "./model-profiles.js";
|
|
17
|
-
import { aiFeatureCore } from "./feature.js";
|
|
18
|
-
import { createAiReviewBar } from "./review-bar-model.js";
|
|
19
15
|
import { AI_SELECTION_MENU_KEY, createAiSelectionFlow } from "./selection-flow.js";
|
|
20
16
|
import { isRateLimited, notifyAiRateLimited } from "./rate-limit.js";
|
|
21
17
|
import { postAiSse } from "./ai-sse.js";
|
|
22
18
|
import { createAiAssistant } from "./assistant.js";
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
19
|
+
import { modelProfiles } from "./model-profiles.js";
|
|
20
|
+
import { aiBlockAction, aiCommand, blockTextRange } from "./block-actions.js";
|
|
21
|
+
import { completionFetcher, ghostAutocomplete, ghostAutocompleteKey } from "./ghost-autocomplete.js";
|
|
22
|
+
import { aiFeatureCore } from "./feature.js";
|
|
25
23
|
import { documentChatText } from "./document-chat.js";
|
|
24
|
+
import { selectionScope } from "./agent-ops.js";
|
|
26
25
|
import { createAgentOpReview } from "./agent-op-review.js";
|
|
27
26
|
import { createDocumentChat } from "./document-chat-model.js";
|
|
27
|
+
import { createAiSidebarFlow } from "./sidebar-flow.js";
|
|
28
28
|
export { AGENT_LIMITS, AGENT_OP_OUTCOMES, AGENT_OP_OUTCOME_TEXT, AGENT_OP_TYPES, AGENT_TOOL, AI_COMPLETE_LIMITS, AI_ID_PATTERN, AI_LANGUAGE_KEYS, AI_LIMITS, AI_MENU_AT_CARET, AI_MENU_FOR_SELECTION, AI_SELECTION_MENU_KEY, AI_TASKS, AI_TASK_IDS, AiReview, AiSelectionHighlight, BLOCK_LINES_LABEL, BLOCK_LINE_COMPOSITE_TEXT, BLOCK_LINE_ECHO_TEXT, BLOCK_LINE_EXAMPLE, BLOCK_LINE_EXAMPLE_ID, BLOCK_LINE_EXAMPLE_TEXT, BLOCK_LINE_HOST_TEXT, BLOCK_LINE_IDS_HINT, BLOCK_LINE_INTRO, BLOCK_LINE_LIST_TEXT, BLOCK_LINE_MARKERS, CHAT_LIMITS, CITATION_HREF_PREFIX, MODEL_REF_LIMITS, MODEL_ROLE_KEYS, TRUNCATED_LINE, acceptAiReview, agentFeedbackText, agentOpSummary, agentOpTarget, agentRetryMessage, agentShownMessage, agentUnreadableProblem, aiApplyFailure, aiBlockAction, aiBlockInputSchema, aiBlockSchema, aiCommand, aiFeatureCore, aiMenuActionsOf, aiReviewKey, aiSelectionHighlightKey, applyAiResult, blockLine, blockTasks, blockTextRange, captureTarget, checkAgentOps, citationBlockId, cleanCompletion, completeBodySchema, completeMessages, completionFetcher, completionReady, compositeChromePart, compositeLineClose, compositeLineHeader, continuedLinePrefix, createAgentOpReview, createAiAssistant, createAiReviewBar, createAiSelectionFlow, createAiSidebarFlow, createDocumentChat, documentChatMessages, documentChatSystem, documentChatText, documentMarkdown, formatTaskResult, generateBodySchema, generateProblem, ghostAutocomplete, ghostAutocompleteKey, hideAiSelectionHighlight, inBlockTasks, insertAtCaretLine, insertBlocksAtTarget, insertBlocksBelow, isRateLimited, listLinePrefix, modelProfiles, modelRefSchema, nestedLinePrefix, notifyAiRateLimited, openAiMenuAtCaret, openAiMenuForSelection, postAiSse, quoteLinePrefix, rangeMarkdown, readBlockLines, rejectAiReview, resultBlocks, runCompletion, runGenerate, selectionMarkdown, selectionScope, setActiveAiReviewHunk, showAiSelectionHighlight, singleBlockLine, startAiReview, stripBlockLineEcho, stripListMarkerEcho, withHeading, withTaskHeading };
|
|
@@ -7,14 +7,14 @@ import { useEditorI18n } from "../../../react/use-editor-i18n.js";
|
|
|
7
7
|
import { useStore } from "../../../react/use-store.js";
|
|
8
8
|
import { Button } from "../../../react/ui/button.js";
|
|
9
9
|
import { useEditorSettings } from "../../../react/settings.js";
|
|
10
|
-
import { InputGroup, InputGroupAddon, InputGroupInput } from "../../../react/ui/input-group.js";
|
|
11
|
-
import { aiSelectionHighlightKey } from "../ai-selection-highlight.js";
|
|
12
10
|
import { Popover, PopoverAnchor, PopoverContent } from "../../../react/ui/popover.js";
|
|
13
11
|
import { useNotifier } from "../../../react/use-notifier.js";
|
|
14
|
-
import {
|
|
15
|
-
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../../react/ui/select.js";
|
|
12
|
+
import { aiSelectionHighlightKey } from "../ai-selection-highlight.js";
|
|
16
13
|
import { previewExtensions } from "../preview-extensions.js";
|
|
17
14
|
import { AI_SELECTION_MENU_KEY } from "../selection-flow.js";
|
|
15
|
+
import { InputGroup, InputGroupAddon, InputGroupInput } from "../../../react/ui/input-group.js";
|
|
16
|
+
import { Alert, AlertTitle } from "../../../react/ui/alert.js";
|
|
17
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../../react/ui/select.js";
|
|
18
18
|
import { ModelQuickSwitch } from "./ModelQuickSwitch.js";
|
|
19
19
|
import { useAiAssistant } from "./use-ai-assistant.js";
|
|
20
20
|
import { useAiSelectionFlow } from "./use-ai-selection-flow.js";
|
|
@@ -8,14 +8,14 @@ import { useStore } from "../../../react/use-store.js";
|
|
|
8
8
|
import { Badge } from "../../../react/ui/badge.js";
|
|
9
9
|
import { Button } from "../../../react/ui/button.js";
|
|
10
10
|
import { Input } from "../../../react/ui/input.js";
|
|
11
|
-
import {
|
|
11
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../../react/ui/tooltip.js";
|
|
12
12
|
import { useNotifier } from "../../../react/use-notifier.js";
|
|
13
|
+
import { selectionScope } from "../agent-ops.js";
|
|
14
|
+
import { createAiSidebarFlow } from "../sidebar-flow.js";
|
|
15
|
+
import { Textarea } from "../../../react/ui/textarea.js";
|
|
13
16
|
import { Alert, AlertTitle } from "../../../react/ui/alert.js";
|
|
14
17
|
import { ModelQuickSwitch } from "./ModelQuickSwitch.js";
|
|
15
18
|
import { useAiAssistant } from "./use-ai-assistant.js";
|
|
16
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../../react/ui/tooltip.js";
|
|
17
|
-
import { selectionScope } from "../agent-ops.js";
|
|
18
|
-
import { createAiSidebarFlow } from "../sidebar-flow.js";
|
|
19
19
|
import { DocumentChatAnswer } from "./DocumentChatAnswer.js";
|
|
20
20
|
import { DocumentChatOps } from "./DocumentChatOps.js";
|
|
21
21
|
import { useDocumentChat } from "./use-document-chat.js";
|
|
@@ -4,8 +4,8 @@ import { Icon } from "../../../react/Icon.js";
|
|
|
4
4
|
import { useEditorI18n } from "../../../react/use-editor-i18n.js";
|
|
5
5
|
import { Badge } from "../../../react/ui/badge.js";
|
|
6
6
|
import { Button } from "../../../react/ui/button.js";
|
|
7
|
-
import { Alert, AlertDescription, AlertTitle } from "../../../react/ui/alert.js";
|
|
8
7
|
import { AGENT_OP_OUTCOME_KEYS } from "../agent-ops.js";
|
|
8
|
+
import { Alert, AlertDescription, AlertTitle } from "../../../react/ui/alert.js";
|
|
9
9
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
//#region src/features/ai/react/DocumentChatOps.tsx
|
|
11
11
|
const ICONS = {
|
|
@@ -4,8 +4,8 @@ import { Icon } from "../../../react/Icon.js";
|
|
|
4
4
|
import { useEditorI18n } from "../../../react/use-editor-i18n.js";
|
|
5
5
|
import { useEditorSettings } from "../../../react/settings.js";
|
|
6
6
|
import { useEditorUi } from "../../../react/editor-ui.js";
|
|
7
|
-
import { Select, SelectContent, SelectItem, SelectSeparator, SelectTrigger, SelectValue } from "../../../react/ui/select.js";
|
|
8
7
|
import { chooseQuickSwitchValue, profileIcon } from "../model-quick-switch.js";
|
|
8
|
+
import { Select, SelectContent, SelectItem, SelectSeparator, SelectTrigger, SelectValue } from "../../../react/ui/select.js";
|
|
9
9
|
import { useModelProfiles } from "./use-model-profiles.js";
|
|
10
10
|
import { useState } from "react";
|
|
11
11
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -6,10 +6,10 @@ import { useStore } from "../../../react/use-store.js";
|
|
|
6
6
|
import { Badge } from "../../../react/ui/badge.js";
|
|
7
7
|
import { Button } from "../../../react/ui/button.js";
|
|
8
8
|
import { Input } from "../../../react/ui/input.js";
|
|
9
|
+
import { createModelTestFlow } from "../model-test-flow.js";
|
|
9
10
|
import { Alert, AlertTitle } from "../../../react/ui/alert.js";
|
|
10
11
|
import { useModelProfiles } from "./use-model-profiles.js";
|
|
11
12
|
import { Label } from "../../../react/ui/label.js";
|
|
12
|
-
import { createModelTestFlow } from "../model-test-flow.js";
|
|
13
13
|
import { useEffect, useMemo, useState } from "react";
|
|
14
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
15
|
//#region src/features/ai/react/SettingsModelProfiles.tsx
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useEditorContext } from "../../../react/context.js";
|
|
2
2
|
import { useStore } from "../../../react/use-store.js";
|
|
3
|
-
import { modelProfiles } from "../model-profiles.js";
|
|
4
3
|
import { useNotifier } from "../../../react/use-notifier.js";
|
|
5
4
|
import { createAiAssistant } from "../assistant.js";
|
|
5
|
+
import { modelProfiles } from "../model-profiles.js";
|
|
6
6
|
import { useEffect, useMemo } from "react";
|
|
7
7
|
//#region src/features/ai/react/use-ai-assistant.ts
|
|
8
8
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEditorContext } from "../../../react/context.js";
|
|
2
2
|
import { useStore } from "../../../react/use-store.js";
|
|
3
|
-
import { modelProfiles } from "../model-profiles.js";
|
|
4
3
|
import { useNotifier } from "../../../react/use-notifier.js";
|
|
4
|
+
import { modelProfiles } from "../model-profiles.js";
|
|
5
5
|
import { createDocumentChat } from "../document-chat-model.js";
|
|
6
6
|
import { useEffect, useMemo } from "react";
|
|
7
7
|
//#region src/features/ai/react/use-document-chat.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useEditorContext } from "../../vue/context.js";
|
|
2
2
|
import { useStoreRef } from "../../vue/store-ref.js";
|
|
3
|
-
import { modelProfiles } from "./model-profiles.js";
|
|
4
|
-
import { createAiAssistant } from "./assistant.js";
|
|
5
3
|
import { useNotifier } from "../../vue/use-notifier.js";
|
|
4
|
+
import { createAiAssistant } from "./assistant.js";
|
|
5
|
+
import { modelProfiles } from "./model-profiles.js";
|
|
6
6
|
import { computed, getCurrentScope, onScopeDispose } from "vue";
|
|
7
7
|
//#region src/features/ai/use-ai-assistant.ts
|
|
8
8
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useEditorContext } from "../../vue/context.js";
|
|
2
2
|
import { useStoreRef } from "../../vue/store-ref.js";
|
|
3
|
+
import { useNotifier } from "../../vue/use-notifier.js";
|
|
3
4
|
import { modelProfiles } from "./model-profiles.js";
|
|
4
5
|
import { createDocumentChat } from "./document-chat-model.js";
|
|
5
|
-
import { useNotifier } from "../../vue/use-notifier.js";
|
|
6
6
|
import { computed, getCurrentScope, onScopeDispose } from "vue";
|
|
7
7
|
//#region src/features/ai/use-document-chat.ts
|
|
8
8
|
/**
|
package/dist/features/ai/vue.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { aiFeatureCore } from "./feature.js";
|
|
2
1
|
import _sfc_main from "./components/AiReviewBar.js";
|
|
3
2
|
import { useAiAssistant } from "./use-ai-assistant.js";
|
|
4
3
|
import { useModelProfiles } from "./use-model-profiles.js";
|
|
@@ -6,6 +5,7 @@ import _sfc_main$4 from "./components/ModelQuickSwitch.js";
|
|
|
6
5
|
import _sfc_main$1 from "./components/AiSelectionMenu.js";
|
|
7
6
|
import _sfc_main$6 from "./components/SettingsModelProfiles.js";
|
|
8
7
|
import _sfc_main$5 from "./components/SettingsAiTab.js";
|
|
8
|
+
import { aiFeatureCore } from "./feature.js";
|
|
9
9
|
import _sfc_main$2 from "./components/DocumentChatAnswer.js";
|
|
10
10
|
import _sfc_main$3 from "./components/DocumentChatOps.js";
|
|
11
11
|
import { useDocumentChat } from "./use-document-chat.js";
|
|
@@ -2,8 +2,8 @@ import { documentAuthors } from "../schema.js";
|
|
|
2
2
|
import { useUiKit } from "../../../vue/kit/use-ui-kit.js";
|
|
3
3
|
import { useEditorSettings } from "../../../vue/settings.js";
|
|
4
4
|
import { useEditorI18n } from "../../../vue/use-editor-i18n.js";
|
|
5
|
-
import { currentAuthor } from "../attribution.js";
|
|
6
5
|
import { authorStyleItems } from "../author-color-styles.js";
|
|
6
|
+
import { currentAuthor } from "../attribution.js";
|
|
7
7
|
import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, renderList, toDisplayString, unref } from "vue";
|
|
8
8
|
//#region src/features/authors/components/AuthorColorsPanel.vue
|
|
9
9
|
const _hoisted_1 = { class: "w-72 p-3 flex flex-col gap-3" };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useUiKit } from "../../../vue/kit/use-ui-kit.js";
|
|
2
2
|
import { useEditorSettings } from "../../../vue/settings.js";
|
|
3
3
|
import { useEditorI18n } from "../../../vue/use-editor-i18n.js";
|
|
4
|
-
import { authorStyleItems } from "../author-color-styles.js";
|
|
5
4
|
import _sfc_main$1 from "../../../vue/components/SettingsSection.js";
|
|
5
|
+
import { authorStyleItems } from "../author-color-styles.js";
|
|
6
6
|
import { computed, createElementBlock, createElementVNode, createVNode, defineComponent, openBlock, unref, withCtx } from "vue";
|
|
7
7
|
//#region src/features/authors/components/SettingsAuthorsTab.vue
|
|
8
8
|
const _hoisted_1 = { class: "flex flex-col gap-8" };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AUTHOR_COLOR_STYLES } from "../../settings/values.js";
|
|
2
2
|
import { AuthorMark, authorsSchemaExtensions, documentAuthors } from "./schema.js";
|
|
3
|
+
import { authorStyleItems } from "./author-color-styles.js";
|
|
3
4
|
import { AuthorAttribution, authorAttributionKey, authorAttributionPlugin, currentAuthor } from "./attribution.js";
|
|
4
5
|
import { authorsFeatureCore } from "./feature.js";
|
|
5
|
-
import { authorStyleItems } from "./author-color-styles.js";
|
|
6
6
|
export { AUTHOR_COLOR_STYLES, AuthorAttribution, AuthorMark, authorAttributionKey, authorAttributionPlugin, authorStyleItems, authorsFeatureCore, authorsSchemaExtensions, currentAuthor, documentAuthors };
|
|
@@ -3,11 +3,11 @@ import { documentAuthors } from "../schema.js";
|
|
|
3
3
|
import { cn } from "../../../react/ui/utils.js";
|
|
4
4
|
import { useEditorI18n } from "../../../react/use-editor-i18n.js";
|
|
5
5
|
import { useEditorSettings } from "../../../react/settings.js";
|
|
6
|
+
import { authorStyleItems } from "../author-color-styles.js";
|
|
7
|
+
import { currentAuthor } from "../attribution.js";
|
|
6
8
|
import { Label } from "../../../react/ui/label.js";
|
|
7
9
|
import { Switch } from "../../../react/ui/switch.js";
|
|
8
|
-
import { currentAuthor } from "../attribution.js";
|
|
9
10
|
import { RadioGroup, RadioGroupItem } from "../../../react/ui/radio-group.js";
|
|
10
|
-
import { authorStyleItems } from "../author-color-styles.js";
|
|
11
11
|
import { useId } from "react";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { useEditorState } from "@tiptap/react";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { AUTHOR_COLOR_STYLES } from "../../../settings/values.js";
|
|
2
2
|
import { useEditorI18n } from "../../../react/use-editor-i18n.js";
|
|
3
3
|
import { useEditorSettings } from "../../../react/settings.js";
|
|
4
|
+
import { authorStyleItems } from "../author-color-styles.js";
|
|
4
5
|
import { SettingsSection } from "../../../react/SettingsSection.js";
|
|
5
6
|
import { Label } from "../../../react/ui/label.js";
|
|
6
7
|
import { Switch } from "../../../react/ui/switch.js";
|
|
7
8
|
import { RadioGroup, RadioGroupItem } from "../../../react/ui/radio-group.js";
|
|
8
|
-
import { authorStyleItems } from "../author-color-styles.js";
|
|
9
9
|
import { useId } from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
//#region src/features/authors/react/SettingsAuthorsTab.tsx
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { authorsFeatureCore } from "./feature.js";
|
|
2
1
|
import _sfc_main$1 from "./components/AuthorColorsPanel.js";
|
|
3
2
|
import _sfc_main from "./components/AuthorColorsButton.js";
|
|
4
3
|
import _sfc_main$2 from "./components/SettingsAuthorsTab.js";
|
|
4
|
+
import { authorsFeatureCore } from "./feature.js";
|
|
5
5
|
//#region src/features/authors/vue.ts
|
|
6
6
|
/** The Vue authors feature (Nuxt UI): see `authorsFeatureCore`. */
|
|
7
7
|
function authorsFeature() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { blockUiFeatureCore } from "./feature.js";
|
|
2
1
|
import { outerBlockAt, outerBlocksAt, typedBlockAround } from "./block-target.js";
|
|
3
2
|
import { BLOCK_CORNER_ATTR, actionSurfacesOf, blockActionsFor, blockCornerOf, effectiveTarget, sameBlock, selectedBlockOf } from "./block-actions.js";
|
|
3
|
+
import { blockUiFeatureCore } from "./feature.js";
|
|
4
4
|
export { BLOCK_CORNER_ATTR, actionSurfacesOf, blockActionsFor, blockCornerOf, blockUiFeatureCore, effectiveTarget, outerBlockAt, outerBlocksAt, sameBlock, selectedBlockOf, typedBlockAround };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { cn } from "../../../react/ui/utils.js";
|
|
2
2
|
import { Icon } from "../../../react/Icon.js";
|
|
3
3
|
import { Button } from "../../../react/ui/button.js";
|
|
4
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from "../../../react/ui/dropdown-menu.js";
|
|
4
5
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../../react/ui/tooltip.js";
|
|
5
6
|
import { blockActionsFor, liveTargetOf, overlayPlaceOf } from "../block-actions.js";
|
|
6
|
-
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from "../../../react/ui/dropdown-menu.js";
|
|
7
7
|
import { useEffect, useLayoutEffect, useReducer, useRef, useState } from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
//#region src/features/block-ui/react/BlockActionsOverlay.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { blockUiFeatureCore } from "./feature.js";
|
|
2
1
|
import _sfc_main from "./components/BlockActionsOverlay.js";
|
|
3
2
|
import _sfc_main$1 from "./components/BlockUi.js";
|
|
3
|
+
import { blockUiFeatureCore } from "./feature.js";
|
|
4
4
|
//#region src/features/block-ui/vue.ts
|
|
5
5
|
/** The Vue block-ui feature: the Nuxt UI drag handle, permanent handles and the block actions (hover bar and/or selected-block toolbar, per `options.actions`). */
|
|
6
6
|
function blockUiFeature(options) {
|
|
@@ -4,8 +4,8 @@ import { Icon } from "../../../react/Icon.js";
|
|
|
4
4
|
import { useEditorI18n } from "../../../react/use-editor-i18n.js";
|
|
5
5
|
import { Badge } from "../../../react/ui/badge.js";
|
|
6
6
|
import { Button } from "../../../react/ui/button.js";
|
|
7
|
-
import { Textarea } from "../../../react/ui/textarea.js";
|
|
8
7
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from "../../../react/ui/dropdown-menu.js";
|
|
8
|
+
import { Textarea } from "../../../react/ui/textarea.js";
|
|
9
9
|
import { CommentAvatar } from "./CommentAvatar.js";
|
|
10
10
|
import { useMemo, useRef, useState } from "react";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|