@useknest/widget-core 0.0.1-alpha.3 → 0.0.1-alpha.4

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.
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Initializes Sentry for the widget.
3
+ * Should be called once when the widget mounts.
4
+ */
5
+ export declare function initWidgetSentry(): void;
6
+ /**
7
+ * Captures an exception to Sentry with optional context.
8
+ */
9
+ export declare function captureWidgetException(error: Error | string, context?: Record<string, unknown>): void;
10
+ //# sourceMappingURL=sentry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sentry.d.ts","sourceRoot":"","sources":["../src/sentry.ts"],"names":[],"mappings":"AAOA;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CA0BvC;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACrC,KAAK,EAAE,KAAK,GAAG,MAAM,EACrB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,IAAI,CAON"}
@@ -10,6 +10,8 @@ export interface StreamMessageOptions {
10
10
  content: string;
11
11
  threadId?: string;
12
12
  callbacks: StreamCallbacks;
13
+ /** Base URL for the API. Defaults to https://useknest.com. Pass empty string for relative paths. */
14
+ baseUrl?: string;
13
15
  }
14
16
  /**
15
17
  * Sends a chat message and streams the response via SSE.
@@ -1 +1 @@
1
- {"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["../src/streaming.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAsB,MAAM,EAAY,MAAM,SAAS,CAAC;AAEpE,MAAM,WAAW,eAAe;IAC/B,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACzC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED,MAAM,WAAW,oBAAoB;IACpC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,eAAe,CAAC;CAC3B;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CA4EpF"}
1
+ {"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["../src/streaming.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAsB,MAAM,EAAY,MAAM,SAAS,CAAC;AAEpE,MAAM,WAAW,eAAe;IAC/B,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACzC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED,MAAM,WAAW,oBAAoB;IACpC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,eAAe,CAAC;IAC3B,oGAAoG;IACpG,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CA4EpF"}
package/package.json CHANGED
@@ -1,34 +1,34 @@
1
1
  {
2
- "name": "@useknest/widget-core",
3
- "version": "0.0.1-alpha.3",
4
- "type": "module",
5
- "description": "Core business logic for Knest chat widget",
6
- "files": [
7
- "dist"
8
- ],
9
- "main": "./dist/index.js",
10
- "module": "./dist/index.js",
11
- "types": "./dist/index.d.ts",
12
- "exports": {
13
- ".": {
14
- "types": "./dist/index.d.ts",
15
- "import": "./dist/index.js"
16
- }
17
- },
18
- "devDependencies": {
19
- "typescript": "^5.9.2",
20
- "vite": "^7.1.7",
21
- "vite-plugin-dts": "^4.4.1",
22
- "vitest": "^3.0.0"
23
- },
24
- "dependencies": {
25
- "@sentry/browser": "^9.33.0",
26
- "marked": "^16.4.1"
27
- },
28
- "scripts": {
29
- "build": "vite build",
30
- "dev": "vite build --watch",
31
- "test": "vitest",
32
- "test:ci": "vitest run"
33
- }
34
- }
2
+ "name": "@useknest/widget-core",
3
+ "version": "0.0.1-alpha.4",
4
+ "type": "module",
5
+ "description": "Core business logic for Knest chat widget",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "main": "./dist/index.js",
10
+ "module": "./dist/index.js",
11
+ "types": "./dist/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.js"
16
+ }
17
+ },
18
+ "scripts": {
19
+ "build": "vite build",
20
+ "dev": "vite build --watch",
21
+ "test": "vitest",
22
+ "test:ci": "vitest run"
23
+ },
24
+ "devDependencies": {
25
+ "typescript": "^5.9.2",
26
+ "vite": "^7.1.7",
27
+ "vite-plugin-dts": "^4.4.1",
28
+ "vitest": "^3.0.0"
29
+ },
30
+ "dependencies": {
31
+ "@sentry/browser": "^9.33.0",
32
+ "marked": "^16.4.1"
33
+ }
34
+ }