@meistrari/tela-build 1.78.1 → 1.79.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
@@ -2,6 +2,10 @@
2
2
 
3
3
  Latest updates and announcements.
4
4
 
5
+ ## October 5, 2026
6
+
7
+ - [Floating chat](/templates/chat#floating) adds `position="left" | "right"` (default `right`) to place the launcher and panel in either bottom corner, with matching alignment and mirrored open/close animations.
8
+
5
9
  ## September 30, 2026
6
10
 
7
11
  - [Switch](/components/switch) thumb stretches iOS-style: pressing widens it toward the opposite side (16 → 18px on `sm`, 18 → 20px on `md`), and on release it slides over while settling back to a circle. The stretch is a `scaleX` on the thumb background, so it animates smoothly between pixels and leaves `#thumb` slot content undistorted. Respects `prefers-reduced-motion`. The `md` thumb is now 18px with a 3px inset on every side (was 20px, 2px inset).
@@ -5,6 +5,8 @@ import { floatingWindowContextKey } from './floating-window-context'
5
5
 
6
6
  const props = withDefaults(defineProps<{
7
7
  open: boolean
8
+ /** Corner used by the launcher and the window's open/close animation. */
9
+ position?: 'left' | 'right'
8
10
  /** Close on outside clicks. Disable to keep the chat open while interacting with the page. */
9
11
  closeOnOutsideClick?: boolean
10
12
  /** Anchors the launcher to the nearest positioned ancestor instead of the viewport (docs/embedded previews). */
@@ -15,6 +17,7 @@ const props = withDefaults(defineProps<{
15
17
  keepMounted?: boolean
16
18
  }>(), {
17
19
  closeOnOutsideClick: true,
20
+ position: 'right',
18
21
  })
19
22
 
20
23
  const emit = defineEmits<{
@@ -284,7 +287,13 @@ function focusEditorIn(content: HTMLElement) {
284
287
 
285
288
  <template>
286
289
  <TelaPopover :open="open" @update:open="handleOpenUpdate">
287
- <div ref="launcher" :class="cn('bottom-16px z-599', contained ? 'absolute right-16px' : 'fixed right-[calc(16px+var(--scrollbar-width,0px))]')">
290
+ <div
291
+ ref="launcher" :class="cn(
292
+ 'bottom-16px z-599',
293
+ contained ? 'absolute' : 'fixed',
294
+ position === 'left' ? 'left-16px' : contained ? 'right-16px' : 'right-[calc(16px+var(--scrollbar-width,0px))]',
295
+ )"
296
+ >
288
297
  <div :class="cn('transition-opacity', open ? 'opacity-0 duration-100' : 'duration-160 delay-160')">
289
298
  <TelaPopoverTrigger as-child>
290
299
  <slot name="launcher">
@@ -295,7 +304,7 @@ function focusEditorIn(content: HTMLElement) {
295
304
  </div>
296
305
  <TelaPopoverContent
297
306
  side="top"
298
- align="end"
307
+ :align="position === 'left' ? 'start' : 'end'"
299
308
  :side-offset="sideOffset"
300
309
  :force-mount="forceMountContent"
301
310
  :data-content-hidden="contentHidden || undefined"
@@ -316,14 +325,16 @@ function focusEditorIn(content: HTMLElement) {
316
325
  :initial="launcherBox"
317
326
  :animate="surfaceAnimate"
318
327
  :transition="surfaceTransition"
319
- class="absolute bottom-0 right-0 w-full h-full overflow-hidden bg rounded-12px border-0.5px border-black/12 [box-shadow:-24px_-24px_249px_0_rgba(0,0,0,0.08),-12px_-8px_48px_0_rgba(0,0,0,0.03)]"
328
+ :class="position === 'left' ? 'left-0' : 'right-0'"
329
+ class="absolute bottom-0 w-full h-full overflow-hidden bg rounded-12px border-0.5px border-black/12 [box-shadow:-24px_-24px_249px_0_rgba(0,0,0,0.08),-12px_-8px_48px_0_rgba(0,0,0,0.03)]"
320
330
  >
321
331
  <Motion
322
332
  :initial="contentInitial"
323
333
  :animate="contentAnimate"
324
334
  :transition="contentTransition"
325
- :style="{ originX: 1, originY: 1, height: shellHeight ? `${shellHeight}px` : '100%' }"
326
- class="absolute bottom-0 right-0 w-[min(480px,calc(100vw-32px))] flex flex-col"
335
+ :style="{ originX: position === 'left' ? 0 : 1, originY: 1, height: shellHeight ? `${shellHeight}px` : '100%' }"
336
+ :class="position === 'left' ? 'left-0' : 'right-0'"
337
+ class="absolute bottom-0 w-[min(480px,calc(100vw-32px))] flex flex-col"
327
338
  >
328
339
  <slot />
329
340
  </Motion>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/tela-build",
3
- "version": "1.78.1",
3
+ "version": "1.79.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "app.config.ts",