@hissuno/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/README.md +218 -0
- package/dist/index.d.mts +507 -0
- package/dist/index.d.ts +507 -0
- package/dist/index.js +2943 -0
- package/dist/index.mjs +2902 -0
- package/dist/styles.css +186 -0
- package/package.json +65 -0
package/dist/styles.css
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hissuno Widget Styles
|
|
3
|
+
*
|
|
4
|
+
* These styles provide animations and enhancements for the widget.
|
|
5
|
+
* Import this file in your app for full widget functionality:
|
|
6
|
+
*
|
|
7
|
+
* import '@hissuno/widget/styles.css';
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/* Animation keyframes */
|
|
11
|
+
@keyframes hissuno-bounce {
|
|
12
|
+
0%,
|
|
13
|
+
80%,
|
|
14
|
+
100% {
|
|
15
|
+
transform: translateY(0);
|
|
16
|
+
}
|
|
17
|
+
40% {
|
|
18
|
+
transform: translateY(-6px);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@keyframes hissuno-spin {
|
|
23
|
+
from {
|
|
24
|
+
transform: rotate(0deg);
|
|
25
|
+
}
|
|
26
|
+
to {
|
|
27
|
+
transform: rotate(360deg);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@keyframes hissuno-fade-in {
|
|
32
|
+
from {
|
|
33
|
+
opacity: 0;
|
|
34
|
+
transform: translateY(10px);
|
|
35
|
+
}
|
|
36
|
+
to {
|
|
37
|
+
opacity: 1;
|
|
38
|
+
transform: translateY(0);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@keyframes hissuno-scale-in {
|
|
43
|
+
from {
|
|
44
|
+
opacity: 0;
|
|
45
|
+
transform: scale(0.95);
|
|
46
|
+
}
|
|
47
|
+
to {
|
|
48
|
+
opacity: 1;
|
|
49
|
+
transform: scale(1);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@keyframes hissuno-slide-in-right {
|
|
54
|
+
from {
|
|
55
|
+
transform: translateX(100%);
|
|
56
|
+
}
|
|
57
|
+
to {
|
|
58
|
+
transform: translateX(0);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@keyframes hissuno-fade-in-backdrop {
|
|
63
|
+
from {
|
|
64
|
+
opacity: 0;
|
|
65
|
+
}
|
|
66
|
+
to {
|
|
67
|
+
opacity: 1;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* Widget container */
|
|
72
|
+
.hissuno-widget {
|
|
73
|
+
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
74
|
+
'Helvetica Neue', Arial, sans-serif;
|
|
75
|
+
-webkit-font-smoothing: antialiased;
|
|
76
|
+
-moz-osx-font-smoothing: grayscale;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* Bubble button */
|
|
80
|
+
.hissuno-bubble {
|
|
81
|
+
transition: transform 0.2s ease, box-shadow 0.2s ease !important;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.hissuno-bubble:hover {
|
|
85
|
+
transform: scale(1.05) !important;
|
|
86
|
+
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.hissuno-bubble:active {
|
|
90
|
+
transform: scale(0.98) !important;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* Popup container */
|
|
94
|
+
.hissuno-popup {
|
|
95
|
+
animation: hissuno-scale-in 0.2s ease-out;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* Sidepanel container */
|
|
99
|
+
.hissuno-sidepanel {
|
|
100
|
+
animation: hissuno-slide-in-right 0.3s ease-out;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* Sidepanel backdrop */
|
|
104
|
+
.hissuno-backdrop {
|
|
105
|
+
animation: hissuno-fade-in-backdrop 0.2s ease-out;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* Messages container */
|
|
109
|
+
.hissuno-messages {
|
|
110
|
+
scrollbar-width: thin;
|
|
111
|
+
scrollbar-color: rgba(155, 155, 155, 0.5) transparent;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.hissuno-messages::-webkit-scrollbar {
|
|
115
|
+
width: 6px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.hissuno-messages::-webkit-scrollbar-track {
|
|
119
|
+
background: transparent;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.hissuno-messages::-webkit-scrollbar-thumb {
|
|
123
|
+
background-color: rgba(155, 155, 155, 0.5);
|
|
124
|
+
border-radius: 3px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.hissuno-messages::-webkit-scrollbar-thumb:hover {
|
|
128
|
+
background-color: rgba(155, 155, 155, 0.7);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* Loading dots animation */
|
|
132
|
+
.hissuno-loading-dot {
|
|
133
|
+
animation: hissuno-bounce 1s infinite;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* Input focus states */
|
|
137
|
+
.hissuno-popup input:focus,
|
|
138
|
+
.hissuno-sidepanel input:focus {
|
|
139
|
+
border-color: #2563eb !important;
|
|
140
|
+
box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2) !important;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* Button hover states */
|
|
144
|
+
.hissuno-popup button[type='submit']:not(:disabled):hover,
|
|
145
|
+
.hissuno-sidepanel button[type='submit']:not(:disabled):hover {
|
|
146
|
+
background-color: #1d4ed8 !important;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* Close/clear button hover states */
|
|
150
|
+
.hissuno-popup button[aria-label]:hover,
|
|
151
|
+
.hissuno-sidepanel button[aria-label]:hover {
|
|
152
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* Dark theme hover states */
|
|
156
|
+
.hissuno-popup[data-theme='dark'] button[aria-label]:hover,
|
|
157
|
+
.hissuno-sidepanel[data-theme='dark'] button[aria-label]:hover {
|
|
158
|
+
background-color: rgba(255, 255, 255, 0.1);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* Responsive adjustments */
|
|
162
|
+
@media (max-width: 440px) {
|
|
163
|
+
.hissuno-popup {
|
|
164
|
+
width: calc(100vw - 32px) !important;
|
|
165
|
+
left: 16px !important;
|
|
166
|
+
right: 16px !important;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.hissuno-sidepanel {
|
|
170
|
+
width: 100vw !important;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
@media (max-height: 600px) {
|
|
175
|
+
.hissuno-popup {
|
|
176
|
+
height: calc(100vh - 100px) !important;
|
|
177
|
+
max-height: 480px !important;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/* Print styles - hide widget */
|
|
182
|
+
@media print {
|
|
183
|
+
.hissuno-widget {
|
|
184
|
+
display: none !important;
|
|
185
|
+
}
|
|
186
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hissuno/widget",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Embeddable AI-powered support chat widget for Hissuno platform",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"require": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./styles.css": "./dist/styles.css"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"README.md"
|
|
19
|
+
],
|
|
20
|
+
"sideEffects": [
|
|
21
|
+
"*.css"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "tsup src/index.ts --format cjs,esm --dts --external react && cp src/styles.css dist/styles.css",
|
|
25
|
+
"dev": "tsup src/index.ts --format cjs,esm --dts --external react --watch",
|
|
26
|
+
"prepublishOnly": "npm run build"
|
|
27
|
+
},
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": ">=18.0.0"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"react": ">=18.0.0",
|
|
33
|
+
"react-dom": ">=18.0.0"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@ai-sdk/react": "^1.2.12"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/react": "^19",
|
|
40
|
+
"@types/react-dom": "^19",
|
|
41
|
+
"tsup": "^8.0.0",
|
|
42
|
+
"typescript": "^5"
|
|
43
|
+
},
|
|
44
|
+
"keywords": [
|
|
45
|
+
"hissuno",
|
|
46
|
+
"widget",
|
|
47
|
+
"support",
|
|
48
|
+
"ai",
|
|
49
|
+
"chat",
|
|
50
|
+
"customer-support",
|
|
51
|
+
"chatbot",
|
|
52
|
+
"react"
|
|
53
|
+
],
|
|
54
|
+
"license": "MIT",
|
|
55
|
+
"repository": {
|
|
56
|
+
"type": "git",
|
|
57
|
+
"url": "git+https://github.com/hissuno/hissuno.git",
|
|
58
|
+
"directory": "app/packages/widget"
|
|
59
|
+
},
|
|
60
|
+
"bugs": {
|
|
61
|
+
"url": "https://github.com/hissuno/hissuno/issues"
|
|
62
|
+
},
|
|
63
|
+
"homepage": "https://github.com/hissuno/hissuno/tree/main/app/packages/widget#readme"
|
|
64
|
+
}
|
|
65
|
+
|