@meistrari/tela-build 1.106.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 CHANGED
@@ -4,6 +4,9 @@ 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).
7
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.
8
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.
9
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.
@@ -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
- <div v-if="title || description" flex="~ col" items-center gap-4px text-center>
19
- <component
20
- :is="compact ? 'h5' : 'h1'"
21
- v-if="title"
22
- text-primary
23
- :class="compact ? 'heading-h4-semibold' : 'heading-h3-semibold'"
24
- >
25
- {{ title }}
26
- </component>
27
- <p v-if="description" text-secondary body-14-regular>
28
- {{ description }}
29
- </p>
30
- </div>
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-48px pl-18px pr-10px flex-shrink-0
78
- bg border-b-0.5px border
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 minimize button that calls `close`, 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.
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, 440px 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**:
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">
@@ -1716,11 +1716,11 @@ type WidgetHeaderProps = {
1716
1716
  title?: string
1717
1717
  expandable?: boolean // show the expand toggle outside a floating window
1718
1718
  expanded?: boolean // standalone toggle state; ignored inside a floating window
1719
- 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`)
1720
1720
  newConversationLabel?: string // default: 'New conversation'
1721
1721
  historyLabel?: string // default: 'Conversation history'
1722
1722
  expandLabel?: string // default: 'Expand'
1723
- collapseLabel?: string // default: 'Collapse'
1723
+ collapseLabel?: string // default: 'Collapse'; also labels the sidepanel's collapse button
1724
1724
  closeLabel?: string // default: 'Close'
1725
1725
  }
1726
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).
@@ -1966,7 +1966,7 @@ type TextShimmerProps = {
1966
1966
 
1967
1967
  ## Slots
1968
1968
 
1969
- - `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).
1970
1970
  - `TelaChatFloatingWindow`: `launcher` (optional; defaults to `TelaChatFloatingWindowTrigger`), `default` (header + chat surface).
1971
1971
  - `TelaChatSidepanelWindow`: `default`.
1972
1972
  - `TelaChatWidgetHeader`: `history` (rendered only while the history panel is open).
@@ -11,7 +11,7 @@ function closeOnEscape() {
11
11
  shellControls.close()
12
12
  }
13
13
 
14
- const minWidth = 440
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(440px,100vw)]"
43
+ class="w-[min(346px,100vw)]"
44
44
  @keydown.esc="closeOnEscape"
45
45
  >
46
46
  <div
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/tela-build",
3
- "version": "1.106.0",
3
+ "version": "1.107.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "app.config.ts",