@skaile/forge-editor 5.1.1 → 6.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## 6.0.1 - 2026-10-28
4
+
5
+ ### Fixed
6
+
7
+ - The optional `@skaile/forge-app-actions` peer accepts `^0.4.0`, so a host on forge-app-actions 0.4 (for example through `@skaile/forge-app`) installs the editor without an ERESOLVE override. Tested against 0.4.0.
8
+
9
+ ## 6.0.0 - 2026-10-28
10
+
11
+ ### Changed (breaking)
12
+
13
+ - The Vue AI sidebar moved to its own entry, `@skaile/forge-editor/ai/vue/chat` (`features/ai/vue-chat.ts`). `AiSidebar` is no longer exported from `@skaile/forge-editor/ai/vue`; the rest of `/ai/vue` (`aiFeature`, `AiReviewBar`, `AiSelectionMenu`, `ModelQuickSwitch`, `SettingsAiTab`, `SettingsModelProfiles`, `DocumentChatAnswer`, `DocumentChatOps`, the hooks) and every other entry (core, simple, advanced, server, React) no longer reach `@skaile/forge-chat` at all. Composition (`composeEditor`, `advancedEditor`, `AdvancedEditor`, `SimpleEditor`) never placed the sidebar; the host does, so a host that does not place it loads no chat code.
14
+ - `@skaile/forge-chat` is an optional peer (`^0.2.0`, tested with `0.2.3`) instead of a regular dependency. Install it only when you place the sidebar. Importing `@skaile/forge-editor/ai/vue/chat` without it throws an error that names `@skaile/forge-chat` and how to install it (`importWithChatPeer`); the UI is never dropped silently.
15
+ - `@skaile/forge-editor/styles/ai.css` no longer imports `@skaile/forge-chat/styles/chat.css`, and the Nuxt module (`@skaile/forge-editor/nuxt`) no longer transpiles `@skaile/forge-chat`, lists its `dist` in `components.transform.include` or appends it to Tailwind's `@source`. The chat resources belong to the host; the chat package's own Nuxt module owns the transpile and components wiring.
16
+
17
+ ### Migration from 5.x
18
+
19
+ 1. Change the import: `import { AiSidebar } from '@skaile/forge-editor/ai/vue/chat'` (keep `aiFeature`, `AiReviewBar`, `ModelQuickSwitch`, … on `@skaile/forge-editor/ai/vue`). The component and its props are unchanged.
20
+ 2. Add `@skaile/forge-chat` (`^0.2.3` tested) to your own dependencies when you place the sidebar; hosts without the sidebar need nothing.
21
+ 3. Nuxt: add `'@skaile/forge-chat/nuxt'` to `modules` after `'@nuxt/ui'`, import `@skaile/forge-chat/styles/chat.css` in your CSS entry and add `@source "<relative path>/node_modules/@skaile/forge-chat/dist";` next to the editor's `@source`. Plain Vue hosts already had the `@source`; they now also import `chat.css`.
22
+
23
+ ### Added
24
+
25
+ - Bundle-isolation fixtures `ai-no-chat` and `advanced-no-chat` (`checks/entries.ts`) prove that the AI feature and the advanced editor without the sidebar contain no `@skaile/forge-chat` module; the server and React fixtures forbid it too, and `@skaile/forge-chat` must stay an optional peer.
26
+
3
27
  ## 5.1.1 - 2026-10-28
4
28
 
5
29
  ### Changed
@@ -11,17 +11,17 @@ 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;
14
15
  "update:modelValue": (text: string) => any;
15
16
  save: (text: string) => any;
16
- ready: (view: EditorView) => any;
17
17
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
18
+ onReady?: ((view: EditorView) => any) | undefined;
18
19
  "onUpdate:modelValue"?: ((text: string) => any) | undefined;
19
20
  onSave?: ((text: string) => any) | undefined;
