@meistrari/tela-build 1.105.0 → 1.107.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 +4 -0
- package/components/tela/chat/chat-empty-state.vue +16 -13
- package/components/tela/chat/chat-widget-header.vue +6 -5
- package/components/tela/chat/chat.mdx +10 -8
- package/components/tela/chat/icons/grok.vue +3 -0
- package/components/tela/chat/icons/kimi.vue +3 -0
- package/components/tela/chat/sidepanel/sidepanel-window.vue +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,10 @@ Latest updates and announcements.
|
|
|
4
4
|
|
|
5
5
|
## November 18, 2026
|
|
6
6
|
|
|
7
|
+
- [Chat → Empty State](/templates/chat#empty-state) `TelaChatEmptyState` has a `#header` slot that replaces the title and description, so a host can render its own greeting, such as a logo above a custom title.
|
|
8
|
+
- [Chat → Widget Header](/templates/chat#widget-header--history) `TelaChatWidgetHeader` is 56px tall with no bottom border. In a sidepanel whose host provides only `close` under `chatShellControlsKey`, the button that calls `close` is a collapse button (arrows pointing in) instead of minimize.
|
|
9
|
+
- [Chat → Sidepanel](/templates/chat#sidepanel) `TelaChatSidepanelWindow` opens at and resizes down to 346px (was 440px).
|
|
10
|
+
- [Chat → Model Selector](/templates/chat#model-selector) New provider icons `TelaChatIconsGrok` (xAI's Grok mark) and `TelaChatIconsKimi` (Moonshot AI's Kimi mark), drawn like `TelaChatIconsGemini`: one color (`currentColor`) on a 16px, 24-unit box, so Grok and Kimi models line up with the others in the model list.
|
|
7
11
|
- Icons: `i-custom:assistantAvatar` is the Tela Assistant avatar: the Tela logomark in white on a 48% black rounded tile, drawn at 16×16. The assistant onboarding card uses it.
|
|
8
12
|
- [Animated Number](/components/animated-number) spaces its digits with the font's own tabular figures (`tabular-nums`) instead of padding each digit to the width of the widest one, which left wide gaps around narrow digits such as `1`. Digits still keep a steady width while they change, and the spacing now follows the typeface at every text size.
|
|
9
13
|
- [Chat → Model Selector](/templates/chat#model-selector) A selected reasoning level is now also cleared on mount when the selected model has no reasoning levels (empty `reasoning-options`), and when the host sets `v-model:reasoning` to a level the current `reasoning-options` don't include. Before, it was kept in both cases, so the parent could still send it. New `reasoningLoading` prop: while it is `true`, the level is kept, so hosts that load the levels asynchronously don't lose a saved level.
|
|
@@ -15,19 +15,22 @@ defineProps<{
|
|
|
15
15
|
:class="compact ? 'gap-24px px-12px pt-16px' : 'gap-40px px-24px'"
|
|
16
16
|
>
|
|
17
17
|
<div flex="~ col" gap-32px :class="compact ? 'mt-auto' : ''">
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
18
|
+
<!-- Replaces the title and description, e.g. a logo above a custom greeting. -->
|
|
19
|
+
<slot name="header">
|
|
20
|
+
<div v-if="title || description" flex="~ col" items-center gap-4px text-center>
|
|
21
|
+
<component
|
|
22
|
+
:is="compact ? 'h5' : 'h1'"
|
|
23
|
+
v-if="title"
|
|
24
|
+
text-primary
|
|
25
|
+
:class="compact ? 'heading-h4-semibold' : 'heading-h3-semibold'"
|
|
26
|
+
>
|
|
27
|
+
{{ title }}
|
|
28
|
+
</component>
|
|
29
|
+
<p v-if="description" text-secondary body-14-regular>
|
|
30
|
+
{{ description }}
|
|
31
|
+
</p>
|
|
32
|
+
</div>
|
|
33
|
+
</slot>
|
|
31
34
|
|
|
32
35
|
<!-- Suggestions, hints, or any other content under the greeting. -->
|
|
33
36
|
<slot />
|
|
@@ -8,7 +8,7 @@ const props = withDefaults(defineProps<{
|
|
|
8
8
|
expandable?: boolean
|
|
9
9
|
/** Expanded state for the standalone toggle; ignored inside a floating window. */
|
|
10
10
|
expanded?: boolean
|
|
11
|
-
/** Show the minimize button outside a floating window (inside one it is always shown). */
|
|
11
|
+
/** Show the minimize button outside a floating window (inside one it is always shown). A sidepanel whose host provides only `close` shows it as collapse. */
|
|
12
12
|
closable?: boolean
|
|
13
13
|
newConversationLabel?: string
|
|
14
14
|
historyLabel?: string
|
|
@@ -37,6 +37,7 @@ const shellControls = shell ? inject(chatShellControlsKey, null) : null
|
|
|
37
37
|
const showExpand = computed(() => Boolean(floatingWindow || shellControls?.toggleExpanded) || props.expandable)
|
|
38
38
|
const showClose = computed(() => Boolean(floatingWindow || shellControls) || props.closable)
|
|
39
39
|
const isExpanded = computed(() => (Boolean(shellControls?.toggleExpanded) && shell === 'sidepanel') || (floatingWindow ? floatingWindow.expanded.value : props.expanded))
|
|
40
|
+
const closeCollapsesSidepanel = shell === 'sidepanel' && !!shellControls && !shellControls.toggleExpanded
|
|
40
41
|
|
|
41
42
|
const historyOpen = ref(false)
|
|
42
43
|
const historySelection = ref('')
|
|
@@ -74,8 +75,8 @@ function selectConversation(id: unknown) {
|
|
|
74
75
|
<div
|
|
75
76
|
data-widget-header
|
|
76
77
|
flex items-center justify-between gap-8px
|
|
77
|
-
h-
|
|
78
|
-
bg
|
|
78
|
+
h-56px pl-18px pr-10px flex-shrink-0
|
|
79
|
+
bg
|
|
79
80
|
>
|
|
80
81
|
<h5 v-if="title" heading-h5-semibold text-primary truncate>
|
|
81
82
|
{{ title }}
|
|
@@ -128,10 +129,10 @@ function selectConversation(id: unknown) {
|
|
|
128
129
|
/>
|
|
129
130
|
<TelaIconButton
|
|
130
131
|
v-if="showClose"
|
|
131
|
-
icon="i-ph-minus"
|
|
132
|
+
:icon="closeCollapsesSidepanel ? 'i-ph-arrows-in-simple' : 'i-ph-minus'"
|
|
132
133
|
size="sm"
|
|
133
134
|
color="secondary"
|
|
134
|
-
:aria-label="closeLabel"
|
|
135
|
+
:aria-label="closeCollapsesSidepanel ? collapseLabel : closeLabel"
|
|
135
136
|
@click.stop.prevent="close"
|
|
136
137
|
/>
|
|
137
138
|
</div>
|
|
@@ -271,9 +271,9 @@ const conversations = [
|
|
|
271
271
|
|
|
272
272
|
An always-open, docked chat column. It has no launcher and no `open` state: render it when the panel should exist.
|
|
273
273
|
|
|
274
|
-
To let users close the sidepanel, provide `{ close }` under `chatShellControlsKey` (exported from `chat-shell-context`) above the shell and stop rendering it when `close` is called. The widget header then shows a
|
|
274
|
+
To let users close the sidepanel, provide `{ close }` under `chatShellControlsKey` (exported from `chat-shell-context`) above the shell and stop rendering it when `close` is called. The widget header then shows a collapse button (arrows pointing in) that calls `close` (a minimize button once `toggleExpanded` is also provided), and Escape pressed inside the panel calls `close` once no menu or overlay is open. Add `toggleExpanded` to also move between the floating window and the sidepanel: the header shows its expand toggle in both shells and calls `toggleExpanded` instead of growing the floating window.
|
|
275
275
|
|
|
276
|
-
`TelaChatSidepanelWindow` is **in-flow** (`position: sticky`, full viewport height,
|
|
276
|
+
`TelaChatSidepanelWindow` is **in-flow** (`position: sticky`, full viewport height, 346px wide by default), so the page layout reserves its width instead of being overlapped. Its surface is `bg-subtle` with no border of its own, so it reads as part of a `bg-subtle` app shell. Users can drag its left edge to widen it up to 45% of the viewport; the width resets when the panel unmounts. Place it as the **last item of a flex row**:
|
|
277
277
|
|
|
278
278
|
```vue
|
|
279
279
|
<script setup lang="ts">
|
|
@@ -379,7 +379,7 @@ The same header fill rule applies: the frame stretches every child except `[data
|
|
|
379
379
|
|
|
380
380
|
### Empty State
|
|
381
381
|
|
|
382
|
-
`TelaChatEmptyState` replaces the conversation while there are no messages: greeting on top, anything you want under it (suggestions, hints), and the prompt input in the bottom slot. In `compact` mode (widgets) the greeting and input push to opposite edges.
|
|
382
|
+
`TelaChatEmptyState` replaces the conversation while there are no messages: greeting on top, anything you want under it (suggestions, hints), and the prompt input in the bottom slot. In `compact` mode (widgets) the greeting and input push to opposite edges. Fill the `#header` slot to replace the title and description with your own greeting, such as a logo above a custom title.
|
|
383
383
|
|
|
384
384
|
```vue
|
|
385
385
|
<script setup lang="ts">
|
|
@@ -1421,7 +1421,7 @@ An avatar beside a message, and the provider icons used by the model selector.
|
|
|
1421
1421
|
|
|
1422
1422
|
```vue
|
|
1423
1423
|
<script setup lang="ts">
|
|
1424
|
-
import { TelaChatIconsAnthropic, TelaChatIconsGemini, TelaChatIconsOpenai } from '#components'
|
|
1424
|
+
import { TelaChatIconsAnthropic, TelaChatIconsGemini, TelaChatIconsGrok, TelaChatIconsKimi, TelaChatIconsOpenai } from '#components'
|
|
1425
1425
|
</script>
|
|
1426
1426
|
|
|
1427
1427
|
<template>
|
|
@@ -1435,6 +1435,8 @@ import { TelaChatIconsAnthropic, TelaChatIconsGemini, TelaChatIconsOpenai } from
|
|
|
1435
1435
|
<TelaChatIconsAnthropic class="size-20px" />
|
|
1436
1436
|
<TelaChatIconsOpenai class="size-20px" />
|
|
1437
1437
|
<TelaChatIconsGemini class="size-20px" />
|
|
1438
|
+
<TelaChatIconsGrok class="size-20px" />
|
|
1439
|
+
<TelaChatIconsKimi class="size-20px" />
|
|
1438
1440
|
</div>
|
|
1439
1441
|
</div>
|
|
1440
1442
|
</template>
|
|
@@ -1480,7 +1482,7 @@ import { TelaChatIconsAnthropic, TelaChatIconsGemini, TelaChatIconsOpenai } from
|
|
|
1480
1482
|
| `TelaChatStopRunButton` | Replaces the prompt input while a turn runs; centered pill that emits `stop`. |
|
|
1481
1483
|
| `TelaChatAnimateEnter` | Enter/exit preset (fade, slide, slight scale) for a surface that comes and goes; when it wraps the prompt input or stop button the body docks the wrapper. Pair with `AnimatePresence`. |
|
|
1482
1484
|
| `TelaChatTextShimmer` | Shimmering text, used for thinking/loading indicators. |
|
|
1483
|
-
| `TelaChatIconsAnthropic` / `TelaChatIconsOpenai` / `TelaChatIconsGemini` | Provider icons for model options. |
|
|
1485
|
+
| `TelaChatIconsAnthropic` / `TelaChatIconsOpenai` / `TelaChatIconsGemini` / `TelaChatIconsGrok` / `TelaChatIconsKimi` | Provider icons for model options. |
|
|
1484
1486
|
| `TelaChatPoweredByTela` | "Powered by" + Tela wordmark footer. |
|
|
1485
1487
|
|
|
1486
1488
|
## Anatomy
|
|
@@ -1714,11 +1716,11 @@ type WidgetHeaderProps = {
|
|
|
1714
1716
|
title?: string
|
|
1715
1717
|
expandable?: boolean // show the expand toggle outside a floating window
|
|
1716
1718
|
expanded?: boolean // standalone toggle state; ignored inside a floating window
|
|
1717
|
-
closable?: boolean // show the minimize button outside a floating window
|
|
1719
|
+
closable?: boolean // show the minimize button outside a floating window (collapse in a sidepanel whose host provides only `close`)
|
|
1718
1720
|
newConversationLabel?: string // default: 'New conversation'
|
|
1719
1721
|
historyLabel?: string // default: 'Conversation history'
|
|
1720
1722
|
expandLabel?: string // default: 'Expand'
|
|
1721
|
-
collapseLabel?: string // default: 'Collapse'
|
|
1723
|
+
collapseLabel?: string // default: 'Collapse'; also labels the sidepanel's collapse button
|
|
1722
1724
|
closeLabel?: string // default: 'Close'
|
|
1723
1725
|
}
|
|
1724
1726
|
// Inside TelaChatFloatingWindow the header also renders an expand toggle that grows the window up to 8px from the top of the viewport, and a minus button that closes the window (emits `close` and sets `open` to false).
|
|
@@ -1964,7 +1966,7 @@ type TextShimmerProps = {
|
|
|
1964
1966
|
|
|
1965
1967
|
## Slots
|
|
1966
1968
|
|
|
1967
|
-
- `TelaChatEmptyState`: `default` (content under the greeting: suggestions, hints), `input` (prompt input pinned to the bottom).
|
|
1969
|
+
- `TelaChatEmptyState`: `header` (replaces the title and description), `default` (content under the greeting: suggestions, hints), `input` (prompt input pinned to the bottom).
|
|
1968
1970
|
- `TelaChatFloatingWindow`: `launcher` (optional; defaults to `TelaChatFloatingWindowTrigger`), `default` (header + chat surface).
|
|
1969
1971
|
- `TelaChatSidepanelWindow`: `default`.
|
|
1970
1972
|
- `TelaChatWidgetHeader`: `history` (rendered only while the history panel is open).
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg width="16" height="16" fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815" /></svg>
|
|
3
|
+
</template>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg width="16" height="16" fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z" /><path d="M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z" /></svg>
|
|
3
|
+
</template>
|
|
@@ -11,7 +11,7 @@ function closeOnEscape() {
|
|
|
11
11
|
shellControls.close()
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
const minWidth =
|
|
14
|
+
const minWidth = 346
|
|
15
15
|
const maxViewportShare = 0.45
|
|
16
16
|
|
|
17
17
|
const panel = ref<HTMLElement | null>(null)
|
|
@@ -40,7 +40,7 @@ function startResize(event: PointerEvent) {
|
|
|
40
40
|
<aside
|
|
41
41
|
ref="panel"
|
|
42
42
|
sticky top-0 flex flex-col h-100dvh overflow-hidden shrink-0 bg-subtle p-8px
|
|
43
|
-
class="w-[min(
|
|
43
|
+
class="w-[min(346px,100vw)]"
|
|
44
44
|
@keydown.esc="closeOnEscape"
|
|
45
45
|
>
|
|
46
46
|
<div
|