@onedeskpro/chatbot-react 0.3.0 → 0.3.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.
Files changed (2) hide show
  1. package/dist/index.js +4 -8
  2. package/package.json +7 -7
package/dist/index.js CHANGED
@@ -1,15 +1,14 @@
1
1
  import { createContext as e, useCallback as t, useContext as n, useEffect as r, useRef as i, useState as a } from "react";
2
2
  import { ChatbotCore as o } from "@onedeskpro/chatbot-core";
3
3
  import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
4
- //#region src/context.ts
4
+ // src/context.ts
5
5
  var u = e(null);
6
6
  function d() {
7
7
  let e = n(u);
8
8
  if (!e) throw Error("useChatbot must be used inside <ChatbotProvider>.");
9
9
  return e;
10
10
  }
11
- //#endregion
12
- //#region src/chatbot-provider.tsx
11
+ // src/chatbot-provider.tsx
13
12
  function f({ children: e, ...t }) {
14
13
  let n = i(null);
15
14
  return n.current ||= new o(), r(() => {
@@ -22,8 +21,7 @@ function f({ children: e, ...t }) {
22
21
  children: e
23
22
  });
24
23
  }
25
- //#endregion
26
- //#region src/hooks/use-chatbot.ts
24
+ // src/hooks/use-chatbot.ts
27
25
  function p() {
28
26
  let e = d(), [n, i] = a(() => e.getState());
29
27
  r(() => {
@@ -54,8 +52,7 @@ function p() {
54
52
  resetSession: h
55
53
  };
56
54
  }
57
- //#endregion
58
- //#region src/chatbot-widget.tsx
55
+ // src/chatbot-widget.tsx
59
56
  function m() {
60
57
  let e = d();
61
58
  return r(() => {}, [e]), /* @__PURE__ */ c("div", {
@@ -80,5 +77,4 @@ function h({ renderLauncher: e, renderWindow: t }) {
80
77
  close: a
81
78
  })] });
82
79
  }
83
- //#endregion
84
80
  export { u as ChatbotContext, h as ChatbotHeadless, f as ChatbotProvider, m as ChatbotWidget, p as useChatbot };
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@onedeskpro/chatbot-react",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "React SDK for the Onedesk Pro Chatbot",
5
5
  "license": "MIT",
6
6
  "author": "Typetech IT <support@onedeskpro.com>",
7
- "homepage": "https://github.com/onedeskpro/onedeskpro-chatbot-sdk#readme",
7
+ "homepage": "https://github.com/onedeskpro/onedeskpro-chatbot#readme",
8
8
  "repository": {
9
9
  "type": "git",
10
- "url": "git+https://github.com/onedeskpro/onedeskpro-chatbot-sdk.git",
10
+ "url": "git+https://github.com/onedeskpro/onedeskpro-chatbot.git",
11
11
  "directory": "packages/react"
12
12
  },
13
13
  "bugs": {
14
- "url": "https://github.com/onedeskpro/onedeskpro-chatbot-sdk/issues"
14
+ "url": "https://github.com/onedeskpro/onedeskpro-chatbot/issues"
15
15
  },
16
16
  "keywords": [
17
17
  "onedeskpro",
@@ -50,8 +50,8 @@
50
50
  "react-dom": ">=18.0.0"
51
51
  },
52
52
  "dependencies": {
53
- "@onedeskpro/chatbot-core": "0.3.0",
54
- "@onedeskpro/chatbot-types": "0.3.0"
53
+ "@onedeskpro/chatbot-core": "0.3.1",
54
+ "@onedeskpro/chatbot-types": "0.3.1"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@microsoft/api-extractor": "^7.59.4",
@@ -67,7 +67,7 @@
67
67
  "react": "^19.3.1",
68
68
  "react-dom": "^19.3.1",
69
69
  "typescript": "^6",
70
- "vite": "^8.3.4",
70
+ "vite": "^8.3.5",
71
71
  "vite-plugin-dts": "^5.1.2",
72
72
  "vitest": "^5.0.5"
73
73
  },