@connekz/connekz-agent 0.6.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/CHANGELOG.md +7 -0
- package/LICENSE +25 -0
- package/README.md +335 -0
- package/dist/connekz-agent.css +1 -0
- package/dist/connekz-agent.es.js +16691 -0
- package/dist/connekz-agent.umd.js +19 -0
- package/dist/favicon.ico +0 -0
- package/dist/worklet-processor.js +11 -0
- package/package.json +94 -0
- package/types.d.ts +60 -0
package/dist/favicon.ico
ADDED
|
Binary file
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
class WorkletProcessor extends AudioWorkletProcessor {
|
|
2
|
+
process(inputs, outputs, parameters) {
|
|
3
|
+
const input = inputs[0];
|
|
4
|
+
if (input.length > 0) {
|
|
5
|
+
const data = input[0];
|
|
6
|
+
this.port.postMessage(data);
|
|
7
|
+
}
|
|
8
|
+
return true;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
registerProcessor('worklet-processor', WorkletProcessor);
|
package/package.json
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@connekz/connekz-agent",
|
|
3
|
+
"private": false,
|
|
4
|
+
"type": "module",
|
|
5
|
+
"version": "0.6.0",
|
|
6
|
+
"description": "A package for Connekz clients to integrate Connekz Agent into their applications.",
|
|
7
|
+
"main": "dist/connekz-agent.umd.js",
|
|
8
|
+
"module": "dist/connekz-agent.es.js",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"types.d.ts",
|
|
13
|
+
"LICENSE",
|
|
14
|
+
"README.md",
|
|
15
|
+
"CHANGELOG.md"
|
|
16
|
+
],
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": {
|
|
20
|
+
"require": "./dist/index.d.ts",
|
|
21
|
+
"default": "./dist/index.d.ts"
|
|
22
|
+
},
|
|
23
|
+
"import": "./dist/connekz-agent.es.js",
|
|
24
|
+
"require": "./dist/connekz-agent.umd.js"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"dev": "vite",
|
|
29
|
+
"build": "run-p type-check \"build-only {@}\" --",
|
|
30
|
+
"build:lib": "npm run clean && vite build --mode lib && echo 'Generating type definitions...' && vue-tsc --project tsconfig.app.json --emitDeclarationOnly --outDir dist && echo 'Build completed.'",
|
|
31
|
+
"build:types": "vue-tsc --project tsconfig.app.json --emitDeclarationOnly --outDir dist",
|
|
32
|
+
"preview": "vite preview",
|
|
33
|
+
"build-only": "vite build",
|
|
34
|
+
"type-check": "vue-tsc --build --force",
|
|
35
|
+
"lint": "eslint . --fix",
|
|
36
|
+
"format": "prettier --write src/",
|
|
37
|
+
"build:test": "cross-env NODE_ENV=development node --experimental-modules commands/build-test.mjs",
|
|
38
|
+
"clean": "rm -rf dist",
|
|
39
|
+
"publish": "node --experimental-modules commands/publish.mjs"
|
|
40
|
+
},
|
|
41
|
+
"keywords": [
|
|
42
|
+
"chat",
|
|
43
|
+
"connekz",
|
|
44
|
+
"vue",
|
|
45
|
+
"vuetify",
|
|
46
|
+
"widget"
|
|
47
|
+
],
|
|
48
|
+
"author": "Connekz",
|
|
49
|
+
"license": "MIT",
|
|
50
|
+
"homepage": "https://www.connekz.com",
|
|
51
|
+
"repository": {
|
|
52
|
+
"type": "git",
|
|
53
|
+
"url": "git+https://github.com/connekz/connekz-agent.git"
|
|
54
|
+
},
|
|
55
|
+
"bugs": {
|
|
56
|
+
"url": "https://github.com/connekz/connekz-agent/issues"
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"@sentry/vue": "^10.22.0",
|
|
60
|
+
"@vueuse/core": "^13.1.0",
|
|
61
|
+
"dompurify": "^3.2.5",
|
|
62
|
+
"emoji-mart-vue-fast": "^15.0.4",
|
|
63
|
+
"markdown-it": "^14.1.0",
|
|
64
|
+
"pinia": "^3.0.2",
|
|
65
|
+
"socket.io-client": "^4.8.1",
|
|
66
|
+
"three": "^0.180.0",
|
|
67
|
+
"vue": "^3.5.13"
|
|
68
|
+
},
|
|
69
|
+
"devDependencies": {
|
|
70
|
+
"@tsconfig/node22": "^22.0.1",
|
|
71
|
+
"@types/markdown-it": "^14.1.2",
|
|
72
|
+
"@types/node": "^22.14.0",
|
|
73
|
+
"@types/three": "^0.180.0",
|
|
74
|
+
"@vitejs/plugin-vue": "^5.2.3",
|
|
75
|
+
"@vue/eslint-config-prettier": "^10.1.0",
|
|
76
|
+
"@vue/eslint-config-typescript": "^14.3.0",
|
|
77
|
+
"@vue/tsconfig": "^0.7.0",
|
|
78
|
+
"autoprefixer": "^10.4.21",
|
|
79
|
+
"cross-env": "^7.0.3",
|
|
80
|
+
"eslint": "^9.18.0",
|
|
81
|
+
"eslint-plugin-vue": "^9.32.0",
|
|
82
|
+
"fs-extra": "^11.3.0",
|
|
83
|
+
"globals": "^16.0.0",
|
|
84
|
+
"npm-run-all2": "^7.0.2",
|
|
85
|
+
"postcss": "^8.5.3",
|
|
86
|
+
"prettier": "^3.4.2",
|
|
87
|
+
"sass-embedded": "^1.87.0",
|
|
88
|
+
"typescript": "~5.8.0",
|
|
89
|
+
"typescript-eslint": "^8.31.1",
|
|
90
|
+
"vite": "^6.2.4",
|
|
91
|
+
"vite-plugin-vue-devtools": "^7.7.2",
|
|
92
|
+
"vue-tsc": "^2.2.8"
|
|
93
|
+
}
|
|
94
|
+
}
|
package/types.d.ts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// src/index.d.ts
|
|
2
|
+
import 'unfonts.css';
|
|
3
|
+
|
|
4
|
+
// Alias AppProps as ConnekzChatOptions
|
|
5
|
+
export type ConnekzChatOptions = {
|
|
6
|
+
clientId: string;
|
|
7
|
+
clientSecret: string;
|
|
8
|
+
userIdentity?: string;
|
|
9
|
+
baseUrl?: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
// Define the props interface for App.vue
|
|
13
|
+
export interface AppProps {
|
|
14
|
+
sampleProperty: string; // Sample property for now
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Define the emits type for App.vue
|
|
18
|
+
export type AppEmits = {
|
|
19
|
+
'sample-event': (value: string) => void;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// Define the exposed functions interface for App.vue
|
|
23
|
+
export interface AppExposed {
|
|
24
|
+
sampleExposeFunction: (message: string) => void;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Export types for consumers of the package
|
|
28
|
+
export type { AppProps, AppExposed, AppEmits };
|
|
29
|
+
|
|
30
|
+
// Define the return type of initConnekzChat
|
|
31
|
+
export interface ConnekzChatInstance extends AppEmits, AppExposed {
|
|
32
|
+
unmount: () => void;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Initializes the Connekz chat widget in a specified DOM element.
|
|
37
|
+
* @param divId - The ID of the parent div where the chat widget will be mounted.
|
|
38
|
+
* @param options - Configuration options for the chat widget.
|
|
39
|
+
* @returns An instance of the chat widget with methods to interact with it.
|
|
40
|
+
*/
|
|
41
|
+
export default function initConnekzChat(divId: string, options: ConnekzChatOptions): ConnekzChatInstance;
|
|
42
|
+
|
|
43
|
+
declare module '@connekz/connekz-agent';
|
|
44
|
+
|
|
45
|
+
declare module '*.webp' {
|
|
46
|
+
const value: string;
|
|
47
|
+
export default value;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
declare module '*.png' {
|
|
51
|
+
const value: string;
|
|
52
|
+
export default value;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
declare module '*.svg' {
|
|
56
|
+
const value: string;
|
|
57
|
+
export default value;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type GenericColors = 'neutral' | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error';
|