@bagelink/vue 1.21.75 → 1.22.3

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.
Files changed (45) hide show
  1. package/dist/{StructuredEditor-Cy7GZCZM.js → StructuredEditor-BlPNKNaT.js} +85 -85
  2. package/dist/{StructuredEditor-CMhUsxas.cjs → StructuredEditor-Bmq1Pxvl.cjs} +1 -1
  3. package/dist/components/FilterQuery.vue.d.ts +5 -0
  4. package/dist/components/FilterQuery.vue.d.ts.map +1 -1
  5. package/dist/components/FilterQueryBuilder.vue.d.ts +47 -0
  6. package/dist/components/FilterQueryBuilder.vue.d.ts.map +1 -0
  7. package/dist/components/dataTable/DataTable.vue.d.ts.map +1 -1
  8. package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
  9. package/dist/components/layout/AppLayout.vue.d.ts.map +1 -1
  10. package/dist/components/layout/AppSidebar.vue.d.ts.map +1 -1
  11. package/dist/components/layout/Panel.vue.d.ts.map +1 -1
  12. package/dist/composables/index.d.ts +1 -0
  13. package/dist/composables/index.d.ts.map +1 -1
  14. package/dist/composables/useBoundedRectDrag.d.ts +13 -0
  15. package/dist/composables/useBoundedRectDrag.d.ts.map +1 -1
  16. package/dist/composables/useKeyboardInset.d.ts +5 -0
  17. package/dist/composables/useKeyboardInset.d.ts.map +1 -0
  18. package/dist/core.css +1 -1
  19. package/dist/dialog/Dialog.vue.d.ts.map +1 -1
  20. package/dist/i18n/index.d.ts +2 -0
  21. package/dist/i18n/index.d.ts.map +1 -1
  22. package/dist/index.cjs +1 -1
  23. package/dist/index.mjs +303 -302
  24. package/dist/src-COgNvUzW.cjs +764 -0
  25. package/dist/{src-CQ2GZqPM.js → src-EXMOTxie.js} +14361 -14090
  26. package/dist/src.css +1 -1
  27. package/dist/style.css +1 -1
  28. package/package.json +2 -2
  29. package/src/components/FilterQuery.vue +139 -750
  30. package/src/components/FilterQueryBuilder.vue +797 -0
  31. package/src/components/dataTable/DataTable.vue +8 -0
  32. package/src/components/form/inputs/SelectInput.vue +3 -2
  33. package/src/components/layout/AppLayout.vue +44 -3
  34. package/src/components/layout/AppSidebar.vue +319 -28
  35. package/src/components/layout/Panel.vue +12 -0
  36. package/src/composables/index.ts +1 -0
  37. package/src/composables/useBoundedRectDrag.ts +16 -1
  38. package/src/composables/useKeyboardInset.ts +89 -0
  39. package/src/composables/usePointerSession.ts +2 -2
  40. package/src/dialog/Dialog.vue +28 -2
  41. package/src/i18n/locales/en.json +2 -1
  42. package/src/i18n/locales/he.json +2 -1
  43. package/src/styles/app-layout.css +4 -0
  44. package/src/styles/toast-overrides.css +8 -2
  45. package/dist/src-DVl3_LZS.cjs +0 -764
@@ -560,12 +560,20 @@ background: var(--bgl-gray-light);
560
560
  }
561
561
 
562
562
  @media (max-width: 910px) {
563
+ .table-list-wrap {
564
+ -webkit-overflow-scrolling: touch;
565
+ overscroll-behavior: contain;
566
+ }
563
567
  .col {
564
568
  max-width: 60vw !important;
565
569
  }
566
570
  .max-col-width {
567
571
  max-width: 60vw !important;
568
572
  }
573
+ td,
574
+ th {
575
+ padding: 0.9rem 0.75rem;
576
+ }
569
577
  }
570
578
 
571
579
  </style>
