@meistrari/tela-build 1.97.0 → 1.98.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
@@ -17,6 +17,8 @@ Latest updates and announcements.
17
17
 
18
18
  ## October 28, 2026
19
19
 
20
+ - [Chat → Sidepanel](/templates/chat#sidepanel) `chatShellControlsKey` makes `toggleExpanded` optional: provide only `close` and the widget header shows the minimize button without the expand toggle, for hosts that always open the chat as a sidepanel.
21
+ - [Chat → Sidepanel](/templates/chat#sidepanel) `TelaChatSidepanelWindow` uses `bg-subtle` instead of `bg-muted` and drops its left border, so it blends with a `bg-subtle` app shell instead of showing a seam.
20
22
  - [Sidebar](/patterns/sidebar#minimized) `TelaSidebarLogo` no longer has a bottom margin in the `minimized` variant; `TelaSidebarHeader` spaces its first child 8px from the rest instead. A menu trigger wrapping the logo is now the logo's size, so its menu opens 4px below the logo as in the default variant.
21
23
  - [Sidebar](/patterns/sidebar#minimized) sets `data-variant` on its `<aside>` and is a named `sidebar` group, so its parts and your own content can style the minimized rail with `group-data-[variant=minimized]/sidebar:` classes. The built-in parts now size themselves this way, with no visual change.
22
24
  - [Sidebar](/patterns/sidebar) `TelaSidebarContent` fades its top and bottom edges only when items are scrolled past them, so the first and last items are no longer faded at rest.
@@ -6,9 +6,9 @@ export type ChatShell = 'floating' | 'sidepanel'
6
6
  export const chatShellContextKey: InjectionKey<ChatShell> = Symbol('tela-chat-shell')
7
7
 
8
8
  export type ChatShellControls = {
9
- toggleExpanded: () => void
9
+ toggleExpanded?: () => void
10
10
  close: () => void
11
11
  }
12
12
 
13
- /** Provide above a widget shell to let the widget header switch between the floating and sidepanel shells, and close the sidepanel. */
13
+ /** Provide above a widget shell to let the widget header close the sidepanel and, with `toggleExpanded`, switch between the floating and sidepanel shells. */
14
14
  export const chatShellControlsKey: InjectionKey<ChatShellControls> = Symbol('tela-chat-shell-controls')
@@ -34,9 +34,9 @@ const floatingWindow = inject(floatingWindowContextKey, null)
34
34
  const shell = inject(chatShellContextKey, null)
35
35
  const shellControls = shell ? inject(chatShellControlsKey, null) : null
36
36
 
37
- const showExpand = computed(() => Boolean(floatingWindow || shellControls) || props.expandable)
37
+ const showExpand = computed(() => Boolean(floatingWindow || shellControls?.toggleExpanded) || props.expandable)
38
38
  const showClose = computed(() => Boolean(floatingWindow || shellControls) || props.closable)
39
- const isExpanded = computed(() => (Boolean(shellControls) && shell === 'sidepanel') || (floatingWindow ? floatingWindow.expanded.value : props.expanded))
39
+ const isExpanded = computed(() => (Boolean(shellControls?.toggleExpanded) && shell === 'sidepanel') || (floatingWindow ? floatingWindow.expanded.value : props.expanded))
40
40
 
41
41
  const historyOpen = ref(false)
42
42
  const historySelection = ref('')
@@ -51,7 +51,7 @@ function close() {
51
51
 
52
52
  function toggleExpanded() {
53
53
  emit('toggleExpanded')
54
- if (shellControls)
54
+ if (shellControls?.toggleExpanded)
55
55
  shellControls.toggleExpanded()
56
56
  else
57
57
  floatingWindow?.toggleExpanded()
@@ -256,9 +256,9 @@ const conversations = [
256
256
 
257
257
  An always-open, docked chat column. It has no launcher and no `open` state: render it when the panel should exist.
258
258
 
259
- To let users move between the floating window and the sidepanel, provide `{ toggleExpanded, close }` under `chatShellControlsKey` (exported from `chat-shell-context`) above the shell and swap the shell when they are called. The widget header shows its expand toggle in both shells and calls `toggleExpanded` instead of growing the floating window. Inside the sidepanel it also shows a minimize button that calls `close`, and Escape pressed inside the panel calls `close` once no menu or overlay is open.
259
+ 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.
260
260
 
261
- `TelaChatSidepanelWindow` is **in-flow** (`position: sticky`, full viewport height, 440px wide by default), so the page layout reserves its width instead of being overlapped. 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**:
261
+ `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**:
262
262
 
263
263
  ```vue
264
264
  <script setup lang="ts">
@@ -39,7 +39,7 @@ function startResize(event: PointerEvent) {
39
39
  <template>
40
40
  <aside
41
41
  ref="panel"
42
- sticky top-0 flex flex-col h-100dvh overflow-hidden shrink-0 border-l-0.5px border bg-muted p-8px
42
+ sticky top-0 flex flex-col h-100dvh overflow-hidden shrink-0 bg-subtle p-8px
43
43
  class="w-[min(440px,100vw)]"
44
44
  @keydown.esc="closeOnEscape"
45
45
  >
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/tela-build",
3
- "version": "1.97.0",
3
+ "version": "1.98.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "app.config.ts",