@yak-io/nuxt 0.4.0 → 0.5.0
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/README.md +5 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/plugin.d.ts +1 -3
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +0 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -15,6 +15,7 @@ pnpm add @yak-io/nuxt
|
|
|
15
15
|
| Export | Kind | Purpose |
|
|
16
16
|
| --- | --- | --- |
|
|
17
17
|
| `createYakProvider(options)` | fn | Create a widget instance. Returns a `YakApi` with refs + `mount`/`destroy`. |
|
|
18
|
+
| `createYakToolset` / `createYakServerAdapter` | fn | Compose GraphQL/REST/tRPC/custom tool adapters into one `onToolCall` (re-exported from `@yak-io/javascript`). |
|
|
18
19
|
| `enableYakLogging` / `disableYakLogging` / `isYakLoggingEnabled` | fn | Toggle verbose SDK logging. |
|
|
19
20
|
| Types | — | `YakProviderOptions`, `YakApi`, `ToolCallEventHandler`, plus core types from `@yak-io/javascript`. |
|
|
20
21
|
|
|
@@ -117,10 +118,7 @@ Returns a `YakApi`. Call `yak.mount()` on the client (e.g. the `app:mounted` hoo
|
|
|
117
118
|
| `mode` | `"chat" \| "voice" \| "both"` | `"chat"` | Which surfaces the widget exposes. |
|
|
118
119
|
| `trigger` | `boolean \| TriggerButtonConfig` | `false` | Show the floating pill. **Set `true`** to display it; `TriggerButtonConfig` recolors it. |
|
|
119
120
|
| `getConfig` | `ChatConfigProvider` | — | Async provider of routes + tools. Called on open / voice start. |
|
|
120
|
-
| `onToolCall` | `ToolCallHandler` | — | Executes a tool the assistant calls. |
|
|
121
|
-
| `onGraphQLSchemaCall` | `GraphQLSchemaHandler` | — | Handles GraphQL schema tool calls. |
|
|
122
|
-
| `onRESTSchemaCall` | `RESTSchemaHandler` | — | Handles REST/OpenAPI schema tool calls. |
|
|
123
|
-
| `theme` | `Theme` | — | Position, color mode, and colors. |
|
|
121
|
+
| `onToolCall` | `ToolCallHandler` | — | Executes a tool the assistant calls. || `theme` | `Theme` | — | Position, color mode, and colors. |
|
|
124
122
|
| `onRedirect` | `(path: string) => void` | `window.location.assign` | Navigation handler. |
|
|
125
123
|
| `disableRestartButton` | `boolean` | `false` | Hide the restart-session button. |
|
|
126
124
|
|
|
@@ -166,6 +164,9 @@ import type {
|
|
|
166
164
|
ChatConfigProvider,
|
|
167
165
|
ToolCallHandler,
|
|
168
166
|
ToolCallEvent,
|
|
167
|
+
ToolAdapter,
|
|
168
|
+
YakToolset,
|
|
169
|
+
YakServerAdapterConfig,
|
|
169
170
|
Theme,
|
|
170
171
|
WidgetMode,
|
|
171
172
|
WidgetPosition,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type { ChatConfigProvider, GraphQLRequest,
|
|
2
|
-
export { disableYakLogging, enableYakLogging, isYakLoggingEnabled } from "@yak-io/javascript";
|
|
1
|
+
export type { ChatConfigProvider, GraphQLRequest, RESTRequest, Theme, ThemeColors, ToolAdapter, ToolCallEvent, ToolCallHandler, TriggerButtonConfig, VoiceMachine, VoiceState, WidgetMode, WidgetPosition, YakServerAdapterConfig, YakToolset, } from "@yak-io/javascript";
|
|
2
|
+
export { createYakServerAdapter, createYakToolset, disableYakLogging, enableYakLogging, isYakLoggingEnabled, } from "@yak-io/javascript";
|
|
3
3
|
export type { ToolCallEventHandler, YakApi, YakProviderOptions } from "./plugin.js";
|
|
4
4
|
export { createYakProvider } from "./plugin.js";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,YAAY,EACV,kBAAkB,EAClB,cAAc,EACd,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,YAAY,EACV,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,KAAK,EACL,WAAW,EACX,WAAW,EACX,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,UAAU,EACV,UAAU,EACV,cAAc,EACd,sBAAsB,EACtB,UAAU,GACX,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,oBAAoB,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// Public API
|
|
2
|
-
// Re-export logging utilities
|
|
3
|
-
export { disableYakLogging, enableYakLogging, isYakLoggingEnabled } from "@yak-io/javascript";
|
|
2
|
+
// Re-export tool composition + logging utilities
|
|
3
|
+
export { createYakServerAdapter, createYakToolset, disableYakLogging, enableYakLogging, isYakLoggingEnabled, } from "@yak-io/javascript";
|
|
4
4
|
export { createYakProvider } from "./plugin.js";
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ChatConfigProvider, type
|
|
1
|
+
import { type ChatConfigProvider, type Theme, type ToolCallEvent, type ToolCallHandler, type TriggerButtonConfig, type VoiceMachine, type WidgetMode } from "@yak-io/javascript";
|
|
2
2
|
import { type DeepReadonly, type Ref } from "vue";
|
|
3
3
|
export type ToolCallEventHandler = (event: ToolCallEvent) => void;
|
|
4
4
|
export type YakProviderOptions = {
|
|
@@ -6,8 +6,6 @@ export type YakProviderOptions = {
|
|
|
6
6
|
mode?: WidgetMode;
|
|
7
7
|
getConfig?: ChatConfigProvider;
|
|
8
8
|
onToolCall?: ToolCallHandler;
|
|
9
|
-
onGraphQLSchemaCall?: GraphQLSchemaHandler;
|
|
10
|
-
onRESTSchemaCall?: RESTSchemaHandler;
|
|
11
9
|
theme?: Theme;
|
|
12
10
|
onRedirect?: (path: string) => void;
|
|
13
11
|
disableRestartButton?: boolean;
|
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EAGvB,KAAK,KAAK,EACV,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,UAAU,EAEhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAY,KAAK,YAAY,EAAE,KAAK,GAAG,EAAiB,MAAM,KAAK,CAAC;AAI3E,MAAM,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;AAElE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAC/B,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,GAAG,mBAAmB,CAAC;CACzC,CAAC;AAEF,iFAAiF;AACjF,MAAM,MAAM,MAAM,GAAG;IAEnB,gDAAgD;IAChD,MAAM,EAAE,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;IACnC,4DAA4D;IAC5D,OAAO,EAAE,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;IACpC,kFAAkF;IAClF,WAAW,EAAE,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;IACxC,2BAA2B;IAC3B,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,4BAA4B;IAC5B,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,sDAAsD;IACtD,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,iFAAiF;IACjF,qBAAqB,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,MAAM,IAAI,CAAC;IAErE,wEAAwE;IACxE,YAAY,EAAE,YAAY,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC;IAC9C,2FAA2F;IAC3F,YAAY,EAAE,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;IACzC,kEAAkE;IAClE,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,sCAAsC;IACtC,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,yDAAyD;IACzD,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjC,qCAAqC;IACrC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,qDAAqD;IACrD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAIF;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,CAsGrE"}
|
package/dist/plugin.js
CHANGED
|
@@ -34,8 +34,6 @@ export function createYakProvider(options) {
|
|
|
34
34
|
trigger: options.trigger ?? false,
|
|
35
35
|
getConfig: options.getConfig,
|
|
36
36
|
onToolCall: options.onToolCall,
|
|
37
|
-
onGraphQLSchemaCall: options.onGraphQLSchemaCall,
|
|
38
|
-
onRESTSchemaCall: options.onRESTSchemaCall,
|
|
39
37
|
onRedirect: resolvedRedirect,
|
|
40
38
|
options: { disableRestartButton: options.disableRestartButton },
|
|
41
39
|
onToolCallComplete: handleToolCallComplete,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yak-io/nuxt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Nuxt 3 module for embedding yak chatbot",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"./package.json": "./package.json"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@yak-io/javascript": "0.
|
|
45
|
+
"@yak-io/javascript": "0.10.0"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"nuxt": "^3.0.0",
|