pager-widget 0.0.1 → 0.0.2
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/App.jsx +2277 -987
- package/contentEditable.js +142 -0
- package/dist/lib.js +173 -191
- package/fontStyles.js +41 -0
- package/md/assistant_md.js +43 -29
- package/package.json +4 -3
- package/useMessages.js +285 -0
- package/useScale.js +4 -2
- package/dist/lib.css +0 -1
package/fontStyles.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import GM from "./static/fonts/Gordita-Medium.woff2";
|
|
2
|
+
import GR from "./static/fonts/Gordita-Regular.woff2";
|
|
3
|
+
import { createGlobalStyle } from "styled-components";
|
|
4
|
+
import { getPackageNameAndVersion } from "./getVersion";
|
|
5
|
+
|
|
6
|
+
const packageDetails = getPackageNameAndVersion();
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
const getFontUrls = (type) => {
|
|
11
|
+
|
|
12
|
+
if (type == "GM") {
|
|
13
|
+
return process.env.NODE_ENV === "production" ? `https://unpkg.com/${packageDetails.name}@${packageDetails.version}/dist/Gordita-Medium.e5d1fa87.woff2` : GM
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
if (type == "GR") {
|
|
17
|
+
return process.env.NODE_ENV === "production" ? `https://unpkg.com/${packageDetails.name}@${packageDetails.version}/dist/Gordita-Regular.6d2fd269.woff2` : GR
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return ""
|
|
21
|
+
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const FontStyles = createGlobalStyle`
|
|
25
|
+
|
|
26
|
+
@font-face {
|
|
27
|
+
font-family: 'Gordita-Medium';
|
|
28
|
+
src: url(${getFontUrls("GM")}) format('woff2');
|
|
29
|
+
font-weight: 500;
|
|
30
|
+
font-style: normal;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@font-face {
|
|
34
|
+
font-family: 'Gordita-Regular';
|
|
35
|
+
src: url(${getFontUrls("GR")}) format('woff2');
|
|
36
|
+
font-weight: 500;
|
|
37
|
+
font-style: normal;
|
|
38
|
+
}
|
|
39
|
+
`;
|
|
40
|
+
|
|
41
|
+
export default FontStyles;
|
package/md/assistant_md.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
const URL_REGEX =
|
|
3
|
+
const URL_REGEX =
|
|
4
|
+
/[(http(s)?):\/\/(www\.)?a-zA-Z0-9@:%._\+~#=-]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/;
|
|
4
5
|
|
|
5
6
|
const normalStr = (str) => ({
|
|
6
7
|
type: "normal_str",
|
|
@@ -12,21 +13,27 @@ const urlStr = (str) => ({
|
|
|
12
13
|
value: str,
|
|
13
14
|
});
|
|
14
15
|
|
|
15
|
-
const normalWrapper =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
)
|
|
16
|
+
const normalWrapper =
|
|
17
|
+
(TagName) =>
|
|
18
|
+
({ mdText: { value } }) =>
|
|
19
|
+
(
|
|
20
|
+
<TagName>
|
|
21
|
+
<AssistantMd mdText={value} />
|
|
22
|
+
</TagName>
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
const listWrapper =
|
|
26
|
+
(TagName) =>
|
|
27
|
+
({ mdText: { value: list } }) =>
|
|
28
|
+
(
|
|
29
|
+
<TagName>
|
|
30
|
+
{list.map((mdText) => (
|
|
31
|
+
<li>
|
|
32
|
+
<AssistantMd mdText={mdText} />
|
|
33
|
+
</li>
|
|
34
|
+
))}
|
|
35
|
+
</TagName>
|
|
36
|
+
);
|
|
30
37
|
|
|
31
38
|
export function parseUrlAndString(str) {
|
|
32
39
|
const results = [];
|
|
@@ -53,14 +60,14 @@ export function parseUrlAndString(str) {
|
|
|
53
60
|
}
|
|
54
61
|
|
|
55
62
|
const mdTypeRenderers = {
|
|
56
|
-
|
|
63
|
+
text: NormalTextMd,
|
|
57
64
|
bold: normalWrapper("strong"),
|
|
58
65
|
italic: normalWrapper("em"),
|
|
59
66
|
underline: normalWrapper("u"),
|
|
60
67
|
hyperlink: HyperLinkMd,
|
|
61
|
-
|
|
68
|
+
order_list: listWrapper("ol"),
|
|
62
69
|
unordered_list: listWrapper("ul"),
|
|
63
|
-
|
|
70
|
+
new_line: () => <br />,
|
|
64
71
|
join: JoinMd,
|
|
65
72
|
};
|
|
66
73
|
|
|
@@ -100,24 +107,30 @@ const DisplayURL = ({ text }) => {
|
|
|
100
107
|
);
|
|
101
108
|
};
|
|
102
109
|
|
|
103
|
-
function NormalTextMd({ mdText }) {
|
|
104
|
-
|
|
110
|
+
function NormalTextMd({ mdText: { value } }) {
|
|
111
|
+
console.log("NormalTextMd ::: value ::: ", value);
|
|
112
|
+
return typeof value === "string" ? <DisplayURL text={value} /> : <AssistantMd mdText={value} />;
|
|
105
113
|
}
|
|
106
114
|
|
|
107
|
-
function HyperLinkMd({ mdText }) {
|
|
115
|
+
function HyperLinkMd({ mdText: { value, href } }) {
|
|
116
|
+
// let value = mdText.value;
|
|
117
|
+
console.log("HyperLinkMd ::: value ::: ", value);
|
|
108
118
|
return (
|
|
109
|
-
<a href={
|
|
110
|
-
<AssistantMd mdText={
|
|
119
|
+
<a href={href} target="_blank">
|
|
120
|
+
<AssistantMd mdText={value} />
|
|
111
121
|
</a>
|
|
112
122
|
);
|
|
113
123
|
}
|
|
114
124
|
|
|
115
125
|
export function evalNormalOrJoinText(mdText) {
|
|
126
|
+
if (typeof mdText === "string") {
|
|
127
|
+
return mdText
|
|
128
|
+
}
|
|
116
129
|
return mdText.markdown_text === "normal_text"
|
|
117
130
|
? mdText.normal_text
|
|
118
131
|
: mdText.markdown_text === "join"
|
|
119
|
-
|
|
120
|
-
|
|
132
|
+
? joinAsNormalText(mdText.join.lhs, mdText.join.rhs)
|
|
133
|
+
: null;
|
|
121
134
|
}
|
|
122
135
|
|
|
123
136
|
function joinAsNormalText(lhs, rhs) {
|
|
@@ -133,7 +146,7 @@ function joinAsNormalText(lhs, rhs) {
|
|
|
133
146
|
|
|
134
147
|
function JoinMd({ mdText: { lhs, rhs } }) {
|
|
135
148
|
let normalText = joinAsNormalText(lhs, rhs);
|
|
136
|
-
console.log({ normalText });
|
|
149
|
+
// console.log({ normalText });
|
|
137
150
|
return normalText ? (
|
|
138
151
|
<NormalTextMd mdText={normalText} />
|
|
139
152
|
) : (
|
|
@@ -145,6 +158,7 @@ function JoinMd({ mdText: { lhs, rhs } }) {
|
|
|
145
158
|
}
|
|
146
159
|
|
|
147
160
|
export default function AssistantMd({ mdText }) {
|
|
148
|
-
|
|
149
|
-
|
|
161
|
+
console.log("AssistantMd ::: mdText.markdown_text ::: ", mdText.type, mdText);
|
|
162
|
+
let RenderMd = mdTypeRenderers[mdText.type];
|
|
163
|
+
return typeof mdText === "string" ? mdText : <RenderMd mdText={mdText} />;
|
|
150
164
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pager-widget",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"targets": {
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"@fullhuman/postcss-purgecss": "^4.0.3",
|
|
30
30
|
"@skitter/assistant_md": "^1.0.1",
|
|
31
31
|
"autoprefixer": "^9.8.7",
|
|
32
|
+
"autosize": "^6.0.1",
|
|
32
33
|
"axios": "^0.21.1",
|
|
33
34
|
"broadcast-channel": "^4.9.0",
|
|
34
35
|
"deepmerge": "^4.3.1",
|
|
@@ -39,11 +40,11 @@
|
|
|
39
40
|
"postcss-loader": "^4.0.3",
|
|
40
41
|
"postcss-modules": "^4.2.2",
|
|
41
42
|
"postcss-scopify": "^0.1.9",
|
|
43
|
+
"prop-types": "^15.8.1",
|
|
42
44
|
"react": "^17.0.2",
|
|
43
45
|
"react-dom": "^17.0.2",
|
|
44
46
|
"react-is": "^17.0.2",
|
|
45
|
-
"socket.io": "^4.
|
|
46
|
-
"socket.io-client": "^2.4.0",
|
|
47
|
+
"socket.io-client": "^4.7.5",
|
|
47
48
|
"styled-components": "^5.3.0",
|
|
48
49
|
"tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.17",
|
|
49
50
|
"url-parse": "^1.5.1",
|
package/useMessages.js
ADDED
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
import { useEffect, useState, useRef } from "react";
|
|
2
|
+
import parseURL from "url-parse";
|
|
3
|
+
import { createSocket } from "./socket";
|
|
4
|
+
import { sendInitialMessage } from "./widget-api";
|
|
5
|
+
|
|
6
|
+
const rTrimSlash = (str) => str.replace(/\/$/, "");
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
const useSocket = ({ endpoint }) => {
|
|
10
|
+
const parsedEndpoint = parseURL(endpoint);
|
|
11
|
+
console.log({ parsedEndpoint })
|
|
12
|
+
let [socket, setSocket] = useState(null);
|
|
13
|
+
const [connected, setConnected] = useState(false);
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
const socket = createSocket(
|
|
16
|
+
parsedEndpoint.origin,
|
|
17
|
+
`${rTrimSlash(parsedEndpoint.pathname)}/socket.io`
|
|
18
|
+
);
|
|
19
|
+
setSocket(socket);
|
|
20
|
+
socket.on("connect", () => {
|
|
21
|
+
setConnected(true);
|
|
22
|
+
});
|
|
23
|
+
return () => {
|
|
24
|
+
socket.disconnect();
|
|
25
|
+
};
|
|
26
|
+
}, []);
|
|
27
|
+
return { socket, connected };
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const useInitialMessage = ({
|
|
31
|
+
socket,
|
|
32
|
+
widget_id,
|
|
33
|
+
connected,
|
|
34
|
+
context,
|
|
35
|
+
authToken,
|
|
36
|
+
widget,
|
|
37
|
+
userDetails,
|
|
38
|
+
}) => {
|
|
39
|
+
const [sent, setSent] = useState(false);
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
console.log({ connected, widget });
|
|
42
|
+
const messages = getMessagesFromLS(`${widget_id}-messages`);
|
|
43
|
+
if (!sent && connected && widget && !messages) {
|
|
44
|
+
sendInitialMessage(socket, widget_id, context, authToken, widget);
|
|
45
|
+
setSent(true);
|
|
46
|
+
} else if (!sent && connected && widget && messages) {
|
|
47
|
+
let msg = message(
|
|
48
|
+
"",
|
|
49
|
+
context,
|
|
50
|
+
JSON.parse(messages),
|
|
51
|
+
widget_id,
|
|
52
|
+
authToken,
|
|
53
|
+
widget,
|
|
54
|
+
userDetails,
|
|
55
|
+
null
|
|
56
|
+
);
|
|
57
|
+
socket.emit("app_reconnect", msg);
|
|
58
|
+
setSent(true);
|
|
59
|
+
}
|
|
60
|
+
}, [connected, widget]);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
function getMessagesFromLS(widget_id) {
|
|
64
|
+
// return localStorage.getItem(`${widget_id}-messages`);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function setMessagesToLS(messages, widget_id) {
|
|
68
|
+
// return localStorage.setItem(`${widget_id}-messages`, JSON.stringify(messages));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const recievedMsg = (msg) => ({
|
|
72
|
+
type: "received",
|
|
73
|
+
time: new Date(),
|
|
74
|
+
message: {
|
|
75
|
+
...msg,
|
|
76
|
+
},
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
const useMessageReceiver = ({ widget_id, socket, messages, setMessages, setIsTyping }) => {
|
|
81
|
+
// console.log("XDOING::1 useMessageReceiver 4", messages)
|
|
82
|
+
const onMessageReceived = (messages) => (msg) => {
|
|
83
|
+
console.log("XDOING::1 useMessageReceived 1", messages, msg)
|
|
84
|
+
const recievedMessage = recievedMsg(msg);
|
|
85
|
+
// console.log("DOING::1 useMessageReceiver ::: received Messages", messages)
|
|
86
|
+
const newMessages = [...messages, recievedMessage];
|
|
87
|
+
setMessages(newMessages);
|
|
88
|
+
// console.log("XDOING::1 useMessageReceived 2", newMessages)
|
|
89
|
+
setMessagesToLS(newMessages, widget_id);
|
|
90
|
+
// channel.postMessage(JSON.stringify(recievedMessage));
|
|
91
|
+
// onMessageReceivedCallBack.current = onMessageReceived(newMessages)
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const onMessageTypingEndReceived = (msg) => {
|
|
95
|
+
setIsTyping(false);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const onMessageReceivedCallBack = useRef(onMessageReceived);
|
|
99
|
+
|
|
100
|
+
useEffect(() => {
|
|
101
|
+
// console.log("XDOING::1 useMessageReceiver 3", messages)
|
|
102
|
+
onMessageReceivedCallBack.current = onMessageReceived(messages);
|
|
103
|
+
}, [messages]);
|
|
104
|
+
|
|
105
|
+
useEffect(() => {
|
|
106
|
+
if (socket) {
|
|
107
|
+
socket.on("message", onMessageReceivedCallBack.current);
|
|
108
|
+
socket.on("typingend", onMessageTypingEndReceived);
|
|
109
|
+
}
|
|
110
|
+
return () => {
|
|
111
|
+
socket && socket.off("message", onMessageReceivedCallBack.current);
|
|
112
|
+
socket && socket.off("typingend", onMessageTypingEndReceived);
|
|
113
|
+
};
|
|
114
|
+
}, [socket, messages]);
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
const getUpdatedContext = (
|
|
118
|
+
messages,
|
|
119
|
+
currentContext,
|
|
120
|
+
{ SYS_FirstName, SYS_LastName, SYS_UserEmail },
|
|
121
|
+
file = null
|
|
122
|
+
) => {
|
|
123
|
+
if (!messages.length) {
|
|
124
|
+
const userDetails = {
|
|
125
|
+
first_name: SYS_FirstName,
|
|
126
|
+
last_name: SYS_LastName,
|
|
127
|
+
email: SYS_UserEmail,
|
|
128
|
+
};
|
|
129
|
+
currentContext.context = {
|
|
130
|
+
...currentContext.context,
|
|
131
|
+
SYS_FirstName,
|
|
132
|
+
SYS_LastName,
|
|
133
|
+
SYS_UserEmail,
|
|
134
|
+
};
|
|
135
|
+
currentContext.system = {
|
|
136
|
+
user: { ...currentContext.system?.user, ...userDetails },
|
|
137
|
+
};
|
|
138
|
+
return currentContext;
|
|
139
|
+
}
|
|
140
|
+
let message = messages[messages.length - 1].message;
|
|
141
|
+
|
|
142
|
+
return {
|
|
143
|
+
context: {
|
|
144
|
+
...message.context,
|
|
145
|
+
SYS_UPLOADED_FILE: file,
|
|
146
|
+
SYS_FirstName,
|
|
147
|
+
SYS_LastName,
|
|
148
|
+
SYS_UserEmail,
|
|
149
|
+
},
|
|
150
|
+
system: message.system,
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
const feedback = (feedback,
|
|
155
|
+
currentContext,
|
|
156
|
+
messages,
|
|
157
|
+
widget_id,
|
|
158
|
+
authToken,
|
|
159
|
+
widget,
|
|
160
|
+
userDetails,
|
|
161
|
+
) => {
|
|
162
|
+
return {
|
|
163
|
+
authToken,
|
|
164
|
+
widget_id,
|
|
165
|
+
context: {
|
|
166
|
+
...getUpdatedContext([...messages], currentContext, widget, userDetails, file),
|
|
167
|
+
input: { type: "text", value: "" },
|
|
168
|
+
feedback,
|
|
169
|
+
SYS_UPLOADED_FILE: file,
|
|
170
|
+
output: [],
|
|
171
|
+
},
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
const message = (
|
|
176
|
+
input,
|
|
177
|
+
currentContext,
|
|
178
|
+
messages,
|
|
179
|
+
widget_id,
|
|
180
|
+
authToken,
|
|
181
|
+
widget,
|
|
182
|
+
userDetails,
|
|
183
|
+
file = null
|
|
184
|
+
) => {
|
|
185
|
+
return {
|
|
186
|
+
authToken,
|
|
187
|
+
widget_id,
|
|
188
|
+
context: {
|
|
189
|
+
...getUpdatedContext([...messages], currentContext, widget, userDetails, file),
|
|
190
|
+
input: { type: "text", value: input },
|
|
191
|
+
SYS_UPLOADED_FILE: file,
|
|
192
|
+
output: [],
|
|
193
|
+
},
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
export const useMessages = ({
|
|
198
|
+
widget_id,
|
|
199
|
+
endpoint,
|
|
200
|
+
context: currentContext,
|
|
201
|
+
authToken,
|
|
202
|
+
newToken,
|
|
203
|
+
widget,
|
|
204
|
+
userDetails,
|
|
205
|
+
}) => {
|
|
206
|
+
const { socket, connected } = useSocket({ endpoint });
|
|
207
|
+
const [currentToken, setCurrentToken] = useState(authToken);
|
|
208
|
+
|
|
209
|
+
const sendMessage = (input, file = null) => {
|
|
210
|
+
// console.log("DOING::1 Service :: sendMessage called", input,messages)
|
|
211
|
+
setIsTyping(true);
|
|
212
|
+
let msg = message(
|
|
213
|
+
input,
|
|
214
|
+
currentContext,
|
|
215
|
+
messages,
|
|
216
|
+
widget_id,
|
|
217
|
+
currentToken,
|
|
218
|
+
widget,
|
|
219
|
+
userDetails,
|
|
220
|
+
file
|
|
221
|
+
);
|
|
222
|
+
socket.emit("message", msg);
|
|
223
|
+
const sentMessage = {
|
|
224
|
+
type: "sent",
|
|
225
|
+
message: msg.context,
|
|
226
|
+
time: new Date(),
|
|
227
|
+
};
|
|
228
|
+
// console.log("DOING::1 sendMessage",messages,sentMessage)
|
|
229
|
+
setMessages([...messages, sentMessage]);
|
|
230
|
+
// channel.postMessage(JSON.stringify(sentMessage));
|
|
231
|
+
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
const sendFeedback = (input) => {
|
|
235
|
+
// console.log("DOING::1 Service :: sendMessage called", input,messages)
|
|
236
|
+
setIsTyping(true);
|
|
237
|
+
let msg = message(
|
|
238
|
+
input,
|
|
239
|
+
currentContext,
|
|
240
|
+
messages,
|
|
241
|
+
widget_id,
|
|
242
|
+
currentToken,
|
|
243
|
+
widget,
|
|
244
|
+
userDetails,
|
|
245
|
+
null
|
|
246
|
+
);
|
|
247
|
+
socket.emit("feedback", msg);
|
|
248
|
+
// const sentMessage = {
|
|
249
|
+
// type: "sent",
|
|
250
|
+
// message: msg.context,
|
|
251
|
+
// time: new Date(),
|
|
252
|
+
// };
|
|
253
|
+
// // console.log("DOING::1 sendMessage",messages,sentMessage)
|
|
254
|
+
// setMessages([...messages, sentMessage]);
|
|
255
|
+
// channel.postMessage(JSON.stringify(sentMessage));
|
|
256
|
+
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
const [messages, setMessages] = useState([]);
|
|
260
|
+
|
|
261
|
+
console.log("all mesesages ::: ", { messages })
|
|
262
|
+
|
|
263
|
+
const [isTypingEnd, setIsTyping] = useState(false);
|
|
264
|
+
useInitialMessage({
|
|
265
|
+
socket,
|
|
266
|
+
widget_id,
|
|
267
|
+
connected,
|
|
268
|
+
context: currentContext,
|
|
269
|
+
authToken: currentToken,
|
|
270
|
+
widget,
|
|
271
|
+
userDetails,
|
|
272
|
+
});
|
|
273
|
+
useMessageReceiver({ widget_id, socket, messages, setMessages, setIsTyping });
|
|
274
|
+
|
|
275
|
+
return {
|
|
276
|
+
connected,
|
|
277
|
+
messages,
|
|
278
|
+
setMessages,
|
|
279
|
+
isTypingEnd,
|
|
280
|
+
sendMessage,
|
|
281
|
+
sendFeedback
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
export default useMessages;
|
package/useScale.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React, {
|
|
2
|
-
createContext,
|
|
2
|
+
createContext,
|
|
3
|
+
useContext,
|
|
4
|
+
useReducer
|
|
3
5
|
} from "react";
|
|
4
6
|
|
|
5
7
|
const MIN_ZOOM_LEVEL = 60;
|
|
@@ -71,7 +73,7 @@ export const ScaleSizeProvider = ({ children, widgetSize }) => {
|
|
|
71
73
|
|
|
72
74
|
return (
|
|
73
75
|
<ScaleContext.Provider
|
|
74
|
-
value={{ zoomLevel, scale: scaleRatio, updateZoomLevel }}
|
|
76
|
+
value={{ zoomLevel, scale: scaleRatio, updateZoomLevel , widgetSize}}
|
|
75
77
|
>
|
|
76
78
|
{children}
|
|
77
79
|
</ScaleContext.Provider>
|
package/dist/lib.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.workativ-widget *,.workativ-widget :after,.workativ-widget :before{--tw-border-opacity:1;border-color:rgba(229,231,235,var(--tw-border-opacity))}.workativ-widget .fixed{position:fixed}.workativ-widget .absolute{position:absolute}.workativ-widget .relative{position:relative}.workativ-widget .top-0{top:0}.workativ-widget .top-4{top:1rem}.workativ-widget .right-0{right:0}.workativ-widget .right-6{right:1.5rem}.workativ-widget .right-8{right:2rem}.workativ-widget .bottom-8{bottom:2rem}.workativ-widget .bottom-10{bottom:2.5rem}.workativ-widget .bottom-24{bottom:6rem}.workativ-widget .left-0{left:0}.workativ-widget .float-left{float:left}.workativ-widget .mt-2{margin-top:.5rem}.workativ-widget .mt-2\.5{margin-top:.625rem}.workativ-widget .mr-1{margin-right:.25rem}.workativ-widget .mr-2{margin-right:.5rem}.workativ-widget .mr-2\.5{margin-right:.625rem}.workativ-widget .ml-1{margin-left:.25rem}.workativ-widget .ml-2{margin-left:.5rem}.workativ-widget .ml-2\.5{margin-left:.625rem}.workativ-widget .inline-block{display:inline-block}.workativ-widget .flex{display:flex}.workativ-widget .inline-flex{display:inline-flex}.workativ-widget .table{display:table}.workativ-widget .grid{display:grid}.workativ-widget .hidden{display:none}.workativ-widget .h-4{height:1rem}.workativ-widget .h-8{height:2rem}.workativ-widget .h-11{height:2.75rem}.workativ-widget .h-auto{height:auto}.workativ-widget .h-full{height:100%}.workativ-widget .w-4{width:1rem}.workativ-widget .w-8{width:2rem}.workativ-widget .w-11{width:2.75rem}.workativ-widget .w-auto{width:auto}.workativ-widget .w-5\/6{width:83.333333%}.workativ-widget .w-2\/12{width:16.666667%}.workativ-widget .w-full{width:100%}.workativ-widget .w-max{width:-moz-max-content;width:max-content}.workativ-widget .flex-shrink{flex-shrink:1}.workativ-widget .transform{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;transform:translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(1turn)}}@keyframes ping{75%,to{transform:scale(2);opacity:0}}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.workativ-widget .cursor-default{cursor:default}.workativ-widget .cursor-pointer{cursor:pointer}.workativ-widget .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.workativ-widget .flex-row{flex-direction:row}.workativ-widget .flex-col{flex-direction:column}.workativ-widget .flex-wrap{flex-wrap:wrap}.workativ-widget .items-start{align-items:flex-start}.workativ-widget .items-end{align-items:flex-end}.workativ-widget .items-center{align-items:center}.workativ-widget .justify-start{justify-content:flex-start}.workativ-widget .justify-end{justify-content:flex-end}.workativ-widget .justify-center{justify-content:center}.workativ-widget .justify-between{justify-content:space-between}.workativ-widget .gap-2{gap:.5rem}.workativ-widget .gap-2\.5{gap:.625rem}.workativ-widget .self-center{align-self:center}.workativ-widget .overflow-y-scroll{overflow-y:scroll}.workativ-widget .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.workativ-widget .break-words{overflow-wrap:break-word}.workativ-widget .break-all{word-break:break-all}.workativ-widget .rounded{border-radius:.25rem}.workativ-widget .rounded-full{border-radius:9999px}.workativ-widget .rounded-b-md{border-bottom-right-radius:.375rem;border-bottom-left-radius:.375rem}.workativ-widget .rounded-tl-none{border-top-left-radius:0}.workativ-widget .rounded-tl-md{border-top-left-radius:.375rem}.workativ-widget .rounded-tr-none{border-top-right-radius:0}.workativ-widget .rounded-tr-md{border-top-right-radius:.375rem}.workativ-widget .rounded-br-md{border-bottom-right-radius:.375rem}.workativ-widget .rounded-bl-md{border-bottom-left-radius:.375rem}.workativ-widget .border{border-width:1px}.workativ-widget .bg-transparent{background-color:transparent}.workativ-widget .bg-white{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.workativ-widget .bg-gray-200{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}.workativ-widget .bg-gray-900{--tw-bg-opacity:1;background-color:rgba(17,24,39,var(--tw-bg-opacity))}.workativ-widget .hover\:bg-white:hover{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.workativ-widget .object-cover{-o-object-fit:cover;object-fit:cover}.workativ-widget .object-center{-o-object-position:center;object-position:center}.workativ-widget .p-2{padding:.5rem}.workativ-widget .p-3{padding:.75rem}.workativ-widget .p-2\.5{padding:.625rem}.workativ-widget .px-2{padding-left:.5rem;padding-right:.5rem}.workativ-widget .px-4{padding-left:1rem;padding-right:1rem}.workativ-widget .px-2\.5{padding-left:.625rem;padding-right:.625rem}.workativ-widget .py-1{padding-top:.25rem;padding-bottom:.25rem}.workativ-widget .py-3{padding-top:.75rem;padding-bottom:.75rem}.workativ-widget .py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.workativ-widget .pr-1{padding-right:.25rem}.workativ-widget .pr-2{padding-right:.5rem}.workativ-widget .pr-9{padding-right:2.25rem}.workativ-widget .pr-1\.5{padding-right:.375rem}.workativ-widget .pr-2\.5{padding-right:.625rem}.workativ-widget .pb-2{padding-bottom:.5rem}.workativ-widget .pb-2\.5{padding-bottom:.625rem}.workativ-widget .pl-2{padding-left:.5rem}.workativ-widget .pl-4{padding-left:1rem}.workativ-widget .pl-2\.5{padding-left:.625rem}.workativ-widget .text-left{text-align:left}.workativ-widget .font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.workativ-widget .text-xs{font-size:.75rem;line-height:1rem}.workativ-widget .text-sm{font-size:.875rem;line-height:1.25rem}.workativ-widget .text-base{font-size:1rem;line-height:1.5rem}.workativ-widget .font-normal{font-weight:400}.workativ-widget .font-semibold{font-weight:600}.workativ-widget .font-bold{font-weight:700}.workativ-widget .text-black{--tw-text-opacity:1;color:rgba(0,0,0,var(--tw-text-opacity))}.workativ-widget .text-white{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.workativ-widget .text-gray-200{--tw-text-opacity:1;color:rgba(229,231,235,var(--tw-text-opacity))}.workativ-widget .hover\:text-black:hover{--tw-text-opacity:1;color:rgba(0,0,0,var(--tw-text-opacity))}.workativ-widget *,.workativ-widget :after,.workativ-widget :before{--tw-shadow:0 0 transparent}.workativ-widget .shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,0.1),0 10px 10px -5px rgba(0,0,0,0.04)}.workativ-widget .shadow-2xl,.workativ-widget .shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.workativ-widget .shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,0.25)}.workativ-widget .focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.workativ-widget *,.workativ-widget :after,.workativ-widget :before{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,0.5);--tw-ring-offset-shadow:0 0 transparent;--tw-ring-shadow:0 0 transparent}.workativ-widget .transition{transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.workativ-widget .ease-linear{transition-timing-function:linear}.workativ-widget .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (min-width:640px){.workativ-widget .sm\:right-0{right:0}.workativ-widget .sm\:bottom-0{bottom:0}}@media (min-width:1280px){.workativ-widget .xl\:right-6{right:1.5rem}.workativ-widget .xl\:bottom-32{bottom:8rem}}.workativ-widget *,.workativ-widget :after,.workativ-widget :before{box-sizing:border-box;border:0 solid #e5e7eb;font-family:Open Sans,sans-serif}.workativ-widget .flex{display:flex}@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;700&display=swap");@font-face{font-family:Gordita-Medium;src:url(/Gordita-Medium.e5d1fa87.woff2) format("woff2"),url(/Gordita-Medium.e5d1fa87.woff2) format("woff");font-weight:500;font-style:normal}@font-face{font-family:Gordita-Regular;src:url(/Gordita-Regular.6d2fd269.woff2) format("woff2"),url(/Gordita-Regular.6d2fd269.woff2) format("woff");font-weight:500;font-style:normal}
|