cardoctor-call-chat 1.0.0 → 1.0.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 +8 -0
- package/dist/index.d.ts +8 -8
- package/dist/index.js +38 -14
- package/dist/index.mjs +13 -0
- package/package.json +12 -2
- package/src/cometchat/init.tsx +0 -0
- package/src/index.ts +1 -15
- package/src/useCounter.ts +12 -0
- package/tsconfig.json +7 -5
package/dist/index.d.mts
ADDED
package/dist/index.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
}
|
1
|
+
import * as react from 'react';
|
2
|
+
|
3
|
+
declare function useCounter(initial?: number): {
|
4
|
+
count: number;
|
5
|
+
setCount: react.Dispatch<react.SetStateAction<number>>;
|
6
|
+
};
|
7
|
+
|
8
|
+
export { useCounter };
|
package/dist/index.js
CHANGED
@@ -1,16 +1,40 @@
|
|
1
1
|
"use strict";
|
2
|
-
Object.defineProperty
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
+
var __export = (target, all) => {
|
7
|
+
for (var name in all)
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
9
|
+
};
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
12
|
+
for (let key of __getOwnPropNames(from))
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
15
|
+
}
|
16
|
+
return to;
|
17
|
+
};
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
+
|
20
|
+
// src/index.ts
|
21
|
+
var index_exports = {};
|
22
|
+
__export(index_exports, {
|
23
|
+
useCounter: () => useCounter
|
24
|
+
});
|
25
|
+
module.exports = __toCommonJS(index_exports);
|
26
|
+
|
27
|
+
// src/useCounter.ts
|
28
|
+
var import_react = require("react");
|
29
|
+
function useCounter(initial = 0) {
|
30
|
+
const [count, setCount] = (0, import_react.useState)(initial);
|
31
|
+
(0, import_react.useEffect)(() => {
|
32
|
+
console.log("Counter mounted:", count);
|
33
|
+
return () => console.log("Counter unmounted");
|
34
|
+
}, []);
|
35
|
+
return { count, setCount };
|
7
36
|
}
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
getAuthHeader() {
|
13
|
-
return { Authorization: `Bearer ${this.token}` };
|
14
|
-
}
|
15
|
-
}
|
16
|
-
exports.MySDK = MySDK;
|
37
|
+
// Annotate the CommonJS export names for ESM import in node:
|
38
|
+
0 && (module.exports = {
|
39
|
+
useCounter
|
40
|
+
});
|
package/dist/index.mjs
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
// src/useCounter.ts
|
2
|
+
import { useState, useEffect } from "react";
|
3
|
+
function useCounter(initial = 0) {
|
4
|
+
const [count, setCount] = useState(initial);
|
5
|
+
useEffect(() => {
|
6
|
+
console.log("Counter mounted:", count);
|
7
|
+
return () => console.log("Counter unmounted");
|
8
|
+
}, []);
|
9
|
+
return { count, setCount };
|
10
|
+
}
|
11
|
+
export {
|
12
|
+
useCounter
|
13
|
+
};
|
package/package.json
CHANGED
@@ -1,14 +1,24 @@
|
|
1
1
|
{
|
2
2
|
"name": "cardoctor-call-chat",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.1",
|
4
4
|
"main": "dist/index.js",
|
5
5
|
"types": "dist/index.d.ts",
|
6
6
|
"scripts": {
|
7
|
-
"build": "
|
7
|
+
"build": "tsup src/index.ts --format esm,cjs --dts --external react",
|
8
8
|
"prepublishOnly": "npm run build"
|
9
9
|
},
|
10
10
|
"license": "MIT",
|
11
11
|
"devDependencies": {
|
12
|
+
"@types/react": "^19.1.9",
|
13
|
+
"react": "^19.1.1",
|
14
|
+
"tsup": "^8.5.0",
|
12
15
|
"typescript": "^5.9.2"
|
16
|
+
},
|
17
|
+
"dependencies": {
|
18
|
+
"@cometchat/calls-sdk-javascript": "^4.1.0",
|
19
|
+
"@cometchat/chat-uikit-react": "^6.1.2"
|
20
|
+
},
|
21
|
+
"peerDependencies": {
|
22
|
+
"react": ">=18.0.0"
|
13
23
|
}
|
14
24
|
}
|
File without changes
|
package/src/index.ts
CHANGED
@@ -1,15 +1 @@
|
|
1
|
-
export
|
2
|
-
return `Hello, ${name}! 👋`;
|
3
|
-
}
|
4
|
-
|
5
|
-
export class MySDK {
|
6
|
-
private token: string;
|
7
|
-
|
8
|
-
constructor(token: string) {
|
9
|
-
this.token = token;
|
10
|
-
}
|
11
|
-
|
12
|
-
getAuthHeader() {
|
13
|
-
return { Authorization: `Bearer ${this.token}` };
|
14
|
-
}
|
15
|
-
}
|
1
|
+
export * from "./useCounter";
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { useState, useEffect } from "react";
|
2
|
+
|
3
|
+
export function useCounter(initial = 0) {
|
4
|
+
const [count, setCount] = useState(initial);
|
5
|
+
|
6
|
+
useEffect(() => {
|
7
|
+
console.log("Counter mounted:", count);
|
8
|
+
return () => console.log("Counter unmounted");
|
9
|
+
}, []);
|
10
|
+
|
11
|
+
return { count, setCount };
|
12
|
+
}
|
package/tsconfig.json
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
{
|
2
2
|
"compilerOptions": {
|
3
|
-
"
|
4
|
-
"declaration": true,
|
3
|
+
"jsx": "react-jsx",
|
5
4
|
"esModuleInterop": true,
|
6
5
|
"moduleResolution": "node",
|
7
|
-
"
|
8
|
-
"
|
9
|
-
"
|
6
|
+
"module": "esnext",
|
7
|
+
"target": "es6",
|
8
|
+
"skipLibCheck": true,
|
9
|
+
"strict": true,
|
10
|
+
"declaration": true,
|
11
|
+
"outDir": "dist"
|
10
12
|
},
|
11
13
|
"include": ["src"]
|
12
14
|
}
|