20
- onReady?: ((view: EditorView) => any) | undefined;
21
21
  }>, {
22
22
  editable: boolean;
23
- wordWrap: boolean;
24
23
  modelValue: string;
24
+ wordWrap: boolean;
25
25
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
26
  declare const _default: typeof __VLS_export;
27
27
  //#endregion
@@ -32,17 +32,17 @@ 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;
35
36
  "update:modelValue": (text: string) => any;
36
37
  save: (text: string) => any;
37
- ready: (target: DocumentSurfaceTarget) => any;
38
38
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
39
+ onReady?: ((target: DocumentSurfaceTarget) => any) | undefined;
39
40
  "onUpdate:modelValue"?: ((text: string) => any) | undefined;
40
41
  onSave?: ((text: string) => any) | undefined;
41
- onReady?: ((target: DocumentSurfaceTarget) => any) | undefined;
42
42
  }>, {
43
43
  editable: boolean;
44
- wordWrap: boolean;
45
44
  modelValue: string;
45
+ wordWrap: boolean;
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;
@@ -0,0 +1,20 @@
1
+ //#region src/features/ai/chat-peer.ts
2
+ /** Matches the resolver errors of Node, Vite and Rolldown for a missing `@skaile/forge-chat` (not for a file inside it that misses another package). */
3
+ const MISSING_CHAT = /(?:Cannot find (?:package|module)|Failed to resolve import|Could not resolve)\s+["']@skaile\/forge-chat[\/"']/;
4
+ const MISSING_CHAT_PEER_MESSAGE = "@skaile/forge-editor/ai/vue/chat renders the AI sidebar on the optional peer @skaile/forge-chat, which is not installed. Install it (`npm install @skaile/forge-chat`; Nuxt hosts also add `@skaile/forge-chat/nuxt` after `@nuxt/ui` to `modules`).";
5
+ /**
6
+ * Loads a module that reaches `@skaile/forge-chat`. A resolver failure for the chat package becomes an error that names
7
+ * the optional peer and how to install it; any other failure is rethrown unchanged.
8
+ */
9
+ async function importWithChatPeer(load) {
10
+ try {
11
+ return await load();
12
+ } catch (cause) {
13
+ if (cause instanceof Error && MISSING_CHAT.test(cause.message)) throw new Error(MISSING_CHAT_PEER_MESSAGE, { cause });
14
+ throw cause;
15
+ }
16
+ }
17
+ //#endregion
18
+ export { MISSING_CHAT_PEER_MESSAGE, importWithChatPeer };
19
+
20
+ //# sourceMappingURL=chat-peer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-peer.js","names":[],"sources":["../../../src/features/ai/chat-peer.ts"],"sourcesContent":["/** Matches the resolver errors of Node, Vite and Rolldown for a missing `@skaile/forge-chat` (not for a file inside it that misses another package). */\nconst MISSING_CHAT = /(?:Cannot find (?:package|module)|Failed to resolve import|Could not resolve)\\s+[\"']@skaile\\/forge-chat[\\/\"']/\n\nexport const MISSING_CHAT_PEER_MESSAGE\n = '@skaile/forge-editor/ai/vue/chat renders the AI sidebar on the optional peer @skaile/forge-chat, which is not installed. '\n + 'Install it (`npm install @skaile/forge-chat`; Nuxt hosts also add `@skaile/forge-chat/nuxt` after `@nuxt/ui` to `modules`).'\n\n/**\n * Loads a module that reaches `@skaile/forge-chat`. A resolver failure for the chat package becomes an error that names\n * the optional peer and how to install it; any other failure is rethrown unchanged.\n */\nexport async function importWithChatPeer<T>(load: () => Promise<T>): Promise<T> {\n try {\n return await load()\n }\n catch (cause) {\n if (cause instanceof Error && MISSING_CHAT.test(cause.message)) throw new Error(MISSING_CHAT_PEER_MESSAGE, { cause })\n throw cause\n }\n}\n"],"mappings":";;AACA,MAAM,eAAe;AAErB,MAAa,4BACT;;;;;AAOJ,eAAsB,mBAAsB,MAAoC;CAC9E,IAAI;EACF,OAAO,MAAM,KAAK;CACpB,SACO,OAAO;EACZ,IAAI,iBAAiB,SAAS,aAAa,KAAK,MAAM,OAAO,GAAG,MAAM,IAAI,MAAM,2BAA2B,EAAE,MAAM,CAAC;EACpH,MAAM;CACR;AACF"}
@@ -9,9 +9,9 @@ import { createAiSidebarFlow } from "../sidebar-flow.js";
9
9
  import { useNotifier } from "../../../vue/use-notifier.js";
10
10
  import { useAiAssistant } from "../use-ai-assistant.js";
11
11
  import _sfc_main$1 from "./ModelQuickSwitch.js";
12
+ import { useDocumentChat } from "../use-document-chat.js";
12
13
  import { AI_SIDEBAR } from "../sidebar-context.js";
13
14
  import { sidebarMessages } from "../sidebar-messages.js";
14
- import { useDocumentChat } from "../use-document-chat.js";
15
15
  import _sfc_main$2 from "./DocumentChatGenerationPart.js";
16
16
  import _sfc_main$3 from "./DocumentChatOpsPart.js";
17
17
  import _sfc_main$4 from "./DocumentChatTextPart.js";
@@ -1,7 +1,7 @@
1
1
  import { withTaskHeading } from "../protocol/tasks.js";
2
2
  import { useUiKit } from "../../../vue/kit/use-ui-kit.js";
3
- import { AI_SIDEBAR } from "../sidebar-context.js";
4
3
  import _sfc_main$1 from "./DocumentChatAnswer.js";
4
+ import { AI_SIDEBAR } from "../sidebar-context.js";
5
5
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, inject, openBlock, toDisplayString, unref } from "vue";
6
6
  //#region src/features/ai/components/DocumentChatGenerationPart.vue
7
7
  const _hoisted_1 = { class: "flex flex-col gap-2 rounded-lg border border-[var(--sk-border)] p-3 text-sm" };
@@ -1,5 +1,5 @@
1
- import { AI_SIDEBAR } from "../sidebar-context.js";
2
1
  import _sfc_main$1 from "./DocumentChatOps.js";
2
+ import { AI_SIDEBAR } from "../sidebar-context.js";
3
3
  import { computed, createElementBlock, createVNode, defineComponent, inject, openBlock, unref } from "vue";
4
4
  //#region src/features/ai/components/DocumentChatOpsPart.vue
5
5
  const _hoisted_1 = { class: "text-sm" };
@@ -1,6 +1,6 @@
1
1
  import { useUiKit } from "../../../vue/kit/use-ui-kit.js";
2
- import { AI_SIDEBAR } from "../sidebar-context.js";
3
2
  import _sfc_main$1 from "./DocumentChatAnswer.js";
3
+ import { AI_SIDEBAR } from "../sidebar-context.js";
4
4
  import { computed, createBlock, createCommentVNode, createElementBlock, defineComponent, inject, openBlock, unref } from "vue";
5
5
  //#region src/features/ai/components/DocumentChatTextPart.vue
6
6
  const _hoisted_1 = { class: "text-sm" };
@@ -17,8 +17,8 @@ export type ChatStream = (messages: ChatMessage[], signal: AbortSignal) => Async
17
17
  export declare const generateBodySchema: z.ZodObject<{
18
18
  task: z.ZodEnum<{
19
19
  custom: "custom";
20
- continue: "continue";
21
20
  generate: "generate";
21
+ continue: "continue";
22
22
  reformulate: "reformulate";
23
23
  "transcript-summary": "transcript-summary";
24
24
  "transcript-minutes": "transcript-minutes";
@@ -0,0 +1,5 @@
1
+ import _default from "./components/AiSidebar.vue.js";
2
+ //#region src/features/ai/vue-chat.d.ts
3
+ export declare const AiSidebar: typeof _default;
4
+ //#endregion
5
+ //# sourceMappingURL=vue-chat.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { importWithChatPeer } from "./chat-peer.js";
2
+ //#region src/features/ai/vue-chat.ts
3
+ /**
4
+ * The Vue AI sidebar, on the optional peer `@skaile/forge-chat` (`ChatPanel`): kept out of `./ai/vue` so a host without a chat
5
+ * library never loads it. Importing this entry without the peer throws an error that names `@skaile/forge-chat`; the host
6
+ * places `AiSidebar` beside the editor (see `./ai/vue` for the feature and the other components).
7
+ */
8
+ const { default: sidebar } = await importWithChatPeer(() => import("./components/AiSidebar.js"));
9
+ const AiSidebar = sidebar;
10
+ //#endregion
11
+ export { AiSidebar };
12
+
13
+ //# sourceMappingURL=vue-chat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vue-chat.js","names":[],"sources":["../../../src/features/ai/vue-chat.ts"],"sourcesContent":["import type AiSidebarComponent from './components/AiSidebar.vue'\nimport { importWithChatPeer } from './chat-peer'\n\n/**\n * The Vue AI sidebar, on the optional peer `@skaile/forge-chat` (`ChatPanel`): kept out of `./ai/vue` so a host without a chat\n * library never loads it. Importing this entry without the peer throws an error that names `@skaile/forge-chat`; the host\n * places `AiSidebar` beside the editor (see `./ai/vue` for the feature and the other components).\n */\nconst { default: sidebar } = await importWithChatPeer(() => import('./components/AiSidebar.vue'))\n\nexport const AiSidebar: typeof AiSidebarComponent = sidebar\n"],"mappings":";;;;;;;AAQA,MAAM,EAAE,SAAS,YAAY,MAAM,yBAAyB,OAAO,4BAA6B;AAEhG,MAAa,YAAuC"}
@@ -1,21 +1,20 @@
1
1
  import { VueFeature } from "../../vue/index.js";
2
2
  import _default from "./components/AiReviewBar.vue.js";
3
3
  import _default$1 from "./components/AiSelectionMenu.vue.js";
4
- import _default$2 from "./components/AiSidebar.vue.js";
5
- import _default$3 from "./components/DocumentChatAnswer.vue.js";
4
+ import _default$2 from "./components/DocumentChatAnswer.vue.js";
6
5
  import { useDocumentChat } from "./use-document-chat.js";
7
- import _default$4 from "./components/DocumentChatOps.vue.js";
8
- import _default$5 from "./components/ModelQuickSwitch.vue.js";
9
- import _default$6 from "./components/SettingsAiTab.vue.js";
10
- import _default$7 from "./components/SettingsModelProfiles.vue.js";
6
+ import _default$3 from "./components/DocumentChatOps.vue.js";
7
+ import _default$4 from "./components/ModelQuickSwitch.vue.js";
8
+ import _default$5 from "./components/SettingsAiTab.vue.js";
9
+ import _default$6 from "./components/SettingsModelProfiles.vue.js";
11
10
  import { useAiAssistant } from "./use-ai-assistant.js";
12
11
  import { useModelProfiles } from "./use-model-profiles.js";
13
12
  //#region src/features/ai/vue.d.ts
14
13
  /**
15
- * The Vue AI feature (Nuxt UI): see `aiFeatureCore`. The host places `AiSidebar` (and optionally `ModelQuickSwitch`)
16
- * beside the editor.
14
+ * The Vue AI feature (Nuxt UI): see `aiFeatureCore`. The host places `AiSidebar` (from `./ai/vue/chat`, on the optional peer
15
+ * `@skaile/forge-chat`) and optionally `ModelQuickSwitch` beside the editor.
17
16
  */
18
17
  export declare function aiFeature(): VueFeature;
19
18
  //#endregion
20
- export { _default as AiReviewBar, _default$1 as AiSelectionMenu, _default$2 as AiSidebar, _default$3 as DocumentChatAnswer, _default$4 as DocumentChatOps, _default$5 as ModelQuickSwitch, _default$6 as SettingsAiTab, _default$7 as SettingsModelProfiles, useAiAssistant, useDocumentChat, useModelProfiles };
19
+ export { _default as AiReviewBar, _default$1 as AiSelectionMenu, _default$2 as DocumentChatAnswer, _default$3 as DocumentChatOps, _default$4 as ModelQuickSwitch, _default$5 as SettingsAiTab, _default$6 as SettingsModelProfiles, useAiAssistant, useDocumentChat, useModelProfiles };
21
20
  //# sourceMappingURL=vue.d.ts.map
@@ -2,27 +2,26 @@ import { aiFeatureCore } from "./feature.js";
2
2
  import _sfc_main from "./components/AiReviewBar.js";
3
3
  import { useAiAssistant } from "./use-ai-assistant.js";
4
4
  import { useModelProfiles } from "./use-model-profiles.js";
5
- import _sfc_main$5 from "./components/ModelQuickSwitch.js";
5
+ import _sfc_main$4 from "./components/ModelQuickSwitch.js";
6
6
  import _sfc_main$1 from "./components/AiSelectionMenu.js";
7
- import _sfc_main$7 from "./components/SettingsModelProfiles.js";
8
- import _sfc_main$6 from "./components/SettingsAiTab.js";
7
+ import _sfc_main$6 from "./components/SettingsModelProfiles.js";
8
+ import _sfc_main$5 from "./components/SettingsAiTab.js";
9
+ import _sfc_main$2 from "./components/DocumentChatAnswer.js";
10
+ import _sfc_main$3 from "./components/DocumentChatOps.js";
9
11
  import { useDocumentChat } from "./use-document-chat.js";
10
- import _sfc_main$3 from "./components/DocumentChatAnswer.js";
11
- import _sfc_main$4 from "./components/DocumentChatOps.js";
12
- import _sfc_main$2 from "./components/AiSidebar.js";
13
12
  //#region src/features/ai/vue.ts
14
13
  /**
15
- * The Vue AI feature (Nuxt UI): see `aiFeatureCore`. The host places `AiSidebar` (and optionally `ModelQuickSwitch`)
16
- * beside the editor.
14
+ * The Vue AI feature (Nuxt UI): see `aiFeatureCore`. The host places `AiSidebar` (from `./ai/vue/chat`, on the optional peer
15
+ * `@skaile/forge-chat`) and optionally `ModelQuickSwitch` beside the editor.
17
16
  */
18
17
  function aiFeature() {
19
18
  return aiFeatureCore({
20
19
  selectionMenu: _sfc_main$1,
21
20
  reviewBar: _sfc_main,
22
- settingsTab: _sfc_main$6
21
+ settingsTab: _sfc_main$5
23
22
  });
24
23
  }
25
24
  //#endregion
26
- export { _sfc_main as AiReviewBar, _sfc_main$1 as AiSelectionMenu, _sfc_main$2 as AiSidebar, _sfc_main$3 as DocumentChatAnswer, _sfc_main$4 as DocumentChatOps, _sfc_main$5 as ModelQuickSwitch, _sfc_main$6 as SettingsAiTab, _sfc_main$7 as SettingsModelProfiles, aiFeature, useAiAssistant, useDocumentChat, useModelProfiles };
25
+ export { _sfc_main as AiReviewBar, _sfc_main$1 as AiSelectionMenu, _sfc_main$2 as DocumentChatAnswer, _sfc_main$3 as DocumentChatOps, _sfc_main$4 as ModelQuickSwitch, _sfc_main$5 as SettingsAiTab, _sfc_main$6 as SettingsModelProfiles, aiFeature, useAiAssistant, useDocumentChat, useModelProfiles };
27
26
 
28
27
  //# sourceMappingURL=vue.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"vue.js","names":["AiSelectionMenu","AiReviewBar","SettingsAiTab"],"sources":["../../../src/features/ai/vue.ts"],"sourcesContent":["import type { Component } from 'vue'\nimport type { VueFeature } from '../../vue'\nimport AiReviewBar from './components/AiReviewBar.vue'\nimport AiSelectionMenu from './components/AiSelectionMenu.vue'\nimport SettingsAiTab from './components/SettingsAiTab.vue'\nimport { aiFeatureCore } from './feature'\n\nexport { default as AiReviewBar } from './components/AiReviewBar.vue'\nexport { default as AiSelectionMenu } from './components/AiSelectionMenu.vue'\nexport { default as AiSidebar } from './components/AiSidebar.vue'\nexport { default as DocumentChatAnswer } from './components/DocumentChatAnswer.vue'\nexport { default as DocumentChatOps } from './components/DocumentChatOps.vue'\nexport { default as ModelQuickSwitch } from './components/ModelQuickSwitch.vue'\nexport { default as SettingsAiTab } from './components/SettingsAiTab.vue'\nexport { default as SettingsModelProfiles } from './components/SettingsModelProfiles.vue'\nexport { useAiAssistant } from './use-ai-assistant'\nexport { useDocumentChat } from './use-document-chat'\nexport { useModelProfiles } from './use-model-profiles'\n\n/**\n * The Vue AI feature (Nuxt UI): see `aiFeatureCore`. The host places `AiSidebar` (and optionally `ModelQuickSwitch`)\n * beside the editor.\n */\nexport function aiFeature(): VueFeature {\n return aiFeatureCore<Component>({ selectionMenu: AiSelectionMenu, reviewBar: AiReviewBar, settingsTab: SettingsAiTab })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAuBA,SAAgB,YAAwB;CACtC,OAAO,cAAyB;EAAE,eAAeA;EAAiB,WAAWC;EAAa,aAAaC;CAAc,CAAC;AACxH"}
1
+ {"version":3,"file":"vue.js","names":["AiSelectionMenu","AiReviewBar","SettingsAiTab"],"sources":["../../../src/features/ai/vue.ts"],"sourcesContent":["import type { Component } from 'vue'\nimport type { VueFeature } from '../../vue'\nimport AiReviewBar from './components/AiReviewBar.vue'\nimport AiSelectionMenu from './components/AiSelectionMenu.vue'\nimport SettingsAiTab from './components/SettingsAiTab.vue'\nimport { aiFeatureCore } from './feature'\n\nexport { default as AiReviewBar } from './components/AiReviewBar.vue'\nexport { default as AiSelectionMenu } from './components/AiSelectionMenu.vue'\nexport { default as DocumentChatAnswer } from './components/DocumentChatAnswer.vue'\nexport { default as DocumentChatOps } from './components/DocumentChatOps.vue'\nexport { default as ModelQuickSwitch } from './components/ModelQuickSwitch.vue'\nexport { default as SettingsAiTab } from './components/SettingsAiTab.vue'\nexport { default as SettingsModelProfiles } from './components/SettingsModelProfiles.vue'\nexport { useAiAssistant } from './use-ai-assistant'\nexport { useDocumentChat } from './use-document-chat'\nexport { useModelProfiles } from './use-model-profiles'\n\n/**\n * The Vue AI feature (Nuxt UI): see `aiFeatureCore`. The host places `AiSidebar` (from `./ai/vue/chat`, on the optional peer\n * `@skaile/forge-chat`) and optionally `ModelQuickSwitch` beside the editor.\n */\nexport function aiFeature(): VueFeature {\n return aiFeatureCore<Component>({ selectionMenu: AiSelectionMenu, reviewBar: AiReviewBar, settingsTab: SettingsAiTab })\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAsBA,SAAgB,YAAwB;CACtC,OAAO,cAAyB;EAAE,eAAeA;EAAiB,WAAWC;EAAa,aAAaC;CAAc,CAAC;AACxH"}
@@ -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
- "update:modelValue": (markdown: string) => any;
45
- ready: (editor: Editor) => any;
46
- settingsOpen: (tab?: string | undefined) => any;
47
44
  "update:sidebarOpen": (value: boolean) => any;
48
45
  "update:commentsOpen": (value: boolean) => any;
49
- frontmatter: (frontmatter: string | null) => any;
46
+ ready: (editor: Editor) => any;
47
+ "update:modelValue": (markdown: string) => any;
50
48
  metadataCreate: (list: string, item: MetadataItem) => any;
51
49
  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
- "onUpdate:modelValue"?: ((markdown: string) => any) | undefined;
55
- onReady?: ((editor: Editor) => any) | undefined;
56
- onSettingsOpen?: ((tab?: string | undefined) => any) | undefined;
57
54
  "onUpdate:sidebarOpen"?: ((value: boolean) => any) | undefined;
58
55
  "onUpdate:commentsOpen"?: ((value: boolean) => any) | undefined;
59
- onFrontmatter?: ((frontmatter: string | null) => any) | undefined;
56
+ onReady?: ((editor: Editor) => any) | undefined;
57
+ "onUpdate:modelValue"?: ((markdown: string) => any) | undefined;
60
58
  onMetadataCreate?: ((list: string, item: MetadataItem) => any) | undefined;
61
59
  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
64
  editable: boolean;
65
- modelValue: string;
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;
@@ -1,6 +1,4 @@
1
1
  import { defineEditorConfig, publicConfig, serverConfig } from "../config/index.js";
2
- import { dirname } from "node:path";
3
- import { createRequire } from "node:module";
4
2
  import { addPlugin, addServerScanDir, createResolver, defineNuxtModule } from "nuxt/kit";
5
3
  //#region src/nuxt/module.ts
6
4
  /**
@@ -18,15 +16,6 @@ var module_default = defineNuxtModule({
18
16
  const { resolve } = createResolver(import.meta.url);
19
17
  const packageSrc = resolve("..");
20
18
  nuxt.options.build.transpile.push(packageSrc);
21
- const forgeChatDist = dirname(dirname(createRequire(import.meta.url).resolve("@skaile/forge-chat/styles/chat.css")));
22
- nuxt.options.build.transpile.push("@skaile/forge-chat");
23
- const components = nuxt.options.components;
24
- const componentsOptions = typeof components === "object" && !Array.isArray(components) ? components : { dirs: Array.isArray(components) ? components : [] };
25
- componentsOptions.transform = {
26
- ...componentsOptions.transform,
27
- include: [...componentsOptions.transform?.include ?? [], /@skaile[\\/]forge-chat[\\/]dist[\\/]/]
28
- };
29
- nuxt.options.components = componentsOptions;
30
19
  nuxt.options.css.push(resolve("../vue/kit/nuxt-ui.css"));
31
20
  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"));
32
21
  addPlugin({
@@ -38,7 +27,7 @@ var module_default = defineNuxtModule({
38
27
  const uiCss = nuxt.options.build.templates.find((t) => t.filename === "ui.css");
39
28
  if (!uiCss?.getContents) throw new Error("tiptap-editor: @nuxt/ui muss vor diesem Modul registriert sein (ui.css-Template fehlt)");
40
29
  const getContents = uiCss.getContents;
41
- uiCss.getContents = async (data) => `@source "${packageSrc}/**/*";\n@source "${forgeChatDist}/**/*";\n${await getContents(data)}`;
30
+ uiCss.getContents = async (data) => `@source "${packageSrc}/**/*";\n${await getContents(data)}`;
42
31
  });
43
32
  nuxt.options.nitro.experimental = {
44
33
  ...nuxt.options.nitro.experimental,
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","names":[],"sources":["../../src/nuxt/module.ts"],"sourcesContent":["import { createRequire } from 'node:module'\nimport { dirname } from 'node:path'\nimport { addPlugin, addServerScanDir, createResolver, defineNuxtModule } from 'nuxt/kit'\nimport { defineEditorConfig, type EditorConfigInput, publicConfig, serverConfig } from '../config'\n\n/** Module options (`tiptapEditor` in `nuxt.config`): the editor's configuration with every key optional, see `EditorConfig`. */\nexport type ModuleOptions = EditorConfigInput\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(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 // The AI sidebar renders on `@skaile/forge-chat`. Its `dist` is compiled JS whose templates call `resolveComponent('UButton')`\n // (`UIcon`, ...): Nuxt turns those into imports only for `.vue` files and files in `components.transform.include`, so list the\n // `dist` there and transpile the package. Tailwind skips `node_modules`, so its `dist` is also appended to `@source` below.\n const forgeChatDist = dirname(dirname(createRequire(import.meta.url).resolve('@skaile/forge-chat/styles/chat.css')))\n nuxt.options.build.transpile.push('@skaile/forge-chat')\n const components = nuxt.options.components\n const componentsOptions = typeof components === 'object' && !Array.isArray(components) ? components : { dirs: Array.isArray(components) ? components : [] }\n componentsOptions.transform = { ...componentsOptions.transform, include: [...(componentsOptions.transform?.include ?? []), /@skaile[\\\\/]forge-chat[\\\\/]dist[\\\\/]/] }\n nuxt.options.components = componentsOptions\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 addPlugin({ src: resolve('./runtime/plugins/editor-context-nuxt-ui.client.ts'), mode: 'client' })\n addServerScanDir(resolve('./runtime/server'))\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@source \"${forgeChatDist}/**/*\";\\n${await getContents(data)}`\n })\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 const config = defineEditorConfig(options)\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 // Default role presets for the client before `GET /api/ai/models` has answered; read by the client context plugin.\n nuxt.options.runtimeConfig.public.tiptapEditor = {\n ...publicConfig(config),\n ...(nuxt.options.runtimeConfig.public.tiptapEditor as object | undefined),\n }\n },\n})\n"],"mappings":";;;;;;;;;;;AAcA,IAAA,iBAAe,iBAAgC;CAC7C,MAAM;EAAE,MAAM;EAAiB,WAAW;CAAe;CACzD,MAAM,SAAS,MAAM;EACnB,MAAM,EAAE,YAAY,eAAe,YAAY,GAAG;EAGlD,MAAM,aAAa,QAAQ,IAAI;EAC/B,KAAK,QAAQ,MAAM,UAAU,KAAK,UAAU;EAI5C,MAAM,gBAAgB,QAAQ,QAAQ,cAAc,YAAY,GAAG,CAAC,CAAC,QAAQ,oCAAoC,CAAC,CAAC;EACnH,KAAK,QAAQ,MAAM,UAAU,KAAK,oBAAoB;EACtD,MAAM,aAAa,KAAK,QAAQ;EAChC,MAAM,oBAAoB,OAAO,eAAe,YAAY,CAAC,MAAM,QAAQ,UAAU,IAAI,aAAa,EAAE,MAAM,MAAM,QAAQ,UAAU,IAAI,aAAa,CAAC,EAAE;EAC1J,kBAAkB,YAAY;GAAE,GAAG,kBAAkB;GAAW,SAAS,CAAC,GAAI,kBAAkB,WAAW,WAAW,CAAC,GAAI,sCAAsC;EAAE;EACnK,KAAK,QAAQ,aAAa;EAE1B,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,UAAU;GAAE,KAAK,QAAQ,oDAAoD;GAAG,MAAM;EAAS,CAAC;EAChG,iBAAiB,QAAQ,kBAAkB,CAAC;EAI5C,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,oBAAoB,cAAc,WAAW,MAAM,YAAY,IAAI;EAC9H,CAAC;EACD,KAAK,QAAQ,MAAM,eAAe;GAAE,GAAG,KAAK,QAAQ,MAAM;GAAc,WAAW;EAAK;EAExF,KAAK,QAAQ,MAAM,YAAY;GAAE,GAAG,KAAK,QAAQ,MAAM;GAAW,QAAQ;IAAC,GAAI,KAAK,QAAQ,MAAM,WAAW,UAAU,CAAC;IAAI;IAAwB;GAAU;EAAE;EAChK,MAAM,SAAS,mBAAmB,OAAO;EAEzC,KAAK,QAAQ,cAAc,eAAe;GACxC,GAAG,aAAa,MAAM;GACtB,GAAI,KAAK,QAAQ,cAAc;EACjC;EAEA,KAAK,QAAQ,cAAc,OAAO,eAAe;GAC/C,GAAG,aAAa,MAAM;GACtB,GAAI,KAAK,QAAQ,cAAc,OAAO;EACxC;CACF;AACF,CAAC"}
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/** Module options (`tiptapEditor` in `nuxt.config`): the editor's configuration with every key optional, see `EditorConfig`. */\nexport type ModuleOptions = EditorConfigInput\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(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 // 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 addPlugin({ src: resolve('./runtime/plugins/editor-context-nuxt-ui.client.ts'), mode: 'client' })\n addServerScanDir(resolve('./runtime/server'))\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 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 const config = defineEditorConfig(options)\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 // Default role presets for the client before `GET /api/ai/models` has answered; read by the client context plugin.\n nuxt.options.runtimeConfig.public.tiptapEditor = {\n ...publicConfig(config),\n ...(nuxt.options.runtimeConfig.public.tiptapEditor as object | undefined),\n }\n },\n})\n"],"mappings":";;;;;;;;;AAYA,IAAA,iBAAe,iBAAgC;CAC7C,MAAM;EAAE,MAAM;EAAiB,WAAW;CAAe;CACzD,MAAM,SAAS,MAAM;EACnB,MAAM,EAAE,YAAY,eAAe,YAAY,GAAG;EAGlD,MAAM,aAAa,QAAQ,IAAI;EAC/B,KAAK,QAAQ,MAAM,UAAU,KAAK,UAAU;EAE5C,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,UAAU;GAAE,KAAK,QAAQ,oDAAoD;GAAG,MAAM;EAAS,CAAC;EAChG,iBAAiB,QAAQ,kBAAkB,CAAC;EAI5C,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,KAAK,QAAQ,MAAM,eAAe;GAAE,GAAG,KAAK,QAAQ,MAAM;GAAc,WAAW;EAAK;EAExF,KAAK,QAAQ,MAAM,YAAY;GAAE,GAAG,KAAK,QAAQ,MAAM;GAAW,QAAQ;IAAC,GAAI,KAAK,QAAQ,MAAM,WAAW,UAAU,CAAC;IAAI;IAAwB;GAAU;EAAE;EAChK,MAAM,SAAS,mBAAmB,OAAO;EAEzC,KAAK,QAAQ,cAAc,eAAe;GACxC,GAAG,aAAa,MAAM;GACtB,GAAI,KAAK,QAAQ,cAAc;EACjC;EAEA,KAAK,QAAQ,cAAc,OAAO,eAAe;GAC/C,GAAG,aAAa,MAAM;GACtB,GAAI,KAAK,QAAQ,cAAc,OAAO;EACxC;CACF;AACF,CAAC"}
@@ -148,8 +148,8 @@ export declare const extractBodySchema: z.ZodObject<{
148
148
  documentId: z.ZodString;
149
149
  name: z.ZodOptional<z.ZodString>;
150
150
  method: z.ZodEnum<{
151
- description: "description";
152
151
  transcription: "transcription";
152
+ description: "description";
153
153
  bibliography: "bibliography";
154
154
  auto: "auto";
155
155
  "pdf-text": "pdf-text";
@@ -1,5 +1,4 @@
1
- /* AI feature styles: ghost autocomplete, selection highlight, review decorations, previews. The sidebar renders on `@skaile/forge-chat`, whose stylesheet is imported below (a host also needs `@source` for `@skaile/forge-chat/dist` in its Tailwind entry; the Nuxt module adds it). Import after `tailwindcss` and the UI kit's stylesheet (`vue/kit/nuxt-ui.css`). */
2
- @import "@skaile/forge-chat/styles/chat.css";
1
+ /* AI feature styles: ghost autocomplete, selection highlight, review decorations, previews. The Vue sidebar (`./ai/vue/chat`) renders on `@skaile/forge-chat`: its stylesheet (`@skaile/forge-chat/styles/chat.css`) and Tailwind `@source` are the host's imports, not this file's. Import after `tailwindcss` and the UI kit's stylesheet (`vue/kit/nuxt-ui.css`). */
3
2
  /* GhostAutocomplete: local AI suggestion after the caret (widget decoration, never in the document). */
4
3
  @layer components {
5
4
  .tiptap .ghost-autocomplete {
@@ -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
- "update:modelValue": (content: JSONContent) => any;
86
- ready: (editor: Editor) => any;
87
- settingsOpen: (tab?: string | undefined) => any;
88
85
  "update:sidebarOpen": (value: boolean) => any;
89
86
  "update:commentsOpen": (value: boolean) => any;
87
+ ready: (editor: Editor) => any;
88
+ "update:modelValue": (content: JSONContent) => any;
90
89
  metadataCreate: (list: string, item: MetadataItem) => any;
91
90
  contentError: (error: Error) => any;
91
+ settingsOpen: (tab?: string | undefined) => any;
92
92
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
93
- "onUpdate:modelValue"?: ((content: JSONContent) => any) | undefined;
94
- onReady?: ((editor: Editor) => any) | undefined;
95
- onSettingsOpen?: ((tab?: string | undefined) => any) | undefined;
96
93
  "onUpdate:sidebarOpen"?: ((value: boolean) => any) | undefined;
97
94
  "onUpdate:commentsOpen"?: ((value: boolean) => any) | undefined;
95
+ onReady?: ((editor: Editor) => any) | undefined;
96
+ "onUpdate:modelValue"?: ((content: JSONContent) => any) | undefined;
98
97
  onMetadataCreate?: ((list: string, item: MetadataItem) => any) | undefined;
99
98
  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
- "update:modelValue": (content: JSONContent) => any;
45
- ready: (editor: Editor) => any;
46
- settingsOpen: (tab?: string | undefined) => any;
47
44
  "update:sidebarOpen": (value: boolean) => any;
48
45
  "update:commentsOpen": (value: boolean) => any;
46
+ ready: (editor: Editor) => any;
47
+ "update:modelValue": (content: JSONContent) => any;
49
48
  metadataCreate: (list: string, item: MetadataItem) => any;
50
49
  contentError: (error: Error) => any;
50
+ settingsOpen: (tab?: string | undefined) => any;
51
51
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
52
- "onUpdate:modelValue"?: ((content: JSONContent) => any) | undefined;
53
- onReady?: ((editor: Editor) => any) | undefined;
54
- onSettingsOpen?: ((tab?: string | undefined) => any) | undefined;
55
52
  "onUpdate:sidebarOpen"?: ((value: boolean) => any) | undefined;
56
53
  "onUpdate:commentsOpen"?: ((value: boolean) => any) | undefined;
54
+ onReady?: ((editor: Editor) => any) | undefined;
55
+ "onUpdate:modelValue"?: ((content: JSONContent) => any) | undefined;
57
56
  onMetadataCreate?: ((list: string, item: MetadataItem) => any) | undefined;
58
57
  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
- "update:modelValue": (content: JSONContent) => any;
47
- ready: (editor: Editor) => any;
48
- settingsOpen: (tab?: string | undefined) => any;
49
46
  "update:sidebarOpen": (value: boolean) => any;
50
47
  "update:commentsOpen": (value: boolean) => any;
48
+ ready: (editor: Editor) => any;
49
+ "update:modelValue": (content: JSONContent) => any;
51
50
  metadataCreate: (list: string, item: MetadataItem) => any;
52
51
  contentError: (error: Error) => any;
52
+ settingsOpen: (tab?: string | undefined) => any;
53
53
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
54
- "onUpdate:modelValue"?: ((content: JSONContent) => any) | undefined;
55
- onReady?: ((editor: Editor) => any) | undefined;
56
- onSettingsOpen?: ((tab?: string | undefined) => any) | undefined;
57
54
  "onUpdate:sidebarOpen"?: ((value: boolean) => any) | undefined;
58
55
  "onUpdate:commentsOpen"?: ((value: boolean) => any) | undefined;
56
+ onReady?: ((editor: Editor) => any) | undefined;
57
+ "onUpdate:modelValue"?: ((content: JSONContent) => any) | undefined;
59
58
  onMetadataCreate?: ((list: string, item: MetadataItem) => any) | undefined;
60
59
  onContentError?: ((error: Error) => any) | undefined;
60
+ onSettingsOpen?: ((tab?: string | undefined) => any) | undefined;
61
61
  }>, {
62
62
  editable: boolean;
63
63
  settingsUi: "internal" | "external";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skaile/forge-editor",
3
- "version": "5.1.1",
3
+ "version": "6.0.1",
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",
@@ -539,6 +539,11 @@
539
539
  "types": "./dist/features/ai/vue.d.ts",
540
540
  "import": "./dist/features/ai/vue.js"
541
541
  },
542
+ "./ai/vue/chat": {
543
+ "skaile-source": "./src/features/ai/vue-chat.ts",
544
+ "types": "./dist/features/ai/vue-chat.d.ts",
545
+ "import": "./dist/features/ai/vue-chat.js"
546
+ },
542
547
  "./ai/react": {
543
548
  "skaile-source": "./src/features/ai/react.ts",
544
549
  "types": "./dist/features/ai/react.d.ts",
@@ -697,7 +702,8 @@
697
702
  "@iconify/vue": "^5.0.3",
698
703
  "@lezer/highlight": "^1.2.1",
699
704
  "@nuxt/ui": "^4.11.1",
700
- "@skaile/forge-app-actions": "^0.1.0 || ^0.2.0 || ^0.3.0",
705
+ "@skaile/forge-app-actions": "^0.1.0 || ^0.2.0 || ^0.3.0 || ^0.4.0",
706
+ "@skaile/forge-chat": "^0.2.0",
701
707
  "@tiptap/core": "^3.31.3",
702
708
  "@tiptap/pm": "^3.31.3",
703
709
  "@tiptap/react": "^3.31.3",
@@ -715,7 +721,6 @@
715
721
  "@ai-sdk/openai-compatible": "^3.0.62",
716
722
  "@hocuspocus/server": "^4.7.0",
717
723
  "@noble/hashes": "^2.0.0",
718
- "@skaile/forge-chat": "^0.1.0 || ^0.2.0",
719
724
  "@tiptap/extension-collaboration": "^3.31.3",
720
725
  "@tiptap/extension-collaboration-caret": "^3.31.3",
721
726
  "@tiptap/extension-drag-handle": "^3.31.3",
@@ -761,7 +766,8 @@
761
766
  "@iconify/react": "^6.0.2",
762
767
  "@iconify/vue": "^5.0.3",
763
768
  "@lezer/highlight": "^1.2.1",
764
- "@skaile/forge-app-actions": "^0.3.0",
769
+ "@skaile/forge-app-actions": "^0.4.0",
770
+ "@skaile/forge-chat": "^0.2.3",
765
771
  "@tiptap/react": "3.31.3",
766
772
  "@types/react": "^19.3.0",
767
773
  "@types/react-dom": "^19.3.0",
@@ -789,6 +795,9 @@
789
795
  "@skaile/forge-app-actions": {
790
796
  "optional": true
791
797
  },
798
+ "@skaile/forge-chat": {
799
+ "optional": true
800
+ },
792
801
  "@nuxt/ui": {
793
802
  "optional": true
794
803
  },