@kedataindo/docflow-vue 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/sidebars/AISidebar.vue.d.ts.map +1 -1
- package/dist/composables/useAIProvider.d.ts +25 -0
- package/dist/composables/useAIProvider.d.ts.map +1 -0
- package/dist/index.cjs +80 -80
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +135 -114
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AISidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/sidebars/AISidebar.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AISidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/sidebars/AISidebar.vue"],"names":[],"mappings":"AAsiBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE1C,OAAO,KAAK,EAAmB,UAAU,EAAiC,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAuC3H,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,gFAAgF;IAChF,QAAQ,CAAC,EAAE,UAAU,CAAA;IACrB,sEAAsE;IACtE,OAAO,CAAC,EAAE,SAAS,CAAA;CACpB,CAAC;;;;;;AAs5BF,wBAOG"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for "which AI transports is this editor using right
|
|
3
|
+
* now" (pluggable AI provider — issue #119, plan §8.1).
|
|
4
|
+
*
|
|
5
|
+
* Reads the host-injected `aiStream` / `aiDraft` ports from
|
|
6
|
+
* `editor.storage.editorContext` — the same seam `AISidebar.vue` falls back
|
|
7
|
+
* to. Component props still win over this fallback at the call site; this
|
|
8
|
+
* composable answers the storage side only.
|
|
9
|
+
*
|
|
10
|
+
* Note: `editorContext` storage is not reactive by itself — the computed refs
|
|
11
|
+
* re-evaluate when the editor instance changes. Hosts that hot-swap the
|
|
12
|
+
* provider after boot (e.g. our SaaS settings page) re-inject via editor
|
|
13
|
+
* options and should recreate or update the editor accordingly.
|
|
14
|
+
*/
|
|
15
|
+
import { type ComputedRef, type Ref } from 'vue';
|
|
16
|
+
import type { Editor } from '@tiptap/core';
|
|
17
|
+
import type { AIDraftFn, AIStreamFn } from '@kedataindo/docflow-core';
|
|
18
|
+
export interface UseAIProviderReturn {
|
|
19
|
+
aiStream: ComputedRef<AIStreamFn | undefined>;
|
|
20
|
+
aiDraft: ComputedRef<AIDraftFn | undefined>;
|
|
21
|
+
/** True when the host injected an `aiStream` transport. */
|
|
22
|
+
isAIAvailable: ComputedRef<boolean>;
|
|
23
|
+
}
|
|
24
|
+
export declare function useAIProvider(editor: Ref<Editor | null>): UseAIProviderReturn;
|
|
25
|
+
//# sourceMappingURL=useAIProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAIProvider.d.ts","sourceRoot":"","sources":["../../src/composables/useAIProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAY,KAAK,WAAW,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAC1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAE3E,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,WAAW,CAAC,UAAU,GAAG,SAAS,CAAC,CAAA;IAC7C,OAAO,EAAE,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC,CAAA;IAC3C,2DAA2D;IAC3D,aAAa,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;CACpC;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,mBAAmB,CAS7E"}
|