@digitalsac/digicalls-widget 0.1.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.
- package/LICENSE +21 -0
- package/README.md +42 -0
- package/dist/index.es.js +6220 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.umd.js +9 -0
- package/dist/index.umd.js.map +1 -0
- package/package.json +41 -0
- package/types/index.d.ts +22 -0
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@digitalsac/digicalls-widget",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "DigiCalls webphone widget — UI completa de chamadas em Shadow DOM. render(config, digicalls).",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.umd.js",
|
|
7
|
+
"module": "./dist/index.es.js",
|
|
8
|
+
"types": "./types/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./types/index.d.ts",
|
|
12
|
+
"import": "./dist/index.es.js",
|
|
13
|
+
"require": "./dist/index.umd.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"types",
|
|
19
|
+
"LICENSE"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "vite build",
|
|
23
|
+
"dev": "vite",
|
|
24
|
+
"prepublishOnly": "npm run build"
|
|
25
|
+
},
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"react": "^18.3.1",
|
|
32
|
+
"react-dom": "^18.3.1"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@types/react": "^18.3.0",
|
|
36
|
+
"@types/react-dom": "^18.3.0",
|
|
37
|
+
"@vitejs/plugin-react": "^4.3.0",
|
|
38
|
+
"typescript": "^5.6.0",
|
|
39
|
+
"vite": "^7.0.0"
|
|
40
|
+
}
|
|
41
|
+
}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface WebphoneConfig {
|
|
2
|
+
baseUrl: string;
|
|
3
|
+
tokens?: string[];
|
|
4
|
+
/** token -> friendly line name shown in the selector. */
|
|
5
|
+
deviceNames?: Record<string, string>;
|
|
6
|
+
lang?: "pt" | "en" | "es";
|
|
7
|
+
/** initial number to dial. */
|
|
8
|
+
to?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** The DigiCalls engine instance (from @digitalsac/digicalls-api). */
|
|
12
|
+
export type DigiCallsInstance = unknown;
|
|
13
|
+
|
|
14
|
+
export declare function render(config: WebphoneConfig, digicalls?: DigiCallsInstance): DigiCallsInstance;
|
|
15
|
+
export declare function destroy(): void;
|
|
16
|
+
export declare class WebPhoneComponent {
|
|
17
|
+
render(config: WebphoneConfig, digicalls?: DigiCallsInstance): DigiCallsInstance;
|
|
18
|
+
destroy(): void;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare const _default: { render: typeof render; destroy: typeof destroy; WebPhoneComponent: typeof WebPhoneComponent };
|
|
22
|
+
export default _default;
|