@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.
- package/dist/{StructuredEditor-Cy7GZCZM.js → StructuredEditor-BlPNKNaT.js} +85 -85
- package/dist/{StructuredEditor-CMhUsxas.cjs → StructuredEditor-Bmq1Pxvl.cjs} +1 -1
- package/dist/components/FilterQuery.vue.d.ts +5 -0
- package/dist/components/FilterQuery.vue.d.ts.map +1 -1
- package/dist/components/FilterQueryBuilder.vue.d.ts +47 -0
- package/dist/components/FilterQueryBuilder.vue.d.ts.map +1 -0
- package/dist/components/dataTable/DataTable.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
- package/dist/components/layout/AppLayout.vue.d.ts.map +1 -1
- package/dist/components/layout/AppSidebar.vue.d.ts.map +1 -1
- package/dist/components/layout/Panel.vue.d.ts.map +1 -1
- package/dist/composables/index.d.ts +1 -0
- package/dist/composables/index.d.ts.map +1 -1
- package/dist/composables/useBoundedRectDrag.d.ts +13 -0
- package/dist/composables/useBoundedRectDrag.d.ts.map +1 -1
- package/dist/composables/useKeyboardInset.d.ts +5 -0
- package/dist/composables/useKeyboardInset.d.ts.map +1 -0
- package/dist/core.css +1 -1
- package/dist/dialog/Dialog.vue.d.ts.map +1 -1
- package/dist/i18n/index.d.ts +2 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +303 -302
- package/dist/src-COgNvUzW.cjs +764 -0
- package/dist/{src-CQ2GZqPM.js → src-EXMOTxie.js} +14361 -14090
- package/dist/src.css +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/FilterQuery.vue +139 -750
- package/src/components/FilterQueryBuilder.vue +797 -0
- package/src/components/dataTable/DataTable.vue +8 -0
- package/src/components/form/inputs/SelectInput.vue +3 -2
- package/src/components/layout/AppLayout.vue +44 -3
- package/src/components/layout/AppSidebar.vue +319 -28
- package/src/components/layout/Panel.vue +12 -0
- package/src/composables/index.ts +1 -0
- package/src/composables/useBoundedRectDrag.ts +16 -1
- package/src/composables/useKeyboardInset.ts +89 -0
- package/src/composables/usePointerSession.ts +2 -2
- package/src/dialog/Dialog.vue +28 -2
- package/src/i18n/locales/en.json +2 -1
- package/src/i18n/locales/he.json +2 -1
- package/src/styles/app-layout.css +4 -0
- package/src/styles/toast-overrides.css +8 -2
- package/dist/src-DVl3_LZS.cjs +0 -764
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { onMounted, onUnmounted, readonly, ref } from 'vue'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Tracks the on-screen keyboard via `visualViewport` and publishes
|
|
5
|
+
* `--bgl-keyboard-inset` on `:root` so sticky footers / composers can lift.
|
|
6
|
+
*
|
|
7
|
+
* Gated on an editable focus — fold/unfold on iPhone Duo changes the visual
|
|
8
|
+
* viewport too, and must NOT be treated as a keyboard.
|
|
9
|
+
*
|
|
10
|
+
* Shared across callers (ref-counted install).
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
const MIN_KEYBOARD_PX = 80
|
|
14
|
+
const inset = ref(0)
|
|
15
|
+
let subscribers = 0
|
|
16
|
+
let installed = false
|
|
17
|
+
let blurTimer: ReturnType<typeof setTimeout> | undefined
|
|
18
|
+
|
|
19
|
+
function isEditableFocused(): boolean {
|
|
20
|
+
const el = document.activeElement as HTMLElement | null
|
|
21
|
+
if (!el) return false
|
|
22
|
+
const tag = el.tagName
|
|
23
|
+
return tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT' || el.isContentEditable
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function publish(px: number) {
|
|
27
|
+
inset.value = px
|
|
28
|
+
document.documentElement.style.setProperty('--bgl-keyboard-inset', `${px}px`)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function measure() {
|
|
32
|
+
const vv = window.visualViewport
|
|
33
|
+
if (!vv) {
|
|
34
|
+
publish(0)
|
|
35
|
+
return
|
|
36
|
+
}
|
|
37
|
+
const visibleBottom = vv.height + vv.offsetTop
|
|
38
|
+
const raw = Math.max(0, window.innerHeight - visibleBottom)
|
|
39
|
+
const next = isEditableFocused() && raw > MIN_KEYBOARD_PX ? Math.round(raw) : 0
|
|
40
|
+
if (next !== inset.value) publish(next)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function onFocusIn() {
|
|
44
|
+
clearTimeout(blurTimer)
|
|
45
|
+
// iOS keyboard animates in — remeasure a few times.
|
|
46
|
+
requestAnimationFrame(measure)
|
|
47
|
+
setTimeout(measure, 120)
|
|
48
|
+
setTimeout(measure, 320)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function onFocusOut() {
|
|
52
|
+
clearTimeout(blurTimer)
|
|
53
|
+
blurTimer = setTimeout(measure, 80)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function install() {
|
|
57
|
+
if (installed || typeof window === 'undefined') return
|
|
58
|
+
installed = true
|
|
59
|
+
window.visualViewport?.addEventListener('resize', measure)
|
|
60
|
+
window.visualViewport?.addEventListener('scroll', measure)
|
|
61
|
+
window.addEventListener('focusin', onFocusIn)
|
|
62
|
+
window.addEventListener('focusout', onFocusOut)
|
|
63
|
+
measure()
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function uninstall() {
|
|
67
|
+
if (!installed) return
|
|
68
|
+
installed = false
|
|
69
|
+
clearTimeout(blurTimer)
|
|
70
|
+
window.visualViewport?.removeEventListener('resize', measure)
|
|
71
|
+
window.visualViewport?.removeEventListener('scroll', measure)
|
|
72
|
+
window.removeEventListener('focusin', onFocusIn)
|
|
73
|
+
window.removeEventListener('focusout', onFocusOut)
|
|
74
|
+
document.documentElement.style.removeProperty('--bgl-keyboard-inset')
|
|
75
|
+
inset.value = 0
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** Subscribe to the shared keyboard-inset tracker. Safe to call from many components. */
|
|
79
|
+
export function useKeyboardInset() {
|
|
80
|
+
onMounted(() => {
|
|
81
|
+
subscribers += 1
|
|
82
|
+
install()
|
|
83
|
+
})
|
|
84
|
+
onUnmounted(() => {
|
|
85
|
+
subscribers = Math.max(0, subscribers - 1)
|
|
86
|
+
if (subscribers === 0) uninstall()
|
|
87
|
+
})
|
|
88
|
+
return { inset: readonly(inset) }
|
|
89
|
+
}
|
|
@@ -79,7 +79,6 @@ export function createPointerSession() {
|
|
|
79
79
|
view!.removeEventListener('pointercancel', interrupted)
|
|
80
80
|
view!.removeEventListener('blur', cancel)
|
|
81
81
|
view!.removeEventListener('keydown', keydown)
|
|
82
|
-
targetEl?.removeEventListener('lostpointercapture', interrupted as EventListener)
|
|
83
82
|
try {
|
|
84
83
|
if (targetEl?.hasPointerCapture?.(id)) targetEl.releasePointerCapture(id)
|
|
85
84
|
} catch { /* Detached targets may already have lost capture. */ }
|
|
@@ -101,7 +100,8 @@ export function createPointerSession() {
|
|
|
101
100
|
view.addEventListener('pointercancel', interrupted)
|
|
102
101
|
view.addEventListener('blur', cancel)
|
|
103
102
|
view.addEventListener('keydown', keydown)
|
|
104
|
-
|
|
103
|
+
// Capture helps over iframes, but losing it must NOT abort — window
|
|
104
|
+
// listeners keep the session alive (fast drags often drop capture).
|
|
105
105
|
try { targetEl?.setPointerCapture?.(id) } catch { /* Window listeners remain a capture fallback. */ }
|
|
106
106
|
return true
|
|
107
107
|
}
|
package/src/dialog/Dialog.vue
CHANGED
|
@@ -170,12 +170,19 @@ defineExpose({ close })
|
|
|
170
170
|
|
|
171
171
|
<style scoped>
|
|
172
172
|
|
|
173
|
-
/* Base dialog styles
|
|
173
|
+
/* Base dialog styles.
|
|
174
|
+
Height cascade: vh fallback → dvh (tracks iOS chrome / fold) → subtract
|
|
175
|
+
asymmetric safe-area so content clears notch + home indicator on Duo.
|
|
176
|
+
`--bgl-keyboard-inset` (from useKeyboardInset) lifts the dialog above the
|
|
177
|
+
on-screen keyboard without fighting safe-area when the keyboard is closed. */
|
|
174
178
|
dialog {
|
|
175
179
|
border-radius: var(--bgl-card-radius, 12px);
|
|
176
180
|
max-width: var(--dialog-width);
|
|
177
181
|
width: calc(100% - 2rem);
|
|
178
182
|
max-height: calc(100vh - 2rem);
|
|
183
|
+
max-height: calc(100dvh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - var(--bgl-keyboard-inset, 0px));
|
|
184
|
+
margin-top: max(1rem, env(safe-area-inset-top, 0px));
|
|
185
|
+
margin-bottom: max(1rem, env(safe-area-inset-bottom, 0px), var(--bgl-keyboard-inset, 0px));
|
|
179
186
|
background: var(--bgl-popup-bg, #fff);
|
|
180
187
|
color: var(--bgl-popup-text, black);
|
|
181
188
|
}
|
|
@@ -189,10 +196,12 @@ border-radius: var(--bgl-card-radius, 12px);
|
|
|
189
196
|
|
|
190
197
|
.height-100-2 {
|
|
191
198
|
height: calc(100vh - 2rem);
|
|
199
|
+
height: calc(100dvh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
|
|
192
200
|
}
|
|
193
201
|
|
|
194
202
|
.max-height-100-2 {
|
|
195
203
|
max-height: calc(100vh - 2rem);
|
|
204
|
+
max-height: calc(100dvh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
|
|
196
205
|
}
|
|
197
206
|
|
|
198
207
|
.dialog-close {
|
|
@@ -285,7 +294,18 @@ dialog.dialog-bottom {
|
|
|
285
294
|
border-end-start-radius: 0;
|
|
286
295
|
}
|
|
287
296
|
@media (max-width: 910px) {
|
|
288
|
-
dialog.dialog-bottom {
|
|
297
|
+
dialog.dialog-bottom {
|
|
298
|
+
width: 100%;
|
|
299
|
+
max-width: 100%;
|
|
300
|
+
margin-inline: 0;
|
|
301
|
+
/* Lift above the iOS keyboard when `--bgl-keyboard-inset` is set. */
|
|
302
|
+
margin-bottom: var(--bgl-keyboard-inset, 0px);
|
|
303
|
+
padding-bottom: max(env(safe-area-inset-bottom, 0px), 0px);
|
|
304
|
+
padding-left: env(safe-area-inset-left, 0px);
|
|
305
|
+
padding-right: env(safe-area-inset-right, 0px);
|
|
306
|
+
max-height: calc(100dvh - env(safe-area-inset-top, 0px) - var(--bgl-keyboard-inset, 0px));
|
|
307
|
+
box-sizing: border-box;
|
|
308
|
+
}
|
|
289
309
|
}
|
|
290
310
|
|
|
291
311
|
/* Drag-handle grip for bottom sheets. */
|
|
@@ -463,12 +483,18 @@ dialog.dialog-right .grid-dialog {
|
|
|
463
483
|
dialog.dialog-left .grid-dialog,
|
|
464
484
|
dialog.dialog-right .grid-dialog {
|
|
465
485
|
max-height: 100vh;
|
|
486
|
+
max-height: 100dvh;
|
|
466
487
|
height: unset !important;
|
|
467
488
|
}
|
|
468
489
|
|
|
469
490
|
dialog.dialog-left,
|
|
470
491
|
dialog.dialog-right {
|
|
471
492
|
width: 100%;
|
|
493
|
+
padding-top: env(safe-area-inset-top, 0px);
|
|
494
|
+
padding-bottom: env(safe-area-inset-bottom, 0px);
|
|
495
|
+
padding-left: env(safe-area-inset-left, 0px);
|
|
496
|
+
padding-right: env(safe-area-inset-right, 0px);
|
|
497
|
+
box-sizing: border-box;
|
|
472
498
|
}
|
|
473
499
|
}
|
|
474
500
|
|
package/src/i18n/locales/en.json
CHANGED
package/src/i18n/locales/he.json
CHANGED
|
@@ -162,6 +162,10 @@
|
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
+
/* iPhone Duo / foldables: when the inner display is open the viewport is often
|
|
166
|
+
near-square — still treat it as a single fluid viewport (no device sniffing).
|
|
167
|
+
The 910px mobile breakpoint already flips list/detail stacks; keep that. */
|
|
168
|
+
|
|
165
169
|
@media screen and (max-width: 910px) {
|
|
166
170
|
.tab {
|
|
167
171
|
font-size: 12px;
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
/* Reset popover containers used to promote elements above showModal() dialogs
|
|
1
|
+
/* Reset popover containers used to promote elements above showModal() dialogs.
|
|
2
|
+
Physical safe-area sides (not a single inline shorthand) — iPhone Duo insets
|
|
3
|
+
are frequently asymmetric across the fold. */
|
|
2
4
|
#bgl-toast-container {
|
|
3
5
|
all: unset;
|
|
4
6
|
display: block;
|
|
5
7
|
position: fixed;
|
|
6
|
-
top:
|
|
8
|
+
top: env(safe-area-inset-top, 0px);
|
|
7
9
|
inset-inline-end: 0;
|
|
8
10
|
width: 0;
|
|
9
11
|
height: 0;
|
|
10
12
|
overflow: visible;
|
|
13
|
+
padding-top: 0.5rem;
|
|
14
|
+
padding-left: env(safe-area-inset-left, 0px);
|
|
15
|
+
padding-right: env(safe-area-inset-right, 0px);
|
|
16
|
+
box-sizing: content-box;
|
|
11
17
|
}
|
|
12
18
|
|
|
13
19
|
/* Override vue-toastification default styles */
|