@genesislcap/ai-assistant 15.35.4 → 15.36.1
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/dist/ai-assistant.api.json +23 -0
- package/dist/ai-assistant.d.ts +46 -0
- package/dist/custom-elements.json +104 -0
- package/dist/dts/components/chat-bubble/chat-bubble.d.ts +18 -0
- package/dist/dts/components/chat-bubble/chat-bubble.d.ts.map +1 -1
- package/dist/dts/components/chat-bubble/chat-bubble.template.d.ts.map +1 -1
- package/dist/dts/components/chat-markdown/chat-markdown.d.ts +29 -0
- package/dist/dts/components/chat-markdown/chat-markdown.d.ts.map +1 -1
- package/dist/dts/components/halo-overlay.d.ts +30 -0
- package/dist/dts/components/halo-overlay.d.ts.map +1 -1
- package/dist/dts/index.d.ts +1 -1
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/main/main.template.d.ts +15 -0
- package/dist/dts/main/main.template.d.ts.map +1 -1
- package/dist/dts/suggestions/chat-suggestions.d.ts +7 -0
- package/dist/dts/suggestions/chat-suggestions.d.ts.map +1 -1
- package/dist/esm/components/chat-bubble/chat-bubble.js +27 -0
- package/dist/esm/components/chat-bubble/chat-bubble.template.js +5 -3
- package/dist/esm/components/chat-markdown/chat-markdown.js +132 -1
- package/dist/esm/components/halo-overlay.js +96 -8
- package/dist/esm/index.js +3 -1
- package/dist/esm/main/main.template.js +110 -45
- package/dist/esm/suggestions/chat-suggestions.js +11 -3
- package/docs/styling.md +153 -0
- package/package.json +18 -18
|
@@ -17523,6 +17523,29 @@
|
|
|
17523
17523
|
],
|
|
17524
17524
|
"extendsTokenRanges": []
|
|
17525
17525
|
},
|
|
17526
|
+
{
|
|
17527
|
+
"kind": "Variable",
|
|
17528
|
+
"canonicalReference": "@genesislcap/ai-assistant!MARKDOWN_EXPORTPARTS:var",
|
|
17529
|
+
"docComment": "/**\n * Every part this component exposes, as an `exportparts` value.\n *\n * `::part()` crosses exactly one shadow boundary, so a host that renders `<ai-chat-markdown>` in its own shadow root has to forward these for an app to reach them at all. Built from the map above rather than written out, so the forwarded list cannot drift from what is emitted.\n */\n",
|
|
17530
|
+
"excerptTokens": [
|
|
17531
|
+
{
|
|
17532
|
+
"kind": "Content",
|
|
17533
|
+
"text": "MARKDOWN_EXPORTPARTS: "
|
|
17534
|
+
},
|
|
17535
|
+
{
|
|
17536
|
+
"kind": "Content",
|
|
17537
|
+
"text": "string"
|
|
17538
|
+
}
|
|
17539
|
+
],
|
|
17540
|
+
"fileUrlPath": "src/components/chat-markdown/chat-markdown.ts",
|
|
17541
|
+
"isReadonly": true,
|
|
17542
|
+
"releaseTag": "Public",
|
|
17543
|
+
"name": "MARKDOWN_EXPORTPARTS",
|
|
17544
|
+
"variableTypeTokenRange": {
|
|
17545
|
+
"startIndex": 1,
|
|
17546
|
+
"endIndex": 2
|
|
17547
|
+
}
|
|
17548
|
+
},
|
|
17526
17549
|
{
|
|
17527
17550
|
"kind": "Variable",
|
|
17528
17551
|
"canonicalReference": "@genesislcap/ai-assistant!messageTimestampTemplate:var",
|
package/dist/ai-assistant.d.ts
CHANGED
|
@@ -651,6 +651,27 @@ export declare class AiChatMarkdown extends GenesisElement {
|
|
|
651
651
|
content: string;
|
|
652
652
|
/** @internal */
|
|
653
653
|
renderMarkdown(): string;
|
|
654
|
+
/**
|
|
655
|
+
* Tag the generated elements with shadow parts so an embedding app can style them.
|
|
656
|
+
*
|
|
657
|
+
* Takes the tree DOMPurify built rather than re-parsing its serialised output: `content` changes
|
|
658
|
+
* on every streamed chunk, so a second parse/serialise round trip would run per chunk over the
|
|
659
|
+
* whole message, and the string the browser finally parses is then serialised straight from the
|
|
660
|
+
* tree DOMPurify checked. Parse/serialise mismatches are where mXSS bypasses have historically
|
|
661
|
+
* lived, and this walk has no need to introduce one.
|
|
662
|
+
*
|
|
663
|
+
* Only ever *adds* attributes, to DOM that has already been cleared - so it is not itself
|
|
664
|
+
* sanitiser surface.
|
|
665
|
+
*
|
|
666
|
+
* Lists additionally carry a level: a top-level list is `md-ul md-ul-level-1`, a list nested
|
|
667
|
+
* inside it is `md-ul-level-2`, and an `li` takes the level of the list holding it. Levels are
|
|
668
|
+
* clamped at `MAX_LIST_LEVEL`, so a list deeper than that answers to the deepest level
|
|
669
|
+
* rather than to a name no host forwards. Chat markdown rarely nests, so this is a safety valve
|
|
670
|
+
* rather than a feature - without it, every list at every depth would answer to one selector and
|
|
671
|
+
* there would be no way to tell them apart afterwards. Depth comes from walking the tree rather
|
|
672
|
+
* than from marked's renderers, which are invoked innermost-first and so cannot count downwards.
|
|
673
|
+
*/
|
|
674
|
+
private annotateParts;
|
|
654
675
|
}
|
|
655
676
|
|
|
656
677
|
/**
|
|
@@ -1157,6 +1178,22 @@ export declare interface AssistantAppSettingsToggle {
|
|
|
1157
1178
|
*/
|
|
1158
1179
|
export declare const assistantSettingsSectionTitleStyles: ElementStyles;
|
|
1159
1180
|
|
|
1181
|
+
/**
|
|
1182
|
+
* Part names for one avatar element: the bare name, a role-level name, and — on the assistant
|
|
1183
|
+
* side, whose rows vary — the message type.
|
|
1184
|
+
*
|
|
1185
|
+
* The role-level name is the one an app usually wants. `messageType` splits the assistant across
|
|
1186
|
+
* `ai`, `ai-thinking`, `ai-function` and `interaction`, so without it "style the assistant's
|
|
1187
|
+
* avatar, not the user's" takes four selectors and silently misses any type added later.
|
|
1188
|
+
* `::part()` names cannot be chained, so each has to be a name of its own rather than a
|
|
1189
|
+
* combination. The user side needs no extra name — its role and its type are both `user`.
|
|
1190
|
+
*
|
|
1191
|
+
* Exported for the unit test that pins the vocabulary; not part of the element API.
|
|
1192
|
+
*
|
|
1193
|
+
* @internal
|
|
1194
|
+
*/
|
|
1195
|
+
export declare const avatarPartsFor: (base: string, type: string) => string;
|
|
1196
|
+
|
|
1160
1197
|
declare interface BaseAgentConfig {
|
|
1161
1198
|
/**
|
|
1162
1199
|
* Stable identity for this agent. Used for classifier routing, manual
|
|
@@ -5055,6 +5092,15 @@ export declare interface ManualSelectionConfig {
|
|
|
5055
5092
|
hint?: string;
|
|
5056
5093
|
}
|
|
5057
5094
|
|
|
5095
|
+
/**
|
|
5096
|
+
* Every part this component exposes, as an `exportparts` value.
|
|
5097
|
+
*
|
|
5098
|
+
* `::part()` crosses exactly one shadow boundary, so a host that renders `<ai-chat-markdown>` in
|
|
5099
|
+
* its own shadow root has to forward these for an app to reach them at all. Built from the map
|
|
5100
|
+
* above rather than written out, so the forwarded list cannot drift from what is emitted.
|
|
5101
|
+
*/
|
|
5102
|
+
export declare const MARKDOWN_EXPORTPARTS: string;
|
|
5103
|
+
|
|
5058
5104
|
/**
|
|
5059
5105
|
* The timestamp shown beside the sender name (GENC-1257).
|
|
5060
5106
|
*
|
|
@@ -893,6 +893,14 @@
|
|
|
893
893
|
"name": "AiChatMarkdown",
|
|
894
894
|
"module": "./components/chat-markdown/chat-markdown"
|
|
895
895
|
}
|
|
896
|
+
},
|
|
897
|
+
{
|
|
898
|
+
"kind": "js",
|
|
899
|
+
"name": "MARKDOWN_EXPORTPARTS",
|
|
900
|
+
"declaration": {
|
|
901
|
+
"name": "MARKDOWN_EXPORTPARTS",
|
|
902
|
+
"module": "./components/chat-markdown/chat-markdown"
|
|
903
|
+
}
|
|
896
904
|
}
|
|
897
905
|
]
|
|
898
906
|
},
|
|
@@ -1321,6 +1329,50 @@
|
|
|
1321
1329
|
},
|
|
1322
1330
|
"privacy": "private"
|
|
1323
1331
|
},
|
|
1332
|
+
{
|
|
1333
|
+
"kind": "field",
|
|
1334
|
+
"name": "stopTimer",
|
|
1335
|
+
"type": {
|
|
1336
|
+
"text": "number | undefined"
|
|
1337
|
+
},
|
|
1338
|
+
"privacy": "private"
|
|
1339
|
+
},
|
|
1340
|
+
{
|
|
1341
|
+
"kind": "field",
|
|
1342
|
+
"name": "running",
|
|
1343
|
+
"type": {
|
|
1344
|
+
"text": "boolean"
|
|
1345
|
+
},
|
|
1346
|
+
"privacy": "private",
|
|
1347
|
+
"default": "false",
|
|
1348
|
+
"description": "Whether the loop should keep rescheduling itself — see AiHaloOverlay.tick."
|
|
1349
|
+
},
|
|
1350
|
+
{
|
|
1351
|
+
"kind": "method",
|
|
1352
|
+
"name": "activeChanged",
|
|
1353
|
+
"description": "Start/stop with `active`, so an idle overlay costs nothing.\n\nGuarded on `isConnected` because FAST invokes attribute-changed callbacks during\ninitialisation, before the element is in the document — `connectedCallback` is what decides\nfor an element that mounts already-active."
|
|
1354
|
+
},
|
|
1355
|
+
{
|
|
1356
|
+
"kind": "method",
|
|
1357
|
+
"name": "startAnimation",
|
|
1358
|
+
"privacy": "private"
|
|
1359
|
+
},
|
|
1360
|
+
{
|
|
1361
|
+
"kind": "method",
|
|
1362
|
+
"name": "scheduleStop",
|
|
1363
|
+
"privacy": "private",
|
|
1364
|
+
"description": "Keep spinning until the host has finished fading out.\n\nDeactivating only drops the host's opacity — the overlay is still on screen for the length of\nthe transition, so stopping the instant `active` flips would freeze the rotation mid-fade.\n\nTimed rather than driven by `transitionend`, which never fires if the host is hidden or an app\noverrides the transition away, and a stop that never arrives is exactly the idle-tick bug this\ngating exists to prevent.\n\nThe timer re-reads `active` rather than trusting that it was cancelled. FAST reflects the\nproperty to the attribute on a queued update, so `activeChanged` can run again, out of order,\nafter a rapid toggle — and a stale stop landing on a re-activated overlay would leave it\nfrozen for good, which is worse than the idle ticking this gate removes."
|
|
1365
|
+
},
|
|
1366
|
+
{
|
|
1367
|
+
"kind": "method",
|
|
1368
|
+
"name": "cancelPendingStop",
|
|
1369
|
+
"privacy": "private"
|
|
1370
|
+
},
|
|
1371
|
+
{
|
|
1372
|
+
"kind": "method",
|
|
1373
|
+
"name": "stopAnimation",
|
|
1374
|
+
"privacy": "private"
|
|
1375
|
+
},
|
|
1324
1376
|
{
|
|
1325
1377
|
"kind": "method",
|
|
1326
1378
|
"name": "tick",
|
|
@@ -6725,6 +6777,15 @@
|
|
|
6725
6777
|
"kind": "javascript-module",
|
|
6726
6778
|
"path": "src/suggestions/chat-suggestions.ts",
|
|
6727
6779
|
"declarations": [
|
|
6780
|
+
{
|
|
6781
|
+
"kind": "variable",
|
|
6782
|
+
"name": "SUGGESTIONS_EXPORTPARTS",
|
|
6783
|
+
"type": {
|
|
6784
|
+
"text": "string"
|
|
6785
|
+
},
|
|
6786
|
+
"default": "'suggestions-container, suggestion-placeholder, suggestion-pill'",
|
|
6787
|
+
"description": "Every part this component exposes, as an `exportparts` value.\n\n`::part()` crosses exactly one shadow boundary, so a host rendering `<chat-suggestions>` in its\nown shadow root has to forward these for an embedding app to reach them at all."
|
|
6788
|
+
},
|
|
6728
6789
|
{
|
|
6729
6790
|
"kind": "class",
|
|
6730
6791
|
"description": "",
|
|
@@ -6794,6 +6855,14 @@
|
|
|
6794
6855
|
}
|
|
6795
6856
|
],
|
|
6796
6857
|
"exports": [
|
|
6858
|
+
{
|
|
6859
|
+
"kind": "js",
|
|
6860
|
+
"name": "SUGGESTIONS_EXPORTPARTS",
|
|
6861
|
+
"declaration": {
|
|
6862
|
+
"name": "SUGGESTIONS_EXPORTPARTS",
|
|
6863
|
+
"module": "src/suggestions/chat-suggestions.ts"
|
|
6864
|
+
}
|
|
6865
|
+
},
|
|
6797
6866
|
{
|
|
6798
6867
|
"kind": "js",
|
|
6799
6868
|
"name": "ChatSuggestions",
|
|
@@ -13319,6 +13388,14 @@
|
|
|
13319
13388
|
"kind": "javascript-module",
|
|
13320
13389
|
"path": "src/components/chat-markdown/chat-markdown.ts",
|
|
13321
13390
|
"declarations": [
|
|
13391
|
+
{
|
|
13392
|
+
"kind": "variable",
|
|
13393
|
+
"name": "MARKDOWN_EXPORTPARTS",
|
|
13394
|
+
"type": {
|
|
13395
|
+
"text": "string"
|
|
13396
|
+
},
|
|
13397
|
+
"description": "Every part this component exposes, as an `exportparts` value.\n\n`::part()` crosses exactly one shadow boundary, so a host that renders `<ai-chat-markdown>` in\nits own shadow root has to forward these for an app to reach them at all. Built from the map\nabove rather than written out, so the forwarded list cannot drift from what is emitted."
|
|
13398
|
+
},
|
|
13322
13399
|
{
|
|
13323
13400
|
"kind": "class",
|
|
13324
13401
|
"description": "",
|
|
@@ -13332,6 +13409,25 @@
|
|
|
13332
13409
|
},
|
|
13333
13410
|
"default": "''",
|
|
13334
13411
|
"description": "The markdown string to render."
|
|
13412
|
+
},
|
|
13413
|
+
{
|
|
13414
|
+
"kind": "method",
|
|
13415
|
+
"name": "annotateParts",
|
|
13416
|
+
"privacy": "private",
|
|
13417
|
+
"return": {
|
|
13418
|
+
"type": {
|
|
13419
|
+
"text": "string"
|
|
13420
|
+
}
|
|
13421
|
+
},
|
|
13422
|
+
"parameters": [
|
|
13423
|
+
{
|
|
13424
|
+
"name": "fragment",
|
|
13425
|
+
"type": {
|
|
13426
|
+
"text": "DocumentFragment"
|
|
13427
|
+
}
|
|
13428
|
+
}
|
|
13429
|
+
],
|
|
13430
|
+
"description": "Tag the generated elements with shadow parts so an embedding app can style them.\n\nTakes the tree DOMPurify built rather than re-parsing its serialised output: `content` changes\non every streamed chunk, so a second parse/serialise round trip would run per chunk over the\nwhole message, and the string the browser finally parses is then serialised straight from the\ntree DOMPurify checked. Parse/serialise mismatches are where mXSS bypasses have historically\nlived, and this walk has no need to introduce one.\n\nOnly ever *adds* attributes, to DOM that has already been cleared - so it is not itself\nsanitiser surface.\n\nLists additionally carry a level: a top-level list is `md-ul md-ul-level-1`, a list nested\ninside it is `md-ul-level-2`, and an `li` takes the level of the list holding it. Levels are\nclamped at `MAX_LIST_LEVEL`, so a list deeper than that answers to the deepest level\nrather than to a name no host forwards. Chat markdown rarely nests, so this is a safety valve\nrather than a feature - without it, every list at every depth would answer to one selector and\nthere would be no way to tell them apart afterwards. Depth comes from walking the tree rather\nthan from marked's renderers, which are invoked innermost-first and so cannot count downwards."
|
|
13335
13431
|
}
|
|
13336
13432
|
],
|
|
13337
13433
|
"superclass": {
|
|
@@ -13343,6 +13439,14 @@
|
|
|
13343
13439
|
}
|
|
13344
13440
|
],
|
|
13345
13441
|
"exports": [
|
|
13442
|
+
{
|
|
13443
|
+
"kind": "js",
|
|
13444
|
+
"name": "MARKDOWN_EXPORTPARTS",
|
|
13445
|
+
"declaration": {
|
|
13446
|
+
"name": "MARKDOWN_EXPORTPARTS",
|
|
13447
|
+
"module": "src/components/chat-markdown/chat-markdown.ts"
|
|
13448
|
+
}
|
|
13449
|
+
},
|
|
13346
13450
|
{
|
|
13347
13451
|
"kind": "js",
|
|
13348
13452
|
"name": "AiChatMarkdown",
|
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
import { GenesisElement } from '@genesislcap/web-core';
|
|
2
|
+
/**
|
|
3
|
+
* Whether `el` still has an animation that will fire `animationend`.
|
|
4
|
+
*
|
|
5
|
+
* `dialog` is an exposed part, so an app's rules reach it and can leave the close waiting on an
|
|
6
|
+
* event that never arrives. Two shapes of that, both plausible customisations:
|
|
7
|
+
*
|
|
8
|
+
* - `::part(dialog) { animation: none }` to drop the bounce — no animation at all.
|
|
9
|
+
* - `::part(dialog) { animation: my-in 0.3s both }` to swap in its own entrance — that beats
|
|
10
|
+
* `.closing` in the cascade, so the exit never runs, and the entrance stays in `getAnimations()`
|
|
11
|
+
* as a finished animation held in effect by its fill mode.
|
|
12
|
+
*
|
|
13
|
+
* So presence in `getAnimations()` is not the question — whether anything is still going is.
|
|
14
|
+
* Tested for `running` rather than against `finished` so a paused animation, which will not fire
|
|
15
|
+
* either, is also treated as nothing to wait for.
|
|
16
|
+
*
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export declare function hasRunningAnimation(el: Element): boolean;
|
|
2
20
|
/**
|
|
3
21
|
* Floating chat bubble component that provides a draggable orb and dialog panel
|
|
4
22
|
* for embedding an AI assistant without a full-page layout.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-bubble.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-bubble/chat-bubble.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,cAAc,EAAoB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"chat-bubble.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-bubble/chat-bubble.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,cAAc,EAAoB,MAAM,uBAAuB,CAAC;AAK9F;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,OAAO,GAAG,OAAO,CAExD;AAkCD;;;;;;;;;GASG;AACH,qBAOa,YAAa,SAAQ,cAAc;IAChB,KAAK,EAAE,MAAM,CAAkB;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IACP,kBAAkB,EAAE,MAAM,CAAW;IAElF,gBAAgB;IACJ,aAAa,EAAE,WAAW,EAAE,CAAM;IAC9C,gBAAgB;IACJ,oBAAoB,EAAE,MAAM,CAAK;IAC7C,iFAAiF;IACrE,UAAU,EAAE,MAAM,CAAK;IACnC,+EAA+E;IACnE,SAAS,EAAE,MAAM,CAAK;IAClC,mFAAmF;IACvE,UAAU,EAAE,MAAM,CAAK;IACnC,iFAAiF;IACrE,SAAS,EAAE,MAAM,CAAK;IAClC,iEAAiE;IACrD,WAAW,EAAE,MAAM,CAAwB;IACvD,kEAAkE;IACtD,YAAY,EAAE,MAAM,CAAyB;IACzD,4DAA4D;IAChD,UAAU,EAAE,OAAO,CAAS;IACxC,6DAA6D;IACjD,OAAO,EAAE,OAAO,CAAS;IAErC,gBAAgB;IAChB,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB,gBAAgB;IAChB,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,gBAAgB;IAChB,QAAQ,CAAC,EAAE,WAAW,CAAC;IAEvB,OAAO,CAAC,QAAQ,CAAC,CAAa;IAC9B,OAAO,CAAC,gBAAgB,CAAC,CAAU;IACnC,OAAO,CAAC,cAAc,CAAC,CAAiB;IACxC,OAAO,CAAC,QAAQ,CAAkB;IAClC,OAAO,CAAC,UAAU,CAAoC;IACtD,OAAO,CAAC,WAAW,CAAa;IAChC,OAAO,CAAC,WAAW,CAAa;IAChC,OAAO,CAAC,aAAa,CAAa;IAClC,OAAO,CAAC,YAAY,CAAa;IACjC,OAAO,CAAC,UAAU,CAAkB;IACpC,OAAO,CAAC,YAAY,CAAa;IACjC,OAAO,CAAC,YAAY,CAAa;IACjC,OAAO,CAAC,SAAS,CAAC,CAAS;IAC3B,OAAO,CAAC,UAAU,CAAC,CAAkB;IAErC,iBAAiB;IAoCjB,kBAAkB;IAWlB,kBAAkB;IAIlB,oBAAoB;IAmBpB,iBAAiB,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO;IAoC3C,oBAAoB,CAAC,CAAC,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;IAc1D,OAAO,CAAC,iBAAiB;IAczB,iBAAiB,CAAC,CAAC,EAAE,UAAU;IAa/B,uBAAuB,CAAC,CAAC,EAAE,WAAW,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAkB5E,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA8B;IAO9D,OAAO,CAAC,WAAW;IAYnB,OAAO,CAAC,gBAAgB;IAkCxB,OAAO,CAAC,cAAc,CAOpB;IASF,OAAO,CAAC,cAAc,CAuBpB;IAMF,OAAO,CAAC,YAAY,CA0ClB;IAEF,QAAQ;IAIR,aAAa;IAiBb,IAAI,YAAY,IAAI,MAAM,CAazB;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-bubble.template.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-bubble/chat-bubble.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,YAAY,EAAQ,MAAM,uBAAuB,CAAC;AACvF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAgBlD,eAAO,MAAM,oBAAoB,QAAO,YAAY,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"chat-bubble.template.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-bubble/chat-bubble.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,YAAY,EAAQ,MAAM,uBAAuB,CAAC;AACvF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAgBlD,eAAO,MAAM,oBAAoB,QAAO,YAAY,CAAC,YAAY,CAmDhE,CAAC"}
|
|
@@ -1,8 +1,37 @@
|
|
|
1
1
|
import { GenesisElement } from '@genesislcap/web-core';
|
|
2
|
+
/**
|
|
3
|
+
* Every part this component exposes, as an `exportparts` value.
|
|
4
|
+
*
|
|
5
|
+
* `::part()` crosses exactly one shadow boundary, so a host that renders `<ai-chat-markdown>` in
|
|
6
|
+
* its own shadow root has to forward these for an app to reach them at all. Built from the map
|
|
7
|
+
* above rather than written out, so the forwarded list cannot drift from what is emitted.
|
|
8
|
+
*/
|
|
9
|
+
export declare const MARKDOWN_EXPORTPARTS: string;
|
|
2
10
|
export declare class AiChatMarkdown extends GenesisElement {
|
|
3
11
|
/** The markdown string to render. */
|
|
4
12
|
content: string;
|
|
5
13
|
/** @internal */
|
|
6
14
|
renderMarkdown(): string;
|
|
15
|
+
/**
|
|
16
|
+
* Tag the generated elements with shadow parts so an embedding app can style them.
|
|
17
|
+
*
|
|
18
|
+
* Takes the tree DOMPurify built rather than re-parsing its serialised output: `content` changes
|
|
19
|
+
* on every streamed chunk, so a second parse/serialise round trip would run per chunk over the
|
|
20
|
+
* whole message, and the string the browser finally parses is then serialised straight from the
|
|
21
|
+
* tree DOMPurify checked. Parse/serialise mismatches are where mXSS bypasses have historically
|
|
22
|
+
* lived, and this walk has no need to introduce one.
|
|
23
|
+
*
|
|
24
|
+
* Only ever *adds* attributes, to DOM that has already been cleared - so it is not itself
|
|
25
|
+
* sanitiser surface.
|
|
26
|
+
*
|
|
27
|
+
* Lists additionally carry a level: a top-level list is `md-ul md-ul-level-1`, a list nested
|
|
28
|
+
* inside it is `md-ul-level-2`, and an `li` takes the level of the list holding it. Levels are
|
|
29
|
+
* clamped at `MAX_LIST_LEVEL`, so a list deeper than that answers to the deepest level
|
|
30
|
+
* rather than to a name no host forwards. Chat markdown rarely nests, so this is a safety valve
|
|
31
|
+
* rather than a feature - without it, every list at every depth would answer to one selector and
|
|
32
|
+
* there would be no way to tell them apart afterwards. Depth comes from walking the tree rather
|
|
33
|
+
* than from marked's renderers, which are invoked innermost-first and so cannot count downwards.
|
|
34
|
+
*/
|
|
35
|
+
private annotateParts;
|
|
7
36
|
}
|
|
8
37
|
//# sourceMappingURL=chat-markdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-markdown.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-markdown/chat-markdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,cAAc,EAAoB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"chat-markdown.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-markdown/chat-markdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,cAAc,EAAoB,MAAM,uBAAuB,CAAC;AA0I7F;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAOvB,CAAC;AAWb,qBAOa,cAAe,SAAQ,cAAc;IAChD,qCAAqC;IACzB,OAAO,EAAE,MAAM,CAAM;IAEjC,gBAAgB;IAChB,cAAc;IAed;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,aAAa;CAmBtB"}
|
|
@@ -31,8 +31,38 @@ export declare class AiHaloOverlay extends GenesisElement {
|
|
|
31
31
|
private angle;
|
|
32
32
|
private lastTime?;
|
|
33
33
|
private animFrame?;
|
|
34
|
+
private stopTimer?;
|
|
35
|
+
/** Whether the loop should keep rescheduling itself — see {@link AiHaloOverlay.tick}. */
|
|
36
|
+
private running;
|
|
37
|
+
/**
|
|
38
|
+
* Start/stop with `active`, so an idle overlay costs nothing.
|
|
39
|
+
*
|
|
40
|
+
* Guarded on `isConnected` because FAST invokes attribute-changed callbacks during
|
|
41
|
+
* initialisation, before the element is in the document — `connectedCallback` is what decides
|
|
42
|
+
* for an element that mounts already-active.
|
|
43
|
+
*/
|
|
44
|
+
activeChanged(): void;
|
|
34
45
|
connectedCallback(): void;
|
|
35
46
|
disconnectedCallback(): void;
|
|
47
|
+
private startAnimation;
|
|
48
|
+
/**
|
|
49
|
+
* Keep spinning until the host has finished fading out.
|
|
50
|
+
*
|
|
51
|
+
* Deactivating only drops the host's opacity — the overlay is still on screen for the length of
|
|
52
|
+
* the transition, so stopping the instant `active` flips would freeze the rotation mid-fade.
|
|
53
|
+
*
|
|
54
|
+
* Timed rather than driven by `transitionend`, which never fires if the host is hidden or an app
|
|
55
|
+
* overrides the transition away, and a stop that never arrives is exactly the idle-tick bug this
|
|
56
|
+
* gating exists to prevent.
|
|
57
|
+
*
|
|
58
|
+
* The timer re-reads `active` rather than trusting that it was cancelled. FAST reflects the
|
|
59
|
+
* property to the attribute on a queued update, so `activeChanged` can run again, out of order,
|
|
60
|
+
* after a rapid toggle — and a stale stop landing on a re-activated overlay would leave it
|
|
61
|
+
* frozen for good, which is worse than the idle ticking this gate removes.
|
|
62
|
+
*/
|
|
63
|
+
private scheduleStop;
|
|
64
|
+
private cancelPendingStop;
|
|
65
|
+
private stopAnimation;
|
|
36
66
|
private tick;
|
|
37
67
|
}
|
|
38
68
|
//# sourceMappingURL=halo-overlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"halo-overlay.d.ts","sourceRoot":"","sources":["../../../src/components/halo-overlay.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,cAAc,EAAQ,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"halo-overlay.d.ts","sourceRoot":"","sources":["../../../src/components/halo-overlay.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,cAAc,EAAQ,MAAM,uBAAuB,CAAC;AAgCvF;;;;;;;;;;;;GAYG;AACH,qBA0Ea,aAAc,SAAQ,cAAc;IACpB,MAAM,EAAE,OAAO,CAAS;IACnD,+FAA+F;IACpC,KAAK,EAAE,MAAM,CAAsB;IAC9F,qDAAqD;IAC/C,SAAS,EAAE,IAAI,GAAG,KAAK,CAAQ;IACrC,0CAA0C;IAE1C,UAAU,EAAE,MAAM,CAA4B;IAC9C,+CAA+C;IAE/C,WAAW,EAAE,MAAM,CAA6B;IAChD,2GAA2G;IAE3G,UAAU,EAAE,MAAM,CAA4B;IAE9C,iBAAiB;IAIjB,kBAAkB;IAIlB,iBAAiB;IAejB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAO;IAEhD,OAAO,CAAC,KAAK,CAAK;IAClB,OAAO,CAAC,QAAQ,CAAC,CAAS;IAC1B,OAAO,CAAC,SAAS,CAAC,CAAS;IAC3B,OAAO,CAAC,SAAS,CAAC,CAAS;IAC3B,yFAAyF;IACzF,OAAO,CAAC,OAAO,CAAS;IAExB;;;;;;OAMG;IACH,aAAa;IAUb,iBAAiB;IAKjB,oBAAoB;IAMpB,OAAO,CAAC,cAAc;IAQtB;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,YAAY;IASpB,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,aAAa;IAYrB,OAAO,CAAC,IAAI;CAyBb"}
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -27,5 +27,5 @@ export type { ResolvedDebugLogNoteConfig } from './utils/resolve-debug-log-note'
|
|
|
27
27
|
export type { ModelTagAppearance } from '@genesislcap/foundation-ai';
|
|
28
28
|
export type { AiChatInteraction, AiChatWidget } from './types/ai-chat-widget';
|
|
29
29
|
export type { InteractionContext } from './types/interaction-context';
|
|
30
|
-
export { AiChatMarkdown } from './components/chat-markdown/chat-markdown';
|
|
30
|
+
export { AiChatMarkdown, MARKDOWN_EXPORTPARTS } from './components/chat-markdown/chat-markdown';
|
|
31
31
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/dts/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,YAAY,EACV,+BAA+B,EAC/B,0BAA0B,GAC3B,MAAM,gEAAgE,CAAC;AACxE,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AAGpC,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAC3F,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,mCAAmC,EAAE,MAAM,2BAA2B,CAAC;AAChF,YAAY,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,YAAY,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAC1E,YAAY,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAC7F,YAAY,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AACjF,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC9E,YAAY,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,YAAY,EACV,+BAA+B,EAC/B,0BAA0B,GAC3B,MAAM,gEAAgE,CAAC;AACxE,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AAGpC,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAC3F,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,mCAAmC,EAAE,MAAM,2BAA2B,CAAC;AAChF,YAAY,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,YAAY,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAC1E,YAAY,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAC7F,YAAY,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AACjF,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC9E,YAAY,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAGtE,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC"}
|
|
@@ -17,6 +17,21 @@
|
|
|
17
17
|
import type { ChatMessage } from '@genesislcap/foundation-ai';
|
|
18
18
|
import { ViewTemplate } from '@genesislcap/web-core';
|
|
19
19
|
import type { FoundationAiAssistant } from './main';
|
|
20
|
+
/**
|
|
21
|
+
* Part names for one avatar element: the bare name, a role-level name, and — on the assistant
|
|
22
|
+
* side, whose rows vary — the message type.
|
|
23
|
+
*
|
|
24
|
+
* The role-level name is the one an app usually wants. `messageType` splits the assistant across
|
|
25
|
+
* `ai`, `ai-thinking`, `ai-function` and `interaction`, so without it "style the assistant's
|
|
26
|
+
* avatar, not the user's" takes four selectors and silently misses any type added later.
|
|
27
|
+
* `::part()` names cannot be chained, so each has to be a name of its own rather than a
|
|
28
|
+
* combination. The user side needs no extra name — its role and its type are both `user`.
|
|
29
|
+
*
|
|
30
|
+
* Exported for the unit test that pins the vocabulary; not part of the element API.
|
|
31
|
+
*
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
export declare const avatarPartsFor: (base: string, type: string) => string;
|
|
20
35
|
/**
|
|
21
36
|
* The timestamp shown beside the sender name (GENC-1257).
|
|
22
37
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.template.d.ts","sourceRoot":"","sources":["../../../src/main/main.template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAEV,WAAW,EAGZ,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAuC,YAAY,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"main.template.d.ts","sourceRoot":"","sources":["../../../src/main/main.template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAEV,WAAW,EAGZ,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAuC,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAU1F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC;AAkDpD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM,EAAE,MAAM,MAAM,KAAG,MAC4B,CAAC;AAsGzF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,wBAAwB,kDAWpC,CAAC;AAoJF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,oBAAoB,GAAI,GAAG,qBAAqB,KAAG,MAYlD,CAAC;AAEf;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,mBAAmB,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,mBAAmB,GAAI,GAAG,qBAAqB,KAAG,MAAM,GAAG,IACpB,CAAC;AAyJrD,eAAO,MAAM,6BAA6B,GACxC,oBAAoB,MAAM,KACzB,YAAY,CAAC,qBAAqB,CAisBpC,CAAC"}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { GenesisElement } from '@genesislcap/web-core';
|
|
2
2
|
import type { SuggestionsState } from '../main/main.types';
|
|
3
|
+
/**
|
|
4
|
+
* Every part this component exposes, as an `exportparts` value.
|
|
5
|
+
*
|
|
6
|
+
* `::part()` crosses exactly one shadow boundary, so a host rendering `<chat-suggestions>` in its
|
|
7
|
+
* own shadow root has to forward these for an embedding app to reach them at all.
|
|
8
|
+
*/
|
|
9
|
+
export declare const SUGGESTIONS_EXPORTPARTS = "suggestions-container, suggestion-placeholder, suggestion-pill";
|
|
3
10
|
export declare class ChatSuggestions extends GenesisElement {
|
|
4
11
|
state: SuggestionsState;
|
|
5
12
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-suggestions.d.ts","sourceRoot":"","sources":["../../../src/suggestions/chat-suggestions.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,cAAc,EAMf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"chat-suggestions.d.ts","sourceRoot":"","sources":["../../../src/suggestions/chat-suggestions.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,cAAc,EAMf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAM3D;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,mEAC8B,CAAC;AAoJnE,qBAKa,eAAgB,SAAQ,cAAc;IAEjD,KAAK,EAAE,gBAAgB,CAAsB;IAE7C;;;;OAIG;IACkD,UAAU,UAAS;IAExE,YAAY,IAAI,IAAI;IAKpB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;CAGhD"}
|
|
@@ -3,6 +3,26 @@ import { attr, customElement, GenesisElement, html, observable } from '@genesisl
|
|
|
3
3
|
import { agenticActivityBus } from '../../channel/ai-activity-bus';
|
|
4
4
|
import { styles } from './chat-bubble.styles';
|
|
5
5
|
import { AiChatBubbleTemplate } from './chat-bubble.template';
|
|
6
|
+
/**
|
|
7
|
+
* Whether `el` still has an animation that will fire `animationend`.
|
|
8
|
+
*
|
|
9
|
+
* `dialog` is an exposed part, so an app's rules reach it and can leave the close waiting on an
|
|
10
|
+
* event that never arrives. Two shapes of that, both plausible customisations:
|
|
11
|
+
*
|
|
12
|
+
* - `::part(dialog) { animation: none }` to drop the bounce — no animation at all.
|
|
13
|
+
* - `::part(dialog) { animation: my-in 0.3s both }` to swap in its own entrance — that beats
|
|
14
|
+
* `.closing` in the cascade, so the exit never runs, and the entrance stays in `getAnimations()`
|
|
15
|
+
* as a finished animation held in effect by its fill mode.
|
|
16
|
+
*
|
|
17
|
+
* So presence in `getAnimations()` is not the question — whether anything is still going is.
|
|
18
|
+
* Tested for `running` rather than against `finished` so a paused animation, which will not fire
|
|
19
|
+
* either, is also treated as nothing to wait for.
|
|
20
|
+
*
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export function hasRunningAnimation(el) {
|
|
24
|
+
return el.getAnimations().some((a) => a.playState === 'running');
|
|
25
|
+
}
|
|
6
26
|
/** Default dimensions of the dialog panel */
|
|
7
27
|
const DIALOG_DEFAULT_WIDTH = 400;
|
|
8
28
|
const DIALOG_DEFAULT_HEIGHT = 520;
|
|
@@ -329,6 +349,13 @@ let AiChatBubble = class AiChatBubble extends GenesisElement {
|
|
|
329
349
|
}
|
|
330
350
|
this.closeAbort = new AbortController();
|
|
331
351
|
this.dialogEl.classList.add('closing');
|
|
352
|
+
// Nothing running means nothing will fire `animationend`, so close now rather than wait for
|
|
353
|
+
// an event that is not coming. getAnimations() flushes style, so the class added above is
|
|
354
|
+
// already accounted for.
|
|
355
|
+
if (!hasRunningAnimation(this.dialogEl)) {
|
|
356
|
+
this.dialogOpen = false;
|
|
357
|
+
return;
|
|
358
|
+
}
|
|
332
359
|
this.dialogEl.addEventListener('animationend', () => {
|
|
333
360
|
this.dialogOpen = false;
|
|
334
361
|
}, {
|
|
@@ -17,6 +17,7 @@ export const AiChatBubbleTemplate = () => {
|
|
|
17
17
|
${when((x) => !x.dialogOpen, html `
|
|
18
18
|
<div
|
|
19
19
|
class="bubble ${(x) => (x.hovered ? 'hovered' : '')}"
|
|
20
|
+
part="bubble"
|
|
20
21
|
style="${(x) => `translate: ${x.bubbleLeft}px ${x.bubbleTop}px`}"
|
|
21
22
|
${ref('bubbleEl')}
|
|
22
23
|
@mousedown="${(x, c) => x.onBubbleMouseDown(c.event)}"
|
|
@@ -27,8 +28,8 @@ export const AiChatBubbleTemplate = () => {
|
|
|
27
28
|
<img src="${(x) => x.imageSrc}" alt="AI" draggable="false" />
|
|
28
29
|
`)}
|
|
29
30
|
${when((x) => !x.imageSrc, genesisIconTemplate)}
|
|
30
|
-
<div class="pulse-ring"></div>
|
|
31
|
-
<div class="tooltip" style="${(x) => x.tooltipStyle}" ${ref('tooltipEl')}>
|
|
31
|
+
<div class="pulse-ring" part="pulse-ring"></div>
|
|
32
|
+
<div class="tooltip" part="tooltip" style="${(x) => x.tooltipStyle}" ${ref('tooltipEl')}>
|
|
32
33
|
${(x) => x.title}
|
|
33
34
|
</div>
|
|
34
35
|
</div>
|
|
@@ -41,11 +42,12 @@ export const AiChatBubbleTemplate = () => {
|
|
|
41
42
|
(x) => (x.dialogOpen ? [x] : []), html `
|
|
42
43
|
<div
|
|
43
44
|
class="dialog"
|
|
45
|
+
part="dialog"
|
|
44
46
|
style="${(x) => `translate: ${x.dialogLeft}px ${x.dialogTop}px; width: ${x.dialogWidth}px; height: ${x.dialogHeight}px`}"
|
|
45
47
|
@chat-header-mousedown="${(x, c) => x.onDialogHeaderMouseDown(c.event)}"
|
|
46
48
|
${ref('dialogEl')}
|
|
47
49
|
>
|
|
48
|
-
<div class="dialog-content">
|
|
50
|
+
<div class="dialog-content" part="dialog-content">
|
|
49
51
|
<slot name="dialog-content" ${slotted('dialogContent')}></slot>
|
|
50
52
|
</div>
|
|
51
53
|
</div>
|