@wallavi/widget 1.1.0 → 1.1.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/dist/index.d.mts CHANGED
@@ -62,6 +62,12 @@ interface ChatWidgetConfig {
62
62
  */
63
63
  persist?: boolean;
64
64
  onNavigate?: (path: string) => void;
65
+ /**
66
+ * Hide the close (X) button in the widget header.
67
+ * Useful when the integrator controls open/close from an outer bubble wrapper
68
+ * and wants to avoid showing two close buttons.
69
+ */
70
+ hideCloseButton?: boolean;
65
71
  source?: string;
66
72
  userContext?: UserContext;
67
73
  /** Per-session tool overrides used by Playground (not persisted) */
@@ -79,7 +85,7 @@ interface ChatWidgetProps extends ChatWidgetConfig {
79
85
  declare function getContrastColor(hex: string): string;
80
86
  declare function formatToolName(name: string): string;
81
87
 
82
- declare function ChatWidget({ agentId, workspaceId, agentName, displayName, profilePicture, userMessageColor, initialMessages, suggestedMessages, messagePlaceholder, watermark, watermarkLogoUrl, footer, theme, showThinking, regenerateMessage, persist, onNavigate, source, userContext, playgroundOverrides, className, onClose, onReset, }: ChatWidgetProps): react_jsx_runtime.JSX.Element;
88
+ declare function ChatWidget({ agentId, workspaceId, agentName, displayName, profilePicture, userMessageColor, initialMessages, suggestedMessages, messagePlaceholder, watermark, watermarkLogoUrl, footer, theme, showThinking, regenerateMessage, persist, onNavigate, hideCloseButton, source, userContext, playgroundOverrides, className, onClose, onReset, }: ChatWidgetProps): react_jsx_runtime.JSX.Element;
83
89
 
84
90
  interface UseChatOptions {
85
91
  agentId: string;
package/dist/index.d.ts CHANGED
@@ -62,6 +62,12 @@ interface ChatWidgetConfig {
62
62
  */
63
63
  persist?: boolean;
64
64
  onNavigate?: (path: string) => void;
65
+ /**
66
+ * Hide the close (X) button in the widget header.
67
+ * Useful when the integrator controls open/close from an outer bubble wrapper
68
+ * and wants to avoid showing two close buttons.
69
+ */
70
+ hideCloseButton?: boolean;
65
71
  source?: string;
66
72
  userContext?: UserContext;
67
73
  /** Per-session tool overrides used by Playground (not persisted) */
@@ -79,7 +85,7 @@ interface ChatWidgetProps extends ChatWidgetConfig {
79
85
  declare function getContrastColor(hex: string): string;
80
86
  declare function formatToolName(name: string): string;
81
87
 
82
- declare function ChatWidget({ agentId, workspaceId, agentName, displayName, profilePicture, userMessageColor, initialMessages, suggestedMessages, messagePlaceholder, watermark, watermarkLogoUrl, footer, theme, showThinking, regenerateMessage, persist, onNavigate, source, userContext, playgroundOverrides, className, onClose, onReset, }: ChatWidgetProps): react_jsx_runtime.JSX.Element;
88
+ declare function ChatWidget({ agentId, workspaceId, agentName, displayName, profilePicture, userMessageColor, initialMessages, suggestedMessages, messagePlaceholder, watermark, watermarkLogoUrl, footer, theme, showThinking, regenerateMessage, persist, onNavigate, hideCloseButton, source, userContext, playgroundOverrides, className, onClose, onReset, }: ChatWidgetProps): react_jsx_runtime.JSX.Element;
83
89
 
84
90
  interface UseChatOptions {
85
91
  agentId: string;
package/dist/index.js CHANGED
@@ -615,13 +615,14 @@ function ChatWidget({
615
615
  suggestedMessages = [],
616
616
  messagePlaceholder,
617
617
  watermark = true,
618
- watermarkLogoUrl = "https://wallavi.com/wallavi.svg",
618
+ watermarkLogoUrl = "https://app.wallavi.com/wallavi.svg",
619
619
  footer,
620
620
  theme,
621
621
  showThinking = false,
622
622
  regenerateMessage = false,
623
623
  persist = false,
624
624
  onNavigate,
625
+ hideCloseButton = false,
625
626
  source = "playground",
626
627
  userContext,
627
628
  playgroundOverrides,
@@ -642,7 +643,7 @@ function ChatWidget({
642
643
  "div",
643
644
  {
644
645
  className: cn3(
645
- "flex flex-col overflow-hidden rounded-2xl border shadow-xl bg-background",
646
+ "flex flex-col overflow-hidden rounded-2xl border shadow-xl bg-background h-full",
646
647
  className
647
648
  ),
648
649
  style: { colorScheme: theme },
@@ -655,7 +656,7 @@ function ChatWidget({
655
656
  headerBg,
656
657
  headerText,
657
658
  onReset: handleReset,
658
- onClose
659
+ onClose: hideCloseButton ? void 0 : onClose
659
660
  }
660
661
  ),
661
662
  /* @__PURE__ */ jsxRuntime.jsx(
package/dist/index.mjs CHANGED
@@ -589,13 +589,14 @@ function ChatWidget({
589
589
  suggestedMessages = [],
590
590
  messagePlaceholder,
591
591
  watermark = true,
592
- watermarkLogoUrl = "https://wallavi.com/wallavi.svg",
592
+ watermarkLogoUrl = "https://app.wallavi.com/wallavi.svg",
593
593
  footer,
594
594
  theme,
595
595
  showThinking = false,
596
596
  regenerateMessage = false,
597
597
  persist = false,
598
598
  onNavigate,
599
+ hideCloseButton = false,
599
600
  source = "playground",
600
601
  userContext,
601
602
  playgroundOverrides,
@@ -616,7 +617,7 @@ function ChatWidget({
616
617
  "div",
617
618
  {
618
619
  className: cn3(
619
- "flex flex-col overflow-hidden rounded-2xl border shadow-xl bg-background",
620
+ "flex flex-col overflow-hidden rounded-2xl border shadow-xl bg-background h-full",
620
621
  className
621
622
  ),
622
623
  style: { colorScheme: theme },
@@ -629,7 +630,7 @@ function ChatWidget({
629
630
  headerBg,
630
631
  headerText,
631
632
  onReset: handleReset,
632
- onClose
633
+ onClose: hideCloseButton ? void 0 : onClose
633
634
  }
634
635
  ),
635
636
  /* @__PURE__ */ jsx(
package/package.json CHANGED
@@ -11,42 +11,32 @@
11
11
  "@types/node": "^22.10.7",
12
12
  "@types/react": "^19.1.0",
13
13
  "@types/react-dom": "^19.1.0",
14
- "@wallavi/typescript-config": "workspace:*",
15
14
  "tsup": "^8.3.5",
16
- "typescript": "^5.7.3"
15
+ "typescript": "^5.7.3",
16
+ "@wallavi/typescript-config": "0.0.1"
17
17
  },
18
18
  "exports": {
19
19
  ".": {
20
- "default": "./src/index.ts",
21
- "types": "./src/index.ts"
20
+ "import": "./dist/index.mjs",
21
+ "require": "./dist/index.js",
22
+ "types": "./dist/index.d.ts"
22
23
  }
23
24
  },
24
25
  "files": [
25
26
  "dist"
26
27
  ],
27
- "main": "./src/index.ts",
28
+ "main": "./dist/index.js",
28
29
  "name": "@wallavi/widget",
29
30
  "peerDependencies": {
30
31
  "react": "^18.0.0 || ^19.0.0",
31
32
  "react-dom": "^18.0.0 || ^19.0.0"
32
33
  },
33
34
  "private": false,
34
- "publishConfig": {
35
- "exports": {
36
- ".": {
37
- "import": "./dist/index.mjs",
38
- "require": "./dist/index.js",
39
- "types": "./dist/index.d.ts"
40
- }
41
- },
42
- "main": "./dist/index.js",
43
- "module": "./dist/index.mjs",
44
- "types": "./dist/index.d.ts"
45
- },
35
+ "types": "./dist/index.d.ts",
36
+ "version": "1.1.1",
46
37
  "scripts": {
47
38
  "build": "tsup",
48
39
  "typecheck": "tsc --noEmit"
49
40
  },
50
- "types": "./src/index.ts",
51
- "version": "1.1.0"
52
- }
41
+ "module": "./dist/index.mjs"
42
+ }