@@ -318,7 +318,8 @@ onMounted(() => {
318
318
  @keydown.down.prevent="navigate('down')" @keydown.up.prevent="navigate('up')"
319
319
  >
320
320
  <Icon v-if="icon" :icon="icon" class="selectinput-btn__icon" aria-hidden="true" />
321
- <p v-if="!hideLabel" class="selectinput-btn__label" :class="{ 'ms-05': icon }">
321
+ <!-- hideLabel only hides the outer field label above; the trigger always shows the value. -->
322
+ <p class="selectinput-btn__label" :class="{ 'ms-05': icon }">
322
323
  {{ selectedItemCount > 0 ? selectedLabel : (underlined ? '' : (resolveI18n(placeholder)
323
324
  || 'Select...')) }}
324
325
  </p>
@@ -327,7 +328,7 @@ onMounted(() => {
327
328
  <span v-if="clearable && selectedItemCount > 0" class="selectinput-btn__clear ps-05">
328
329
  <Btn flat thin icon="clear" class="color-gray" @click="selectedItems = []; emitUpdate()" />
329
330
  </span>
330
- <Icon v-if="!disabled" thin transition="scale" class="selectinput-btn__icon" aria-hidden="true" :icon="open ? (underlined ? 'expand_less' : 'unfold_less') : (underlined ? 'expand_more' : 'unfold_more')" />
331
+ <Icon thin transition="scale" class="selectinput-btn__icon" aria-hidden="true" :icon="open ? (underlined ? 'expand_less' : 'unfold_less') : (underlined ? 'expand_more' : 'unfold_more')" />
331
332
  </span>
332
333
  </button>
333
334
  <input
@@ -29,6 +29,7 @@
29
29
  import { ref, provide, onMounted, onUnmounted, computed, watch, useSlots, Comment, Text } from 'vue'
30
30
  import type { Slots } from 'vue'
31
31
  import { useEscapeKey } from '../../composables/useEscapeKey'
32
+ import { useKeyboardInset } from '../../composables/useKeyboardInset'
32
33
  import { usePointerSession } from '../../composables/usePointerSession'
33
34
  import { MOBILE_BREAKPOINT } from '../../utils/constants'
34
35
  import {
@@ -142,8 +143,25 @@ watch(isOpen, (v) => {
142
143
  })
143
144
 
144
145
  function checkMobile() {
145
- isMobile.value = window.innerWidth <= MOBILE_BREAKPOINT
146
- if (isMobile.value) { isOpen.value = false }
146
+ const nextMobile = window.innerWidth <= MOBILE_BREAKPOINT
147
+ const wasMobile = isMobile.value
148
+ isMobile.value = nextMobile
149
+
150
+ if (nextMobile) {
151
+ // Entering mobile (e.g. Duo portrait): close the overlay drawer.
152
+ // Do NOT persist — desktop open/collapsed preference stays in localStorage.
153
+ isOpen.value = false
154
+ return
155
+ }
156
+
157
+ if (wasMobile) {
158
+ // Leaving mobile → desktop (e.g. Duo landscape): restore the stored
159
+ // desktop preference so an open mobile drawer doesn't leave the push
160
+ // sidebar stuck open.
161
+ if (props.open === undefined) {
162
+ isOpen.value = readStored() ?? props.defaultOpen
163
+ }
164
+ }
147
165
  }
148
166
 
149
167
  // Suppress push transitions during a resize, re-enabling them shortly after it
@@ -171,6 +189,8 @@ const toggleBottom = () => { regions.value.bottom.open = !regions.value.bottom.o
171
189
  const toggleMenu = toggleStart
172
190
 
173
191
  useEscapeKey(() => { isOpen.value = false }, () => isMobile.value && isOpen.value)
192
+ // Publishes `--bgl-keyboard-inset` for sticky footers / chat composers on iOS.
193
+ useKeyboardInset()
174
194
 
175
195
  function closeOnMobile() {
176
196
  if (isMobile.value) { isOpen.value = false }
@@ -349,9 +369,13 @@ provide(AppLayoutKey, {
349
369
  onMounted(() => {
350
370
  checkMobile()
351
371
  window.addEventListener('resize', onResize)
372
+ // iPhone Duo fold/unfold + iOS keyboard often update visualViewport without a
373
+ // matching window resize; keep the mobile/desktop shell in sync.
374
+ window.visualViewport?.addEventListener('resize', onResize)
352
375
  })
353
376
  onUnmounted(() => {
354
377
  window.removeEventListener('resize', onResize)
378
+ window.visualViewport?.removeEventListener('resize', onResize)
355
379
  clearTimeout(resizeAnimTimer)
356
380
  })
357
381
 
@@ -430,13 +454,28 @@ const slotBind = computed(() => ({ isOpen, isMobile, toggleMenu, closeOnMobile }
430
454
 
431
455
  <style scoped>
432
456
 
433
- /* Root is a column: [top band] · [start|center|end row] · [bottom band]. */
457
+ /* Root is a column: [top band] · [start|center|end row] · [bottom band].
458
+ Safe-area uses physical left/right (not a single inline shorthand) — iPhone Duo
459
+ insets are often asymmetric across the fold. `svh` keeps the shell stable while
460
+ the Safari chrome shows/hides; standalone PWAs prefer `vh` (WebKit subtracts
461
+ the top inset from svh/dvh incorrectly there). */
434
462
  .app-layout {
435
463
  display: flex;
436
464
  flex-direction: column;
437
465
  height: 100vh;
438
466
  height: 100svh;
439
467
  overflow: hidden;
468
+ overscroll-behavior: none;
469
+ padding-top: env(safe-area-inset-top, 0px);
470
+ padding-bottom: env(safe-area-inset-bottom, 0px);
471
+ padding-left: env(safe-area-inset-left, 0px);
472
+ padding-right: env(safe-area-inset-right, 0px);
473
+ box-sizing: border-box;
474
+ }
475
+ @media all and (display-mode: standalone) {
476
+ .app-layout {
477
+ height: 100vh;
478
+ }
440
479
  }
441
480
 
442
481
  /* Full-width nav bands — span the entire viewport width, above/below the rails. */
@@ -535,6 +574,8 @@ overflow: hidden;
535
574
  mobile spacing (`m_p-*`). The var stays the single gutter knob. */
536
575
  .page-content {
537
576
  overflow: auto;
577
+ overscroll-behavior: contain;
578
+ -webkit-overflow-scrolling: touch;
538
579
  padding-inline: var(--bgl-content-padding, 1rem);
539
580
  }
540
581
  @media screen and (max-width: 910px) {
@@ -1,7 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  import type { NavLink } from '../../index'
3
3
  import { Btn, Dropdown, Icon } from '../../index'
4
- import { computed, ref, watch } from 'vue'
4
+ import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'
5
5
  import { useRoute } from 'vue-router'
6
6
  import { resolveI18n } from '../../i18n'
7
7
  import { useAppLayout, SIDEBAR_COLLAPSED_WIDTH, SIDEBAR_COLLAPSED_WIDTH_CARD } from './appLayoutContext'
@@ -157,6 +157,143 @@ const leafPlacement = computed(() => {
157
157
  || document.body?.classList.contains('rtl'))
158
158
  return rtl ? 'left-start' : 'right-start'
159
159
  })
160
+
161
+ /** Floating overlay scrollbar — native bar is hidden so it never steals layout width. */
162
+ const navEl = ref<HTMLElement | null>(null)
163
+ const canScroll = ref(false)
164
+ const atTop = ref(true)
165
+ const atBottom = ref(true)
166
+ const isScrolling = ref(false)
167
+ const isDragging = ref(false)
168
+ const thumbTop = ref(0)
169
+ const thumbHeight = ref(0)
170
+
171
+ const THUMB_MIN = 24
172
+ let scrollFadeTimer: ReturnType<typeof setTimeout> | undefined
173
+ let resizeObserver: ResizeObserver | undefined
174
+ let mutationObserver: MutationObserver | undefined
175
+
176
+ const thumbStyle = computed(() => ({
177
+ height: `${thumbHeight.value}px`,
178
+ transform: `translateY(${thumbTop.value}px)`,
179
+ }))
180
+
181
+ function updateFloatingScrollbar() {
182
+ const el = navEl.value
183
+ if (!el) return
184
+
185
+ const { scrollTop, scrollHeight, clientHeight } = el
186
+ const overflow = scrollHeight - clientHeight
187
+ canScroll.value = overflow > 1
188
+ atTop.value = scrollTop <= 1
189
+ atBottom.value = !canScroll.value || scrollTop >= overflow - 1
190
+
191
+ if (!canScroll.value) {
192
+ thumbHeight.value = 0
193
+ thumbTop.value = 0
194
+ return
195
+ }
196
+
197
+ const nextHeight = Math.max((clientHeight / scrollHeight) * clientHeight, THUMB_MIN)
198
+ const maxTop = Math.max(clientHeight - nextHeight, 0)
199
+ thumbHeight.value = nextHeight
200
+ thumbTop.value = overflow > 0 ? (scrollTop / overflow) * maxTop : 0
201
+ }
202
+
203
+ function onNavScroll() {
204
+ updateFloatingScrollbar()
205
+ isScrolling.value = true
206
+ clearTimeout(scrollFadeTimer)
207
+ scrollFadeTimer = setTimeout(() => {
208
+ if (!isDragging.value) isScrolling.value = false
209
+ }, 900)
210
+ }
211
+
212
+ function onThumbPointerDown(event: PointerEvent) {
213
+ const el = navEl.value
214
+ if (!el || !canScroll.value) return
215
+
216
+ event.preventDefault()
217
+ event.stopPropagation()
218
+
219
+ const thumb = event.currentTarget as HTMLElement
220
+ thumb.setPointerCapture(event.pointerId)
221
+
222
+ const startY = event.clientY
223
+ const startScroll = el.scrollTop
224
+ const maxScroll = el.scrollHeight - el.clientHeight
225
+ const maxTop = Math.max(el.clientHeight - thumbHeight.value, 0)
226
+
227
+ isDragging.value = true
228
+ isScrolling.value = true
229
+
230
+ const onMove = (ev: PointerEvent) => {
231
+ if (maxTop <= 0 || maxScroll <= 0) return
232
+ const delta = ev.clientY - startY
233
+ el.scrollTop = startScroll + (delta / maxTop) * maxScroll
234
+ }
235
+
236
+ const onUp = (ev: PointerEvent) => {
237
+ thumb.releasePointerCapture(ev.pointerId)
238
+ thumb.removeEventListener('pointermove', onMove)
239
+ thumb.removeEventListener('pointerup', onUp)
240
+ thumb.removeEventListener('pointercancel', onUp)
241
+ isDragging.value = false
242
+ clearTimeout(scrollFadeTimer)
243
+ scrollFadeTimer = setTimeout(() => {
244
+ isScrolling.value = false
245
+ }, 900)
246
+ }
247
+
248
+ thumb.addEventListener('pointermove', onMove)
249
+ thumb.addEventListener('pointerup', onUp)
250
+ thumb.addEventListener('pointercancel', onUp)
251
+ }
252
+
253
+ function onTrackPointerDown(event: PointerEvent) {
254
+ const el = navEl.value
255
+ if (!el || !canScroll.value) return
256
+ if ((event.target as HTMLElement).closest('.sidebar-nav-scrollbar-thumb')) return
257
+
258
+ const track = event.currentTarget as HTMLElement
259
+ const rect = track.getBoundingClientRect()
260
+ const clickY = event.clientY - rect.top
261
+ const maxScroll = el.scrollHeight - el.clientHeight
262
+ const maxTop = Math.max(el.clientHeight - thumbHeight.value, 0)
263
+ const nextTop = Math.min(Math.max(clickY - thumbHeight.value / 2, 0), maxTop)
264
+
265
+ el.scrollTop = maxTop > 0 ? (nextTop / maxTop) * maxScroll : 0
266
+ }
267
+
268
+ onMounted(() => {
269
+ const el = navEl.value
270
+ if (!el || typeof ResizeObserver === 'undefined') {
271
+ updateFloatingScrollbar()
272
+ return
273
+ }
274
+
275
+ resizeObserver = new ResizeObserver(() => updateFloatingScrollbar())
276
+ resizeObserver.observe(el)
277
+
278
+ mutationObserver = new MutationObserver(() => updateFloatingScrollbar())
279
+ mutationObserver.observe(el, { childList: true, subtree: true, characterData: true })
280
+
281
+ updateFloatingScrollbar()
282
+ })
283
+
284
+ onBeforeUnmount(() => {
285
+ clearTimeout(scrollFadeTimer)
286
+ resizeObserver?.disconnect()
287
+ mutationObserver?.disconnect()
288
+ })
289
+
290
+ watch(
291
+ () => [props.navLinks, isOpen.value, isVisuallyOpen.value, isMobile.value] as const,
292
+ async () => {
293
+ await nextTick()
294
+ updateFloatingScrollbar()
295
+ },
296
+ )
160
297
  </script>
161
298
 
162
299
  <template>
@@ -207,36 +344,61 @@ const leafPlacement = computed(() => {
207
344
  </router-link>
208
345
  </div>
209
346
 
210
- <nav
211
- class="sidebar-nav flex column flex-stretch gap-025 overflow-y scrollbar-gutter-both"
347
+ <div
348
+ class="sidebar-nav-wrap"
212
349
  :class="{
213
- 'flex-grow justify-content-center': props.centerlinks,
214
- 'align-items-center': !isMobile && !isOpen,
350
+ 'is-scrolling': isScrolling,
351
+ 'is-dragging': isDragging,
352
+ 'can-scroll': canScroll,
353
+ 'at-top': atTop,
354
+ 'at-bottom': atBottom,
215
355
  }"
216
356
  >
217
- <!-- Hosts that group their own nav replace the loop entirely.
218
- The default keeps every existing caller rendering navLinks. -->
219
- <slot
220
- name="nav"
221
- :is-open="isOpen"
222
- :is-visually-open="isVisuallyOpen"
223
- :is-mobile="isMobile"
224
- :bg-color="props.bgColor"
225
- :text-color="props.textColor"
226
- :active-color="props.activeColor"
357
+ <nav
358
+ ref="navEl"
359
+ class="sidebar-nav flex column flex-stretch gap-025 overflow-y"
360
+ :class="{
361
+ 'justify-content-center': props.centerlinks,
362
+ 'align-items-center': !isMobile && !isOpen,
363
+ }"
364
+ @scroll.passive="onNavScroll"
227
365
  >
228
- <SidebarNavItem
229
- v-for="link in props.navLinks" :key="link.to || link.label"
230
- :link="link"
231
- :open="isVisuallyOpen"
232
- :real-open="isOpen"
366
+ <!-- Hosts that group their own nav replace the loop entirely.
367
+ The default keeps every existing caller rendering navLinks. -->
368
+ <slot
369
+ name="nav"
370
+ :is-open="isOpen"
371
+ :is-visually-open="isVisuallyOpen"
233
372
  :is-mobile="isMobile"
234
373
  :bg-color="props.bgColor"
235
374
  :text-color="props.textColor"
236
375
  :active-color="props.activeColor"
376
+ >
377
+ <SidebarNavItem
378
+ v-for="link in props.navLinks" :key="link.to || link.label"
379
+ :link="link"
380
+ :open="isVisuallyOpen"
381
+ :real-open="isOpen"
382
+ :is-mobile="isMobile"
383
+ :bg-color="props.bgColor"
384
+ :text-color="props.textColor"
385
+ :active-color="props.activeColor"
386
+ />
387
+ </slot>
388
+ </nav>
389
+ <div
390
+ v-show="canScroll"
391
+ class="sidebar-nav-scrollbar"
392
+ aria-hidden="true"
393
+ @pointerdown="onTrackPointerDown"
394
+ >
395
+ <div
396
+ class="sidebar-nav-scrollbar-thumb"
397
+ :style="thumbStyle"
398
+ @pointerdown="onThumbPointerDown"
237
399
  />
238
- </slot>
239
- </nav>
400
+ </div>
401
+ </div>
240
402
  <div class="sidebar-footer flex column flex-stretch gap-025 px-05 mx-auto mt-auto m_border-top m_pt-05">
241
403
  <Dropdown
242
404
  v-for="link in props.footerLinks" :key="link.to || link.label"
@@ -279,7 +441,9 @@ const leafPlacement = computed(() => {
279
441
  outline: 1px solid var(--bgl-border-color);
280
442
  }
281
443
  .app-sidebar{
282
- --bgl-scrollbar-size: .5rem;
444
+ /* Reserved padding so content stays centered; visual thumb is thinner. */
445
+ --bgl-scrollbar-size: 0.375rem;
446
+ --sidebar-scroll-thumb-width: 3px;
283
447
  }
284
448
 
285
449
 
@@ -389,6 +553,15 @@ transition:
389
553
  filter 0.2s ease;
390
554
  }
391
555
 
556
+ .sidebar-nav-wrap {
557
+ position: relative;
558
+ flex: 1 1 auto;
559
+ min-height: 0;
560
+ width: 100%;
561
+ display: flex;
562
+ flex-direction: column;
563
+ }
564
+
392
565
  .sidebar-nav,
393
566
  .sidebar-footer {
394
567
  width: 100%;
@@ -396,8 +569,122 @@ margin-inline: auto;
396
569
  padding-block: 0.25rem;
397
570
  }
398
571
 
399
- .app-sidebar ::-webkit-scrollbar-track {
400
- margin: 0 !important;
572
+ .sidebar-nav {
573
+ flex: 1 1 auto;
574
+ min-height: 0;
575
+ padding-inline: var(--bgl-scrollbar-size);
576
+ /* Native bar must not consume layout width (Safari/classic scrollbars). */
577
+ scrollbar-width: none;
578
+ -ms-overflow-style: none;
579
+ /* Soft edge fades — toggled via wrap scroll-edge classes. */
580
+ --sidebar-nav-fade: 1rem;
581
+ -webkit-mask-image: linear-gradient(#000, #000);
582
+ mask-image: linear-gradient(#000, #000);
583
+ -webkit-mask-size: 100% 100%;
584
+ mask-size: 100% 100%;
585
+ -webkit-mask-repeat: no-repeat;
586
+ mask-repeat: no-repeat;
587
+ }
588
+
589
+ .sidebar-nav::-webkit-scrollbar {
590
+ width: 0;
591
+ height: 0;
592
+ display: none;
593
+ }
594
+
595
+ /* Fade only edges that still have more content beyond them. */
596
+ .sidebar-nav-wrap.can-scroll.at-top:not(.at-bottom) .sidebar-nav {
597
+ -webkit-mask-image: linear-gradient(
598
+ to bottom,
599
+ #000 0,
600
+ #000 calc(100% - var(--sidebar-nav-fade)),
601
+ transparent
602
+ );
603
+ mask-image: linear-gradient(
604
+ to bottom,
605
+ #000 0,
606
+ #000 calc(100% - var(--sidebar-nav-fade)),
607
+ transparent
608
+ );
609
+ }
610
+
611
+ .sidebar-nav-wrap.can-scroll:not(.at-top).at-bottom .sidebar-nav {
612
+ -webkit-mask-image: linear-gradient(
613
+ to bottom,
614
+ transparent,
615
+ #000 var(--sidebar-nav-fade),
616
+ #000 100%
617
+ );
618
+ mask-image: linear-gradient(
619
+ to bottom,
620
+ transparent,
621
+ #000 var(--sidebar-nav-fade),
622
+ #000 100%
623
+ );
624
+ }
625
+
626
+ .sidebar-nav-wrap.can-scroll:not(.at-top):not(.at-bottom) .sidebar-nav {
627
+ -webkit-mask-image: linear-gradient(
628
+ to bottom,
629
+ transparent,
630
+ #000 var(--sidebar-nav-fade),
631
+ #000 calc(100% - var(--sidebar-nav-fade)),
632
+ transparent
633
+ );
634
+ mask-image: linear-gradient(
635
+ to bottom,
636
+ transparent,
637
+ #000 var(--sidebar-nav-fade),
638
+ #000 calc(100% - var(--sidebar-nav-fade)),
639
+ transparent
640
+ );
641
+ }
642
+
643
+ .sidebar-nav-scrollbar {
644
+ position: absolute;
645
+ inset-block: 0.25rem;
646
+ inset-inline-end: 0;
647
+ /* Wider hit area than the visible thumb for easier dragging. */
648
+ width: var(--bgl-scrollbar-size);
649
+ z-index: 2;
650
+ pointer-events: auto;
651
+ }
652
+
653
+ .sidebar-nav-scrollbar-thumb {
654
+ position: absolute;
655
+ inset-inline: 0;
656
+ width: var(--sidebar-scroll-thumb-width);
657
+ margin-inline: auto;
658
+ border-radius: 999px;
659
+ background-color: var(--bgl-scrollbar-thumb);
660
+ opacity: 0;
661
+ /* Smooth size/position when nav content expands/collapses. */
662
+ transition:
663
+ opacity 0.2s ease,
664
+ height 0.3s ease,
665
+ transform 0.3s ease;
666
+ cursor: grab;
667
+ touch-action: none;
668
+ will-change: transform, height;
669
+ }
670
+
671
+ .sidebar-nav-scrollbar-thumb:active {
672
+ cursor: grabbing;
673
+ }
674
+
675
+ /* While scrolling/dragging, keep thumb position snappy (no transform lag). */
676
+ .sidebar-nav-wrap.is-scrolling .sidebar-nav-scrollbar-thumb,
677
+ .sidebar-nav-wrap.is-dragging .sidebar-nav-scrollbar-thumb {
678
+ transition:
679
+ opacity 0.2s ease,
680
+ height 0.3s ease;
681
+ }
682
+
683
+ .sidebar-nav-wrap:hover .sidebar-nav-scrollbar-thumb,
684
+ .sidebar-nav-wrap.is-scrolling .sidebar-nav-scrollbar-thumb,
685
+ .sidebar-nav-wrap.is-dragging .sidebar-nav-scrollbar-thumb,
686
+ .sidebar-nav-wrap:focus-within .sidebar-nav-scrollbar-thumb {
687
+ opacity: 0.85;
401
688
  }
402
689
 
403
690
  @media (min-width: 911px) {
@@ -412,6 +699,13 @@ margin: 0 !important;
412
699
  .app-sidebar {
413
700
  transform: translateX(-100%);
414
701
  transition: transform 0.4s ease;
702
+ /* Fixed drawer escapes AppLayout padding — inset itself. Physical L/R
703
+ (not a single inline shorthand): iPhone Duo safe-areas are asymmetric. */
704
+ padding-top: env(safe-area-inset-top, 0px);
705
+ padding-bottom: env(safe-area-inset-bottom, 0px);
706
+ padding-left: env(safe-area-inset-left, 0px);
707
+ padding-right: env(safe-area-inset-right, 0px);
708
+ box-sizing: border-box;
415
709
  }
416
710
 
417
711
  .sidebar-mobile-open {
@@ -426,9 +720,6 @@ margin: 0 !important;
426
720
  .rtl .sidebar-mobile-closed {
427
721
  transform: translateX(100%);
428
722
  }
429
- .sidebar-nav{
430
- mask: linear-gradient(to top, transparent, var(--bgl-box-bg) 5px);
431
- }
432
723
  }
433
724
 
434
725
  </style>
@@ -74,6 +74,18 @@ watch(() => props.size, (val) => {
74
74
  if (clamped !== panelState.value.size.value) panelState.value.size.value = clamped
75
75
  })
76
76
 
77
+ // Keep drag clamps in sync when the consumer changes min/max (e.g. fit-to-container).
78
+ watch(
79
+ () => [props.min, props.max] as const,
80
+ ([min, max]) => {
81
+ if (!panelState.value) return
82
+ panelState.value.config.min = min
83
+ panelState.value.config.max = max
84
+ const clamped = Math.max(min, Math.min(max, panelState.value.size.value))
85
+ if (clamped !== panelState.value.size.value) panelState.value.size.value = clamped
86
+ },
87
+ )
88
+
77
89
  // Internal → prop (drag end syncs back up via v-model:size)
78
90
  // Skip the initial mount transition (undefined → number) to avoid spurious emits
79
91
  watch(
@@ -9,6 +9,7 @@ export { useBoundedRectDrag } from './useBoundedRectDrag'
9
9
  export type { BoundedRectDragOptions, DragRect } from './useBoundedRectDrag'
10
10
  export { useDevice } from './useDevice'
11
11
  export { useEscapeKey } from './useEscapeKey'
12
+ export { useKeyboardInset } from './useKeyboardInset'
12
13
  export { useExcel } from './useExcel'
13
14
  export type { GradientDir, GradientDirProp, GradientProp } from './useGradientVariant'
14
15
  export { useGradientVariant } from './useGradientVariant'
@@ -14,6 +14,19 @@ export interface BoundedRectDragOptions {
14
14
  threshold?: number
15
15
  /** Client pixels per rectangle unit (defaults to screen-space geometry). */
16
16
  scale?: number
17
+ /**
18
+ * Element (or document) that holds pointer capture. Prefer a stable ancestor
19
+ * of the drag handle — capturing on a tiny handle fails when the pointer
20
+ * races over an iframe before capture sticks.
21
+ */
22
+ target?: Element | Document | null
23
+ cursor?: string
24
+ /**
25
+ * When the pointer session is interrupted, restore the pre-drag rect.
26
+ * Default true. Set false for free-floating UI where keeping the last
27
+ * previewed position feels better than snapping back.
28
+ */
29
+ rollbackOnCancel?: boolean
17
30
  onUpdate: (rect: DragRect) => void
18
31
  onCommit?: (moved: boolean) => void
19
32
  onCancel?: () => void
@@ -49,13 +62,15 @@ export function useBoundedRectDrag() {
49
62
  }
50
63
  const started = session.start(event, {
51
64
  threshold: options.threshold,
65
+ target: options.target,
66
+ cursor: options.cursor,
52
67
  onMove: (_next, { dx, dy }) => applyMove(dx, dy),
53
68
  onEnd: (_next, { dx, dy }) => {
54
69
  try { applyMove(dx, dy); options.onCommit?.(moved) } finally { active.value = false }
55
70
  },
56
71
  onCancel: () => {
57
72
  active.value = false
58
- if (previewed) options.onUpdate({ ...initial })
73
+ if (previewed && options.rollbackOnCancel !== false) options.onUpdate({ ...initial })
59
74
  options.onCancel?.()
60
75
  },
61
76
  })