@botonic/webchat-lit 2.34.0 → 2.34.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/CHANGELOG.md +22 -0
- package/package.json +6 -4
- package/src/lib/debug-event/content-renderers.js +24 -31
- package/src/lib/debug-event/content-renderers.js.map +1 -1
- package/src/lib/debug-event/debug-event.css.js +3 -3
- package/src/lib/debug-event/debug-event.d.ts +0 -2
- package/src/lib/debug-event/debug-event.js +3 -18
- package/src/lib/debug-event/debug-event.js.map +1 -1
- package/src/lib/shared/base-styles.js +50 -48
- package/src/lib/shared/base-styles.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
## 2.34.2 (2026-07-13)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- **webchat-lit:** debug-event component feedback ([#1007](https://github.com/metis-ai/hubtype-product/pull/1007))
|
|
6
|
+
|
|
7
|
+
### ❤️ Thank You
|
|
8
|
+
|
|
9
|
+
- Claude Sonnet 4.6
|
|
10
|
+
- David Hidalgo @Davidhidalgo
|
|
11
|
+
|
|
12
|
+
## 2.34.1 (2026-07-09)
|
|
13
|
+
|
|
14
|
+
### 🩹 Fixes
|
|
15
|
+
|
|
16
|
+
- **webchat-lit:** move lit and @botonic/shared to dependencies ([#1003](https://github.com/metis-ai/hubtype-product/pull/1003))
|
|
17
|
+
|
|
18
|
+
### ❤️ Thank You
|
|
19
|
+
|
|
20
|
+
- Claude Sonnet 4.6
|
|
21
|
+
- David Hidalgo @Davidhidalgo
|
|
22
|
+
|
|
1
23
|
## 2.34.0 (2026-07-09)
|
|
2
24
|
|
|
3
25
|
### 🚀 Features
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botonic/webchat-lit",
|
|
3
|
-
"version": "2.34.
|
|
3
|
+
"version": "2.34.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./src/index.d.ts",
|
|
6
6
|
"module": "./src/index.js",
|
|
@@ -14,10 +14,12 @@
|
|
|
14
14
|
"import": "./src/lib/debug-event/debug-event.js"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
|
-
"
|
|
17
|
+
"dependencies": {
|
|
18
18
|
"lit": "^3.0.0",
|
|
19
|
-
"
|
|
20
|
-
|
|
19
|
+
"@botonic/shared": "2.34.2"
|
|
20
|
+
},
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"tslib": "^2.3.0"
|
|
21
23
|
},
|
|
22
24
|
"publishConfig": {
|
|
23
25
|
"access": "public"
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { html, nothing } from 'lit';
|
|
2
|
-
import { classMap } from 'lit/directives/class-map.js';
|
|
3
2
|
import { aiSpecialistIcon, circleCheckIcon, filePdfIcon, fileWordIcon, handIcon, linkIcon, screwdriverWrenchIcon, } from './icons';
|
|
4
3
|
const RETRIEVE_KNOWLEDGE_TOOL = 'retrieve_knowledge';
|
|
5
4
|
export function parseTools(tools) {
|
|
@@ -32,11 +31,11 @@ export function getSourceIcon(source) {
|
|
|
32
31
|
return fileWordIcon();
|
|
33
32
|
return linkIcon();
|
|
34
33
|
}
|
|
35
|
-
function renderSourcesSection(sources, hasChunks, label, onSeeChunks
|
|
34
|
+
function renderSourcesSection(sources, hasChunks, label, onSeeChunks) {
|
|
36
35
|
if (sources.length === 0)
|
|
37
36
|
return nothing;
|
|
38
37
|
return html `
|
|
39
|
-
<div class="debug-detail"
|
|
38
|
+
<div class="debug-detail">
|
|
40
39
|
<strong class="debug-label">${label}</strong>
|
|
41
40
|
${sources.map(source => {
|
|
42
41
|
var _a, _b;
|
|
@@ -64,7 +63,10 @@ function renderSourcesSection(sources, hasChunks, label, onSeeChunks, lineEnd =
|
|
|
64
63
|
? html `<button
|
|
65
64
|
type="button"
|
|
66
65
|
class="see-info-button"
|
|
67
|
-
@click=${
|
|
66
|
+
@click=${(e) => {
|
|
67
|
+
e.stopPropagation();
|
|
68
|
+
onSeeChunks();
|
|
69
|
+
}}
|
|
68
70
|
>
|
|
69
71
|
See chunks
|
|
70
72
|
</button>`
|
|
@@ -72,23 +74,17 @@ function renderSourcesSection(sources, hasChunks, label, onSeeChunks, lineEnd =
|
|
|
72
74
|
</div>
|
|
73
75
|
`;
|
|
74
76
|
}
|
|
75
|
-
function renderGuardrailList(guardrails
|
|
77
|
+
function renderGuardrailList(guardrails) {
|
|
76
78
|
if (guardrails.length === 0)
|
|
77
79
|
return nothing;
|
|
78
80
|
return html `
|
|
79
|
-
${guardrails.map(
|
|
80
|
-
|
|
81
|
-
return html `
|
|
82
|
-
<div
|
|
83
|
-
class=${classMap({ 'guardrail-item': true, 'is-last': isLast })}
|
|
84
|
-
?data-line-end=${isLast}
|
|
85
|
-
>
|
|
81
|
+
${guardrails.map(g => html `
|
|
82
|
+
<div class="guardrail-item">
|
|
86
83
|
${handIcon()}
|
|
87
84
|
<span class="guardrail-label">Guardrail triggered</span>
|
|
88
85
|
<span class="guardrail-value">- ${g}</span>
|
|
89
86
|
</div>
|
|
90
|
-
|
|
91
|
-
})}
|
|
87
|
+
`)}
|
|
92
88
|
`;
|
|
93
89
|
}
|
|
94
90
|
export function renderHandoffContent(data, ctx) {
|
|
@@ -106,7 +102,7 @@ export function renderHandoffContent(data, ctx) {
|
|
|
106
102
|
</div>
|
|
107
103
|
${ctx.noteContent
|
|
108
104
|
? html `
|
|
109
|
-
<div class="debug-detail"
|
|
105
|
+
<div class="debug-detail">
|
|
110
106
|
<strong class="debug-label">Note</strong>
|
|
111
107
|
<div class="debug-value">${ctx.noteContent}</div>
|
|
112
108
|
</div>
|
|
@@ -131,7 +127,7 @@ export function renderKnowledgeBaseContent(data, ctx) {
|
|
|
131
127
|
|
|
132
128
|
${showFailReason
|
|
133
129
|
? html `
|
|
134
|
-
<div class="debug-detail"
|
|
130
|
+
<div class="debug-detail">
|
|
135
131
|
<strong class="debug-label">Knowledge Base Fail Reason</strong>
|
|
136
132
|
<div class="debug-value">${data.knowledgebase_fail_reason}</div>
|
|
137
133
|
</div>
|
|
@@ -140,14 +136,14 @@ export function renderKnowledgeBaseContent(data, ctx) {
|
|
|
140
136
|
${renderSourcesSection(sources, chunks.length > 0, 'Sources', ctx.onSeeChunks)}
|
|
141
137
|
${hasKnowledge
|
|
142
138
|
? html `
|
|
143
|
-
<div class="guardrail-item"
|
|
139
|
+
<div class="guardrail-item">
|
|
144
140
|
${circleCheckIcon()}
|
|
145
141
|
<span class="guardrail-label">Knowledge found</span>
|
|
146
142
|
</div>
|
|
147
143
|
`
|
|
148
144
|
: nothing}
|
|
149
145
|
|
|
150
|
-
<div class="guardrail-item is-last"
|
|
146
|
+
<div class="guardrail-item is-last">
|
|
151
147
|
${circleCheckIcon()}
|
|
152
148
|
<span class="guardrail-label">Faithful answer</span>
|
|
153
149
|
</div>
|
|
@@ -186,7 +182,10 @@ export function renderAiAgentContent(data, ctx) {
|
|
|
186
182
|
<button
|
|
187
183
|
type="button"
|
|
188
184
|
class="see-info-button"
|
|
189
|
-
@click=${() =>
|
|
185
|
+
@click=${(e) => {
|
|
186
|
+
e.stopPropagation();
|
|
187
|
+
ctx.onSeeToolDetails(tool);
|
|
188
|
+
}}
|
|
190
189
|
>
|
|
191
190
|
Details
|
|
192
191
|
</button>
|
|
@@ -203,27 +202,21 @@ export function renderAiAgentContent(data, ctx) {
|
|
|
203
202
|
`
|
|
204
203
|
: nothing}
|
|
205
204
|
${renderGuardrailList(data.input_guardrails_triggered)}
|
|
206
|
-
${renderGuardrailList(data.output_guardrails_triggered
|
|
205
|
+
${renderGuardrailList(data.output_guardrails_triggered)}
|
|
207
206
|
${data.exit
|
|
208
207
|
? html `
|
|
209
|
-
<div class="debug-detail"
|
|
208
|
+
<div class="debug-detail">
|
|
210
209
|
<strong class="debug-label">Exit</strong>
|
|
211
210
|
</div>
|
|
212
211
|
`
|
|
213
212
|
: nothing}
|
|
214
213
|
${data.error
|
|
215
214
|
? html `
|
|
216
|
-
<div class="debug-detail"
|
|
215
|
+
<div class="debug-detail">
|
|
217
216
|
<strong class="debug-label">Error</strong>
|
|
218
217
|
</div>
|
|
219
218
|
`
|
|
220
219
|
: nothing}
|
|
221
|
-
${!hasGuardrailsOrExit &&
|
|
222
|
-
otherTools.length === 0 &&
|
|
223
|
-
sources.length === 0 &&
|
|
224
|
-
!query
|
|
225
|
-
? html `<div class="debug-detail" data-line-end></div>`
|
|
226
|
-
: nothing}
|
|
227
220
|
</div>
|
|
228
221
|
`;
|
|
229
222
|
}
|
|
@@ -232,7 +225,7 @@ export function renderAiAgentRouterContent(data) {
|
|
|
232
225
|
<div class="debug-content-wrapper">
|
|
233
226
|
${data.available_specialists.length > 0
|
|
234
227
|
? html `
|
|
235
|
-
<div class="debug-detail"
|
|
228
|
+
<div class="debug-detail">
|
|
236
229
|
<strong class="debug-label">Specialists available</strong>
|
|
237
230
|
${data.available_specialists.map(s => html `
|
|
238
231
|
<div class="debug-item-with-icon">
|
|
@@ -275,7 +268,7 @@ export function renderConditionalCustomContent(data) {
|
|
|
275
268
|
<strong class="debug-label">Operator</strong>
|
|
276
269
|
<div class="debug-value">${data.operator}</div>
|
|
277
270
|
</div>
|
|
278
|
-
<div class="debug-detail"
|
|
271
|
+
<div class="debug-detail">
|
|
279
272
|
<strong class="debug-label">Target</strong>
|
|
280
273
|
<div class="debug-value">${data.conditional_variable}</div>
|
|
281
274
|
</div>
|
|
@@ -293,7 +286,7 @@ export function renderConditionalQueueStatusContent(data) {
|
|
|
293
286
|
<strong class="debug-label">Status</strong>
|
|
294
287
|
<div class="debug-value">${data.is_queue_open ? 'Open' : 'Closed'}</div>
|
|
295
288
|
</div>
|
|
296
|
-
<div class="debug-detail"
|
|
289
|
+
<div class="debug-detail">
|
|
297
290
|
<strong class="debug-label">Agents available</strong>
|
|
298
291
|
<div class="debug-value">${data.is_available_agent ? 'Yes' : 'No'}</div>
|
|
299
292
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-renderers.js","sourceRoot":"","sources":["../../../../../../../libs/botonic/webchat-lit/src/lib/debug-event/content-renderers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"content-renderers.js","sourceRoot":"","sources":["../../../../../../../libs/botonic/webchat-lit/src/lib/debug-event/content-renderers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAA;AAExD,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,qBAAqB,GACtB,MAAM,SAAS,CAAA;AAYhB,MAAM,uBAAuB,GAAG,oBAAoB,CAAA;AAQpD,MAAM,UAAU,UAAU,CAAC,KAAqB;;IAC9C,MAAM,UAAU,GAAmB,EAAE,CAAA;IACrC,MAAM,aAAa,GAAa,EAAE,CAAA;IAClC,MAAM,YAAY,GAAa,EAAE,CAAA;IACjC,IAAI,KAAyB,CAAA;IAE7B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,IAAI,CAAC,SAAS,KAAK,uBAAuB,EAAE,CAAC;YAC/C,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YACrB,SAAQ;QACV,CAAC;QACD,IAAI,OAAO,CAAA,MAAA,IAAI,CAAC,cAAc,0CAAG,OAAO,CAAC,CAAA,KAAK,QAAQ,EAAE,CAAC;YACvD,KAAK,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAW,CAAA;QAChD,CAAC;QACD,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,MAAA,IAAI,CAAC,yBAAyB,mCAAI,EAAE,CAAC,CAAC,CAAA;QAC7D,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,MAAA,IAAI,CAAC,wBAAwB,mCAAI,EAAE,CAAC,CAA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ACjC,CAAC,CAAC,IAAI,CAAA;;gDAEgC,IAAI,CAAC,eAAe;mBACjD;QACT,CAAC,CAAC,IAAI,CAAC,0BAA0B,CAAC,MAAM,GAAG,CAAC;YAC1C,CAAC,CAAC,IAAI,CAAA;kBACA,IAAI,CAAC,0BAA0B,CAAC,GAAG,CACnC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAA;;wBAEH,QAAQ,EAAE;;wDAEsB,CAAC;;mBAEtC,CACF;eACF;YACH,CAAC,CAAC,IAAI,CAAA,4CAA4C;;;GAG3D,CAAA;AACH,CAAC;AAED,MAAM,UAAU,8BAA8B,CAC5C,IAAiC;IAEjC,OAAO,IAAI,CAAA;;;;mCAIsB,IAAI,CAAC,eAAe;;;;mCAIpB,IAAI,CAAC,QAAQ;;;;mCAIb,IAAI,CAAC,oBAAoB;;;GAGzD,CAAA;AACH,CAAC;AAED,MAAM,UAAU,mCAAmC,CACjD,IAAsC;IAEtC,OAAO,IAAI,CAAA;;;;mCAIsB,IAAI,CAAC,UAAU;;;;mCAIf,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ;;;;mCAItC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI;;;GAGtE,CAAA;AACH,CAAC"}
|
|
@@ -21,7 +21,7 @@ export const debugEventStyles = css `
|
|
|
21
21
|
border-radius: var(--radius-s);
|
|
22
22
|
font-family: var(--font-family);
|
|
23
23
|
box-sizing: border-box;
|
|
24
|
-
width:
|
|
24
|
+
width: 100%;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
.debug-root.is-collapsible {
|
|
@@ -200,7 +200,7 @@ export const debugEventStyles = css `
|
|
|
200
200
|
width: 100%;
|
|
201
201
|
min-width: 0;
|
|
202
202
|
overflow: hidden;
|
|
203
|
-
|
|
203
|
+
margin-bottom: var(--spacing-xs);
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
.debug-content-wrapper::before {
|
|
@@ -213,7 +213,7 @@ export const debugEventStyles = css `
|
|
|
213
213
|
var(--surface-foreground-border-color)
|
|
214
214
|
);
|
|
215
215
|
top: 0;
|
|
216
|
-
height:
|
|
216
|
+
height: 100%;
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
.debug-root.is-collapsible:hover .debug-content-wrapper::before {
|
|
@@ -6,12 +6,10 @@ export declare class BotonicDebugEvent extends LitElement {
|
|
|
6
6
|
noteContent?: string;
|
|
7
7
|
private _expanded;
|
|
8
8
|
private _hasBeenOpened;
|
|
9
|
-
private _lineEndElements;
|
|
10
9
|
static styles: import("lit").CSSResult[];
|
|
11
10
|
connectedCallback(): void;
|
|
12
11
|
updated(changed: Map<string, unknown>): void;
|
|
13
12
|
private _maybeRequestNote;
|
|
14
|
-
private _updateConnectorLine;
|
|
15
13
|
private get _config();
|
|
16
14
|
private get _isCollapsible();
|
|
17
15
|
private _handleHeaderClick;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
2
|
import { EventAction } from '@botonic/shared';
|
|
3
3
|
import { html, LitElement, nothing } from 'lit';
|
|
4
|
-
import { property,
|
|
4
|
+
import { property, state } from 'lit/decorators.js';
|
|
5
5
|
import { classMap } from 'lit/directives/class-map.js';
|
|
6
6
|
import { resetStyles } from '../shared/base-styles';
|
|
7
7
|
import { debugEventStyles } from './debug-event.css';
|
|
@@ -43,7 +43,6 @@ export class BotonicDebugEvent extends LitElement {
|
|
|
43
43
|
updated(changed) {
|
|
44
44
|
super.updated(changed);
|
|
45
45
|
this._maybeRequestNote(changed);
|
|
46
|
-
this._updateConnectorLine();
|
|
47
46
|
}
|
|
48
47
|
_maybeRequestNote(changed) {
|
|
49
48
|
if (!changed.has('data') && !changed.has('noteContent'))
|
|
@@ -59,17 +58,6 @@ export class BotonicDebugEvent extends LitElement {
|
|
|
59
58
|
}));
|
|
60
59
|
}
|
|
61
60
|
}
|
|
62
|
-
_updateConnectorLine() {
|
|
63
|
-
const elements = [...this._lineEndElements];
|
|
64
|
-
const last = elements[elements.length - 1];
|
|
65
|
-
if (last) {
|
|
66
|
-
const bottom = last.offsetTop + last.offsetHeight;
|
|
67
|
-
const wrapper = this.renderRoot.querySelector('.debug-content-wrapper');
|
|
68
|
-
if (wrapper instanceof HTMLElement) {
|
|
69
|
-
wrapper.style.setProperty('--last-label-bottom', `${bottom}px`);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
61
|
get _config() {
|
|
74
62
|
return EVENT_CONFIG[this.action];
|
|
75
63
|
}
|
|
@@ -109,8 +97,9 @@ export class BotonicDebugEvent extends LitElement {
|
|
|
109
97
|
return html `
|
|
110
98
|
<div
|
|
111
99
|
class=${classMap({ 'debug-root': true, 'is-collapsible': collapsible })}
|
|
100
|
+
@click=${this._handleHeaderClick}
|
|
112
101
|
>
|
|
113
|
-
<div class="debug-header"
|
|
102
|
+
<div class="debug-header">
|
|
114
103
|
<div class="debug-title">
|
|
115
104
|
<span class="debug-icon">${config === null || config === void 0 ? void 0 : config.icon()}</span>
|
|
116
105
|
${config === null || config === void 0 ? void 0 : config.renderTitle(this.data)}
|
|
@@ -147,10 +136,6 @@ __decorate([
|
|
|
147
136
|
state(),
|
|
148
137
|
__metadata("design:type", Object)
|
|
149
138
|
], BotonicDebugEvent.prototype, "_expanded", void 0);
|
|
150
|
-
__decorate([
|
|
151
|
-
queryAll('[data-line-end]'),
|
|
152
|
-
__metadata("design:type", Object)
|
|
153
|
-
], BotonicDebugEvent.prototype, "_lineEndElements", void 0);
|
|
154
139
|
if (!customElements.get('botonic-debug-event')) {
|
|
155
140
|
customElements.define('botonic-debug-event', BotonicDebugEvent);
|
|
156
141
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug-event.js","sourceRoot":"","sources":["../../../../../../../libs/botonic/webchat-lit/src/lib/debug-event/debug-event.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WA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-box;
|
|
8
|
+
}
|
|
12
9
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
font-family: var(--font-family);
|
|
17
|
-
font-weight: var(--font-weight-regular);
|
|
18
|
-
word-break: normal;
|
|
19
|
-
line-height: 150%;
|
|
20
|
-
-webkit-font-smoothing: antialiased;
|
|
21
|
-
}
|
|
10
|
+
* {
|
|
11
|
+
margin: 0;
|
|
12
|
+
}
|
|
22
13
|
|
|
23
|
-
@media (prefers-color-scheme: dark) {
|
|
24
14
|
:host {
|
|
25
|
-
|
|
15
|
+
font-style: normal;
|
|
16
|
+
font-size: var(--font-size-s);
|
|
17
|
+
font-family: var(--font-family);
|
|
18
|
+
font-weight: var(--font-weight-regular);
|
|
19
|
+
word-break: normal;
|
|
20
|
+
line-height: 150%;
|
|
21
|
+
-webkit-font-smoothing: antialiased;
|
|
26
22
|
}
|
|
27
|
-
}
|
|
28
23
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
display: block;
|
|
35
|
-
max-width: 100%;
|
|
36
|
-
}
|
|
24
|
+
@media (prefers-color-scheme: dark) {
|
|
25
|
+
:host {
|
|
26
|
+
color: var(--color-neutral-900);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
37
29
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
30
|
+
img,
|
|
31
|
+
picture,
|
|
32
|
+
video,
|
|
33
|
+
canvas,
|
|
34
|
+
svg {
|
|
35
|
+
display: block;
|
|
36
|
+
max-width: 100%;
|
|
37
|
+
}
|
|
44
38
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
39
|
+
input,
|
|
40
|
+
button,
|
|
41
|
+
textarea,
|
|
42
|
+
select {
|
|
43
|
+
font: inherit;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
p,
|
|
47
|
+
h1,
|
|
48
|
+
h2,
|
|
49
|
+
h3,
|
|
50
|
+
h4,
|
|
51
|
+
h5,
|
|
52
|
+
h6 {
|
|
53
|
+
overflow-wrap: break-word;
|
|
54
|
+
}
|
|
54
55
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
ul,
|
|
57
|
+
ol {
|
|
58
|
+
list-style: none;
|
|
59
|
+
padding: 0;
|
|
60
|
+
}
|
|
59
61
|
}
|
|
60
62
|
`;
|
|
61
63
|
//# sourceMappingURL=base-styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-styles.js","sourceRoot":"","sources":["../../../../../../../libs/botonic/webchat-lit/src/lib/shared/base-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"base-styles.js","sourceRoot":"","sources":["../../../../../../../libs/botonic/webchat-lit/src/lib/shared/base-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4D7B,CAAA"}
|