@meistrari/tela-build 1.101.0 → 1.101.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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Latest updates and announcements.
|
|
4
4
|
|
|
5
|
+
## November 9, 2026
|
|
6
|
+
|
|
7
|
+
- [Chat](/templates/chat) `TelaChatFloatingWindow` with `position="left"` offsets its launcher by `--tela-floating-window-inset-left` (default `0px`), so an app with a fixed left sidebar can keep the launcher 16px to the right of it instead of on top of it.
|
|
8
|
+
|
|
5
9
|
## November 6, 2026
|
|
6
10
|
|
|
7
11
|
- [Skeleton Reveal](/components/skeleton-reveal) is a new component that puts a page or section behind a skeleton measured from its own content, built on [skullet](https://skullet.lochie.me). The first load shows the `#placeholder` slot, later loads draw the layout remembered under `id`, and loads under 150ms show no skeleton. It uses the same `bg-muted` surface and pulse as [Skeleton](/components/skeleton). `forgetSkeletonShapes()` clears the remembered layouts.
|
|
@@ -1710,6 +1710,7 @@ type FloatingWindowTriggerProps = {
|
|
|
1710
1710
|
type FloatingWindowProps = {
|
|
1711
1711
|
closeOnOutsideClick?: boolean // defaults to true; false keeps the window open on outside clicks
|
|
1712
1712
|
open: boolean
|
|
1713
|
+
position?: 'left' | 'right' // defaults to 'right'; a left launcher is offset by --tela-floating-window-inset-left (e.g. a fixed app sidebar's width)
|
|
1713
1714
|
contained?: boolean // anchor the launcher to the nearest positioned ancestor instead of the viewport
|
|
1714
1715
|
triggerLabel?: string // label of the default trigger; ignored when #launcher is provided
|
|
1715
1716
|
keepMounted?: boolean // defaults to false; keeps the content mounted (hidden) after the first open
|
|
@@ -29,7 +29,7 @@ const ChatBody = defineComponent({
|
|
|
29
29
|
},
|
|
30
30
|
})
|
|
31
31
|
|
|
32
|
-
function mountWindow(props: { open: boolean, keepMounted?: boolean }) {
|
|
32
|
+
function mountWindow(props: { open: boolean, keepMounted?: boolean, position?: 'left' | 'right' }) {
|
|
33
33
|
const wrapper = mount(FloatingWindow, {
|
|
34
34
|
props,
|
|
35
35
|
slots: { default: () => h(ChatBody) },
|
|
@@ -70,6 +70,26 @@ describe('floating chat window', () => {
|
|
|
70
70
|
document.body.innerHTML = ''
|
|
71
71
|
})
|
|
72
72
|
|
|
73
|
+
it('offsets a left launcher by the host inset so it clears a fixed sidebar', () => {
|
|
74
|
+
// Arrange & Act
|
|
75
|
+
const wrapper = mountWindow({ open: false, position: 'left' })
|
|
76
|
+
const launcher = wrapper.get('[data-tela-floating-window]')
|
|
77
|
+
|
|
78
|
+
// Assert
|
|
79
|
+
expect(launcher.classes()).toContain('left-[calc(16px+var(--tela-floating-window-inset-left,0px))]')
|
|
80
|
+
expect(launcher.classes()).not.toContain('left-16px')
|
|
81
|
+
})
|
|
82
|
+
|
|
83
|
+
it('keeps a right launcher anchored to the viewport edge and scrollbar', () => {
|
|
84
|
+
// Arrange & Act
|
|
85
|
+
const wrapper = mountWindow({ open: false })
|
|
86
|
+
const launcher = wrapper.get('[data-tela-floating-window]')
|
|
87
|
+
|
|
88
|
+
// Assert
|
|
89
|
+
expect(launcher.classes()).toContain('right-[calc(16px+var(--scrollbar-width,0px))]')
|
|
90
|
+
expect(launcher.classes().some(name => name.includes('tela-floating-window-inset-left'))).toBe(false)
|
|
91
|
+
})
|
|
92
|
+
|
|
73
93
|
it('does not mount the content before the first open', () => {
|
|
74
94
|
// Arrange & Act
|
|
75
95
|
mountWindow({ open: false, keepMounted: true })
|
|
@@ -302,7 +302,7 @@ function focusEditorIn(content: HTMLElement) {
|
|
|
302
302
|
:class="cn(
|
|
303
303
|
'bottom-16px z-599',
|
|
304
304
|
contained ? 'absolute' : 'fixed',
|
|
305
|
-
position === 'left' ? 'left-16px' : contained ? 'right-16px' : 'right-[calc(16px+var(--scrollbar-width,0px))]',
|
|
305
|
+
position === 'left' ? 'left-[calc(16px+var(--tela-floating-window-inset-left,0px))]' : contained ? 'right-16px' : 'right-[calc(16px+var(--scrollbar-width,0px))]',
|
|
306
306
|
)"
|
|
307
307
|
>
|
|
308
308
|
<div :class="cn('transition-opacity', open ? 'opacity-0 duration-100' : 'duration-160 delay-160')">
|