@skaile/forge-editor 6.1.0 → 6.1.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 +16 -0
- package/dist/code/CodeSurface.vue.d.ts +3 -3
- package/dist/document/DocumentSurface.vue.d.ts +3 -3
- package/dist/features/composites/components/CompositeInspector.js +8 -8
- package/dist/features/composites/vue.js +1 -1
- package/dist/markdown/MarkdownSurface.vue.d.ts +7 -7
- package/dist/nuxt/module.d.ts +4 -3
- package/dist/nuxt/module.js +3 -0
- package/dist/nuxt/module.js.map +1 -1
- package/dist/nuxt/prebundle.js +41 -0
- package/dist/nuxt/prebundle.js.map +1 -0
- package/dist/tree/DocumentTree.js +1 -1
- 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 +1 -1
- package/dist/vue/index.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 6.1.2 - 2026-10-28
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- The optional `@skaile/forge-chat` peer range is `^0.2.3`, the tested version, instead of `^0.2.0`.
|
|
8
|
+
|
|
9
|
+
### Documented
|
|
10
|
+
|
|
11
|
+
- In a bundled host (Vite, Nuxt) a missing `@skaile/forge-chat` peer surfaces as the bundler's own resolve error for `@skaile/forge-chat`; the named missing-peer error of `@skaile/forge-editor/ai/vue/chat` appears when the module loads unbundled (Node, SSR). The entry uses a top-level `await`, so the host's build target must be ES2022 or later.
|
|
12
|
+
|
|
13
|
+
## 6.1.1 - 2026-10-28
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- The Nuxt module pre-bundles the TipTap/ProseMirror/Yjs entries the editor imports (`vite.optimizeDeps.include`, merged with the host's list). Nuxt transpiles every registered module's package, so Vite served the editor's files unbundled; an entry it had not pre-bundled loaded ProseMirror a second time next to the pre-bundled `@tiptap/*` deps, and the editor failed in `nuxt dev` with `RangeError: Adding different instances of a keyed plugin`. Hosts can drop their own `optimizeDeps` workarounds for these entries.
|
|
18
|
+
|
|
3
19
|
## 6.1.0 - 2026-10-28
|
|
4
20
|
|
|
5
21
|
### Added
|
|
@@ -11,16 +11,16 @@ type __VLS_Props = {
|
|
|
11
11
|
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
|
-
ready: (view: EditorView) => any;
|
|
15
14
|
"update:modelValue": (text: string) => any;
|
|
15
|
+
ready: (view: EditorView) => any;
|
|
16
16
|
save: (text: string) => any;
|
|
17
17
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
-
onReady?: ((view: EditorView) => any) | undefined;
|
|
19
18
|
"onUpdate:modelValue"?: ((text: string) => any) | undefined;
|
|
19
|
+
onReady?: ((view: EditorView) => any) | undefined;
|
|
20
20
|
onSave?: ((text: string) => any) | undefined;
|
|
21
21
|
}>, {
|
|
22
|
-
modelValue: string;
|
|
23
22
|
editable: boolean;
|
|
23
|
+
modelValue: string;
|
|
24
24
|
wordWrap: boolean;
|
|
25
25
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
26
|
declare const _default: typeof __VLS_export;
|
|
@@ -32,16 +32,16 @@ type __VLS_Slots = {} & { [K in NonNullable<typeof __VLS_13>]?: (props: typeof _
|
|
|
32
32
|
binary?: (props: typeof __VLS_26) => any;
|
|
33
33
|
};
|
|
34
34
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
35
|
-
ready: (target: DocumentSurfaceTarget) => any;
|
|
36
35
|
"update:modelValue": (text: string) => any;
|
|
36
|
+
ready: (target: DocumentSurfaceTarget) => any;
|
|
37
37
|
save: (text: string) => any;
|
|
38
38
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
39
|
-
onReady?: ((target: DocumentSurfaceTarget) => any) | undefined;
|
|
40
39
|
"onUpdate:modelValue"?: ((text: string) => any) | undefined;
|
|
40
|
+
onReady?: ((target: DocumentSurfaceTarget) => any) | undefined;
|
|
41
41
|
onSave?: ((text: string) => any) | undefined;
|
|
42
42
|
}>, {
|
|
43
|
-
modelValue: string;
|
|
44
43
|
editable: boolean;
|
|
44
|
+
modelValue: string;
|
|
45
45
|
wordWrap: boolean;
|
|
46
46
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
47
47
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -4,10 +4,10 @@ import { propertyHostOf } from "../properties.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 { compositeFieldText, isStructuredField } from "../inspector-model.js";
|
|
7
|
-
import _sfc_main$1 from "./
|
|
8
|
-
import _sfc_main$2 from "./
|
|
9
|
-
import _sfc_main$3 from "./
|
|
10
|
-
import _sfc_main$4 from "./
|
|
7
|
+
import _sfc_main$1 from "./DerivationBadge.js";
|
|
8
|
+
import _sfc_main$2 from "./CompositeFieldEditor.js";
|
|
9
|
+
import _sfc_main$3 from "./InspectorSections.js";
|
|
10
|
+
import _sfc_main$4 from "./DocumentBadges.js";
|
|
11
11
|
import { useCompositeInspector } from "../use-composite-inspector.js";
|
|
12
12
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, renderList, renderSlot, toDisplayString, unref, useId, withCtx } from "vue";
|
|
13
13
|
//#region src/features/composites/components/CompositeInspector.vue
|
|
@@ -109,7 +109,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
109
109
|
class: "text-sm font-semibold text-[var(--sk-fg-highlighted)]"
|
|
110
110
|
}, toDisplayString(unref(t)("composites.inspector.document")), 9, _hoisted_4),
|
|
111
111
|
createCommentVNode(" Chips of the whole document other features add (`EditorFeature.documentBadges`), e.g. the Freigabestatus. "),
|
|
112
|
-
createVNode(_sfc_main$
|
|
112
|
+
createVNode(_sfc_main$4, { editor: __props.editor }, null, 8, ["editor"])
|
|
113
113
|
]), createElementVNode("div", _hoisted_5, [renderSlot(_ctx.$slots, "document"), createElementVNode("dl", _hoisted_6, [
|
|
114
114
|
createElementVNode("dt", _hoisted_7, toDisplayString(unref(t)("composites.inspector.composites")), 1),
|
|
115
115
|
unref(kinds).length ? (openBlock(), createElementBlock("dd", _hoisted_8, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(kinds), (kind) => {
|
|
@@ -267,7 +267,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
267
267
|
label: field.label,
|
|
268
268
|
size: "sm"
|
|
269
269
|
}, {
|
|
270
|
-
default: withCtx(() => [createCommentVNode(" Fields whose value is not text (reference, bibliography, derivation) have their own editors, as in the details card; a text input would overwrite the stored object with a string. "), unref(isStructuredField)(field) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [__props.editor ? (openBlock(), createBlock(_sfc_main$
|
|
270
|
+
default: withCtx(() => [createCommentVNode(" Fields whose value is not text (reference, bibliography, derivation) have their own editors, as in the details card; a text input would overwrite the stored object with a string. "), unref(isStructuredField)(field) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [__props.editor ? (openBlock(), createBlock(_sfc_main$2, {
|
|
271
271
|
key: 0,
|
|
272
272
|
editor: __props.editor,
|
|
273
273
|
row: unref(properties),
|
|
@@ -335,14 +335,14 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
335
335
|
label: unref(t)("composites.inspector.derivation"),
|
|
336
336
|
size: "sm"
|
|
337
337
|
}, {
|
|
338
|
-
default: withCtx(() => [createVNode(_sfc_main$
|
|
338
|
+
default: withCtx(() => [createVNode(_sfc_main$1, {
|
|
339
339
|
editor: __props.editor,
|
|
340
340
|
node: unref(derivation).node
|
|
341
341
|
}, null, 8, ["editor", "node"])]),
|
|
342
342
|
_: 1
|
|
343
343
|
}, 8, ["label"])) : createCommentVNode("v-if", true),
|
|
344
344
|
createCommentVNode(" Sections other features add (`EditorFeature.inspectorSections`), e.g. the Prüfstand. "),
|
|
345
|
-
__props.editor ? (openBlock(), createBlock(_sfc_main$
|
|
345
|
+
__props.editor ? (openBlock(), createBlock(_sfc_main$3, {
|
|
346
346
|
key: 3,
|
|
347
347
|
editor: __props.editor,
|
|
348
348
|
node: blockNode.value
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { embedViewOptions } from "./embed-dom.js";
|
|
2
2
|
import { typedBlockViewOptions } from "./node-views.js";
|
|
3
3
|
import { compositeFeatureCore } from "./feature.js";
|
|
4
|
-
import _sfc_main$13 from "./components/DocumentBadges.js";
|
|
5
4
|
import _sfc_main from "./components/BlockEmbedView.js";
|
|
6
5
|
import _sfc_main$1 from "./components/CiteView.js";
|
|
7
6
|
import _sfc_main$11 from "./components/CompositeView.js";
|
|
@@ -21,6 +20,7 @@ import _sfc_main$14 from "./components/EdgesSection.js";
|
|
|
21
20
|
import _sfc_main$16 from "./components/FocusChip.js";
|
|
22
21
|
import _sfc_main$18 from "./components/ReferenceView.js";
|
|
23
22
|
import _sfc_main$19 from "./components/SettingsEditingTab.js";
|
|
23
|
+
import _sfc_main$13 from "./components/DocumentBadges.js";
|
|
24
24
|
import _sfc_main$6 from "./components/CompositeInspector.js";
|
|
25
25
|
import _sfc_main$9 from "./components/CompositeTable.js";
|
|
26
26
|
import { VueNodeViewRenderer } from "@tiptap/vue-3";
|
|
@@ -41,29 +41,29 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
41
41
|
settingsOpen: import("vue").WritableComputedRef<boolean, boolean>;
|
|
42
42
|
settingsTab: import("vue").WritableComputedRef<string | undefined, string | undefined>;
|
|
43
43
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
44
|
+
settingsOpen: (tab?: string | undefined) => any;
|
|
44
45
|
"update:sidebarOpen": (value: boolean) => any;
|
|
45
46
|
"update:commentsOpen": (value: boolean) => any;
|
|
46
|
-
ready: (editor: Editor) => any;
|
|
47
47
|
"update:modelValue": (markdown: string) => any;
|
|
48
|
+
frontmatter: (frontmatter: string | null) => any;
|
|
49
|
+
ready: (editor: Editor) => any;
|
|
48
50
|
metadataCreate: (list: string, item: MetadataItem) => any;
|
|
49
51
|
contentError: (error: Error) => any;
|
|
50
|
-
settingsOpen: (tab?: string | undefined) => any;
|
|
51
|
-
frontmatter: (frontmatter: string | null) => any;
|
|
52
52
|
diagnostics: (diagnostics: MarkdownDiagnostic[]) => any;
|
|
53
53
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
54
|
+
onSettingsOpen?: ((tab?: string | undefined) => any) | undefined;
|
|
54
55
|
"onUpdate:sidebarOpen"?: ((value: boolean) => any) | undefined;
|
|
55
56
|
"onUpdate:commentsOpen"?: ((value: boolean) => any) | undefined;
|
|
56
|
-
onReady?: ((editor: Editor) => any) | undefined;
|
|
57
57
|
"onUpdate:modelValue"?: ((markdown: string) => any) | undefined;
|
|
58
|
+
onFrontmatter?: ((frontmatter: string | null) => any) | undefined;
|
|
59
|
+
onReady?: ((editor: Editor) => any) | undefined;
|
|
58
60
|
onMetadataCreate?: ((list: string, item: MetadataItem) => any) | undefined;
|
|
59
61
|
onContentError?: ((error: Error) => any) | undefined;
|
|
60
|
-
onSettingsOpen?: ((tab?: string | undefined) => any) | undefined;
|
|
61
|
-
onFrontmatter?: ((frontmatter: string | null) => any) | undefined;
|
|
62
62
|
onDiagnostics?: ((diagnostics: MarkdownDiagnostic[]) => any) | undefined;
|
|
63
63
|
}>, {
|
|
64
|
-
modelValue: string;
|
|
65
64
|
editable: boolean;
|
|
66
65
|
settingsUi: "internal" | "external";
|
|
66
|
+
modelValue: string;
|
|
67
67
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
68
68
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
69
69
|
declare const _default: typeof __VLS_export;
|
package/dist/nuxt/module.d.ts
CHANGED
|
@@ -3,9 +3,10 @@ import { EditorConfigInput } from "../config/index.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* Module options (`tiptapEditor` in `nuxt.config`): the editor's configuration with every key optional, see `EditorConfig`,
|
|
5
5
|
* plus `server`. `server: false` is for a host without an editor server (a client-only editor, or a host that serves its own
|
|
6
|
-
* `/api/editor/*`): the module then adds only the build wiring (stylesheets, transpile,
|
|
7
|
-
* AI configuration. It mounts no routes, no websocket and no server config, and registers no
|
|
8
|
-
* plugin's backend talks to the module's routes; the host installs the editor context itself.
|
|
6
|
+
* `/api/editor/*`): the module then adds only the build wiring (stylesheets, transpile, Vite pre-bundling, Tailwind
|
|
7
|
+
* `@source`) and the public AI configuration. It mounts no routes, no websocket and no server config, and registers no
|
|
8
|
+
* client plugin, because that plugin's backend talks to the module's routes; the host installs the editor context itself.
|
|
9
|
+
* Default `true`.
|
|
9
10
|
*/
|
|
10
11
|
export type ModuleOptions = EditorConfigInput & {
|
|
11
12
|
server?: boolean;
|
package/dist/nuxt/module.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { defineEditorConfig, publicConfig, serverConfig } from "../config/index.js";
|
|
2
|
+
import { PREBUNDLED_DEPS } from "./prebundle.js";
|
|
2
3
|
import { addPlugin, addServerScanDir, createResolver, defineNuxtModule } from "nuxt/kit";
|
|
3
4
|
//#region src/nuxt/module.ts
|
|
4
5
|
/**
|
|
@@ -16,6 +17,8 @@ var module_default = defineNuxtModule({
|
|
|
16
17
|
const { resolve } = createResolver(import.meta.url);
|
|
17
18
|
const packageSrc = resolve("..");
|
|
18
19
|
nuxt.options.build.transpile.push(packageSrc);
|
|
20
|
+
const optimizeDeps = nuxt.options.vite.optimizeDeps ??= {};
|
|
21
|
+
optimizeDeps.include = [...optimizeDeps.include ?? [], ...PREBUNDLED_DEPS.filter((dep) => !optimizeDeps.include?.includes(dep))];
|
|
19
22
|
nuxt.options.css.push(resolve("../vue/kit/nuxt-ui.css"));
|
|
20
23
|
nuxt.options.css.push(resolve("../styles/core.css"), resolve("../styles/media.css"), resolve("../styles/mentions.css"), resolve("../styles/authors.css"), resolve("../styles/comments.css"), resolve("../styles/transcript.css"), resolve("../styles/composites.css"), resolve("../styles/ai.css"), resolve("../styles/collab.css"), resolve("../styles/block-ui.css"), resolve("../styles/themes.css"));
|
|
21
24
|
if (server) {
|
package/dist/nuxt/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","names":[],"sources":["../../src/nuxt/module.ts"],"sourcesContent":["import { addPlugin, addServerScanDir, createResolver, defineNuxtModule } from 'nuxt/kit'\nimport { defineEditorConfig, type EditorConfigInput, publicConfig, serverConfig } from '../config'\n\n/**\n * Module options (`tiptapEditor` in `nuxt.config`): the editor's configuration with every key optional, see `EditorConfig`,\n * plus `server`. `server: false` is for a host without an editor server (a client-only editor, or a host that serves its own\n * `/api/editor/*`): the module then adds only the build wiring (stylesheets, transpile, Tailwind `@source`) and the public
|
|
1
|
+
{"version":3,"file":"module.js","names":[],"sources":["../../src/nuxt/module.ts"],"sourcesContent":["import { addPlugin, addServerScanDir, createResolver, defineNuxtModule } from 'nuxt/kit'\nimport { defineEditorConfig, type EditorConfigInput, publicConfig, serverConfig } from '../config'\nimport { PREBUNDLED_DEPS } from './prebundle'\n\n/**\n * Module options (`tiptapEditor` in `nuxt.config`): the editor's configuration with every key optional, see `EditorConfig`,\n * plus `server`. `server: false` is for a host without an editor server (a client-only editor, or a host that serves its own\n * `/api/editor/*`): the module then adds only the build wiring (stylesheets, transpile, Vite pre-bundling, Tailwind\n * `@source`) and the public AI configuration. It mounts no routes, no websocket and no server config, and registers no\n * client plugin, because that plugin's backend talks to the module's routes; the host installs the editor context itself.\n * Default `true`.\n */\nexport type ModuleOptions = EditorConfigInput & { server?: boolean }\n\n/**\n * Nuxt/Nitro integration of the editor package: the client context plugin (settings persistence, AI configuration),\n * a server plugin that mounts the editor's routes and the collaboration websocket (`installEditorServer`) and the AI configuration with its server-only secrets. The host\n * plugs in through `provideEditorServer()` (`@skaile/forge-editor/server/nitro`) in a Nitro plugin (auth, loading and storing\n * document content). Components are imported explicitly from the package entries; nothing is auto-registered.\n */\nexport default defineNuxtModule<ModuleOptions>({\n meta: { name: 'tiptap-editor', configKey: 'tiptapEditor' },\n setup({ server = true, ...options }, nuxt) {\n const { resolve } = createResolver(import.meta.url)\n // `resolve('..')` is the package root of the built output (`dist`) or of `src` in this repository's app: both\n // hold the stylesheets and the unbundled `nuxt/runtime` files, which Nuxt compiles for the client and Nitro for the server.\n const packageSrc = resolve('..')\n nuxt.options.build.transpile.push(packageSrc)\n // Transpiled (Nuxt does that for every module's package anyway), the editor's files are not pre-bundled: pre-bundle\n // the TipTap/ProseMirror/Yjs entries they import, so they share one ProseMirror with the pre-bundled `@tiptap/*` deps.\n const optimizeDeps = nuxt.options.vite.optimizeDeps ??= {}\n optimizeDeps.include = [...(optimizeDeps.include ?? []), ...PREBUNDLED_DEPS.filter(dep => !optimizeDeps.include?.includes(dep))]\n // The Nuxt UI token map comes first: the feature sheets (and an Obsidian theme, `themes.css`, last) read and may override `--sk-*`.\n nuxt.options.css.push(resolve('../vue/kit/nuxt-ui.css'))\n nuxt.options.css.push(\n resolve('../styles/core.css'),\n resolve('../styles/media.css'),\n resolve('../styles/mentions.css'),\n resolve('../styles/authors.css'),\n resolve('../styles/comments.css'),\n resolve('../styles/transcript.css'),\n resolve('../styles/composites.css'),\n resolve('../styles/ai.css'),\n resolve('../styles/collab.css'),\n resolve('../styles/block-ui.css'),\n resolve('../styles/themes.css'),\n )\n if (server) {\n addPlugin({ src: resolve('./runtime/plugins/editor-context-nuxt-ui.client.ts'), mode: 'client' })\n addServerScanDir(resolve('./runtime/server'))\n }\n // Tailwind only scans the app layers listed in Nuxt UI's generated `ui.css` (`@source \"<layer>/app/**/*\"`), so the\n // utility classes used by the package's components would never be generated. Append its source. `@nuxt/ui` must be\n // registered before this module.\n nuxt.hook('modules:done', () => {\n const uiCss = nuxt.options.build.templates.find(t => t.filename === 'ui.css')\n if (!uiCss?.getContents) throw new Error('tiptap-editor: @nuxt/ui muss vor diesem Modul registriert sein (ui.css-Template fehlt)')\n const getContents = uiCss.getContents\n uiCss.getContents = async data => `@source \"${packageSrc}/**/*\";\\n${await getContents(data)}`\n })\n const config = defineEditorConfig(options)\n if (server) {\n nuxt.options.nitro.experimental = { ...nuxt.options.nitro.experimental, websocket: true }\n // Nitro bundles the package (the runtime files import `h3` and `nitropack/runtime`, which the host's Nitro resolves): never leave it external.\n nuxt.options.nitro.externals = { ...nuxt.options.nitro.externals, inline: [...(nuxt.options.nitro.externals?.inline ?? []), '@skaile/forge-editor', packageSrc] }\n // The server view keeps an empty `apiKey` on the shared key, every preset and the transcription, so their `NUXT_TIPTAP_EDITOR_AI_*` env variables have a key to override.\n nuxt.options.runtimeConfig.tiptapEditor = {\n ...serverConfig(config),\n ...(nuxt.options.runtimeConfig.tiptapEditor as object | undefined),\n }\n }\n // Default role presets for the client before `GET /api/ai/models` has answered; read by the client context plugin (or, with `server: false`, by the host's own).\n nuxt.options.runtimeConfig.public.tiptapEditor = {\n ...publicConfig(config),\n ...(nuxt.options.runtimeConfig.public.tiptapEditor as object | undefined),\n }\n },\n})\n"],"mappings":";;;;;;;;;;AAoBA,IAAA,iBAAe,iBAAgC;CAC7C,MAAM;EAAE,MAAM;EAAiB,WAAW;CAAe;CACzD,MAAM,EAAE,SAAS,MAAM,GAAG,WAAW,MAAM;EACzC,MAAM,EAAE,YAAY,eAAe,YAAY,GAAG;EAGlD,MAAM,aAAa,QAAQ,IAAI;EAC/B,KAAK,QAAQ,MAAM,UAAU,KAAK,UAAU;EAG5C,MAAM,eAAe,KAAK,QAAQ,KAAK,iBAAiB,CAAC;EACzD,aAAa,UAAU,CAAC,GAAI,aAAa,WAAW,CAAC,GAAI,GAAG,gBAAgB,QAAO,QAAO,CAAC,aAAa,SAAS,SAAS,GAAG,CAAC,CAAC;EAE/H,KAAK,QAAQ,IAAI,KAAK,QAAQ,wBAAwB,CAAC;EACvD,KAAK,QAAQ,IAAI,KACf,QAAQ,oBAAoB,GAC5B,QAAQ,qBAAqB,GAC7B,QAAQ,wBAAwB,GAChC,QAAQ,uBAAuB,GAC/B,QAAQ,wBAAwB,GAChC,QAAQ,0BAA0B,GAClC,QAAQ,0BAA0B,GAClC,QAAQ,kBAAkB,GAC1B,QAAQ,sBAAsB,GAC9B,QAAQ,wBAAwB,GAChC,QAAQ,sBAAsB,CAChC;EACA,IAAI,QAAQ;GACV,UAAU;IAAE,KAAK,QAAQ,oDAAoD;IAAG,MAAM;GAAS,CAAC;GAChG,iBAAiB,QAAQ,kBAAkB,CAAC;EAC9C;EAIA,KAAK,KAAK,sBAAsB;GAC9B,MAAM,QAAQ,KAAK,QAAQ,MAAM,UAAU,MAAK,MAAK,EAAE,aAAa,QAAQ;GAC5E,IAAI,CAAC,OAAO,aAAa,MAAM,IAAI,MAAM,wFAAwF;GACjI,MAAM,cAAc,MAAM;GAC1B,MAAM,cAAc,OAAM,SAAQ,YAAY,WAAW,WAAW,MAAM,YAAY,IAAI;EAC5F,CAAC;EACD,MAAM,SAAS,mBAAmB,OAAO;EACzC,IAAI,QAAQ;GACV,KAAK,QAAQ,MAAM,eAAe;IAAE,GAAG,KAAK,QAAQ,MAAM;IAAc,WAAW;GAAK;GAExF,KAAK,QAAQ,MAAM,YAAY;IAAE,GAAG,KAAK,QAAQ,MAAM;IAAW,QAAQ;KAAC,GAAI,KAAK,QAAQ,MAAM,WAAW,UAAU,CAAC;KAAI;KAAwB;IAAU;GAAE;GAEhK,KAAK,QAAQ,cAAc,eAAe;IACxC,GAAG,aAAa,MAAM;IACtB,GAAI,KAAK,QAAQ,cAAc;GACjC;EACF;EAEA,KAAK,QAAQ,cAAc,OAAO,eAAe;GAC/C,GAAG,aAAa,MAAM;GACtB,GAAI,KAAK,QAAQ,cAAc,OAAO;EACxC;CACF;AACF,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//#region src/nuxt/prebundle.ts
|
|
2
|
+
/**
|
|
3
|
+
* The bare TipTap/ProseMirror/Yjs imports of the Vue side of the package, which the Nuxt module adds to Vite's
|
|
4
|
+
* `optimizeDeps.include`. Nuxt transpiles every registered module's package, so Vite serves the editor's files unbundled
|
|
5
|
+
* and resolves these imports at runtime. An entry Vite has not pre-bundled is then loaded from `node_modules` next to the
|
|
6
|
+
* copy inside the pre-bundled `@tiptap/*` deps: ProseMirror (or Yjs) runs twice and the editor fails with
|
|
7
|
+
* `RangeError: Adding different instances of a keyed plugin`. Every such import must be listed; `test/nuxt-prebundle.test.ts`
|
|
8
|
+
* checks the sources against this list.
|
|
9
|
+
*/
|
|
10
|
+
const PREBUNDLED_DEPS = [
|
|
11
|
+
"@tiptap/core",
|
|
12
|
+
"@tiptap/extension-collaboration",
|
|
13
|
+
"@tiptap/extension-collaboration-caret",
|
|
14
|
+
"@tiptap/extension-drag-handle-vue-3",
|
|
15
|
+
"@tiptap/extension-file-handler",
|
|
16
|
+
"@tiptap/extension-image",
|
|
17
|
+
"@tiptap/extension-list",
|
|
18
|
+
"@tiptap/extension-mention",
|
|
19
|
+
"@tiptap/extension-node-range",
|
|
20
|
+
"@tiptap/extension-strike",
|
|
21
|
+
"@tiptap/extension-table",
|
|
22
|
+
"@tiptap/extension-unique-id",
|
|
23
|
+
"@tiptap/extensions",
|
|
24
|
+
"@tiptap/markdown",
|
|
25
|
+
"@tiptap/pm/history",
|
|
26
|
+
"@tiptap/pm/keymap",
|
|
27
|
+
"@tiptap/pm/model",
|
|
28
|
+
"@tiptap/pm/state",
|
|
29
|
+
"@tiptap/pm/transform",
|
|
30
|
+
"@tiptap/pm/view",
|
|
31
|
+
"@tiptap/starter-kit",
|
|
32
|
+
"@tiptap/suggestion",
|
|
33
|
+
"@tiptap/vue-3",
|
|
34
|
+
"@tiptap/vue-3/menus",
|
|
35
|
+
"@tiptap/y-tiptap",
|
|
36
|
+
"yjs"
|
|
37
|
+
];
|
|
38
|
+
//#endregion
|
|
39
|
+
export { PREBUNDLED_DEPS };
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=prebundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prebundle.js","names":[],"sources":["../../src/nuxt/prebundle.ts"],"sourcesContent":["/**\n * The bare TipTap/ProseMirror/Yjs imports of the Vue side of the package, which the Nuxt module adds to Vite's\n * `optimizeDeps.include`. Nuxt transpiles every registered module's package, so Vite serves the editor's files unbundled\n * and resolves these imports at runtime. An entry Vite has not pre-bundled is then loaded from `node_modules` next to the\n * copy inside the pre-bundled `@tiptap/*` deps: ProseMirror (or Yjs) runs twice and the editor fails with\n * `RangeError: Adding different instances of a keyed plugin`. Every such import must be listed; `test/nuxt-prebundle.test.ts`\n * checks the sources against this list.\n */\nexport const PREBUNDLED_DEPS = [\n '@tiptap/core',\n '@tiptap/extension-collaboration',\n '@tiptap/extension-collaboration-caret',\n '@tiptap/extension-drag-handle-vue-3',\n '@tiptap/extension-file-handler',\n '@tiptap/extension-image',\n '@tiptap/extension-list',\n '@tiptap/extension-mention',\n '@tiptap/extension-node-range',\n '@tiptap/extension-strike',\n '@tiptap/extension-table',\n '@tiptap/extension-unique-id',\n '@tiptap/extensions',\n '@tiptap/markdown',\n '@tiptap/pm/history',\n '@tiptap/pm/keymap',\n '@tiptap/pm/model',\n '@tiptap/pm/state',\n '@tiptap/pm/transform',\n '@tiptap/pm/view',\n '@tiptap/starter-kit',\n '@tiptap/suggestion',\n '@tiptap/vue-3',\n '@tiptap/vue-3/menus',\n '@tiptap/y-tiptap',\n 'yjs',\n] as const\n"],"mappings":";;;;;;;;;AAQA,MAAa,kBAAkB;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF"}
|
|
@@ -5,10 +5,10 @@ import { basketById } from "../features/composites/baskets.js";
|
|
|
5
5
|
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
|
+
import _sfc_main$1 from "../features/composites/components/DocumentBadges.js";
|
|
8
9
|
import { DRAG_MIME, focusCrumbs, indexItems, isOutlineHeader, itemBasket } from "./tree-items.js";
|
|
9
10
|
import { refocusRow, rowPosition } from "./row-focus.js";
|
|
10
11
|
import { rowOf } from "./tree-model.js";
|
|
11
|
-
import _sfc_main$1 from "../features/composites/components/DocumentBadges.js";
|
|
12
12
|
import { useTreeModel } from "./use-tree-model.js";
|
|
13
13
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, mergeModels, normalizeClass, normalizeStyle, openBlock, renderList, renderSlot, toDisplayString, unref, useModel, withCtx, withKeys, withModifiers } from "vue";
|
|
14
14
|
//#region src/tree/DocumentTree.vue
|
|
@@ -3,10 +3,10 @@ import { useEditorSettings } from "../vue/settings.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 { useFileImport } from "../features/media/vue.js";
|
|
6
7
|
import { treeView } from "./tree-view-model.js";
|
|
7
8
|
import { createTreeModel } from "./tree-model.js";
|
|
8
9
|
import { createTreeExecutor, treeEditorOf } from "./tree-host.js";
|
|
9
|
-
import { useFileImport } from "../features/media/vue.js";
|
|
10
10
|
import { computed, onScopeDispose, shallowRef, watch } from "vue";
|
|
11
11
|
//#region src/tree/use-tree-model.ts
|
|
12
12
|
/**
|
|
@@ -82,21 +82,21 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
82
82
|
editor: import("vue").ComputedRef<Editor | undefined>;
|
|
83
83
|
preset: ComposedEditor<Component>;
|
|
84
84
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
85
|
+
settingsOpen: (tab?: string | undefined) => any;
|
|
85
86
|
"update:sidebarOpen": (value: boolean) => any;
|
|
86
87
|
"update:commentsOpen": (value: boolean) => any;
|
|
87
|
-
ready: (editor: Editor) => any;
|
|
88
88
|
"update:modelValue": (content: JSONContent) => any;
|
|
89
|
+
ready: (editor: Editor) => any;
|
|
89
90
|
metadataCreate: (list: string, item: MetadataItem) => any;
|
|
90
91
|
contentError: (error: Error) => any;
|
|
91
|
-
settingsOpen: (tab?: string | undefined) => any;
|
|
92
92
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
93
|
+
onSettingsOpen?: ((tab?: string | undefined) => any) | undefined;
|
|
93
94
|
"onUpdate:sidebarOpen"?: ((value: boolean) => any) | undefined;
|
|
94
95
|
"onUpdate:commentsOpen"?: ((value: boolean) => any) | undefined;
|
|
95
|
-
onReady?: ((editor: Editor) => any) | undefined;
|
|
96
96
|
"onUpdate:modelValue"?: ((content: JSONContent) => any) | undefined;
|
|
97
|
+
onReady?: ((editor: Editor) => any) | undefined;
|
|
97
98
|
onMetadataCreate?: ((list: string, item: MetadataItem) => any) | undefined;
|
|
98
99
|
onContentError?: ((error: Error) => any) | undefined;
|
|
99
|
-
onSettingsOpen?: ((tab?: string | undefined) => any) | undefined;
|
|
100
100
|
}>, {
|
|
101
101
|
content: ContentLevel | readonly FeatureId[];
|
|
102
102
|
ai: boolean;
|
|
@@ -41,21 +41,21 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
41
41
|
editor: import("vue").ComputedRef<Editor | undefined>;
|
|
42
42
|
preset: EditorPreset<Component>;
|
|
43
43
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
44
|
+
settingsOpen: (tab?: string | undefined) => any;
|
|
44
45
|
"update:sidebarOpen": (value: boolean) => any;
|
|
45
46
|
"update:commentsOpen": (value: boolean) => any;
|
|
46
|
-
ready: (editor: Editor) => any;
|
|
47
47
|
"update:modelValue": (content: JSONContent) => any;
|
|
48
|
+
ready: (editor: Editor) => any;
|
|
48
49
|
metadataCreate: (list: string, item: MetadataItem) => any;
|
|
49
50
|
contentError: (error: Error) => any;
|
|
50
|
-
settingsOpen: (tab?: string | undefined) => any;
|
|
51
51
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
52
|
+
onSettingsOpen?: ((tab?: string | undefined) => any) | undefined;
|
|
52
53
|
"onUpdate:sidebarOpen"?: ((value: boolean) => any) | undefined;
|
|
53
54
|
"onUpdate:commentsOpen"?: ((value: boolean) => any) | undefined;
|
|
54
|
-
onReady?: ((editor: Editor) => any) | undefined;
|
|
55
55
|
"onUpdate:modelValue"?: ((content: JSONContent) => any) | undefined;
|
|
56
|
+
onReady?: ((editor: Editor) => any) | undefined;
|
|
56
57
|
onMetadataCreate?: ((list: string, item: MetadataItem) => any) | undefined;
|
|
57
58
|
onContentError?: ((error: Error) => any) | undefined;
|
|
58
|
-
onSettingsOpen?: ((tab?: string | undefined) => any) | undefined;
|
|
59
59
|
}>, {
|
|
60
60
|
editable: boolean;
|
|
61
61
|
settingsUi: "internal" | "external";
|
|
@@ -43,21 +43,21 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
43
43
|
settingsOpen: import("vue").Ref<boolean, boolean>;
|
|
44
44
|
settingsTab: import("vue").Ref<string | undefined, string | undefined>;
|
|
45
45
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
46
|
+
settingsOpen: (tab?: string | undefined) => any;
|
|
46
47
|
"update:sidebarOpen": (value: boolean) => any;
|
|
47
48
|
"update:commentsOpen": (value: boolean) => any;
|
|
48
|
-
ready: (editor: Editor) => any;
|
|
49
49
|
"update:modelValue": (content: JSONContent) => any;
|
|
50
|
+
ready: (editor: Editor) => any;
|
|
50
51
|
metadataCreate: (list: string, item: MetadataItem) => any;
|
|
51
52
|
contentError: (error: Error) => any;
|
|
52
|
-
settingsOpen: (tab?: string | undefined) => any;
|
|
53
53
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
54
|
+
onSettingsOpen?: ((tab?: string | undefined) => any) | undefined;
|
|
54
55
|
"onUpdate:sidebarOpen"?: ((value: boolean) => any) | undefined;
|
|
55
56
|
"onUpdate:commentsOpen"?: ((value: boolean) => any) | undefined;
|
|
56
|
-
onReady?: ((editor: Editor) => any) | undefined;
|
|
57
57
|
"onUpdate:modelValue"?: ((content: JSONContent) => any) | undefined;
|
|
58
|
+
onReady?: ((editor: Editor) => any) | undefined;
|
|
58
59
|
onMetadataCreate?: ((list: string, item: MetadataItem) => any) | undefined;
|
|
59
60
|
onContentError?: ((error: Error) => any) | undefined;
|
|
60
|
-
onSettingsOpen?: ((tab?: string | undefined) => any) | undefined;
|
|
61
61
|
}>, {
|
|
62
62
|
editable: boolean;
|
|
63
63
|
settingsUi: "internal" | "external";
|
package/dist/vue/compose.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { coreUiFeature } from "../core/core-feature.js";
|
|
2
2
|
import { AI_BINDINGS, layerCompositions } from "../presets/layer.js";
|
|
3
|
-
import { mediaFeature } from "../features/media/vue.js";
|
|
4
3
|
import _sfc_main from "./components/EditorCommandPalette.js";
|
|
5
4
|
import { aiFeature } from "../features/ai/vue.js";
|
|
6
5
|
import { authorsFeature } from "../features/authors/vue.js";
|
|
@@ -8,6 +7,7 @@ import { blockUiFeature } from "../features/block-ui/vue.js";
|
|
|
8
7
|
import { collabFeature } from "../features/collab/vue.js";
|
|
9
8
|
import { commentsFeature } from "../features/comments/vue.js";
|
|
10
9
|
import { compositeFeature } from "../features/composites/vue.js";
|
|
10
|
+
import { mediaFeature } from "../features/media/vue.js";
|
|
11
11
|
import { themesFeature } from "../features/themes/vue.js";
|
|
12
12
|
import { pruefungFeature } from "../features/pruefung/vue.js";
|
|
13
13
|
import { exploreFeature } from "../features/explore/vue.js";
|
package/dist/vue/index.js
CHANGED
|
@@ -11,8 +11,8 @@ import { vueSuggestionRenderer } from "./suggestion-renderer.js";
|
|
|
11
11
|
import _sfc_main$2 from "./components/EditorSettingsPanel.js";
|
|
12
12
|
import _sfc_main$1 from "./components/EditorSettingsModal.js";
|
|
13
13
|
import _sfc_main$3 from "./components/EditorSurface.js";
|
|
14
|
-
import { useNotifier } from "./use-notifier.js";
|
|
15
14
|
import _sfc_main from "./components/EditorCommandPalette.js";
|
|
15
|
+
import { useNotifier } from "./use-notifier.js";
|
|
16
16
|
import _sfc_main$5 from "./components/SettingsSection.js";
|
|
17
17
|
import _sfc_main$4 from "./components/EditorToolbar.js";
|
|
18
18
|
export { EDITOR_CONTEXT, EDITOR_UI, _sfc_main as EditorCommandPalette, _sfc_main$1 as EditorSettingsModal, _sfc_main$2 as EditorSettingsPanel, _sfc_main$3 as EditorSurface, _sfc_main$4 as EditorToolbar, _sfc_main$5 as SettingsSection, _sfc_main$6 as SuggestionList, VUE_UI_KIT, attachNotifier, createEditor, createQueuedNotifier, storeFromRef, trackedStore, useEditorContext, useEditorI18n, useEditorSettings, useEditorUi, useNotifier, useStoreRef, useUiKit, useWritableStoreRef, vueSuggestionRenderer };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skaile/forge-editor",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Vue and React editor library on TipTap v3 (Vue: Nuxt UI; React: shadcn/ui): framework-free features with Vue and React bindings, simple and advanced presets, tree-shakeable entries. Built ESM with type declarations.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -703,7 +703,7 @@
|
|
|
703
703
|
"@lezer/highlight": "^1.2.1",
|
|
704
704
|
"@nuxt/ui": "^4.11.1",
|
|
705
705
|
"@skaile/forge-app-actions": "^0.1.0 || ^0.2.0 || ^0.3.0 || ^0.4.0",
|
|
706
|
-
"@skaile/forge-chat": "^0.2.
|
|
706
|
+
"@skaile/forge-chat": "^0.2.3",
|
|
707
707
|
"@tiptap/core": "^3.31.3",
|
|
708
708
|
"@tiptap/pm": "^3.31.3",
|
|
709
709
|
"@tiptap/react": "^3.31.3",
|