@yak-io/react 0.2.0 → 0.3.0

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.
@@ -1,12 +1,6 @@
1
1
  /**
2
- * Simple logger utility for the yak React SDK.
3
- * Debug/info logs are only emitted in development mode.
4
- * Warnings and errors are always logged.
2
+ * Re-export logger from @yak-io/javascript.
3
+ * All logging configuration is centralized there.
5
4
  */
6
- export declare const logger: {
7
- debug: (message: string, data?: unknown) => void;
8
- info: (message: string, data?: unknown) => void;
9
- warn: (message: string, data?: unknown) => void;
10
- error: (message: string, data?: unknown) => void;
11
- };
5
+ export { logger } from "@yak-io/javascript";
12
6
  //# sourceMappingURL=logger.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/internal/logger.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,eAAO,MAAM,MAAM;qBACA,MAAM,SAAS,OAAO,KAAG,IAAI;oBAU9B,MAAM,SAAS,OAAO,KAAG,IAAI;oBAU7B,MAAM,SAAS,OAAO,KAAG,IAAI;qBAQ5B,MAAM,SAAS,OAAO,KAAG,IAAI;CAO/C,CAAC"}
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/internal/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1,44 +1,5 @@
1
1
  /**
2
- * Simple logger utility for the yak React SDK.
3
- * Debug/info logs are only emitted in development mode.
4
- * Warnings and errors are always logged.
2
+ * Re-export logger from @yak-io/javascript.
3
+ * All logging configuration is centralized there.
5
4
  */
6
- const isDev = typeof process !== "undefined" && process.env?.NODE_ENV === "development";
7
- export const logger = {
8
- debug: (message, data) => {
9
- if (isDev) {
10
- if (data !== undefined) {
11
- console.log(`[yak-chat-host] ${message}`, data);
12
- }
13
- else {
14
- console.log(`[yak-chat-host] ${message}`);
15
- }
16
- }
17
- },
18
- info: (message, data) => {
19
- if (isDev) {
20
- if (data !== undefined) {
21
- console.info(`[yak-chat-host] ${message}`, data);
22
- }
23
- else {
24
- console.info(`[yak-chat-host] ${message}`);
25
- }
26
- }
27
- },
28
- warn: (message, data) => {
29
- if (data !== undefined) {
30
- console.warn(`[yak-chat-host] ${message}`, data);
31
- }
32
- else {
33
- console.warn(`[yak-chat-host] ${message}`);
34
- }
35
- },
36
- error: (message, data) => {
37
- if (data !== undefined) {
38
- console.error(`[yak-chat-host] ${message}`, data);
39
- }
40
- else {
41
- console.error(`[yak-chat-host] ${message}`);
42
- }
43
- },
44
- };
5
+ export { logger } from "@yak-io/javascript";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yak-io/react",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "React SDK for embedding yak chatbot",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -41,7 +41,7 @@
41
41
  "./package.json": "./package.json"
42
42
  },
43
43
  "dependencies": {
44
- "@yak-io/javascript": "0.2.0"
44
+ "@yak-io/javascript": "0.3.0"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "react": "^18.0.0 || ^19.0.0",