@decido/discovery-studio 4.0.1 → 4.0.3

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.js CHANGED
@@ -2244,5 +2244,3 @@ exports.FlowCanvasTab = FlowCanvasTab;
2244
2244
  exports.InspectorPanel = InspectorPanel;
2245
2245
  exports.MessageNode = MessageNode;
2246
2246
  exports.SideExplorer = SideExplorer;
2247
- //# sourceMappingURL=index.js.map
2248
- //# sourceMappingURL=index.js.map
package/dist/index.mjs CHANGED
@@ -2230,5 +2230,3 @@ var DiscoveryStudio = ({ gatewayStatus = "connected", activeProvider = "Meta Clo
2230
2230
  };
2231
2231
 
2232
2232
  export { AgentPanel, AnalyticsTab, BotActionNode, ChatTab, DiscoveryStudio, FlowCanvasTab, InspectorPanel, MessageNode, SideExplorer };
2233
- //# sourceMappingURL=index.mjs.map
2234
- //# sourceMappingURL=index.mjs.map
package/package.json CHANGED
@@ -1,15 +1,17 @@
1
1
  {
2
2
  "name": "@decido/discovery-studio",
3
- "version": "4.0.1",
3
+ "version": "4.0.3",
4
4
  "description": "WhatsApp Discovery Studio — Enterprise-grade conversational analytics, flow design, and live chat",
5
- "main": "dist/index.js",
6
- "module": "dist/index.mjs",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/index.mjs",
7
7
  "types": "dist/index.d.ts",
8
8
  "exports": {
9
9
  ".": {
10
+ "development": "./src/index.ts",
11
+ "types": "./dist/index.d.ts",
10
12
  "import": "./dist/index.mjs",
11
13
  "require": "./dist/index.js",
12
- "types": "./dist/index.d.ts"
14
+ "default": "./dist/index.mjs"
13
15
  }
14
16
  },
15
17
  "files": [
@@ -23,9 +25,9 @@
23
25
  "@xyflow/react": "^12.4.2",
24
26
  "lucide-react": "^0.300.0",
25
27
  "socket.io-client": "^4.8.3",
26
- "@decido/kernel-bridge": "4.0.1",
27
- "@decido/canvas-ai": "4.0.1",
28
- "@decido/macia-core": "4.0.1"
28
+ "@decido/kernel-bridge": "4.0.3",
29
+ "@decido/macia-core": "4.0.3",
30
+ "@decido/canvas-ai": "4.0.3"
29
31
  },
30
32
  "devDependencies": {
31
33
  "@types/react": "^18.3.3",
@@ -40,7 +42,7 @@
40
42
  },
41
43
  "license": "UNLICENSED",
42
44
  "scripts": {
43
- "build": "tsup",
45
+ "build": "tsup src/index.ts --format esm,cjs",
44
46
  "dev": "tsup --watch",
45
47
  "clean": "rm -rf dist"
46
48
  }
package/dist/index.d.mts DELETED
@@ -1,102 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import React$1 from 'react';
3
- import { NodeProps } from '@xyflow/react';
4
-
5
- interface DiscoveryStudioProps$1 {
6
- gatewayStatus?: 'connected' | 'disconnected' | 'connecting';
7
- activeProvider?: string;
8
- }
9
- declare const DiscoveryStudio: ({ gatewayStatus, activeProvider }: DiscoveryStudioProps$1) => react_jsx_runtime.JSX.Element;
10
-
11
- interface SideExplorerProps {
12
- selectedContact: string | null;
13
- onSelectContact: (id: string) => void;
14
- }
15
- declare const SideExplorer: React$1.FC<SideExplorerProps>;
16
-
17
- interface InspectorPanelProps {
18
- selectedContact: string | null;
19
- }
20
- declare const InspectorPanel: React$1.FC<InspectorPanelProps>;
21
-
22
- declare const AgentPanel: () => react_jsx_runtime.JSX.Element;
23
-
24
- interface ChatTabProps {
25
- selectedContact: string | null;
26
- }
27
- declare const ChatTab: React$1.FC<ChatTabProps>;
28
-
29
- declare const FlowCanvasTab: () => react_jsx_runtime.JSX.Element;
30
-
31
- declare const AnalyticsTab: () => react_jsx_runtime.JSX.Element;
32
-
33
- declare const MessageNode: React$1.MemoExoticComponent<({ id, data, selected }: NodeProps) => react_jsx_runtime.JSX.Element>;
34
-
35
- declare const BotActionNode: React$1.MemoExoticComponent<({ id, data, selected }: NodeProps) => react_jsx_runtime.JSX.Element>;
36
-
37
- interface Conversation {
38
- id: string;
39
- name: string;
40
- initials: string;
41
- lastMessage: string;
42
- time: string;
43
- unread: number;
44
- color: string;
45
- }
46
- interface AnalyticsData {
47
- messagesToday: number;
48
- responseTime: string;
49
- conversionRate: string;
50
- activeChats: number;
51
- ordersViaWA: number;
52
- escalations: number;
53
- hourlyActivity: {
54
- hour: string;
55
- received: number;
56
- sent: number;
57
- }[];
58
- intents: {
59
- name: string;
60
- count: number;
61
- pct: number;
62
- color: string;
63
- }[];
64
- }
65
- interface FlowState {
66
- nodes: any[];
67
- edges: any[];
68
- }
69
- interface StudioState {
70
- activeTab: 'chat' | 'flow' | 'analytics' | 'architect';
71
- selectedContact: string | null;
72
- explorerOpen: boolean;
73
- inspectorOpen: boolean;
74
- flow?: FlowState;
75
- }
76
- interface DiscoveryStudioProps {
77
- /** JWT token for backend authentication */
78
- apiKey?: string;
79
- /** Base URL of the API (default: window.location.origin) */
80
- apiBaseUrl?: string;
81
- /** Visual theme */
82
- theme?: 'dark' | 'light' | 'system';
83
- /** Initially selected contact */
84
- initialContact?: string;
85
- /** Callback when user sends a message */
86
- onSendMessage?: (contactId: string, message: string) => Promise<void>;
87
- /** Callback when a flow is updated */
88
- onFlowChange?: (nodes: any[], edges: any[]) => void;
89
- /** Callback to save studio state */
90
- onSave?: (state: StudioState) => Promise<void>;
91
- /** External conversation data */
92
- conversations?: Conversation[];
93
- /** External analytics data */
94
- analytics?: AnalyticsData;
95
- /** Custom slot components */
96
- slots?: {
97
- headerRight?: React.ReactNode;
98
- statusBarLeft?: React.ReactNode;
99
- };
100
- }
101
-
102
- export { AgentPanel, type AnalyticsData, AnalyticsTab, BotActionNode, ChatTab, type Conversation, DiscoveryStudio, type DiscoveryStudioProps, FlowCanvasTab, type FlowState, InspectorPanel, MessageNode, SideExplorer, type StudioState };
package/dist/index.d.ts DELETED
@@ -1,102 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import React$1 from 'react';
3
- import { NodeProps } from '@xyflow/react';
4
-
5
- interface DiscoveryStudioProps$1 {
6
- gatewayStatus?: 'connected' | 'disconnected' | 'connecting';
7
- activeProvider?: string;
8
- }
9
- declare const DiscoveryStudio: ({ gatewayStatus, activeProvider }: DiscoveryStudioProps$1) => react_jsx_runtime.JSX.Element;
10
-
11
- interface SideExplorerProps {
12
- selectedContact: string | null;
13
- onSelectContact: (id: string) => void;
14
- }
15
- declare const SideExplorer: React$1.FC<SideExplorerProps>;
16
-
17
- interface InspectorPanelProps {
18
- selectedContact: string | null;
19
- }
20
- declare const InspectorPanel: React$1.FC<InspectorPanelProps>;
21
-
22
- declare const AgentPanel: () => react_jsx_runtime.JSX.Element;
23
-
24
- interface ChatTabProps {
25
- selectedContact: string | null;
26
- }
27
- declare const ChatTab: React$1.FC<ChatTabProps>;
28
-
29
- declare const FlowCanvasTab: () => react_jsx_runtime.JSX.Element;
30
-
31
- declare const AnalyticsTab: () => react_jsx_runtime.JSX.Element;
32
-
33
- declare const MessageNode: React$1.MemoExoticComponent<({ id, data, selected }: NodeProps) => react_jsx_runtime.JSX.Element>;
34
-
35
- declare const BotActionNode: React$1.MemoExoticComponent<({ id, data, selected }: NodeProps) => react_jsx_runtime.JSX.Element>;
36
-
37
- interface Conversation {
38
- id: string;
39
- name: string;
40
- initials: string;
41
- lastMessage: string;
42
- time: string;
43
- unread: number;
44
- color: string;
45
- }
46
- interface AnalyticsData {
47
- messagesToday: number;
48
- responseTime: string;
49
- conversionRate: string;
50
- activeChats: number;
51
- ordersViaWA: number;
52
- escalations: number;
53
- hourlyActivity: {
54
- hour: string;
55
- received: number;
56
- sent: number;
57
- }[];
58
- intents: {
59
- name: string;
60
- count: number;
61
- pct: number;
62
- color: string;
63
- }[];
64
- }
65
- interface FlowState {
66
- nodes: any[];
67
- edges: any[];
68
- }
69
- interface StudioState {
70
- activeTab: 'chat' | 'flow' | 'analytics' | 'architect';
71
- selectedContact: string | null;
72
- explorerOpen: boolean;
73
- inspectorOpen: boolean;
74
- flow?: FlowState;
75
- }
76
- interface DiscoveryStudioProps {
77
- /** JWT token for backend authentication */
78
- apiKey?: string;
79
- /** Base URL of the API (default: window.location.origin) */
80
- apiBaseUrl?: string;
81
- /** Visual theme */
82
- theme?: 'dark' | 'light' | 'system';
83
- /** Initially selected contact */
84
- initialContact?: string;
85
- /** Callback when user sends a message */
86
- onSendMessage?: (contactId: string, message: string) => Promise<void>;
87
- /** Callback when a flow is updated */
88
- onFlowChange?: (nodes: any[], edges: any[]) => void;
89
- /** Callback to save studio state */
90
- onSave?: (state: StudioState) => Promise<void>;
91
- /** External conversation data */
92
- conversations?: Conversation[];
93
- /** External analytics data */
94
- analytics?: AnalyticsData;
95
- /** Custom slot components */
96
- slots?: {
97
- headerRight?: React.ReactNode;
98
- statusBarLeft?: React.ReactNode;
99
- };
100
- }
101
-
102
- export { AgentPanel, type AnalyticsData, AnalyticsTab, BotActionNode, ChatTab, type Conversation, DiscoveryStudio, type DiscoveryStudioProps, FlowCanvasTab, type FlowState, InspectorPanel, MessageNode, SideExplorer, type StudioState };