@formmy.app/chat 0.0.22 → 0.0.23

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.
@@ -24,7 +24,7 @@
24
24
  import { useChat } from "@ai-sdk/react";
25
25
  import { DefaultChatTransport } from "ai";
26
26
  import { useMemo, useCallback, useState, useEffect } from "react";
27
- import { useFormmy } from "../ui/provider";
27
+ import { useFormmy } from "../ui/provider.js";
28
28
  // Session ID storage key prefix
29
29
  const SESSION_KEY_PREFIX = "formmy_session_";
30
30
  /**
@@ -1,6 +1,6 @@
1
1
  import { useState, useEffect, useCallback, useRef, useMemo } from "react";
2
- import { useFormmy } from "../ui/provider";
3
- import { Formmy } from "../core/client";
2
+ import { useFormmy } from "../ui/provider.js";
3
+ import { Formmy } from "../core/client.js";
4
4
  export function useFormmyConversations(agentId) {
5
5
  const config = useFormmy();
6
6
  const client = useMemo(() => {
@@ -28,8 +28,8 @@
28
28
  * ```
29
29
  */
30
30
  import { useState, useRef, useCallback, useEffect } from "react";
31
- import { useFormmy } from "../ui/provider";
32
- import { FormmyVoiceClient } from "../voice/voice-client";
31
+ import { useFormmy } from "../ui/provider.js";
32
+ import { FormmyVoiceClient } from "../voice/voice-client.js";
33
33
  export function useFormmyVoice({ agentId, voiceId, sensitivity, systemPrompt, tools, onToolUse, onStatusChange: onStatusChangeCb, onError: onErrorCb, onTranscript: onTranscriptCb, wsUrl, audioDestination, onMicAudio, onServerEvent }) {
34
34
  const { publishableKey, baseUrl } = useFormmy();
35
35
  const clientRef = useRef(null);
package/dist/index.js CHANGED
@@ -22,6 +22,6 @@
22
22
  * ```
23
23
  */
24
24
  // Re-export everything from core client
25
- export * from "./core/client";
26
- export * from "./core/types";
25
+ export * from "./core/client.js";
26
+ export * from "./core/types.js";
27
27
  //# sourceMappingURL=index.js.map
package/dist/react.js CHANGED
@@ -18,16 +18,16 @@
18
18
  // ═══════════════════════════════════════════════════════════════════════════
19
19
  // Provider & Context
20
20
  // ═══════════════════════════════════════════════════════════════════════════
21
- export { FormmyProvider, useFormmy, useFormmyOptional } from "./ui/provider";
21
+ export { FormmyProvider, useFormmy, useFormmyOptional } from "./ui/provider.js";
22
22
  // ═══════════════════════════════════════════════════════════════════════════
23
23
  // Hooks
24
24
  // ═══════════════════════════════════════════════════════════════════════════
25
- export { useFormmyChat, getMessageText } from "./hooks/use-formmy-chat";
26
- export { useFormmyVoice } from "./hooks/use-formmy-voice";
27
- export { useFormmyConversations } from "./hooks/use-formmy-conversations";
28
- export { VISEMES } from "./voice/viseme-analyser";
25
+ export { useFormmyChat, getMessageText } from "./hooks/use-formmy-chat.js";
26
+ export { useFormmyVoice } from "./hooks/use-formmy-voice.js";
27
+ export { useFormmyConversations } from "./hooks/use-formmy-conversations.js";
28
+ export { VISEMES } from "./voice/viseme-analyser.js";
29
29
  // ═══════════════════════════════════════════════════════════════════════════
30
30
  // UI Components
31
31
  // ═══════════════════════════════════════════════════════════════════════════
32
- export { ChatBubble } from "./ui/chat-bubble";
32
+ export { ChatBubble } from "./ui/chat-bubble.js";
33
33
  //# sourceMappingURL=react.js.map
@@ -23,7 +23,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
23
23
  * ```
24
24
  */
25
25
  import { useState, useRef, useEffect } from "react";
26
- import { useFormmyChat, getMessageText } from "../hooks/use-formmy-chat";
26
+ import { useFormmyChat, getMessageText } from "../hooks/use-formmy-chat.js";
27
27
  // ═══════════════════════════════════════════════════════════════════════════
28
28
  // Styles (inline to avoid external dependencies)
29
29
  // ═══════════════════════════════════════════════════════════════════════════
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * Based on: aws-samples/sample-nova-sonic-websocket-agentcore
12
12
  */
13
- import { VisemeAnalyser } from "./viseme-analyser";
13
+ import { VisemeAnalyser } from "./viseme-analyser.js";
14
14
  export class FormmyVoiceClient {
15
15
  config;
16
16
  ws = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formmy.app/chat",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
4
4
  "description": "Official React SDK for Formmy Chat - AI chatbot widgets and headless hooks",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -23,7 +23,7 @@
23
23
  "LICENSE"
24
24
  ],
25
25
  "scripts": {
26
- "build": "tsc",
26
+ "build": "tsc && node -e \"const{readdirSync,readFileSync,writeFileSync,statSync}=require('fs');const{join}=require('path');function fix(d){for(const f of readdirSync(d)){const p=join(d,f);if(statSync(p).isDirectory()){fix(p)}else if(p.endsWith('.js')){writeFileSync(p,readFileSync(p,'utf8').replace(/from \\\"(\\.\\.?\\/[^\\\"]+)\\\"/g,(m,i)=>i.endsWith('.js')?m:\\`from \\\"\\${i}.js\\\"\\`))}}}fix('./dist');\"",
27
27
  "dev": "tsc --watch",
28
28
  "clean": "rm -rf dist",
29
29
  "prepublishOnly": "npm run clean && npm run build"